diff --git a/app/page.tsx b/app/page.tsx index c8005390..1c9518ac 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -26,7 +26,19 @@ function MapInspector() { const [missionName, setMissionName] = useState( searchParams.get("mission") || "TWL2_WoodyMyrk", ); - const [isLoading, setIsLoading] = useState(true); + const [loadingProgress, setLoadingProgress] = useState(0); + const [showLoadingIndicator, setShowLoadingIndicator] = useState(true); + const isLoading = loadingProgress < 1; + + // Keep the loading indicator visible briefly after reaching 100% + useEffect(() => { + if (isLoading) { + setShowLoadingIndicator(true); + } else { + const timer = setTimeout(() => setShowLoadingIndicator(false), 500); + return () => clearTimeout(timer); + } + }, [isLoading]); useEffect(() => { // For automation, like the t2-maps app! @@ -48,17 +60,31 @@ function MapInspector() { router.replace(`?${params.toString()}`, { scroll: false }); }, [missionName, router]); - const handleLoadingChange = useCallback((loading: boolean) => { - setIsLoading(loading); - }, []); + const handleLoadingChange = useCallback( + (_loading: boolean, progress: number = 0) => { + setLoadingProgress(progress); + }, + [], + ); return (
- {isLoading && ( -
+ {showLoadingIndicator && ( +
+
+
+
+
+
+ {Math.round(loadingProgress * 100)}% +
+
)} diff --git a/app/style.css b/app/style.css index f0134649..1ef74a68 100644 --- a/app/style.css +++ b/app/style.css @@ -259,22 +259,64 @@ main { } .LoadingSpinner { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); width: 48px; height: 48px; border: 4px solid rgba(255, 255, 255, 0.2); border-top-color: white; border-radius: 50%; animation: LoadingSpinner-spin 1s linear infinite; - pointer-events: none; - z-index: 1; } @keyframes LoadingSpinner-spin { to { - transform: translate(-50%, -50%) rotate(360deg); + transform: rotate(360deg); } } + +#loadingIndicator { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + display: flex; + flex-direction: column; + align-items: center; + gap: 16px; + pointer-events: none; + z-index: 1; + opacity: 0.8; +} + +#loadingIndicator[data-complete="true"] { + animation: loadingComplete 0.3s ease-out forwards; +} + +@keyframes loadingComplete { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +.LoadingProgress { + width: 200px; + height: 4px; + background: rgba(255, 255, 255, 0.2); + border-radius: 2px; + overflow: hidden; +} + +.LoadingProgress-bar { + height: 100%; + background: white; + border-radius: 2px; + transition: width 0.1s ease-out; +} + +.LoadingProgress-text { + font-size: 14px; + color: rgba(255, 255, 255, 0.7); + font-variant-numeric: tabular-nums; +} diff --git a/docs/404.html b/docs/404.html index d109f743..3fab322b 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1 +1 @@ -404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file diff --git a/docs/404/index.html b/docs/404/index.html index d109f743..3fab322b 100644 --- a/docs/404/index.html +++ b/docs/404/index.html @@ -1 +1 @@ -404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.MapGenius – Explore maps for Tribes 2

404

This page could not be found.

\ No newline at end of file diff --git a/docs/_next/static/PYi7xunkxIU2JehSYV4Sg/_buildManifest.js b/docs/_next/static/XHGJaNs99HGJmX9H1-TS5/_buildManifest.js similarity index 100% rename from docs/_next/static/PYi7xunkxIU2JehSYV4Sg/_buildManifest.js rename to docs/_next/static/XHGJaNs99HGJmX9H1-TS5/_buildManifest.js diff --git a/docs/_next/static/PYi7xunkxIU2JehSYV4Sg/_clientMiddlewareManifest.json b/docs/_next/static/XHGJaNs99HGJmX9H1-TS5/_clientMiddlewareManifest.json similarity index 100% rename from docs/_next/static/PYi7xunkxIU2JehSYV4Sg/_clientMiddlewareManifest.json rename to docs/_next/static/XHGJaNs99HGJmX9H1-TS5/_clientMiddlewareManifest.json diff --git a/docs/_next/static/PYi7xunkxIU2JehSYV4Sg/_ssgManifest.js b/docs/_next/static/XHGJaNs99HGJmX9H1-TS5/_ssgManifest.js similarity index 100% rename from docs/_next/static/PYi7xunkxIU2JehSYV4Sg/_ssgManifest.js rename to docs/_next/static/XHGJaNs99HGJmX9H1-TS5/_ssgManifest.js diff --git a/docs/_next/static/chunks/be0d253f8c18ec3b.css b/docs/_next/static/chunks/15b04c9d2ba2c4cf.css similarity index 79% rename from docs/_next/static/chunks/be0d253f8c18ec3b.css rename to docs/_next/static/chunks/15b04c9d2ba2c4cf.css index 7be76984..231dc2da 100644 --- a/docs/_next/static/chunks/be0d253f8c18ec3b.css +++ b/docs/_next/static/chunks/15b04c9d2ba2c4cf.css @@ -1 +1 @@ -html{box-sizing:border-box;background:#000;margin:0;padding:0}*,:before,:after{box-sizing:inherit}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Oxygen,Open Sans,sans-serif;font-size:100%}body{margin:0;padding:0}main{width:100vw;height:100vh}#canvasContainer{z-index:0;position:absolute;top:0;bottom:0;left:0;right:0}#controls{color:#fff;z-index:1;background:rgba(0,0,0,.5);border-radius:0 0 4px;align-items:center;gap:20px;padding:8px 12px 8px 8px;font-size:13px;display:flex;position:fixed;top:0;left:0}.CheckboxField,.Field{align-items:center;gap:6px;display:flex}#fovInput,#speedInput{max-width:80px}.StaticShapeLabel{color:#fff;white-space:nowrap;background:rgba(0,0,0,.5);border-radius:1px;padding:1px 3px;font-size:11px}.StatsPanel{right:0;left:auto!important}.AxisLabel{pointer-events:none;font-size:12px}.AxisLabel[data-axis=x]{color:#f90}.AxisLabel[data-axis=y]{color:#9f0}.AxisLabel[data-axis=z]{color:#09f}.MissionSelect-inputWrapper{align-items:center;display:flex;position:relative}.MissionSelect-shortcut{color:rgba(255,255,255,.6);pointer-events:none;background:rgba(255,255,255,.15);border-radius:3px;padding:1px 4px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:11px;position:absolute;right:7px}.MissionSelect-input[aria-expanded=true]~.MissionSelect-shortcut{display:none}.MissionSelect-input{color:#fff;background:rgba(0,0,0,.6);border:1px solid rgba(255,255,255,.3);border-radius:3px;outline:none;width:240px;padding:6px 36px 6px 8px;font-size:14px}.MissionSelect-input[aria-expanded=true]{padding-right:8px}.MissionSelect-input:focus{border-color:rgba(255,255,255,.6)}.MissionSelect-input::placeholder{color:#fff;font-weight:600}.MissionSelect-popover{z-index:100;min-width:320px;max-height:var(--popover-available-height,90vh);overscroll-behavior:contain;background:rgba(20,20,20,.95);border:1px solid rgba(255,255,255,.5);border-radius:3px;overflow-y:auto;box-shadow:0 8px 24px rgba(0,0,0,.6)}.MissionSelect-list{padding:4px 0}.MissionSelect-list:has(>.MissionSelect-group:first-child){padding-top:0}.MissionSelect-group{padding-bottom:4px}.MissionSelect-groupLabel{color:#c6caca;z-index:1;background:rgba(58,69,72,.95);border-bottom:1px solid rgba(255,255,255,.3);padding:6px 8px 6px 12px;font-size:13px;font-weight:600;position:-webkit-sticky;position:sticky;top:0}.MissionSelect-group:not(:last-child){border-bottom:1px solid rgba(255,255,255,.3)}.MissionSelect-item{cursor:pointer;border-radius:4px;outline:none;flex-direction:column;gap:1px;margin:4px 4px 0;padding:6px 8px;scroll-margin-top:32px;display:flex}.MissionSelect-list>.MissionSelect-item:first-child{margin-top:0}.MissionSelect-item[data-active-item]{background:rgba(255,255,255,.15)}.MissionSelect-item[aria-selected=true]{background:rgba(100,150,255,.3)}.MissionSelect-itemHeader{align-items:center;gap:6px;display:flex}.MissionSelect-itemName{color:#fff;font-size:14px;font-weight:600}.MissionSelect-itemTypes{gap:3px;display:flex}.MissionSelect-itemType{color:#fff;background:rgba(255,157,0,.4);border-radius:3px;padding:2px 5px;font-size:10px;font-weight:600}.MissionSelect-itemMissionName{color:rgba(255,255,255,.5);font-size:12px}.MissionSelect-noResults{color:rgba(255,255,255,.5);text-align:center;padding:12px 8px;font-size:13px}.LoadingSpinner{pointer-events:none;z-index:1;border:4px solid rgba(255,255,255,.2);border-top-color:#fff;border-radius:50%;width:48px;height:48px;animation:1s linear infinite LoadingSpinner-spin;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@keyframes LoadingSpinner-spin{to{transform:translate(-50%,-50%)rotate(360deg)}} +html{box-sizing:border-box;background:#000;margin:0;padding:0}*,:before,:after{box-sizing:inherit}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Oxygen,Open Sans,sans-serif;font-size:100%}body{margin:0;padding:0}main{width:100vw;height:100vh}#canvasContainer{z-index:0;position:absolute;top:0;bottom:0;left:0;right:0}#controls{color:#fff;z-index:1;background:rgba(0,0,0,.5);border-radius:0 0 4px;align-items:center;gap:20px;padding:8px 12px 8px 8px;font-size:13px;display:flex;position:fixed;top:0;left:0}.CheckboxField,.Field{align-items:center;gap:6px;display:flex}#fovInput,#speedInput{max-width:80px}.StaticShapeLabel{color:#fff;white-space:nowrap;background:rgba(0,0,0,.5);border-radius:1px;padding:1px 3px;font-size:11px}.StatsPanel{right:0;left:auto!important}.AxisLabel{pointer-events:none;font-size:12px}.AxisLabel[data-axis=x]{color:#f90}.AxisLabel[data-axis=y]{color:#9f0}.AxisLabel[data-axis=z]{color:#09f}.MissionSelect-inputWrapper{align-items:center;display:flex;position:relative}.MissionSelect-shortcut{color:rgba(255,255,255,.6);pointer-events:none;background:rgba(255,255,255,.15);border-radius:3px;padding:1px 4px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:11px;position:absolute;right:7px}.MissionSelect-input[aria-expanded=true]~.MissionSelect-shortcut{display:none}.MissionSelect-input{color:#fff;background:rgba(0,0,0,.6);border:1px solid rgba(255,255,255,.3);border-radius:3px;outline:none;width:240px;padding:6px 36px 6px 8px;font-size:14px}.MissionSelect-input[aria-expanded=true]{padding-right:8px}.MissionSelect-input:focus{border-color:rgba(255,255,255,.6)}.MissionSelect-input::placeholder{color:#fff;font-weight:600}.MissionSelect-popover{z-index:100;min-width:320px;max-height:var(--popover-available-height,90vh);overscroll-behavior:contain;background:rgba(20,20,20,.95);border:1px solid rgba(255,255,255,.5);border-radius:3px;overflow-y:auto;box-shadow:0 8px 24px rgba(0,0,0,.6)}.MissionSelect-list{padding:4px 0}.MissionSelect-list:has(>.MissionSelect-group:first-child){padding-top:0}.MissionSelect-group{padding-bottom:4px}.MissionSelect-groupLabel{color:#c6caca;z-index:1;background:rgba(58,69,72,.95);border-bottom:1px solid rgba(255,255,255,.3);padding:6px 8px 6px 12px;font-size:13px;font-weight:600;position:-webkit-sticky;position:sticky;top:0}.MissionSelect-group:not(:last-child){border-bottom:1px solid rgba(255,255,255,.3)}.MissionSelect-item{cursor:pointer;border-radius:4px;outline:none;flex-direction:column;gap:1px;margin:4px 4px 0;padding:6px 8px;scroll-margin-top:32px;display:flex}.MissionSelect-list>.MissionSelect-item:first-child{margin-top:0}.MissionSelect-item[data-active-item]{background:rgba(255,255,255,.15)}.MissionSelect-item[aria-selected=true]{background:rgba(100,150,255,.3)}.MissionSelect-itemHeader{align-items:center;gap:6px;display:flex}.MissionSelect-itemName{color:#fff;font-size:14px;font-weight:600}.MissionSelect-itemTypes{gap:3px;display:flex}.MissionSelect-itemType{color:#fff;background:rgba(255,157,0,.4);border-radius:3px;padding:2px 5px;font-size:10px;font-weight:600}.MissionSelect-itemMissionName{color:rgba(255,255,255,.5);font-size:12px}.MissionSelect-noResults{color:rgba(255,255,255,.5);text-align:center;padding:12px 8px;font-size:13px}.LoadingSpinner{border:4px solid rgba(255,255,255,.2);border-top-color:#fff;border-radius:50%;width:48px;height:48px;animation:1s linear infinite LoadingSpinner-spin}@keyframes LoadingSpinner-spin{to{transform:rotate(360deg)}}#loadingIndicator{pointer-events:none;z-index:1;opacity:.8;flex-direction:column;align-items:center;gap:16px;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#loadingIndicator[data-complete=true]{animation:.3s ease-out forwards loadingComplete}@keyframes loadingComplete{0%{opacity:1}to{opacity:0}}.LoadingProgress{background:rgba(255,255,255,.2);border-radius:2px;width:200px;height:4px;overflow:hidden}.LoadingProgress-bar{background:#fff;border-radius:2px;height:100%;transition:width .1s ease-out}.LoadingProgress-text{color:rgba(255,255,255,.7);font-variant-numeric:tabular-nums;font-size:14px} diff --git a/docs/_next/static/chunks/741e1acf393d55a4.js b/docs/_next/static/chunks/1e4f7733a4dd09be.js similarity index 77% rename from docs/_next/static/chunks/741e1acf393d55a4.js rename to docs/_next/static/chunks/1e4f7733a4dd09be.js index 2d246c01..3835a865 100644 --- a/docs/_next/static/chunks/741e1acf393d55a4.js +++ b/docs/_next/static/chunks/1e4f7733a4dd09be.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18566,(e,t,r)=>{t.exports=e.r(76562)},38360,(e,t,r)=>{var n={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",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:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},i=Object.keys(n).join("|"),a=RegExp(i,"g"),s=RegExp(i,"");function o(e){return n[e]}var l=function(e){return e.replace(a,o)};t.exports=l,t.exports.has=function(e){return!!e.match(s)},t.exports.remove=l},29402,(e,t,r)=>{var n,i,a="__lodash_hash_undefined__",s=1/0,o="[object Arguments]",l="[object Array]",u="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Function]",h="[object Map]",p="[object Number]",m="[object Object]",g="[object Promise]",A="[object RegExp]",y="[object Set]",x="[object String]",B="[object Symbol]",C="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D=/^\w*$/,b=/^\./,M=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/\\(\\)?/g,F=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,I={};I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I[o]=I[l]=I[S]=I[u]=I[E]=I[c]=I[d]=I[f]=I[h]=I[p]=I[m]=I[A]=I[y]=I[x]=I[C]=!1;var P=e.g&&e.g.Object===Object&&e.g,L="object"==typeof self&&self&&self.Object===Object&&self,U=P||L||Function("return this")(),G=r&&!r.nodeType&&r,O=G&&t&&!t.nodeType&&t,H=O&&O.exports===G&&P.process,N=function(){try{return H&&H.binding("util")}catch(e){}}(),k=N&&N.isTypedArray;function j(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r-1},eB.prototype.set=function(e,t){var r=this.__data__,n=eT(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},eC.prototype.clear=function(){this.__data__={hash:new ex,map:new(eo||eB),string:new ex}},eC.prototype.delete=function(e){return eP(this,e).delete(e)},eC.prototype.get=function(e){return eP(this,e).get(e)},eC.prototype.has=function(e){return eP(this,e).has(e)},eC.prototype.set=function(e,t){return eP(this,e).set(e,t),this},eS.prototype.add=eS.prototype.push=function(e){return this.__data__.set(e,a),this},eS.prototype.has=function(e){return this.__data__.has(e)},eE.prototype.clear=function(){this.__data__=new eB},eE.prototype.delete=function(e){return this.__data__.delete(e)},eE.prototype.get=function(e){return this.__data__.get(e)},eE.prototype.has=function(e){return this.__data__.has(e)},eE.prototype.set=function(e,t){var r=this.__data__;if(r instanceof eB){var n=r.__data__;if(!eo||n.length<199)return n.push([e,t]),this;r=this.__data__=new eC(n)}return r.set(e,t),this};var eD=function(e,t){return function(r,n){if(null==r)return r;if(!eQ(r))return e(r,n);for(var i=r.length,a=-1,s=Object(r);(t?a--:++ao))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var c=-1,d=!0,f=1&i?new eS:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=0x1fffffffffffff}function e_(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function eZ(e){return!!e&&"object"==typeof e}function eY(e){return"symbol"==typeof e||eZ(e)&&$.call(e)==B}var eq=k?z(k):function(e){return eZ(e)&&eX(e.length)&&!!I[$.call(e)]};function e$(e){return eQ(e)?function(e,t){var r=eV(e)||eJ(e)?function(e,t){for(var r=-1,n=Array(e);++rt||a&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=o)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}(e,t,r)});l--;)o[l]=o[l].value;return o}(e,t,r))}},81405,(e,t,r)=>{e.e,t.exports=function(){var e=function(){function t(e){return i.appendChild(e.dom),e}function r(e){for(var t=0;ts+1e3&&(l.update(1e3*o/(e-s),100),s=e,o=0,c)){var t=performance.memory;c.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){a=this.end()},domElement:i,setMode:r}};return e.Panel=function(e,t,r){var n=1/0,i=0,a=Math.round,s=a(window.devicePixelRatio||1),o=80*s,l=48*s,u=3*s,c=2*s,d=3*s,f=15*s,h=74*s,p=30*s,m=document.createElement("canvas");m.width=o,m.height=l,m.style.cssText="width:80px;height:48px";var g=m.getContext("2d");return g.font="bold "+9*s+"px Helvetica,Arial,sans-serif",g.textBaseline="top",g.fillStyle=r,g.fillRect(0,0,o,l),g.fillStyle=t,g.fillText(e,u,c),g.fillRect(d,f,h,p),g.fillStyle=r,g.globalAlpha=.9,g.fillRect(d,f,h,p),{dom:m,update:function(l,A){n=Math.min(n,l),i=Math.max(i,l),g.fillStyle=r,g.globalAlpha=1,g.fillRect(0,0,o,f),g.fillStyle=t,g.fillText(a(l)+" "+e+" ("+a(n)+"-"+a(i)+")",u,c),g.drawImage(m,d+s,f,h-s,p,d,f,h-s,p),g.fillRect(d+h-s,f,s,p),g.fillStyle=r,g.globalAlpha=.9,g.fillRect(d+h-s,f,s,a((1-l/A)*p))}}},e}()},31713,e=>{"use strict";let t,r,n,i;e.s(["default",()=>ds],31713);var a,s,o,l,u,c,d,f,h,p,m,g,A,y,x,B,C,S,E,T,D,b,M,w,F,R,I,P,L,U,G,O,H,N,k,j,z,K,J,V,Q,W,X,_,Z,Y,q,$,ee,et,er,en,ei,ea,es,eo,el,eu,ec,ed,ef,eh,ep,em,ev,eg,eA,ey,ex,eB,eC,eS,eE,eT,eD,eb,eM,ew,eF,eR,eI,eP,eL,eU=e.i(43476),eG=e.i(71645),eO=e.i(18566),eH=e.i(46712);e.s(["ACESFilmicToneMapping",()=>ek.ACESFilmicToneMapping,"AddEquation",()=>ek.AddEquation,"AddOperation",()=>ek.AddOperation,"AdditiveAnimationBlendMode",()=>ek.AdditiveAnimationBlendMode,"AdditiveBlending",()=>ek.AdditiveBlending,"AgXToneMapping",()=>ek.AgXToneMapping,"AlphaFormat",()=>ek.AlphaFormat,"AlwaysCompare",()=>ek.AlwaysCompare,"AlwaysDepth",()=>ek.AlwaysDepth,"AlwaysStencilFunc",()=>ek.AlwaysStencilFunc,"AmbientLight",()=>ek.AmbientLight,"AnimationAction",()=>ek.AnimationAction,"AnimationClip",()=>ek.AnimationClip,"AnimationLoader",()=>ek.AnimationLoader,"AnimationMixer",()=>ek.AnimationMixer,"AnimationObjectGroup",()=>ek.AnimationObjectGroup,"AnimationUtils",()=>ek.AnimationUtils,"ArcCurve",()=>ek.ArcCurve,"ArrayCamera",()=>ek.ArrayCamera,"ArrowHelper",()=>ek.ArrowHelper,"AttachedBindMode",()=>ek.AttachedBindMode,"Audio",()=>ek.Audio,"AudioAnalyser",()=>ek.AudioAnalyser,"AudioContext",()=>ek.AudioContext,"AudioListener",()=>ek.AudioListener,"AudioLoader",()=>ek.AudioLoader,"AxesHelper",()=>ek.AxesHelper,"BackSide",()=>ek.BackSide,"BasicDepthPacking",()=>ek.BasicDepthPacking,"BasicShadowMap",()=>ek.BasicShadowMap,"BatchedMesh",()=>ek.BatchedMesh,"Bone",()=>ek.Bone,"BooleanKeyframeTrack",()=>ek.BooleanKeyframeTrack,"Box2",()=>ek.Box2,"Box3",()=>ek.Box3,"Box3Helper",()=>ek.Box3Helper,"BoxGeometry",()=>ek.BoxGeometry,"BoxHelper",()=>ek.BoxHelper,"BufferAttribute",()=>ek.BufferAttribute,"BufferGeometry",()=>ek.BufferGeometry,"BufferGeometryLoader",()=>ek.BufferGeometryLoader,"ByteType",()=>ek.ByteType,"Cache",()=>ek.Cache,"Camera",()=>ek.Camera,"CameraHelper",()=>ek.CameraHelper,"CanvasTexture",()=>ek.CanvasTexture,"CapsuleGeometry",()=>ek.CapsuleGeometry,"CatmullRomCurve3",()=>ek.CatmullRomCurve3,"CineonToneMapping",()=>ek.CineonToneMapping,"CircleGeometry",()=>ek.CircleGeometry,"ClampToEdgeWrapping",()=>ek.ClampToEdgeWrapping,"Clock",()=>ek.Clock,"Color",()=>ek.Color,"ColorKeyframeTrack",()=>ek.ColorKeyframeTrack,"ColorManagement",()=>ek.ColorManagement,"CompressedArrayTexture",()=>ek.CompressedArrayTexture,"CompressedCubeTexture",()=>ek.CompressedCubeTexture,"CompressedTexture",()=>ek.CompressedTexture,"CompressedTextureLoader",()=>ek.CompressedTextureLoader,"ConeGeometry",()=>ek.ConeGeometry,"ConstantAlphaFactor",()=>ek.ConstantAlphaFactor,"ConstantColorFactor",()=>ek.ConstantColorFactor,"Controls",()=>ek.Controls,"CubeCamera",()=>ek.CubeCamera,"CubeReflectionMapping",()=>ek.CubeReflectionMapping,"CubeRefractionMapping",()=>ek.CubeRefractionMapping,"CubeTexture",()=>ek.CubeTexture,"CubeTextureLoader",()=>ek.CubeTextureLoader,"CubeUVReflectionMapping",()=>ek.CubeUVReflectionMapping,"CubicBezierCurve",()=>ek.CubicBezierCurve,"CubicBezierCurve3",()=>ek.CubicBezierCurve3,"CubicInterpolant",()=>ek.CubicInterpolant,"CullFaceBack",()=>ek.CullFaceBack,"CullFaceFront",()=>ek.CullFaceFront,"CullFaceFrontBack",()=>ek.CullFaceFrontBack,"CullFaceNone",()=>ek.CullFaceNone,"Curve",()=>ek.Curve,"CurvePath",()=>ek.CurvePath,"CustomBlending",()=>ek.CustomBlending,"CustomToneMapping",()=>ek.CustomToneMapping,"CylinderGeometry",()=>ek.CylinderGeometry,"Cylindrical",()=>ek.Cylindrical,"Data3DTexture",()=>ek.Data3DTexture,"DataArrayTexture",()=>ek.DataArrayTexture,"DataTexture",()=>ek.DataTexture,"DataTextureLoader",()=>ek.DataTextureLoader,"DataUtils",()=>ek.DataUtils,"DecrementStencilOp",()=>ek.DecrementStencilOp,"DecrementWrapStencilOp",()=>ek.DecrementWrapStencilOp,"DefaultLoadingManager",()=>ek.DefaultLoadingManager,"DepthFormat",()=>ek.DepthFormat,"DepthStencilFormat",()=>ek.DepthStencilFormat,"DepthTexture",()=>ek.DepthTexture,"DetachedBindMode",()=>ek.DetachedBindMode,"DirectionalLight",()=>ek.DirectionalLight,"DirectionalLightHelper",()=>ek.DirectionalLightHelper,"DiscreteInterpolant",()=>ek.DiscreteInterpolant,"DodecahedronGeometry",()=>ek.DodecahedronGeometry,"DoubleSide",()=>ek.DoubleSide,"DstAlphaFactor",()=>ek.DstAlphaFactor,"DstColorFactor",()=>ek.DstColorFactor,"DynamicCopyUsage",()=>ek.DynamicCopyUsage,"DynamicDrawUsage",()=>ek.DynamicDrawUsage,"DynamicReadUsage",()=>ek.DynamicReadUsage,"EdgesGeometry",()=>ek.EdgesGeometry,"EllipseCurve",()=>ek.EllipseCurve,"EqualCompare",()=>ek.EqualCompare,"EqualDepth",()=>ek.EqualDepth,"EqualStencilFunc",()=>ek.EqualStencilFunc,"EquirectangularReflectionMapping",()=>ek.EquirectangularReflectionMapping,"EquirectangularRefractionMapping",()=>ek.EquirectangularRefractionMapping,"Euler",()=>ek.Euler,"EventDispatcher",()=>ek.EventDispatcher,"ExternalTexture",()=>ek.ExternalTexture,"ExtrudeGeometry",()=>ek.ExtrudeGeometry,"FileLoader",()=>ek.FileLoader,"Float16BufferAttribute",()=>ek.Float16BufferAttribute,"Float32BufferAttribute",()=>ek.Float32BufferAttribute,"FloatType",()=>ek.FloatType,"Fog",()=>ek.Fog,"FogExp2",()=>ek.FogExp2,"FramebufferTexture",()=>ek.FramebufferTexture,"FrontSide",()=>ek.FrontSide,"Frustum",()=>ek.Frustum,"FrustumArray",()=>ek.FrustumArray,"GLBufferAttribute",()=>ek.GLBufferAttribute,"GLSL1",()=>ek.GLSL1,"GLSL3",()=>ek.GLSL3,"GreaterCompare",()=>ek.GreaterCompare,"GreaterDepth",()=>ek.GreaterDepth,"GreaterEqualCompare",()=>ek.GreaterEqualCompare,"GreaterEqualDepth",()=>ek.GreaterEqualDepth,"GreaterEqualStencilFunc",()=>ek.GreaterEqualStencilFunc,"GreaterStencilFunc",()=>ek.GreaterStencilFunc,"GridHelper",()=>ek.GridHelper,"Group",()=>ek.Group,"HalfFloatType",()=>ek.HalfFloatType,"HemisphereLight",()=>ek.HemisphereLight,"HemisphereLightHelper",()=>ek.HemisphereLightHelper,"IcosahedronGeometry",()=>ek.IcosahedronGeometry,"ImageBitmapLoader",()=>ek.ImageBitmapLoader,"ImageLoader",()=>ek.ImageLoader,"ImageUtils",()=>ek.ImageUtils,"IncrementStencilOp",()=>ek.IncrementStencilOp,"IncrementWrapStencilOp",()=>ek.IncrementWrapStencilOp,"InstancedBufferAttribute",()=>ek.InstancedBufferAttribute,"InstancedBufferGeometry",()=>ek.InstancedBufferGeometry,"InstancedInterleavedBuffer",()=>ek.InstancedInterleavedBuffer,"InstancedMesh",()=>ek.InstancedMesh,"Int16BufferAttribute",()=>ek.Int16BufferAttribute,"Int32BufferAttribute",()=>ek.Int32BufferAttribute,"Int8BufferAttribute",()=>ek.Int8BufferAttribute,"IntType",()=>ek.IntType,"InterleavedBuffer",()=>ek.InterleavedBuffer,"InterleavedBufferAttribute",()=>ek.InterleavedBufferAttribute,"Interpolant",()=>ek.Interpolant,"InterpolateDiscrete",()=>ek.InterpolateDiscrete,"InterpolateLinear",()=>ek.InterpolateLinear,"InterpolateSmooth",()=>ek.InterpolateSmooth,"InterpolationSamplingMode",()=>ek.InterpolationSamplingMode,"InterpolationSamplingType",()=>ek.InterpolationSamplingType,"InvertStencilOp",()=>ek.InvertStencilOp,"KeepStencilOp",()=>ek.KeepStencilOp,"KeyframeTrack",()=>ek.KeyframeTrack,"LOD",()=>ek.LOD,"LatheGeometry",()=>ek.LatheGeometry,"Layers",()=>ek.Layers,"LessCompare",()=>ek.LessCompare,"LessDepth",()=>ek.LessDepth,"LessEqualCompare",()=>ek.LessEqualCompare,"LessEqualDepth",()=>ek.LessEqualDepth,"LessEqualStencilFunc",()=>ek.LessEqualStencilFunc,"LessStencilFunc",()=>ek.LessStencilFunc,"Light",()=>ek.Light,"LightProbe",()=>ek.LightProbe,"Line",()=>ek.Line,"Line3",()=>ek.Line3,"LineBasicMaterial",()=>ek.LineBasicMaterial,"LineCurve",()=>ek.LineCurve,"LineCurve3",()=>ek.LineCurve3,"LineDashedMaterial",()=>ek.LineDashedMaterial,"LineLoop",()=>ek.LineLoop,"LineSegments",()=>ek.LineSegments,"LinearFilter",()=>ek.LinearFilter,"LinearInterpolant",()=>ek.LinearInterpolant,"LinearMipMapLinearFilter",()=>ek.LinearMipMapLinearFilter,"LinearMipMapNearestFilter",()=>ek.LinearMipMapNearestFilter,"LinearMipmapLinearFilter",()=>ek.LinearMipmapLinearFilter,"LinearMipmapNearestFilter",()=>ek.LinearMipmapNearestFilter,"LinearSRGBColorSpace",()=>ek.LinearSRGBColorSpace,"LinearToneMapping",()=>ek.LinearToneMapping,"LinearTransfer",()=>ek.LinearTransfer,"Loader",()=>ek.Loader,"LoaderUtils",()=>ek.LoaderUtils,"LoadingManager",()=>ek.LoadingManager,"LoopOnce",()=>ek.LoopOnce,"LoopPingPong",()=>ek.LoopPingPong,"LoopRepeat",()=>ek.LoopRepeat,"MOUSE",()=>ek.MOUSE,"Material",()=>ek.Material,"MaterialLoader",()=>ek.MaterialLoader,"MathUtils",()=>ek.MathUtils,"Matrix2",()=>ek.Matrix2,"Matrix3",()=>ek.Matrix3,"Matrix4",()=>ek.Matrix4,"MaxEquation",()=>ek.MaxEquation,"Mesh",()=>ek.Mesh,"MeshBasicMaterial",()=>ek.MeshBasicMaterial,"MeshDepthMaterial",()=>ek.MeshDepthMaterial,"MeshDistanceMaterial",()=>ek.MeshDistanceMaterial,"MeshLambertMaterial",()=>ek.MeshLambertMaterial,"MeshMatcapMaterial",()=>ek.MeshMatcapMaterial,"MeshNormalMaterial",()=>ek.MeshNormalMaterial,"MeshPhongMaterial",()=>ek.MeshPhongMaterial,"MeshPhysicalMaterial",()=>ek.MeshPhysicalMaterial,"MeshStandardMaterial",()=>ek.MeshStandardMaterial,"MeshToonMaterial",()=>ek.MeshToonMaterial,"MinEquation",()=>ek.MinEquation,"MirroredRepeatWrapping",()=>ek.MirroredRepeatWrapping,"MixOperation",()=>ek.MixOperation,"MultiplyBlending",()=>ek.MultiplyBlending,"MultiplyOperation",()=>ek.MultiplyOperation,"NearestFilter",()=>ek.NearestFilter,"NearestMipMapLinearFilter",()=>ek.NearestMipMapLinearFilter,"NearestMipMapNearestFilter",()=>ek.NearestMipMapNearestFilter,"NearestMipmapLinearFilter",()=>ek.NearestMipmapLinearFilter,"NearestMipmapNearestFilter",()=>ek.NearestMipmapNearestFilter,"NeutralToneMapping",()=>ek.NeutralToneMapping,"NeverCompare",()=>ek.NeverCompare,"NeverDepth",()=>ek.NeverDepth,"NeverStencilFunc",()=>ek.NeverStencilFunc,"NoBlending",()=>ek.NoBlending,"NoColorSpace",()=>ek.NoColorSpace,"NoToneMapping",()=>ek.NoToneMapping,"NormalAnimationBlendMode",()=>ek.NormalAnimationBlendMode,"NormalBlending",()=>ek.NormalBlending,"NotEqualCompare",()=>ek.NotEqualCompare,"NotEqualDepth",()=>ek.NotEqualDepth,"NotEqualStencilFunc",()=>ek.NotEqualStencilFunc,"NumberKeyframeTrack",()=>ek.NumberKeyframeTrack,"Object3D",()=>ek.Object3D,"ObjectLoader",()=>ek.ObjectLoader,"ObjectSpaceNormalMap",()=>ek.ObjectSpaceNormalMap,"OctahedronGeometry",()=>ek.OctahedronGeometry,"OneFactor",()=>ek.OneFactor,"OneMinusConstantAlphaFactor",()=>ek.OneMinusConstantAlphaFactor,"OneMinusConstantColorFactor",()=>ek.OneMinusConstantColorFactor,"OneMinusDstAlphaFactor",()=>ek.OneMinusDstAlphaFactor,"OneMinusDstColorFactor",()=>ek.OneMinusDstColorFactor,"OneMinusSrcAlphaFactor",()=>ek.OneMinusSrcAlphaFactor,"OneMinusSrcColorFactor",()=>ek.OneMinusSrcColorFactor,"OrthographicCamera",()=>ek.OrthographicCamera,"PCFShadowMap",()=>ek.PCFShadowMap,"PCFSoftShadowMap",()=>ek.PCFSoftShadowMap,"PMREMGenerator",()=>eN.PMREMGenerator,"Path",()=>ek.Path,"PerspectiveCamera",()=>ek.PerspectiveCamera,"Plane",()=>ek.Plane,"PlaneGeometry",()=>ek.PlaneGeometry,"PlaneHelper",()=>ek.PlaneHelper,"PointLight",()=>ek.PointLight,"PointLightHelper",()=>ek.PointLightHelper,"Points",()=>ek.Points,"PointsMaterial",()=>ek.PointsMaterial,"PolarGridHelper",()=>ek.PolarGridHelper,"PolyhedronGeometry",()=>ek.PolyhedronGeometry,"PositionalAudio",()=>ek.PositionalAudio,"PropertyBinding",()=>ek.PropertyBinding,"PropertyMixer",()=>ek.PropertyMixer,"QuadraticBezierCurve",()=>ek.QuadraticBezierCurve,"QuadraticBezierCurve3",()=>ek.QuadraticBezierCurve3,"Quaternion",()=>ek.Quaternion,"QuaternionKeyframeTrack",()=>ek.QuaternionKeyframeTrack,"QuaternionLinearInterpolant",()=>ek.QuaternionLinearInterpolant,"RED_GREEN_RGTC2_Format",()=>ek.RED_GREEN_RGTC2_Format,"RED_RGTC1_Format",()=>ek.RED_RGTC1_Format,"REVISION",()=>ek.REVISION,"RGBADepthPacking",()=>ek.RGBADepthPacking,"RGBAFormat",()=>ek.RGBAFormat,"RGBAIntegerFormat",()=>ek.RGBAIntegerFormat,"RGBA_ASTC_10x10_Format",()=>ek.RGBA_ASTC_10x10_Format,"RGBA_ASTC_10x5_Format",()=>ek.RGBA_ASTC_10x5_Format,"RGBA_ASTC_10x6_Format",()=>ek.RGBA_ASTC_10x6_Format,"RGBA_ASTC_10x8_Format",()=>ek.RGBA_ASTC_10x8_Format,"RGBA_ASTC_12x10_Format",()=>ek.RGBA_ASTC_12x10_Format,"RGBA_ASTC_12x12_Format",()=>ek.RGBA_ASTC_12x12_Format,"RGBA_ASTC_4x4_Format",()=>ek.RGBA_ASTC_4x4_Format,"RGBA_ASTC_5x4_Format",()=>ek.RGBA_ASTC_5x4_Format,"RGBA_ASTC_5x5_Format",()=>ek.RGBA_ASTC_5x5_Format,"RGBA_ASTC_6x5_Format",()=>ek.RGBA_ASTC_6x5_Format,"RGBA_ASTC_6x6_Format",()=>ek.RGBA_ASTC_6x6_Format,"RGBA_ASTC_8x5_Format",()=>ek.RGBA_ASTC_8x5_Format,"RGBA_ASTC_8x6_Format",()=>ek.RGBA_ASTC_8x6_Format,"RGBA_ASTC_8x8_Format",()=>ek.RGBA_ASTC_8x8_Format,"RGBA_BPTC_Format",()=>ek.RGBA_BPTC_Format,"RGBA_ETC2_EAC_Format",()=>ek.RGBA_ETC2_EAC_Format,"RGBA_PVRTC_2BPPV1_Format",()=>ek.RGBA_PVRTC_2BPPV1_Format,"RGBA_PVRTC_4BPPV1_Format",()=>ek.RGBA_PVRTC_4BPPV1_Format,"RGBA_S3TC_DXT1_Format",()=>ek.RGBA_S3TC_DXT1_Format,"RGBA_S3TC_DXT3_Format",()=>ek.RGBA_S3TC_DXT3_Format,"RGBA_S3TC_DXT5_Format",()=>ek.RGBA_S3TC_DXT5_Format,"RGBDepthPacking",()=>ek.RGBDepthPacking,"RGBFormat",()=>ek.RGBFormat,"RGBIntegerFormat",()=>ek.RGBIntegerFormat,"RGB_BPTC_SIGNED_Format",()=>ek.RGB_BPTC_SIGNED_Format,"RGB_BPTC_UNSIGNED_Format",()=>ek.RGB_BPTC_UNSIGNED_Format,"RGB_ETC1_Format",()=>ek.RGB_ETC1_Format,"RGB_ETC2_Format",()=>ek.RGB_ETC2_Format,"RGB_PVRTC_2BPPV1_Format",()=>ek.RGB_PVRTC_2BPPV1_Format,"RGB_PVRTC_4BPPV1_Format",()=>ek.RGB_PVRTC_4BPPV1_Format,"RGB_S3TC_DXT1_Format",()=>ek.RGB_S3TC_DXT1_Format,"RGDepthPacking",()=>ek.RGDepthPacking,"RGFormat",()=>ek.RGFormat,"RGIntegerFormat",()=>ek.RGIntegerFormat,"RawShaderMaterial",()=>ek.RawShaderMaterial,"Ray",()=>ek.Ray,"Raycaster",()=>ek.Raycaster,"RectAreaLight",()=>ek.RectAreaLight,"RedFormat",()=>ek.RedFormat,"RedIntegerFormat",()=>ek.RedIntegerFormat,"ReinhardToneMapping",()=>ek.ReinhardToneMapping,"RenderTarget",()=>ek.RenderTarget,"RenderTarget3D",()=>ek.RenderTarget3D,"RepeatWrapping",()=>ek.RepeatWrapping,"ReplaceStencilOp",()=>ek.ReplaceStencilOp,"ReverseSubtractEquation",()=>ek.ReverseSubtractEquation,"RingGeometry",()=>ek.RingGeometry,"SIGNED_RED_GREEN_RGTC2_Format",()=>ek.SIGNED_RED_GREEN_RGTC2_Format,"SIGNED_RED_RGTC1_Format",()=>ek.SIGNED_RED_RGTC1_Format,"SRGBColorSpace",()=>ek.SRGBColorSpace,"SRGBTransfer",()=>ek.SRGBTransfer,"Scene",()=>ek.Scene,"ShaderChunk",()=>eN.ShaderChunk,"ShaderLib",()=>eN.ShaderLib,"ShaderMaterial",()=>ek.ShaderMaterial,"ShadowMaterial",()=>ek.ShadowMaterial,"Shape",()=>ek.Shape,"ShapeGeometry",()=>ek.ShapeGeometry,"ShapePath",()=>ek.ShapePath,"ShapeUtils",()=>ek.ShapeUtils,"ShortType",()=>ek.ShortType,"Skeleton",()=>ek.Skeleton,"SkeletonHelper",()=>ek.SkeletonHelper,"SkinnedMesh",()=>ek.SkinnedMesh,"Source",()=>ek.Source,"Sphere",()=>ek.Sphere,"SphereGeometry",()=>ek.SphereGeometry,"Spherical",()=>ek.Spherical,"SphericalHarmonics3",()=>ek.SphericalHarmonics3,"SplineCurve",()=>ek.SplineCurve,"SpotLight",()=>ek.SpotLight,"SpotLightHelper",()=>ek.SpotLightHelper,"Sprite",()=>ek.Sprite,"SpriteMaterial",()=>ek.SpriteMaterial,"SrcAlphaFactor",()=>ek.SrcAlphaFactor,"SrcAlphaSaturateFactor",()=>ek.SrcAlphaSaturateFactor,"SrcColorFactor",()=>ek.SrcColorFactor,"StaticCopyUsage",()=>ek.StaticCopyUsage,"StaticDrawUsage",()=>ek.StaticDrawUsage,"StaticReadUsage",()=>ek.StaticReadUsage,"StereoCamera",()=>ek.StereoCamera,"StreamCopyUsage",()=>ek.StreamCopyUsage,"StreamDrawUsage",()=>ek.StreamDrawUsage,"StreamReadUsage",()=>ek.StreamReadUsage,"StringKeyframeTrack",()=>ek.StringKeyframeTrack,"SubtractEquation",()=>ek.SubtractEquation,"SubtractiveBlending",()=>ek.SubtractiveBlending,"TOUCH",()=>ek.TOUCH,"TangentSpaceNormalMap",()=>ek.TangentSpaceNormalMap,"TetrahedronGeometry",()=>ek.TetrahedronGeometry,"Texture",()=>ek.Texture,"TextureLoader",()=>ek.TextureLoader,"TextureUtils",()=>ek.TextureUtils,"Timer",()=>ek.Timer,"TimestampQuery",()=>ek.TimestampQuery,"TorusGeometry",()=>ek.TorusGeometry,"TorusKnotGeometry",()=>ek.TorusKnotGeometry,"Triangle",()=>ek.Triangle,"TriangleFanDrawMode",()=>ek.TriangleFanDrawMode,"TriangleStripDrawMode",()=>ek.TriangleStripDrawMode,"TrianglesDrawMode",()=>ek.TrianglesDrawMode,"TubeGeometry",()=>ek.TubeGeometry,"UVMapping",()=>ek.UVMapping,"Uint16BufferAttribute",()=>ek.Uint16BufferAttribute,"Uint32BufferAttribute",()=>ek.Uint32BufferAttribute,"Uint8BufferAttribute",()=>ek.Uint8BufferAttribute,"Uint8ClampedBufferAttribute",()=>ek.Uint8ClampedBufferAttribute,"Uniform",()=>ek.Uniform,"UniformsGroup",()=>ek.UniformsGroup,"UniformsLib",()=>eN.UniformsLib,"UniformsUtils",()=>ek.UniformsUtils,"UnsignedByteType",()=>ek.UnsignedByteType,"UnsignedInt101111Type",()=>ek.UnsignedInt101111Type,"UnsignedInt248Type",()=>ek.UnsignedInt248Type,"UnsignedInt5999Type",()=>ek.UnsignedInt5999Type,"UnsignedIntType",()=>ek.UnsignedIntType,"UnsignedShort4444Type",()=>ek.UnsignedShort4444Type,"UnsignedShort5551Type",()=>ek.UnsignedShort5551Type,"UnsignedShortType",()=>ek.UnsignedShortType,"VSMShadowMap",()=>ek.VSMShadowMap,"Vector2",()=>ek.Vector2,"Vector3",()=>ek.Vector3,"Vector4",()=>ek.Vector4,"VectorKeyframeTrack",()=>ek.VectorKeyframeTrack,"VideoFrameTexture",()=>ek.VideoFrameTexture,"VideoTexture",()=>ek.VideoTexture,"WebGL3DRenderTarget",()=>ek.WebGL3DRenderTarget,"WebGLArrayRenderTarget",()=>ek.WebGLArrayRenderTarget,"WebGLCoordinateSystem",()=>ek.WebGLCoordinateSystem,"WebGLCubeRenderTarget",()=>ek.WebGLCubeRenderTarget,"WebGLRenderTarget",()=>ek.WebGLRenderTarget,"WebGLRenderer",()=>eN.WebGLRenderer,"WebGLUtils",()=>eN.WebGLUtils,"WebGPUCoordinateSystem",()=>ek.WebGPUCoordinateSystem,"WebXRController",()=>ek.WebXRController,"WireframeGeometry",()=>ek.WireframeGeometry,"WrapAroundEnding",()=>ek.WrapAroundEnding,"ZeroCurvatureEnding",()=>ek.ZeroCurvatureEnding,"ZeroFactor",()=>ek.ZeroFactor,"ZeroSlopeEnding",()=>ek.ZeroSlopeEnding,"ZeroStencilOp",()=>ek.ZeroStencilOp,"createCanvasElement",()=>ek.createCanvasElement],32009);var eN=e.i(8560),ek=e.i(90072),ej=e.i(32009);function ez(e,t){let r;return function(){for(var n=arguments.length,i=Array(n),a=0;ae(...i),t)}}let eK=["x","y","top","bottom","left","right","width","height"];var eJ=e.i(46791);function eV(e){let{ref:t,children:r,fallback:n,resize:i,style:a,gl:s,events:o=eH.f,eventSource:l,eventPrefix:u,shadows:c,linear:d,flat:f,legacy:h,orthographic:p,frameloop:m,dpr:g,performance:A,raycaster:y,camera:x,scene:B,onPointerMissed:C,onCreated:S,...E}=e;eG.useMemo(()=>(0,eH.e)(ej),[]);let T=(0,eH.u)(),[D,b]=function(){var e,t,r;let{debounce:n,scroll:i,polyfill:a,offsetSize:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debounce:0,scroll:!1,offsetSize:!1},o=a||("undefined"==typeof window?class{}:window.ResizeObserver);if(!o)throw Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[l,u]=(0,eG.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=(0,eG.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:l,orientationHandler:null}),d=n?"number"==typeof n?n:n.scroll:null,f=n?"number"==typeof n?n:n.resize:null,h=(0,eG.useRef)(!1);(0,eG.useEffect)(()=>(h.current=!0,()=>void(h.current=!1)));let[p,m,g]=(0,eG.useMemo)(()=>{let e=()=>{let e,t;if(!c.current.element)return;let{left:r,top:n,width:i,height:a,bottom:o,right:l,x:d,y:f}=c.current.element.getBoundingClientRect(),p={left:r,top:n,width:i,height:a,bottom:o,right:l,x:d,y:f};c.current.element instanceof HTMLElement&&s&&(p.height=c.current.element.offsetHeight,p.width=c.current.element.offsetWidth),Object.freeze(p),h.current&&(e=c.current.lastBounds,t=p,!eK.every(r=>e[r]===t[r]))&&u(c.current.lastBounds=p)};return[e,f?ez(e,f):e,d?ez(e,d):e]},[u,s,d,f]);function A(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",g,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null),c.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",c.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",c.current.orientationHandler))}function y(){c.current.element&&(c.current.resizeObserver=new o(g),c.current.resizeObserver.observe(c.current.element),i&&c.current.scrollContainers&&c.current.scrollContainers.forEach(e=>e.addEventListener("scroll",g,{capture:!0,passive:!0})),c.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",c.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",c.current.orientationHandler))}return e=g,t=!!i,(0,eG.useEffect)(()=>{if(t)return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",e,!0)},[e,t]),r=m,(0,eG.useEffect)(()=>(window.addEventListener("resize",r),()=>void window.removeEventListener("resize",r)),[r]),(0,eG.useEffect)(()=>{A(),y()},[i,g,m]),(0,eG.useEffect)(()=>A,[]),[e=>{e&&e!==c.current.element&&(A(),c.current.element=e,c.current.scrollContainers=function e(t){let r=[];if(!t||t===document.body)return r;let{overflow:n,overflowX:i,overflowY:a}=window.getComputedStyle(t);return[n,i,a].some(e=>"auto"===e||"scroll"===e)&&r.push(t),[...r,...e(t.parentElement)]}(e),y())},l,p]}({scroll:!0,debounce:{scroll:50,resize:0},...i}),M=eG.useRef(null),w=eG.useRef(null);eG.useImperativeHandle(t,()=>M.current);let F=(0,eH.a)(C),[R,I]=eG.useState(!1),[P,L]=eG.useState(!1);if(R)throw R;if(P)throw P;let U=eG.useRef(null);(0,eH.b)(()=>{let e=M.current;b.width>0&&b.height>0&&e&&(U.current||(U.current=(0,eH.c)(e)),async function(){await U.current.configure({gl:s,scene:B,events:o,shadows:c,linear:d,flat:f,legacy:h,orthographic:p,frameloop:m,dpr:g,performance:A,raycaster:y,camera:x,size:b,onPointerMissed:function(){for(var e=arguments.length,t=Array(e),r=0;r{null==e.events.connect||e.events.connect(l?(0,eH.i)(l)?l.current:l:w.current),u&&e.setEvents({compute:(e,t)=>{let r=e[u+"X"],n=e[u+"Y"];t.pointer.set(r/t.size.width*2-1,-(2*(n/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==S||S(e)}}),U.current.render((0,eU.jsx)(T,{children:(0,eU.jsx)(eH.E,{set:L,children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(eH.B,{set:I}),children:null!=r?r:null})})}))}())}),eG.useEffect(()=>{let e=M.current;if(e)return()=>(0,eH.d)(e)},[]);let G=l?"none":"auto";return(0,eU.jsx)("div",{ref:w,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:G,...a},...E,children:(0,eU.jsx)("div",{ref:D,style:{width:"100%",height:"100%"},children:(0,eU.jsx)("canvas",{ref:M,style:{display:"block"},children:n})})})}function eQ(e){return(0,eU.jsx)(eJ.FiberProvider,{children:(0,eU.jsx)(eV,{...e})})}e.i(39695),e.i(98133),e.i(95087);var eW=e.i(16096),eX=e.i(5230),e_=e.i(80520),eZ=ek,eY=class{get autoReset(){return this._autoReset}set autoReset(e){"undefined"!=typeof document&&void 0!==document.hidden&&(e?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=e)}get delta(){return .001*this._delta}get fixedDelta(){return .001*this._fixedDelta}set fixedDelta(e){this._fixedDelta=1e3*e}get elapsed(){return .001*this._elapsed}update(e){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(void 0!==e?e:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}getDelta(){return this.delta}getElapsed(){return this.elapsed}handleEvent(e){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}},eq=(()=>{let e=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),t=new Float32Array([0,0,2,0,0,2]),r=new eZ.BufferGeometry;return r.setAttribute("position",new eZ.BufferAttribute(e,3)),r.setAttribute("uv",new eZ.BufferAttribute(t,2)),r})(),e$=class e{static get fullscreenGeometry(){return eq}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){let t=this.fullscreenMaterial;null!==t&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return null!==this.screen?this.screen.material:null}set fullscreenMaterial(t){let r=this.screen;null!==r?r.material=t:((r=new eZ.Mesh(e.fullscreenGeometry,t)).frustumCulled=!1,null===this.scene&&(this.scene=new eZ.Scene),this.scene.add(r),this.screen=r)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e){arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking}render(e,t,r,n,i){throw Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,r){}dispose(){for(let t of Object.keys(this)){let r=this[t];(r instanceof eZ.WebGLRenderTarget||r instanceof eZ.Material||r instanceof eZ.Texture||r instanceof e)&&this[t].dispose()}null!==this.fullscreenMaterial&&this.fullscreenMaterial.dispose()}constructor(e="Pass",t=new eZ.Scene,r=new eZ.OrthographicCamera){this.name=e,this.renderer=null,this.scene=t,this.camera=r,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}},e0=class extends e${render(e,t,r,n,i){let a=e.state.buffers.stencil;a.setLocked(!1),a.setTest(!1)}constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}},e1="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",e2=class extends eZ.ShaderMaterial{get inputBuffer(){return this.uniforms.inputBuffer.value}set inputBuffer(e){let t=null!==e;this.colorWrite!==t&&(t?this.defines.COLOR_WRITE=!0:delete this.defines.COLOR_WRITE,this.colorWrite=t,this.needsUpdate=!0),this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){let t=null!==e;this.depthWrite!==t&&(t?this.defines.DEPTH_WRITE=!0:delete this.defines.DEPTH_WRITE,this.depthTest=t,this.depthWrite=t,this.needsUpdate=!0),this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get channelWeights(){return this.uniforms.channelWeights.value}set channelWeights(e){null!==e?(this.defines.USE_WEIGHTS="1",this.uniforms.channelWeights.value=e):delete this.defines.USE_WEIGHTS,this.needsUpdate=!0}setInputBuffer(e){this.uniforms.inputBuffer.value=e}getOpacity(e){return this.uniforms.opacity.value}setOpacity(e){this.uniforms.opacity.value=e}constructor(){super({name:"CopyMaterial",defines:{DEPTH_PACKING:"0",COLOR_WRITE:"1"},uniforms:{inputBuffer:new eZ.Uniform(null),depthBuffer:new eZ.Uniform(null),channelWeights:new eZ.Uniform(null),opacity:new eZ.Uniform(1)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef COLOR_WRITE\n#include \n#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#endif\n#ifdef DEPTH_WRITE\n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}\n#endif\n#ifdef USE_WEIGHTS\nuniform vec4 channelWeights;\n#endif\nuniform float opacity;varying vec2 vUv;void main(){\n#ifdef COLOR_WRITE\nvec4 texel=texture2D(inputBuffer,vUv);\n#ifdef USE_WEIGHTS\ntexel*=channelWeights;\n#endif\ngl_FragColor=opacity*texel;\n#ifdef COLOR_SPACE_CONVERSION\n#include \n#endif\n#include \n#else\ngl_FragColor=vec4(0.0);\n#endif\n#ifdef DEPTH_WRITE\ngl_FragDepth=readDepth(vUv);\n#endif\n}",vertexShader:e1}),this.depthFunc=eZ.AlwaysDepth}},e9=class extends e${get resize(){return this.autoResize}set resize(e){this.autoResize=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(e){this.autoResize=e}render(e,t,r,n,i){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.autoResize&&this.renderTarget.setSize(e,t)}initialize(e,t,r){void 0!==r&&(this.renderTarget.texture.type=r,r!==eZ.UnsignedByteType?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":null!==e&&e.outputColorSpace===eZ.SRGBColorSpace&&(this.renderTarget.texture.colorSpace=eZ.SRGBColorSpace))}constructor(e,t=!0){super("CopyPass"),this.fullscreenMaterial=new e2,this.needsSwap=!1,this.renderTarget=e,void 0===e&&(this.renderTarget=new eZ.WebGLRenderTarget(1,1,{minFilter:eZ.LinearFilter,magFilter:eZ.LinearFilter,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=t}},e3=new eZ.Color,e4=class extends e${setClearFlags(e,t,r){this.color=e,this.depth=t,this.stencil=r}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(e){this.overrideClearColor=e}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(e){this.overrideClearAlpha=e}render(e,t,r,n,i){let a=this.overrideClearColor,s=this.overrideClearAlpha,o=e.getClearAlpha(),l=null!==a,u=s>=0;l?(e.getClearColor(e3),e.setClearColor(a,u?s:o)):u&&e.setClearAlpha(s),e.setRenderTarget(this.renderToScreen?null:t),e.clear(this.color,this.depth,this.stencil),l?e.setClearColor(e3,o):u&&e.setClearAlpha(o)}constructor(e=!0,t=!0,r=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=e,this.depth=t,this.stencil=r,this.overrideClearColor=null,this.overrideClearAlpha=-1}},e8=class extends e${set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get inverted(){return this.inverse}set inverted(e){this.inverse=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(e){this.inverted=e}render(e,t,r,n,i){let a=e.getContext(),s=e.state.buffers,o=this.scene,l=this.camera,u=this.clearPass,c=+!this.inverted;s.color.setMask(!1),s.depth.setMask(!1),s.color.setLocked(!0),s.depth.setLocked(!0),s.stencil.setTest(!0),s.stencil.setOp(a.REPLACE,a.REPLACE,a.REPLACE),s.stencil.setFunc(a.ALWAYS,c,0xffffffff),s.stencil.setClear(1-c),s.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?u.render(e,null):(u.render(e,t),u.render(e,r))),this.renderToScreen?e.setRenderTarget(null):(e.setRenderTarget(t),e.render(o,l),e.setRenderTarget(r)),e.render(o,l),s.color.setLocked(!1),s.depth.setLocked(!1),s.stencil.setLocked(!1),s.stencil.setFunc(a.EQUAL,1,0xffffffff),s.stencil.setOp(a.KEEP,a.KEEP,a.KEEP),s.stencil.setLocked(!0)}constructor(e,t){super("MaskPass",e,t),this.needsSwap=!1,this.clearPass=new e4(!1,!1,!0),this.inverse=!1}},e5=class{get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){let t=this.inputBuffer,r=this.multisampling;r>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):r!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,null!==e){let t=e.getSize(new eZ.Vector2),r=e.getContext().getContextAttributes().alpha,n=this.inputBuffer.texture.type;for(let i of(n===eZ.UnsignedByteType&&e.outputColorSpace===eZ.SRGBColorSpace&&(this.inputBuffer.texture.colorSpace=eZ.SRGBColorSpace,this.outputBuffer.texture.colorSpace=eZ.SRGBColorSpace,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height),this.passes))i.initialize(e,r,n)}}replaceRenderer(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=this.renderer,n=r.domElement.parentNode;return this.setRenderer(e),t&&null!==n&&(n.removeChild(r.domElement),n.appendChild(e.domElement)),r}createDepthTexture(){let e=this.depthTexture=new eZ.DepthTexture;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=eZ.DepthStencilFormat,e.type=eZ.UnsignedInt248Type):e.type=eZ.UnsignedIntType,e}deleteDepthTexture(){if(null!==this.depthTexture)for(let e of(this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose(),this.passes))e.setDepthTexture(null)}createBuffer(e,t,r,n){let i=this.renderer,a=null===i?new eZ.Vector2:i.getDrawingBufferSize(new eZ.Vector2),s={minFilter:eZ.LinearFilter,magFilter:eZ.LinearFilter,stencilBuffer:t,depthBuffer:e,type:r},o=new eZ.WebGLRenderTarget(a.width,a.height,s);return n>0&&(o.samples=n),r===eZ.UnsignedByteType&&null!==i&&i.outputColorSpace===eZ.SRGBColorSpace&&(o.texture.colorSpace=eZ.SRGBColorSpace),o.texture.name="EffectComposer.Buffer",o.texture.generateMipmaps=!1,o}setMainScene(e){for(let t of this.passes)t.mainScene=e}setMainCamera(e){for(let t of this.passes)t.mainCamera=e}addPass(e,t){let r=this.passes,n=this.renderer,i=n.getDrawingBufferSize(new eZ.Vector2),a=n.getContext().getContextAttributes().alpha,s=this.inputBuffer.texture.type;if(e.setRenderer(n),e.setSize(i.width,i.height),e.initialize(n,a,s),this.autoRenderToScreen&&(r.length>0&&(r[r.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),void 0!==t?r.splice(t,0,e):r.push(e),this.autoRenderToScreen&&(r[r.length-1].renderToScreen=!0),e.needsDepthTexture||null!==this.depthTexture)if(null===this.depthTexture){let t=this.createDepthTexture();for(e of r)e.setDepthTexture(t)}else e.setDepthTexture(this.depthTexture)}removePass(e){let t=this.passes,r=t.indexOf(e);-1!==r&&t.splice(r,1).length>0&&(null!==this.depthTexture&&(t.reduce((e,t)=>e||t.needsDepthTexture,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())),this.autoRenderToScreen&&r===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0)))}removeAllPasses(){let e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){let t,r,n,i=this.renderer,a=this.copyPass,s=this.inputBuffer,o=this.outputBuffer,l=!1;for(let u of(void 0===e&&(this.timer.update(),e=this.timer.getDelta()),this.passes))u.enabled&&(u.render(i,s,o,e,l),u.needsSwap&&(l&&(a.renderToScreen=u.renderToScreen,t=i.getContext(),(r=i.state.buffers.stencil).setFunc(t.NOTEQUAL,1,0xffffffff),a.render(i,s,o,e,l),r.setFunc(t.EQUAL,1,0xffffffff)),n=s,s=o,o=n),u instanceof e8?l=!0:u instanceof e0&&(l=!1))}setSize(e,t,r){let n=this.renderer,i=n.getSize(new eZ.Vector2);(void 0===e||void 0===t)&&(e=i.width,t=i.height),(i.width!==e||i.height!==t)&&n.setSize(e,t,r);let a=n.getDrawingBufferSize(new eZ.Vector2);for(let e of(this.inputBuffer.setSize(a.width,a.height),this.outputBuffer.setSize(a.width,a.height),this.passes))e.setSize(a.width,a.height)}reset(){this.dispose(),this.autoRenderToScreen=!0}dispose(){for(let e of this.passes)e.dispose();this.passes=[],null!==this.inputBuffer&&this.inputBuffer.dispose(),null!==this.outputBuffer&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose(),e$.fullscreenGeometry.dispose()}constructor(e=null,{depthBuffer:t=!0,stencilBuffer:r=!1,multisampling:n=0,frameBufferType:i}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,r,i,n),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new e9,this.depthTexture=null,this.passes=[],this.timer=new eY,this.autoRenderToScreen=!0,this.setRenderer(e)}},e6={NONE:0,DEPTH:1,CONVOLUTION:2},e7={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},te=class{constructor(){this.shaderParts=new Map([[e7.FRAGMENT_HEAD,null],[e7.FRAGMENT_MAIN_UV,null],[e7.FRAGMENT_MAIN_IMAGE,null],[e7.VERTEX_HEAD,null],[e7.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=e6.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=eZ.LinearSRGBColorSpace}},tt=!1,tr=class{cloneMaterial(e){if(!(e instanceof eZ.ShaderMaterial))return e.clone();let t=e.uniforms,r=new Map;for(let e in t){let n=t[e].value;n.isRenderTargetTexture&&(t[e].value=null,r.set(e,n))}let n=e.clone();for(let e of r)t[e[0]].value=e[1],n.uniforms[e[0]].value=e[1];return n}setMaterial(e){if(this.disposeMaterials(),this.material=e,null!==e){let t=this.materials=[this.cloneMaterial(e),this.cloneMaterial(e),this.cloneMaterial(e)];for(let r of t)r.uniforms=Object.assign({},e.uniforms),r.side=eZ.FrontSide;t[2].skinning=!0,this.materialsBackSide=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.side=eZ.BackSide,r}),this.materialsDoubleSide=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.side=eZ.DoubleSide,r}),this.materialsFlatShaded=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.flatShading=!0,r}),this.materialsFlatShadedBackSide=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.flatShading=!0,r.side=eZ.BackSide,r}),this.materialsFlatShadedDoubleSide=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.flatShading=!0,r.side=eZ.DoubleSide,r})}}render(e,t,r){let n=e.shadowMap.enabled;if(e.shadowMap.enabled=!1,tt){let n=this.originalMaterials;for(let i of(this.meshCount=0,t.traverse(this.replaceMaterial),e.render(t,r),n))i[0].material=i[1];this.meshCount!==n.size&&n.clear()}else{let n=t.overrideMaterial;t.overrideMaterial=this.material,e.render(t,r),t.overrideMaterial=n}e.shadowMap.enabled=n}disposeMaterials(){if(null!==this.material)for(let e of this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide))e.dispose()}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return tt}static set workaroundEnabled(e){tt=e}constructor(e=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(e),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case eZ.DoubleSide:t=this.materialsFlatShadedDoubleSide;break;case eZ.BackSide:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded}else switch(e.material.side){case eZ.DoubleSide:t=this.materialsDoubleSide;break;case eZ.BackSide:t=this.materialsBackSide;break;default:t=this.materials}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}},tn=class extends eZ.EventDispatcher{updateEffectiveSize(){let e=this.baseSize,t=this.preferredSize,r=this.effectiveSize,n=this.scale;-1!==t.width?r.width=t.width:-1!==t.height?r.width=Math.round(t.height*(e.width/Math.max(e.height,1))):r.width=Math.round(e.width*n),-1!==t.height?r.height=t.height:-1!==t.width?r.height=Math.round(t.width/Math.max(e.width/Math.max(e.height,1),1)):r.height=Math.round(e.height*n)}get width(){return this.effectiveSize.width}set width(e){this.preferredWidth=e}get height(){return this.effectiveSize.height}set height(e){this.preferredHeight=e}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(e){this.s!==e&&(this.s=e,this.preferredSize.setScalar(-1),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(e){this.scale=e}get baseWidth(){return this.baseSize.width}set baseWidth(e){this.baseSize.width!==e&&(this.baseSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(e){this.baseWidth=e}get baseHeight(){return this.baseSize.height}set baseHeight(e){this.baseSize.height!==e&&(this.baseSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(e){this.baseHeight=e}setBaseSize(e,t){(this.baseSize.width!==e||this.baseSize.height!==t)&&(this.baseSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(e){this.preferredSize.width!==e&&(this.preferredSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(e){this.preferredWidth=e}get preferredHeight(){return this.preferredSize.height}set preferredHeight(e){this.preferredSize.height!==e&&(this.preferredSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(e){this.preferredHeight=e}setPreferredSize(e,t){(this.preferredSize.width!==e||this.preferredSize.height!==t)&&(this.preferredSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(e){this.s=e.scale,this.baseSize.set(e.baseWidth,e.baseHeight),this.preferredSize.set(e.preferredWidth,e.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return -1}constructor(e,t=-1,r=-1,n=1){super(),this.resizable=e,this.baseSize=new eZ.Vector2(1,1),this.preferredSize=new eZ.Vector2(t,r),this.target=this.preferredSize,this.s=n,this.effectiveSize=new eZ.Vector2,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}},ti=new class{getNextId(){return this.nextId++}reset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.nextId=e,this}constructor(e=0){this.nextId=e}}(2),ta=class extends Set{get layer(){return this._layer}set layer(e){let t=this._layer;for(let r of this)r.layers.disable(t),r.layers.enable(e);this._layer=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){let e=this.layer;for(let t of this)t.layers.disable(e);return super.clear()}set(e){for(let t of(this.clear(),e))this.add(t);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let t;return this.has(e)?(this.delete(e),t=!1):(this.add(e),t=!0),t}setVisible(e){for(let t of this)e?t.layers.enable(0):t.layers.disable(0);return this}constructor(e,t=ti.getNextId()){super(),this.exclusive=!1,this._layer=t,(this._layer<1||this._layer>31)&&(console.warn("Layer out of range, resetting to 2"),ti.reset(2),this._layer=ti.getNextId()),void 0!==e&&this.set(e)}},ts={ADD:0,ALPHA:23,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},to=new Map([[ts.ADD,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(x.rgb+y.rgb,y.a),y.a*opacity);}"],[ts.AVERAGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4((x.rgb+y.rgb)*0.5,y.a),y.a*opacity);}"],[ts.COLOR,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.xy,xHSL.z));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.COLOR_BURN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 a=x.rgb,b=y.rgb;vec3 z=mix(step(0.0,b)*(1.0-min(vec3(1.0),(1.0-a)/b)),vec3(1.0),step(1.0,a));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.COLOR_DODGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 a=x.rgb,b=y.rgb;vec3 z=step(0.0,a)*mix(min(vec3(1.0),a/max(1.0-b,1e-9)),vec3(1.0),step(1.0,b));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.DARKEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(min(x.rgb,y.rgb),y.a),y.a*opacity);}"],[ts.DIFFERENCE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(abs(x.rgb-y.rgb),y.a),y.a*opacity);}"],[ts.DIVIDE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(x.rgb/max(y.rgb,1e-12),y.a),y.a*opacity);}"],[ts.DST,null],[ts.EXCLUSION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4((x.rgb+y.rgb-2.0*x.rgb*y.rgb),y.a),y.a*opacity);}"],[ts.HARD_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 a=min(x.rgb,1.0);vec3 b=min(y.rgb,1.0);vec3 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,b));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.HARD_MIX,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(step(1.0,x.rgb+y.rgb),y.a),y.a*opacity);}"],[ts.HUE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.x,xHSL.yz));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.INVERT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(1.0-y.rgb,y.a),y.a*opacity);}"],[ts.INVERT_RGB,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(y.rgb*(1.0-x.rgb),y.a),y.a*opacity);}"],[ts.LIGHTEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(max(x.rgb,y.rgb),y.a),y.a*opacity);}"],[ts.LINEAR_BURN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(clamp(y.rgb+x.rgb-1.0,0.0,1.0),y.a),y.a*opacity);}"],[ts.LINEAR_DODGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(min(x.rgb+y.rgb,1.0),y.a),y.a*opacity);}"],[ts.LINEAR_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(clamp(2.0*y.rgb+x.rgb-1.0,0.0,1.0),y.a),y.a*opacity);}"],[ts.LUMINOSITY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.xy,yHSL.z));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.MULTIPLY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(x.rgb*y.rgb,y.a),y.a*opacity);}"],[ts.NEGATION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(1.0-abs(1.0-x.rgb-y.rgb),y.a),y.a*opacity);}"],[ts.NORMAL,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,y.a*opacity);}"],[ts.OVERLAY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 z=mix(2.0*y.rgb*x.rgb,1.0-2.0*(1.0-y.rgb)*(1.0-x.rgb),step(0.5,x.rgb));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.PIN_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 y2=2.0*y.rgb;vec3 z=mix(mix(y2,x.rgb,step(0.5*x.rgb,y.rgb)),max(y2-1.0,vec3(0.0)),step(x.rgb,y2-1.0));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.REFLECT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 z=mix(min(x.rgb*x.rgb/max(1.0-y.rgb,1e-12),1.0),y.rgb,step(1.0,y.rgb));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.SATURATION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.x,yHSL.y,xHSL.z));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.SCREEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(x.rgb+y.rgb-min(x.rgb*y.rgb,1.0),y.a),y.a*opacity);}"],[ts.SOFT_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 a=x.rgb;vec3 b=y.rgb;vec3 y2=2.0*b;vec3 w=step(0.5,b);vec3 c=a-(1.0-y2)*a*(1.0-a);vec3 d=mix(a+(y2-1.0)*(sqrt(a)-a),a+(y2-1.0)*a*((16.0*a-12.0)*a+3.0),w*(1.0-step(0.25,a)));vec3 z=mix(c,d,w);return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.SRC,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}"],[ts.SUBTRACT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(max(x.rgb+y.rgb-1.0,0.0),y.a),y.a*opacity);}"],[ts.VIVID_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 z=mix(max(1.0-min((1.0-x.rgb)/(2.0*y.rgb),1.0),0.0),min(x.rgb/(2.0*(1.0-y.rgb)),1.0),step(0.5,y.rgb));return mix(x,vec4(z,y.a),y.a*opacity);}"]]),tl=class extends eZ.EventDispatcher{getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this._blendFunction}set blendFunction(e){this._blendFunction=e,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return to.get(this.blendFunction)}constructor(e,t=1){super(),this._blendFunction=e,this.opacity=new eZ.Uniform(t)}};eZ.CanvasTexture;var tu=class extends eZ.EventDispatcher{get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e){arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking}update(e,t,r){}setSize(e,t){}initialize(e,t,r){}dispose(){for(let e of Object.keys(this)){let t=this[e];(t instanceof eZ.WebGLRenderTarget||t instanceof eZ.Material||t instanceof eZ.Texture||t instanceof e$)&&this[e].dispose()}}constructor(e,t,{attributes:r=e6.NONE,blendFunction:n=ts.NORMAL,defines:i=new Map,uniforms:a=new Map,extensions:s=null,vertexShader:o=null}={}){super(),this.name=e,this.renderer=null,this.attributes=r,this.fragmentShader=t,this.vertexShader=o,this.defines=i,this.uniforms=a,this.extensions=s,this.blendMode=new tl(n),this.blendMode.addEventListener("change",e=>this.setChanged()),this._inputColorSpace=eZ.LinearSRGBColorSpace,this._outputColorSpace=eZ.NoColorSpace}},tc={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3},td=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],tf=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get kernelSequence(){return td[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(){return this.uniforms.scale.value}setScale(e){this.uniforms.scale.value=e}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(e){this.uniforms.kernel.value=e}setKernel(e){this.kernel=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t,.5*e,.5*t)}setSize(e,t){let r=1/e,n=1/t;this.uniforms.texelSize.value.set(r,n,.5*r,.5*n)}constructor(e=new eZ.Vector4){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector4),scale:new eZ.Uniform(1),kernel:new eZ.Uniform(0)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;\n#include \n}",vertexShader:"uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.setTexelSize(e.x,e.y),this.kernelSize=tc.MEDIUM}},th=class extends e${getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(e){this._blurMaterial=e}get dithering(){return this.copyMaterial.dithering}set dithering(e){this.copyMaterial.dithering=e}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(e){this.blurMaterial.kernelSize=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get scale(){return this.blurMaterial.scale}set scale(e){this.blurMaterial.scale=e}getScale(){return this.blurMaterial.scale}setScale(e){this.blurMaterial.scale=e}getKernelSize(){return this.kernelSize}setKernelSize(e){this.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,r,n,i){let a=this.scene,s=this.camera,o=this.renderTargetA,l=this.renderTargetB,u=this.blurMaterial,c=u.kernelSequence,d=t;this.fullscreenMaterial=u;for(let t=0,r=c.length;tthis.setSize(s.baseWidth,s.baseHeight)),this._blurMaterial=new tf,this._blurMaterial.kernelSize=e,this.copyMaterial=new e2}},tp=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get threshold(){return this.uniforms.threshold.value}set threshold(e){this.smoothing>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}getThreshold(){return this.threshold}setThreshold(e){this.threshold=e}get smoothing(){return this.uniforms.smoothing.value}set smoothing(e){this.threshold>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(e){this.smoothing=e}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(e){}get colorOutput(){return void 0!==this.defines.COLOR}set colorOutput(e){e?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(e){return this.colorOutput}setColorOutputEnabled(e){this.colorOutput=e}get useRange(){return null!==this.luminanceRange}set useRange(e){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(e){null!==e?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=e,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(e){this.luminanceRange=e}constructor(e=!1,t=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:eZ.REVISION.replace(/\D+/g,"")},uniforms:{inputBuffer:new eZ.Uniform(null),threshold:new eZ.Uniform(0),smoothing:new eZ.Uniform(1),range:new eZ.Uniform(null)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef RANGE\nuniform vec2 range;\n#elif defined(THRESHOLD)\nuniform float threshold;uniform float smoothing;\n#endif\nvarying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);float mask=1.0;\n#ifdef RANGE\nfloat low=step(range.x,l);float high=step(l,range.y);mask=low*high;\n#elif defined(THRESHOLD)\nmask=smoothstep(threshold,threshold+smoothing,l);\n#endif\n#ifdef COLOR\ngl_FragColor=texel*mask;\n#else\ngl_FragColor=vec4(l*mask);\n#endif\n}",vertexShader:e1}),this.colorOutput=e,this.luminanceRange=t}},tm=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#define WEIGHT_INNER 0.125\n#define WEIGHT_OUTER 0.0555555\nvarying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c;\n#include \n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}},tv=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}set supportBuffer(e){this.uniforms.supportBuffer.value=e}get radius(){return this.uniforms.radius.value}set radius(e){this.uniforms.radius.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new eZ.Uniform(null),supportBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2),radius:new eZ.Uniform(.85)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;\n#else\nuniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;\n#endif\nuniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius);\n#include \n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}},tg={RED:0,GREEN:1,BLUE:2,ALPHA:3},tA={DISCARD:0,MULTIPLY_RGB_SET_ALPHA:2,MULTIPLY_RGB:3},ty=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}set cocBuffer(e){this.uniforms.cocBuffer.value=e}setCoCBuffer(e){this.uniforms.cocBuffer.value=e}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(e){return this.scale}setScale(e){this.scale=e}generateKernel(){let e=new Float64Array(128),t=new Float64Array(32),r=0,n=0;for(let i=0,a=Math.sqrt(80);i<80;++i){let s=2.39996323*i,o=Math.sqrt(i)/a,l=o*Math.cos(s),u=o*Math.sin(s);i%5==0?(t[n++]=l,t[n++]=u):(e[r++]=l,e[r++]=u)}this.uniforms.kernel64.value=e,this.uniforms.kernel16.value=t}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(e=!1,t=!1){super({name:"BokehMaterial",defines:{PASS:e?"2":"1"},uniforms:{inputBuffer:new eZ.Uniform(null),cocBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2),kernel64:new eZ.Uniform(null),kernel16:new eZ.Uniform(null),scale:new eZ.Uniform(1)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#if PASS == 1\nuniform vec4 kernel64[32];\n#else\nuniform vec4 kernel16[8];\n#endif\nuniform lowp sampler2D cocBuffer;uniform vec2 texelSize;uniform float scale;varying vec2 vUv;void main(){\n#ifdef FOREGROUND\nvec2 cocNearFar=texture2D(cocBuffer,vUv).rg*scale;float coc=cocNearFar.x;\n#else\nfloat coc=texture2D(cocBuffer,vUv).g*scale;\n#endif\nif(coc==0.0){gl_FragColor=texture2D(inputBuffer,vUv);}else{\n#ifdef FOREGROUND\nvec2 step=texelSize*max(cocNearFar.x,cocNearFar.y);\n#else\nvec2 step=texelSize*coc;\n#endif\n#if PASS == 1\nvec4 acc=vec4(0.0);for(int i=0;i<32;++i){vec4 kernel=kernel64[i];vec2 uv=step*kernel.xy+vUv;acc+=texture2D(inputBuffer,uv);uv=step*kernel.zw+vUv;acc+=texture2D(inputBuffer,uv);}gl_FragColor=acc/64.0;\n#else\nvec4 maxValue=texture2D(inputBuffer,vUv);for(int i=0;i<8;++i){vec4 kernel=kernel16[i];vec2 uv=step*kernel.xy+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);uv=step*kernel.zw+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);}gl_FragColor=maxValue;\n#endif\n}}",vertexShader:e1}),t&&(this.defines.FOREGROUND="1"),this.generateKernel()}},tx=class extends eZ.ShaderMaterial{set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}get focusDistance(){return this.uniforms.focusDistance.value}set focusDistance(e){this.uniforms.focusDistance.value=e}get worldFocusDistance(){return this.focusDistance}set worldFocusDistance(e){this.focusDistance=e}getFocusDistance(e){this.uniforms.focusDistance.value=e}setFocusDistance(e){this.uniforms.focusDistance.value=e}get focalLength(){return this.focusRange}set focalLength(e){this.focusRange=e}get focusRange(){return this.uniforms.focusRange.value}set focusRange(e){this.uniforms.focusRange.value=e}get worldFocusRange(){return this.focusRange}set worldFocusRange(e){this.focusRange=e}getFocalLength(e){return this.focusRange}setFocalLength(e){this.focusRange=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){this.uniforms.projectionMatrix.value=e.projectionMatrix,this.uniforms.projectionMatrixInverse.value=e.projectionMatrixInverse,this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far;let t=void 0!==this.defines.PERSPECTIVE_CAMERA;e instanceof eZ.PerspectiveCamera?t||(this.defines.PERSPECTIVE_CAMERA=!0,this.needsUpdate=!0):t&&(delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}constructor(e=null){super({name:"CircleOfConfusionMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),projectionMatrix:new eZ.Uniform(null),projectionMatrixInverse:new eZ.Uniform(null),cameraNear:new eZ.Uniform(.3),cameraFar:new eZ.Uniform(1e3),focusDistance:new eZ.Uniform(0),focusRange:new eZ.Uniform(0)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform mat4 projectionMatrix;uniform mat4 projectionMatrixInverse;uniform float cameraNear;uniform float cameraFar;uniform float focusDistance;uniform float focusRange;varying vec2 vUv;float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nfloat depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nfloat depth=texture2D(depthBuffer,uv).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#elif defined(USE_REVERSED_DEPTH_BUFFER)\ndepth=1.0-depth;\n#endif\nreturn depth;}\n#ifdef PERSPECTIVE_CAMERA\n#define getViewZ(depth) perspectiveDepthToViewZ(depth, cameraNear, cameraFar)\n#else\n#define getViewZ(depth) orthographicDepthToViewZ(depth, cameraNear, cameraFar)\n#endif\nvec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(projectionMatrixInverse*clipPosition).xyz;}vec3 getViewPosition(const in vec2 screenPosition,const in float depth){return getViewPosition(screenPosition,depth,getViewZ(depth));}\n#define getDistance(viewPosition) length(viewPosition)\nvoid main(){float depth=readDepth(vUv);vec3 viewPosition=getViewPosition(vUv,depth);float distance=getDistance(viewPosition);float signedDistance=distance-focusDistance;float magnitude=smoothstep(0.0,focusRange,abs(signedDistance));gl_FragColor.rg=magnitude*vec2(step(signedDistance,0.0),step(0.0,signedDistance));}",vertexShader:e1}),this.uniforms.focalLength=this.uniforms.focusRange,null!==e&&this.copyCameraSettings(e)}},tB=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}set maskTexture(e){this.uniforms.maskTexture.value=e,delete this.defines.MASK_PRECISION_HIGH,e.type!==eZ.UnsignedByteType&&(this.defines.MASK_PRECISION_HIGH="1"),this.needsUpdate=!0}setMaskTexture(e){this.maskTexture=e}set colorChannel(e){this.defines.COLOR_CHANNEL=e.toFixed(0),this.needsUpdate=!0}setColorChannel(e){this.colorChannel=e}set maskFunction(e){this.defines.MASK_FUNCTION=e.toFixed(0),this.needsUpdate=!0}setMaskFunction(e){this.maskFunction=e}get inverted(){return void 0!==this.defines.INVERTED}set inverted(e){this.inverted&&!e?delete this.defines.INVERTED:e&&(this.defines.INVERTED="1"),this.needsUpdate=!0}isInverted(){return this.inverted}setInverted(e){this.inverted=e}get strength(){return this.uniforms.strength.value}set strength(e){this.uniforms.strength.value=e}getStrength(){return this.strength}setStrength(e){this.strength=e}constructor(e=null){super({name:"MaskMaterial",uniforms:{maskTexture:new eZ.Uniform(e),inputBuffer:new eZ.Uniform(null),strength:new eZ.Uniform(1)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef MASK_PRECISION_HIGH\nuniform mediump sampler2D maskTexture;\n#else\nuniform lowp sampler2D maskTexture;\n#endif\n#if MASK_FUNCTION != 0\nuniform float strength;\n#endif\nvarying vec2 vUv;void main(){\n#if COLOR_CHANNEL == 0\nfloat mask=texture2D(maskTexture,vUv).r;\n#elif COLOR_CHANNEL == 1\nfloat mask=texture2D(maskTexture,vUv).g;\n#elif COLOR_CHANNEL == 2\nfloat mask=texture2D(maskTexture,vUv).b;\n#else\nfloat mask=texture2D(maskTexture,vUv).a;\n#endif\n#if MASK_FUNCTION == 0\n#ifdef INVERTED\nmask=(mask>0.0)?0.0:1.0;\n#else\nmask=(mask>0.0)?1.0:0.0;\n#endif\n#else\nmask=clamp(mask*strength,0.0,1.0);\n#ifdef INVERTED\nmask=1.0-mask;\n#endif\n#endif\n#if MASK_FUNCTION == 3\nvec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=vec4(mask*texel.rgb,texel.a);\n#elif MASK_FUNCTION == 2\ngl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask);\n#else\ngl_FragColor=mask*texture2D(inputBuffer,vUv);\n#endif\n}",vertexShader:e1}),this.colorChannel=tg.RED,this.maskFunction=tA.DISCARD}},tC=class extends e${setInput(e){this.input=e}render(e,t,r,n,i){let a=this.fullscreenMaterial.uniforms;null!==t&&void 0!==a&&void 0!==a[this.input]&&(a[this.input].value=t.texture),e.setRenderTarget(this.renderToScreen?null:r),e.render(this.scene,this.camera)}initialize(e,t,r){void 0!==r&&r!==eZ.UnsignedByteType&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}constructor(e,t="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=e,this.input=t}},tS=new eZ.Vector3,tE=class extends tu{set mainCamera(e){this.camera=e,this.cocMaterial.copyCameraSettings(e)}get cocTexture(){return this.renderTargetCoC.texture}get maskFunction(){return this.maskPass.fullscreenMaterial.maskFunction}set maskFunction(e){this.maskFunction!==e&&(this.defines.set("MASK_FUNCTION",e.toFixed(0)),this.maskPass.fullscreenMaterial.maskFunction=e,this.setChanged())}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.cocMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get("scale").value}set bokehScale(e){this.bokehNearBasePass.fullscreenMaterial.scale=e,this.bokehNearFillPass.fullscreenMaterial.scale=e,this.bokehFarBasePass.fullscreenMaterial.scale=e,this.bokehFarFillPass.fullscreenMaterial.scale=e,this.maskPass.fullscreenMaterial.strength=e,this.uniforms.get("scale").value=e}getBokehScale(){return this.bokehScale}setBokehScale(e){this.bokehScale=e}getTarget(){return this.target}setTarget(e){this.target=e}calculateFocusDistance(e){return this.camera.getWorldPosition(tS).distanceTo(e)}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.cocMaterial.depthBuffer=e,this.cocMaterial.depthPacking=t}update(e,t,r){let n=this.renderTarget,i=this.renderTargetCoC,a=this.renderTargetCoCBlurred,s=this.renderTargetMasked;if(null!==this.target){let e=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=e}this.cocPass.render(e,null,i),this.blurPass.render(e,i,a),this.maskPass.render(e,t,s),this.bokehFarBasePass.render(e,s,n),this.bokehFarFillPass.render(e,n,this.renderTargetFar),this.bokehNearBasePass.render(e,t,n),this.bokehNearFillPass.render(e,n,this.renderTargetNear)}setSize(e,t){let r=this.resolution;r.setBaseSize(e,t);let n=r.width,i=r.height;this.cocPass.setSize(e,t),this.blurPass.setSize(e,t),this.maskPass.setSize(e,t),this.renderTargetFar.setSize(e,t),this.renderTargetCoC.setSize(e,t),this.renderTargetMasked.setSize(e,t),this.renderTarget.setSize(n,i),this.renderTargetNear.setSize(n,i),this.renderTargetCoCBlurred.setSize(n,i),this.bokehNearBasePass.fullscreenMaterial.setSize(e,t),this.bokehNearFillPass.fullscreenMaterial.setSize(e,t),this.bokehFarBasePass.fullscreenMaterial.setSize(e,t),this.bokehFarFillPass.fullscreenMaterial.setSize(e,t)}initialize(e,t,r){this.cocPass.initialize(e,t,r),this.maskPass.initialize(e,t,r),this.bokehNearBasePass.initialize(e,t,r),this.bokehNearFillPass.initialize(e,t,r),this.bokehFarBasePass.initialize(e,t,r),this.bokehFarFillPass.initialize(e,t,r),this.blurPass.initialize(e,t,eZ.UnsignedByteType),e.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH="1"),void 0!==r&&(this.renderTarget.texture.type=r,this.renderTargetNear.texture.type=r,this.renderTargetFar.texture.type=r,this.renderTargetMasked.texture.type=r,null!==e&&e.outputColorSpace===eZ.SRGBColorSpace&&(this.renderTarget.texture.colorSpace=eZ.SRGBColorSpace,this.renderTargetNear.texture.colorSpace=eZ.SRGBColorSpace,this.renderTargetFar.texture.colorSpace=eZ.SRGBColorSpace,this.renderTargetMasked.texture.colorSpace=eZ.SRGBColorSpace))}constructor(e,{blendFunction:t,worldFocusDistance:r,worldFocusRange:n,focalLength:i,focusDistance:a=r||3,focusRange:s=n||i||2,bokehScale:o=1,resolutionScale:l=.5,width:u,height:c,resolutionX:d=u||tn.AUTO_SIZE,resolutionY:f=c||tn.AUTO_SIZE}={}){super("DepthOfFieldEffect","#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D nearColorBuffer;uniform mediump sampler2D farColorBuffer;\n#else\nuniform lowp sampler2D nearColorBuffer;uniform lowp sampler2D farColorBuffer;\n#endif\n#if MASK_FUNCTION != 1 && MASK_FUNCTION != 2\nuniform lowp sampler2D farCoCBuffer;\n#endif\nuniform lowp sampler2D nearCoCBuffer;uniform float scale;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 colorNear=texture2D(nearColorBuffer,uv);vec4 colorFar=texture2D(farColorBuffer,uv);\n#if MASK_FUNCTION == 1 || MASK_FUNCTION == 2\nvec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,colorFar.a);cocNearFar.x=min(cocNearFar.x*scale,1.0);\n#else\nvec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,texture2D(farCoCBuffer,uv).g);cocNearFar=min(cocNearFar*scale,1.0);colorFar.a*=cocNearFar.y;\n#endif\nvec4 result=inputColor*(1.0-cocNearFar.y)+colorFar;result=mix(result,colorNear,cocNearFar.x);outputColor=result;}",{blendFunction:t,attributes:e6.DEPTH,uniforms:new Map([["nearColorBuffer",new eZ.Uniform(null)],["farColorBuffer",new eZ.Uniform(null)],["nearCoCBuffer",new eZ.Uniform(null)],["farCoCBuffer",new eZ.Uniform(null)],["scale",new eZ.Uniform(1)]])}),this.camera=e,this.renderTarget=new eZ.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="DoF.Intermediate",this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name="DoF.Masked.Far",this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name="DoF.Bokeh.Near",this.uniforms.get("nearColorBuffer").value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name="DoF.Bokeh.Far",this.uniforms.get("farColorBuffer").value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name="DoF.CoC",this.uniforms.get("farCoCBuffer").value=this.renderTargetCoC.texture,this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name="DoF.CoC.Blurred",this.uniforms.get("nearCoCBuffer").value=this.renderTargetCoCBlurred.texture,this.cocPass=new tC(new tx(e));let h=this.cocMaterial;h.focusDistance=a,h.focusRange=s,this.blurPass=new th({resolutionScale:l,resolutionX:d,resolutionY:f,kernelSize:tc.MEDIUM}),this.maskPass=new tC(new tB(this.renderTargetCoC.texture)),this.maskPass.fullscreenMaterial.colorChannel=tg.GREEN,this.maskFunction=tA.MULTIPLY_RGB,this.bokehNearBasePass=new tC(new ty(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new tC(new ty(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new tC(new ty(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new tC(new ty(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;let p=this.resolution=new tn(this,d,f,l);p.addEventListener("change",e=>this.setSize(p.baseWidth,p.baseHeight)),this.bokehScale=o}},tT=class extends eZ.DataTexture{constructor(e,t,r=eZ.RedFormat,n=eZ.UnsignedByteType){super(function(e,t,r){let n,i=new Map([[eZ.RedFormat,1],[eZ.RGFormat,2],[eZ.RGBAFormat,4]]);if(i.has(t)||console.error("Invalid noise texture format"),r===eZ.UnsignedByteType){n=new Uint8Array(e*i.get(t));for(let e=0,t=n.length;e\n#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform vec2 lightPosition;uniform float exposure;uniform float decay;uniform float density;uniform float weight;uniform float clampMax;varying vec2 vUv;void main(){vec2 coord=vUv;vec2 delta=lightPosition-coord;delta*=1.0/SAMPLES_FLOAT*density;float illuminationDecay=1.0;vec4 color=vec4(0.0);for(int i=0;i\n}",vertexShader:e1})}},tb=class extends e${set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get renderToScreen(){return super.renderToScreen}set renderToScreen(e){super.renderToScreen=e,this.clearPass.renderToScreen=e}get overrideMaterial(){let e=this.overrideMaterialManager;return null!==e?e.material:null}set overrideMaterial(e){let t=this.overrideMaterialManager;null!==e?null!==t?t.setMaterial(e):this.overrideMaterialManager=new tr(e):null!==t&&(t.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(e){this.overrideMaterial=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getSelection(){return this.selection}setSelection(e){this.selection=e}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(e){this.skipShadowMapUpdate=e}getClearPass(){return this.clearPass}render(e,t,r,n,i){let a=this.scene,s=this.camera,o=this.selection,l=s.layers.mask,u=a.background,c=e.shadowMap.autoUpdate,d=this.renderToScreen?null:t;null!==o&&s.layers.set(o.getLayer()),this.skipShadowMapUpdate&&(e.shadowMap.autoUpdate=!1),(this.ignoreBackground||null!==this.clearPass.overrideClearColor)&&(a.background=null),this.clearPass.enabled&&this.clearPass.render(e,t),e.setRenderTarget(d),null!==this.overrideMaterialManager?this.overrideMaterialManager.render(e,a,s):e.render(a,s),s.layers.mask=l,a.background=u,e.shadowMap.autoUpdate=c}constructor(e,t,r=null){super("RenderPass",e,t),this.needsSwap=!1,this.clearPass=new e4,this.overrideMaterialManager=null===r?null:new tr(r),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}},tM=new eZ.Vector3,tw=new eZ.Matrix4,tF={SCALE_UP:"lut.scaleup"};function tR(e,t,r){let n=document.createElement("canvas"),i=n.getContext("2d");if(n.width=e,n.height=t,r instanceof Image)i.drawImage(r,0,0);else{let n=i.createImageData(e,t);n.data.set(r),i.putImageData(n,0,0)}return n}var tI=class e{toCanvas(){return"undefined"==typeof document?null:tR(this.width,this.height,this.data)}static from(t){let r,{width:n,height:i}=t;if(t instanceof Image){let e=tR(n,i,t);null!==e&&(r=e.getContext("2d").getImageData(0,0,n,i).data)}else r=t.data;return new e(n,i,r)}constructor(e=0,t=0,r=null){this.width=e,this.height=t,this.data=r}},tP=new eZ.Color,tL=class e extends eZ.Data3DTexture{get isLookupTexture3D(){return!0}scaleUp(t){let r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=this.image;return t<=n.width?Promise.reject(Error("The target size must be greater than the current size")):new Promise((i,a)=>{let s=URL.createObjectURL(new Blob(['"use strict";(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case O.SCALE_UP:r=v.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})();\n'],{type:"text/javascript"})),o=new Worker(s);o.addEventListener("error",e=>a(e.error)),o.addEventListener("message",r=>{let n=new e(r.data,t);this.colorSpace=n.colorSpace,n.type=this.type,n.name=this.name,URL.revokeObjectURL(s),i(n)});let l=r?[n.data.buffer]:[];o.postMessage({operation:tF.SCALE_UP,data:n.data,size:t},l)})}applyLUT(e){let t=this.image,r=e.image,n=Math.min(t.width,t.height,t.depth);if(n!==Math.min(r.width,r.height,r.depth))console.error("Size mismatch");else if(e.type!==eZ.FloatType||this.type!==eZ.FloatType)console.error("Both LUTs must be FloatType textures");else if(e.format!==eZ.RGBAFormat||this.format!==eZ.RGBAFormat)console.error("Both LUTs must be RGBA textures");else{let e=t.data,i=r.data,a=n**2,s=n-1;for(let t=0,r=n**3;ta){r=new Uint8Array(e.length);for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:eZ.RGBADepthPacking;this.depthBuffer=e,this.depthPacking=t}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof eZ.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}constructor(e=null,t){super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),cameraNear:new eZ.Uniform(.3),cameraFar:new eZ.Uniform(1e3)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform float cameraNear;uniform float cameraFar;centroid varying float vViewZ;centroid varying vec4 vProjTexCoord;void main(){\n#include \nvec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;\n#if DEPTH_PACKING == 3201\nfloat depth=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord));\n#else\nfloat depth=texture2D(depthBuffer,projTexCoord).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#elif defined(USE_REVERSED_DEPTH_BUFFER)\ndepth=1.0-depth;\n#endif\n#ifdef PERSPECTIVE_CAMERA\nfloat viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nfloat viewZ=orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\nfloat depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}",vertexShader:"#include \n#include \n#include \n#include \nvarying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include \n#include \n#include \n#include \n#include \nvViewZ=mvPosition.z;vProjTexCoord=gl_Position;\n#include \n}"}),this.depthBuffer=e,this.depthPacking=eZ.RGBADepthPacking,this.copyCameraSettings(t)}},tN=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(e=new eZ.Vector2){super({name:"OutlineMaterial",uniforms:{inputBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.uniforms.texelSize.value.set(e.x,e.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}},tk=new eZ.Vector3,tj=new eZ.Vector3,tz=class extends eZ.ShaderMaterial{set depthBuffer0(e){this.uniforms.depthBuffer0.value=e}set depthPacking0(e){this.defines.DEPTH_PACKING_0=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer0=e,this.depthPacking0=t}set depthBuffer1(e){this.uniforms.depthBuffer1.value=e}set depthPacking1(e){this.defines.DEPTH_PACKING_1=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer1(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer1=e,this.depthPacking1=t}get maxDepthStrategy(){return Number(this.defines.DEPTH_TEST_STRATEGY)}set maxDepthStrategy(e){this.defines.DEPTH_TEST_STRATEGY=e.toFixed(0),this.needsUpdate=!0}get keepFar(){return this.maxDepthStrategy}set keepFar(e){this.maxDepthStrategy=e?tG.KEEP_MAX_DEPTH:tG.DISCARD_MAX_DEPTH}getMaxDepthStrategy(){return this.maxDepthStrategy}setMaxDepthStrategy(e){this.maxDepthStrategy=e}get epsilon(){return Number(this.defines.DEPTH_EPSILON)}set epsilon(e){this.defines.DEPTH_EPSILON=e.toFixed(16),this.needsUpdate=!0}getEpsilon(){return this.epsilon}setEpsilon(e){this.epsilon=e}get depthMode(){return Number(this.defines.DEPTH_MODE)}set depthMode(e){let t;switch(e){case eZ.NeverDepth:t="false";break;case eZ.AlwaysDepth:t="true";break;case eZ.EqualDepth:t="abs(d1 - d0) <= DEPTH_EPSILON";break;case eZ.NotEqualDepth:t="abs(d1 - d0) > DEPTH_EPSILON";break;case eZ.LessDepth:t="d0 > d1";break;case eZ.LessEqualDepth:t="d0 >= d1";break;case eZ.GreaterEqualDepth:t="d0 <= d1";break;case eZ.GreaterDepth:default:t="d0 < d1"}this.defines.DEPTH_MODE=e.toFixed(0),this.defines["depthTest(d0, d1)"]=t,this.needsUpdate=!0}getDepthMode(){return this.depthMode}setDepthMode(e){this.depthMode=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),e instanceof eZ.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}constructor(){super({name:"DepthMaskMaterial",defines:{DEPTH_EPSILON:"0.0001",DEPTH_PACKING_0:"0",DEPTH_PACKING_1:"0",DEPTH_TEST_STRATEGY:tG.KEEP_MAX_DEPTH},uniforms:{inputBuffer:new eZ.Uniform(null),depthBuffer0:new eZ.Uniform(null),depthBuffer1:new eZ.Uniform(null),cameraNearFar:new eZ.Uniform(new eZ.Vector2(1,1))},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1;\n#else\nuniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1;\n#endif\nuniform sampler2D inputBuffer;uniform vec2 cameraNearFar;float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);\n#endif\n}varying vec2 vUv;void main(){vec2 depth;\n#if DEPTH_PACKING_0 == 3201\ndepth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv));\n#else\ndepth.x=texture2D(depthBuffer0,vUv).r;\n#endif\n#if DEPTH_PACKING_1 == 3201\ndepth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv));\n#else\ndepth.y=texture2D(depthBuffer1,vUv).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat a=cameraNearFar.y/(cameraNearFar.y-cameraNearFar.x);float b=cameraNearFar.y*cameraNearFar.x/(cameraNearFar.x-cameraNearFar.y);float c=log2(cameraNearFar.y+1.0);float d=pow(2.0,depth.x*c)-1.0;depth.x=a+b/d;d=pow(2.0,depth.y*c)-1.0;depth.y=a+b/d;\n#elif defined(USE_REVERSED_DEPTH_BUFFER)\ndepth.x=1.0-depth.x;depth.y=1.0-depth.y;\n#endif\nbool isMaxDepth=(depth.x==1.0);\n#ifdef PERSPECTIVE_CAMERA\ndepth.x=viewZToOrthographicDepth(getViewZ(depth.x),cameraNearFar.x,cameraNearFar.y);depth.y=viewZToOrthographicDepth(getViewZ(depth.y),cameraNearFar.x,cameraNearFar.y);\n#endif\n#if DEPTH_TEST_STRATEGY == 0\nbool keep=depthTest(depth.x,depth.y);\n#elif DEPTH_TEST_STRATEGY == 1\nbool keep=isMaxDepth||depthTest(depth.x,depth.y);\n#else\nbool keep=!isMaxDepth&&depthTest(depth.x,depth.y);\n#endif\nif(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}",vertexShader:e1}),this.depthMode=eZ.LessDepth}},tK=class extends eZ.ShaderMaterial{set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}get edgeDetectionMode(){return Number(this.defines.EDGE_DETECTION_MODE)}set edgeDetectionMode(e){this.defines.EDGE_DETECTION_MODE=e.toFixed(0),this.needsUpdate=!0}getEdgeDetectionMode(){return this.edgeDetectionMode}setEdgeDetectionMode(e){this.edgeDetectionMode=e}get localContrastAdaptationFactor(){return Number(this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR)}set localContrastAdaptationFactor(e){this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR=e.toFixed("6"),this.needsUpdate=!0}getLocalContrastAdaptationFactor(){return this.localContrastAdaptationFactor}setLocalContrastAdaptationFactor(e){this.localContrastAdaptationFactor=e}get edgeDetectionThreshold(){return Number(this.defines.EDGE_THRESHOLD)}set edgeDetectionThreshold(e){this.defines.EDGE_THRESHOLD=e.toFixed("6"),this.defines.DEPTH_THRESHOLD=(.1*e).toFixed("6"),this.needsUpdate=!0}getEdgeDetectionThreshold(){return this.edgeDetectionThreshold}setEdgeDetectionThreshold(e){this.edgeDetectionThreshold=e}get predicationMode(){return Number(this.defines.PREDICATION_MODE)}set predicationMode(e){this.defines.PREDICATION_MODE=e.toFixed(0),this.needsUpdate=!0}getPredicationMode(){return this.predicationMode}setPredicationMode(e){this.predicationMode=e}set predicationBuffer(e){this.uniforms.predicationBuffer.value=e}setPredicationBuffer(e){this.uniforms.predicationBuffer.value=e}get predicationThreshold(){return Number(this.defines.PREDICATION_THRESHOLD)}set predicationThreshold(e){this.defines.PREDICATION_THRESHOLD=e.toFixed("6"),this.needsUpdate=!0}getPredicationThreshold(){return this.predicationThreshold}setPredicationThreshold(e){this.predicationThreshold=e}get predicationScale(){return Number(this.defines.PREDICATION_SCALE)}set predicationScale(e){this.defines.PREDICATION_SCALE=e.toFixed("6"),this.needsUpdate=!0}getPredicationScale(){return this.predicationScale}setPredicationScale(e){this.predicationScale=e}get predicationStrength(){return Number(this.defines.PREDICATION_STRENGTH)}set predicationStrength(e){this.defines.PREDICATION_STRENGTH=e.toFixed("6"),this.needsUpdate=!0}getPredicationStrength(){return this.predicationStrength}setPredicationStrength(e){this.predicationStrength=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(e=new eZ.Vector2,t=tO.COLOR){super({name:"EdgeDetectionMaterial",defines:{THREE_REVISION:eZ.REVISION.replace(/\D+/g,""),LOCAL_CONTRAST_ADAPTATION_FACTOR:"2.0",EDGE_THRESHOLD:"0.1",DEPTH_THRESHOLD:"0.01",PREDICATION_MODE:"0",PREDICATION_THRESHOLD:"0.01",PREDICATION_SCALE:"2.0",PREDICATION_STRENGTH:"1.0",DEPTH_PACKING:"0"},uniforms:{inputBuffer:new eZ.Uniform(null),depthBuffer:new eZ.Uniform(null),predicationBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(e)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\n#if EDGE_DETECTION_MODE == 1\n#include \n#endif\n#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);}\n#elif PREDICATION_MODE == 2\nuniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);}\n#endif\n#if PREDICATION_MODE != 0\nvec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);}\n#endif\n#if EDGE_DETECTION_MODE != 0\nuniform sampler2D inputBuffer;\n#endif\nvoid main(){\n#if EDGE_DETECTION_MODE == 0\nconst vec2 threshold=vec2(DEPTH_THRESHOLD);\n#elif PREDICATION_MODE != 0\nvec2 threshold=calculatePredicatedThreshold();\n#else\nconst vec2 threshold=vec2(EDGE_THRESHOLD);\n#endif\n#if EDGE_DETECTION_MODE == 0\nvec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 1\nfloat l=luminance(texture2D(inputBuffer,vUv).rgb);float lLeft=luminance(texture2D(inputBuffer,vUv0).rgb);float lTop=luminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=luminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=luminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=luminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=luminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 2\nvec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#endif\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\nvoid main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0);\n#if EDGE_DETECTION_MODE != 0\nvUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0);\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}"}),this.edgeDetectionMode=t}},tJ=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get searchTexture(){return this.uniforms.searchTexture.value}set searchTexture(e){this.uniforms.searchTexture.value=e}get areaTexture(){return this.uniforms.areaTexture.value}set areaTexture(e){this.uniforms.areaTexture.value=e}setLookupTextures(e,t){this.searchTexture=e,this.areaTexture=t}get orthogonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_INT)}set orthogonalSearchSteps(e){let t=Math.min(Math.max(e,0),112);this.defines.MAX_SEARCH_STEPS_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setOrthogonalSearchSteps(e){this.orthogonalSearchSteps=e}get diagonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_DIAG_INT)}set diagonalSearchSteps(e){let t=Math.min(Math.max(e,0),20);this.defines.MAX_SEARCH_STEPS_DIAG_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_DIAG_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setDiagonalSearchSteps(e){this.diagonalSearchSteps=e}get diagonalDetection(){return void 0===this.defines.DISABLE_DIAG_DETECTION}set diagonalDetection(e){e?delete this.defines.DISABLE_DIAG_DETECTION:this.defines.DISABLE_DIAG_DETECTION="1",this.needsUpdate=!0}isDiagonalDetectionEnabled(){return this.diagonalDetection}setDiagonalDetectionEnabled(e){this.diagonalDetection=e}get cornerRounding(){return Number(this.defines.CORNER_ROUNDING)}set cornerRounding(e){let t=Math.min(Math.max(e,0),100);this.defines.CORNER_ROUNDING=t.toFixed("4"),this.defines.CORNER_ROUNDING_NORM=(t/100).toFixed("4"),this.needsUpdate=!0}setCornerRounding(e){this.cornerRounding=e}get cornerDetection(){return void 0===this.defines.DISABLE_CORNER_DETECTION}set cornerDetection(e){e?delete this.defines.DISABLE_CORNER_DETECTION:this.defines.DISABLE_CORNER_DETECTION="1",this.needsUpdate=!0}isCornerRoundingEnabled(){return this.cornerDetection}setCornerRoundingEnabled(e){this.cornerDetection=e}setSize(e,t){let r=this.uniforms;r.texelSize.value.set(1/e,1/t),r.resolution.value.set(e,t)}constructor(e=new eZ.Vector2,t=new eZ.Vector2){super({name:"SMAAWeightsMaterial",defines:{MAX_SEARCH_STEPS_INT:"16",MAX_SEARCH_STEPS_FLOAT:"16.0",MAX_SEARCH_STEPS_DIAG_INT:"8",MAX_SEARCH_STEPS_DIAG_FLOAT:"8.0",CORNER_ROUNDING:"25",CORNER_ROUNDING_NORM:"0.25",AREATEX_MAX_DISTANCE:"16.0",AREATEX_MAX_DISTANCE_DIAG:"20.0",AREATEX_PIXEL_SIZE:"(1.0 / vec2(160.0, 560.0))",AREATEX_SUBTEX_SIZE:"(1.0 / 7.0)",SEARCHTEX_SIZE:"vec2(66.0, 33.0)",SEARCHTEX_PACKED_SIZE:"vec2(64.0, 16.0)"},uniforms:{inputBuffer:new eZ.Uniform(null),searchTexture:new eZ.Uniform(null),areaTexture:new eZ.Uniform(null),resolution:new eZ.Uniform(t),texelSize:new eZ.Uniform(e)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize)\n#if __VERSION__ < 300\n#define round(v) floor(v + 0.5)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;iend&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;iend&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0);\n#endif\n}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0);\n#endif\n}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){\n#if !defined(DISABLE_DIAG_DETECTION)\nweights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){\n#endif\nvec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d);\n#if !defined(DISABLE_DIAG_DETECTION)\n}else{e.r=0.0;}\n#endif\n}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}",vertexShader:"uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}"})}};function tV(e,t,r){return Math.min(Math.max((e+t)/(t-r),0),1)}var tQ=class extends eZ.ShaderMaterial{get near(){return this.uniforms.cameraNearFar.value.x}get far(){return this.uniforms.cameraNearFar.value.y}set normalDepthBuffer(e){this.uniforms.normalDepthBuffer.value=e,null!==e?this.defines.NORMAL_DEPTH="1":delete this.defines.NORMAL_DEPTH,this.needsUpdate=!0}setNormalDepthBuffer(e){this.normalDepthBuffer=e}set normalBuffer(e){this.uniforms.normalBuffer.value=e}setNormalBuffer(e){this.uniforms.normalBuffer.value=e}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}set noiseTexture(e){this.uniforms.noiseTexture.value=e}setNoiseTexture(e){this.uniforms.noiseTexture.value=e}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(e){this.defines.SAMPLES_INT=e.toFixed(0),this.defines.INV_SAMPLES_FLOAT=(1/e).toFixed(9),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(e){this.samples=e}get rings(){return Number(this.defines.SPIRAL_TURNS)}set rings(e){this.defines.SPIRAL_TURNS=e.toFixed(1),this.needsUpdate=!0}getRings(){return this.rings}setRings(e){this.rings=e}get intensity(){return this.uniforms.intensity.value}set intensity(e){this.uniforms.intensity.value=e,void 0===this.defines.LEGACY_INTENSITY&&(this.defines.LEGACY_INTENSITY="1",this.needsUpdate=!0)}getIntensity(){return this.uniforms.intensity.value}setIntensity(e){this.uniforms.intensity.value=e}get fade(){return this.uniforms.fade.value}set fade(e){this.uniforms.fade.value=e}getFade(){return this.uniforms.fade.value}setFade(e){this.uniforms.fade.value=e}get bias(){return this.uniforms.bias.value}set bias(e){this.uniforms.bias.value=e}getBias(){return this.uniforms.bias.value}setBias(e){this.uniforms.bias.value=e}get minRadiusScale(){return this.uniforms.minRadiusScale.value}set minRadiusScale(e){this.uniforms.minRadiusScale.value=e}getMinRadiusScale(){return this.uniforms.minRadiusScale.value}setMinRadiusScale(e){this.uniforms.minRadiusScale.value=e}updateRadius(){let e=this.r*this.resolution.height;this.defines.RADIUS=e.toFixed(11),this.defines.RADIUS_SQ=(e*e).toFixed(11),this.needsUpdate=!0}get radius(){return this.r}set radius(e){this.r=Math.min(Math.max(e,1e-6),1),this.updateRadius()}getRadius(){return this.radius}setRadius(e){this.radius=e}get distanceScaling(){return!0}set distanceScaling(e){}isDistanceScalingEnabled(){return this.distanceScaling}setDistanceScalingEnabled(e){this.distanceScaling=e}get distanceThreshold(){return this.uniforms.distanceCutoff.value.x}set distanceThreshold(e){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.distanceFalloff,0),1))}get worldDistanceThreshold(){var e,t;return-(e=this.distanceThreshold,e*((t=this.near)-this.far)-t)}set worldDistanceThreshold(e){this.distanceThreshold=tV(-e,this.near,this.far)}get distanceFalloff(){return this.uniforms.distanceCutoff.value.y-this.distanceThreshold}set distanceFalloff(e){this.uniforms.distanceCutoff.value.y=Math.min(Math.max(this.distanceThreshold+e,0),1)}get worldDistanceFalloff(){var e,t;return-(e=this.distanceFalloff,e*((t=this.near)-this.far)-t)}set worldDistanceFalloff(e){this.distanceFalloff=tV(-e,this.near,this.far)}setDistanceCutoff(e,t){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}get proximityThreshold(){return this.uniforms.proximityCutoff.value.x}set proximityThreshold(e){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.proximityFalloff,0),1))}get worldProximityThreshold(){var e,t;return-(e=this.proximityThreshold,e*((t=this.near)-this.far)-t)}set worldProximityThreshold(e){this.proximityThreshold=tV(-e,this.near,this.far)}get proximityFalloff(){return this.uniforms.proximityCutoff.value.y-this.proximityThreshold}set proximityFalloff(e){this.uniforms.proximityCutoff.value.y=Math.min(Math.max(this.proximityThreshold+e,0),1)}get worldProximityFalloff(){var e,t;return-(e=this.proximityFalloff,e*((t=this.near)-this.far)-t)}set worldProximityFalloff(e){this.proximityFalloff=tV(-e,this.near,this.far)}setProximityCutoff(e,t){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),this.uniforms.projectionMatrix.value.copy(e.projectionMatrix),this.uniforms.inverseProjectionMatrix.value.copy(e.projectionMatrix).invert(),e instanceof eZ.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){let r=this.uniforms,n=r.noiseTexture.value;null!==n&&r.noiseScale.value.set(e/n.image.width,t/n.image.height),r.texelSize.value.set(1/e,1/t),this.resolution.set(e,t),this.updateRadius()}constructor(e){super({name:"SSAOMaterial",defines:{SAMPLES_INT:"0",INV_SAMPLES_FLOAT:"0.0",SPIRAL_TURNS:"0.0",RADIUS:"1.0",RADIUS_SQ:"1.0",DISTANCE_SCALING:"1",DEPTH_PACKING:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),normalBuffer:new eZ.Uniform(null),normalDepthBuffer:new eZ.Uniform(null),noiseTexture:new eZ.Uniform(null),inverseProjectionMatrix:new eZ.Uniform(new eZ.Matrix4),projectionMatrix:new eZ.Uniform(new eZ.Matrix4),texelSize:new eZ.Uniform(new eZ.Vector2),cameraNearFar:new eZ.Uniform(new eZ.Vector2),distanceCutoff:new eZ.Uniform(new eZ.Vector2),proximityCutoff:new eZ.Uniform(new eZ.Vector2),noiseScale:new eZ.Uniform(new eZ.Vector2),minRadiusScale:new eZ.Uniform(.33),intensity:new eZ.Uniform(1),fade:new eZ.Uniform(.01),bias:new eZ.Uniform(0)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \nuniform vec2 cameraNearFar;\n#define cameraNear cameraNearFar.x\n#define cameraFar cameraNearFar.y\n#ifdef NORMAL_DEPTH\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D normalDepthBuffer;\n#else\nuniform mediump sampler2D normalDepthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){float depth=texture2D(normalDepthBuffer,uv).a;\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#endif\nreturn depth;}\n#else\nuniform lowp sampler2D normalBuffer;\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nfloat depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nfloat depth=texture2D(depthBuffer,uv).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#endif\nreturn depth;}\n#endif\nuniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform float intensity;uniform float minRadiusScale;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){float radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;float noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i1.0||coords.t<0.0||coords.t>1.0){continue;}float sampleDepth=readDepth(coords);float viewZ=getViewZ(sampleDepth);\n#ifdef PERSPECTIVE_CAMERA\nfloat linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar);\n#else\nfloat linearSampleDepth=sampleDepth;\n#endif\nfloat proximity=abs(depth-linearSampleDepth);if(proximity1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}set normalBuffer(e){this.uniforms.normalBuffer.value=e,null!==e?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(e){this.normalBuffer=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),normalBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\n#ifdef DOWNSAMPLE_NORMALS\nuniform lowp sampler2D normalBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[4];distances[0]=abs(c-samples[0]);distances[1]=abs(c-samples[1]);distances[2]=abs(c-samples[2]);distances[3]=abs(c-samples[3]);float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t}render(e,t,r,n,i){e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){let r=this.resolution;r.setBaseSize(e,t),this.renderTarget.setSize(r.width,r.height),this.fullscreenMaterial.setSize(e,t)}initialize(e,t,r){let n=e.getContext();if(!(n.getExtension("EXT_color_buffer_float")||n.getExtension("EXT_color_buffer_half_float")))throw Error("Rendering to float texture is not supported.")}constructor({normalBuffer:e=null,resolutionScale:t=.5,width:r=tn.AUTO_SIZE,height:n=tn.AUTO_SIZE,resolutionX:i=r,resolutionY:a=n}={}){super("DepthDownsamplingPass");let s=new tW;s.normalBuffer=e,this.fullscreenMaterial=s,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new eZ.WebGLRenderTarget(1,1,{minFilter:eZ.NearestFilter,magFilter:eZ.NearestFilter,depthBuffer:!1,type:eZ.FloatType}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;let o=this.resolution=new tn(this,i,a,t);o.addEventListener("change",e=>this.setSize(o.baseWidth,o.baseHeight))}},t_=class extends eZ.ShaderMaterial{set luminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}setLuminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}set luminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}setLuminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}set mipLevel1x1(e){this.defines.MIP_LEVEL_1X1=e.toFixed(1),this.needsUpdate=!0}setMipLevel1x1(e){this.mipLevel1x1=e}set deltaTime(e){this.uniforms.deltaTime.value=e}setDeltaTime(e){this.uniforms.deltaTime.value=e}get minLuminance(){return this.uniforms.minLuminance.value}set minLuminance(e){this.uniforms.minLuminance.value=e}getMinLuminance(){return this.uniforms.minLuminance.value}setMinLuminance(e){this.uniforms.minLuminance.value=e}get adaptationRate(){return this.uniforms.tau.value}set adaptationRate(e){this.uniforms.tau.value=e}getAdaptationRate(){return this.uniforms.tau.value}setAdaptationRate(e){this.uniforms.tau.value=e}constructor(){super({name:"AdaptiveLuminanceMaterial",defines:{MIP_LEVEL_1X1:"0.0"},uniforms:{luminanceBuffer0:new eZ.Uniform(null),luminanceBuffer1:new eZ.Uniform(null),minLuminance:new eZ.Uniform(.01),deltaTime:new eZ.Uniform(0),tau:new eZ.Uniform(1)},extensions:{shaderTextureLOD:!0},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\nuniform lowp sampler2D luminanceBuffer0;uniform lowp sampler2D luminanceBuffer1;uniform float minLuminance;uniform float deltaTime;uniform float tau;varying vec2 vUv;void main(){float l0=unpackRGBAToFloat(texture2D(luminanceBuffer0,vUv));\n#if __VERSION__ < 300\nfloat l1=texture2DLodEXT(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#else\nfloat l1=textureLod(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#endif\nl0=max(minLuminance,l0);l1=max(minLuminance,l1);float adaptedLum=l0+(l1-l0)*(1.0-exp(-deltaTime*tau));gl_FragColor=(adaptedLum==1.0)?vec4(1.0):packFloatToRGBA(adaptedLum);}",vertexShader:e1})}};eZ.Loader,eZ.Loader,eZ.Loader,eZ.ShaderMaterial;var tZ=class extends eZ.ShaderMaterial{get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set inputDepthPacking(e){this.defines.INPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get outputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}set outputDepthPacking(e){this.defines.OUTPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.inputDepthPacking=t}getInputDepthPacking(){return Number(this.defines.INPUT_DEPTH_PACKING)}setInputDepthPacking(e){this.defines.INPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}getOutputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}setOutputDepthPacking(e){this.defines.OUTPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get texelPosition(){return this.uniforms.texelPosition.value}getTexelPosition(){return this.uniforms.texelPosition.value}setTexelPosition(e){this.uniforms.texelPosition.value=e}get mode(){return this.depthCopyMode}set mode(e){this.depthCopyMode=e,this.defines.DEPTH_COPY_MODE=e.toFixed(0),this.needsUpdate=!0}getMode(){return this.mode}setMode(e){this.mode=e}constructor(){super({name:"DepthCopyMaterial",defines:{INPUT_DEPTH_PACKING:"0",OUTPUT_DEPTH_PACKING:"0",DEPTH_COPY_MODE:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),texelPosition:new eZ.Uniform(new eZ.Vector2)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \nvarying vec2 vUv;\n#ifdef NORMAL_DEPTH\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D normalDepthBuffer;\n#else\nuniform mediump sampler2D normalDepthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;}\n#else\n#if INPUT_DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if INPUT_DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}\n#endif\nvoid main(){\n#if INPUT_DEPTH_PACKING == OUTPUT_DEPTH_PACKING\ngl_FragColor=texture2D(depthBuffer,vUv);\n#else\nfloat depth=readDepth(vUv);\n#if OUTPUT_DEPTH_PACKING == 3201\ngl_FragColor=(depth==1.0)?vec4(1.0):packDepthToRGBA(depth);\n#else\ngl_FragColor=vec4(vec3(depth),1.0);\n#endif\n#endif\n}",vertexShader:"varying vec2 vUv;\n#if DEPTH_COPY_MODE == 1\nuniform vec2 texelPosition;\n#endif\nvoid main(){\n#if DEPTH_COPY_MODE == 1\nvUv=texelPosition;\n#else\nvUv=position.xy*0.5+0.5;\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}"}),this.depthCopyMode=tU.FULL}},tY=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}setShaderData(e){this.setShaderParts(e.shaderParts),this.setDefines(e.defines),this.setUniforms(e.uniforms),this.setExtensions(e.extensions)}setShaderParts(e){return this.fragmentShader="#include \n#include \n#include \n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nfloat depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nfloat depth=texture2D(depthBuffer,uv).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#elif defined(USE_REVERSED_DEPTH_BUFFER)\ndepth=1.0-depth;\n#endif\nreturn depth;}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0;\n#ifdef ENCODE_OUTPUT\n#include \n#endif\n#include \n}".replace(e7.FRAGMENT_HEAD,e.get(e7.FRAGMENT_HEAD)||"").replace(e7.FRAGMENT_MAIN_UV,e.get(e7.FRAGMENT_MAIN_UV)||"").replace(e7.FRAGMENT_MAIN_IMAGE,e.get(e7.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}".replace(e7.VERTEX_HEAD,e.get(e7.VERTEX_HEAD)||"").replace(e7.VERTEX_MAIN_SUPPORT,e.get(e7.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(e){for(let t of e.entries())this.defines[t[0]]=t[1];return this.needsUpdate=!0,this}setUniforms(e){for(let t of e.entries())this.uniforms[t[0]]=t[1];return this}setExtensions(e){for(let t of(this.extensions={},e))this.extensions[t]=!0;return this}get encodeOutput(){return void 0!==this.defines.ENCODE_OUTPUT}set encodeOutput(e){this.encodeOutput!==e&&(e?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(e){return this.encodeOutput}setOutputEncodingEnabled(e){this.encodeOutput=e}get time(){return this.uniforms.time.value}set time(e){this.uniforms.time.value=e}setDeltaTime(e){this.uniforms.time.value+=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof eZ.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){let r=this.uniforms;r.resolution.value.set(e,t),r.texelSize.value.set(1/e,1/t),r.aspect.value=e/t}static get Section(){return e7}constructor(e,t,r,n,i=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:eZ.REVISION.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new eZ.Uniform(null),depthBuffer:new eZ.Uniform(null),resolution:new eZ.Uniform(new eZ.Vector2),texelSize:new eZ.Uniform(new eZ.Vector2),cameraNear:new eZ.Uniform(.3),cameraFar:new eZ.Uniform(1e3),aspect:new eZ.Uniform(1),time:new eZ.Uniform(0)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:i}),e&&this.setShaderParts(e),t&&this.setDefines(t),r&&this.setUniforms(r),this.copyCameraSettings(n)}};eZ.ShaderMaterial;var tq=Number(eZ.REVISION.replace(/\D+/g,"")),t$=255/256,t0=new Float32Array([255/256/0x1000000,255/256/65536,255/256/256,255/256]),t1=new Float32Array([t$,t$/256,t$/65536,1/0x1000000]);function t2(e,t,r){for(let n of t){let t="$1"+e+n.charAt(0).toUpperCase()+n.slice(1),i=RegExp("([^\\.])(\\b"+n+"\\b)","g");for(let e of r.entries())null!==e[1]&&r.set(e[0],e[1].replace(i,t))}}var t9=class extends e${set mainScene(e){for(let t of this.effects)t.mainScene=e}set mainCamera(e){for(let t of(this.fullscreenMaterial.copyCameraSettings(e),this.effects))t.mainCamera=e}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(e){this.fullscreenMaterial.encodeOutput=e}get dithering(){return this.fullscreenMaterial.dithering}set dithering(e){let t=this.fullscreenMaterial;t.dithering=e,t.needsUpdate=!0}setEffects(e){for(let e of this.effects)e.removeEventListener("change",this.listener);for(let t of(this.effects=e.sort((e,t)=>t.attributes-e.attributes),this.effects))t.addEventListener("change",this.listener)}updateMaterial(){let e=new te,t=0;for(let r of this.effects)if(r.blendMode.blendFunction===ts.DST)e.attributes|=r.getAttributes()&e6.DEPTH;else if((e.attributes&r.getAttributes()&e6.CONVOLUTION)!=0)throw Error("Convolution effects cannot be merged (".concat(r.name,")"));else!function(e,t,r){let n=t.getFragmentShader(),i=t.getVertexShader(),a=void 0!==n&&/mainImage/.test(n),s=void 0!==n&&/mainUv/.test(n);if(r.attributes|=t.getAttributes(),void 0===n)throw Error("Missing fragment shader (".concat(t.name,")"));if(s&&(r.attributes&e6.CONVOLUTION)!=0)throw Error("Effects that transform UVs are incompatible with convolution effects (".concat(t.name,")"));if(a||s){let o=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=r.shaderParts,u=l.get(e7.FRAGMENT_HEAD)||"",c=l.get(e7.FRAGMENT_MAIN_UV)||"",d=l.get(e7.FRAGMENT_MAIN_IMAGE)||"",f=l.get(e7.VERTEX_HEAD)||"",h=l.get(e7.VERTEX_MAIN_SUPPORT)||"",p=new Set,m=new Set;if(s&&(c+=" ".concat(e,"MainUv(UV);\n"),r.uvTransformation=!0),null!==i&&/mainSupport/.test(i)){let t=/mainSupport *\([\w\s]*?uv\s*?\)/.test(i);for(let n of(h+=" ".concat(e,"MainSupport("),h+=t?"vUv);\n":");\n",i.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g)))for(let e of n[1].split(/\s*,\s*/))r.varyings.add(e),p.add(e),m.add(e);for(let e of i.matchAll(o))m.add(e[1])}for(let e of n.matchAll(o))m.add(e[1]);for(let e of t.defines.keys())m.add(e.replace(/\([\w\s,]*\)/g,""));for(let e of t.uniforms.keys())m.add(e);m.delete("while"),m.delete("for"),m.delete("if"),t.uniforms.forEach((t,n)=>r.uniforms.set(e+n.charAt(0).toUpperCase()+n.slice(1),t)),t.defines.forEach((t,n)=>r.defines.set(e+n.charAt(0).toUpperCase()+n.slice(1),t));let g=new Map([["fragment",n],["vertex",i]]);t2(e,m,r.defines),t2(e,m,g),n=g.get("fragment"),i=g.get("vertex");let A=t.blendMode;if(r.blendModes.set(A.blendFunction,A),a){null!==t.inputColorSpace&&t.inputColorSpace!==r.colorSpace&&(d+=t.inputColorSpace===eZ.SRGBColorSpace?"color0 = sRGBTransferOETF(color0);\n ":"color0 = sRGBToLinear(color0);\n "),t.outputColorSpace!==eZ.NoColorSpace?r.colorSpace=t.outputColorSpace:null!==t.inputColorSpace&&(r.colorSpace=t.inputColorSpace),d+="".concat(e,"MainImage(color0, UV, "),(r.attributes&e6.DEPTH)!=0&&/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/.test(n)&&(d+="depth, ",r.readDepth=!0),d+="color1);\n ";let i=e+"BlendOpacity";r.uniforms.set(i,A.opacity),d+="color0 = blend".concat(A.blendFunction,"(color0, color1, ").concat(i,");\n\n "),u+="uniform float ".concat(i,";\n\n")}if(u+=n+"\n",null!==i&&(f+=i+"\n"),l.set(e7.FRAGMENT_HEAD,u),l.set(e7.FRAGMENT_MAIN_UV,c),l.set(e7.FRAGMENT_MAIN_IMAGE,d),l.set(e7.VERTEX_HEAD,f),l.set(e7.VERTEX_MAIN_SUPPORT,h),null!==t.extensions)for(let e of t.extensions)r.extensions.add(e)}else throw Error("Could not find mainImage or mainUv function (".concat(t.name,")"))}("e"+t++,r,e);let r=e.shaderParts.get(e7.FRAGMENT_HEAD),n=e.shaderParts.get(e7.FRAGMENT_MAIN_IMAGE),i=e.shaderParts.get(e7.FRAGMENT_MAIN_UV),a=/\bblend\b/g;for(let t of e.blendModes.values())r+=t.getShaderCode().replace(a,"blend".concat(t.blendFunction))+"\n";for(let[t,a]of((e.attributes&e6.DEPTH)!=0?(e.readDepth&&(n="float depth = readDepth(UV);\n\n "+n),this.needsDepthTexture=null===this.getDepthTexture()):this.needsDepthTexture=!1,e.colorSpace===eZ.SRGBColorSpace&&(n+="color0 = sRGBToLinear(color0);\n "),e.uvTransformation?(i="vec2 transformedUv = vUv;\n"+i,e.defines.set("UV","transformedUv")):e.defines.set("UV","vUv"),e.shaderParts.set(e7.FRAGMENT_HEAD,r),e.shaderParts.set(e7.FRAGMENT_MAIN_IMAGE,n),e.shaderParts.set(e7.FRAGMENT_MAIN_UV,i),e.shaderParts))null!==a&&e.shaderParts.set(t,a.trim().replace(/^#/,"\n#"));this.skipRendering=0===t,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(e)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;for(let r of(this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t,this.effects))r.setDepthTexture(e,t)}render(e,t,r,n,i){for(let r of this.effects)r.update(e,t,n);if(!this.skipRendering||this.renderToScreen){let i=this.fullscreenMaterial;i.inputBuffer=t.texture,i.time+=n*this.timeScale,e.setRenderTarget(this.renderToScreen?null:r),e.render(this.scene,this.camera)}}setSize(e,t){for(let r of(this.fullscreenMaterial.setSize(e,t),this.effects))r.setSize(e,t)}initialize(e,t,r){for(let n of(this.renderer=e,this.effects))n.initialize(e,t,r);this.updateMaterial(),void 0!==r&&r!==eZ.UnsignedByteType&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){for(let e of(super.dispose(),this.effects))e.removeEventListener("change",this.listener),e.dispose()}handleEvent(e){"change"===e.type&&this.recompile()}constructor(e,...t){super("EffectPass"),this.fullscreenMaterial=new tY(null,null,null,e),this.listener=e=>this.handleEvent(e),this.effects=[],this.setEffects(t),this.skipRendering=!1,this.minTime=1,this.maxTime=1/0,this.timeScale=1}},t3=class extends e${set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,r,n,i){let a=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,a,a)}setSize(e,t){let r=this.resolution;r.setBaseSize(e,t),this.renderTarget.setSize(r.width,r.height)}constructor(e,t,{renderTarget:r,resolutionScale:n=1,width:i=tn.AUTO_SIZE,height:a=tn.AUTO_SIZE,resolutionX:s=i,resolutionY:o=a}={}){super("NormalPass"),this.needsSwap=!1,this.renderPass=new tb(e,t,new eZ.MeshNormalMaterial);let l=this.renderPass;l.ignoreBackground=!0,l.skipShadowMapUpdate=!0;let u=l.getClearPass();u.overrideClearColor=new eZ.Color(7829503),u.overrideClearAlpha=1,this.renderTarget=r,void 0===this.renderTarget&&(this.renderTarget=new eZ.WebGLRenderTarget(1,1,{minFilter:eZ.NearestFilter,magFilter:eZ.NearestFilter}),this.renderTarget.texture.name="NormalPass.Target");let c=this.resolution=new tn(this,s,o,n);c.addEventListener("change",e=>this.setSize(c.baseWidth,c.baseHeight))}};function t4(e,t,r,n){var i;return(i=e+(t-e)*.75)+(r+(n-r)*.75-i)*.875}function t8(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),t4(0,0,0,0),new Float32Array([0,0,0,0]),t4(0,0,0,1),new Float32Array([0,0,0,1]),t4(0,0,1,0),new Float32Array([0,0,1,0]),t4(0,0,1,1),new Float32Array([0,0,1,1]),t4(0,1,0,0),new Float32Array([0,1,0,0]),t4(0,1,0,1),new Float32Array([0,1,0,1]),t4(0,1,1,0),new Float32Array([0,1,1,0]),t4(0,1,1,1),new Float32Array([0,1,1,1]),t4(1,0,0,0),new Float32Array([1,0,0,0]),t4(1,0,0,1),new Float32Array([1,0,0,1]),t4(1,0,1,0),new Float32Array([1,0,1,0]),t4(1,0,1,1),new Float32Array([1,0,1,1]),t4(1,1,0,0),new Float32Array([1,1,0,0]),t4(1,1,0,1),new Float32Array([1,1,0,1]),t4(1,1,1,0),new Float32Array([1,1,1,0]),t4(1,1,1,1),new Float32Array([1,1,1,1]);function t5(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&e<1&&(e*=65536),(e=Math.floor(e))<256&&(e|=e<<8);for(var t,r=0;r<256;r++)t=1&r?rn[r]^255&e:rn[r]^e>>8&255,ri[r]=ri[r+256]=t,ra[r]=ra[r+256]=rr[t%12]}(0);function rs(e){var t=function(e){if("number"==typeof e)e=Math.abs(e);else if("string"==typeof e){var t=e;e=0;for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:.25,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.01,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1/0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:ro,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:.001,l="velocity_"+t;if(void 0===e.__damp&&(e.__damp={}),void 0===e.__damp[l]&&(e.__damp[l]=0),Math.abs(e[t]-r)<=o)return e[t]=r,!1;var u=2/(n=Math.max(1e-4,n)),c=s(u*i),d=e[t]-r,f=r,h=a*n;d=Math.min(Math.max(d,-h),h),r=e[t]-d;var p=(e.__damp[l]+u*d)*i;e.__damp[l]=(e.__damp[l]-u*p)*c;var m=r+(d+p)*c;return f-e[t]>0==m>f&&(m=f,e.__damp[l]=(m-f)/i),e[t]=m,!0}function ru(e,t,r,n,i,a,s,o){var l,u,c,d;return rl(e,t,e[t]+(c=(l=r-e[t])-Math.floor(l/(u=2*Math.PI))*u,(d=Math.max(0,Math.min(u,c)))>Math.PI&&(d-=2*Math.PI),d),n,i,a,s,o)}var rc=new ek.Vector2,rd=new ek.Vector3;function rf(e,t,r,n,i,a,s){return"number"==typeof t?rd.setScalar(t):Array.isArray(t)?rd.set(t[0],t[1],t[2]):rd.copy(t),o=rl(e,"x",rd.x,r,n,i,a,s),l=rl(e,"y",rd.y,r,n,i,a,s),u=rl(e,"z",rd.z,r,n,i,a,s),o||l||u}var rh=new ek.Vector4,rp=new ek.Euler,rm=new ek.Color,rv=new ek.Quaternion,rg=new ek.Vector4,rA=new ek.Vector4,ry=new ek.Vector4;function rx(e,t,r,n,i,a,s){Array.isArray(t)?rv.set(t[0],t[1],t[2],t[3]):rv.copy(t);var o=e.dot(rv)>0?1:-1;return rv.x*=o,rv.y*=o,rv.z*=o,rv.w*=o,B=rl(e,"x",rv.x,r,n,i,a,s),C=rl(e,"y",rv.y,r,n,i,a,s),S=rl(e,"z",rv.z,r,n,i,a,s),E=rl(e,"w",rv.w,r,n,i,a,s),rg.set(e.x,e.y,e.z,e.w).normalize(),rA.set(e.__damp.velocity_x,e.__damp.velocity_y,e.__damp.velocity_z,e.__damp.velocity_w),ry.copy(rg).multiplyScalar(rA.dot(rg)/rg.dot(rg)),e.__damp.velocity_x-=ry.x,e.__damp.velocity_y-=ry.y,e.__damp.velocity_z-=ry.z,e.__damp.velocity_w-=ry.w,e.set(rg.x,rg.y,rg.z,rg.w),B||C||S||E}var rB=new ek.Spherical,rC=new ek.Matrix4,rS=new ek.Vector3,rE=new ek.Quaternion,rT=new ek.Vector3,rD=Object.freeze({__proto__:null,rsqw:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/(2*Math.PI);return r/Math.atan(1/t)*Math.atan(Math.sin(2*Math.PI*e*n)/t)},exp:ro,damp:rl,dampAngle:ru,damp2:function(e,t,r,n,i,o,l){return"number"==typeof t?rc.setScalar(t):Array.isArray(t)?rc.set(t[0],t[1]):rc.copy(t),a=rl(e,"x",rc.x,r,n,i,o,l),s=rl(e,"y",rc.y,r,n,i,o,l),a||s},damp3:rf,damp4:function(e,t,r,n,i,a,s){return"number"==typeof t?rh.setScalar(t):Array.isArray(t)?rh.set(t[0],t[1],t[2],t[3]):rh.copy(t),c=rl(e,"x",rh.x,r,n,i,a,s),d=rl(e,"y",rh.y,r,n,i,a,s),f=rl(e,"z",rh.z,r,n,i,a,s),h=rl(e,"w",rh.w,r,n,i,a,s),c||d||f||h},dampE:function(e,t,r,n,i,a,s){return Array.isArray(t)?rp.set(t[0],t[1],t[2],t[3]):rp.copy(t),p=ru(e,"x",rp.x,r,n,i,a,s),m=ru(e,"y",rp.y,r,n,i,a,s),g=ru(e,"z",rp.z,r,n,i,a,s),p||m||g},dampC:function(e,t,r,n,i,a,s){return t instanceof ek.Color?rm.copy(t):Array.isArray(t)?rm.setRGB(t[0],t[1],t[2]):rm.set(t),A=rl(e,"r",rm.r,r,n,i,a,s),y=rl(e,"g",rm.g,r,n,i,a,s),x=rl(e,"b",rm.b,r,n,i,a,s),A||y||x},dampQ:rx,dampS:function(e,t,r,n,i,a,s){return Array.isArray(t)?rB.set(t[0],t[1],t[2]):rB.copy(t),T=rl(e,"radius",rB.radius,r,n,i,a,s),D=ru(e,"phi",rB.phi,r,n,i,a,s),b=ru(e,"theta",rB.theta,r,n,i,a,s),T||D||b},dampM:function(e,t,r,n,i,a,s){return void 0===e.__damp&&(e.__damp={position:new ek.Vector3,rotation:new ek.Quaternion,scale:new ek.Vector3},e.decompose(e.__damp.position,e.__damp.rotation,e.__damp.scale)),Array.isArray(t)?rC.set.apply(rC,t7(t)):rC.copy(t),rC.decompose(rS,rE,rT),M=rf(e.__damp.position,rS,r,n,i,a,s),w=rx(e.__damp.rotation,rE,r,n,i,a,s),F=rf(e.__damp.scale,rT,r,n,i,a,s),e.compose(e.__damp.position,e.__damp.rotation,e.__damp.scale),M||w||F}});ek.BufferGeometry;var rb=e.i(99749),rM=ek,rw=ek;new rw.OrthographicCamera(-1,1,1,-1,0,1);class rF extends rw.BufferGeometry{constructor(){super(),this.setAttribute("position",new rw.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new rw.Float32BufferAttribute([0,2,0,0,2,0],2))}}new rF;class rR extends rM.BufferGeometry{computeBoundingSphere(){}constructor(){super(),(0,rb._)(this,"boundingSphere",new rM.Sphere),this.setAttribute("position",new rM.BufferAttribute(new Float32Array([-1,-1,3,-1,-1,3]),2)),this.setAttribute("uv",new rM.BufferAttribute(new Float32Array([0,0,2,0,0,2]),2))}}let rI=new rR,rP=new rM.OrthographicCamera;class rL{render(e){e.render(this._mesh,rP)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}constructor(e){this._mesh=new rM.Mesh(rI,e),this._mesh.frustumCulled=!1}}let rU={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new rM.Matrix4},viewMat:{value:new rM.Matrix4},projViewMat:{value:new rM.Matrix4},projectionMatrixInv:{value:new rM.Matrix4},viewMatrixInv:{value:new rM.Matrix4},cameraPos:{value:new rM.Vector3},resolution:{value:new rM.Vector2},biasAdjustment:{value:new rM.Vector2},time:{value:0},samples:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},ortho:{value:!1},screenSpaceRadius:{value:!1},frame:{value:0}},depthWrite:!1,depthTest:!1,vertexShader:"\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n}",fragmentShader:"\n #define SAMPLES 16\n #define FSAMPLES 16.0\nuniform sampler2D sceneDiffuse;\nuniform highp sampler2D sceneNormal;\nuniform highp sampler2D sceneDepth;\nuniform mat4 projectionMatrixInv;\nuniform mat4 viewMatrixInv;\nuniform mat4 projMat;\nuniform mat4 viewMat;\nuniform mat4 projViewMat;\nuniform vec3 cameraPos;\nuniform vec2 resolution;\nuniform vec2 biasAdjustment;\nuniform float time;\nuniform vec3[SAMPLES] samples;\nuniform float radius;\nuniform float distanceFalloff;\nuniform float near;\nuniform float far;\nuniform float frame;\nuniform bool ortho;\nuniform bool screenSpaceRadius;\nuniform sampler2D bluenoise;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n /*return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);*/\n #ifdef ORTHO\n\n return linearize_depth_ortho(d, nearZ, farZ);\n\n #else\n return linearize_depth(linDepth, nearZ, farZ);\n #endif\n }\n\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n\n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n #ifdef REVERSEDEPTH\n float c0 = 1.0 - texelFetch(sceneDepth, p, 0).x;\n float l2 = 1.0 - texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = 1.0 - texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = 1.0 - texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = 1.0 - texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #else\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #endif\n\n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n\n vec3 ce = getWorldPos(c0, vUv).xyz;\n\n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n\n return normalize(cross(dpdx, dpdy));\n}\n\nmat3 makeRotationZ(float theta) {\n float c = cos(theta);\n float s = sin(theta);\n return mat3(c, - s, 0,\n s, c, 0,\n 0, 0, 1);\n }\n\nvoid main() {\n vec4 diffuse = texture2D(sceneDiffuse, vUv);\n #ifdef REVERSEDEPTH\n float depth = 1.0 - texture2D(sceneDepth, vUv).x;\n #else\n float depth = texture2D(sceneDepth, vUv).x;\n #endif\n if (depth == 1.0) {\n gl_FragColor = vec4(vec3(1.0), 1.0);\n return;\n }\n vec3 worldPos = getWorldPos(depth, vUv);\n #ifdef HALFRES\n vec3 normal = texture2D(sceneNormal, vUv).rgb;\n #else\n vec3 normal = computeNormal(worldPos, vUv);\n #endif\n vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0);\n vec2 harmoniousNumbers = vec2(\n 1.618033988749895,\n 1.324717957244746\n );\n noise.rg += harmoniousNumbers * frame;\n noise.rg = fract(noise.rg);\n vec3 helperVec = vec3(0.0, 1.0, 0.0);\n if (dot(helperVec, normal) > 0.99) {\n helperVec = vec3(1.0, 0.0, 0.0);\n }\n vec3 tangent = normalize(cross(helperVec, normal));\n vec3 bitangent = cross(normal, tangent);\n mediump mat3 tbn = mat3(tangent, bitangent, normal) * makeRotationZ( noise.r * 3.1415962 * 2.0) ;\n\n mediump float occluded = 0.0;\n mediump float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : radiusToUse * distanceFalloff * 0.2;\n float bias = (min(\n 0.1,\n distanceFalloffToUse * 0.1\n ) / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse;\n bias = biasAdjustment.x + biasAdjustment.y * bias;\n mediump float offsetMove = noise.g;\n mediump float offsetMoveInv = 1.0 / FSAMPLES;\n float farTimesNear = far * near;\n float farMinusNear = far - near;\n \n for(int i = 0; i < SAMPLES; i++) {\n mediump vec3 sampleDirection = tbn * samples[i];\n\n float moveAmt = fract(offsetMove);\n offsetMove += offsetMoveInv;\n vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection;\n vec4 offset = projMat * vec4(samplePos, 1.0);\n offset.xyz /= offset.w;\n offset.xyz = offset.xyz * 0.5 + 0.5;\n \n if (all(greaterThan(offset.xyz * (1.0 - offset.xyz), vec3(0.0)))) {\n #ifdef REVERSEDEPTH\n float sampleDepth = 1.0 - textureLod(sceneDepth, offset.xy, 0.0).x;\n #else\n float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x;\n #endif\n\n /*#ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n #ifdef ORTHO\n float distSample = near + farMinusNear * sampleDepth;\n #else\n float distSample = (farTimesNear) / (far - sampleDepth * farMinusNear);\n #endif\n #endif*/\n #ifdef ORTHO\n float distSample = near + sampleDepth * farMinusNear;\n #else\n #ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n float distSample = (farTimesNear) / (far - sampleDepth * farMinusNear);\n #endif\n #endif\n \n #ifdef ORTHO\n float distWorld = near + offset.z * farMinusNear;\n #else\n float distWorld = (farTimesNear) / (far - offset.z * farMinusNear);\n #endif\n \n mediump float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld)));\n vec2 diff = gl_FragCoord.xy - floor(offset.xy * resolution);\n occluded += rangeCheck * float(distSample != distWorld) * float(sampleDepth != depth) * step(distSample + bias, distWorld) * step(\n 1.0,\n dot(diff, diff)\n );\n \n totalWeight ++;\n }\n }\n float occ = clamp(1.0 - occluded / (totalWeight == 0.0 ? 1.0 : totalWeight), 0.0, 1.0);\n gl_FragColor = vec4(occ, 0.5 + 0.5 * normal);\n}"},rG={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},transparencyDWFalse:{value:null},transparencyDWTrue:{value:null},transparencyDWTrueDepth:{value:null},transparencyAware:{value:!1},projMat:{value:new rM.Matrix4},viewMat:{value:new rM.Matrix4},projectionMatrixInv:{value:new rM.Matrix4},viewMatrixInv:{value:new rM.Matrix4},cameraPos:{value:new rM.Vector3},resolution:{value:new rM.Vector2},color:{value:new rM.Vector3(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0},aoTones:{value:0}},depthWrite:!1,depthTest:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform highp sampler2D downsampledDepth;\n uniform highp sampler2D transparencyDWFalse;\n uniform highp sampler2D transparencyDWTrue;\n uniform highp sampler2D transparencyDWTrueDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform vec2 resolution;\n uniform vec3 color;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform float intensity;\n uniform float renderMode;\n uniform float near;\n uniform float far;\n uniform float aoTones;\n uniform bool gammaCorrection;\n uniform bool ortho;\n uniform bool screenSpaceRadius;\n uniform bool fog;\n uniform bool fogExp;\n uniform bool colorMultiply;\n uniform bool transparencyAware;\n uniform float fogDensity;\n uniform float fogNear;\n uniform float fogFar;\n uniform float radius;\n uniform float distanceFalloff;\n uniform vec3 cameraPos;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n // }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n #ifdef REVERSEDEPTH\n float c0 = 1.0 - texelFetch(sceneDepth, p, 0).x;\n float l2 = 1.0 - texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = 1.0 - texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = 1.0 - texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = 1.0 - texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #else\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #endif\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n\n #include \n #include \n void main() {\n //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0);\n vec4 sceneTexel = texture2D(sceneDiffuse, vUv);\n #ifdef REVERSEDEPTH\n float depth = 1.0 - texture2D(sceneDepth, vUv).x;\n #else\n float depth = texture2D(sceneDepth, vUv).x;\n #endif\n #ifdef HALFRES \n vec4 texel;\n if (depth == 1.0) {\n texel = vec4(0.0, 0.0, 0.0, 1.0);\n } else {\n vec3 worldPos = getWorldPos(depth, vUv);\n vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv);\n // vec4 texel = texture2D(tDiffuse, vUv);\n // Find closest depth;\n float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n for(float x = -1.0; x <= 1.0; x++) {\n for(float y = -1.0; y <= 1.0; y++) {\n vec2 offset = vec2(x, y);\n ivec2 p = ivec2(\n (vUv * resolution * 0.5) + offset\n );\n vec2 pUv = vec2(p) / (resolution * 0.5);\n float sampleDepth = texelFetch(downsampledDepth,p, 0).x;\n vec4 sampleInfo = texelFetch(tDiffuse, p, 0);\n vec3 normalSample = sampleInfo.gba * 2.0 - 1.0;\n vec3 worldPosSample = getWorldPos(sampleDepth, pUv);\n float tangentPlaneDist = abs(dot(worldPosSample - worldPos, normal));\n float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0);\n float weight = rangeCheck;\n totalWeight += weight;\n texel += sampleInfo * weight;\n }\n }\n if (totalWeight == 0.0) {\n texel = texture2D(tDiffuse, vUv);\n } else {\n texel /= totalWeight;\n }\n }\n #else\n vec4 texel = texture2D(tDiffuse, vUv);\n #endif\n\n #ifdef LOGDEPTH\n texel.r = clamp(texel.r, 0.0, 1.0);\n if (texel.r == 0.0) {\n texel.r = 1.0;\n }\n #endif\n \n float finalAo = pow(texel.r, intensity);\n if (aoTones > 0.0) {\n finalAo = ceil(finalAo * aoTones) / aoTones;\n }\n float fogFactor;\n float fogDepth = distance(\n cameraPos,\n getWorldPos(depth, vUv)\n );\n if (fog) {\n if (fogExp) {\n fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n } else {\n fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n }\n }\n if (transparencyAware) {\n float transparencyDWOff = texture2D(transparencyDWFalse, vUv).a;\n float transparencyDWOn = texture2D(transparencyDWTrue, vUv).a;\n float adjustmentFactorOff = transparencyDWOff;\n #ifdef REVERSEDEPTH\n float depthSample = 1.0 - texture2D(sceneDepth, vUv).r;\n float trueDepthSample = 1.0 - texture2D(transparencyDWTrueDepth, vUv).r;\n #else\n float depthSample = texture2D(sceneDepth, vUv).r;\n float trueDepthSample = texture2D(transparencyDWTrueDepth, vUv).r;\n #endif\n float adjustmentFactorOn = (1.0 - transparencyDWOn) * (\n trueDepthSample == depthSample ? 1.0 : 0.0\n );\n float adjustmentFactor = max(adjustmentFactorOff, adjustmentFactorOn);\n finalAo = mix(finalAo, 1.0, adjustmentFactor);\n }\n finalAo = mix(finalAo, 1.0, fogFactor);\n vec3 aoApplied = color * mix(vec3(1.0), sceneTexel.rgb, float(colorMultiply));\n if (renderMode == 0.0) {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 1.0) {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 2.0) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (renderMode == 3.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n } else if (renderMode == 4.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n }\n #include \n if (gammaCorrection) {\n gl_FragColor = sRGBTransferOETF(gl_FragColor);\n }\n }\n "},rO={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new rM.Matrix4},viewMat:{value:new rM.Matrix4},projectionMatrixInv:{value:new rM.Matrix4},viewMatrixInv:{value:new rM.Matrix4},cameraPos:{value:new rM.Vector3},resolution:{value:new rM.Vector2},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1.0);\n }",fragmentShader:"\n uniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform vec2 resolution;\n uniform float r;\n uniform float radius;\n uniform float worldRadius;\n uniform float index;\n uniform float near;\n uniform float far;\n uniform float distanceFalloff;\n uniform bool screenSpaceRadius;\n varying vec2 vUv;\n\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n highp float z_n = 2.0 * d - 1.0;\n return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear));\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return linearize_depth(linDepth, nearZ, farZ);\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n \n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n #include \n #define NUM_SAMPLES 16\n uniform vec2 poissonDisk[NUM_SAMPLES];\n void main() {\n const float pi = 3.14159;\n vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec2 uv = vUv;\n vec4 data = texture2D(tDiffuse, vUv);\n float occlusion = data.r;\n float baseOcc = data.r;\n vec3 normal = data.gba * 2.0 - 1.0;\n float count = 1.0;\n float d = texture2D(sceneDepth, vUv).x;\n if (d == 1.0) {\n gl_FragColor = data;\n return;\n }\n vec3 worldPos = getWorldPos(d, vUv);\n float size = radius;\n float angle;\n if (index == 0.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2;\n } else if (index == 1.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2;\n } else if (index == 2.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2;\n } else {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2;\n }\n\n mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(d, vUv +\n vec2(worldRadius, 0.0) / resolution)\n ) : worldRadius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : radiusToUse * distanceFalloff * 0.2;\n\n float invDistance = (1.0 / distanceFalloffToUse);\n for(int i = 0; i < NUM_SAMPLES; i++) {\n vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size;\n vec4 dataSample = texture2D(tDiffuse, uv + offset);\n float occSample = dataSample.r;\n vec3 normalSample = dataSample.gba * 2.0 - 1.0;\n float dSample = texture2D(sceneDepth, uv + offset).x;\n vec3 worldPosSample = getWorldPos(dSample, uv + offset);\n float tangentPlaneDist = abs(dot(worldPosSample - worldPos, normal));\n float rangeCheck = float(dSample != 1.0) * exp(-1.0 * tangentPlaneDist * invDistance ) * max(dot(normal, normalSample), 0.0);\n occlusion += occSample * rangeCheck;\n count += rangeCheck;\n }\n if (count > 0.0) {\n occlusion /= count;\n }\n occlusion = clamp(occlusion, 0.0, 1.0);\n if (occlusion == 0.0) {\n occlusion = 1.0;\n }\n gl_FragColor = vec4(occlusion, 0.5 + 0.5 * normal);\n }\n "},rH={uniforms:{sceneDepth:{value:null},resolution:{value:new rM.Vector2},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new rM.Matrix4},projectionMatrixInv:{value:new rM.Matrix4},logDepth:{value:!1},ortho:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform highp sampler2D sceneDepth;\n uniform vec2 resolution;\n uniform float near;\n uniform float far;\n uniform bool logDepth;\n uniform bool ortho;\n uniform mat4 viewMatrixInv;\n uniform mat4 projectionMatrixInv;\n varying vec2 vUv;\n layout(location = 1) out vec4 gNormal;\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n if (logDepth && !ortho) {\n return getWorldPosLog(vec3(coord, depth));\n }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n #ifdef REVERSEDEPTH\n float c0 = 1.0 - texelFetch(sceneDepth, p, 0).x;\n float l2 = 1.0 - texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = 1.0 - texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = 1.0 - texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = 1.0 - texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #else\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #endif\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n void main() {\n vec2 uv = vUv - vec2(0.5) / resolution;\n vec2 pixelSize = vec2(1.0) / resolution;\n highp vec2[4] uvSamples;\n uvSamples[0] = uv;\n uvSamples[1] = uv + vec2(pixelSize.x, 0.0);\n uvSamples[2] = uv + vec2(0.0, pixelSize.y);\n uvSamples[3] = uv + pixelSize;\n #ifdef REVERSEDEPTH\n float depth00 = 1.0 - texture2D(sceneDepth, uvSamples[0]).r;\n float depth10 = 1.0 - texture2D(sceneDepth, uvSamples[1]).r;\n float depth01 = 1.0 - texture2D(sceneDepth, uvSamples[2]).r;\n float depth11 = 1.0 - texture2D(sceneDepth, uvSamples[3]).r;\n #else\n float depth00 = texture2D(sceneDepth, uvSamples[0]).r;\n float depth10 = texture2D(sceneDepth, uvSamples[1]).r;\n float depth01 = texture2D(sceneDepth, uvSamples[2]).r;\n float depth11 = texture2D(sceneDepth, uvSamples[3]).r;\n #endif\n float minDepth = min(min(depth00, depth10), min(depth01, depth11));\n float maxDepth = max(max(depth00, depth10), max(depth01, depth11));\n float targetDepth = minDepth;\n // Checkerboard pattern to avoid artifacts\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { \n targetDepth = maxDepth;\n }\n int chosenIndex = 0;\n float[4] samples;\n samples[0] = depth00;\n samples[1] = depth10;\n samples[2] = depth01;\n samples[3] = depth11;\n for(int i = 0; i < 4; ++i) {\n if (samples[i] == targetDepth) {\n chosenIndex = i;\n break;\n }\n }\n gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0);\n gNormal = vec4(computeNormal(\n getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex]\n ), 0.0);\n }"},rN=Uint8Array.from(atob("5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl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wp6qkIOsSx7Y67BSCbCDVLM8/VcMG+T0j+INrgL9sfT1ICtACH8BI0G6ViUZPVzzCmQHW2oVIwZjAoFl6+meO/pD8teO1E+1y03mCpYfW9S8qhtH2GhlFlebPf4NbezVv9xbXKWz0xezRNQWqUqtYRTUbuzK7KTvjG4rQHfzBpVmK4wDLnSIwdSzTSk1fPNeY0WOpPZTLlvQ59xwgfFrb326vT2hS1JAZ9E6sujFtKTiJ7bxI6o4cBhDaX+adXREThhR+MwA4TqD7rga/o9iY7d6TVRe14CS2S3iSQsD0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw=="),e=>e.charCodeAt(0)),rk=parseInt(rM.REVISION.replace(/\D+/g,""))>=162?class extends rM.WebGLRenderTarget{get texture(){return this.textures}constructor(e=1,t=1,r=1,n={}){super(e,t,{...n,count:r}),this.isWebGLMultipleRenderTargets=!0}}:class extends rM.WebGLRenderTarget{setSize(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this.width!==e||this.height!==t||this.depth!==r){this.width=e,this.height=t,this.depth=r;for(let n=0,i=this.texture.length;n{t.material&&t.material.transparent&&(e=!0)}),e&&(this.configuration.transparencyAware=!0)}}configureTransparencyTarget(){this.configuration.transparencyAware?(this.transparencyRenderTargetDWFalse=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.NearestFilter,type:rM.HalfFloatType,format:rM.RGBAFormat}),this.transparencyRenderTargetDWTrue=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.NearestFilter,type:rM.HalfFloatType,format:rM.RGBAFormat}),this.transparencyRenderTargetDWTrue.depthTexture=new rM.DepthTexture(this.width,this.height,rM.UnsignedIntType),this.depthCopyPass=new rL(new rM.ShaderMaterial({uniforms:{depthTexture:{value:this.depthTexture},reverseDepthBuffer:{value:this.configuration.depthBufferType===rz.Reverse}},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D depthTexture;\n uniform bool reverseDepthBuffer;\n varying vec2 vUv;\n void main() {\n if (reverseDepthBuffer) {\n float d = 1.0 - texture2D(depthTexture, vUv).r;\n \n d += 0.00001;\n gl_FragDepth = 1.0 - d;\n } else {\n float d = texture2D(depthTexture, vUv).r;\n d += 0.00001;\n gl_FragDepth = d;\n }\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n "}))):(this.transparencyRenderTargetDWFalse&&(this.transparencyRenderTargetDWFalse.dispose(),this.transparencyRenderTargetDWFalse=null),this.transparencyRenderTargetDWTrue&&(this.transparencyRenderTargetDWTrue.dispose(),this.transparencyRenderTargetDWTrue=null),this.depthCopyPass&&(this.depthCopyPass.dispose(),this.depthCopyPass=null))}renderTransparency(e){let t=this.scene.background,r=e.getClearColor(new rM.Color),n=e.getClearAlpha(),i=new Map,a=e.autoClearDepth;this.scene.traverse(e=>{i.set(e,e.visible)}),this.scene.background=null,e.autoClearDepth=!1,e.setClearColor(new rM.Color(0,0,0),0),this.depthCopyPass.material.uniforms.depthTexture.value=this.depthTexture,this.depthCopyPass.material.uniforms.reverseDepthBuffer.value=this.configuration.depthBufferType===rz.Reverse,e.setRenderTarget(this.transparencyRenderTargetDWFalse),this.scene.traverse(e=>{e.material&&(e.visible=i.get(e)&&(e.material.transparent&&!e.material.depthWrite&&!e.userData.treatAsOpaque||!!e.userData.cannotReceiveAO))}),e.clear(!0,!0,!0),this.depthCopyPass.render(e),e.render(this.scene,this.camera),e.setRenderTarget(this.transparencyRenderTargetDWTrue),this.scene.traverse(e=>{e.material&&(e.visible=i.get(e)&&e.material.transparent&&e.material.depthWrite&&!e.userData.treatAsOpaque)}),e.clear(!0,!0,!0),this.depthCopyPass.render(e),e.render(this.scene,this.camera),this.scene.traverse(e=>{e.visible=i.get(e)}),e.setClearColor(r,n),this.scene.background=t,e.autoClearDepth=a}configureSampleDependentPasses(){this.configureAOPass(this.configuration.depthBufferType,this.camera.isOrthographicCamera),this.configureDenoisePass(this.configuration.depthBufferType,this.camera.isOrthographicCamera)}configureAOPass(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rz.Default,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.firstFrame(),this.samples=this.generateHemisphereSamples(this.configuration.aoSamples);let r={...rU};r.fragmentShader=r.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e===rz.Log?r.fragmentShader="#define LOGDEPTH\n"+r.fragmentShader:e===rz.Reverse&&(r.fragmentShader="#define REVERSEDEPTH\n"+r.fragmentShader),t&&(r.fragmentShader="#define ORTHO\n"+r.fragmentShader),this.configuration.halfRes&&(r.fragmentShader="#define HALFRES\n"+r.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new rM.ShaderMaterial(r)):this.effectShaderQuad=new rL(new rM.ShaderMaterial(r))}configureDenoisePass(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rz.Default,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.firstFrame(),this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);let r={...rO};r.fragmentShader=r.fragmentShader.replace("16",this.configuration.denoiseSamples),e===rz.Log?r.fragmentShader="#define LOGDEPTH\n"+r.fragmentShader:e===rz.Reverse&&(r.fragmentShader="#define REVERSEDEPTH\n"+r.fragmentShader),t&&(r.fragmentShader="#define ORTHO\n"+r.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new rM.ShaderMaterial(r)):this.poissonBlurQuad=new rL(new rM.ShaderMaterial(r))}configureEffectCompositer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rz.Default,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.firstFrame();let r={...rG};e===rz.Log?r.fragmentShader="#define LOGDEPTH\n"+r.fragmentShader:e===rz.Reverse&&(r.fragmentShader="#define REVERSEDEPTH\n"+r.fragmentShader),t&&(r.fragmentShader="#define ORTHO\n"+r.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(r.fragmentShader="#define HALFRES\n"+r.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new rM.ShaderMaterial(r)):this.effectCompositerQuad=new rL(new rM.ShaderMaterial(r))}generateHemisphereSamples(e){let t=[];for(let r=0;r{e(t,r,n)},1)}(a,n,this)),e.xr.enabled=s}enableDebugMode(){this.debugMode=!0}disableDebugMode(){this.debugMode=!1}setDisplayMode(e){this.configuration.renderMode=["Combined","AO","No AO","Split","Split AO"].indexOf(e)}setQualityMode(e){"Performance"===e?(this.configuration.aoSamples=8,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):"Low"===e?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):"Medium"===e?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=12):"High"===e?(this.configuration.aoSamples=64,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=6):"Ultra"===e&&(this.configuration.aoSamples=64,this.configuration.denoiseSamples=16,this.configuration.denoiseRadius=6)}constructor(e,t,r=512,n=512){super(),this.width=r,this.height=n,this.clear=!0,this.camera=t,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,aoTones:0,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,biasOffset:0,biasMultiplier:0,color:new rM.Color(0,0,0),gammaCorrection:!0,depthBufferType:rz.Default,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0,transparencyAware:!1,accumulate:!1},{set:(e,t,r)=>{let n=e[t];return e[t]=r,r.equals?r.equals(n)||this.firstFrame():n!==r&&this.firstFrame(),"aoSamples"===t&&n!==r&&this.configureAOPass(this.configuration.depthBufferType,this.camera.isOrthographicCamera),"denoiseSamples"===t&&n!==r&&this.configureDenoisePass(this.configuration.depthBufferType,this.camera.isOrthographicCamera),"halfRes"===t&&n!==r&&(this.configureAOPass(this.configuration.depthBufferType,this.camera.isOrthographicCamera),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.depthBufferType,this.camera.isOrthographicCamera),this.setSize(this.width,this.height)),"depthAwareUpsampling"===t&&n!==r&&this.configureEffectCompositer(this.configuration.depthBufferType,this.camera.isOrthographicCamera),"gammaCorrection"===t&&(this.autosetGamma=!1),"transparencyAware"===t&&n!==r&&(this.autoDetectTransparency=!1,this.configureTransparencyTarget()),!0}}),this.samples=[],this.samplesDenoise=[],this.autoDetectTransparency=!0,this.frames=0,this.lastViewMatrix=new rM.Matrix4,this.lastProjectionMatrix=new rM.Matrix4,this.configureEffectCompositer(this.configuration.depthBufferType),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.detectTransparency(),this.configureTransparencyTarget(),this.copyQuad=new rL(new rM.ShaderMaterial({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n void main() {\n gl_FragColor = texture2D(tDiffuse, vUv);\n }\n "})),this.writeTargetInternal=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.LinearFilter,depthBuffer:!1,format:rM.RGBAFormat}),this.readTargetInternal=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.LinearFilter,depthBuffer:!1,format:rM.RGBAFormat}),this.outputTargetInternal=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.LinearFilter,depthBuffer:!1}),this.accumulationRenderTarget=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.LinearFilter,depthBuffer:!1,format:rM.RGBAFormat,type:rM.HalfFloatType,stencilBuffer:!1,depthBuffer:!1,alpha:!0}),this.accumulationQuad=new rL(new rM.ShaderMaterial({uniforms:{frame:{value:0},tDiffuse:{value:null}},transparent:!0,opacity:1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float frame;\n varying vec2 vUv;\n void main() {\n vec4 color = texture2D(tDiffuse, vUv);\n gl_FragColor = vec4(color.rgb, 1.0 / (frame + 1.0));\n }\n "})),this.bluenoise=new rM.DataTexture(rN,128,128),this.bluenoise.colorSpace=rM.NoColorSpace,this.bluenoise.wrapS=rM.RepeatWrapping,this.bluenoise.wrapT=rM.RepeatWrapping,this.bluenoise.minFilter=rM.NearestFilter,this.bluenoise.magFilter=rM.NearestFilter,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.timeRollingAverage=.99,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new rM.Vector2,this._c=new rM.Color}}let rz={Default:1,Log:2,Reverse:3},rK=(0,eG.createContext)(null),rJ=e=>(2&e.getAttributes())==2,rV=(0,eG.memo)((0,eG.forwardRef)((e,t)=>{let{children:r,camera:n,scene:i,resolutionScale:a,enabled:s=!0,renderPriority:o=1,autoClear:l=!0,depthBuffer:u,enableNormalPass:c,stencilBuffer:d,multisampling:f=8,frameBufferType:h=ek.HalfFloatType}=e,{gl:p,scene:m,camera:g,size:A}=(0,eW.useThree)(),y=i||m,x=n||g,[B,C,S]=(0,eG.useMemo)(()=>{let e=new e5(p,{depthBuffer:u,stencilBuffer:d,multisampling:f,frameBufferType:h});e.addPass(new tb(y,x));let t=null,r=null;return c&&((r=new t3(y,x)).enabled=!1,e.addPass(r),void 0!==a&&((t=new tX({normalBuffer:r.texture,resolutionScale:a})).enabled=!1,e.addPass(t))),[e,r,t]},[x,p,u,d,f,h,y,c,a]);(0,eG.useEffect)(()=>null==B?void 0:B.setSize(A.width,A.height),[B,A]),(0,eX.useFrame)((e,t)=>{if(s){let e=p.autoClear;p.autoClear=l,d&&!l&&p.clearStencil(),B.render(t),p.autoClear=e}},s?o:0);let E=(0,eG.useRef)(null);(0,eG.useLayoutEffect)(()=>{let e=[],t=E.current.__r3f;if(t&&B){let n=t.children;for(let t=0;t{for(let t of e)null==B||B.removePass(t);C&&(C.enabled=!1),S&&(S.enabled=!1)}},[B,r,x,C,S]),(0,eG.useEffect)(()=>{let e=p.toneMapping;return p.toneMapping=ek.NoToneMapping,()=>{p.toneMapping=e}},[p]);let T=(0,eG.useMemo)(()=>({composer:B,normalPass:C,downSamplingPass:S,resolutionScale:a,camera:x,scene:y}),[B,C,S,a,x,y]);return(0,eG.useImperativeHandle)(t,()=>B,[B]),(0,eU.jsx)(rK.Provider,{value:T,children:(0,eU.jsx)("group",{ref:E,children:r})})}));var rQ=(e=>(e[e.Linear=0]="Linear",e[e.Radial=1]="Radial",e[e.MirroredLinear=2]="MirroredLinear",e))(rQ||{});let rW=(0,eG.forwardRef)((e,t)=>{let{halfRes:r,screenSpaceRadius:n,quality:i,depthAwareUpsampling:a=!0,aoRadius:s=5,aoSamples:o=16,denoiseSamples:l=4,denoiseRadius:u=12,distanceFalloff:c=1,intensity:d=1,color:f,renderMode:h=0}=e,{camera:p,scene:m}=(0,eW.useThree)(),g=(0,eG.useMemo)(()=>new rj(m,p),[p,m]);return(0,eG.useLayoutEffect)(()=>{(0,eH.s)(g.configuration,{color:f,aoRadius:s,distanceFalloff:c,intensity:d,aoSamples:o,denoiseSamples:l,denoiseRadius:u,screenSpaceRadius:n,renderMode:h,halfRes:r,depthAwareUpsampling:a})},[n,f,s,c,d,o,l,u,h,r,a,g]),(0,eG.useLayoutEffect)(()=>{i&&g.setQualityMode(i.charAt(0).toUpperCase()+i.slice(1))},[g,i]),(0,eU.jsx)("primitive",{ref:t,object:g})});function rX(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function r_(e,t){var r=rX(e,t,"get");return r.get?r.get.call(e):r.value}function rZ(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function rY(e,t,r){rZ(e,t),t.set(e,r)}function rq(e,t,r){var n=rX(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function r$(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}function r0(e,t){rZ(e,t),t.add(e)}var r1=class{subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}};e.i(47167);var r2={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r9=new(R=new WeakMap,I=new WeakMap,class{setTimeoutProvider(e){rq(this,R,e)}setTimeout(e,t){return r_(this,R).setTimeout(e,t)}clearTimeout(e){r_(this,R).clearTimeout(e)}setInterval(e,t){return r_(this,R).setInterval(e,t)}clearInterval(e){r_(this,R).clearInterval(e)}constructor(){rY(this,R,{writable:!0,value:r2}),rY(this,I,{writable:!0,value:!1})}}),r3="undefined"==typeof window||"Deno"in globalThis;function r4(){}function r8(e){return"number"==typeof e&&e>=0&&e!==1/0}function r5(e,t){return Math.max(e+(t||0)-Date.now(),0)}function r6(e,t){return"function"==typeof e?e(t):e}function r7(e,t){return"function"==typeof e?e(t):e}function ne(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==nr(s,t.options))return!1}else if(!ni(t.queryKey,s))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!a||!!a(t))}function nt(e,t){let{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(nn(t.options.mutationKey)!==nn(a))return!1}else if(!ni(t.options.mutationKey,a))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))}function nr(e,t){return((null==t?void 0:t.queryKeyHashFn)||nn)(e)}function nn(e){return JSON.stringify(e,(e,t)=>nl(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function ni(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>ni(e[r],t[r]))}var na=Object.prototype.hasOwnProperty;function ns(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function no(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nl(e){if(!nu(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!nu(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function nu(e){return"[object Object]"===Object.prototype.toString.call(e)}function nc(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let n=no(t)&&no(r);if(!n&&!(nl(t)&&nl(r)))return r;let i=(n?t:Object.keys(t)).length,a=n?r:Object.keys(r),s=a.length,o=n?Array(s):{},l=0;for(let u=0;u2&&void 0!==arguments[2]?arguments[2]:0,n=[...e,t];return r&&n.length>r?n.slice(1):n}function nf(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var nh=Symbol();function np(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==nh?e.queryFn:()=>Promise.reject(Error("Missing queryFn: '".concat(e.queryHash,"'")))}var nm=new(P=new WeakMap,L=new WeakMap,U=new WeakMap,class extends r1{onSubscribe(){r_(this,L)||this.setEventListener(r_(this,U))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=r_(this,L))||e.call(this),rq(this,L,void 0))}setEventListener(e){var t;rq(this,U,e),null==(t=r_(this,L))||t.call(this),rq(this,L,e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){r_(this,P)!==e&&(rq(this,P,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return"boolean"==typeof r_(this,P)?r_(this,P):(null==(e=globalThis.document)?void 0:e.visibilityState)!=="hidden"}constructor(){super(),rY(this,P,{writable:!0,value:void 0}),rY(this,L,{writable:!0,value:void 0}),rY(this,U,{writable:!0,value:void 0}),rq(this,U,e=>{if(!r3&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}}),nv=function(e){setTimeout(e,0)},ng=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=nv,a=n=>{t?e.push(n):i(()=>{r(n)})};return{batch:a=>{let s;t++;try{s=a()}finally{--t||(()=>{let t=e;e=[],t.length&&i(()=>{n(()=>{t.forEach(e=>{r(e)})})})})()}return s},batchCalls:e=>function(){for(var t=arguments.length,r=Array(t),n=0;n{e(...r)})},schedule:a,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}(),nA=new(G=new WeakMap,O=new WeakMap,H=new WeakMap,class extends r1{onSubscribe(){r_(this,O)||this.setEventListener(r_(this,H))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=r_(this,O))||e.call(this),rq(this,O,void 0))}setEventListener(e){var t;rq(this,H,e),null==(t=r_(this,O))||t.call(this),rq(this,O,e(this.setOnline.bind(this)))}setOnline(e){r_(this,G)!==e&&(rq(this,G,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return r_(this,G)}constructor(){super(),rY(this,G,{writable:!0,value:!0}),rY(this,O,{writable:!0,value:void 0}),rY(this,H,{writable:!0,value:void 0}),rq(this,H,e=>{if(!r3&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}});function ny(){let e,t,r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function nx(e){return Math.min(1e3*2**e,3e4)}function nB(e){return(null!=e?e:"online")!=="online"||nA.isOnline()}var nC=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function nS(e){let t,r=!1,n=0,i=ny(),a=()=>nm.isFocused()&&("always"===e.networkMode||nA.isOnline())&&e.canRun(),s=()=>nB(e.networkMode)&&e.canRun(),o=e=>{"pending"===i.status&&(null==t||t(),i.resolve(e))},l=e=>{"pending"===i.status&&(null==t||t(),i.reject(e))},u=()=>new Promise(r=>{var n;t=e=>{("pending"!==i.status||a())&&r(e)},null==(n=e.onPause)||n.call(e)}).then(()=>{if(t=void 0,"pending"===i.status){var r;null==(r=e.onContinue)||r.call(e)}}),c=()=>{let t;if("pending"!==i.status)return;let s=0===n?e.initialPromise:void 0;try{t=null!=s?s:e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(o).catch(t=>{var s,o,d;if("pending"!==i.status)return;let f=null!=(o=e.retry)?o:3*!r3,h=null!=(d=e.retryDelay)?d:nx,p="function"==typeof h?h(n,t):h,m=!0===f||"number"==typeof f&&n{r9.setTimeout(e,p)}).then(()=>a()?void 0:u()).then(()=>{r?l(t):c()})})};return{promise:i,status:()=>i.status,cancel:t=>{if("pending"===i.status){var r;let n=new nC(t);l(n),null==(r=e.onCancel)||r.call(e,n)}},continue:()=>(null==t||t(),i),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:s,start:()=>(s()?c():u().then(c),i)}}var nE=(N=new WeakMap,class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),r8(this.gcTime)&&rq(this,N,r9.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!=e?e:r3?1/0:3e5)}clearGcTimeout(){r_(this,N)&&(r9.clearTimeout(r_(this,N)),rq(this,N,void 0))}constructor(){rY(this,N,{writable:!0,value:void 0})}}),nT=(k=new WeakMap,j=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,V=new WeakMap,Q=new WeakMap,W=new WeakSet,class extends nE{get meta(){return this.options.meta}get promise(){var e;return null==(e=r_(this,J))?void 0:e.promise}setOptions(e){if(this.options={...r_(this,V),...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=nM(this.options);void 0!==e.data&&(this.setState(nb(e.data,e.dataUpdatedAt)),rq(this,k,e))}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||r_(this,z).remove(this)}setData(e,t){let r=nc(this.state.data,e,this.options);return r$(this,W,nw).call(this,{data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){r$(this,W,nw).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,r;let n=null==(t=r_(this,J))?void 0:t.promise;return null==(r=r_(this,J))||r.cancel(e),n?n.then(r4).catch(r4):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(r_(this,k))}isActive(){return this.observers.some(e=>!1!==r7(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===r6(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!r5(this.state.dataUpdatedAt,e))}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());null==t||t.refetch({cancelRefetch:!1}),null==(e=r_(this,J))||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());null==t||t.refetch({cancelRefetch:!1}),null==(e=r_(this,J))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),r_(this,z).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(r_(this,J)&&(r_(this,Q)?r_(this,J).cancel({revert:!0}):r_(this,J).cancelRetry()),this.scheduleGc()),r_(this,z).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||r$(this,W,nw).call(this,{type:"invalidate"})}async fetch(e,t){var r,n,i,a,s,o,l,u,c,d,f,h;if("idle"!==this.state.fetchStatus&&(null==(r=r_(this,J))?void 0:r.status())!=="rejected"){if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(r_(this,J))return r_(this,J).continueRetry(),r_(this,J).promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let p=new AbortController,m=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(rq(this,Q,!0),p.signal)})},g=()=>{let e=np(this.options,t),r=(()=>{let e={client:r_(this,K),queryKey:this.queryKey,meta:this.meta};return m(e),e})();return(rq(this,Q,!1),this.options.persister)?this.options.persister(e,r,this):e(r)},A=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:r_(this,K),state:this.state,fetchFn:g};return m(e),e})();null==(n=this.options.behavior)||n.onFetch(A,this),rq(this,j,this.state),("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(i=A.fetchOptions)?void 0:i.meta))&&r$(this,W,nw).call(this,{type:"fetch",meta:null==(a=A.fetchOptions)?void 0:a.meta}),rq(this,J,nS({initialPromise:null==t?void 0:t.initialPromise,fn:A.fetchFn,onCancel:e=>{e instanceof nC&&e.revert&&this.setState({...r_(this,j),fetchStatus:"idle"}),p.abort()},onFail:(e,t)=>{r$(this,W,nw).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{r$(this,W,nw).call(this,{type:"pause"})},onContinue:()=>{r$(this,W,nw).call(this,{type:"continue"})},retry:A.options.retry,retryDelay:A.options.retryDelay,networkMode:A.options.networkMode,canRun:()=>!0}));try{let e=await r_(this,J).start();if(void 0===e)throw Error("".concat(this.queryHash," data is undefined"));return this.setData(e),null==(s=(o=r_(this,z).config).onSuccess)||s.call(o,e,this),null==(l=(u=r_(this,z).config).onSettled)||l.call(u,e,this.state.error,this),e}catch(e){if(e instanceof nC){if(e.silent)return r_(this,J).promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw r$(this,W,nw).call(this,{type:"error",error:e}),null==(c=(d=r_(this,z).config).onError)||c.call(d,e,this),null==(f=(h=r_(this,z).config).onSettled)||f.call(h,this.state.data,e,this),e}finally{this.scheduleGc()}}constructor(e){var t;super(),r0(this,W),rY(this,k,{writable:!0,value:void 0}),rY(this,j,{writable:!0,value:void 0}),rY(this,z,{writable:!0,value:void 0}),rY(this,K,{writable:!0,value:void 0}),rY(this,J,{writable:!0,value:void 0}),rY(this,V,{writable:!0,value:void 0}),rY(this,Q,{writable:!0,value:void 0}),rq(this,Q,!1),rq(this,V,e.defaultOptions),this.setOptions(e.options),this.observers=[],rq(this,K,e.client),rq(this,z,r_(this,K).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,rq(this,k,nM(this.options)),this.state=null!=(t=e.state)?t:r_(this,k),this.scheduleGc()}});function nD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nB(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function nb(e,t){return{data:e,dataUpdatedAt:null!=t?t:Date.now(),error:null,isInvalidated:!1,status:"success"}}function nM(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function nw(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var r;return{...t,...nD(t.data,this.options),fetchMeta:null!=(r=e.meta)?r:null};case"success":let n={...t,...nb(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return rq(this,j,e.manual?n:void 0),n;case"error":let i=e.error;return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),ng.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),r_(this,z).notify({query:this,type:"updated",action:e})})}var nF=(X=new WeakMap,_=new WeakMap,Z=new WeakMap,Y=new WeakMap,q=new WeakMap,$=new WeakMap,ee=new WeakMap,et=new WeakMap,er=new WeakMap,en=new WeakMap,ei=new WeakMap,ea=new WeakMap,es=new WeakMap,eo=new WeakMap,el=new WeakMap,eu=new WeakSet,ec=new WeakSet,ed=new WeakSet,ef=new WeakSet,eh=new WeakSet,ep=new WeakSet,em=new WeakSet,ev=new WeakSet,eg=new WeakSet,class extends r1{bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(r_(this,_).addObserver(this),nR(r_(this,_),this.options)?r$(this,eu,nU).call(this):this.updateResult(),r$(this,eh,nN).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return nI(r_(this,_),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return nI(r_(this,_),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,r$(this,ep,nk).call(this),r$(this,em,nj).call(this),r_(this,_).removeObserver(this)}setOptions(e){let t=this.options,r=r_(this,_);if(this.options=r_(this,X).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof r7(this.options.enabled,r_(this,_)))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");r$(this,ev,nz).call(this),r_(this,_).setOptions(this.options),t._defaulted&&!ns(this.options,t)&&r_(this,X).getQueryCache().notify({type:"observerOptionsUpdated",query:r_(this,_),observer:this});let n=this.hasListeners();n&&nP(r_(this,_),r,this.options,t)&&r$(this,eu,nU).call(this),this.updateResult(),n&&(r_(this,_)!==r||r7(this.options.enabled,r_(this,_))!==r7(t.enabled,r_(this,_))||r6(this.options.staleTime,r_(this,_))!==r6(t.staleTime,r_(this,_)))&&r$(this,ec,nG).call(this);let i=r$(this,ed,nO).call(this);n&&(r_(this,_)!==r||r7(this.options.enabled,r_(this,_))!==r7(t.enabled,r_(this,_))||i!==r_(this,eo))&&r$(this,ef,nH).call(this,i)}getOptimisticResult(e){var t,r;let n=r_(this,X).getQueryCache().build(r_(this,X),e),i=this.createResult(n,e);return t=this,r=i,ns(t.getCurrentResult(),r)||(rq(this,Y,i),rq(this,$,this.options),rq(this,q,r_(this,_).state)),i}getCurrentResult(){return r_(this,Y)}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),null==t||t(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==r_(this,ee).status||r_(this,ee).reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){r_(this,el).add(e)}getCurrentQuery(){return r_(this,_)}refetch(){let{...e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.fetch({...e})}fetchOptimistic(e){let t=r_(this,X).defaultQueryOptions(e),r=r_(this,X).getQueryCache().build(r_(this,X),t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){var t;return r$(this,eu,nU).call(this,{...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then(()=>(this.updateResult(),r_(this,Y)))}createResult(e,t){let r,n=r_(this,_),i=this.options,a=r_(this,Y),s=r_(this,q),o=r_(this,$),l=e!==n?e.state:r_(this,Z),{state:u}=e,c={...u},d=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&nR(e,t),s=r&&nP(e,n,t,i);(a||s)&&(c={...c,...nD(u.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:f,errorUpdatedAt:h,status:p}=c;r=c.data;let m=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===p){let e;if((null==a?void 0:a.isPlaceholderData)&&t.placeholderData===(null==o?void 0:o.placeholderData))e=a.data,m=!0;else{var g;e="function"==typeof t.placeholderData?t.placeholderData(null==(g=r_(this,ei))?void 0:g.state.data,r_(this,ei)):t.placeholderData}void 0!==e&&(p="success",r=nc(null==a?void 0:a.data,e,t),d=!0)}if(t.select&&void 0!==r&&!m)if(a&&r===(null==s?void 0:s.data)&&t.select===r_(this,er))r=r_(this,en);else try{rq(this,er,t.select),r=t.select(r),r=nc(null==a?void 0:a.data,r,t),rq(this,en,r),rq(this,et,null)}catch(e){rq(this,et,e)}r_(this,et)&&(f=r_(this,et),r=r_(this,en),h=Date.now(),p="error");let A="fetching"===c.fetchStatus,y="pending"===p,x="error"===p,B=y&&A,C=void 0!==r,S={status:p,fetchStatus:c.fetchStatus,isPending:y,isSuccess:"success"===p,isError:x,isInitialLoading:B,isLoading:B,data:r,dataUpdatedAt:c.dataUpdatedAt,error:f,errorUpdatedAt:h,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:A,isRefetching:A&&!y,isLoadingError:x&&!C,isPaused:"paused"===c.fetchStatus,isPlaceholderData:d,isRefetchError:x&&C,isStale:nL(e,t),refetch:this.refetch,promise:r_(this,ee),isEnabled:!1!==r7(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===S.status?e.reject(S.error):void 0!==S.data&&e.resolve(S.data)},r=()=>{t(rq(this,ee,S.promise=ny()))},i=r_(this,ee);switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":("error"===S.status||S.data!==i.value)&&r();break;case"rejected":("error"!==S.status||S.error!==i.reason)&&r()}}return S}updateResult(){let e=r_(this,Y),t=this.createResult(r_(this,_),this.options);if(rq(this,q,r_(this,_).state),rq(this,$,this.options),void 0!==r_(this,q).data&&rq(this,ei,r_(this,_)),ns(t,e))return;rq(this,Y,t);let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!r_(this,el).size)return!0;let n=new Set(null!=r?r:r_(this,el));return this.options.throwOnError&&n.add("error"),Object.keys(r_(this,Y)).some(t=>r_(this,Y)[t]!==e[t]&&n.has(t))};r$(this,eg,nK).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&r$(this,eh,nN).call(this)}constructor(e,t){super(),r0(this,eu),r0(this,ec),r0(this,ed),r0(this,ef),r0(this,eh),r0(this,ep),r0(this,em),r0(this,ev),r0(this,eg),rY(this,X,{writable:!0,value:void 0}),rY(this,_,{writable:!0,value:void 0}),rY(this,Z,{writable:!0,value:void 0}),rY(this,Y,{writable:!0,value:void 0}),rY(this,q,{writable:!0,value:void 0}),rY(this,$,{writable:!0,value:void 0}),rY(this,ee,{writable:!0,value:void 0}),rY(this,et,{writable:!0,value:void 0}),rY(this,er,{writable:!0,value:void 0}),rY(this,en,{writable:!0,value:void 0}),rY(this,ei,{writable:!0,value:void 0}),rY(this,ea,{writable:!0,value:void 0}),rY(this,es,{writable:!0,value:void 0}),rY(this,eo,{writable:!0,value:void 0}),rY(this,el,{writable:!0,value:new Set}),this.options=t,rq(this,X,e),rq(this,et,null),rq(this,ee,ny()),this.bindMethods(),this.setOptions(t)}});function nR(e,t){return!1!==r7(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&nI(e,t,t.refetchOnMount)}function nI(e,t,r){if(!1!==r7(t.enabled,e)&&"static"!==r6(t.staleTime,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&nL(e,t)}return!1}function nP(e,t,r,n){return(e!==t||!1===r7(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&nL(e,r)}function nL(e,t){return!1!==r7(t.enabled,e)&&e.isStaleByTime(r6(t.staleTime,e))}function nU(e){r$(this,ev,nz).call(this);let t=r_(this,_).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(r4)),t}function nG(){r$(this,ep,nk).call(this);let e=r6(this.options.staleTime,r_(this,_));if(r3||r_(this,Y).isStale||!r8(e))return;let t=r5(r_(this,Y).dataUpdatedAt,e);rq(this,ea,r9.setTimeout(()=>{r_(this,Y).isStale||this.updateResult()},t+1))}function nO(){var e;return null!=(e="function"==typeof this.options.refetchInterval?this.options.refetchInterval(r_(this,_)):this.options.refetchInterval)&&e}function nH(e){r$(this,em,nj).call(this),rq(this,eo,e),!r3&&!1!==r7(this.options.enabled,r_(this,_))&&r8(r_(this,eo))&&0!==r_(this,eo)&&rq(this,es,r9.setInterval(()=>{(this.options.refetchIntervalInBackground||nm.isFocused())&&r$(this,eu,nU).call(this)},r_(this,eo)))}function nN(){r$(this,ec,nG).call(this),r$(this,ef,nH).call(this,r$(this,ed,nO).call(this))}function nk(){r_(this,ea)&&(r9.clearTimeout(r_(this,ea)),rq(this,ea,void 0))}function nj(){r_(this,es)&&(r9.clearInterval(r_(this,es)),rq(this,es,void 0))}function nz(){let e=r_(this,X).getQueryCache().build(r_(this,X),this.options);if(e===r_(this,_))return;let t=r_(this,_);rq(this,_,e),rq(this,Z,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}function nK(e){ng.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(r_(this,Y))}),r_(this,X).getQueryCache().notify({query:r_(this,_),type:"observerResultsUpdated"})})}var nJ=eG.createContext(void 0),nV=e=>{let{client:t,children:r}=e;return eG.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,eU.jsx)(nJ.Provider,{value:t,children:r})},nQ=eG.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),nW=eG.createContext(!1);nW.Provider;var nX=(e,t)=>void 0===t.state.data,n_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function nZ(e,t,r){var n,i,a,s,o;let l=eG.useContext(nW),u=eG.useContext(nQ),c=(e=>{let t=eG.useContext(nJ);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t})(r),d=c.defaultQueryOptions(e);if(null==(i=c.getDefaultOptions().queries)||null==(n=i._experimental_beforeQuery)||n.call(i,d),d._optimisticResults=l?"isRestoring":"optimistic",d.suspense){let e=e=>"static"===e?e:Math.max(null!=e?e:1e3,1e3),t=d.staleTime;d.staleTime="function"==typeof t?function(){for(var r=arguments.length,n=Array(r),i=0;i{u.clearReset()},[u]);let f=!c.getQueryCache().get(d.queryHash),[h]=eG.useState(()=>new t(c,d)),p=h.getOptimisticResult(d),m=!l&&!1!==e.subscribed;if(eG.useSyncExternalStore(eG.useCallback(e=>{let t=m?h.subscribe(ng.batchCalls(e)):r4;return h.updateResult(),t},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),eG.useEffect(()=>{h.setOptions(d)},[d,h]),(null==d?void 0:d.suspense)&&p.isPending)throw n_(d,h,u);if((e=>{var t,r;let{result:n,errorResetBoundary:i,throwOnError:a,query:s,suspense:o}=e;return n.isError&&!i.isReset()&&!n.isFetching&&s&&(o&&void 0===n.data||(t=a,r=[n.error,s],"function"==typeof t?t(...r):!!t))})({result:p,errorResetBoundary:u,throwOnError:d.throwOnError,query:c.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw p.error;if(null==(s=c.getDefaultOptions().queries)||null==(a=s._experimental_afterQuery)||a.call(s,d,p),d.experimental_prefetchInRender&&!r3&&p.isLoading&&p.isFetching&&!l){let e=f?n_(d,h,u):null==(o=c.getQueryCache().get(d.queryHash))?void 0:o.promise;null==e||e.catch(r4).finally(()=>{h.updateResult()})}return d.notifyOnChangeProps?p:h.trackResult(p)}var nY=e.i(54970),nq=e.i(12979),n$=e.i(47071),n0=e.i(62395),n1=e.i(75567),n2=e.i(79123);function n9(e){let{displacementMap:t,visibilityMask:r,textureNames:n,alphaMaps:i}=e,{debugMode:a}=(0,n2.useDebug)(),s=(0,n$.useTexture)(n.map(e=>(0,nq.terrainTextureToUrl)(e)),e=>{e.forEach(e=>(0,n1.setupColor)(e))}),o=(0,eG.useMemo)(()=>i.map(e=>(0,n1.setupMask)(e)),[i]),l=(0,eG.useMemo)(()=>({0:32,1:32,2:32,3:32,4:32,5:32}),[]),u=(0,eG.useCallback)(e=>{(0,n1.updateTerrainTextureShader)({shader:e,baseTextures:s,alphaTextures:o,visibilityMask:r,tiling:l,debugMode:a})},[s,o,r,l,a]);return(0,eU.jsx)("meshStandardMaterial",{displacementMap:t,map:t,displacementScale:2048,depthWrite:!0,side:a?ek.DoubleSide:ek.FrontSide,onBeforeCompile:u},"".concat(JSON.stringify(l),"-").concat(a))}function n3(e){let{heightMap:t,textureNames:r,alphaMaps:n,emptySquares:i}=e,a=(0,eG.useMemo)(()=>{let e=function(e){let t=new Float32Array(e.length);for(let r=0;r{if(!i.length)return null;let e=new Uint8Array(65536);for(let t of(e.fill(255),i)){let r=255&t,n=t>>8&255,i=t>>16;for(let t=0;t=0&&i{let e=(0,n0.getProperty)(r,"emptySquares");return e?e.split(" ").map(e=>parseInt(e,10)):[]},[r]),s=(0,eG.useMemo)(()=>{let[e,t,n]=(0,n0.getPosition)(r);return[e,0,n]},[r]),o=(0,eG.useMemo)(()=>(0,n0.getRotation)(r),[r]),l=(0,eG.useMemo)(()=>(0,n0.getScale)(r),[r]),u=(0,eG.useMemo)(()=>{let e=256*i,t=new ek.PlaneGeometry(e,e,256,256);return t.rotateX(-Math.PI/2),t.rotateY(-Math.PI/2),t.translate(1024,0,1024),t},[i]),{data:c}=nZ({queryKey:["terrain",n],queryFn:()=>(0,nq.loadTerrain)(n)},nF,void 0);return(0,eU.jsx)("group",{position:s,quaternion:o,scale:l,children:(0,eU.jsx)("mesh",{geometry:u,receiveShadow:!0,castShadow:!0,children:c?(0,eU.jsx)(n3,{heightMap:c.heightMap,emptySquares:a,textureNames:c.textureNames,alphaMaps:c.alphaMaps}):null})})}),n8=(0,eG.createContext)(null);function n5(){return(0,eG.useContext)(n8)}var n6=eG;let n7=(0,n6.createContext)(null),ie={didCatch:!1,error:null};class it extends n6.Component{static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,r,n=arguments.length,i=Array(n),a=0;a0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,n)){var i,a;null==(i=(a=this.props).onReset)||i.call(a,{next:n,prev:e.resetKeys,reason:"keys"}),this.setState(ie)}}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:n}=this.props,{didCatch:i,error:a}=this.state,s=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)s=t(e);else if(r)s=(0,n6.createElement)(r,e);else if(void 0!==n)s=n;else throw a}return(0,n6.createElement)(n7.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=ie}}var ir=e.i(31067),ii=ek;function ia(e,t){if(t===ek.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t!==ek.TriangleFanDrawMode&&t!==ek.TriangleStripDrawMode)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e;{let r=e.getIndex();if(null===r){let t=[],n=e.getAttribute("position");if(void 0===n)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e=2.0 are supported."));return}let o=new i1(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});o.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e=0&&void 0===s[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}o.setExtensions(a),o.setPlugins(s),o.parse(r,n)}parseAsync(e,t){let r=this;return new Promise(function(n,i){r.parse(e,t,n,i)})}constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new ig(e)}),this.register(function(e){return new iA(e)}),this.register(function(e){return new ib(e)}),this.register(function(e){return new iM(e)}),this.register(function(e){return new iw(e)}),this.register(function(e){return new ix(e)}),this.register(function(e){return new iB(e)}),this.register(function(e){return new iC(e)}),this.register(function(e){return new iS(e)}),this.register(function(e){return new iv(e)}),this.register(function(e){return new iE(e)}),this.register(function(e){return new iy(e)}),this.register(function(e){return new iD(e)}),this.register(function(e){return new iT(e)}),this.register(function(e){return new ip(e)}),this.register(function(e){return new iF(e)}),this.register(function(e){return new iR(e)})}}function id(){let e={};return{get:function(t){return e[t]},add:function(t,r){e[t]=r},remove:function(t){delete e[t]},removeAll:function(){e={}}}}let ih={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ip{_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let r=0,n=t.length;r=0))return null;else throw Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return t.loadTextureImage(e,i.source,a)}constructor(e){this.parser=e,this.name=ih.KHR_TEXTURE_BASISU}}class iM{loadTexture(e){let t=this.name,r=this.parser,n=r.json,i=n.textures[e];if(!i.extensions||!i.extensions[t])return null;let a=i.extensions[t],s=n.images[a.source],o=r.textureLoader;if(s.uri){let e=r.options.manager.getHandler(s.uri);null!==e&&(o=e)}return this.detectSupport().then(function(i){if(i)return r.loadTextureImage(e,a.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(t)>=0)throw Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){let t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}constructor(e){this.parser=e,this.name=ih.EXT_TEXTURE_WEBP,this.isSupported=null}}class iw{loadTexture(e){let t=this.name,r=this.parser,n=r.json,i=n.textures[e];if(!i.extensions||!i.extensions[t])return null;let a=i.extensions[t],s=n.images[a.source],o=r.textureLoader;if(s.uri){let e=r.options.manager.getHandler(s.uri);null!==e&&(o=e)}return this.detectSupport().then(function(i){if(i)return r.loadTextureImage(e,a.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(t)>=0)throw Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){let t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}constructor(e){this.parser=e,this.name=ih.EXT_TEXTURE_AVIF,this.isSupported=null}}class iF{loadBufferView(e){let t=this.parser.json,r=t.bufferViews[e];if(!r.extensions||!r.extensions[this.name])return null;{let e=r.extensions[this.name],n=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported)if(!(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0))return null;else throw Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return n.then(function(t){let r=e.byteOffset||0,n=e.byteLength||0,a=e.count,s=e.byteStride,o=new Uint8Array(t,r,n);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(a,s,o,e.mode,e.filter).then(function(e){return e.buffer}):i.ready.then(function(){let t=new ArrayBuffer(a*s);return i.decodeGltfBuffer(new Uint8Array(t),a,s,o,e.mode,e.filter),t})})}}constructor(e){this.name=ih.EXT_MESHOPT_COMPRESSION,this.parser=e}}class iR{createNodeMesh(e){let t=this.parser.json,r=t.nodes[e];if(!r.extensions||!r.extensions[this.name]||void 0===r.mesh)return null;for(let e of t.meshes[r.mesh].primitives)if(e.mode!==ij.TRIANGLES&&e.mode!==ij.TRIANGLE_STRIP&&e.mode!==ij.TRIANGLE_FAN&&void 0!==e.mode)return null;let n=r.extensions[this.name].attributes,i=[],a={};for(let e in n)i.push(this.parser.getDependency("accessor",n[e]).then(t=>(a[e]=t,a[e])));return i.length<1?null:(i.push(this.parser.createNodeMesh(e)),Promise.all(i).then(e=>{let t=e.pop(),r=t.isGroup?t.children:[t],n=e[0].count,i=[];for(let e of r){let t=new ii.Matrix4,r=new ii.Vector3,s=new ii.Quaternion,o=new ii.Vector3(1,1,1),l=new ii.InstancedMesh(e.geometry,e.material,n);for(let e=0;e=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},iW={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},iX={CUBICSPLINE:void 0,LINEAR:ii.InterpolateLinear,STEP:ii.InterpolateDiscrete},i_={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function iZ(e,t,r){for(let n in r.extensions)void 0===e[n]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[n]=r.extensions[n])}function iY(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function iq(e){let t="",r=Object.keys(e).sort();for(let n=0,i=r.length;n{let r=this.associations.get(e);for(let[n,a]of(null!=r&&this.associations.set(t,r),e.children.entries()))i(a,t.children[n])};return i(r,n),n.name+="_instance_"+e.uses[t]++,n}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let r=0;r=2&&a.setY(t,d[e*o+1]),o>=3&&a.setZ(t,d[e*o+2]),o>=4&&a.setW(t,d[e*o+3]),o>=5)throw Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return a})}loadTexture(e){let t=this.json,r=this.options,n=t.textures[e].source,i=t.images[n],a=this.textureLoader;if(i.uri){let e=r.manager.getHandler(i.uri);null!==e&&(a=e)}return this.loadTextureImage(e,n,a)}loadTextureImage(e,t,r){let n=this,i=this.json,a=i.textures[e],s=i.images[t],o=(s.uri||s.bufferView)+":"+a.sampler;if(this.textureCache[o])return this.textureCache[o];let l=this.loadImageSource(t,r).then(function(t){t.flipY=!1,t.name=a.name||s.name||"",""===t.name&&"string"==typeof s.uri&&!1===s.uri.startsWith("data:image/")&&(t.name=s.uri);let r=(i.samplers||{})[a.sampler]||{};return t.magFilter=iK[r.magFilter]||ii.LinearFilter,t.minFilter=iK[r.minFilter]||ii.LinearMipmapLinearFilter,t.wrapS=iJ[r.wrapS]||ii.RepeatWrapping,t.wrapT=iJ[r.wrapT]||ii.RepeatWrapping,n.associations.set(t,{textures:e}),t}).catch(function(){return null});return this.textureCache[o]=l,l}loadImageSource(e,t){let r=this.json,n=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(e=>e.clone());let i=r.images[e],a=self.URL||self.webkitURL,s=i.uri||"",o=!1;if(void 0!==i.bufferView)s=this.getDependency("bufferView",i.bufferView).then(function(e){o=!0;let t=new Blob([e],{type:i.mimeType});return s=a.createObjectURL(t)});else if(void 0===i.uri)throw Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");let l=Promise.resolve(s).then(function(e){return new Promise(function(r,i){let a=r;!0===t.isImageBitmapLoader&&(a=function(e){let t=new ii.Texture(e);t.needsUpdate=!0,r(t)}),t.load(ii.LoaderUtils.resolveURL(e,n.path),a,void 0,i)})}).then(function(e){var t;return!0===o&&a.revokeObjectURL(s),iY(e,i),e.userData.mimeType=i.mimeType||((t=i.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e}).catch(function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",s),e});return this.sourceCache[e]=l,l}assignTexture(e,t,r,n){let i=this;return this.getDependency("texture",r.index).then(function(a){if(!a)return null;if(void 0!==r.texCoord&&r.texCoord>0&&((a=a.clone()).channel=r.texCoord),i.extensions[ih.KHR_TEXTURE_TRANSFORM]){let e=void 0!==r.extensions?r.extensions[ih.KHR_TEXTURE_TRANSFORM]:void 0;if(e){let t=i.associations.get(a);a=i.extensions[ih.KHR_TEXTURE_TRANSFORM].extendTexture(a,e),i.associations.set(a,t)}}return void 0!==n&&("number"==typeof n&&(n=3001===n?il:iu),"colorSpace"in a?a.colorSpace=n:a.encoding=n===il?3001:3e3),e[t]=a,a})}assignFinalMaterial(e){let t=e.geometry,r=e.material,n=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,a=void 0===t.attributes.normal;if(e.isPoints){let e="PointsMaterial:"+r.uuid,t=this.cache.get(e);t||(t=new ii.PointsMaterial,ii.Material.prototype.copy.call(t,r),t.color.copy(r.color),t.map=r.map,t.sizeAttenuation=!1,this.cache.add(e,t)),r=t}else if(e.isLine){let e="LineBasicMaterial:"+r.uuid,t=this.cache.get(e);t||(t=new ii.LineBasicMaterial,ii.Material.prototype.copy.call(t,r),t.color.copy(r.color),t.map=r.map,this.cache.add(e,t)),r=t}if(n||i||a){let e="ClonedMaterial:"+r.uuid+":";n&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),a&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=r.clone(),i&&(t.vertexColors=!0),a&&(t.flatShading=!0),n&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(r))),r=t}e.material=r}getMaterialType(){return ii.MeshStandardMaterial}loadMaterial(e){let t,r=this,n=this.json,i=this.extensions,a=n.materials[e],s={},o=a.extensions||{},l=[];if(o[ih.KHR_MATERIALS_UNLIT]){let e=i[ih.KHR_MATERIALS_UNLIT];t=e.getMaterialType(),l.push(e.extendParams(s,a,r))}else{let n=a.pbrMetallicRoughness||{};if(s.color=new ii.Color(1,1,1),s.opacity=1,Array.isArray(n.baseColorFactor)){let e=n.baseColorFactor;s.color.setRGB(e[0],e[1],e[2],iu),s.opacity=e[3]}void 0!==n.baseColorTexture&&l.push(r.assignTexture(s,"map",n.baseColorTexture,il)),s.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,s.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(l.push(r.assignTexture(s,"metalnessMap",n.metallicRoughnessTexture)),l.push(r.assignTexture(s,"roughnessMap",n.metallicRoughnessTexture))),t=this._invokeOne(function(t){return t.getMaterialType&&t.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)})))}!0===a.doubleSided&&(s.side=ii.DoubleSide);let u=a.alphaMode||i_.OPAQUE;if(u===i_.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,u===i_.MASK&&(s.alphaTest=void 0!==a.alphaCutoff?a.alphaCutoff:.5)),void 0!==a.normalTexture&&t!==ii.MeshBasicMaterial&&(l.push(r.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new ii.Vector2(1,1),void 0!==a.normalTexture.scale)){let e=a.normalTexture.scale;s.normalScale.set(e,e)}if(void 0!==a.occlusionTexture&&t!==ii.MeshBasicMaterial&&(l.push(r.assignTexture(s,"aoMap",a.occlusionTexture)),void 0!==a.occlusionTexture.strength&&(s.aoMapIntensity=a.occlusionTexture.strength)),void 0!==a.emissiveFactor&&t!==ii.MeshBasicMaterial){let e=a.emissiveFactor;s.emissive=new ii.Color().setRGB(e[0],e[1],e[2],iu)}return void 0!==a.emissiveTexture&&t!==ii.MeshBasicMaterial&&l.push(r.assignTexture(s,"emissiveMap",a.emissiveTexture,il)),Promise.all(l).then(function(){let n=new t(s);return a.name&&(n.name=a.name),iY(n,a),r.associations.set(n,{materials:e}),a.extensions&&iZ(i,n,a),n})}createUniqueName(e){let t=ii.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){let t=this,r=this.extensions,n=this.primitiveCache,i=[];for(let a=0,s=e.length;a0&&function(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let r=0,n=t.weights.length;r1?new ii.Group:1===t.length?t[0]:new ii.Object3D)!==t[0])for(let e=0,r=t.length;e{let t=new Map;for(let[e,r]of n.associations)(e instanceof ii.Material||e instanceof ii.Texture)&&t.set(e,r);return e.traverse(e=>{let r=n.associations.get(e);null!=r&&t.set(e,r)}),t})(i),i})}_createAnimationTracks(e,t,r,n,i){let a,s=[],o=e.name?e.name:e.uuid,l=[];switch(iW[i.path]===iW.weights?e.traverse(function(e){e.morphTargetInfluences&&l.push(e.name?e.name:e.uuid)}):l.push(o),iW[i.path]){case iW.weights:a=ii.NumberKeyframeTrack;break;case iW.rotation:a=ii.QuaternionKeyframeTrack;break;case iW.position:case iW.scale:a=ii.VectorKeyframeTrack;break;default:a=1===r.itemSize?ii.NumberKeyframeTrack:ii.VectorKeyframeTrack}let u=void 0!==n.interpolation?iX[n.interpolation]:ii.InterpolateLinear,c=this._getArrayFromAccessor(r);for(let e=0,r=l.length;e-1)?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||r||n&&i<98?this.textureLoader=new ii.TextureLoader(this.options.manager):this.textureLoader=new ii.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ii.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}}function i2(e,t,r){let n=t.attributes,i=[];for(let t in n){let a=iQ[t]||t.toLowerCase();a in e.attributes||i.push(function(t,n){return r.getDependency("accessor",t).then(function(t){e.setAttribute(n,t)})}(n[t],a))}if(void 0!==t.indices&&!e.index){let n=r.getDependency("accessor",t.indices).then(function(t){e.setIndex(t)});i.push(n)}return iY(e,t),!function(e,t,r){let n=t.attributes,i=new ii.Box3;if(void 0===n.POSITION)return;{let e=r.json.accessors[n.POSITION],t=e.min,a=e.max;if(void 0===t||void 0===a)return console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new ii.Vector3(t[0],t[1],t[2]),new ii.Vector3(a[0],a[1],a[2])),e.normalized){let t=i$(iz[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}let a=t.targets;if(void 0!==a){let e=new ii.Vector3,t=new ii.Vector3;for(let n=0,i=a.length;n{let r={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,r).then(t).catch(n)},r,n)}decodeDracoFile(e,t,r,n){let i={attributeIDs:r||this.defaultAttributeIDs,attributeTypes:n||this.defaultAttributeTypes,useUniqueIDs:!!r};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){let r;for(let e in t.attributeTypes){let r=t.attributeTypes[e];void 0!==r.BYTES_PER_ELEMENT&&(t.attributeTypes[e]=r.name)}let n=JSON.stringify(t);if(i3.has(e)){let t=i3.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let i=this.workerNextTaskID++,a=e.byteLength,s=this._getWorker(i,a).then(n=>(r=n,new Promise((n,a)=>{r._callbacks[i]={resolve:n,reject:a},r.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return s.catch(()=>!0).then(()=>{r&&i&&this._releaseTask(r,i)}),i3.set(e,{key:n,promise:s}),s}_createGeometry(e){let t=new i9.BufferGeometry;e.index&&t.setIndex(new i9.BufferAttribute(e.index.array,1));for(let r=0;r{r.load(e,t,void 0,n)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;let e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(t=>{let r=t[0];e||(this.decoderConfig.wasmBinary=t[1]);let n=i8.toString(),i=["/* draco decoder */",r,"\n/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.lengtht._taskLoad?-1:1});let r=this.workerPool[this.workerPool.length-1];return r._taskCosts[e]=t,r._taskLoad+=t,r})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e{let t=e.draco,r=new t.Decoder,s=new t.DecoderBuffer;s.Init(new Int8Array(i),i.byteLength);try{let e=function(e,t,r,n){let i,a,s=n.attributeIDs,o=n.attributeTypes,l=t.GetEncodedGeometryType(r);if(l===e.TRIANGULAR_MESH)i=new e.Mesh,a=t.DecodeBufferToMesh(r,i);else if(l===e.POINT_CLOUD)i=new e.PointCloud,a=t.DecodeBufferToPointCloud(r,i);else throw Error("THREE.DRACOLoader: Unexpected geometry type.");if(!a.ok()||0===i.ptr)throw Error("THREE.DRACOLoader: Decoding failed: "+a.error_msg());let u={index:null,attributes:[]};for(let r in s){let a,l,c=self[o[r]];if(n.useUniqueIDs)l=s[r],a=t.GetAttributeByUniqueId(i,l);else{if(-1===(l=t.GetAttributeId(i,e[s[r]])))continue;a=t.GetAttribute(i,l)}u.attributes.push(function(e,t,r,n,i,a){let s=a.num_components(),o=r.num_points()*s,l=o*i.BYTES_PER_ELEMENT,u=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),c=e._malloc(l);t.GetAttributeDataArrayForAllPoints(r,a,u,l,c);let d=new i(e.HEAPF32.buffer,c,o).slice();return e._free(c),{name:n,array:d,itemSize:s}}(e,t,i,r,c,a))}return l===e.TRIANGULAR_MESH&&(u.index=function(e,t,r){let n=3*r.num_faces(),i=4*n,a=e._malloc(i);t.GetTrianglesUInt32Array(r,i,a);let s=new Uint32Array(e.HEAPF32.buffer,a,n).slice();return e._free(a),{array:s,itemSize:1}}(e,t,i)),e.destroy(i),u}(t,r,s,a),i=e.attributes.map(e=>e.array.buffer);e.index&&i.push(e.index.array.buffer),self.postMessage({type:"decode",id:n.id,geometry:e},i)}catch(e){console.error(e),self.postMessage({type:"error",id:n.id,error:e.message})}finally{t.destroy(s),t.destroy(r)}})}}}let i5={clone:function(e){let t=new Map,r=new Map,n=e.clone();return function e(t,r,n){n(t,r);for(let i=0;i{let{isChild:r=!1,object:n,children:i,deep:a,castShadow:s,receiveShadow:o,inject:l,keys:u,...c}=e,d={keys:u,deep:a,inject:l,castShadow:s,receiveShadow:o};if(Array.isArray(n=eG.useMemo(()=>{if(!1===r&&!Array.isArray(n)){let e=!1;if(n.traverse(t=>{t.isSkinnedMesh&&(e=!0)}),e)return i5.clone(n)}return n},[n,r])))return eG.createElement("group",(0,ir.default)({},c,{ref:t}),n.map(e=>eG.createElement(i6,(0,ir.default)({key:e.uuid,object:e},d))),i);let{children:f,...h}=function(e,t){let{keys:r=["near","far","color","distance","decay","penumbra","angle","intensity","skeleton","visible","castShadow","receiveShadow","morphTargetDictionary","morphTargetInfluences","name","geometry","material","position","rotation","scale","up","userData","bindMode","bindMatrix","bindMatrixInverse","skeleton"],deep:n,inject:i,castShadow:a,receiveShadow:s}=t,o={};for(let t of r)o[t]=e[t];return n&&(o.geometry&&"materialsOnly"!==n&&(o.geometry=o.geometry.clone()),o.material&&"geometriesOnly"!==n&&(o.material=o.material.clone())),i&&(o="function"==typeof i?{...o,children:i(e)}:eG.isValidElement(i)?{...o,children:i}:{...o,...i}),e instanceof ek.Mesh&&(a&&(o.castShadow=!0),s&&(o.receiveShadow=!0)),o}(n,d),p=n.type[0].toLowerCase()+n.type.slice(1);return eG.createElement(p,(0,ir.default)({},h,c,{ref:t}),n.children.map(e=>"Bone"===e.type?eG.createElement("primitive",(0,ir.default)({key:e.uuid,object:e},d)):eG.createElement(i6,(0,ir.default)({key:e.uuid,object:e},d,{isChild:!0}))),i,f)}),i7=null,ae="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function at(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=arguments.length>2?arguments[2]:void 0;return i=>{n&&n(i),e&&(i7||(i7=new i4),i7.setDecoderPath("string"==typeof e?e:ae),i.setDRACOLoader(i7)),r&&i.setMeshoptDecoder((()=>{let e;if(t)return t;let r=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!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HcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");let a=WebAssembly.instantiate(function(e){let t=new Uint8Array(e.length);for(let r=0;r96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}let r=0;for(let i=0;i{(e=t.instance).exports.__wasm_call_ctors()});function s(t,r,n,i,a,s){let o=e.exports.sbrk,l=n+3&-4,u=o(l*i),c=o(a.length),d=new Uint8Array(e.exports.memory.buffer);d.set(a,c);let f=t(u,n,i,c,a.length);if(0===f&&s&&s(u,l,i),r.set(d.subarray(u,u+n*i)),o(u-o(0)),0!==f)throw Error("Malformed buffer data: ".concat(f))}let o={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},l={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return t={ready:a,supported:!0,decodeVertexBuffer(t,r,n,i,a){s(e.exports.meshopt_decodeVertexBuffer,t,r,n,i,e.exports[o[a]])},decodeIndexBuffer(t,r,n,i){s(e.exports.meshopt_decodeIndexBuffer,t,r,n,i)},decodeIndexSequence(t,r,n,i){s(e.exports.meshopt_decodeIndexSequence,t,r,n,i)},decodeGltfBuffer(t,r,n,i,a,u){s(e.exports[l[a]],t,r,n,i,e.exports[o[u]])}}})())}}let ar=(e,t,r,n)=>(0,e_.useLoader)(ic,e,at(t,r,n));ar.preload=(e,t,r,n)=>e_.useLoader.preload(ic,e,at(t,r,n)),ar.clear=e=>e_.useLoader.clear(ic,e),ar.setDecoderPath=e=>{ae=e};var an=e.i(89887);function ai(e){let{materialName:t}=e,r=(0,nq.textureToUrl)(t),n=(0,n$.useTexture)(r,e=>(0,n1.setupColor)(e));return(0,eU.jsx)("meshStandardMaterial",{map:n,side:2})}function aa(e){let{node:t}=e;return(0,eU.jsx)("mesh",{geometry:t.geometry,castShadow:!0,receiveShadow:!0,children:t.material?(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)("meshStandardMaterial",{color:"yellow",wireframe:!0}),children:Array.isArray(t.material)?t.material.map((e,t)=>(0,eU.jsx)(ai,{materialName:e.userData.resource_path},t)):(0,eU.jsx)(ai,{materialName:t.material.userData.resource_path})}):null})}let as=(0,eG.memo)(e=>{let{interiorFile:t}=e,{nodes:r}=ar((0,nq.interiorToUrl)(t)),{debugMode:n}=(0,n2.useDebug)();return(0,eU.jsxs)("group",{rotation:[0,-Math.PI/2,0],children:[Object.entries(r).filter(e=>{let[t,r]=e;return!r.material||!r.material.name.match(/\.\d+$/)}).map(e=>{let[t,r]=e;return(0,eU.jsx)(aa,{node:r},t)}),n?(0,eU.jsx)(an.FloatingLabel,{children:t}):null]})});function ao(e){let{color:t,label:r}=e;return(0,eU.jsxs)("mesh",{children:[(0,eU.jsx)("boxGeometry",{args:[10,10,10]}),(0,eU.jsx)("meshStandardMaterial",{color:t,wireframe:!0}),r?(0,eU.jsx)(an.FloatingLabel,{color:t,children:r}):null]})}function al(e){let{label:t}=e,{debugMode:r}=(0,n2.useDebug)();return r?(0,eU.jsx)(ao,{color:"red",label:t}):null}let au=(0,eG.memo)(function(e){let{object:t}=e,r=(0,n0.getProperty)(t,"interiorFile"),n=(0,eG.useMemo)(()=>(0,n0.getPosition)(t),[t]),i=(0,eG.useMemo)(()=>(0,n0.getScale)(t),[t]),a=(0,eG.useMemo)(()=>(0,n0.getRotation)(t),[t]);return(0,eU.jsx)("group",{position:n,quaternion:a,scale:i,children:(0,eU.jsx)(it,{fallback:(0,eU.jsx)(al,{label:r}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(ao,{color:"orange"}),children:(0,eU.jsx)(as,{interiorFile:r})})})})});function ac(e,t){let{path:r}=t,[n]=(0,e_.useLoader)(ek.CubeTextureLoader,[e],e=>e.setPath(r));return n}ac.preload=(e,t)=>{let{path:r}=t;return e_.useLoader.preload(ek.CubeTextureLoader,[e],e=>e.setPath(r))};function ad(e){return e.wrapS=ek.RepeatWrapping,e.wrapT=ek.RepeatWrapping,e.minFilter=ek.LinearFilter,e.magFilter=ek.LinearFilter,e.colorSpace=ek.SRGBColorSpace,e.needsUpdate=!0,e}function af(e){let{textureUrl:t,radius:r,heightPercent:n,speed:i,windDirection:a,layerIndex:s,debugMode:o,animationEnabled:l}=e,u=(0,eG.useRef)(null),c=(0,eG.useRef)(new ek.Vector2(0,0)),d=(0,n$.useTexture)(t,ad),f=(0,eG.useMemo)(()=>{let e=n-.05;return function(e,t,r,n){let i=new ek.BufferGeometry,a=new Float32Array(75),s=new Float32Array(50),o=[.05,.05,.05,.05,.05,.05,r,r,r,.05,.05,r,t,r,.05,.05,r,r,r,.05,.05,.05,.05,.05,.05],l=2*e/4;for(let t=0;t<5;t++)for(let r=0;r<5;r++){let n=5*t+r,i=-e+r*l,u=e-t*l,c=e*o[n];a[3*n]=i,a[3*n+1]=c,a[3*n+2]=u,s[2*n]=r/4,s[2*n+1]=t/4}!function(e){let t=t=>({x:e[3*t],y:e[3*t+1],z:e[3*t+2]}),r=(t,r,n,i)=>{e[3*t]=r,e[3*t+1]=n,e[3*t+2]=i},n=t(1),i=t(3),a=t(5),s=t(6),o=t(8),l=t(9),u=t(15),c=t(16),d=t(18),f=t(19),h=t(21),p=t(23),m=a.x+(n.x-a.x)*.5,g=a.y+(n.y-a.y)*.5,A=a.z+(n.z-a.z)*.5;r(0,s.x+(m-s.x)*2,s.y+(g-s.y)*2,s.z+(A-s.z)*2),m=l.x+(i.x-l.x)*.5,g=l.y+(i.y-l.y)*.5,A=l.z+(i.z-l.z)*.5,r(4,o.x+(m-o.x)*2,o.y+(g-o.y)*2,o.z+(A-o.z)*2),m=h.x+(u.x-h.x)*.5,g=h.y+(u.y-h.y)*.5,A=h.z+(u.z-h.z)*.5,r(20,c.x+(m-c.x)*2,c.y+(g-c.y)*2,c.z+(A-c.z)*2),m=p.x+(f.x-p.x)*.5,g=p.y+(f.y-p.y)*.5,A=p.z+(f.z-p.z)*.5,r(24,d.x+(m-d.x)*2,d.y+(g-d.y)*2,d.z+(A-d.z)*2)}(a);let u=function(e,t){let r=new Float32Array(25);for(let n=0;n<25;n++){let i=e[3*n],a=e[3*n+2],s=1.3-Math.sqrt(i*i+a*a)/t;s<.4?s=0:s>.8&&(s=1),r[n]=s}return r}(a,e),c=[];for(let e=0;e<4;e++)for(let t=0;t<4;t++){let r=5*e+t,n=r+1,i=r+5,a=i+1;c.push(r,i,a),c.push(r,a,n)}return i.setIndex(c),i.setAttribute("position",new ek.Float32BufferAttribute(a,3)),i.setAttribute("uv",new ek.Float32BufferAttribute(s,2)),i.setAttribute("alpha",new ek.Float32BufferAttribute(u,1)),i.computeBoundingSphere(),i}(r,n,e,0)},[r,n]),h=(0,eG.useMemo)(()=>new ek.ShaderMaterial({uniforms:{cloudTexture:{value:d},uvOffset:{value:new ek.Vector2(0,0)},debugMode:{value:+!!o},layerIndex:{value:s}},vertexShader:"\n attribute float alpha;\n\n uniform vec2 uvOffset;\n\n varying vec2 vUv;\n varying float vAlpha;\n\n void main() {\n // Apply UV offset for scrolling\n vUv = uv + uvOffset;\n vAlpha = alpha;\n\n vec4 pos = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n // Set depth to far plane so clouds are always visible and behind other geometry\n gl_Position = pos.xyww;\n }\n",fragmentShader:"\n uniform sampler2D cloudTexture;\n uniform float debugMode;\n uniform int layerIndex;\n\n varying vec2 vUv;\n varying float vAlpha;\n\n void main() {\n vec4 texColor = texture2D(cloudTexture, vUv);\n\n // Debug mode: show layer-colored clouds (red, green, blue for layers 0, 1, 2)\n if (debugMode > 0.5) {\n vec3 debugColor;\n if (layerIndex == 0) {\n debugColor = vec3(1.0, 0.3, 0.3); // Red\n } else if (layerIndex == 1) {\n debugColor = vec3(0.3, 1.0, 0.3); // Green\n } else {\n debugColor = vec3(0.3, 0.3, 1.0); // Blue\n }\n // Use same alpha calculation as normal mode\n gl_FragColor = vec4(debugColor, texColor.a * vAlpha);\n return;\n }\n\n // Tribes 2 uses GL_MODULATE: final = texture × vertex color\n // Vertex color is white with varying alpha, so:\n // Final RGB = Texture RGB × 1.0 = Texture RGB\n // Final Alpha = Texture Alpha × Vertex Alpha\n float finalAlpha = texColor.a * vAlpha;\n\n // Output clouds with texture color and combined alpha\n gl_FragColor = vec4(texColor.rgb, finalAlpha);\n }\n",transparent:!0,depthWrite:!1,side:ek.DoubleSide}),[d,o,s]);return(0,eX.useFrame)((e,t)=>{if(!u.current||!l)return;let r=1e3*t/32;c.current.x+=a.x*i*r,c.current.y+=a.y*i*r,c.current.x=c.current.x-Math.floor(c.current.x),c.current.y=c.current.y-Math.floor(c.current.y),u.current.uniforms.uvOffset.value.copy(c.current)}),(0,eG.useEffect)(()=>()=>{f.dispose(),h.dispose()},[f,h]),(0,eU.jsx)("mesh",{geometry:f,frustumCulled:!1,renderOrder:10,children:(0,eU.jsx)("primitive",{ref:u,object:h,attach:"material"})})}function ah(e){var t,r;let{object:n}=e,{debugMode:i}=(0,n2.useDebug)(),{animationEnabled:a}=(0,n2.useSettings)(),{data:s}=nZ({queryKey:["detailMapList",r=(0,n0.getProperty)(n,"materialList")],queryFn:()=>(0,nq.loadDetailMapList)(r),enabled:!!r},nF,void 0),o=.95*(null!=(t=(0,n0.getFloat)(n,"visibleDistance"))?t:500),l=(0,eG.useMemo)(()=>{var e,t,r;return[null!=(e=(0,n0.getFloat)(n,"cloudSpeed1"))?e:1e-4,null!=(t=(0,n0.getFloat)(n,"cloudSpeed2"))?t:2e-4,null!=(r=(0,n0.getFloat)(n,"cloudSpeed3"))?r:3e-4]},[n]),u=(0,eG.useMemo)(()=>{let e=[.35,.25,.2],t=[];for(let i=0;i<3;i++){var r;let a=null!=(r=(0,n0.getFloat)(n,"cloudHeightPer".concat(i)))?r:e[i];t.push(a)}return t},[n]),c=(0,eG.useMemo)(()=>{let e=(0,n0.getProperty)(n,"windVelocity");if(e){let[t,r]=e.split(" ").map(e=>parseFloat(e));if(0!==t||0!==r)return new ek.Vector2(t,r).normalize()}return new ek.Vector2(1,0)},[n]),d=(0,eG.useMemo)(()=>{if(!s)return[];let e=[];for(let n=7;n{let{camera:t}=e;f.current&&f.current.position.copy(t.position)}),d&&0!==d.length)?(0,eU.jsx)("group",{ref:f,children:d.map((e,t)=>{let r=(0,nq.textureToUrl)(e.texture);return(0,eU.jsx)(eG.Suspense,{fallback:null,children:(0,eU.jsx)(af,{textureUrl:r,radius:o,heightPercent:e.height,speed:e.speed,windDirection:c,layerIndex:t,debugMode:i,animationEnabled:a})},t)})}):null}let ap="".concat(nq.BASE_URL,"/black.png");function am(e){let{materialList:t,fogColor:r,fogDistance:n}=e,{data:i}=nZ({queryKey:["detailMapList",t],queryFn:()=>(0,nq.loadDetailMapList)(t)},nF,void 0),a=ac((0,eG.useMemo)(()=>i?[(0,nq.textureToUrl)(i[1]),(0,nq.textureToUrl)(i[3]),(0,nq.textureToUrl)(i[4]),(0,nq.textureToUrl)(i[5]),(0,nq.textureToUrl)(i[0]),(0,nq.textureToUrl)(i[2])]:[ap,ap,ap,ap,ap,ap],[i]),{path:""}),s=(0,eG.useRef)(null),o=!!r&&!!n,l=(0,eG.useMemo)(()=>o?new ek.ShaderMaterial({uniforms:{skybox:{value:a},fogColor:{value:r}},vertexShader:"\n varying vec3 vDirection;\n\n void main() {\n // Use position directly as direction (no world transform needed)\n vDirection = position;\n\n // Transform position but ignore translation\n vec4 pos = projectionMatrix * mat4(mat3(modelViewMatrix)) * vec4(position, 1.0);\n gl_Position = pos.xyww; // Set depth to far plane\n }\n ",fragmentShader:"\n uniform samplerCube skybox;\n uniform vec3 fogColor;\n\n varying vec3 vDirection;\n\n void main() {\n vec3 direction = normalize(vDirection);\n // Swap X and Z to match scene.backgroundRotation used in non-fog path\n direction = vec3(direction.z, direction.y, direction.x);\n vec4 skyColor = textureCube(skybox, direction);\n\n // Calculate fog factor based on vertical direction\n // direction.y: -1 = straight down, 0 = horizon, 1 = straight up\n // 100% fog from bottom to horizon, then fade from horizon (0) to 0.4\n float fogFactor = smoothstep(0.0, 0.4, direction.y);\n\n // Mix in sRGB space to match Three.js fog rendering\n vec3 finalColor = mix(fogColor, skyColor.rgb, fogFactor);\n gl_FragColor = vec4(finalColor, 1.0);\n }\n ",side:ek.BackSide,depthWrite:!1}):null,[a,r,o]);(0,eG.useEffect)(()=>{s.current&&o&&l&&(s.current.uniforms.skybox.value=a,s.current.uniforms.fogColor.value=r)},[a,r,o,l]);let{scene:u}=(0,eW.useThree)();return((0,eG.useEffect)(()=>{u.backgroundRotation=new ek.Euler(0,Math.PI/2,0)},[u]),o)?(0,eU.jsxs)("mesh",{scale:5e3,children:[(0,eU.jsx)("sphereGeometry",{args:[1,60,40]}),(0,eU.jsx)("primitive",{ref:s,object:l,attach:"material"})]}):(0,eU.jsx)("primitive",{attach:"background",object:a})}let av=e=>{e.fragmentShader=e.fragmentShader.replace("#include ","\n #include \n // Override roughness with map alpha channel if map exists\n #ifdef USE_MAP\n roughnessFactor = texture2D(map, vMapUv).a * 1;\n #endif\n ")};function ag(){let e=new ek.MeshStandardMaterial({side:2,metalness:0,roughness:1});return e.onBeforeCompile=av,e}let aA=(0,eG.createContext)(null);function ay(e){let{children:t,shapeName:r,type:n}=e,i=(0,eG.useMemo)(()=>({shapeName:r,type:n}),[r,n]);return(0,eU.jsx)(aA.Provider,{value:i,children:t})}var ax=e.i(51475);let aB=new Map;function aC(e){let{material:t,shapeName:r}=e,n=t.userData.resource_path,i=function(e){let{animationEnabled:t}=(0,n2.useSettings)(),{data:r}=nZ({queryKey:["ifl",e],queryFn:()=>(0,nq.loadImageFrameList)(e),enabled:!0,suspense:!0,throwOnError:nX,placeholderData:void 0},nF,void 0),n=(0,eG.useMemo)(()=>r.map(t=>(0,nq.iflTextureToUrl)(t.name,e)),[r,e]),i=(0,n$.useTexture)(n),a=(0,eG.useMemo)(()=>{var t;let n,a=aB.get(e);return a||(a=function(e){let t=e[0].image.width,r=e[0].image.height,n=e.length,i=Math.ceil(Math.sqrt(n)),a=Math.ceil(n/i),s=document.createElement("canvas");s.width=t*i,s.height=r*a;let o=s.getContext("2d");e.forEach((e,n)=>{let a=Math.floor(n/i);o.drawImage(e.image,n%i*t,a*r)});let l=new ek.CanvasTexture(s);return l.colorSpace=ek.SRGBColorSpace,l.generateMipmaps=!1,l.minFilter=ek.NearestFilter,l.magFilter=ek.NearestFilter,l.wrapS=ek.ClampToEdgeWrapping,l.wrapT=ek.ClampToEdgeWrapping,l.repeat.set(1/i,1/a),{texture:l,columns:i,rows:a,frameCount:n,frameStartTicks:[],totalTicks:0,lastFrame:-1}}(i),aB.set(e,a)),n=0,(t=a).frameStartTicks=r.map(e=>{let t=n;return n+=e.frameCount,t}),t.totalTicks=n,a},[e,i,r]);return(0,ax.useTick)(e=>{let r=t?function(e,t){if(0===e.totalTicks)return 0;let r=t%e.totalTicks,{frameStartTicks:n}=e;for(let e=n.length-1;e>=0;e--)if(r>=n[e])return e;return 0}(a,e):0;!function(e,t){if(t===e.lastFrame)return;e.lastFrame=t;let r=t%e.columns,n=e.rows-1-Math.floor(t/e.columns);e.texture.offset.set(r/e.columns,n/e.rows)}(a,r)}),a.texture}("textures/".concat(n,".ifl")),a=r&&/borg|xorg|porg|dorg/i.test(r),s=(0,eG.useMemo)(()=>{if(!a){let e=ag();return e.map=i,e}let e=t.clone();return e.map=i,e.transparent=!0,e.alphaTest=.9,e.side=2,e},[t,i,a]);return(0,eU.jsx)("primitive",{object:s,attach:"material"})}function aS(e){let{material:t,shapeName:r}=e,n=t.userData.resource_path,i=(0,eG.useMemo)(()=>(n||console.warn('No resource_path was found on "'.concat(r,'" - rendering fallback.')),n?(0,nq.textureToUrl)(n):nq.FALLBACK_TEXTURE_URL),[t,n,r]),a=r&&/borg|xorg|porg|dorg/i.test(r),s=(0,n$.useTexture)(i,e=>(a||(e.wrapS=e.wrapT=ek.RepeatWrapping,e.colorSpace=ek.SRGBColorSpace,e.flipY=!1,e.anisotropy=16,e.generateMipmaps=!0,e.minFilter=ek.LinearMipmapLinearFilter,e.magFilter=ek.LinearFilter,e.needsUpdate=!0),(0,n1.setupColor)(e))),o=(0,eG.useMemo)(()=>{if(!a){let e=ag();return e.map=s,e}let e=t.clone();return e.map=s,e.transparent=!0,e.alphaTest=.9,e.side=2,e},[t,s,a]);return(0,eU.jsx)("primitive",{object:o,attach:"material"})}function aE(e){var t;let{material:r,shapeName:n}=e,i=new Set(null!=(t=r.userData.flag_names)?t:[]).has("IflMaterial"),a=r.userData.resource_path;return i&&a?(0,eU.jsx)(aC,{material:r,shapeName:n}):r.name?(0,eU.jsx)(aS,{material:r,shapeName:n}):null}function aT(e){let{color:t,label:r}=e;return(0,eU.jsxs)("mesh",{children:[(0,eU.jsx)("boxGeometry",{args:[10,10,10]}),(0,eU.jsx)("meshStandardMaterial",{color:t,wireframe:!0}),r?(0,eU.jsx)(an.FloatingLabel,{color:t,children:r}):null]})}function aD(e){let{color:t,label:r}=e,{debugMode:n}=(0,n2.useDebug)();return n?(0,eU.jsx)(aT,{color:t,label:r}):null}let ab=(0,eG.memo)(function(){let{shapeName:e}=(0,eG.useContext)(aA),{debugMode:t}=(0,n2.useDebug)(),{nodes:r}=ar((0,nq.shapeToUrl)(e)),n=(0,eG.useMemo)(()=>{let e=Object.values(r).filter(e=>e.skeleton);if(e.length>0){var t=e[0].skeleton;let r=new Set;return t.bones.forEach((e,t)=>{e.name.match(/^Hulk/i)&&r.add(t)}),r}return new Set},[r]),i=(0,eG.useMemo)(()=>Object.entries(r).filter(e=>{let[t,r]=e;return r.material&&"Unassigned"!==r.material.name&&!r.name.match(/^Hulk/i)}).map(e=>{let[t,r]=e,i=function(e,t){if(0===t.size||!e.attributes.skinIndex)return e;let r=e.attributes.skinIndex,n=e.attributes.skinWeight,i=e.index,a=Array(r.count).fill(!1);for(let e=0;e.01&&t.has(s)){a[e]=!0;break}}if(i){let t=[],r=i.array;for(let e=0;e{let{node:r,geometry:n}=t;return(0,eU.jsx)("mesh",{geometry:n,castShadow:!0,receiveShadow:!0,children:r.material?(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)("meshStandardMaterial",{color:"gray",wireframe:!0}),children:Array.isArray(r.material)?r.material.map((t,r)=>(0,eU.jsx)(aE,{material:t,shapeName:e},r)):(0,eU.jsx)(aE,{material:r.material,shapeName:e})}):null},r.id)}),t?(0,eU.jsx)(an.FloatingLabel,{children:e}):null]})}),aM={Banner_Honor:"banner_honor.dts",Banner_Strength:"banner_strength.dts",Banner_Unity:"banner_unity.dts",CreativityPad:"station_teleport.dts",ExteriorFlagStand:"ext_flagstand.dts",FlipFlop:"switch.dts",GeneratorLarge:"station_generator_large.dts",InteriorFlagStand:"int_flagstand.dts",LightMaleHuman_Dead:"light_male_dead.dts",MediumMaleHuman_Dead:"medium_male_dead.dts",HeavyMaleHuman_Dead:"heavy_male_dead.dts",LogoProjector:"teamlogo_projector.dts",SensorLargePulse:"sensor_pulse_large.dts",SensorMediumPulse:"sensor_pulse_medium.dts",SolarPanel:"solarpanel.dts",StaticShape:"switch.dts",StationInventory:"station_inv_human.dts",StationVehicle:"vehicle_pad_station.dts",StationVehiclePad:"vehicle_pad.dts",Teleporter:"nexusbase.dts"},aw={AmmoPack:"pack_upgrade_ammo.dts",Beacon:"beacon.dts",Chaingun:"weapon_chaingun.dts",ChaingunAmmo:"ammo_chaingun.dts",CloakingPack:"pack_upgrade_cloaking.dts",ConcussionGrenade:"grenade.dts",DiscAmmo:"ammo_disc.dts",ELFGun:"weapon_elf.dts",EnergyPack:"pack_upgrade_energy.dts",Flag:"flag.dts",FlareGrenade:"grenade.dts",Grenade:"grenade.dts",GrenadeLauncher:"weapon_grenade_launcher.dts",GrenadeLauncherAmmo:"ammo_grenade.dts",InventoryDeployable:"pack_deploy_inventory.dts",Mine:"ammo_mine.dts",MotionSensorDeployable:"pack_deploy_sensor_motion.dts",Plasma:"weapon_plasma.dts",PlasmaAmmo:"ammo_plasma.dts",PulseSensorDeployable:"pack_deploy_sensor_pulse.dts",RepairKit:"repair_kit.dts",RepairPack:"pack_upgrade_repair.dts",RepairPatch:"repair_patch.dts",SatchelCharge:"pack_upgrade_satchel.dts",SensorJammerPack:"pack_upgrade_sensorjammer.dts",ShieldPack:"pack_upgrade_shield.dts",ShockLance:"weapon_shocklance.dts",SniperRifle:"weapon_sniper.dts"},aF={1:"Storm",2:"Inferno"},aR={AABarrelLarge:"turret_aa_large.dts",ELFBarrelLarge:"turret_elf_large.dts",MissileBarrelLarge:"turret_missile_large.dts",MortarBarrelLarge:"turret_mortar_large.dts",PlasmaBarrelLarge:"turret_fusion_large.dts",SentryTurret:"turret_sentry.dts",TurretBaseLarge:"turret_base_large.dts",SentryTurretBarrel:"turret_muzzlepoint.dts"};function aI(e){return i||(i=Object.fromEntries(Object.entries(aR).map(e=>{let[t,r]=e;return[t.toLowerCase(),r]}))),i[e.toLowerCase()]}let aP=(0,eG.createContext)(null);function aL(){let e=(0,eG.useContext)(aP);if(!e)throw Error("useCameras must be used within CamerasProvider");return e}function aU(e){let{children:t}=e,{camera:r}=(0,eW.useThree)(),[n,i]=(0,eG.useState)(0),[a,s]=(0,eG.useState)({}),o=(0,eG.useCallback)(e=>{s(t=>({...t,[e.id]:e}))},[]),l=(0,eG.useCallback)(e=>{s(t=>{let{[e.id]:r,...n}=t;return n})},[]),u=Object.keys(a).length,c=(0,eG.useCallback)(()=>{i(e=>0===u?0:(e+1)%u)},[u]),d=(0,eG.useCallback)(e=>{e>=0&&e{if(n({registerCamera:o,unregisterCamera:l,nextCamera:c,setCameraIndex:d,cameraCount:u}),[o,l,c,d,u]);return(0,eU.jsx)(aP.Provider,{value:f,children:t})}let aG=(0,eG.lazy)(()=>e.A(61921).then(e=>({default:e.AudioEmitter}))),aO={AudioEmitter:function(e){let{audioEnabled:t}=(0,n2.useSettings)();return t?(0,eU.jsx)(aG,{...e}):null},Camera:function(e){let{object:t}=e,{registerCamera:r,unregisterCamera:n}=aL(),i=(0,eG.useId)(),a=(0,n0.getProperty)(t,"dataBlock"),s=(0,eG.useMemo)(()=>(0,n0.getPosition)(t),[t]),o=(0,eG.useMemo)(()=>(0,n0.getRotation)(t),[t]);return(0,eG.useEffect)(()=>{if("Observer"===a){let e={id:i,position:new ek.Vector3(...s),rotation:o};return r(e),()=>{n(e)}}},[i,a,r,n,s,o]),null},ForceFieldBare:(0,eG.lazy)(()=>e.A(25147).then(e=>({default:e.ForceFieldBare}))),InteriorInstance:au,Item:function(e){var t,r;let{object:i}=e,a=n5(),s=null!=(t=(0,n0.getProperty)(i,"dataBlock"))?t:"",o=(0,eG.useMemo)(()=>(0,n0.getPosition)(i),[i]),l=(0,eG.useMemo)(()=>(0,n0.getScale)(i),[i]),u=(0,eG.useMemo)(()=>(0,n0.getRotation)(i),[i]),c=(n||(n=Object.fromEntries(Object.entries(aw).map(e=>{let[t,r]=e;return[t.toLowerCase(),r]}))),n[s.toLowerCase()]);c||console.error(" missing shape for dataBlock: ".concat(s));let d=(null==s?void 0:s.toLowerCase())==="flag",f=null!=(r=null==a?void 0:a.team)?r:null,h=f>0?aF[f]:null,p=d&&h?"".concat(h," Flag"):null;return(0,eU.jsx)(ay,{shapeName:c,type:"Item",children:(0,eU.jsx)("group",{position:o,quaternion:u,scale:l,children:c?(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:c}),children:(0,eU.jsxs)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"pink"}),children:[(0,eU.jsx)(ab,{}),p?(0,eU.jsx)(an.FloatingLabel,{opacity:.6,children:p}):null]})}):(0,eU.jsx)(aD,{color:"orange"})})})},SimGroup:function(e){var t;let{object:r}=e,n=n5(),i=(0,eG.useMemo)(()=>{let e=null,t=!1;if(n&&n.hasTeams){if(t=!0,null!=n.team)e=n.team;else if(r._name){let t=r._name.match(/^team(\d+)$/i);t&&(e=parseInt(t[1],10))}}else r._name&&(t="teams"===r._name.toLowerCase());return{object:r,parent:n,hasTeams:t,team:e}},[r,n]);return(0,eU.jsx)(n8.Provider,{value:i,children:(null!=(t=r._children)?t:[]).map((e,t)=>aH(e,t))})},Sky:function(e){var t;let{object:r}=e,{fogEnabled:n}=(0,n2.useSettings)(),i=(0,n0.getProperty)(r,"materialList"),a=(0,eG.useMemo)(()=>{let e=(0,n0.getProperty)(r,"SkySolidColor");if(e){let[t,r,n]=e.split(" ").map(e=>parseFloat(e));return[new ek.Color().setRGB(t,r,n),new ek.Color().setRGB(t,r,n).convertSRGBToLinear()]}},[r]),s=null!=(t=(0,n0.getInt)(r,"useSkyTextures"))?t:1,o=(0,n0.getFloat)(r,"fogDistance"),l=(0,eG.useMemo)(()=>{let e=(0,n0.getProperty)(r,"fogColor");if(e){let[t,r,n]=e.split(" ").map(e=>parseFloat(e));return[new ek.Color().setRGB(t,r,n),new ek.Color().setRGB(t,r,n).convertSRGBToLinear()]}},[r]),u=a||l,c=u?(0,eU.jsx)("color",{attach:"background",args:[u[0]]}):null;return(0,eU.jsxs)(eU.Fragment,{children:[i&&s?(0,eU.jsx)(eG.Suspense,{fallback:c,children:(0,eU.jsx)(am,{materialList:i,fogColor:n?null==l?void 0:l[1]:void 0,fogDistance:n?o:void 0})}):c,(0,eU.jsx)(eG.Suspense,{children:(0,eU.jsx)(ah,{object:r})}),n&&o&&l?(0,eU.jsx)("fog",{attach:"fog",color:l[1],near:100,far:Math.max(400,2*o)}):null]})},StaticShape:function(e){var t;let{object:n}=e,i=null!=(t=(0,n0.getProperty)(n,"dataBlock"))?t:"",a=(0,eG.useMemo)(()=>(0,n0.getPosition)(n),[n]),s=(0,eG.useMemo)(()=>(0,n0.getRotation)(n),[n]),o=(0,eG.useMemo)(()=>(0,n0.getScale)(n),[n]),l=(r||(r=Object.fromEntries(Object.entries(aM).map(e=>{let[t,r]=e;return[t.toLowerCase(),r]}))),r[i.toLowerCase()]);return l||console.error(" missing shape for dataBlock: ".concat(i)),(0,eU.jsx)(ay,{shapeName:l,type:"StaticShape",children:(0,eU.jsx)("group",{position:a,quaternion:s,scale:o,children:l?(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:l}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"yellow"}),children:(0,eU.jsx)(ab,{})})}):(0,eU.jsx)(aD,{color:"orange"})})})},Sun:function(e){let{object:t}=e;(0,eG.useMemo)(()=>{var e;let[r,n,i]=(null!=(e=(0,n0.getProperty)(t,"direction"))?e:"0 0 -1").split(" ").map(e=>parseFloat(e));return[5e3*r,5e3*n,5e3*i]},[t]);let r=(0,eG.useMemo)(()=>{var e;let[r,n,i]=(null!=(e=(0,n0.getProperty)(t,"color"))?e:"1 1 1 1").split(" ").map(e=>parseFloat(e));return[r,n,i]},[t]),n=(0,eG.useMemo)(()=>{var e;let[r,n,i]=(null!=(e=(0,n0.getProperty)(t,"ambient"))?e:"0.5 0.5 0.5 1").split(" ").map(e=>parseFloat(e));return[r,n,i]},[t]);return(0,eU.jsx)(eU.Fragment,{children:(0,eU.jsx)("hemisphereLight",{args:[new ek.Color(...r),new ek.Color(...n),2]})})},TerrainBlock:n4,TSStatic:function(e){let{object:t}=e,r=(0,n0.getProperty)(t,"shapeName"),n=(0,eG.useMemo)(()=>(0,n0.getPosition)(t),[t]),i=(0,eG.useMemo)(()=>(0,n0.getRotation)(t),[t]),a=(0,eG.useMemo)(()=>(0,n0.getScale)(t),[t]);return r||console.error(" missing shapeName for object",t),(0,eU.jsx)(ay,{shapeName:r,type:"TSStatic",children:(0,eU.jsx)("group",{position:n,quaternion:i,scale:a,children:(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:r}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"yellow"}),children:(0,eU.jsx)(ab,{})})})})})},Turret:function(e){var t;let{object:r}=e,n=null!=(t=(0,n0.getProperty)(r,"dataBlock"))?t:"",i=(0,n0.getProperty)(r,"initialBarrel"),a=(0,eG.useMemo)(()=>(0,n0.getPosition)(r),[r]),s=(0,eG.useMemo)(()=>(0,n0.getRotation)(r),[r]),o=(0,eG.useMemo)(()=>(0,n0.getScale)(r),[r]),l=aI(n),u="string"==typeof i?aI(i):void 0;return l||console.error(" missing shape for dataBlock: ".concat(n)),u||console.error(" missing shape for initialBarrel dataBlock: ".concat(i)),(0,eU.jsx)(ay,{shapeName:l,type:"Turret",children:(0,eU.jsxs)("group",{position:a,quaternion:s,scale:o,children:[l?(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:l}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"yellow"}),children:(0,eU.jsx)(ab,{})})}):(0,eU.jsx)(aD,{color:"orange"}),(0,eU.jsx)(ay,{shapeName:u,type:"Turret",children:(0,eU.jsx)("group",{position:[0,1.5,0],children:u?(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:u}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"yellow"}),children:(0,eU.jsx)(ab,{})})}):(0,eU.jsx)(aD,{color:"orange"})})})]})})},WaterBlock:(0,eG.lazy)(()=>e.A(18599).then(e=>({default:e.WaterBlock}))),WayPoint:function(e){let{object:t}=e;n5();let r=(0,eG.useMemo)(()=>(0,n0.getPosition)(t),[t]),n=(0,n0.getProperty)(t,"name");return n?(0,eU.jsx)(an.FloatingLabel,{position:r,opacity:.6,children:n}):null}};function aH(e,t){let r=aO[e._className];return r?(0,eU.jsx)(eG.Suspense,{children:(0,eU.jsx)(r,{object:e})},t):null}var aN=e.i(77482),ak=e.i(86608),aj=e.i(33870),az=e.i(91996);let aK=async e=>{let t;try{t=(0,nq.getUrlForPath)(e)}catch(t){return console.warn("Script not in manifest: ".concat(e," (").concat(t,")")),null}try{let r=await fetch(t);if(!r.ok)return console.error("Script fetch failed: ".concat(e," (").concat(r.status,")")),null;return await r.text()}catch(t){return console.error("Script fetch error: ".concat(e)),console.error(t),null}},aJ=(0,aj.createScriptCache)(),aV={findFiles:e=>{let t=(0,nY.default)(e,{nocase:!0});return(0,az.getResourceList)().filter(e=>t(e)).map(e=>{let[t,r]=(0,az.getSourceAndPath)(e);return r})},isFile:e=>null!=(0,az.getResourceMap)()[(0,az.getResourceKey)(e)]},aQ=(0,eG.memo)(function(e){let{name:t,onLoadingChange:r}=e,{data:n}=nZ({queryKey:["parsedMission",t],queryFn:()=>(0,nq.loadMission)(t)},nF,void 0),{missionGroup:i,runtime:a}=function(e,t){let[r,n]=(0,eG.useState)({missionGroup:void 0,runtime:void 0});return(0,eG.useEffect)(()=>{if(!t)return;let r=new AbortController,i=t.missionTypes[0],{runtime:a}=(0,ak.runServer)({missionName:e,missionType:i,runtimeOptions:{loadScript:aK,fileSystem:aV,cache:aJ,signal:r.signal,ignoreScripts:["scripts/admin.cs","scripts/ai.cs","scripts/aiCTF.cs","scripts/aiHunters.cs","scripts/deathMessages.cs","scripts/graphBuild.cs","scripts/navGraph.cs","scripts/serverTasks.cs","scripts/spdialog.cs"]},onMissionLoadDone:()=>{n({missionGroup:a.getObjectByName("MissionGroup"),runtime:a})}});return()=>{r.abort(),a.destroy()}},[e,t]),r}(t,n),s=!i||!a;return((0,eG.useEffect)(()=>{null==r||r(s)},[s,r]),s)?null:(0,eU.jsx)(aN.RuntimeProvider,{runtime:a,children:aH(i)})});function aW(e,t){var r=rX(e,t,"update");if(r.set){if(!r.get)throw TypeError("attempted to read set only private field");return"__destrWrapper"in r||(r.__destrWrapper={set value(v){r.set.call(e,v)},get value(){return r.get.call(e)}}),r.__destrWrapper}if(!r.writable)throw TypeError("attempted to set read only private field");return r}var aX=(eA=new WeakMap,class extends r1{build(e,t,r){var n;let i=t.queryKey,a=null!=(n=t.queryHash)?n:nr(i,t),s=this.get(a);return s||(s=new nT({client:e,queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){r_(this,eA).has(e.queryHash)||(r_(this,eA).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=r_(this,eA).get(e.queryHash);t&&(e.destroy(),t===e&&r_(this,eA).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ng.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return r_(this,eA).get(e)}getAll(){return[...r_(this,eA).values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ne(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ne(e,t)):t}notify(e){ng.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ng.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ng.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}constructor(e={}){super(),rY(this,eA,{writable:!0,value:void 0}),this.config=e,rq(this,eA,new Map)}}),a_=(ey=new WeakMap,ex=new WeakMap,eB=new WeakMap,eC=new WeakMap,eS=new WeakSet,class extends nE{setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){r_(this,ex).includes(e)||(r_(this,ex).push(e),this.clearGcTimeout(),r_(this,eB).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){rq(this,ex,r_(this,ex).filter(t=>t!==e)),this.scheduleGc(),r_(this,eB).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){r_(this,ex).length||("pending"===this.state.status?this.scheduleGc():r_(this,eB).remove(this))}continue(){var e,t;return null!=(t=null==(e=r_(this,eC))?void 0:e.continue())?t:this.execute(this.state.variables)}async execute(e){var t,r,n,i,a,s,o,l,u,c,d,f,h,p,m,g,A,y,x,B,C;let S=()=>{r$(this,eS,aZ).call(this,{type:"continue"})},E={client:r_(this,ey),meta:this.options.meta,mutationKey:this.options.mutationKey};rq(this,eC,nS({fn:()=>this.options.mutationFn?this.options.mutationFn(e,E):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{r$(this,eS,aZ).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{r$(this,eS,aZ).call(this,{type:"pause"})},onContinue:S,retry:null!=(t=this.options.retry)?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>r_(this,eB).canRun(this)}));let T="pending"===this.state.status,D=!r_(this,eC).canStart();try{if(T)S();else{r$(this,eS,aZ).call(this,{type:"pending",variables:e,isPaused:D}),await (null==(c=(d=r_(this,eB).config).onMutate)?void 0:c.call(d,e,this,E));let t=await (null==(f=(h=this.options).onMutate)?void 0:f.call(h,e,E));t!==this.state.context&&r$(this,eS,aZ).call(this,{type:"pending",context:t,variables:e,isPaused:D})}let t=await r_(this,eC).start();return await (null==(r=(n=r_(this,eB).config).onSuccess)?void 0:r.call(n,t,e,this.state.context,this,E)),await (null==(i=(a=this.options).onSuccess)?void 0:i.call(a,t,e,this.state.context,E)),await (null==(s=(o=r_(this,eB).config).onSettled)?void 0:s.call(o,t,null,this.state.variables,this.state.context,this,E)),await (null==(l=(u=this.options).onSettled)?void 0:l.call(u,t,null,e,this.state.context,E)),r$(this,eS,aZ).call(this,{type:"success",data:t}),t}catch(t){try{throw await (null==(p=(m=r_(this,eB).config).onError)?void 0:p.call(m,t,e,this.state.context,this,E)),await (null==(g=(A=this.options).onError)?void 0:g.call(A,t,e,this.state.context,E)),await (null==(y=(x=r_(this,eB).config).onSettled)?void 0:y.call(x,void 0,t,this.state.variables,this.state.context,this,E)),await (null==(B=(C=this.options).onSettled)?void 0:B.call(C,void 0,t,e,this.state.context,E)),t}finally{r$(this,eS,aZ).call(this,{type:"error",error:t})}}finally{r_(this,eB).runNext(this)}}constructor(e){super(),r0(this,eS),rY(this,ey,{writable:!0,value:void 0}),rY(this,ex,{writable:!0,value:void 0}),rY(this,eB,{writable:!0,value:void 0}),rY(this,eC,{writable:!0,value:void 0}),rq(this,ey,e.client),this.mutationId=e.mutationId,rq(this,eB,e.mutationCache),rq(this,ex,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}});function aZ(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),ng.batch(()=>{r_(this,ex).forEach(t=>{t.onMutationUpdate(e)}),r_(this,eB).notify({mutation:this,type:"updated",action:e})})}var aY=(eE=new WeakMap,eT=new WeakMap,eD=new WeakMap,class extends r1{build(e,t,r){let n=new a_({client:e,mutationCache:this,mutationId:++aW(this,eD).value,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){r_(this,eE).add(e);let t=aq(e);if("string"==typeof t){let r=r_(this,eT).get(t);r?r.push(e):r_(this,eT).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(r_(this,eE).delete(e)){let t=aq(e);if("string"==typeof t){let r=r_(this,eT).get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&r_(this,eT).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=aq(e);if("string"!=typeof t)return!0;{let r=r_(this,eT).get(t),n=null==r?void 0:r.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=aq(e);if("string"!=typeof t)return Promise.resolve();{var r,n;let i=null==(r=r_(this,eT).get(t))?void 0:r.find(t=>t!==e&&t.state.isPaused);return null!=(n=null==i?void 0:i.continue())?n:Promise.resolve()}}clear(){ng.batch(()=>{r_(this,eE).forEach(e=>{this.notify({type:"removed",mutation:e})}),r_(this,eE).clear(),r_(this,eT).clear()})}getAll(){return Array.from(r_(this,eE))}find(e){let t={exact:!0,...e};return this.getAll().find(e=>nt(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getAll().filter(t=>nt(e,t))}notify(e){ng.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ng.batch(()=>Promise.all(e.map(e=>e.continue().catch(r4))))}constructor(e={}){super(),rY(this,eE,{writable:!0,value:void 0}),rY(this,eT,{writable:!0,value:void 0}),rY(this,eD,{writable:!0,value:void 0}),this.config=e,rq(this,eE,new Set),rq(this,eT,new Map),rq(this,eD,0)}});function aq(e){var t;return null==(t=e.options.scope)?void 0:t.id}function a$(e){return{onFetch:(t,r)=>{var n,i,a,s,o;let l=t.options,u=null==(a=t.fetchOptions)||null==(i=a.meta)||null==(n=i.fetchMore)?void 0:n.direction,c=(null==(s=t.state.data)?void 0:s.pages)||[],d=(null==(o=t.state.data)?void 0:o.pageParams)||[],f={pages:[],pageParams:[]},h=0,p=async()=>{let r=!1,n=np(t.options,t.fetchOptions),i=async(e,i,a)=>{if(r)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let s=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:a?"backward":"forward",meta:t.options.meta};return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)}),e})(),o=await n(s),{maxPages:l}=t.options,u=a?nf:nd;return{pages:u(e.pages,o,l),pageParams:u(e.pageParams,i,l)}};if(u&&c.length){let e="backward"===u,t={pages:c,pageParams:d},r=(e?function(e,t){var r;let{pages:n,pageParams:i}=t;return n.length>0?null==(r=e.getPreviousPageParam)?void 0:r.call(e,n[0],n,i[0],i):void 0}:a0)(l,t);f=await i(t,r,e)}else{let t=null!=e?e:c.length;do{var a;let e=0===h?null!=(a=d[0])?a:l.initialPageParam:a0(l,f);if(h>0&&null==e)break;f=await i(f,e),h++}while(h{var e,n;return null==(e=(n=t.options).persister)?void 0:e.call(n,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=p}}}function a0(e,t){let{pages:r,pageParams:n}=t,i=r.length-1;return r.length>0?e.getNextPageParam(r[i],r,n[i],n):void 0}var a1=(eb=new WeakMap,eM=new WeakMap,ew=new WeakMap,eF=new WeakMap,eR=new WeakMap,eI=new WeakMap,eP=new WeakMap,eL=new WeakMap,class{mount(){aW(this,eI).value++,1===r_(this,eI)&&(rq(this,eP,nm.subscribe(async e=>{e&&(await this.resumePausedMutations(),r_(this,eb).onFocus())})),rq(this,eL,nA.subscribe(async e=>{e&&(await this.resumePausedMutations(),r_(this,eb).onOnline())})))}unmount(){var e,t;aW(this,eI).value--,0===r_(this,eI)&&(null==(e=r_(this,eP))||e.call(this),rq(this,eP,void 0),null==(t=r_(this,eL))||t.call(this),rq(this,eL,void 0))}isFetching(e){return r_(this,eb).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return r_(this,eM).findAll({...e,status:"pending"}).length}getQueryData(e){var t;let r=this.defaultQueryOptions({queryKey:e});return null==(t=r_(this,eb).get(r.queryHash))?void 0:t.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=r_(this,eb).build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(r6(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return r_(this,eb).findAll(e).map(e=>{let{queryKey:t,state:r}=e;return[t,r.data]})}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),i=r_(this,eb).get(n.queryHash),a=null==i?void 0:i.state.data,s="function"==typeof t?t(a):t;if(void 0!==s)return r_(this,eb).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return ng.batch(()=>r_(this,eb).findAll(e).map(e=>{let{queryKey:n}=e;return[n,this.setQueryData(n,t,r)]}))}getQueryState(e){var t;let r=this.defaultQueryOptions({queryKey:e});return null==(t=r_(this,eb).get(r.queryHash))?void 0:t.state}removeQueries(e){let t=r_(this,eb);ng.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=r_(this,eb);return ng.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={revert:!0,...t};return Promise.all(ng.batch(()=>r_(this,eb).findAll(e).map(e=>e.cancel(r)))).then(r4).catch(r4)}invalidateQueries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ng.batch(()=>{var r,n;return(r_(this,eb).findAll(e).forEach(e=>{e.invalidate()}),(null==e?void 0:e.refetchType)==="none")?Promise.resolve():this.refetchQueries({...e,type:null!=(n=null!=(r=null==e?void 0:e.refetchType)?r:null==e?void 0:e.type)?n:"active"},t)})}refetchQueries(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={...r,cancelRefetch:null==(t=r.cancelRefetch)||t};return Promise.all(ng.batch(()=>r_(this,eb).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r4)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r4)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=r_(this,eb).build(this,t);return r.isStaleByTime(r6(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r4).catch(r4)}fetchInfiniteQuery(e){return e.behavior=a$(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r4).catch(r4)}ensureInfiniteQueryData(e){return e.behavior=a$(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nA.isOnline()?r_(this,eM).resumePausedMutations():Promise.resolve()}getQueryCache(){return r_(this,eb)}getMutationCache(){return r_(this,eM)}getDefaultOptions(){return r_(this,ew)}setDefaultOptions(e){rq(this,ew,e)}setQueryDefaults(e,t){r_(this,eF).set(nn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...r_(this,eF).values()],r={};return t.forEach(t=>{ni(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){r_(this,eR).set(nn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...r_(this,eR).values()],r={};return t.forEach(t=>{ni(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...r_(this,ew).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=nr(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===nh&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...r_(this,ew).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){r_(this,eb).clear(),r_(this,eM).clear()}constructor(e={}){rY(this,eb,{writable:!0,value:void 0}),rY(this,eM,{writable:!0,value:void 0}),rY(this,ew,{writable:!0,value:void 0}),rY(this,eF,{writable:!0,value:void 0}),rY(this,eR,{writable:!0,value:void 0}),rY(this,eI,{writable:!0,value:void 0}),rY(this,eP,{writable:!0,value:void 0}),rY(this,eL,{writable:!0,value:void 0}),rq(this,eb,e.queryCache||new aX),rq(this,eM,e.mutationCache||new aY),rq(this,ew,e.defaultOptions||{}),rq(this,eF,new Map),rq(this,eR,new Map),rq(this,eI,0)}}),a2=e.i(8155);let a9=e=>e,a3=e=>{let t=(0,a2.createStore)(e),r=e=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a9,r=eG.default.useSyncExternalStore(e.subscribe,eG.default.useCallback(()=>t(e.getState()),[e,t]),eG.default.useCallback(()=>t(e.getInitialState()),[e,t]));return eG.default.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},a4=eG.createContext(null);function a8(e){let{map:t,children:r,onChange:n,domElement:i}=e,a=t.map(e=>e.name+e.keys).join("-"),s=eG.useMemo(()=>{let e,r;return e=()=>t.reduce((e,t)=>({...e,[t.name]:!1}),{}),(r=(t,r,n)=>{let i=n.subscribe;return n.subscribe=(e,t,r)=>{let a=e;if(t){let i=(null==r?void 0:r.equalityFn)||Object.is,s=e(n.getState());a=r=>{let n=e(r);if(!i(s,n)){let e=s;t(s=n,e)}},(null==r?void 0:r.fireImmediately)&&t(s,s)}return i(a)},e(t,r,n)})?a3(r):a3},[a]),o=eG.useMemo(()=>[s.subscribe,s.getState,s],[a]),l=s.setState;return eG.useEffect(()=>{let e=t.map(e=>{let{name:t,keys:r,up:i}=e;return{keys:r,up:i,fn:e=>{l({[t]:e}),n&&n(t,e,o[1]())}}}).reduce((e,t)=>{let{keys:r,fn:n,up:i=!0}=t;return r.forEach(t=>e[t]={fn:n,pressed:!1,up:i}),e},{}),r=t=>{let{key:r,code:n}=t,i=e[r]||e[n];if(!i)return;let{fn:a,pressed:s,up:o}=i;i.pressed=!0,(o||!s)&&a(!0)},a=t=>{let{key:r,code:n}=t,i=e[r]||e[n];if(!i)return;let{fn:a,up:s}=i;i.pressed=!1,s&&a(!1)},s=i||window;return s.addEventListener("keydown",r,{passive:!0}),s.addEventListener("keyup",a,{passive:!0}),()=>{s.removeEventListener("keydown",r),s.removeEventListener("keyup",a)}},[i,a]),eG.createElement(a4.Provider,{value:o,children:r})}var a5=Object.defineProperty;class a6{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;let r=this._listeners;return void 0!==r[e]&&-1!==r[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;let r=this._listeners[e];if(void 0!==r){let e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;let t=this._listeners[e.type];if(void 0!==t){e.target=this;let r=t.slice(0);for(let t=0,n=r.length;t((e,t,r)=>t in e?a5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r))(this,"_listeners")}}var a7=Object.defineProperty,se=(e,t,r)=>(((e,t,r)=>t in e?a7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),r);let st=new ek.Euler(0,0,0,"YXZ"),sr=new ek.Vector3,sn={type:"change"},si={type:"lock"},sa={type:"unlock"},ss=Math.PI/2;class so extends a6{constructor(e,t){super(),se(this,"camera"),se(this,"domElement"),se(this,"isLocked"),se(this,"minPolarAngle"),se(this,"maxPolarAngle"),se(this,"pointerSpeed"),se(this,"onMouseMove",e=>{this.domElement&&!1!==this.isLocked&&(st.setFromQuaternion(this.camera.quaternion),st.y-=.002*e.movementX*this.pointerSpeed,st.x-=.002*e.movementY*this.pointerSpeed,st.x=Math.max(ss-this.maxPolarAngle,Math.min(ss-this.minPolarAngle,st.x)),this.camera.quaternion.setFromEuler(st),this.dispatchEvent(sn))}),se(this,"onPointerlockChange",()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(si),this.isLocked=!0):(this.dispatchEvent(sa),this.isLocked=!1))}),se(this,"onPointerlockError",()=>{console.error("THREE.PointerLockControls: Unable to use Pointer Lock API")}),se(this,"connect",e=>{this.domElement=e||this.domElement,this.domElement&&(this.domElement.ownerDocument.addEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.addEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.addEventListener("pointerlockerror",this.onPointerlockError))}),se(this,"disconnect",()=>{this.domElement&&(this.domElement.ownerDocument.removeEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.removeEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener("pointerlockerror",this.onPointerlockError))}),se(this,"dispose",()=>{this.disconnect()}),se(this,"getObject",()=>this.camera),se(this,"direction",new ek.Vector3(0,0,-1)),se(this,"getDirection",e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion)),se(this,"moveForward",e=>{sr.setFromMatrixColumn(this.camera.matrix,0),sr.crossVectors(this.camera.up,sr),this.camera.position.addScaledVector(sr,e)}),se(this,"moveRight",e=>{sr.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(sr,e)}),se(this,"lock",()=>{this.domElement&&this.domElement.requestPointerLock()}),se(this,"unlock",()=>{this.domElement&&this.domElement.ownerDocument.exitPointerLock()}),this.camera=e,this.domElement=t,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1,t&&this.connect(t)}}var sl=function(e){return e.forward="forward",e.backward="backward",e.left="left",e.right="right",e.up="up",e.down="down",e.camera1="camera1",e.camera2="camera2",e.camera3="camera3",e.camera4="camera4",e.camera5="camera5",e.camera6="camera6",e.camera7="camera7",e.camera8="camera8",e.camera9="camera9",e}(sl||{});function su(){let{speedMultiplier:e,setSpeedMultiplier:t}=(0,n2.useControls)(),[r,n]=function(e){let[t,r,n]=eG.useContext(a4);return[t,r]}(),{camera:i,gl:a}=(0,eW.useThree)(),{nextCamera:s,setCameraIndex:o,cameraCount:l}=aL(),u=(0,eG.useRef)(null),c=(0,eG.useRef)(new ek.Vector3),d=(0,eG.useRef)(new ek.Vector3),f=(0,eG.useRef)(new ek.Vector3);return(0,eG.useEffect)(()=>{let e=new so(i,a.domElement);u.current=e;let t=t=>{e.isLocked?s():t.target===a.domElement&&e.lock()};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t),e.dispose()}},[i,a,s]),(0,eG.useEffect)(()=>{let e=["camera1","camera2","camera3","camera4","camera5","camera6","camera7","camera8","camera9"];return r(t=>{for(let r=0;r{let e=e=>{e.preventDefault();let r=e.deltaY>0?-1:1,n=Math.max(.05,Math.min(.5,Math.abs(.01*e.deltaY)))*r;t(e=>Math.max(.1,Math.min(5,Math.round((e+n)*20)/20)))},r=a.domElement;return r.addEventListener("wheel",e,{passive:!1}),()=>{r.removeEventListener("wheel",e)}},[a]),(0,eX.useFrame)((t,r)=>{let{forward:a,backward:s,left:o,right:l,up:u,down:h}=n();(a||s||o||l||u||h)&&(i.getWorldDirection(c.current),c.current.normalize(),d.current.crossVectors(i.up,c.current).normalize(),f.current.set(0,0,0),a&&f.current.add(c.current),s&&f.current.sub(c.current),o&&f.current.add(d.current),l&&f.current.sub(d.current),u&&(f.current.y+=1),h&&(f.current.y-=1),f.current.lengthSq()>0&&(f.current.normalize().multiplyScalar(80*e*r),i.position.add(f.current)))}),null}let sc=[{name:"forward",keys:["KeyW"]},{name:"backward",keys:["KeyS"]},{name:"left",keys:["KeyA"]},{name:"right",keys:["KeyD"]},{name:"up",keys:["Space"]},{name:"down",keys:["ShiftLeft","ShiftRight"]},{name:"camera1",keys:["Digit1"]},{name:"camera2",keys:["Digit2"]},{name:"camera3",keys:["Digit3"]},{name:"camera4",keys:["Digit4"]},{name:"camera5",keys:["Digit5"]},{name:"camera6",keys:["Digit6"]},{name:"camera7",keys:["Digit7"]},{name:"camera8",keys:["Digit8"]},{name:"camera9",keys:["Digit9"]}];function sd(){return(0,eG.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key||e.metaKey&&e.stopImmediatePropagation()};return window.addEventListener("keydown",e,{capture:!0}),window.addEventListener("keyup",e,{capture:!0}),()=>{window.removeEventListener("keydown",e,{capture:!0}),window.removeEventListener("keyup",e,{capture:!0})}},[]),(0,eU.jsx)(a8,{map:sc,children:(0,eU.jsx)(su,{})})}var sf=function(){var e;return"undefined"!=typeof window&&!!(null==(e=window.document)?void 0:e.createElement)}();function sh(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function sp(e){return e?"self"in e?e.self:sh(e).defaultView||window:self}function sm(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{activeElement:r}=sh(e);if(!(null==r?void 0:r.nodeName))return null;if(sg(r)&&r.contentDocument)return sm(r.contentDocument.body,t);if(t){let e=r.getAttribute("aria-activedescendant");if(e){let t=sh(r).getElementById(e);if(t)return t}}return r}function sv(e,t){return e===t||e.contains(t)}function sg(e){return"IFRAME"===e.tagName}function sA(e){let t=e.tagName.toLowerCase();return"button"===t||"input"===t&&!!e.type&&-1!==sy.indexOf(e.type)}var sy=["button","color","file","image","reset","submit"];function sx(e){return"function"==typeof e.checkVisibility?e.checkVisibility():e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function sB(e){try{let t=e instanceof HTMLInputElement&&null!==e.selectionStart,r="TEXTAREA"===e.tagName;return t||r||!1}catch(e){return!1}}function sC(e){return e.isContentEditable||sB(e)}function sS(e){let t=0,r=0;if(sB(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let n=sh(e).getSelection();if((null==n?void 0:n.rangeCount)&&n.anchorNode&&sv(e,n.anchorNode)&&n.focusNode&&sv(e,n.focusNode)){let i=n.getRangeAt(0),a=i.cloneRange();a.selectNodeContents(e),a.setEnd(i.startContainer,i.startOffset),t=a.toString().length,a.setEnd(i.endContainer,i.endOffset),r=a.toString().length}}return{start:t,end:r}}function sE(e,t){let r=null==e?void 0:e.getAttribute("role");return r&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(r)?r:t}function sT(e){if(!e)return null;let t=e=>"auto"===e||"scroll"===e;if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:r}=getComputedStyle(e);if(t(r))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:r}=getComputedStyle(e);if(t(r))return e}return sT(e.parentElement)||document.scrollingElement||document.body}function sD(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n{if(n){let t=setTimeout(e,n);return()=>clearTimeout(t)}let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})(()=>{e.removeEventListener(t,a,!0),r()}),a=()=>{i(),r()};return e.addEventListener(t,a,{once:!0,capture:!0}),i}function s_(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,i=[];try{for(let a of(n.document.addEventListener(e,t,r),Array.from(n.frames)))i.push(s_(e,t,r,a))}catch(e){}return()=>{try{n.document.removeEventListener(e,t,r)}catch(e){}for(let e of i)e()}}var sZ={...eG},sY=sZ.useId;sZ.useDeferredValue;var sq=sZ.useInsertionEffect,s$=sf?eG.useLayoutEffect:eG.useEffect;function s0(e){let t=(0,eG.useRef)(()=>{throw Error("Cannot call an event handler while rendering.")});return sq?sq(()=>{t.current=e}):t.current=e,(0,eG.useCallback)(function(){for(var e,r=arguments.length,n=Array(r),i=0;i{if(t.some(Boolean))return e=>{for(let r of t)sN(r,e)}},t)}function s2(e){if(sY){let t=sY();return e||t}let[t,r]=(0,eG.useState)(e);return s$(()=>{if(e||t)return;let n=Math.random().toString(36).slice(2,8);r("id-".concat(n))},[e,t]),e||t}function s9(e,t){let r=(0,eG.useRef)(!1);(0,eG.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,eG.useEffect)(()=>()=>{r.current=!1},[])}function s3(){return(0,eG.useReducer)(()=>[],[])}function s4(e){return s0("function"==typeof e?e:()=>e)}function s8(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=(0,eG.useCallback)(r=>(e.wrapElement&&(r=e.wrapElement(r)),t(r)),[...r,e.wrapElement]);return{...e,wrapElement:n}}function s5(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0,[r,n]=(0,eG.useState)(null);return{portalRef:s1(n,t),portalNode:r,domReady:!e||r}}var s6=!1,s7=!1,oe=0,ot=0;function or(e){(function(e){let t=e.movementX||e.screenX-oe,r=e.movementY||e.screenY-ot;return oe=e.screenX,ot=e.screenY,t||r||!1})(e)&&(s7=!0)}function on(){s7=!1}function oi(e){let t=eG.forwardRef((t,r)=>e({...t,ref:r}));return t.displayName=e.displayName||e.name,t}function oa(e,t){return eG.memo(e,t)}function os(e,t){let r,{wrapElement:n,render:i,...a}=t,s=s1(t.ref,i&&(0,eG.isValidElement)(i)&&("ref"in i.props||"ref"in i)?({...i.props}).ref||i.ref:null);if(eG.isValidElement(i)){let e={...i.props,ref:s};r=eG.cloneElement(i,function(e,t){let r={...e};for(let n in t){if(!sR(t,n))continue;if("className"===n){let n="className";r[n]=e[n]?"".concat(e[n]," ").concat(t[n]):t[n];continue}if("style"===n){let n="style";r[n]=e[n]?{...e[n],...t[n]}:t[n];continue}let i=t[n];if("function"==typeof i&&n.startsWith("on")){let t=e[n];if("function"==typeof t){r[n]=function(){for(var e=arguments.length,r=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return e(t)};return t.displayName=e.name,t}function ol(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=eG.createContext(void 0),n=eG.createContext(void 0),i=()=>eG.useContext(r),a=t=>e.reduceRight((e,r)=>(0,eU.jsx)(r,{...t,children:e}),(0,eU.jsx)(r.Provider,{...t}));return{context:r,scopedContext:n,useContext:i,useScopedContext:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=eG.useContext(n),r=i();return e?t:t||r},useProviderContext:()=>{let e=eG.useContext(n),t=i();if(!e||e!==t)return t},ContextProvider:a,ScopedContextProvider:e=>(0,eU.jsx)(a,{...e,children:t.reduceRight((t,r)=>(0,eU.jsx)(r,{...e,children:t}),(0,eU.jsx)(n.Provider,{...e}))})}}var ou=ol(),oc=ou.useContext;ou.useScopedContext,ou.useProviderContext;var od=ol([ou.ContextProvider],[ou.ScopedContextProvider]),of=od.useContext;od.useScopedContext;var oh=od.useProviderContext,op=od.ContextProvider,om=od.ScopedContextProvider,ov=(0,eG.createContext)(void 0),og=(0,eG.createContext)(void 0),oA=(0,eG.createContext)(!0),oy="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function ox(e){return!(!e.matches(oy)||!sx(e)||e.closest("[inert]"))}function oB(e){if(!ox(e)||0>Number.parseInt(e.getAttribute("tabindex")||"0",10))return!1;if(!("form"in e)||!e.form||e.checked||"radio"!==e.type)return!0;let t=e.form.elements.namedItem(e.name);if(!t||!("length"in t))return!0;let r=sm(e);return!r||r===e||!("form"in r)||r.form!==e.form||r.name!==e.name}function oC(e,t){let r=Array.from(e.querySelectorAll(oy));t&&r.unshift(e);let n=r.filter(ox);return n.forEach((e,t)=>{if(sg(e)&&e.contentDocument){let r=e.contentDocument.body;n.splice(t,1,...oC(r))}}),n}function oS(e,t,r){let n=Array.from(e.querySelectorAll(oy)),i=n.filter(oB);return(t&&oB(e)&&i.unshift(e),i.forEach((e,t)=>{if(sg(e)&&e.contentDocument){let n=oS(e.contentDocument.body,!1,r);i.splice(t,1,...n)}}),!i.length&&r)?n:i}function oE(e,t){return function(e,t,r,n){let i=sm(e),a=oC(e,t),s=a.indexOf(i),o=a.slice(s+1);return o.find(oB)||(r?a.find(oB):null)||(n?o[0]:null)||null}(document.body,!1,e,t)}function oT(e,t){return function(e,t,r,n){let i=sm(e),a=oC(e,t).reverse(),s=a.indexOf(i),o=a.slice(s+1);return o.find(oB)||(r?a.find(oB):null)||(n?o[0]:null)||null}(document.body,!1,e,t)}function oD(e){let t=sm(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return!!r&&r===e.id}function ob(e){let t=sm(e);if(!t)return!1;if(sv(e,t))return!0;let r=t.getAttribute("aria-activedescendant");return!!r&&"id"in e&&(r===e.id||!!e.querySelector("#".concat(CSS.escape(r))))}function oM(e){!ob(e)&&ox(e)&&e.focus()}var ow=sz(),oF=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],oR=Symbol("safariFocusAncestor");function oI(e){return"input"===e.tagName.toLowerCase()&&!!e.type&&("radio"===e.type||"checkbox"===e.type)}function oP(e,t){return s0(r=>{null==e||e(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var oL=!1,oU=!0;function oG(e){let t=e.target;t&&"hasAttribute"in t&&!t.hasAttribute("data-focus-visible")&&(oU=!1)}function oO(e){e.metaKey||e.ctrlKey||e.altKey||(oU=!0)}var oH=oo(function(e){var t,r,n,i,a;let{focusable:s=!0,accessibleWhenDisabled:o,autoFocus:l,onFocusVisible:u,...c}=e,d=(0,eG.useRef)(null);(0,eG.useEffect)(()=>{s&&(oL||(s_("mousedown",oG,!0),s_("keydown",oO,!0),oL=!0))},[s]),ow&&(0,eG.useEffect)(()=>{if(!s)return;let e=d.current;if(!e||!oI(e))return;let t="labels"in e?e.labels:null;if(!t)return;let r=()=>queueMicrotask(()=>e.focus());for(let e of t)e.addEventListener("mouseup",r);return()=>{for(let e of t)e.removeEventListener("mouseup",r)}},[s]);let f=s&&sG(c),h=!!f&&!o,[p,m]=(0,eG.useState)(!1);(0,eG.useEffect)(()=>{s&&h&&p&&m(!1)},[s,h,p]),(0,eG.useEffect)(()=>{if(!s||!p)return;let e=d.current;if(!e||"undefined"==typeof IntersectionObserver)return;let t=new IntersectionObserver(()=>{ox(e)||m(!1)});return t.observe(e),()=>t.disconnect()},[s,p]);let g=oP(c.onKeyPressCapture,f),A=oP(c.onMouseDownCapture,f),y=oP(c.onClickCapture,f),x=c.onMouseDown,B=s0(e=>{if(null==x||x(e),e.defaultPrevented||!s)return;let t=e.currentTarget;if(!ow||sK(e)||!sA(t)&&!oI(t))return;let r=!1,n=()=>{r=!0};t.addEventListener("focusin",n,{capture:!0,once:!0});let i=function(e){for(;e&&!ox(e);)e=e.closest(oy);return e||null}(t.parentElement);i&&(i[oR]=!0),sX(t,"mouseup",()=>{t.removeEventListener("focusin",n,!0),i&&(i[oR]=!1),r||oM(t)})}),C=(e,t)=>{if(t&&(e.currentTarget=t),!s)return;let r=e.currentTarget;r&&oD(r)&&(null==u||u(e),e.defaultPrevented||(r.dataset.focusVisible="true",m(!0)))},S=c.onKeyDownCapture,E=s0(e=>{if(null==S||S(e),e.defaultPrevented||!s||p||e.metaKey||e.altKey||e.ctrlKey||!sJ(e))return;let t=e.currentTarget;sX(t,"focusout",()=>C(e,t))}),T=c.onFocusCapture,D=s0(e=>{if(null==T||T(e),e.defaultPrevented||!s)return;if(!sJ(e))return void m(!1);let t=e.currentTarget;oU||function(e){let{tagName:t,readOnly:r,type:n}=e;return"TEXTAREA"===t&&!r||"SELECT"===t&&!r||("INPUT"!==t||r?!!e.isContentEditable||"combobox"===e.getAttribute("role")&&!!e.dataset.name:oF.includes(n))}(e.target)?sX(e.target,"focusout",()=>C(e,t)):m(!1)}),b=c.onBlur,M=s0(e=>{null==b||b(e),s&&sW(e)&&(e.currentTarget.removeAttribute("data-focus-visible"),m(!1))}),w=(0,eG.useContext)(oA),F=s0(e=>{s&&l&&e&&w&&queueMicrotask(()=>{!oD(e)&&ox(e)&&e.focus()})}),R=function(e,t){let r=e=>{if("string"==typeof e)return e},[n,i]=(0,eG.useState)(()=>r(void 0));return s$(()=>{let t=e&&"current"in e?e.current:e;i((null==t?void 0:t.tagName.toLowerCase())||r(void 0))},[e,t]),n}(d),I=s&&(!R||"button"===R||"summary"===R||"input"===R||"select"===R||"textarea"===R||"a"===R),P=s&&(!R||"button"===R||"input"===R||"select"===R||"textarea"===R),L=c.style,U=(0,eG.useMemo)(()=>h?{pointerEvents:"none",...L}:L,[h,L]);return c={"data-focus-visible":s&&p||void 0,"data-autofocus":l||void 0,"aria-disabled":f||void 0,...c,ref:s1(d,F,c.ref),style:U,tabIndex:(t=s,r=h,n=I,i=P,a=c.tabIndex,t?r?n&&!i?-1:void 0:n?a:a||0:a),disabled:!!P&&!!h||void 0,contentEditable:f?void 0:c.contentEditable,onKeyPressCapture:g,onClickCapture:y,onMouseDownCapture:A,onMouseDown:B,onKeyDownCapture:E,onFocusCapture:D,onBlur:M},sO(c)});function oN(e){let t=[];for(let r of e)t.push(...r);return t}function ok(e){return e.slice().reverse()}function oj(e,t,r){return s0(n=>{var i;if(null==t||t(n),n.defaultPrevented||n.isPropagationStopped()||!sJ(n)||"Shift"===n.key||"Control"===n.key||"Alt"===n.key||"Meta"===n.key||function(e){let t=e.target;return(!t||!!sB(t))&&1===e.key.length&&!e.ctrlKey&&!e.metaKey}(n))return;let a=e.getState(),s=null==(i=sb(e,a.activeId))?void 0:i.element;if(!s)return;let{view:o,...l}=n;s!==(null==r?void 0:r.current)&&s.focus(),!function(e,t,r){let n=new KeyboardEvent(t,r);return e.dispatchEvent(n)}(s,n.type,l)&&n.preventDefault(),n.currentTarget.contains(s)&&n.stopPropagation()})}oi(function(e){return os("div",oH(e))});var oz=oo(function(e){let{store:t,composite:r=!0,focusOnMove:n=r,moveOnKeyPress:i=!0,...a}=e,s=oh();sL(t=t||s,!1);let o=(0,eG.useRef)(null),l=(0,eG.useRef)(null),u=function(e){let[t,r]=(0,eG.useState)(!1),n=(0,eG.useCallback)(()=>r(!0),[]),i=e.useState(t=>sb(e,t.activeId));return(0,eG.useEffect)(()=>{let e=null==i?void 0:i.element;t&&e&&(r(!1),e.focus({preventScroll:!0}))},[i,t]),n}(t),c=t.useState("moves"),[,d]=function(e){let[t,r]=(0,eG.useState)(null);return s$(()=>{if(null==t||!e)return;let r=null;return e(e=>(r=e,t)),()=>{e(r)}},[t,e]),[t,r]}(r?t.setBaseElement:null);(0,eG.useEffect)(()=>{var e;if(!t||!c||!r||!n)return;let{activeId:i}=t.getState(),a=null==(e=sb(t,i))?void 0:e.element;a&&("scrollIntoView"in a?(a.focus({preventScroll:!0}),a.scrollIntoView({block:"nearest",inline:"nearest",...void 0})):a.focus())},[t,c,r,n]),s$(()=>{if(!t||!c||!r)return;let{baseElement:e,activeId:n}=t.getState();if(null!==n||!e)return;let i=l.current;l.current=null,i&&sV(i,{relatedTarget:e}),oD(e)||e.focus()},[t,c,r]);let f=t.useState("activeId"),h=t.useState("virtualFocus");s$(()=>{var e;if(!t||!r||!h)return;let n=l.current;if(l.current=null,!n)return;let i=(null==(e=sb(t,f))?void 0:e.element)||sm(n);i!==n&&sV(n,{relatedTarget:i})},[t,f,h,r]);let p=oj(t,a.onKeyDownCapture,l),m=oj(t,a.onKeyUpCapture,l),g=a.onFocusCapture,A=s0(e=>{if(null==g||g(e),e.defaultPrevented||!t)return;let{virtualFocus:r}=t.getState();if(!r)return;let n=e.relatedTarget,i=function(e){let t=e[sM];return delete e[sM],t}(e.currentTarget);sJ(e)&&i&&(e.stopPropagation(),l.current=n)}),y=a.onFocus,x=s0(e=>{if(null==y||y(e),e.defaultPrevented||!r||!t)return;let{relatedTarget:n}=e,{virtualFocus:i}=t.getState();i?sJ(e)&&!sw(t,n)&&queueMicrotask(u):sJ(e)&&t.setActiveId(null)}),B=a.onBlurCapture,C=s0(e=>{var r;if(null==B||B(e),e.defaultPrevented||!t)return;let{virtualFocus:n,activeId:i}=t.getState();if(!n)return;let a=null==(r=sb(t,i))?void 0:r.element,s=e.relatedTarget,o=sw(t,s),u=l.current;l.current=null,sJ(e)&&o?(s===a?u&&u!==s&&sV(u,e):a?sV(a,e):u&&sV(u,e),e.stopPropagation()):!sw(t,e.target)&&a&&sV(a,e)}),S=a.onKeyDown,E=s4(i),T=s0(e=>{var r;if(null==S||S(e),e.nativeEvent.isComposing||e.defaultPrevented||!t||!sJ(e))return;let{orientation:n,renderedItems:i,activeId:a}=t.getState(),s=sb(t,a);if(null==(r=null==s?void 0:s.element)?void 0:r.isConnected)return;let o="horizontal"!==n,l="vertical"!==n,u=i.some(e=>!!e.rowId);if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&sB(e.currentTarget))return;let c={ArrowUp:(u||o)&&(()=>{if(u){let e=oN(ok(function(e){let t=[];for(let r of e){let e=t.find(e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===r.rowId});e?e.push(r):t.push([r])}return t}(i))).find(e=>!e.disabled);return null==e?void 0:e.id}return null==t?void 0:t.last()}),ArrowRight:(u||l)&&t.first,ArrowDown:(u||o)&&t.first,ArrowLeft:(u||l)&&t.last,Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[e.key];if(c){let r=c();if(void 0!==r){if(!E(e))return;e.preventDefault(),t.move(r)}}});return a=s8(a,e=>(0,eU.jsx)(op,{value:t,children:e}),[t]),a={"aria-activedescendant":t.useState(e=>{var n;if(t&&r&&e.virtualFocus)return null==(n=sb(t,e.activeId))?void 0:n.id}),...a,ref:s1(o,d,a.ref),onKeyDownCapture:p,onKeyUpCapture:m,onFocusCapture:A,onFocus:x,onBlurCapture:C,onKeyDown:T},a=oH({focusable:t.useState(e=>r&&(e.virtualFocus||null===e.activeId)),...a})});oi(function(e){return os("div",oz(e))});var oK=ol();oK.useContext,oK.useScopedContext;var oJ=oK.useProviderContext,oV=ol([oK.ContextProvider],[oK.ScopedContextProvider]);oV.useContext,oV.useScopedContext;var oQ=oV.useProviderContext,oW=oV.ContextProvider,oX=oV.ScopedContextProvider,o_=(0,eG.createContext)(void 0),oZ=(0,eG.createContext)(void 0),oY=ol([oW],[oX]);oY.useContext,oY.useScopedContext;var oq=oY.useProviderContext,o$=oY.ContextProvider,o0=oY.ScopedContextProvider,o1=oo(function(e){let{store:t,...r}=e,n=oq();return t=t||n,r={...r,ref:s1(null==t?void 0:t.setAnchorElement,r.ref)}});oi(function(e){return os("div",o1(e))});var o2=(0,eG.createContext)(void 0),o9=ol([o$,op],[o0,om]),o3=o9.useContext,o4=o9.useScopedContext,o8=o9.useProviderContext,o5=o9.ContextProvider,o6=o9.ScopedContextProvider,o7=(0,eG.createContext)(void 0),le=(0,eG.createContext)(!1);function lt(e,t){let r=e.__unstableInternals;return sL(r,"Invalid store"),r[t]}function lr(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:d;return r.add(t),p.set(t,e),()=>{var e;null==(e=h.get(t))||e(),h.delete(t),p.delete(t),r.delete(t)}},g=function(e,t){var n,o;let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!sR(i,e))return;let c=(o=i[e],"function"==typeof t?t("function"==typeof o?o():o):t);if(c===i[e])return;if(!l)for(let t of r)null==(n=null==t?void 0:t.setState)||n.call(t,e,c);let m=i;i={...i,[e]:c};let g=Symbol();s=g,u.add(e);let A=(t,r,n)=>{var a;let s=p.get(t);(!s||s.some(t=>n?n.has(t):t===e))&&(null==(a=h.get(t))||a(),h.set(t,t(i,r)))};for(let e of d)A(e,m);queueMicrotask(()=>{if(s!==g)return;let e=i;for(let e of f)A(e,a,u);a=e,u.clear()})},A={getState:()=>i,setState:g,__unstableInternals:{setup:e=>(c.add(e),()=>c.delete(e)),init:()=>{let e=l.size,t=Symbol();l.add(t);let n=()=>{l.delete(t),l.size||o()};if(e)return n;let a=Object.keys(i).map(e=>sI(...r.map(t=>{var r;let n=null==(r=null==t?void 0:t.getState)?void 0:r.call(t);if(n&&sR(n,e))return ls(t,[e],t=>{g(e,t[e],!0)})}))),s=[];for(let e of c)s.push(e());return o=sI(...a,...s,...r.map(li)),n},subscribe:(e,t)=>m(e,t),sync:(e,t)=>(h.set(t,t(i,i)),m(e,t)),batch:(e,t)=>(h.set(t,t(i,a)),m(e,t,f)),pick:e=>lr(function(e,t){let r={};for(let n of t)sR(e,n)&&(r[n]=e[n]);return r}(i,e),A),omit:e=>lr(function(e,t){let r={...e};for(let e of t)sR(r,e)&&delete r[e];return r}(i,e),A)}};return A}function ln(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n!e.disabled&&e.value);return(null==n?void 0:n.value)===t}function lf(e,t){return!!t&&null!=e&&(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase()))}var lh=oo(function(e){let{store:t,focusable:r=!0,autoSelect:n=!1,getAutoSelectId:i,setValueOnChange:a,showMinLength:s=0,showOnChange:o,showOnMouseDown:l,showOnClick:u=l,showOnKeyDown:c,showOnKeyPress:d=c,blurActiveItemOnClick:f,setValueOnClick:h=!0,moveOnKeyPress:p=!0,autoComplete:m="list",...g}=e,A=o8();sL(t=t||A,!1);let y=(0,eG.useRef)(null),[x,B]=s3(),C=(0,eG.useRef)(!1),S=(0,eG.useRef)(!1),E=t.useState(e=>e.virtualFocus&&n),T="inline"===m||"both"===m,[D,b]=(0,eG.useState)(T);!function(e,t){let r=(0,eG.useRef)(!1);s$(()=>{if(r.current)return e();r.current=!0},t),s$(()=>()=>{r.current=!1},[])}(()=>{T&&b(!0)},[T]);let M=t.useState("value"),w=(0,eG.useRef)();(0,eG.useEffect)(()=>ls(t,["selectedValue","activeId"],(e,t)=>{w.current=t.selectedValue}),[]);let F=t.useState(e=>{var t;if(T&&D){if(e.activeValue&&Array.isArray(e.selectedValue)&&(e.selectedValue.includes(e.activeValue)||(null==(t=w.current)?void 0:t.includes(e.activeValue))))return;return e.activeValue}}),R=t.useState("renderedItems"),I=t.useState("open"),P=t.useState("contentElement"),L=(0,eG.useMemo)(()=>{if(!T||!D)return M;if(ld(R,F,E)){if(lf(M,F)){let e=(null==F?void 0:F.slice(M.length))||"";return M+e}return M}return F||M},[T,D,R,F,E,M]);(0,eG.useEffect)(()=>{let e=y.current;if(!e)return;let t=()=>b(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}},[]),(0,eG.useEffect)(()=>{if(!T||!D||!F||!ld(R,F,E)||!lf(M,F))return;let e=sF;return queueMicrotask(()=>{let t=y.current;if(!t)return;let{start:r,end:n}=sS(t),i=M.length,a=F.length;sD(t,i,a),e=()=>{if(!oD(t))return;let{start:e,end:s}=sS(t);e===i&&s===a&&sD(t,r,n)}}),()=>e()},[x,T,D,F,R,E,M]);let U=(0,eG.useRef)(null),G=s0(i),O=(0,eG.useRef)(null);(0,eG.useEffect)(()=>{if(!I||!P)return;let e=sT(P);if(!e)return;U.current=e;let r=()=>{C.current=!1},n=()=>{if(!t||!C.current)return;let{activeId:e}=t.getState();null!==e&&e!==O.current&&(C.current=!1)},i={passive:!0,capture:!0};return e.addEventListener("wheel",r,i),e.addEventListener("touchmove",r,i),e.addEventListener("scroll",n,i),()=>{e.removeEventListener("wheel",r,!0),e.removeEventListener("touchmove",r,!0),e.removeEventListener("scroll",n,!0)}},[I,P,t]),s$(()=>{M&&(S.current||(C.current=!0))},[M]),s$(()=>{"always"!==E&&I||(C.current=I)},[E,I]);let H=t.useState("resetValueOnSelect");s9(()=>{var e,r;let n=C.current;if(!t||!I||!n&&!H)return;let{baseElement:i,contentElement:a,activeId:s}=t.getState();if(!i||oD(i)){if(null==a?void 0:a.hasAttribute("data-placing")){let e=new MutationObserver(B);return e.observe(a,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(E&&n){let r=G(R),n=void 0!==r?r:null!=(e=function(e){let t=e.find(e=>{var t;return!e.disabled&&(null==(t=e.element)?void 0:t.getAttribute("role"))!=="tab"});return null==t?void 0:t.id}(R))?e:t.first();O.current=n,t.move(null!=n?n:null)}else{let e=null==(r=t.item(s||t.first()))?void 0:r.element;e&&"scrollIntoView"in e&&e.scrollIntoView({block:"nearest",inline:"nearest"})}}},[t,I,x,M,E,H,G,R]),(0,eG.useEffect)(()=>{if(!T)return;let e=y.current;if(!e)return;let r=[e,P].filter(e=>!!e),n=e=>{r.every(t=>sW(e,t))&&(null==t||t.setValue(L))};for(let e of r)e.addEventListener("focusout",n);return()=>{for(let e of r)e.removeEventListener("focusout",n)}},[T,P,t,L]);let N=e=>e.currentTarget.value.length>=s,k=g.onChange,j=s4(null!=o?o:N),z=s4(null!=a?a:!t.tag),K=s0(e=>{if(null==k||k(e),e.defaultPrevented||!t)return;let r=e.currentTarget,{value:n,selectionStart:i,selectionEnd:a}=r,s=e.nativeEvent;if(C.current=!0,"input"===s.type&&(s.isComposing&&(C.current=!1,S.current=!0),T)){let e="insertText"===s.inputType||"insertCompositionText"===s.inputType,t=i===n.length;b(e&&t)}if(z(e)){let e=n===t.getState().value;t.setValue(n),queueMicrotask(()=>{sD(r,i,a)}),T&&E&&e&&B()}j(e)&&t.show(),E&&C.current||t.setActiveId(null)}),J=g.onCompositionEnd,V=s0(e=>{C.current=!0,S.current=!1,null==J||J(e),!e.defaultPrevented&&E&&B()}),Q=g.onMouseDown,W=s4(null!=f?f:()=>!!(null==t?void 0:t.getState().includesBaseElement)),X=s4(h),_=s4(null!=u?u:N),Z=s0(e=>{null==Q||Q(e),e.defaultPrevented||e.button||e.ctrlKey||t&&(W(e)&&t.setActiveId(null),X(e)&&t.setValue(L),_(e)&&sX(e.currentTarget,"mouseup",t.show))}),Y=g.onKeyDown,q=s4(null!=d?d:N),$=s0(e=>{if(null==Y||Y(e),e.repeat||(C.current=!1),e.defaultPrevented||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||!t)return;let{open:r}=t.getState();!r&&("ArrowUp"===e.key||"ArrowDown"===e.key)&&q(e)&&(e.preventDefault(),t.show())}),ee=g.onBlur,et=s0(e=>{if(C.current=!1,null==ee||ee(e),e.defaultPrevented)return}),er=s2(g.id),en=t.useState(e=>null===e.activeId);return g={id:er,role:"combobox","aria-autocomplete":"inline"===m||"list"===m||"both"===m||"none"===m?m:void 0,"aria-haspopup":sE(P,"listbox"),"aria-expanded":I,"aria-controls":null==P?void 0:P.id,"data-active-item":en||void 0,value:L,...g,ref:s1(y,g.ref),onChange:K,onCompositionEnd:V,onMouseDown:Z,onKeyDown:$,onBlur:et},g=oz({store:t,focusable:r,...g,moveOnKeyPress:e=>!sU(p,e)&&(T&&b(!0),!0)}),{autoComplete:"off",...g=o1({store:t,...g})}}),lp=oi(function(e){return os("input",lh(e))});function lm(e){let t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var lv=Symbol("composite-hover"),lg=oo(function(e){let{store:t,focusOnHover:r=!0,blurOnHoverEnd:n=!!r,...i}=e,a=of();sL(t=t||a,!1);let s=((0,eG.useEffect)(()=>{s6||(s_("mousemove",or,!0),s_("mousedown",on,!0),s_("mouseup",on,!0),s_("keydown",on,!0),s_("scroll",on,!0),s6=!0)},[]),s0(()=>s7)),o=i.onMouseMove,l=s4(r),u=s0(e=>{if((null==o||o(e),!e.defaultPrevented&&s())&&l(e)){if(!ob(e.currentTarget)){let e=null==t?void 0:t.getState().baseElement;e&&!oD(e)&&e.focus()}null==t||t.setActiveId(e.currentTarget.id)}}),c=i.onMouseLeave,d=s4(n),f=s0(e=>{var r;null==c||c(e),!(e.defaultPrevented||!s()||function(e){let t=lm(e);return!!t&&sv(e.currentTarget,t)}(e)||function(e){let t=lm(e);if(!t)return!1;do{if(sR(t,lv)&&t[lv])return!0;t=t.parentElement}while(t)return!1}(e))&&l(e)&&d(e)&&(null==t||t.setActiveId(null),null==(r=null==t?void 0:t.getState().baseElement)||r.focus())}),h=(0,eG.useCallback)(e=>{e&&(e[lv]=!0)},[]);return sO(i={...i,ref:s1(h,i.ref),onMouseMove:u,onMouseLeave:f})});oa(oi(function(e){return os("div",lg(e))}));var lA=oo(function(e){let{store:t,shouldRegisterItem:r=!0,getItem:n=sP,element:i,...a}=e,s=oc();t=t||s;let o=s2(a.id),l=(0,eG.useRef)(i);return(0,eG.useEffect)(()=>{let e=l.current;if(!o||!e||!r)return;let i=n({id:o,element:e});return null==t?void 0:t.renderItem(i)},[o,r,n,t]),sO(a={...a,ref:s1(l,a.ref)})});function ly(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return"Enter"===e.key?sA(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(sA(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}oi(function(e){return os("div",lA(e))});var lx=Symbol("command"),lB=oo(function(e){let{clickOnEnter:t=!0,clickOnSpace:r=!0,...n}=e,i=(0,eG.useRef)(null),[a,s]=(0,eG.useState)(!1);(0,eG.useEffect)(()=>{i.current&&s(sA(i.current))},[]);let[o,l]=(0,eG.useState)(!1),u=(0,eG.useRef)(!1),c=sG(n),[d,f]=function(e,t,r){let n=e.onLoadedMetadataCapture,i=(0,eG.useMemo)(()=>Object.assign(()=>{},{...n,[t]:r}),[n,t,r]);return[null==n?void 0:n[t],{onLoadedMetadataCapture:i}]}(n,lx,!0),h=n.onKeyDown,p=s0(e=>{null==h||h(e);let n=e.currentTarget;if(e.defaultPrevented||d||c||!sJ(e)||sB(n)||n.isContentEditable)return;let i=t&&"Enter"===e.key,a=r&&" "===e.key,s="Enter"===e.key&&!t,o=" "===e.key&&!r;if(s||o)return void e.preventDefault();if(i||a){let t=ly(e);if(i){if(!t){e.preventDefault();let{view:t,...r}=e,i=()=>sQ(n,r);sf&&/firefox\//i.test(navigator.userAgent)?sX(n,"keyup",i):queueMicrotask(i)}}else a&&(u.current=!0,t||(e.preventDefault(),l(!0)))}}),m=n.onKeyUp,g=s0(e=>{if(null==m||m(e),e.defaultPrevented||d||c||e.metaKey)return;let t=r&&" "===e.key;if(u.current&&t&&(u.current=!1,!ly(e))){e.preventDefault(),l(!1);let t=e.currentTarget,{view:r,...n}=e;queueMicrotask(()=>sQ(t,n))}});return oH(n={"data-active":o||void 0,type:a?"button":void 0,...f,...n,ref:s1(i,n.ref),onKeyDown:p,onKeyUp:g})});oi(function(e){return os("button",lB(e))});var{useSyncExternalStore:lC}=e.i(2239).default,lS=()=>()=>{};function lE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sP,r=eG.useCallback(t=>e?la(e,null,t):lS(),[e]),n=()=>{let r="string"==typeof t?t:null,n="function"==typeof t?t:null,i=null==e?void 0:e.getState();return n?n(i):i&&r&&sR(i,r)?i[r]:void 0};return lC(r,n,n)}function lT(e,t){let r=eG.useRef({}),n=eG.useCallback(t=>e?la(e,null,t):lS(),[e]),i=()=>{let n=null==e?void 0:e.getState(),i=!1,a=r.current;for(let e in t){let r=t[e];if("function"==typeof r){let t=r(n);t!==a[e]&&(a[e]=t,i=!0)}if("string"==typeof r){if(!n||!sR(n,r))continue;let t=n[r];t!==a[e]&&(a[e]=t,i=!0)}}return i&&(r.current={...a}),r.current};return lC(n,i,i)}function lD(e,t,r,n){let i=sR(t,r)?t[r]:void 0,a=function(e){let t=(0,eG.useRef)(e);return s$(()=>{t.current=e}),t}({value:i,setValue:n?t[n]:void 0});s$(()=>ls(e,[r],(e,t)=>{let{value:n,setValue:i}=a.current;i&&e[r]!==t[r]&&e[r]!==n&&i(e[r])}),[e,r]),s$(()=>{if(void 0!==i)return e.setState(r,i),lo(e,[r],()=>{void 0!==i&&e.setState(r,i)})})}function lb(e,t){let[r,n]=eG.useState(()=>e(t));s$(()=>li(r),[r]);let i=eG.useCallback(e=>lE(r,e),[r]);return[eG.useMemo(()=>({...r,useState:i}),[r,i]),s0(()=>{n(r=>e({...t,...r.getState()}))})]}function lM(e,t,r){var n;let i,a,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t||!r)return;let{renderedItems:o}=t.getState(),l=sT(e);if(!l)return;let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.clientHeight,{top:n}=e.getBoundingClientRect(),i=1.5*Math.max(.875*r,r-40),a=t?r-i+n:i+n;return"HTML"===e.tagName?a+e.scrollTop:a}(l,s);for(let e=0;e1&&void 0!==arguments[1]&&arguments[1],{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}(l,s)-u,d=Math.abs(c);if(s&&c<=0||!s&&c>=0){void 0!==a&&ar||(e&&(null==h?void 0:h.baseElement)&&h.baseElement===e.baseElement?h.id:void 0),baseElement:e=>(null==e?void 0:e.baseElement)||void 0,isActiveItem:e=>!!e&&e.activeId===d,ariaSetSize:e=>null!=o?o:e&&(null==h?void 0:h.ariaSetSize)&&h.baseElement===e.baseElement?h.ariaSetSize:void 0,ariaPosInSet(e){if(null!=l)return l;if(!e||!(null==h?void 0:h.ariaPosInSet)||h.baseElement!==e.baseElement)return;let t=e.renderedItems.filter(e=>e.rowId===m);return h.ariaPosInSet+t.findIndex(e=>e.id===d)},isTabbable(e){if(!(null==e?void 0:e.renderedItems.length))return!0;if(e.virtualFocus)return!1;if(a)return!0;if(null===e.activeId)return!1;let r=null==t?void 0:t.item(e.activeId);return null!=r&&!!r.disabled||null==r||!r.element||e.activeId===d}}),C=(0,eG.useCallback)(e=>{var t;let r={...e,id:d||e.id,rowId:m,disabled:!!p,children:null==(t=e.element)?void 0:t.textContent};return s?s(r):r},[d,m,p,s]),S=u.onFocus,E=(0,eG.useRef)(!1),T=s0(e=>{var r,n;if(null==S||S(e),e.defaultPrevented||sK(e)||!d||!t||(r=t,!sJ(e)&&sw(r,e.target)))return;let{virtualFocus:i,baseElement:a}=t.getState();if(t.setActiveId(d),sC(e.currentTarget)&&function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(sB(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=sh(e).getSelection();null==r||r.selectAllChildren(e),t&&(null==r||r.collapseToEnd())}}(e.currentTarget),i&&sJ(e))!sC(n=e.currentTarget)&&("INPUT"!==n.tagName||sA(n))&&(null==a?void 0:a.isConnected)&&((sz()&&e.currentTarget.hasAttribute("data-autofocus")&&e.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),E.current=!0,e.relatedTarget===a||sw(t,e.relatedTarget))?(a[sM]=!0,a.focus({preventScroll:!0})):a.focus())}),D=u.onBlurCapture,b=s0(e=>{if(null==D||D(e),e.defaultPrevented)return;let r=null==t?void 0:t.getState();(null==r?void 0:r.virtualFocus)&&E.current&&(E.current=!1,e.preventDefault(),e.stopPropagation())}),M=u.onKeyDown,w=s4(n),F=s4(i),R=s0(e=>{if(null==M||M(e),e.defaultPrevented||!sJ(e)||!t)return;let{currentTarget:r}=e,n=t.getState(),i=t.item(d),a=!!(null==i?void 0:i.rowId),s="horizontal"!==n.orientation,o="vertical"!==n.orientation,l=()=>!(!a&&!o&&n.baseElement&&sB(n.baseElement)),u={ArrowUp:(a||s)&&t.up,ArrowRight:(a||o)&&t.next,ArrowDown:(a||s)&&t.down,ArrowLeft:(a||o)&&t.previous,Home:()=>{if(l())return!a||e.ctrlKey?null==t?void 0:t.first():null==t?void 0:t.previous(-1)},End:()=>{if(l())return!a||e.ctrlKey?null==t?void 0:t.last():null==t?void 0:t.next(-1)},PageUp:()=>lM(r,t,null==t?void 0:t.up,!0),PageDown:()=>lM(r,t,null==t?void 0:t.down)}[e.key];if(u){if(sC(r)){let t=sS(r),n=o&&"ArrowLeft"===e.key,i=o&&"ArrowRight"===e.key,a=s&&"ArrowUp"===e.key,l=s&&"ArrowDown"===e.key;if(i||l){let{length:e}=function(e){if(sB(e))return e.value;if(e.isContentEditable){let t=sh(e).createRange();return t.selectNodeContents(e),t.toString()}return""}(r);if(t.end!==e)return}else if((n||a)&&0!==t.start)return}let n=u();if(w(e)||void 0!==n){if(!F(e))return;e.preventDefault(),t.move(n)}}}),I=(0,eG.useMemo)(()=>({id:d,baseElement:g}),[d,g]);return u={id:d,"data-active-item":A||void 0,...u=s8(u,e=>(0,eU.jsx)(ov.Provider,{value:I,children:e}),[I]),ref:s1(f,u.ref),tabIndex:B?u.tabIndex:-1,onFocus:T,onBlurCapture:b,onKeyDown:R},u=lB(u),sO({...u=lA({store:t,...u,getItem:C,shouldRegisterItem:!!d&&u.shouldRegisterItem}),"aria-setsize":y,"aria-posinset":x})});oa(oi(function(e){return os("button",lw(e))}));var lF=oo(function(e){var t,r;let{store:n,value:i,hideOnClick:a,setValueOnClick:s,selectValueOnClick:o=!0,resetValueOnSelect:l,focusOnHover:u=!1,moveOnKeyPress:c=!0,getItem:d,...f}=e,h=o4();sL(n=n||h,!1);let{resetValueOnSelectState:p,multiSelectable:m,selected:g}=lT(n,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable:e=>Array.isArray(e.selectedValue),selected:e=>(function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)})(e.selectedValue,i)}),A=(0,eG.useCallback)(e=>{let t={...e,value:i};return d?d(t):t},[i,d]);s=null!=s?s:!m,a=null!=a?a:null!=i&&!m;let y=f.onClick,x=s4(s),B=s4(o),C=s4(null!=(t=null!=l?l:p)?t:m),S=s4(a),E=s0(e=>{null==y||y(e),!(e.defaultPrevented||function(e){let t=e.currentTarget;if(!t)return!1;let r=t.tagName.toLowerCase();return!!e.altKey&&("a"===r||"button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type)}(e))&&!function(e){let t=e.currentTarget;if(!t)return!1;let r=sj();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let n=t.tagName.toLowerCase();return"a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type}(e)&&(null!=i&&(B(e)&&(C(e)&&(null==n||n.resetValue()),null==n||n.setSelectedValue(e=>Array.isArray(e)?e.includes(i)?e.filter(e=>e!==i):[...e,i]:i)),x(e)&&(null==n||n.setValue(i))),S(e)&&(null==n||n.hide()))}),T=f.onKeyDown,D=s0(e=>{if(null==T||T(e),e.defaultPrevented)return;let t=null==n?void 0:n.getState().baseElement;!(!t||oD(t))&&(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask(()=>t.focus()),sB(t)&&(null==n||n.setValue(t.value)))});m&&null!=g&&(f={"aria-selected":g,...f}),f=s8(f,e=>(0,eU.jsx)(o7.Provider,{value:i,children:(0,eU.jsx)(le.Provider,{value:null!=g&&g,children:e})}),[i,g]),f={role:null!=(r=({menu:"menuitem",listbox:"option",tree:"treeitem"})[(0,eG.useContext)(o2)])?r:"option",children:i,...f,onClick:E,onKeyDown:D};let b=s4(c);return f=lw({store:n,...f,getItem:A,moveOnKeyPress:e=>{if(!b(e))return!1;let t=new Event("combobox-item-move"),r=null==n?void 0:n.getState().baseElement;return null==r||r.dispatchEvent(t),!0}}),f=lg({store:n,focusOnHover:u,...f})}),lR=oa(oi(function(e){return os("div",lF(e))})),lI=e.i(74080);function lP(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function lL(){for(var e=arguments.length,t=Array(e),r=0;r{let r=t.endsWith("ms")?1:1e3,n=Number.parseFloat(t||"0s")*r;return n>e?n:e},0)}function lU(e,t,r){return!r&&!1!==t&&(!e||!!t)}var lG=oo(function(e){let{store:t,alwaysVisible:r,...n}=e,i=oJ();sL(t=t||i,!1);let a=(0,eG.useRef)(null),s=s2(n.id),[o,l]=(0,eG.useState)(null),u=t.useState("open"),c=t.useState("mounted"),d=t.useState("animated"),f=t.useState("contentElement"),h=lE(t.disclosure,"contentElement");s$(()=>{a.current&&(null==t||t.setContentElement(a.current))},[t]),s$(()=>{let e;return null==t||t.setState("animated",t=>(e=t,!0)),()=>{void 0!==e&&(null==t||t.setState("animated",e))}},[t]),s$(()=>{if(d){var e;let t;return(null==f?void 0:f.isConnected)?(e=()=>{l(u?"enter":c?"leave":null)},t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)}),()=>cancelAnimationFrame(t)):void l(null)}},[d,f,u,c]),s$(()=>{if(!t||!d||!o||!f)return;let e=()=>null==t?void 0:t.setState("animating",!1),r=()=>(0,lI.flushSync)(e);if("leave"===o&&u||"enter"===o&&!u)return;if("number"==typeof d)return lP(d,r);let{transitionDuration:n,animationDuration:i,transitionDelay:a,animationDelay:s}=getComputedStyle(f),{transitionDuration:l="0",animationDuration:c="0",transitionDelay:p="0",animationDelay:m="0"}=h?getComputedStyle(h):{},g=lL(a,s,p,m)+lL(n,i,l,c);if(!g){"enter"===o&&t.setState("animated",!1),e();return}return lP(Math.max(g-1e3/60,0),r)},[t,d,f,h,u,o]);let p=lU(c,(n=s8(n,e=>(0,eU.jsx)(oX,{value:t,children:e}),[t])).hidden,r),m=n.style,g=(0,eG.useMemo)(()=>p?{...m,display:"none"}:m,[p,m]);return sO(n={id:s,"data-open":u||void 0,"data-enter":"enter"===o||void 0,"data-leave":"leave"===o||void 0,hidden:p,...n,ref:s1(s?t.setContentElement:null,a,n.ref),style:g})}),lO=oi(function(e){return os("div",lG(e))});oi(function(e){let{unmountOnHide:t,...r}=e,n=oJ();return!1===lE(r.store||n,e=>!t||(null==e?void 0:e.mounted))?null:(0,eU.jsx)(lO,{...r})});var lH=oo(function(e){let{store:t,alwaysVisible:r,...n}=e,i=o4(!0),a=o3(),s=!!(t=t||a)&&t===i;sL(t,!1);let o=(0,eG.useRef)(null),l=s2(n.id),u=t.useState("mounted"),c=lU(u,n.hidden,r),d=c?{...n.style,display:"none"}:n.style,f=t.useState(e=>Array.isArray(e.selectedValue)),h=function(e,t,r){let n=function(e){let[t]=(0,eG.useState)(e);return t}(r),[i,a]=(0,eG.useState)(n);return(0,eG.useEffect)(()=>{let r=e&&"current"in e?e.current:e;if(!r)return;let i=()=>{let e=r.getAttribute(t);a(null==e?n:e)},s=new MutationObserver(i);return s.observe(r,{attributeFilter:[t]}),i(),()=>s.disconnect()},[e,t,n]),i}(o,"role",n.role),p="listbox"===h||"tree"===h||"grid"===h,[m,g]=(0,eG.useState)(!1),A=t.useState("contentElement");s$(()=>{if(!u)return;let e=o.current;if(!e||A!==e)return;let t=()=>{g(!!e.querySelector("[role='listbox']"))},r=new MutationObserver(t);return r.observe(e,{subtree:!0,childList:!0,attributeFilter:["role"]}),t(),()=>r.disconnect()},[u,A]),m||(n={role:"listbox","aria-multiselectable":p&&f||void 0,...n}),n=s8(n,e=>(0,eU.jsx)(o6,{value:t,children:(0,eU.jsx)(o2.Provider,{value:h,children:e})}),[t,h]);let y=!l||i&&s?null:t.setContentElement;return sO(n={id:l,hidden:c,...n,ref:s1(y,o,n.ref),style:d})}),lN=oi(function(e){return os("div",lH(e))}),lk=(0,eG.createContext)(null),lj=oo(function(e){return{...e,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px",...e.style}}});oi(function(e){return os("span",lj(e))});var lz=oo(function(e){return lj(e={"data-focus-trap":"",tabIndex:0,"aria-hidden":!0,...e,style:{position:"fixed",top:0,left:0,...e.style}})}),lK=oi(function(e){return os("span",lz(e))});function lJ(e){queueMicrotask(()=>{null==e||e.focus()})}var lV=oo(function(e){let{preserveTabOrder:t,preserveTabOrderAnchor:r,portalElement:n,portalRef:i,portal:a=!0,...s}=e,o=(0,eG.useRef)(null),l=s1(o,s.ref),u=(0,eG.useContext)(lk),[c,d]=(0,eG.useState)(null),[f,h]=(0,eG.useState)(null),p=(0,eG.useRef)(null),m=(0,eG.useRef)(null),g=(0,eG.useRef)(null),A=(0,eG.useRef)(null);return s$(()=>{let e=o.current;if(!e||!a)return void d(null);let t=n?"function"==typeof n?n(e):n:sh(e).createElement("div");if(!t)return void d(null);let r=t.isConnected;if(r||(u||sh(e).body).appendChild(t),t.id||(t.id=e.id?"portal/".concat(e.id):function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";return"".concat(e?"".concat(e,"-"):"").concat(Math.random().toString(36).slice(2,8))}()),d(t),sN(i,t),!r)return()=>{t.remove(),sN(i,null)}},[a,n,u,i]),s$(()=>{if(!a||!t||!r)return;let e=sh(r).createElement("span");return e.style.position="fixed",r.insertAdjacentElement("afterend",e),h(e),()=>{e.remove(),h(null)}},[a,t,r]),(0,eG.useEffect)(()=>{if(!c||!t)return;let e=0,r=t=>{if(!sW(t))return;let r="focusin"===t.type;if(cancelAnimationFrame(e),r){let e=c.querySelectorAll("[data-tabindex]"),t=e=>{let t=e.getAttribute("data-tabindex");e.removeAttribute("data-tabindex"),t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")};for(let r of(c.hasAttribute("data-tabindex")&&t(c),e))t(r);return}e=requestAnimationFrame(()=>{for(let e of oS(c,!0))!function(e){var t;let r=null!=(t=e.getAttribute("tabindex"))?t:"";e.setAttribute("data-tabindex",r),e.setAttribute("tabindex","-1")}(e)})};return c.addEventListener("focusin",r,!0),c.addEventListener("focusout",r,!0),()=>{cancelAnimationFrame(e),c.removeEventListener("focusin",r,!0),c.removeEventListener("focusout",r,!0)}},[c,t]),s={...s=s8(s,e=>{if(e=(0,eU.jsx)(lk.Provider,{value:c||u,children:e}),!a)return e;if(!c)return(0,eU.jsx)("span",{ref:l,id:s.id,style:{position:"fixed"},hidden:!0});e=(0,eU.jsxs)(eU.Fragment,{children:[t&&c&&(0,eU.jsx)(lK,{ref:m,"data-focus-trap":s.id,className:"__focus-trap-inner-before",onFocus:e=>{sW(e,c)?lJ(oE()):lJ(p.current)}}),e,t&&c&&(0,eU.jsx)(lK,{ref:g,"data-focus-trap":s.id,className:"__focus-trap-inner-after",onFocus:e=>{sW(e,c)?lJ(oT()):lJ(A.current)}})]}),c&&(e=(0,lI.createPortal)(e,c));let r=(0,eU.jsxs)(eU.Fragment,{children:[t&&c&&(0,eU.jsx)(lK,{ref:p,"data-focus-trap":s.id,className:"__focus-trap-outer-before",onFocus:e=>{e.relatedTarget!==A.current&&sW(e,c)?lJ(m.current):lJ(oT())}}),t&&(0,eU.jsx)("span",{"aria-owns":null==c?void 0:c.id,style:{position:"fixed"}}),t&&c&&(0,eU.jsx)(lK,{ref:A,"data-focus-trap":s.id,className:"__focus-trap-outer-after",onFocus:e=>{if(sW(e,c))lJ(g.current);else{let e=oE();if(e===m.current)return void requestAnimationFrame(()=>{var e;return null==(e=oE())?void 0:e.focus()});lJ(e)}}})]});return f&&t&&(r=(0,lI.createPortal)(r,f)),(0,eU.jsxs)(eU.Fragment,{children:[r,e]})},[c,u,a,s.id,t,f]),ref:l}});oi(function(e){return os("div",lV(e))});var lQ=(0,eG.createContext)(0);function lW(e){let{level:t,children:r}=e,n=(0,eG.useContext)(lQ),i=Math.max(Math.min(t||n+1,6),1);return(0,eU.jsx)(lQ.Provider,{value:i,children:r})}var lX=oo(function(e){let{autoFocusOnShow:t=!0,...r}=e;return s8(r,e=>(0,eU.jsx)(oA.Provider,{value:t,children:e}),[t])});oi(function(e){return os("div",lX(e))});var l_=new WeakMap;function lZ(e,t,r){l_.has(e)||l_.set(e,new Map);let n=l_.get(e),i=n.get(t);if(!i)return n.set(t,r()),()=>{var e;null==(e=n.get(t))||e(),n.delete(t)};let a=r(),s=()=>{a(),i(),n.delete(t)};return n.set(t,s),()=>{n.get(t)===s&&(a(),n.set(t,i))}}function lY(e,t,r){return lZ(e,t,()=>{let n=e.getAttribute(t);return e.setAttribute(t,r),()=>{null==n?e.removeAttribute(t):e.setAttribute(t,n)}})}function lq(e,t,r){return lZ(e,t,()=>{let n=t in e,i=e[t];return e[t]=r,()=>{n?e[t]=i:delete e[t]}})}function l$(e,t){return e?lZ(e,"style",()=>{let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}):()=>{}}var l0=["SCRIPT","STYLE"];function l1(e){return"__ariakit-dialog-snapshot-".concat(e)}function l2(e,t,r,n){for(let i of t){if(!(null==i?void 0:i.isConnected))continue;let a=t.some(e=>!!e&&e!==i&&e.contains(i)),s=sh(i),o=i;for(;i.parentElement&&i!==s.body;){if(null==n||n(i.parentElement,o),!a)for(let n of i.parentElement.children)(function(e,t,r){return!l0.includes(t.tagName)&&!!function(e,t){let r=sh(t),n=l1(e);if(!r.body[n])return!0;for(;;){if(t===r.body)return!1;if(t[n])return!0;if(!t.parentElement)return!1;t=t.parentElement}}(e,t)&&!r.some(e=>e&&sv(t,e))})(e,n,t)&&r(n,o);i=i.parentElement}}}function l9(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ni===e))}function l3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"__ariakit-dialog-".concat(t?"ancestor":"outside").concat(e?"-".concat(e):"")}function l4(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return sI(lq(e,l3("",!0),!0),lq(e,l3(t,!0),!0))}function l8(e,t){if(e[l3(t,!0)])return!0;let r=l3(t);for(;;){if(e[r])return!0;if(!e.parentElement)return!1;e=e.parentElement}}function l5(e,t){let r=[],n=t.map(e=>null==e?void 0:e.id);return l2(e,t,t=>{l9(t,...n)||r.unshift(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return sI(lq(e,l3(),!0),lq(e,l3(t),!0))}(t,e))},(t,n)=>{n.hasAttribute("data-dialog")&&n.id!==e||r.unshift(l4(t,e))}),()=>{for(let e of r)e()}}function l6(e){let{store:t,type:r,listener:n,capture:i,domReady:a}=e,s=s0(n),o=lE(t,"open"),l=(0,eG.useRef)(!1);s$(()=>{if(!o||!a)return;let{contentElement:e}=t.getState();if(!e)return;let r=()=>{l.current=!0};return e.addEventListener("focusin",r,!0),()=>e.removeEventListener("focusin",r,!0)},[t,o,a]),(0,eG.useEffect)(()=>{if(o)return s_(r,e=>{let{contentElement:r,disclosureElement:n}=t.getState(),i=e.target;if(r&&i)!(!("HTML"===i.tagName||sv(sh(i).body,i))||sv(r,i)||function(e,t){if(!e)return!1;if(sv(e,t))return!0;let r=t.getAttribute("aria-activedescendant");if(r){let t=sh(e).getElementById(r);if(t)return sv(e,t)}return!1}(n,i)||i.hasAttribute("data-focus-trap")||function(e,t){if(!("clientY"in e))return!1;let r=t.getBoundingClientRect();return 0!==r.width&&0!==r.height&&r.top<=e.clientY&&e.clientY<=r.top+r.height&&r.left<=e.clientX&&e.clientX<=r.left+r.width}(e,r))&&(!l.current||l8(i,r.id))&&(i&&i[oR]||s(e))},i)},[o,i])}function l7(e,t){return"function"==typeof e?e(t):!!e}var ue=(0,eG.createContext)({});function ut(){return"inert"in HTMLElement.prototype}function ur(e,t){if(!("style"in e))return sF;if(ut())return lq(e,"inert",!0);let r=oS(e,!0).map(e=>{if(null==t?void 0:t.some(t=>t&&sv(t,e)))return sF;let r=lZ(e,"focus",()=>(e.focus=sF,()=>{delete e.focus}));return sI(lY(e,"tabindex","-1"),r)});return sI(...r,lY(e,"aria-hidden","true"),l$(e,{pointerEvents:"none",userSelect:"none",cursor:"default"}))}function un(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lu(e.store,ll(e.disclosure,["contentElement","disclosureElement"]));lc(e,t);let r=null==t?void 0:t.getState(),n=sH(e.open,null==r?void 0:r.open,e.defaultOpen,!1),i=sH(e.animated,null==r?void 0:r.animated,!1),a=lr({open:n,animated:i,animating:!!i&&n,mounted:n,contentElement:sH(null==r?void 0:r.contentElement,null),disclosureElement:sH(null==r?void 0:r.disclosureElement,null)},t);return ln(a,()=>ls(a,["animated","animating"],e=>{e.animated||a.setState("animating",!1)})),ln(a,()=>la(a,["open"],()=>{a.getState().animated&&a.setState("animating",!0)})),ln(a,()=>ls(a,["open","animating"],e=>{a.setState("mounted",e.open||e.animating)})),{...a,disclosure:e.disclosure,setOpen:e=>a.setState("open",e),show:()=>a.setState("open",!0),hide:()=>a.setState("open",!1),toggle:()=>a.setState("open",e=>!e),stopAnimation:()=>a.setState("animating",!1),setContentElement:e=>a.setState("contentElement",e),setDisclosureElement:e=>a.setState("disclosureElement",e)}}function ui(e,t,r){return s9(t,[r.store,r.disclosure]),lD(e,r,"open","setOpen"),lD(e,r,"mounted","setMounted"),lD(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}oo(function(e){return e});var ua=oi(function(e){return os("div",e)});function us(e){let{store:t,backdrop:r,alwaysVisible:n,hidden:i}=e,a=(0,eG.useRef)(null),s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,r]=lb(un,e);return ui(t,r,e)}({disclosure:t}),o=lE(t,"contentElement");(0,eG.useEffect)(()=>{let e=a.current;e&&o&&(e.style.zIndex=getComputedStyle(o).zIndex)},[o]),s$(()=>{let e=null==o?void 0:o.id;if(!e)return;let t=a.current;if(t)return l4(t,e)},[o]);let l=lG({ref:a,store:s,role:"presentation","data-backdrop":(null==o?void 0:o.id)||"",alwaysVisible:n,hidden:null!=i?i:void 0,style:{position:"fixed",top:0,right:0,bottom:0,left:0}});if(!r)return null;if((0,eG.isValidElement)(r))return(0,eU.jsx)(ua,{...l,render:r});let u="boolean"!=typeof r?r:"div";return(0,eU.jsx)(ua,{...l,render:(0,eU.jsx)(u,{})})}function uo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(e)}Object.assign(ua,["a","button","details","dialog","div","form","h1","h2","h3","h4","h5","h6","header","img","input","label","li","nav","ol","p","section","select","span","summary","textarea","ul","svg"].reduce((e,t)=>(e[t]=oi(function(e){return os(t,e)}),e),{}));var ul=sz();function uu(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;let r="current"in e?e.current:e;return r?t?ox(r)?r:null:r:null}var uc=oo(function(e){let{store:t,open:r,onClose:n,focusable:i=!0,modal:a=!0,portal:s=!!a,backdrop:o=!!a,hideOnEscape:l=!0,hideOnInteractOutside:u=!0,getPersistentElements:c,preventBodyScroll:d=!!a,autoFocusOnShow:f=!0,autoFocusOnHide:h=!0,initialFocus:p,finalFocus:m,unmountOnHide:g,unstable_treeSnapshotKey:A,...y}=e,x=oQ(),B=(0,eG.useRef)(null),C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,r]=lb(uo,e);return ui(t,r,e)}({store:t||x,open:r,setOpen(e){if(e)return;let t=B.current;if(!t)return;let r=new Event("close",{bubbles:!1,cancelable:!0});n&&t.addEventListener("close",n,{once:!0}),t.dispatchEvent(r),r.defaultPrevented&&C.setOpen(!0)}}),{portalRef:S,domReady:E}=s5(s,y.portalRef),T=y.preserveTabOrder,D=lE(C,e=>T&&!a&&e.mounted),b=s2(y.id),M=lE(C,"open"),w=lE(C,"mounted"),F=lE(C,"contentElement"),R=lU(w,y.hidden,y.alwaysVisible),I=function(e){let{attribute:t,contentId:r,contentElement:n,enabled:i}=e,[a,s]=s3(),o=(0,eG.useCallback)(()=>{if(!i||!n)return!1;let{body:e}=sh(n),a=e.getAttribute(t);return!a||a===r},[a,i,n,t,r]);return(0,eG.useEffect)(()=>{if(!i||!r||!n)return;let{body:e}=sh(n);if(o())return e.setAttribute(t,r),()=>e.removeAttribute(t);let a=new MutationObserver(()=>(0,lI.flushSync)(s));return a.observe(e,{attributeFilter:[t]}),()=>a.disconnect()},[a,i,r,n,o,t]),o}({attribute:"data-dialog-prevent-body-scroll",contentElement:F,contentId:b,enabled:d&&!R});(0,eG.useEffect)(()=>{var e,t;if(!I()||!F)return;let r=sh(F),n=sp(F),{documentElement:i,body:a}=r,s=i.style.getPropertyValue("--scrollbar-width"),o=s?Number.parseInt(s,10):n.innerWidth-i.clientWidth,l=Math.round(i.getBoundingClientRect().left)+i.scrollLeft?"paddingLeft":"paddingRight",u=sj()&&!(sf&&navigator.platform.startsWith("Mac")&&!sk());return sI((e="--scrollbar-width",t="".concat(o,"px"),i?lZ(i,e,()=>{let r=i.style.getPropertyValue(e);return i.style.setProperty(e,t),()=>{r?i.style.setProperty(e,r):i.style.removeProperty(e)}}):()=>{}),u?(()=>{var e,t;let{scrollX:r,scrollY:i,visualViewport:s}=n,u=null!=(e=null==s?void 0:s.offsetLeft)?e:0,c=null!=(t=null==s?void 0:s.offsetTop)?t:0,d=l$(a,{position:"fixed",overflow:"hidden",top:"".concat(-(i-Math.floor(c)),"px"),left:"".concat(-(r-Math.floor(u)),"px"),right:"0",[l]:"".concat(o,"px")});return()=>{d(),n.scrollTo({left:r,top:i,behavior:"instant"})}})():l$(a,{overflow:"hidden",[l]:"".concat(o,"px")}))},[I,F]);let P=function(e){let t=(0,eG.useRef)();return(0,eG.useEffect)(()=>{if(!e){t.current=null;return}return s_("mousedown",e=>{t.current=e.target},!0)},[e]),t}(lE(C,"open")),L={store:C,domReady:E,capture:!0};l6({...L,type:"click",listener:e=>{let{contentElement:t}=C.getState(),r=P.current;r&&sx(r)&&l8(r,null==t?void 0:t.id)&&l7(u,e)&&C.hide()}}),l6({...L,type:"focusin",listener:e=>{let{contentElement:t}=C.getState();t&&e.target!==sh(t)&&l7(u,e)&&C.hide()}}),l6({...L,type:"contextmenu",listener:e=>{l7(u,e)&&C.hide()}});let{wrapElement:U,nestedDialogs:G}=function(e){let t=(0,eG.useContext)(ue),[r,n]=(0,eG.useState)([]),i=(0,eG.useCallback)(e=>{var r;return n(t=>[...t,e]),sI(null==(r=t.add)?void 0:r.call(t,e),()=>{n(t=>t.filter(t=>t!==e))})},[t]);s$(()=>ls(e,["open","contentElement"],r=>{var n;if(r.open&&r.contentElement)return null==(n=t.add)?void 0:n.call(t,e)}),[e,t]);let a=(0,eG.useMemo)(()=>({store:e,add:i}),[e,i]);return{wrapElement:(0,eG.useCallback)(e=>(0,eU.jsx)(ue.Provider,{value:a,children:e}),[a]),nestedDialogs:r}}(C);y=s8(y,U,[U]),s$(()=>{if(!M)return;let e=B.current,t=sm(e,!0);t&&"BODY"!==t.tagName&&(e&&sv(e,t)||C.setDisclosureElement(t))},[C,M]),ul&&(0,eG.useEffect)(()=>{if(!w)return;let{disclosureElement:e}=C.getState();if(!e||!sA(e))return;let t=()=>{let t=!1,r=()=>{t=!0};e.addEventListener("focusin",r,{capture:!0,once:!0}),sX(e,"mouseup",()=>{e.removeEventListener("focusin",r,!0),t||oM(e)})};return e.addEventListener("mousedown",t),()=>{e.removeEventListener("mousedown",t)}},[C,w]),(0,eG.useEffect)(()=>{if(!w||!E)return;let e=B.current;if(!e)return;let t=sp(e),r=t.visualViewport||t,n=()=>{var r,n;let i=null!=(n=null==(r=t.visualViewport)?void 0:r.height)?n:t.innerHeight;e.style.setProperty("--dialog-viewport-height","".concat(i,"px"))};return n(),r.addEventListener("resize",n),()=>{r.removeEventListener("resize",n)}},[w,E]),(0,eG.useEffect)(()=>{if(!a||!w||!E)return;let e=B.current;if(e&&!e.querySelector("[data-dialog-dismiss]")){var t=C.hide;let r=sh(e).createElement("button");return r.type="button",r.tabIndex=-1,r.textContent="Dismiss popup",Object.assign(r.style,{border:"0px",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"}),r.addEventListener("click",t),e.prepend(r),()=>{r.removeEventListener("click",t),r.remove()}}},[C,a,w,E]),s$(()=>{if(!ut()||M||!w||!E)return;let e=B.current;if(e)return ur(e)},[M,w,E]);let O=M&&E;s$(()=>{if(!b||!O)return;var e=[B.current];let{body:t}=sh(e[0]),r=[];return l2(b,e,e=>{r.push(lq(e,l1(b),!0))}),sI(lq(t,l1(b),!0),()=>{for(let e of r)e()})},[b,O,A]);let H=s0(c);s$(()=>{if(!b||!O)return;let{disclosureElement:e}=C.getState(),t=[B.current,...H()||[],...G.map(e=>e.getState().contentElement)];return a?sI(l5(b,t),function(e,t){let r=[],n=t.map(e=>null==e?void 0:e.id);return l2(e,t,e=>{l9(e,...n)||!function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ni===e))}(e,...n)&&r.unshift(ur(e,t))},e=>{e.hasAttribute("role")&&(t.some(t=>t&&sv(t,e))||r.unshift(lY(e,"role","none")))}),()=>{for(let e of r)e()}}(b,t)):l5(b,[e,...t])},[b,C,O,H,G,a,A]);let N=!!f,k=s4(f),[j,z]=(0,eG.useState)(!1);(0,eG.useEffect)(()=>{if(!M||!N||!E||!(null==F?void 0:F.isConnected))return;let e=uu(p,!0)||F.querySelector("[data-autofocus=true],[autofocus]")||function(e,t,r){let[n]=oS(e,t,r);return n||null}(F,!0,s&&D)||F,t=ox(e);k(t?e:null)&&(z(!0),queueMicrotask(()=>{e.focus(),ul&&t&&e.scrollIntoView({block:"nearest",inline:"nearest"})}))},[M,N,E,F,p,s,D,k]);let K=!!h,J=s4(h),[V,Q]=(0,eG.useState)(!1);(0,eG.useEffect)(()=>{if(M)return Q(!0),()=>Q(!1)},[M]);let W=(0,eG.useCallback)(function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{disclosureElement:r}=C.getState();if(function(e){let t=sm();return!(!t||e&&sv(e,t))&&!!ox(t)}(e))return;let n=uu(m)||r;if(null==n?void 0:n.id){let e=sh(n),t='[aria-activedescendant="'.concat(n.id,'"]'),r=e.querySelector(t);r&&(n=r)}if(n&&!ox(n)){let e=n.closest("[data-dialog]");if(null==e?void 0:e.id){let t=sh(e),r='[aria-controls~="'.concat(e.id,'"]'),i=t.querySelector(r);i&&(n=i)}}let i=n&&ox(n);if(!i&&t)return void requestAnimationFrame(()=>W(e,!1));J(i?n:null)&&i&&(null==n||n.focus({preventScroll:!0}))},[C,m,J]),X=(0,eG.useRef)(!1);s$(()=>{if(M||!V||!K)return;let e=B.current;X.current=!0,W(e)},[M,V,E,K,W]),(0,eG.useEffect)(()=>{if(!V||!K)return;let e=B.current;return()=>{if(X.current){X.current=!1;return}W(e)}},[V,K,W]);let _=s4(l);(0,eG.useEffect)(()=>{if(E&&w)return s_("keydown",e=>{if("Escape"!==e.key||e.defaultPrevented)return;let t=B.current;if(!t||l8(t))return;let r=e.target;if(!r)return;let{disclosureElement:n}=C.getState();("BODY"===r.tagName||sv(t,r)||!n||sv(n,r))&&_(e)&&C.hide()},!0)},[C,E,w,_]);let Z=(y=s8(y,e=>(0,eU.jsx)(lW,{level:a?1:void 0,children:e}),[a])).hidden,Y=y.alwaysVisible;y=s8(y,e=>o?(0,eU.jsxs)(eU.Fragment,{children:[(0,eU.jsx)(us,{store:C,backdrop:o,hidden:Z,alwaysVisible:Y}),e]}):e,[C,o,Z,Y]);let[q,$]=(0,eG.useState)(),[ee,et]=(0,eG.useState)();return y=lX({...y={id:b,"data-dialog":"",role:"dialog",tabIndex:i?-1:void 0,"aria-labelledby":q,"aria-describedby":ee,...y=s8(y,e=>(0,eU.jsx)(oX,{value:C,children:(0,eU.jsx)(o_.Provider,{value:$,children:(0,eU.jsx)(oZ.Provider,{value:et,children:e})})}),[C]),ref:s1(B,y.ref)},autoFocusOnShow:j}),y=lV({portal:s,...y=oH({...y=lG({store:C,...y}),focusable:i}),portalRef:S,preserveTabOrder:D})});function ud(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oQ;return oi(function(r){let n=t();return lE(r.store||n,e=>!r.unmountOnHide||(null==e?void 0:e.mounted)||!!r.open)?(0,eU.jsx)(e,{...r}):null})}ud(oi(function(e){return os("div",uc(e))}),oQ);let uf=Math.min,uh=Math.max,up=Math.round,um=Math.floor,uv=e=>({x:e,y:e}),ug={left:"right",right:"left",bottom:"top",top:"bottom"},uA={start:"end",end:"start"};function uy(e,t){return"function"==typeof e?e(t):e}function ux(e){return e.split("-")[0]}function uB(e){return e.split("-")[1]}function uC(e){return"x"===e?"y":"x"}function uS(e){return"y"===e?"height":"width"}let uE=new Set(["top","bottom"]);function uT(e){return uE.has(ux(e))?"y":"x"}function uD(e){return e.replace(/start|end/g,e=>uA[e])}let ub=["left","right"],uM=["right","left"],uw=["top","bottom"],uF=["bottom","top"];function uR(e){return e.replace(/left|right|bottom|top/g,e=>ug[e])}function uI(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function uP(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function uL(e,t,r){let n,{reference:i,floating:a}=e,s=uT(t),o=uC(uT(t)),l=uS(o),u=ux(t),c="y"===s,d=i.x+i.width/2-a.width/2,f=i.y+i.height/2-a.height/2,h=i[l]/2-a[l]/2;switch(u){case"top":n={x:d,y:i.y-a.height};break;case"bottom":n={x:d,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:f};break;case"left":n={x:i.x-a.width,y:f};break;default:n={x:i.x,y:i.y}}switch(uB(t)){case"start":n[o]-=h*(r&&c?-1:1);break;case"end":n[o]+=h*(r&&c?-1:1)}return n}let uU=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,o=a.filter(Boolean),l=await (null==s.isRTL?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=uL(u,n,l),f=n,h={},p=0;for(let r=0;r{try{return e.matches(t)}catch(e){return!1}})}let uq=["transform","translate","scale","rotate","perspective"],u$=["transform","translate","scale","rotate","perspective","filter"],u0=["paint","layout","strict","content"];function u1(e){let t=u2(),r=uJ(e)?u4(e):e;return uq.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||u$.some(e=>(r.willChange||"").includes(e))||u0.some(e=>(r.contain||"").includes(e))}function u2(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let u9=new Set(["html","body","#document"]);function u3(e){return u9.has(uk(e))}function u4(e){return uj(e).getComputedStyle(e)}function u8(e){return uJ(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function u5(e){if("html"===uk(e))return e;let t=e.assignedSlot||e.parentNode||uQ(e)&&e.host||uz(e);return uQ(t)?t.host:t}function u6(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=u5(t);return u3(r)?t.ownerDocument?t.ownerDocument.body:t.body:uV(r)&&uX(r)?r:e(r)}(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),s=uj(i);if(a){let e=u7(s);return t.concat(s,s.visualViewport||[],uX(i)?i:[],e&&r?u6(e):[])}return t.concat(i,u6(i,[],r))}function u7(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ce(e){let t=u4(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=uV(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,o=up(r)!==a||up(n)!==s;return o&&(r=a,n=s),{width:r,height:n,$:o}}function ct(e){return uJ(e)?e:e.contextElement}function cr(e){let t=ct(e);if(!uV(t))return uv(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:a}=ce(t),s=(a?up(r.width):r.width)/n,o=(a?up(r.height):r.height)/i;return s&&Number.isFinite(s)||(s=1),o&&Number.isFinite(o)||(o=1),{x:s,y:o}}let cn=uv(0);function ci(e){let t=uj(e);return u2()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:cn}function ca(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),s=ct(e),o=uv(1);t&&(n?uJ(n)&&(o=cr(n)):o=cr(e));let l=(void 0===(i=r)&&(i=!1),n&&(!i||n===uj(s))&&i)?ci(s):uv(0),u=(a.left+l.x)/o.x,c=(a.top+l.y)/o.y,d=a.width/o.x,f=a.height/o.y;if(s){let e=uj(s),t=n&&uJ(n)?uj(n):n,r=e,i=u7(r);for(;i&&n&&t!==r;){let e=cr(i),t=i.getBoundingClientRect(),n=u4(i),a=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=a,c+=s,i=u7(r=uj(i))}}return uP({width:d,height:f,x:u,y:c})}function cs(e,t){let r=u8(e).scrollLeft;return t?t.left+r:ca(uz(e)).left+r}function co(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-cs(e,r),y:r.top+t.scrollTop}}let cl=new Set(["absolute","fixed"]);function cu(e,t,r){let n;if("viewport"===t)n=function(e,t){let r=uj(e),n=uz(e),i=r.visualViewport,a=n.clientWidth,s=n.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;let e=u2();(!e||e&&"fixed"===t)&&(o=i.offsetLeft,l=i.offsetTop)}let u=cs(n);if(u<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,s=Math.abs(n.clientWidth-t.clientWidth-i);s<=25&&(a-=s)}else u<=25&&(a+=u);return{width:a,height:s,x:o,y:l}}(e,r);else if("document"===t)n=function(e){let t=uz(e),r=u8(e),n=e.ownerDocument.body,i=uh(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=uh(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+cs(e),o=-r.scrollTop;return"rtl"===u4(n).direction&&(s+=uh(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:o}}(uz(e));else if(uJ(t))n=function(e,t){let r=ca(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=uV(e)?cr(e):uv(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y;return{width:s,height:o,x:i*a.x,y:n*a.y}}(t,r);else{let r=ci(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return uP(n)}function cc(e){return"static"===u4(e).position}function cd(e,t){if(!uV(e)||"fixed"===u4(e).position)return null;if(t)return t(e);let r=e.offsetParent;return uz(e)===r&&(r=r.ownerDocument.body),r}function cf(e,t){var r;let n=uj(e);if(uY(e))return n;if(!uV(e)){let t=u5(e);for(;t&&!u3(t);){if(uJ(t)&&!cc(t))return t;t=u5(t)}return n}let i=cd(e,t);for(;i&&(r=i,u_.has(uk(r)))&&cc(i);)i=cd(i,t);return i&&u3(i)&&cc(i)&&!u1(i)?n:i||function(e){let t=u5(e);for(;uV(t)&&!u3(t);){if(u1(t))return t;if(uY(t))break;t=u5(t)}return null}(e)||n}let ch=async function(e){let t=this.getOffsetParent||cf,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=uV(t),i=uz(t),a="fixed"===r,s=ca(e,!0,a,t),o={scrollLeft:0,scrollTop:0},l=uv(0);if(n||!n&&!a)if(("body"!==uk(t)||uX(i))&&(o=u8(t)),n){let e=ca(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=cs(i));a&&!n&&i&&(l.x=cs(i));let u=!i||n||a?uv(0):co(i,o);return{x:s.left+o.scrollLeft-l.x-u.x,y:s.top+o.scrollTop-l.y-u.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},cp={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,a="fixed"===i,s=uz(n),o=!!t&&uY(t.floating);if(n===s||o&&a)return r;let l={scrollLeft:0,scrollTop:0},u=uv(1),c=uv(0),d=uV(n);if((d||!d&&!a)&&(("body"!==uk(n)||uX(s))&&(l=u8(n)),uV(n))){let e=ca(n);u=cr(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}let f=!s||d||a?uv(0):co(s,l);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}},getDocumentElement:uz,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[..."clippingAncestors"===r?uY(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=u6(e,[],!1).filter(e=>uJ(e)&&"body"!==uk(e)),i=null,a="fixed"===u4(e).position,s=a?u5(e):e;for(;uJ(s)&&!u3(s);){let t=u4(s),r=u1(s);r||"fixed"!==t.position||(i=null),(a?!r&&!i:!r&&"static"===t.position&&!!i&&cl.has(i.position)||uX(s)&&!r&&function e(t,r){let n=u5(t);return!(n===r||!uJ(n)||u3(n))&&("fixed"===u4(n).position||e(n,r))}(e,s))?n=n.filter(e=>e!==s):i=t,s=u5(s)}return t.set(e,n),n}(t,this._c):[].concat(r),n],s=a[0],o=a.reduce((e,r)=>{let n=cu(t,r,i);return e.top=uh(n.top,e.top),e.right=uf(n.right,e.right),e.bottom=uf(n.bottom,e.bottom),e.left=uh(n.left,e.left),e},cu(t,s,i));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},getOffsetParent:cf,getElementRects:ch,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=ce(e);return{width:t,height:r}},getScale:cr,isElement:uJ,isRTL:function(e){return"rtl"===u4(e).direction}};function cm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("function"==typeof DOMRect)return new DOMRect(e,t,r,n);let i={x:e,y:t,width:r,height:n,top:t,right:e+r,bottom:t+n,left:e};return{...i,toJSON:()=>i}}function cg(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}function cA(e){let t=window.devicePixelRatio||1;return Math.round(e*t)/t}var cy=oo(function(e){let{store:t,modal:r=!1,portal:n=!!r,preserveTabOrder:i=!0,autoFocusOnShow:a=!0,wrapperProps:s,fixed:o=!1,flip:l=!0,shift:u=0,slide:c=!0,overlap:d=!1,sameWidth:f=!1,fitViewport:h=!1,gutter:p,arrowPadding:m=4,overflowPadding:g=8,getAnchorRect:A,updatePosition:y,...x}=e,B=oq();sL(t=t||B,!1);let C=t.useState("arrowElement"),S=t.useState("anchorElement"),E=t.useState("disclosureElement"),T=t.useState("popoverElement"),D=t.useState("contentElement"),b=t.useState("placement"),M=t.useState("mounted"),w=t.useState("rendered"),F=(0,eG.useRef)(null),[R,I]=(0,eG.useState)(!1),{portalRef:P,domReady:L}=s5(n,x.portalRef),U=s0(A),G=s0(y),O=!!y;s$(()=>{if(!(null==T?void 0:T.isConnected))return;T.style.setProperty("--popover-overflow-padding","".concat(g,"px"));let e={contextElement:S||void 0,getBoundingClientRect:()=>{let e=null==U?void 0:U(S);if(e||!S){if(!e)return cv();let{x:t,y:r,width:n,height:i}=e;return cv(t,r,n,i)}return S.getBoundingClientRect()}},r=async()=>{var r,n,i,a;if(!M)return;C||(F.current=F.current||document.createElement("div"));let s=C||F.current,A=[(r={gutter:p,shift:u},void 0===(n=e=>{var t;let{placement:n}=e,i=((null==s?void 0:s.clientHeight)||0)/2,a="number"==typeof r.gutter?r.gutter+i:null!=(t=r.gutter)?t:i;return{crossAxis:n.split("-")[1]?void 0:r.shift,mainAxis:a,alignmentAxis:r.shift}})&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:i,y:a,placement:s,middlewareData:o}=e,l=await uH(e,n);return s===(null==(t=o.offset)?void 0:t.placement)&&null!=(r=o.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:s}}}}),function(e){var t;if(!1===e.flip)return;let r="string"==typeof e.flip?e.flip.split(" "):void 0;return sL(!r||r.every(cg),!1),{name:"flip",options:t={padding:e.overflowPadding,fallbackPlacements:r},async fn(e){var r,n,i,a,s;let{placement:o,middlewareData:l,rects:u,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:y=!0,...x}=uy(t,e);if(null!=(r=l.arrow)&&r.alignmentOffset)return{};let B=ux(o),C=uT(c),S=ux(c)===c,E=await (null==d.isRTL?void 0:d.isRTL(f.floating)),T=m||(S||!y?[uR(c)]:function(e){let t=uR(e);return[uD(e),t,uD(t)]}(c)),D="none"!==A;!m&&D&&T.push(...function(e,t,r,n){let i=uB(e),a=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?uM:ub;return t?ub:uM;case"left":case"right":return t?uw:uF;default:return[]}}(ux(e),"start"===r,n);return i&&(a=a.map(e=>e+"-"+i),t&&(a=a.concat(a.map(uD)))),a}(c,y,A,E));let b=[c,...T],M=await uG(e,x),w=[],F=(null==(n=l.flip)?void 0:n.overflows)||[];if(h&&w.push(M[B]),p){let e=function(e,t,r){void 0===r&&(r=!1);let n=uB(e),i=uC(uT(e)),a=uS(i),s="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=uR(s)),[s,uR(s)]}(o,u,E);w.push(M[e[0]],M[e[1]])}if(F=[...F,{placement:o,overflows:w}],!w.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=b[e];if(t&&("alignment"!==p||C===uT(t)||F.every(e=>uT(e.placement)!==C||e.overflows[0]>0)))return{data:{index:e,overflows:F},reset:{placement:t}};let r=null==(a=F.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!r)switch(g){case"bestFit":{let e=null==(s=F.filter(e=>{if(D){let t=uT(e.placement);return t===C||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:s[0];e&&(r=e);break}case"initialPlacement":r=c}if(o!==r)return{reset:{placement:r}}}return{}}}}({flip:l,overflowPadding:g}),function(e){if(e.slide||e.overlap){var t,r;return{name:"shift",options:r={mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:(void 0===t&&(t={}),{options:t,fn(e){let{x:r,y:n,placement:i,rects:a,middlewareData:s}=e,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=uy(t,e),c={x:r,y:n},d=uT(i),f=uC(d),h=c[f],p=c[d],m=uy(o,e),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,r=a.reference[f]+a.reference[e]-g.mainAxis;hr&&(h=r)}if(u){var A,y;let e="y"===f?"width":"height",t=uO.has(ux(i)),r=a.reference[d]-a.floating[e]+(t&&(null==(A=s.offset)?void 0:A[d])||0)+(t?0:g.crossAxis),n=a.reference[d]+a.reference[e]+(t?0:(null==(y=s.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);pn&&(p=n)}return{[f]:h,[d]:p}}})},async fn(e){let{x:t,y:n,placement:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:o={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=uy(r,e),u={x:t,y:n},c=await uG(e,l),d=uT(ux(i)),f=uC(d),h=u[f],p=u[d];if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=h+c[e],n=h-c[t];h=uh(r,uf(h,n))}if(s){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",r=p+c[e],n=p-c[t];p=uh(r,uf(p,n))}let m=o.fn({...e,[f]:h,[d]:p});return{...m,data:{x:m.x-t,y:m.y-n,enabled:{[f]:a,[d]:s}}}}}}}({slide:c,shift:u,overlap:d,overflowPadding:g}),function(e,t){if(e){let r;return{name:"arrow",options:r={element:e,padding:t.arrowPadding},async fn(e){let{x:t,y:n,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=e,{element:u,padding:c=0}=uy(r,e)||{};if(null==u)return{};let d=uI(c),f={x:t,y:n},h=uC(uT(i)),p=uS(h),m=await s.getDimensions(u),g="y"===h,A=g?"clientHeight":"clientWidth",y=a.reference[p]+a.reference[h]-f[h]-a.floating[p],x=f[h]-a.reference[h],B=await (null==s.getOffsetParent?void 0:s.getOffsetParent(u)),C=B?B[A]:0;C&&await (null==s.isElement?void 0:s.isElement(B))||(C=o.floating[A]||a.floating[p]);let S=C/2-m[p]/2-1,E=uf(d[g?"top":"left"],S),T=uf(d[g?"bottom":"right"],S),D=C-m[p]-T,b=C/2-m[p]/2+(y/2-x/2),M=uh(E,uf(b,D)),w=!l.arrow&&null!=uB(i)&&b!==M&&a.reference[p]/2-(b{},...d}=uy(a,e),f=await uG(e,d),h=ux(s),p=uB(s),m="y"===uT(s),{width:g,height:A}=o.floating;"top"===h||"bottom"===h?(n=h,i=p===(await (null==l.isRTL?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(i=h,n="end"===p?"top":"bottom");let y=A-f.top-f.bottom,x=g-f.left-f.right,B=uf(A-f[n],y),C=uf(g-f[i],x),S=!e.middlewareData.shift,E=B,T=C;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(T=x),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(E=y),S&&!p){let e=uh(f.left,0),t=uh(f.right,0),r=uh(f.top,0),n=uh(f.bottom,0);m?T=g-2*(0!==e||0!==t?e+t:uh(f.left,f.right)):E=A-2*(0!==r||0!==n?r+n:uh(f.top,f.bottom))}await c({...e,availableWidth:T,availableHeight:E});let D=await l.getDimensions(u.floating);return g!==D.width||A!==D.height?{reset:{rects:!0}}:{}}}],y=await ((e,t,r)=>{let n=new Map,i={platform:cp,...r},a={...i.platform,_c:n};return uU(e,t,{...i,platform:a})})(e,T,{placement:b,strategy:o?"fixed":"absolute",middleware:A});null==t||t.setState("currentPlacement",y.placement),I(!0);let x=cA(y.x),B=cA(y.y);if(Object.assign(T.style,{top:"0",left:"0",transform:"translate3d(".concat(x,"px,").concat(B,"px,0)")}),s&&y.middlewareData.arrow){let{x:e,y:t}=y.middlewareData.arrow,r=y.placement.split("-")[0],n=s.clientWidth/2,i=s.clientHeight/2,a=null!=e?e+n:-n,o=null!=t?t+i:-i;T.style.setProperty("--popover-transform-origin",{top:"".concat(a,"px calc(100% + ").concat(i,"px)"),bottom:"".concat(a,"px ").concat(-i,"px"),left:"calc(100% + ".concat(n,"px) ").concat(o,"px"),right:"".concat(-n,"px ").concat(o,"px")}[r]),Object.assign(s.style,{left:null!=e?"".concat(e,"px"):"",top:null!=t?"".concat(t,"px"):"",[r]:"100%"})}},n=function(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,c=ct(e),d=a||s?[...c?u6(c):[],...u6(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),s&&e.addEventListener("resize",r)});let f=c&&l?function(e,t){let r,n=null,i=uz(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function s(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(o||t(),!f||!h)return;let p=um(d),m=um(i.clientWidth-(c+f)),g={rootMargin:-p+"px "+-m+"px "+-um(i.clientHeight-(d+h))+"px "+-um(c)+"px",threshold:uh(0,uf(1,l))||1},A=!0;function y(t){let n=t[0].intersectionRatio;if(n!==l){if(!A)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==n||cm(u,e.getBoundingClientRect())||s(),A=!1}try{n=new IntersectionObserver(y,{...g,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(y,g)}n.observe(e)}(!0),a}(c,r):null,h=-1,p=null;o&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),c&&!u&&p.observe(c),p.observe(t));let m=u?ca(e):null;return u&&function t(){let n=ca(e);m&&!cm(m,n)&&r(),m=n,i=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",r),s&&e.removeEventListener("resize",r)}),null==f||f(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(i)}}(e,T,async()=>{O?(await G({updatePosition:r}),I(!0)):await r()},{elementResize:"function"==typeof ResizeObserver});return()=>{I(!1),n()}},[t,w,T,C,S,T,b,M,L,o,l,u,c,d,f,h,p,m,g,U,O,G]),s$(()=>{if(!M||!L||!(null==T?void 0:T.isConnected)||!(null==D?void 0:D.isConnected))return;let e=()=>{T.style.zIndex=getComputedStyle(D).zIndex};e();let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)},[M,L,T,D]);let H=o?"fixed":"absolute";return x=s8(x,e=>(0,eU.jsx)("div",{...s,style:{position:H,top:0,left:0,width:"max-content",...null==s?void 0:s.style},ref:null==t?void 0:t.setPopoverElement,children:e}),[t,H,s]),x={"data-placing":!R||void 0,...x=s8(x,e=>(0,eU.jsx)(o0,{value:t,children:e}),[t]),style:{position:"relative",...x.style}},x=uc({store:t,modal:r,portal:n,preserveTabOrder:i,preserveTabOrderAnchor:E||S,autoFocusOnShow:R&&a,...x,portalRef:P})});ud(oi(function(e){return os("div",cy(e))}),oq);var cx=oo(function(e){let{store:t,modal:r,tabIndex:n,alwaysVisible:i,autoFocusOnHide:a=!0,hideOnInteractOutside:s=!0,...o}=e,l=o8();sL(t=t||l,!1);let u=t.useState("baseElement"),c=(0,eG.useRef)(!1),d=lE(t.tag,e=>null==e?void 0:e.renderedItems.length);return o=lH({store:t,alwaysVisible:i,...o}),o=cy({store:t,modal:r,alwaysVisible:i,backdrop:!1,autoFocusOnShow:!1,finalFocus:u,preserveTabOrderAnchor:null,unstable_treeSnapshotKey:d,...o,getPersistentElements(){var e;let n=(null==(e=o.getPersistentElements)?void 0:e.call(o))||[];if(!r||!t)return n;let{contentElement:i,baseElement:a}=t.getState();if(!a)return n;let s=sh(a),l=[];if((null==i?void 0:i.id)&&l.push('[aria-controls~="'.concat(i.id,'"]')),(null==a?void 0:a.id)&&l.push('[aria-controls~="'.concat(a.id,'"]')),!l.length)return[...n,a];let u=l.join(",");return[...n,...s.querySelectorAll(u)]},autoFocusOnHide:e=>!sU(a,e)&&(!c.current||(c.current=!1,!1)),hideOnInteractOutside(e){var r,n;let i=null==t?void 0:t.getState(),a=null==(r=null==i?void 0:i.contentElement)?void 0:r.id,o=null==(n=null==i?void 0:i.baseElement)?void 0:n.id;if(function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n'[aria-controls~="'.concat(e,'"]')).join(", ");return!!t&&e.matches(t)}return!1}(e.target,a,o))return!1;let l="function"==typeof s?s(e):s;return l&&(c.current="click"===e.type),l}})}),cB=ud(oi(function(e){return os("div",cx(e))}),o8);(0,eG.createContext)(null),(0,eG.createContext)(null);var cC=ol([op],[om]),cS=cC.useContext;cC.useScopedContext,cC.useProviderContext,cC.ContextProvider,cC.ScopedContextProvider;var cE={id:null};function cT(e,t){return e.find(e=>t?!e.disabled&&e.id!==t:!e.disabled)}function cD(e,t){return e.filter(e=>e.rowId===t)}function cb(e){let t=[];for(let r of e){let e=t.find(e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===r.rowId});e?e.push(r):t.push([r])}return t}function cM(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}var cw=sz()&&sk();function cF(){let{tag:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=lu(t.store,function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{},r=null==(e=t.store)?void 0:e.getState(),n=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};lc(r,r.store);let n=null==(e=r.store)?void 0:e.getState(),i=sH(r.items,null==n?void 0:n.items,r.defaultItems,[]),a=new Map(i.map(e=>[e.id,e])),s={items:i,renderedItems:sH(null==n?void 0:n.renderedItems,[])},o=null==(t=r.store)?void 0:t.__unstablePrivateStore,l=lr({items:i,renderedItems:s.renderedItems},o),u=lr(s,r.store),c=e=>{let t=function(e,t){let r=e.map((e,t)=>[t,e]),n=!1;return(r.sort((e,r)=>{var i;let[a,s]=e,[o,l]=r,u=t(s),c=t(l);return u!==c&&u&&c?(i=u,c.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING)?(a>o&&(n=!0),-1):(a{let[t,r]=e;return r}):e}(e,e=>e.element);l.setState("renderedItems",t),u.setState("renderedItems",t)};ln(u,()=>li(l)),ln(l,()=>lo(l,["items"],e=>{u.setState("items",e.items)})),ln(l,()=>lo(l,["renderedItems"],e=>{let t=!0,r=requestAnimationFrame(()=>{let{renderedItems:t}=u.getState();e.renderedItems!==t&&c(e.renderedItems)});if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(r);let n=new IntersectionObserver(()=>{if(t){t=!1;return}cancelAnimationFrame(r),r=requestAnimationFrame(()=>c(e.renderedItems))},{root:function(e){var t;let r=e.find(e=>!!e.element),n=[...e].reverse().find(e=>!!e.element),i=null==(t=null==r?void 0:r.element)?void 0:t.parentElement;for(;i&&(null==n?void 0:n.element);){let e=i;if(n&&e.contains(n.element))return i;i=i.parentElement}return sh(i).body}(e.renderedItems)});for(let t of e.renderedItems)t.element&&n.observe(t.element);return()=>{cancelAnimationFrame(r),n.disconnect()}}));let d=function(e,t){let r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t(t=>{let n=t.findIndex(t=>{let{id:r}=t;return r===e.id}),i=t.slice();if(-1!==n){let s={...r=t[n],...e};i[n]=s,a.set(e.id,s)}else i.push(e),a.set(e.id,e);return i}),()=>{t(t=>{if(!r)return n&&a.delete(e.id),t.filter(t=>{let{id:r}=t;return r!==e.id});let i=t.findIndex(t=>{let{id:r}=t;return r===e.id});if(-1===i)return t;let s=t.slice();return s[i]=r,a.set(e.id,r),s})}},f=e=>d(e,e=>l.setState("items",e),!0);return{...u,registerItem:f,renderItem:e=>sI(f(e),d(e,e=>l.setState("renderedItems",e))),item:e=>{if(!e)return null;let t=a.get(e);if(!t){let{items:r}=l.getState();(t=r.find(t=>t.id===e))&&a.set(e,t)}return t||null},__unstablePrivateStore:l}}(t),i=sH(t.activeId,null==r?void 0:r.activeId,t.defaultActiveId),a=lr({...n.getState(),id:sH(t.id,null==r?void 0:r.id,"id-".concat(Math.random().toString(36).slice(2,8))),activeId:i,baseElement:sH(null==r?void 0:r.baseElement,null),includesBaseElement:sH(t.includesBaseElement,null==r?void 0:r.includesBaseElement,null===i),moves:sH(null==r?void 0:r.moves,0),orientation:sH(t.orientation,null==r?void 0:r.orientation,"both"),rtl:sH(t.rtl,null==r?void 0:r.rtl,!1),virtualFocus:sH(t.virtualFocus,null==r?void 0:r.virtualFocus,!1),focusLoop:sH(t.focusLoop,null==r?void 0:r.focusLoop,!1),focusWrap:sH(t.focusWrap,null==r?void 0:r.focusWrap,!1),focusShift:sH(t.focusShift,null==r?void 0:r.focusShift,!1)},n,t.store);ln(a,()=>ls(a,["renderedItems","activeId"],e=>{a.setState("activeId",t=>{var r;return void 0!==t?t:null==(r=cT(e.renderedItems))?void 0:r.id})}));let s=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"next",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=a.getState(),{skip:s=0,activeId:o=i.activeId,focusShift:l=i.focusShift,focusLoop:u=i.focusLoop,focusWrap:c=i.focusWrap,includesBaseElement:d=i.includesBaseElement,renderedItems:f=i.renderedItems,rtl:h=i.rtl}=n,p="up"===r||"down"===r,m="next"===r||"down"===r,g=p?oN(function(e,t,r){let n=cM(e);for(let i of e)for(let e=0;ee.id===o);if(!A)return null==(t=cT(g))?void 0:t.id;let y=g.some(e=>e.rowId),x=g.indexOf(A),B=g.slice(x+1),C=cD(B,A.rowId);if(s){let e=C.filter(e=>o?!e.disabled&&e.id!==o:!e.disabled),t=e.slice(s)[0]||e[e.length-1];return null==t?void 0:t.id}let S=u&&(p?"horizontal"!==u:"vertical"!==u),E=y&&c&&(p?"horizontal"!==c:"vertical"!==c),T=m?(!y||p)&&S&&d:!!p&&d;if(S){let e=cT(function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.findIndex(e=>e.id===t);return[...e.slice(n+1),...r?[cE]:[],...e.slice(0,n)]}(E&&!T?g:cD(g,A.rowId),o,T),o);return null==e?void 0:e.id}if(E){let e=cT(T?C:B,o);return T?(null==e?void 0:e.id)||null:null==e?void 0:e.id}let D=cT(C,o);return!D&&T?null:null==D?void 0:D.id};return{...n,...a,setBaseElement:e=>a.setState("baseElement",e),setActiveId:e=>a.setState("activeId",e),move:e=>{void 0!==e&&(a.setState("activeId",e),a.setState("moves",e=>e+1))},first:()=>{var e;return null==(e=cT(a.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=cT(ok(a.getState().renderedItems)))?void 0:e.id},next:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("next",e)),previous:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("previous",e)),down:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("down",e)),up:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("up",e))}}({...t,activeId:a,includesBaseElement:sH(t.includesBaseElement,null==i?void 0:i.includesBaseElement,!0),orientation:sH(t.orientation,null==i?void 0:i.orientation,"vertical"),focusLoop:sH(t.focusLoop,null==i?void 0:i.focusLoop,!0),focusWrap:sH(t.focusWrap,null==i?void 0:i.focusWrap,!0),virtualFocus:sH(t.virtualFocus,null==i?void 0:i.virtualFocus,!0)}),o=function(){let{popover:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=lu(t.store,ll(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));lc(t,r);let n=null==r?void 0:r.getState(),i=uo({...t,store:r}),a=sH(t.placement,null==n?void 0:n.placement,"bottom"),s=lr({...i.getState(),placement:a,currentPlacement:a,anchorElement:sH(null==n?void 0:n.anchorElement,null),popoverElement:sH(null==n?void 0:n.popoverElement,null),arrowElement:sH(null==n?void 0:n.arrowElement,null),rendered:Symbol("rendered")},i,r);return{...i,...s,setAnchorElement:e=>s.setState("anchorElement",e),setPopoverElement:e=>s.setState("popoverElement",e),setArrowElement:e=>s.setState("arrowElement",e),render:()=>s.setState("rendered",Symbol("rendered"))}}({...t,placement:sH(t.placement,null==i?void 0:i.placement,"bottom-start")}),l=sH(t.value,null==i?void 0:i.value,t.defaultValue,""),u=sH(t.selectedValue,null==i?void 0:i.selectedValue,null==n?void 0:n.values,t.defaultSelectedValue,""),c=Array.isArray(u),d={...s.getState(),...o.getState(),value:l,selectedValue:u,resetValueOnSelect:sH(t.resetValueOnSelect,null==i?void 0:i.resetValueOnSelect,c),resetValueOnHide:sH(t.resetValueOnHide,null==i?void 0:i.resetValueOnHide,c&&!e),activeValue:null==i?void 0:i.activeValue},f=lr(d,s,o,r);return cw&&ln(f,()=>ls(f,["virtualFocus"],()=>{f.setState("virtualFocus",!1)})),ln(f,()=>{if(e)return sI(ls(f,["selectedValue"],t=>{Array.isArray(t.selectedValue)&&e.setValues(t.selectedValue)}),ls(e,["values"],e=>{f.setState("selectedValue",e.values)}))}),ln(f,()=>ls(f,["resetValueOnHide","mounted"],e=>{e.resetValueOnHide&&(e.mounted||f.setState("value",l))})),ln(f,()=>ls(f,["open"],e=>{e.open||(f.setState("activeId",a),f.setState("moves",0))})),ln(f,()=>ls(f,["moves","activeId"],(e,t)=>{e.moves===t.moves&&f.setState("activeValue",void 0)})),ln(f,()=>lo(f,["moves","renderedItems"],(e,t)=>{if(e.moves===t.moves)return;let{activeId:r}=f.getState(),n=s.item(r);f.setState("activeValue",null==n?void 0:n.value)})),{...o,...s,...f,tag:e,setValue:e=>f.setState("value",e),resetValue:()=>f.setState("value",d.value),setSelectedValue:e=>f.setState("selectedValue",e)}}function cR(){var e,t,r,n,i,a;let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[o,l]=lb(cF,s=function(e){var t;let r=cS();return{id:s2((t=e={...e,tag:void 0!==e.tag?e.tag:r}).id),...t}}(s));return s9(l,[(e=s).tag]),lD(o,e,"value","setValue"),lD(o,e,"selectedValue","setSelectedValue"),lD(o,e,"resetValueOnHide"),lD(o,e,"resetValueOnSelect"),Object.assign((n=o,s9(i=l,[(a=e).popover]),lD(n,a,"placement"),t=ui(n,i,a),r=t,s9(l,[e.store]),lD(r,e,"items","setItems"),lD(t=r,e,"activeId","setActiveId"),lD(t,e,"includesBaseElement"),lD(t,e,"virtualFocus"),lD(t,e,"orientation"),lD(t,e,"rtl"),lD(t,e,"focusLoop"),lD(t,e,"focusWrap"),lD(t,e,"focusShift"),t),{tag:e.tag})}function cI(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=cR(e);return(0,eU.jsx)(o5,{value:t,children:e.children})}var cP=(0,eG.createContext)(void 0),cL=oo(function(e){let[t,r]=(0,eG.useState)();return sO(e={role:"group","aria-labelledby":t,...e=s8(e,e=>(0,eU.jsx)(cP.Provider,{value:r,children:e}),[])})});oi(function(e){return os("div",cL(e))});var cU=oo(function(e){let{store:t,...r}=e;return cL(r)});oi(function(e){return os("div",cU(e))});var cG=oo(function(e){let{store:t,...r}=e,n=o4();return sL(t=t||n,!1),"grid"===sE(t.useState("contentElement"))&&(r={role:"rowgroup",...r}),r=cU({store:t,...r})}),cO=oi(function(e){return os("div",cG(e))}),cH=oo(function(e){let t=(0,eG.useContext)(cP),r=s2(e.id);return s$(()=>(null==t||t(r),()=>null==t?void 0:t(void 0)),[t,r]),sO(e={id:r,"aria-hidden":!0,...e})});oi(function(e){return os("div",cH(e))});var cN=oo(function(e){let{store:t,...r}=e;return cH(r)});oi(function(e){return os("div",cN(e))});var ck=oo(function(e){return cN(e)}),cj=oi(function(e){return os("div",ck(e))}),cz=e.i(38360);let cK={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},cJ=(e,t)=>String(e.rankedValue).localeCompare(String(t.rankedValue));function cV(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{keys:n,threshold:i=cK.MATCHES,baseSort:a=cJ,sorter:s=e=>e.sort((e,t)=>(function(e,t,r){let{rank:n,keyIndex:i}=e,{rank:a,keyIndex:s}=t;return n!==a?n>a?-1:1:i===s?r(e,t):i{let{rank:n,rankedValue:i,keyIndex:a,keyThreshold:s}=e,{itemValue:o,attributes:l}=t,d=cQ(o,u,c),f=i,{minRanking:h,maxRanking:p,threshold:m}=l;return d=cK.MATCHES?d=h:d>p&&(d=p),d>n&&(n=d,a=r,s=m,f=o),{rankedValue:f,rank:n,keyIndex:a,keyThreshold:s}},{rankedValue:o,rank:cK.NO_MATCH,keyIndex:-1,keyThreshold:c.threshold}):{rankedValue:o,rank:cQ(o,u,c),keyIndex:-1,keyThreshold:c.threshold}),{rank:f,keyThreshold:h=i}=d;return f>=h&&e.push({...d,item:a,index:s}),e},[])).map(e=>{let{item:t}=e;return t})}function cQ(e,t,r){if(e=cW(e,r),(t=cW(t,r)).length>e.length)return cK.NO_MATCH;if(e===t)return cK.CASE_SENSITIVE_EQUAL;let n=function*(e,t){let r=-1;for(;(r=e.indexOf(t,r+1))>-1;)yield r;return -1}(e=e.toLowerCase(),t=t.toLowerCase()),i=n.next(),a=i.value;if(e.length===t.length&&0===a)return cK.EQUAL;if(0===a)return cK.STARTS_WITH;let s=i;for(;!s.done;){if(s.value>0&&" "===e[s.value-1])return cK.WORD_STARTS_WITH;s=n.next()}return a>0?cK.CONTAINS:1===t.length?cK.NO_MATCH:(function(e){let t="",r=" ";for(let n=0;n-1))return cK.NO_MATCH;var s=n-a;let o=r/t.length;return cK.MATCHES+1/s*o}(e,t)}function cW(e,t){let{keepDiacritics:r}=t;return e="".concat(e),r||(e=(0,cz.default)(e)),e}cV.rankings=cK;let cX={maxRanking:1/0,minRanking:-1/0};var c_=e.i(29402);let cZ=new Set(["SkiFree","SkiFree_Daily","SkiFree_Randomizer"]),cY={"missions.vl2":"Official","TR2final105-client.vl2":"Team Rabbit 2","z_mappacks/CTF/Classic_maps_v1.vl2":"Classic","z_mappacks/CTF/DynamixFinalPack.vl2":"Official","z_mappacks/CTF/KryMapPack_b3EDIT.vl2":"KryMapPack","z_mappacks/CTF/S5maps.vl2":"S5","z_mappacks/CTF/S8maps.vl2":"S8","z_mappacks/CTF/TWL-MapPack.vl2":"TWL","z_mappacks/CTF/TWL-MapPackEDIT.vl2":"TWL","z_mappacks/CTF/TWL2-MapPack.vl2":"TWL2","z_mappacks/CTF/TWL2-MapPackEDIT.vl2":"TWL2","z_mappacks/TWL_T2arenaOfficialMaps.vl2":"Arena","z_mappacks/z_DMP2-V0.6.vl2":"DMP2 (Discord Map Pack)","z_mappacks/zDMP-4.7.3DX.vl2":"DMP (Discord Map Pack)"},cq={"z_mappacks/DM":"DM","z_mappacks/LCTF":"LCTF","z_mappacks/Lak":"LakRabbit"},c$=(0,az.getMissionList)().filter(e=>!cZ.has(e)).map(e=>{var t,r;let n=(0,az.getMissionInfo)(e),[i]=(0,az.getSourceAndPath)(n.resourcePath),a=(e=>{let t=e.match(/^(.*)(\/[^/]+)$/);return t?t[1]:""})(i),s=null!=(r=null!=(t=cY[i])?t:cq[a])?r:null;return{resourcePath:n.resourcePath,missionName:e,displayName:n.displayName,sourcePath:i,groupName:s,missionTypes:n.missionTypes}}),c0=new Map(c$.map(e=>[e.missionName,e])),c1=function(e){let t=new Map;for(let n of e){var r;let e=null!=(r=t.get(n.groupName))?r:[];e.push(n),t.set(n.groupName,e)}return t.forEach((e,r)=>{t.set(r,(0,c_.default)(e,[e=>(e.displayName||e.missionName).toLowerCase()],["asc"]))}),(0,c_.default)(Array.from(t.entries()),[e=>{let[t]=e;return"Official"===t?0:null==t?2:1},e=>{let[t]=e;return t?t.toLowerCase():""}],["asc","asc"])}(c$),c2="undefined"!=typeof navigator&&/Mac|iPhone|iPad|iPod/.test(navigator.platform);function c9(e){let{mission:t}=e;return(0,eU.jsxs)(eU.Fragment,{children:[(0,eU.jsxs)("span",{className:"MissionSelect-itemHeader",children:[(0,eU.jsx)("span",{className:"MissionSelect-itemName",children:t.displayName||t.missionName}),t.missionTypes.length>0&&(0,eU.jsx)("span",{className:"MissionSelect-itemTypes",children:t.missionTypes.map(e=>(0,eU.jsx)("span",{className:"MissionSelect-itemType",children:e},e))})]}),(0,eU.jsx)("span",{className:"MissionSelect-itemMissionName",children:t.missionName})]})}function c3(e){let{value:t,onChange:r}=e,[n,i]=(0,eG.useState)(""),a=(0,eG.useRef)(null),s=cR({resetValueOnHide:!0,selectedValue:t,setSelectedValue:e=>{e&&r(e)},setValue:e=>{(0,eG.startTransition)(()=>i(e))}});(0,eG.useEffect)(()=>{let e=e=>{if("k"===e.key&&(e.metaKey||e.ctrlKey)){var t;e.preventDefault(),null==(t=a.current)||t.focus(),s.show()}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s]);let o=c0.get(t),l=(0,eG.useMemo)(()=>n?{type:"flat",missions:cV(c$,n,{keys:["displayName","missionName"]})}:{type:"grouped",groups:c1},[n]),u=o?o.displayName||o.missionName:t,c="flat"===l.type?0===l.missions.length:0===l.groups.length;return(0,eU.jsxs)(cI,{store:s,children:[(0,eU.jsxs)("div",{className:"MissionSelect-inputWrapper",children:[(0,eU.jsx)(lp,{ref:a,autoSelect:!0,placeholder:u,className:"MissionSelect-input",onFocus:()=>{document.exitPointerLock(),s.show()}}),(0,eU.jsx)("kbd",{className:"MissionSelect-shortcut",children:c2?"⌘K":"^K"})]}),(0,eU.jsx)(cB,{gutter:4,fitViewport:!0,className:"MissionSelect-popover",children:(0,eU.jsxs)(lN,{className:"MissionSelect-list",children:["flat"===l.type?l.missions.map(e=>(0,eU.jsx)(lR,{value:e.missionName,className:"MissionSelect-item",focusOnHover:!0,children:(0,eU.jsx)(c9,{mission:e})},e.missionName)):l.groups.map(e=>{let[t,r]=e;return t?(0,eU.jsxs)(cO,{className:"MissionSelect-group",children:[(0,eU.jsx)(cj,{className:"MissionSelect-groupLabel",children:t}),r.map(e=>(0,eU.jsx)(lR,{value:e.missionName,className:"MissionSelect-item",focusOnHover:!0,children:(0,eU.jsx)(c9,{mission:e})},e.missionName))]},t):(0,eU.jsx)(eG.Fragment,{children:r.map(e=>(0,eU.jsx)(lR,{value:e.missionName,className:"MissionSelect-item",focusOnHover:!0,children:(0,eU.jsx)(c9,{mission:e})},e.missionName))},"ungrouped")}),c&&(0,eU.jsx)("div",{className:"MissionSelect-noResults",children:"No missions found"})]})})]})}function c4(e){let{missionName:t,onChangeMission:r}=e,{fogEnabled:n,setFogEnabled:i,fov:a,setFov:s,audioEnabled:o,setAudioEnabled:l,animationEnabled:u,setAnimationEnabled:c}=(0,n2.useSettings)(),{speedMultiplier:d,setSpeedMultiplier:f}=(0,n2.useControls)(),{debugMode:h,setDebugMode:p}=(0,n2.useDebug)();return(0,eU.jsxs)("div",{id:"controls",onKeyDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),children:[(0,eU.jsx)(c3,{value:t,onChange:r}),(0,eU.jsxs)("div",{className:"CheckboxField",children:[(0,eU.jsx)("input",{id:"fogInput",type:"checkbox",checked:n,onChange:e=>{i(e.target.checked)}}),(0,eU.jsx)("label",{htmlFor:"fogInput",children:"Fog?"})]}),(0,eU.jsxs)("div",{className:"CheckboxField",children:[(0,eU.jsx)("input",{id:"audioInput",type:"checkbox",checked:o,onChange:e=>{l(e.target.checked)}}),(0,eU.jsx)("label",{htmlFor:"audioInput",children:"Audio?"})]}),(0,eU.jsxs)("div",{className:"CheckboxField",children:[(0,eU.jsx)("input",{id:"animationInput",type:"checkbox",checked:u,onChange:e=>{c(e.target.checked)}}),(0,eU.jsx)("label",{htmlFor:"animationInput",children:"Animation?"})]}),(0,eU.jsxs)("div",{className:"CheckboxField",children:[(0,eU.jsx)("input",{id:"debugInput",type:"checkbox",checked:h,onChange:e=>{p(e.target.checked)}}),(0,eU.jsx)("label",{htmlFor:"debugInput",children:"Debug?"})]}),(0,eU.jsxs)("div",{className:"Field",children:[(0,eU.jsx)("label",{htmlFor:"fovInput",children:"FOV"}),(0,eU.jsx)("input",{id:"fovInput",type:"range",min:75,max:120,step:5,value:a,onChange:e=>s(parseInt(e.target.value))}),(0,eU.jsx)("output",{htmlFor:"speedInput",children:a})]}),(0,eU.jsxs)("div",{className:"Field",children:[(0,eU.jsx)("label",{htmlFor:"speedInput",children:"Speed"}),(0,eU.jsx)("input",{id:"speedInput",type:"range",min:.1,max:5,step:.05,value:d,onChange:e=>f(parseFloat(e.target.value))})]})]})}let c8=eG.forwardRef((e,t)=>{let{envMap:r,resolution:n=256,frames:i=1/0,makeDefault:a,children:s,...o}=e,l=(0,eW.useThree)(e=>{let{set:t}=e;return t}),u=(0,eW.useThree)(e=>{let{camera:t}=e;return t}),c=(0,eW.useThree)(e=>{let{size:t}=e;return t}),d=eG.useRef(null);eG.useImperativeHandle(t,()=>d.current,[]);let f=eG.useRef(null),h=function(e,t,r){let n=(0,eW.useThree)(e=>e.size),i=(0,eW.useThree)(e=>e.viewport),a="number"==typeof e?e:n.width*i.dpr,s=n.height*i.dpr,o=("number"==typeof e?void 0:e)||{},{samples:l=0,depth:u,...c}=o,d=null!=u?u:o.depthBuffer,f=eG.useMemo(()=>{let e=new ek.WebGLRenderTarget(a,s,{minFilter:ek.LinearFilter,magFilter:ek.LinearFilter,type:ek.HalfFloatType,...c});return d&&(e.depthTexture=new ek.DepthTexture(a,s,ek.FloatType)),e.samples=l,e},[]);return eG.useLayoutEffect(()=>{f.setSize(a,s),l&&(f.samples=l)},[l,f,a,s]),eG.useEffect(()=>()=>f.dispose(),[]),f}(n);eG.useLayoutEffect(()=>{o.manual||(d.current.aspect=c.width/c.height)},[c,o]),eG.useLayoutEffect(()=>{d.current.updateProjectionMatrix()});let p=0,m=null,g="function"==typeof s;return(0,eX.useFrame)(e=>{g&&(i===1/0||p{if(a)return l(()=>({camera:d.current})),()=>l(()=>({camera:u}))},[d,a,l]),eG.createElement(eG.Fragment,null,eG.createElement("perspectiveCamera",(0,ir.default)({ref:d},o),!g&&s),eG.createElement("group",{ref:f},g&&s(h.texture)))});function c5(){let{fov:e}=(0,n2.useSettings)();return(0,eU.jsx)(c8,{makeDefault:!0,position:[0,256,0],fov:e})}var c6=e.i(51434),c7=e.i(81405);function de(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function dt(e){let{showPanel:t=0,className:r,parent:n}=e,i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,[n,i]=eG.useState();return eG.useLayoutEffect(()=>{let t=e();return i(t),de(r,t),()=>de(r,null)},t),n}(()=>new c7.default,[]);return eG.useEffect(()=>{if(i){let e=n&&n.current||document.body;i.showPanel(t),null==e||e.appendChild(i.dom);let a=(null!=r?r:"").split(" ").filter(e=>e);a.length&&i.dom.classList.add(...a);let s=(0,eH.j)(()=>i.begin()),o=(0,eH.k)(()=>i.end());return()=>{a.length&&i.dom.classList.remove(...a),null==e||e.removeChild(i.dom),s(),o()}}},[n,i,r,t]),null}var dr=e.i(60099);function dn(){let{debugMode:e}=(0,n2.useDebug)(),t=(0,eG.useRef)(null);return(0,eG.useEffect)(()=>{let e=t.current;e&&e.setColors("rgb(153, 255, 0)","rgb(0, 153, 255)","rgb(255, 153, 0)")}),e?(0,eU.jsxs)(eU.Fragment,{children:[(0,eU.jsx)(dt,{className:"StatsPanel"}),(0,eU.jsx)("axesHelper",{ref:t,args:[70],renderOrder:999,children:(0,eU.jsx)("lineBasicMaterial",{depthTest:!1,depthWrite:!1,fog:!1,vertexColors:!0})}),(0,eU.jsx)(dr.Html,{position:[80,0,0],center:!0,children:(0,eU.jsx)("span",{className:"AxisLabel","data-axis":"y",children:"Y"})}),(0,eU.jsx)(dr.Html,{position:[0,80,0],center:!0,children:(0,eU.jsx)("span",{className:"AxisLabel","data-axis":"z",children:"Z"})}),(0,eU.jsx)(dr.Html,{position:[0,0,80],center:!0,children:(0,eU.jsx)("span",{className:"AxisLabel","data-axis":"x",children:"X"})})]}):null}let di=new a1;function da(){let e=(0,eO.useSearchParams)(),t=(0,eO.useRouter)(),[r,n]=(0,eG.useState)(e.get("mission")||"TWL2_WoodyMyrk"),[i,a]=(0,eG.useState)(!0);(0,eG.useEffect)(()=>(window.setMissionName=n,window.getMissionList=az.getMissionList,window.getMissionInfo=az.getMissionInfo,()=>{delete window.setMissionName,delete window.getMissionList,delete window.getMissionInfo}),[]),(0,eG.useEffect)(()=>{let e=new URLSearchParams;e.set("mission",r),t.replace("?".concat(e.toString()),{scroll:!1})},[r,t]);let s=(0,eG.useCallback)(e=>{a(e)},[]);return(0,eU.jsx)(nV,{client:di,children:(0,eU.jsx)("main",{children:(0,eU.jsxs)(n2.SettingsProvider,{children:[(0,eU.jsxs)("div",{id:"canvasContainer",children:[i&&(0,eU.jsx)("div",{id:"loadingIndicator",className:"LoadingSpinner"}),(0,eU.jsxs)(eQ,{shadows:!0,frameloop:"always",children:[(0,eU.jsx)(aU,{children:(0,eU.jsxs)(c6.AudioProvider,{children:[(0,eU.jsx)(aQ,{name:r,onLoadingChange:s},r),(0,eU.jsx)(c5,{}),(0,eU.jsx)(dn,{}),(0,eU.jsx)(sd,{})]})}),(0,eU.jsx)(rV,{children:(0,eU.jsx)(rW,{intensity:3,aoRadius:3,quality:"performance"})})]})]}),(0,eU.jsx)(c4,{missionName:r,onChangeMission:n})]})})})}function ds(){return(0,eU.jsx)(eG.Suspense,{children:(0,eU.jsx)(da,{})})}}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18566,(e,t,r)=>{t.exports=e.r(76562)},38360,(e,t,r)=>{var n={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y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:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},i=Object.keys(n).join("|"),a=RegExp(i,"g"),s=RegExp(i,"");function o(e){return n[e]}var l=function(e){return e.replace(a,o)};t.exports=l,t.exports.has=function(e){return!!e.match(s)},t.exports.remove=l},29402,(e,t,r)=>{var n,i,a="__lodash_hash_undefined__",s=1/0,o="[object Arguments]",l="[object Array]",u="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Function]",h="[object Map]",p="[object Number]",m="[object Object]",g="[object Promise]",A="[object RegExp]",y="[object Set]",x="[object String]",B="[object Symbol]",C="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D=/^\w*$/,b=/^\./,M=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/\\(\\)?/g,F=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,I={};I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I[o]=I[l]=I[S]=I[u]=I[E]=I[c]=I[d]=I[f]=I[h]=I[p]=I[m]=I[A]=I[y]=I[x]=I[C]=!1;var P=e.g&&e.g.Object===Object&&e.g,L="object"==typeof self&&self&&self.Object===Object&&self,U=P||L||Function("return this")(),G=r&&!r.nodeType&&r,O=G&&t&&!t.nodeType&&t,H=O&&O.exports===G&&P.process,N=function(){try{return H&&H.binding("util")}catch(e){}}(),k=N&&N.isTypedArray;function j(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r-1},eB.prototype.set=function(e,t){var r=this.__data__,n=eT(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},eC.prototype.clear=function(){this.__data__={hash:new ex,map:new(eo||eB),string:new ex}},eC.prototype.delete=function(e){return eP(this,e).delete(e)},eC.prototype.get=function(e){return eP(this,e).get(e)},eC.prototype.has=function(e){return eP(this,e).has(e)},eC.prototype.set=function(e,t){return eP(this,e).set(e,t),this},eS.prototype.add=eS.prototype.push=function(e){return this.__data__.set(e,a),this},eS.prototype.has=function(e){return this.__data__.has(e)},eE.prototype.clear=function(){this.__data__=new eB},eE.prototype.delete=function(e){return this.__data__.delete(e)},eE.prototype.get=function(e){return this.__data__.get(e)},eE.prototype.has=function(e){return this.__data__.has(e)},eE.prototype.set=function(e,t){var r=this.__data__;if(r instanceof eB){var n=r.__data__;if(!eo||n.length<199)return n.push([e,t]),this;r=this.__data__=new eC(n)}return r.set(e,t),this};var eD=function(e,t){return function(r,n){if(null==r)return r;if(!eQ(r))return e(r,n);for(var i=r.length,a=-1,s=Object(r);(t?a--:++ao))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var c=-1,d=!0,f=1&i?new eS:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=0x1fffffffffffff}function e_(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function eZ(e){return!!e&&"object"==typeof e}function eY(e){return"symbol"==typeof e||eZ(e)&&$.call(e)==B}var eq=k?z(k):function(e){return eZ(e)&&eX(e.length)&&!!I[$.call(e)]};function e$(e){return eQ(e)?function(e,t){var r=eV(e)||eJ(e)?function(e,t){for(var r=-1,n=Array(e);++rt||a&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=o)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}(e,t,r)});l--;)o[l]=o[l].value;return o}(e,t,r))}},81405,(e,t,r)=>{e.e,t.exports=function(){var e=function(){function t(e){return i.appendChild(e.dom),e}function r(e){for(var t=0;ts+1e3&&(l.update(1e3*o/(e-s),100),s=e,o=0,c)){var t=performance.memory;c.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){a=this.end()},domElement:i,setMode:r}};return e.Panel=function(e,t,r){var n=1/0,i=0,a=Math.round,s=a(window.devicePixelRatio||1),o=80*s,l=48*s,u=3*s,c=2*s,d=3*s,f=15*s,h=74*s,p=30*s,m=document.createElement("canvas");m.width=o,m.height=l,m.style.cssText="width:80px;height:48px";var g=m.getContext("2d");return g.font="bold "+9*s+"px Helvetica,Arial,sans-serif",g.textBaseline="top",g.fillStyle=r,g.fillRect(0,0,o,l),g.fillStyle=t,g.fillText(e,u,c),g.fillRect(d,f,h,p),g.fillStyle=r,g.globalAlpha=.9,g.fillRect(d,f,h,p),{dom:m,update:function(l,A){n=Math.min(n,l),i=Math.max(i,l),g.fillStyle=r,g.globalAlpha=1,g.fillRect(0,0,o,f),g.fillStyle=t,g.fillText(a(l)+" "+e+" ("+a(n)+"-"+a(i)+")",u,c),g.drawImage(m,d+s,f,h-s,p,d,f,h-s,p),g.fillRect(d+h-s,f,s,p),g.fillStyle=r,g.globalAlpha=.9,g.fillRect(d+h-s,f,s,a((1-l/A)*p))}}},e}()},31713,e=>{"use strict";let t,r,n,i;e.s(["default",()=>dl],31713);var a,s,o,l,u,c,d,f,h,p,m,g,A,y,x,B,C,S,E,T,D,b,M,w,F,R,I,P,L,U,G,O,H,N,k,j,z,K,J,V,Q,W,X,_,Z,Y,q,$,ee,et,er,en,ei,ea,es,eo,el,eu,ec,ed,ef,eh,ep,em,ev,eg,eA,ey,ex,eB,eC,eS,eE,eT,eD,eb,eM,ew,eF,eR,eI,eP,eL,eU=e.i(43476),eG=e.i(71645),eO=e.i(18566),eH=e.i(46712);e.s(["ACESFilmicToneMapping",()=>ek.ACESFilmicToneMapping,"AddEquation",()=>ek.AddEquation,"AddOperation",()=>ek.AddOperation,"AdditiveAnimationBlendMode",()=>ek.AdditiveAnimationBlendMode,"AdditiveBlending",()=>ek.AdditiveBlending,"AgXToneMapping",()=>ek.AgXToneMapping,"AlphaFormat",()=>ek.AlphaFormat,"AlwaysCompare",()=>ek.AlwaysCompare,"AlwaysDepth",()=>ek.AlwaysDepth,"AlwaysStencilFunc",()=>ek.AlwaysStencilFunc,"AmbientLight",()=>ek.AmbientLight,"AnimationAction",()=>ek.AnimationAction,"AnimationClip",()=>ek.AnimationClip,"AnimationLoader",()=>ek.AnimationLoader,"AnimationMixer",()=>ek.AnimationMixer,"AnimationObjectGroup",()=>ek.AnimationObjectGroup,"AnimationUtils",()=>ek.AnimationUtils,"ArcCurve",()=>ek.ArcCurve,"ArrayCamera",()=>ek.ArrayCamera,"ArrowHelper",()=>ek.ArrowHelper,"AttachedBindMode",()=>ek.AttachedBindMode,"Audio",()=>ek.Audio,"AudioAnalyser",()=>ek.AudioAnalyser,"AudioContext",()=>ek.AudioContext,"AudioListener",()=>ek.AudioListener,"AudioLoader",()=>ek.AudioLoader,"AxesHelper",()=>ek.AxesHelper,"BackSide",()=>ek.BackSide,"BasicDepthPacking",()=>ek.BasicDepthPacking,"BasicShadowMap",()=>ek.BasicShadowMap,"BatchedMesh",()=>ek.BatchedMesh,"Bone",()=>ek.Bone,"BooleanKeyframeTrack",()=>ek.BooleanKeyframeTrack,"Box2",()=>ek.Box2,"Box3",()=>ek.Box3,"Box3Helper",()=>ek.Box3Helper,"BoxGeometry",()=>ek.BoxGeometry,"BoxHelper",()=>ek.BoxHelper,"BufferAttribute",()=>ek.BufferAttribute,"BufferGeometry",()=>ek.BufferGeometry,"BufferGeometryLoader",()=>ek.BufferGeometryLoader,"ByteType",()=>ek.ByteType,"Cache",()=>ek.Cache,"Camera",()=>ek.Camera,"CameraHelper",()=>ek.CameraHelper,"CanvasTexture",()=>ek.CanvasTexture,"CapsuleGeometry",()=>ek.CapsuleGeometry,"CatmullRomCurve3",()=>ek.CatmullRomCurve3,"CineonToneMapping",()=>ek.CineonToneMapping,"CircleGeometry",()=>ek.CircleGeometry,"ClampToEdgeWrapping",()=>ek.ClampToEdgeWrapping,"Clock",()=>ek.Clock,"Color",()=>ek.Color,"ColorKeyframeTrack",()=>ek.ColorKeyframeTrack,"ColorManagement",()=>ek.ColorManagement,"CompressedArrayTexture",()=>ek.CompressedArrayTexture,"CompressedCubeTexture",()=>ek.CompressedCubeTexture,"CompressedTexture",()=>ek.CompressedTexture,"CompressedTextureLoader",()=>ek.CompressedTextureLoader,"ConeGeometry",()=>ek.ConeGeometry,"ConstantAlphaFactor",()=>ek.ConstantAlphaFactor,"ConstantColorFactor",()=>ek.ConstantColorFactor,"Controls",()=>ek.Controls,"CubeCamera",()=>ek.CubeCamera,"CubeReflectionMapping",()=>ek.CubeReflectionMapping,"CubeRefractionMapping",()=>ek.CubeRefractionMapping,"CubeTexture",()=>ek.CubeTexture,"CubeTextureLoader",()=>ek.CubeTextureLoader,"CubeUVReflectionMapping",()=>ek.CubeUVReflectionMapping,"CubicBezierCurve",()=>ek.CubicBezierCurve,"CubicBezierCurve3",()=>ek.CubicBezierCurve3,"CubicInterpolant",()=>ek.CubicInterpolant,"CullFaceBack",()=>ek.CullFaceBack,"CullFaceFront",()=>ek.CullFaceFront,"CullFaceFrontBack",()=>ek.CullFaceFrontBack,"CullFaceNone",()=>ek.CullFaceNone,"Curve",()=>ek.Curve,"CurvePath",()=>ek.CurvePath,"CustomBlending",()=>ek.CustomBlending,"CustomToneMapping",()=>ek.CustomToneMapping,"CylinderGeometry",()=>ek.CylinderGeometry,"Cylindrical",()=>ek.Cylindrical,"Data3DTexture",()=>ek.Data3DTexture,"DataArrayTexture",()=>ek.DataArrayTexture,"DataTexture",()=>ek.DataTexture,"DataTextureLoader",()=>ek.DataTextureLoader,"DataUtils",()=>ek.DataUtils,"DecrementStencilOp",()=>ek.DecrementStencilOp,"DecrementWrapStencilOp",()=>ek.DecrementWrapStencilOp,"DefaultLoadingManager",()=>ek.DefaultLoadingManager,"DepthFormat",()=>ek.DepthFormat,"DepthStencilFormat",()=>ek.DepthStencilFormat,"DepthTexture",()=>ek.DepthTexture,"DetachedBindMode",()=>ek.DetachedBindMode,"DirectionalLight",()=>ek.DirectionalLight,"DirectionalLightHelper",()=>ek.DirectionalLightHelper,"DiscreteInterpolant",()=>ek.DiscreteInterpolant,"DodecahedronGeometry",()=>ek.DodecahedronGeometry,"DoubleSide",()=>ek.DoubleSide,"DstAlphaFactor",()=>ek.DstAlphaFactor,"DstColorFactor",()=>ek.DstColorFactor,"DynamicCopyUsage",()=>ek.DynamicCopyUsage,"DynamicDrawUsage",()=>ek.DynamicDrawUsage,"DynamicReadUsage",()=>ek.DynamicReadUsage,"EdgesGeometry",()=>ek.EdgesGeometry,"EllipseCurve",()=>ek.EllipseCurve,"EqualCompare",()=>ek.EqualCompare,"EqualDepth",()=>ek.EqualDepth,"EqualStencilFunc",()=>ek.EqualStencilFunc,"EquirectangularReflectionMapping",()=>ek.EquirectangularReflectionMapping,"EquirectangularRefractionMapping",()=>ek.EquirectangularRefractionMapping,"Euler",()=>ek.Euler,"EventDispatcher",()=>ek.EventDispatcher,"ExternalTexture",()=>ek.ExternalTexture,"ExtrudeGeometry",()=>ek.ExtrudeGeometry,"FileLoader",()=>ek.FileLoader,"Float16BufferAttribute",()=>ek.Float16BufferAttribute,"Float32BufferAttribute",()=>ek.Float32BufferAttribute,"FloatType",()=>ek.FloatType,"Fog",()=>ek.Fog,"FogExp2",()=>ek.FogExp2,"FramebufferTexture",()=>ek.FramebufferTexture,"FrontSide",()=>ek.FrontSide,"Frustum",()=>ek.Frustum,"FrustumArray",()=>ek.FrustumArray,"GLBufferAttribute",()=>ek.GLBufferAttribute,"GLSL1",()=>ek.GLSL1,"GLSL3",()=>ek.GLSL3,"GreaterCompare",()=>ek.GreaterCompare,"GreaterDepth",()=>ek.GreaterDepth,"GreaterEqualCompare",()=>ek.GreaterEqualCompare,"GreaterEqualDepth",()=>ek.GreaterEqualDepth,"GreaterEqualStencilFunc",()=>ek.GreaterEqualStencilFunc,"GreaterStencilFunc",()=>ek.GreaterStencilFunc,"GridHelper",()=>ek.GridHelper,"Group",()=>ek.Group,"HalfFloatType",()=>ek.HalfFloatType,"HemisphereLight",()=>ek.HemisphereLight,"HemisphereLightHelper",()=>ek.HemisphereLightHelper,"IcosahedronGeometry",()=>ek.IcosahedronGeometry,"ImageBitmapLoader",()=>ek.ImageBitmapLoader,"ImageLoader",()=>ek.ImageLoader,"ImageUtils",()=>ek.ImageUtils,"IncrementStencilOp",()=>ek.IncrementStencilOp,"IncrementWrapStencilOp",()=>ek.IncrementWrapStencilOp,"InstancedBufferAttribute",()=>ek.InstancedBufferAttribute,"InstancedBufferGeometry",()=>ek.InstancedBufferGeometry,"InstancedInterleavedBuffer",()=>ek.InstancedInterleavedBuffer,"InstancedMesh",()=>ek.InstancedMesh,"Int16BufferAttribute",()=>ek.Int16BufferAttribute,"Int32BufferAttribute",()=>ek.Int32BufferAttribute,"Int8BufferAttribute",()=>ek.Int8BufferAttribute,"IntType",()=>ek.IntType,"InterleavedBuffer",()=>ek.InterleavedBuffer,"InterleavedBufferAttribute",()=>ek.InterleavedBufferAttribute,"Interpolant",()=>ek.Interpolant,"InterpolateDiscrete",()=>ek.InterpolateDiscrete,"InterpolateLinear",()=>ek.InterpolateLinear,"InterpolateSmooth",()=>ek.InterpolateSmooth,"InterpolationSamplingMode",()=>ek.InterpolationSamplingMode,"InterpolationSamplingType",()=>ek.InterpolationSamplingType,"InvertStencilOp",()=>ek.InvertStencilOp,"KeepStencilOp",()=>ek.KeepStencilOp,"KeyframeTrack",()=>ek.KeyframeTrack,"LOD",()=>ek.LOD,"LatheGeometry",()=>ek.LatheGeometry,"Layers",()=>ek.Layers,"LessCompare",()=>ek.LessCompare,"LessDepth",()=>ek.LessDepth,"LessEqualCompare",()=>ek.LessEqualCompare,"LessEqualDepth",()=>ek.LessEqualDepth,"LessEqualStencilFunc",()=>ek.LessEqualStencilFunc,"LessStencilFunc",()=>ek.LessStencilFunc,"Light",()=>ek.Light,"LightProbe",()=>ek.LightProbe,"Line",()=>ek.Line,"Line3",()=>ek.Line3,"LineBasicMaterial",()=>ek.LineBasicMaterial,"LineCurve",()=>ek.LineCurve,"LineCurve3",()=>ek.LineCurve3,"LineDashedMaterial",()=>ek.LineDashedMaterial,"LineLoop",()=>ek.LineLoop,"LineSegments",()=>ek.LineSegments,"LinearFilter",()=>ek.LinearFilter,"LinearInterpolant",()=>ek.LinearInterpolant,"LinearMipMapLinearFilter",()=>ek.LinearMipMapLinearFilter,"LinearMipMapNearestFilter",()=>ek.LinearMipMapNearestFilter,"LinearMipmapLinearFilter",()=>ek.LinearMipmapLinearFilter,"LinearMipmapNearestFilter",()=>ek.LinearMipmapNearestFilter,"LinearSRGBColorSpace",()=>ek.LinearSRGBColorSpace,"LinearToneMapping",()=>ek.LinearToneMapping,"LinearTransfer",()=>ek.LinearTransfer,"Loader",()=>ek.Loader,"LoaderUtils",()=>ek.LoaderUtils,"LoadingManager",()=>ek.LoadingManager,"LoopOnce",()=>ek.LoopOnce,"LoopPingPong",()=>ek.LoopPingPong,"LoopRepeat",()=>ek.LoopRepeat,"MOUSE",()=>ek.MOUSE,"Material",()=>ek.Material,"MaterialLoader",()=>ek.MaterialLoader,"MathUtils",()=>ek.MathUtils,"Matrix2",()=>ek.Matrix2,"Matrix3",()=>ek.Matrix3,"Matrix4",()=>ek.Matrix4,"MaxEquation",()=>ek.MaxEquation,"Mesh",()=>ek.Mesh,"MeshBasicMaterial",()=>ek.MeshBasicMaterial,"MeshDepthMaterial",()=>ek.MeshDepthMaterial,"MeshDistanceMaterial",()=>ek.MeshDistanceMaterial,"MeshLambertMaterial",()=>ek.MeshLambertMaterial,"MeshMatcapMaterial",()=>ek.MeshMatcapMaterial,"MeshNormalMaterial",()=>ek.MeshNormalMaterial,"MeshPhongMaterial",()=>ek.MeshPhongMaterial,"MeshPhysicalMaterial",()=>ek.MeshPhysicalMaterial,"MeshStandardMaterial",()=>ek.MeshStandardMaterial,"MeshToonMaterial",()=>ek.MeshToonMaterial,"MinEquation",()=>ek.MinEquation,"MirroredRepeatWrapping",()=>ek.MirroredRepeatWrapping,"MixOperation",()=>ek.MixOperation,"MultiplyBlending",()=>ek.MultiplyBlending,"MultiplyOperation",()=>ek.MultiplyOperation,"NearestFilter",()=>ek.NearestFilter,"NearestMipMapLinearFilter",()=>ek.NearestMipMapLinearFilter,"NearestMipMapNearestFilter",()=>ek.NearestMipMapNearestFilter,"NearestMipmapLinearFilter",()=>ek.NearestMipmapLinearFilter,"NearestMipmapNearestFilter",()=>ek.NearestMipmapNearestFilter,"NeutralToneMapping",()=>ek.NeutralToneMapping,"NeverCompare",()=>ek.NeverCompare,"NeverDepth",()=>ek.NeverDepth,"NeverStencilFunc",()=>ek.NeverStencilFunc,"NoBlending",()=>ek.NoBlending,"NoColorSpace",()=>ek.NoColorSpace,"NoToneMapping",()=>ek.NoToneMapping,"NormalAnimationBlendMode",()=>ek.NormalAnimationBlendMode,"NormalBlending",()=>ek.NormalBlending,"NotEqualCompare",()=>ek.NotEqualCompare,"NotEqualDepth",()=>ek.NotEqualDepth,"NotEqualStencilFunc",()=>ek.NotEqualStencilFunc,"NumberKeyframeTrack",()=>ek.NumberKeyframeTrack,"Object3D",()=>ek.Object3D,"ObjectLoader",()=>ek.ObjectLoader,"ObjectSpaceNormalMap",()=>ek.ObjectSpaceNormalMap,"OctahedronGeometry",()=>ek.OctahedronGeometry,"OneFactor",()=>ek.OneFactor,"OneMinusConstantAlphaFactor",()=>ek.OneMinusConstantAlphaFactor,"OneMinusConstantColorFactor",()=>ek.OneMinusConstantColorFactor,"OneMinusDstAlphaFactor",()=>ek.OneMinusDstAlphaFactor,"OneMinusDstColorFactor",()=>ek.OneMinusDstColorFactor,"OneMinusSrcAlphaFactor",()=>ek.OneMinusSrcAlphaFactor,"OneMinusSrcColorFactor",()=>ek.OneMinusSrcColorFactor,"OrthographicCamera",()=>ek.OrthographicCamera,"PCFShadowMap",()=>ek.PCFShadowMap,"PCFSoftShadowMap",()=>ek.PCFSoftShadowMap,"PMREMGenerator",()=>eN.PMREMGenerator,"Path",()=>ek.Path,"PerspectiveCamera",()=>ek.PerspectiveCamera,"Plane",()=>ek.Plane,"PlaneGeometry",()=>ek.PlaneGeometry,"PlaneHelper",()=>ek.PlaneHelper,"PointLight",()=>ek.PointLight,"PointLightHelper",()=>ek.PointLightHelper,"Points",()=>ek.Points,"PointsMaterial",()=>ek.PointsMaterial,"PolarGridHelper",()=>ek.PolarGridHelper,"PolyhedronGeometry",()=>ek.PolyhedronGeometry,"PositionalAudio",()=>ek.PositionalAudio,"PropertyBinding",()=>ek.PropertyBinding,"PropertyMixer",()=>ek.PropertyMixer,"QuadraticBezierCurve",()=>ek.QuadraticBezierCurve,"QuadraticBezierCurve3",()=>ek.QuadraticBezierCurve3,"Quaternion",()=>ek.Quaternion,"QuaternionKeyframeTrack",()=>ek.QuaternionKeyframeTrack,"QuaternionLinearInterpolant",()=>ek.QuaternionLinearInterpolant,"RED_GREEN_RGTC2_Format",()=>ek.RED_GREEN_RGTC2_Format,"RED_RGTC1_Format",()=>ek.RED_RGTC1_Format,"REVISION",()=>ek.REVISION,"RGBADepthPacking",()=>ek.RGBADepthPacking,"RGBAFormat",()=>ek.RGBAFormat,"RGBAIntegerFormat",()=>ek.RGBAIntegerFormat,"RGBA_ASTC_10x10_Format",()=>ek.RGBA_ASTC_10x10_Format,"RGBA_ASTC_10x5_Format",()=>ek.RGBA_ASTC_10x5_Format,"RGBA_ASTC_10x6_Format",()=>ek.RGBA_ASTC_10x6_Format,"RGBA_ASTC_10x8_Format",()=>ek.RGBA_ASTC_10x8_Format,"RGBA_ASTC_12x10_Format",()=>ek.RGBA_ASTC_12x10_Format,"RGBA_ASTC_12x12_Format",()=>ek.RGBA_ASTC_12x12_Format,"RGBA_ASTC_4x4_Format",()=>ek.RGBA_ASTC_4x4_Format,"RGBA_ASTC_5x4_Format",()=>ek.RGBA_ASTC_5x4_Format,"RGBA_ASTC_5x5_Format",()=>ek.RGBA_ASTC_5x5_Format,"RGBA_ASTC_6x5_Format",()=>ek.RGBA_ASTC_6x5_Format,"RGBA_ASTC_6x6_Format",()=>ek.RGBA_ASTC_6x6_Format,"RGBA_ASTC_8x5_Format",()=>ek.RGBA_ASTC_8x5_Format,"RGBA_ASTC_8x6_Format",()=>ek.RGBA_ASTC_8x6_Format,"RGBA_ASTC_8x8_Format",()=>ek.RGBA_ASTC_8x8_Format,"RGBA_BPTC_Format",()=>ek.RGBA_BPTC_Format,"RGBA_ETC2_EAC_Format",()=>ek.RGBA_ETC2_EAC_Format,"RGBA_PVRTC_2BPPV1_Format",()=>ek.RGBA_PVRTC_2BPPV1_Format,"RGBA_PVRTC_4BPPV1_Format",()=>ek.RGBA_PVRTC_4BPPV1_Format,"RGBA_S3TC_DXT1_Format",()=>ek.RGBA_S3TC_DXT1_Format,"RGBA_S3TC_DXT3_Format",()=>ek.RGBA_S3TC_DXT3_Format,"RGBA_S3TC_DXT5_Format",()=>ek.RGBA_S3TC_DXT5_Format,"RGBDepthPacking",()=>ek.RGBDepthPacking,"RGBFormat",()=>ek.RGBFormat,"RGBIntegerFormat",()=>ek.RGBIntegerFormat,"RGB_BPTC_SIGNED_Format",()=>ek.RGB_BPTC_SIGNED_Format,"RGB_BPTC_UNSIGNED_Format",()=>ek.RGB_BPTC_UNSIGNED_Format,"RGB_ETC1_Format",()=>ek.RGB_ETC1_Format,"RGB_ETC2_Format",()=>ek.RGB_ETC2_Format,"RGB_PVRTC_2BPPV1_Format",()=>ek.RGB_PVRTC_2BPPV1_Format,"RGB_PVRTC_4BPPV1_Format",()=>ek.RGB_PVRTC_4BPPV1_Format,"RGB_S3TC_DXT1_Format",()=>ek.RGB_S3TC_DXT1_Format,"RGDepthPacking",()=>ek.RGDepthPacking,"RGFormat",()=>ek.RGFormat,"RGIntegerFormat",()=>ek.RGIntegerFormat,"RawShaderMaterial",()=>ek.RawShaderMaterial,"Ray",()=>ek.Ray,"Raycaster",()=>ek.Raycaster,"RectAreaLight",()=>ek.RectAreaLight,"RedFormat",()=>ek.RedFormat,"RedIntegerFormat",()=>ek.RedIntegerFormat,"ReinhardToneMapping",()=>ek.ReinhardToneMapping,"RenderTarget",()=>ek.RenderTarget,"RenderTarget3D",()=>ek.RenderTarget3D,"RepeatWrapping",()=>ek.RepeatWrapping,"ReplaceStencilOp",()=>ek.ReplaceStencilOp,"ReverseSubtractEquation",()=>ek.ReverseSubtractEquation,"RingGeometry",()=>ek.RingGeometry,"SIGNED_RED_GREEN_RGTC2_Format",()=>ek.SIGNED_RED_GREEN_RGTC2_Format,"SIGNED_RED_RGTC1_Format",()=>ek.SIGNED_RED_RGTC1_Format,"SRGBColorSpace",()=>ek.SRGBColorSpace,"SRGBTransfer",()=>ek.SRGBTransfer,"Scene",()=>ek.Scene,"ShaderChunk",()=>eN.ShaderChunk,"ShaderLib",()=>eN.ShaderLib,"ShaderMaterial",()=>ek.ShaderMaterial,"ShadowMaterial",()=>ek.ShadowMaterial,"Shape",()=>ek.Shape,"ShapeGeometry",()=>ek.ShapeGeometry,"ShapePath",()=>ek.ShapePath,"ShapeUtils",()=>ek.ShapeUtils,"ShortType",()=>ek.ShortType,"Skeleton",()=>ek.Skeleton,"SkeletonHelper",()=>ek.SkeletonHelper,"SkinnedMesh",()=>ek.SkinnedMesh,"Source",()=>ek.Source,"Sphere",()=>ek.Sphere,"SphereGeometry",()=>ek.SphereGeometry,"Spherical",()=>ek.Spherical,"SphericalHarmonics3",()=>ek.SphericalHarmonics3,"SplineCurve",()=>ek.SplineCurve,"SpotLight",()=>ek.SpotLight,"SpotLightHelper",()=>ek.SpotLightHelper,"Sprite",()=>ek.Sprite,"SpriteMaterial",()=>ek.SpriteMaterial,"SrcAlphaFactor",()=>ek.SrcAlphaFactor,"SrcAlphaSaturateFactor",()=>ek.SrcAlphaSaturateFactor,"SrcColorFactor",()=>ek.SrcColorFactor,"StaticCopyUsage",()=>ek.StaticCopyUsage,"StaticDrawUsage",()=>ek.StaticDrawUsage,"StaticReadUsage",()=>ek.StaticReadUsage,"StereoCamera",()=>ek.StereoCamera,"StreamCopyUsage",()=>ek.StreamCopyUsage,"StreamDrawUsage",()=>ek.StreamDrawUsage,"StreamReadUsage",()=>ek.StreamReadUsage,"StringKeyframeTrack",()=>ek.StringKeyframeTrack,"SubtractEquation",()=>ek.SubtractEquation,"SubtractiveBlending",()=>ek.SubtractiveBlending,"TOUCH",()=>ek.TOUCH,"TangentSpaceNormalMap",()=>ek.TangentSpaceNormalMap,"TetrahedronGeometry",()=>ek.TetrahedronGeometry,"Texture",()=>ek.Texture,"TextureLoader",()=>ek.TextureLoader,"TextureUtils",()=>ek.TextureUtils,"Timer",()=>ek.Timer,"TimestampQuery",()=>ek.TimestampQuery,"TorusGeometry",()=>ek.TorusGeometry,"TorusKnotGeometry",()=>ek.TorusKnotGeometry,"Triangle",()=>ek.Triangle,"TriangleFanDrawMode",()=>ek.TriangleFanDrawMode,"TriangleStripDrawMode",()=>ek.TriangleStripDrawMode,"TrianglesDrawMode",()=>ek.TrianglesDrawMode,"TubeGeometry",()=>ek.TubeGeometry,"UVMapping",()=>ek.UVMapping,"Uint16BufferAttribute",()=>ek.Uint16BufferAttribute,"Uint32BufferAttribute",()=>ek.Uint32BufferAttribute,"Uint8BufferAttribute",()=>ek.Uint8BufferAttribute,"Uint8ClampedBufferAttribute",()=>ek.Uint8ClampedBufferAttribute,"Uniform",()=>ek.Uniform,"UniformsGroup",()=>ek.UniformsGroup,"UniformsLib",()=>eN.UniformsLib,"UniformsUtils",()=>ek.UniformsUtils,"UnsignedByteType",()=>ek.UnsignedByteType,"UnsignedInt101111Type",()=>ek.UnsignedInt101111Type,"UnsignedInt248Type",()=>ek.UnsignedInt248Type,"UnsignedInt5999Type",()=>ek.UnsignedInt5999Type,"UnsignedIntType",()=>ek.UnsignedIntType,"UnsignedShort4444Type",()=>ek.UnsignedShort4444Type,"UnsignedShort5551Type",()=>ek.UnsignedShort5551Type,"UnsignedShortType",()=>ek.UnsignedShortType,"VSMShadowMap",()=>ek.VSMShadowMap,"Vector2",()=>ek.Vector2,"Vector3",()=>ek.Vector3,"Vector4",()=>ek.Vector4,"VectorKeyframeTrack",()=>ek.VectorKeyframeTrack,"VideoFrameTexture",()=>ek.VideoFrameTexture,"VideoTexture",()=>ek.VideoTexture,"WebGL3DRenderTarget",()=>ek.WebGL3DRenderTarget,"WebGLArrayRenderTarget",()=>ek.WebGLArrayRenderTarget,"WebGLCoordinateSystem",()=>ek.WebGLCoordinateSystem,"WebGLCubeRenderTarget",()=>ek.WebGLCubeRenderTarget,"WebGLRenderTarget",()=>ek.WebGLRenderTarget,"WebGLRenderer",()=>eN.WebGLRenderer,"WebGLUtils",()=>eN.WebGLUtils,"WebGPUCoordinateSystem",()=>ek.WebGPUCoordinateSystem,"WebXRController",()=>ek.WebXRController,"WireframeGeometry",()=>ek.WireframeGeometry,"WrapAroundEnding",()=>ek.WrapAroundEnding,"ZeroCurvatureEnding",()=>ek.ZeroCurvatureEnding,"ZeroFactor",()=>ek.ZeroFactor,"ZeroSlopeEnding",()=>ek.ZeroSlopeEnding,"ZeroStencilOp",()=>ek.ZeroStencilOp,"createCanvasElement",()=>ek.createCanvasElement],32009);var eN=e.i(8560),ek=e.i(90072),ej=e.i(32009);function ez(e,t){let r;return function(){for(var n=arguments.length,i=Array(n),a=0;ae(...i),t)}}let eK=["x","y","top","bottom","left","right","width","height"];var eJ=e.i(46791);function eV(e){let{ref:t,children:r,fallback:n,resize:i,style:a,gl:s,events:o=eH.f,eventSource:l,eventPrefix:u,shadows:c,linear:d,flat:f,legacy:h,orthographic:p,frameloop:m,dpr:g,performance:A,raycaster:y,camera:x,scene:B,onPointerMissed:C,onCreated:S,...E}=e;eG.useMemo(()=>(0,eH.e)(ej),[]);let T=(0,eH.u)(),[D,b]=function(){var e,t,r;let{debounce:n,scroll:i,polyfill:a,offsetSize:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debounce:0,scroll:!1,offsetSize:!1},o=a||("undefined"==typeof window?class{}:window.ResizeObserver);if(!o)throw Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[l,u]=(0,eG.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=(0,eG.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:l,orientationHandler:null}),d=n?"number"==typeof n?n:n.scroll:null,f=n?"number"==typeof n?n:n.resize:null,h=(0,eG.useRef)(!1);(0,eG.useEffect)(()=>(h.current=!0,()=>void(h.current=!1)));let[p,m,g]=(0,eG.useMemo)(()=>{let e=()=>{let e,t;if(!c.current.element)return;let{left:r,top:n,width:i,height:a,bottom:o,right:l,x:d,y:f}=c.current.element.getBoundingClientRect(),p={left:r,top:n,width:i,height:a,bottom:o,right:l,x:d,y:f};c.current.element instanceof HTMLElement&&s&&(p.height=c.current.element.offsetHeight,p.width=c.current.element.offsetWidth),Object.freeze(p),h.current&&(e=c.current.lastBounds,t=p,!eK.every(r=>e[r]===t[r]))&&u(c.current.lastBounds=p)};return[e,f?ez(e,f):e,d?ez(e,d):e]},[u,s,d,f]);function A(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",g,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null),c.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",c.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",c.current.orientationHandler))}function y(){c.current.element&&(c.current.resizeObserver=new o(g),c.current.resizeObserver.observe(c.current.element),i&&c.current.scrollContainers&&c.current.scrollContainers.forEach(e=>e.addEventListener("scroll",g,{capture:!0,passive:!0})),c.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",c.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",c.current.orientationHandler))}return e=g,t=!!i,(0,eG.useEffect)(()=>{if(t)return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",e,!0)},[e,t]),r=m,(0,eG.useEffect)(()=>(window.addEventListener("resize",r),()=>void window.removeEventListener("resize",r)),[r]),(0,eG.useEffect)(()=>{A(),y()},[i,g,m]),(0,eG.useEffect)(()=>A,[]),[e=>{e&&e!==c.current.element&&(A(),c.current.element=e,c.current.scrollContainers=function e(t){let r=[];if(!t||t===document.body)return r;let{overflow:n,overflowX:i,overflowY:a}=window.getComputedStyle(t);return[n,i,a].some(e=>"auto"===e||"scroll"===e)&&r.push(t),[...r,...e(t.parentElement)]}(e),y())},l,p]}({scroll:!0,debounce:{scroll:50,resize:0},...i}),M=eG.useRef(null),w=eG.useRef(null);eG.useImperativeHandle(t,()=>M.current);let F=(0,eH.a)(C),[R,I]=eG.useState(!1),[P,L]=eG.useState(!1);if(R)throw R;if(P)throw P;let U=eG.useRef(null);(0,eH.b)(()=>{let e=M.current;b.width>0&&b.height>0&&e&&(U.current||(U.current=(0,eH.c)(e)),async function(){await U.current.configure({gl:s,scene:B,events:o,shadows:c,linear:d,flat:f,legacy:h,orthographic:p,frameloop:m,dpr:g,performance:A,raycaster:y,camera:x,size:b,onPointerMissed:function(){for(var e=arguments.length,t=Array(e),r=0;r{null==e.events.connect||e.events.connect(l?(0,eH.i)(l)?l.current:l:w.current),u&&e.setEvents({compute:(e,t)=>{let r=e[u+"X"],n=e[u+"Y"];t.pointer.set(r/t.size.width*2-1,-(2*(n/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==S||S(e)}}),U.current.render((0,eU.jsx)(T,{children:(0,eU.jsx)(eH.E,{set:L,children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(eH.B,{set:I}),children:null!=r?r:null})})}))}())}),eG.useEffect(()=>{let e=M.current;if(e)return()=>(0,eH.d)(e)},[]);let G=l?"none":"auto";return(0,eU.jsx)("div",{ref:w,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:G,...a},...E,children:(0,eU.jsx)("div",{ref:D,style:{width:"100%",height:"100%"},children:(0,eU.jsx)("canvas",{ref:M,style:{display:"block"},children:n})})})}function eQ(e){return(0,eU.jsx)(eJ.FiberProvider,{children:(0,eU.jsx)(eV,{...e})})}e.i(39695),e.i(98133),e.i(95087);var eW=e.i(16096),eX=e.i(5230),e_=e.i(80520),eZ=ek,eY=class{get autoReset(){return this._autoReset}set autoReset(e){"undefined"!=typeof document&&void 0!==document.hidden&&(e?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=e)}get delta(){return .001*this._delta}get fixedDelta(){return .001*this._fixedDelta}set fixedDelta(e){this._fixedDelta=1e3*e}get elapsed(){return .001*this._elapsed}update(e){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(void 0!==e?e:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}getDelta(){return this.delta}getElapsed(){return this.elapsed}handleEvent(e){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}},eq=(()=>{let e=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),t=new Float32Array([0,0,2,0,0,2]),r=new eZ.BufferGeometry;return r.setAttribute("position",new eZ.BufferAttribute(e,3)),r.setAttribute("uv",new eZ.BufferAttribute(t,2)),r})(),e$=class e{static get fullscreenGeometry(){return eq}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){let t=this.fullscreenMaterial;null!==t&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return null!==this.screen?this.screen.material:null}set fullscreenMaterial(t){let r=this.screen;null!==r?r.material=t:((r=new eZ.Mesh(e.fullscreenGeometry,t)).frustumCulled=!1,null===this.scene&&(this.scene=new eZ.Scene),this.scene.add(r),this.screen=r)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e){arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking}render(e,t,r,n,i){throw Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,r){}dispose(){for(let t of Object.keys(this)){let r=this[t];(r instanceof eZ.WebGLRenderTarget||r instanceof eZ.Material||r instanceof eZ.Texture||r instanceof e)&&this[t].dispose()}null!==this.fullscreenMaterial&&this.fullscreenMaterial.dispose()}constructor(e="Pass",t=new eZ.Scene,r=new eZ.OrthographicCamera){this.name=e,this.renderer=null,this.scene=t,this.camera=r,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}},e0=class extends e${render(e,t,r,n,i){let a=e.state.buffers.stencil;a.setLocked(!1),a.setTest(!1)}constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}},e1="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",e2=class extends eZ.ShaderMaterial{get inputBuffer(){return this.uniforms.inputBuffer.value}set inputBuffer(e){let t=null!==e;this.colorWrite!==t&&(t?this.defines.COLOR_WRITE=!0:delete this.defines.COLOR_WRITE,this.colorWrite=t,this.needsUpdate=!0),this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){let t=null!==e;this.depthWrite!==t&&(t?this.defines.DEPTH_WRITE=!0:delete this.defines.DEPTH_WRITE,this.depthTest=t,this.depthWrite=t,this.needsUpdate=!0),this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get channelWeights(){return this.uniforms.channelWeights.value}set channelWeights(e){null!==e?(this.defines.USE_WEIGHTS="1",this.uniforms.channelWeights.value=e):delete this.defines.USE_WEIGHTS,this.needsUpdate=!0}setInputBuffer(e){this.uniforms.inputBuffer.value=e}getOpacity(e){return this.uniforms.opacity.value}setOpacity(e){this.uniforms.opacity.value=e}constructor(){super({name:"CopyMaterial",defines:{DEPTH_PACKING:"0",COLOR_WRITE:"1"},uniforms:{inputBuffer:new eZ.Uniform(null),depthBuffer:new eZ.Uniform(null),channelWeights:new eZ.Uniform(null),opacity:new eZ.Uniform(1)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef COLOR_WRITE\n#include \n#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#endif\n#ifdef DEPTH_WRITE\n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}\n#endif\n#ifdef USE_WEIGHTS\nuniform vec4 channelWeights;\n#endif\nuniform float opacity;varying vec2 vUv;void main(){\n#ifdef COLOR_WRITE\nvec4 texel=texture2D(inputBuffer,vUv);\n#ifdef USE_WEIGHTS\ntexel*=channelWeights;\n#endif\ngl_FragColor=opacity*texel;\n#ifdef COLOR_SPACE_CONVERSION\n#include \n#endif\n#include \n#else\ngl_FragColor=vec4(0.0);\n#endif\n#ifdef DEPTH_WRITE\ngl_FragDepth=readDepth(vUv);\n#endif\n}",vertexShader:e1}),this.depthFunc=eZ.AlwaysDepth}},e9=class extends e${get resize(){return this.autoResize}set resize(e){this.autoResize=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(e){this.autoResize=e}render(e,t,r,n,i){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.autoResize&&this.renderTarget.setSize(e,t)}initialize(e,t,r){void 0!==r&&(this.renderTarget.texture.type=r,r!==eZ.UnsignedByteType?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":null!==e&&e.outputColorSpace===eZ.SRGBColorSpace&&(this.renderTarget.texture.colorSpace=eZ.SRGBColorSpace))}constructor(e,t=!0){super("CopyPass"),this.fullscreenMaterial=new e2,this.needsSwap=!1,this.renderTarget=e,void 0===e&&(this.renderTarget=new eZ.WebGLRenderTarget(1,1,{minFilter:eZ.LinearFilter,magFilter:eZ.LinearFilter,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=t}},e3=new eZ.Color,e4=class extends e${setClearFlags(e,t,r){this.color=e,this.depth=t,this.stencil=r}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(e){this.overrideClearColor=e}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(e){this.overrideClearAlpha=e}render(e,t,r,n,i){let a=this.overrideClearColor,s=this.overrideClearAlpha,o=e.getClearAlpha(),l=null!==a,u=s>=0;l?(e.getClearColor(e3),e.setClearColor(a,u?s:o)):u&&e.setClearAlpha(s),e.setRenderTarget(this.renderToScreen?null:t),e.clear(this.color,this.depth,this.stencil),l?e.setClearColor(e3,o):u&&e.setClearAlpha(o)}constructor(e=!0,t=!0,r=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=e,this.depth=t,this.stencil=r,this.overrideClearColor=null,this.overrideClearAlpha=-1}},e8=class extends e${set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get inverted(){return this.inverse}set inverted(e){this.inverse=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(e){this.inverted=e}render(e,t,r,n,i){let a=e.getContext(),s=e.state.buffers,o=this.scene,l=this.camera,u=this.clearPass,c=+!this.inverted;s.color.setMask(!1),s.depth.setMask(!1),s.color.setLocked(!0),s.depth.setLocked(!0),s.stencil.setTest(!0),s.stencil.setOp(a.REPLACE,a.REPLACE,a.REPLACE),s.stencil.setFunc(a.ALWAYS,c,0xffffffff),s.stencil.setClear(1-c),s.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?u.render(e,null):(u.render(e,t),u.render(e,r))),this.renderToScreen?e.setRenderTarget(null):(e.setRenderTarget(t),e.render(o,l),e.setRenderTarget(r)),e.render(o,l),s.color.setLocked(!1),s.depth.setLocked(!1),s.stencil.setLocked(!1),s.stencil.setFunc(a.EQUAL,1,0xffffffff),s.stencil.setOp(a.KEEP,a.KEEP,a.KEEP),s.stencil.setLocked(!0)}constructor(e,t){super("MaskPass",e,t),this.needsSwap=!1,this.clearPass=new e4(!1,!1,!0),this.inverse=!1}},e5=class{get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){let t=this.inputBuffer,r=this.multisampling;r>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):r!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,null!==e){let t=e.getSize(new eZ.Vector2),r=e.getContext().getContextAttributes().alpha,n=this.inputBuffer.texture.type;for(let i of(n===eZ.UnsignedByteType&&e.outputColorSpace===eZ.SRGBColorSpace&&(this.inputBuffer.texture.colorSpace=eZ.SRGBColorSpace,this.outputBuffer.texture.colorSpace=eZ.SRGBColorSpace,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height),this.passes))i.initialize(e,r,n)}}replaceRenderer(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=this.renderer,n=r.domElement.parentNode;return this.setRenderer(e),t&&null!==n&&(n.removeChild(r.domElement),n.appendChild(e.domElement)),r}createDepthTexture(){let e=this.depthTexture=new eZ.DepthTexture;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=eZ.DepthStencilFormat,e.type=eZ.UnsignedInt248Type):e.type=eZ.UnsignedIntType,e}deleteDepthTexture(){if(null!==this.depthTexture)for(let e of(this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose(),this.passes))e.setDepthTexture(null)}createBuffer(e,t,r,n){let i=this.renderer,a=null===i?new eZ.Vector2:i.getDrawingBufferSize(new eZ.Vector2),s={minFilter:eZ.LinearFilter,magFilter:eZ.LinearFilter,stencilBuffer:t,depthBuffer:e,type:r},o=new eZ.WebGLRenderTarget(a.width,a.height,s);return n>0&&(o.samples=n),r===eZ.UnsignedByteType&&null!==i&&i.outputColorSpace===eZ.SRGBColorSpace&&(o.texture.colorSpace=eZ.SRGBColorSpace),o.texture.name="EffectComposer.Buffer",o.texture.generateMipmaps=!1,o}setMainScene(e){for(let t of this.passes)t.mainScene=e}setMainCamera(e){for(let t of this.passes)t.mainCamera=e}addPass(e,t){let r=this.passes,n=this.renderer,i=n.getDrawingBufferSize(new eZ.Vector2),a=n.getContext().getContextAttributes().alpha,s=this.inputBuffer.texture.type;if(e.setRenderer(n),e.setSize(i.width,i.height),e.initialize(n,a,s),this.autoRenderToScreen&&(r.length>0&&(r[r.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),void 0!==t?r.splice(t,0,e):r.push(e),this.autoRenderToScreen&&(r[r.length-1].renderToScreen=!0),e.needsDepthTexture||null!==this.depthTexture)if(null===this.depthTexture){let t=this.createDepthTexture();for(e of r)e.setDepthTexture(t)}else e.setDepthTexture(this.depthTexture)}removePass(e){let t=this.passes,r=t.indexOf(e);-1!==r&&t.splice(r,1).length>0&&(null!==this.depthTexture&&(t.reduce((e,t)=>e||t.needsDepthTexture,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())),this.autoRenderToScreen&&r===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0)))}removeAllPasses(){let e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){let t,r,n,i=this.renderer,a=this.copyPass,s=this.inputBuffer,o=this.outputBuffer,l=!1;for(let u of(void 0===e&&(this.timer.update(),e=this.timer.getDelta()),this.passes))u.enabled&&(u.render(i,s,o,e,l),u.needsSwap&&(l&&(a.renderToScreen=u.renderToScreen,t=i.getContext(),(r=i.state.buffers.stencil).setFunc(t.NOTEQUAL,1,0xffffffff),a.render(i,s,o,e,l),r.setFunc(t.EQUAL,1,0xffffffff)),n=s,s=o,o=n),u instanceof e8?l=!0:u instanceof e0&&(l=!1))}setSize(e,t,r){let n=this.renderer,i=n.getSize(new eZ.Vector2);(void 0===e||void 0===t)&&(e=i.width,t=i.height),(i.width!==e||i.height!==t)&&n.setSize(e,t,r);let a=n.getDrawingBufferSize(new eZ.Vector2);for(let e of(this.inputBuffer.setSize(a.width,a.height),this.outputBuffer.setSize(a.width,a.height),this.passes))e.setSize(a.width,a.height)}reset(){this.dispose(),this.autoRenderToScreen=!0}dispose(){for(let e of this.passes)e.dispose();this.passes=[],null!==this.inputBuffer&&this.inputBuffer.dispose(),null!==this.outputBuffer&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose(),e$.fullscreenGeometry.dispose()}constructor(e=null,{depthBuffer:t=!0,stencilBuffer:r=!1,multisampling:n=0,frameBufferType:i}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,r,i,n),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new e9,this.depthTexture=null,this.passes=[],this.timer=new eY,this.autoRenderToScreen=!0,this.setRenderer(e)}},e6={NONE:0,DEPTH:1,CONVOLUTION:2},e7={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},te=class{constructor(){this.shaderParts=new Map([[e7.FRAGMENT_HEAD,null],[e7.FRAGMENT_MAIN_UV,null],[e7.FRAGMENT_MAIN_IMAGE,null],[e7.VERTEX_HEAD,null],[e7.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=e6.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=eZ.LinearSRGBColorSpace}},tt=!1,tr=class{cloneMaterial(e){if(!(e instanceof eZ.ShaderMaterial))return e.clone();let t=e.uniforms,r=new Map;for(let e in t){let n=t[e].value;n.isRenderTargetTexture&&(t[e].value=null,r.set(e,n))}let n=e.clone();for(let e of r)t[e[0]].value=e[1],n.uniforms[e[0]].value=e[1];return n}setMaterial(e){if(this.disposeMaterials(),this.material=e,null!==e){let t=this.materials=[this.cloneMaterial(e),this.cloneMaterial(e),this.cloneMaterial(e)];for(let r of t)r.uniforms=Object.assign({},e.uniforms),r.side=eZ.FrontSide;t[2].skinning=!0,this.materialsBackSide=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.side=eZ.BackSide,r}),this.materialsDoubleSide=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.side=eZ.DoubleSide,r}),this.materialsFlatShaded=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.flatShading=!0,r}),this.materialsFlatShadedBackSide=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.flatShading=!0,r.side=eZ.BackSide,r}),this.materialsFlatShadedDoubleSide=t.map(t=>{let r=this.cloneMaterial(t);return r.uniforms=Object.assign({},e.uniforms),r.flatShading=!0,r.side=eZ.DoubleSide,r})}}render(e,t,r){let n=e.shadowMap.enabled;if(e.shadowMap.enabled=!1,tt){let n=this.originalMaterials;for(let i of(this.meshCount=0,t.traverse(this.replaceMaterial),e.render(t,r),n))i[0].material=i[1];this.meshCount!==n.size&&n.clear()}else{let n=t.overrideMaterial;t.overrideMaterial=this.material,e.render(t,r),t.overrideMaterial=n}e.shadowMap.enabled=n}disposeMaterials(){if(null!==this.material)for(let e of this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide))e.dispose()}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return tt}static set workaroundEnabled(e){tt=e}constructor(e=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(e),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case eZ.DoubleSide:t=this.materialsFlatShadedDoubleSide;break;case eZ.BackSide:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded}else switch(e.material.side){case eZ.DoubleSide:t=this.materialsDoubleSide;break;case eZ.BackSide:t=this.materialsBackSide;break;default:t=this.materials}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}},tn=class extends eZ.EventDispatcher{updateEffectiveSize(){let e=this.baseSize,t=this.preferredSize,r=this.effectiveSize,n=this.scale;-1!==t.width?r.width=t.width:-1!==t.height?r.width=Math.round(t.height*(e.width/Math.max(e.height,1))):r.width=Math.round(e.width*n),-1!==t.height?r.height=t.height:-1!==t.width?r.height=Math.round(t.width/Math.max(e.width/Math.max(e.height,1),1)):r.height=Math.round(e.height*n)}get width(){return this.effectiveSize.width}set width(e){this.preferredWidth=e}get height(){return this.effectiveSize.height}set height(e){this.preferredHeight=e}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(e){this.s!==e&&(this.s=e,this.preferredSize.setScalar(-1),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(e){this.scale=e}get baseWidth(){return this.baseSize.width}set baseWidth(e){this.baseSize.width!==e&&(this.baseSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(e){this.baseWidth=e}get baseHeight(){return this.baseSize.height}set baseHeight(e){this.baseSize.height!==e&&(this.baseSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(e){this.baseHeight=e}setBaseSize(e,t){(this.baseSize.width!==e||this.baseSize.height!==t)&&(this.baseSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(e){this.preferredSize.width!==e&&(this.preferredSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(e){this.preferredWidth=e}get preferredHeight(){return this.preferredSize.height}set preferredHeight(e){this.preferredSize.height!==e&&(this.preferredSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(e){this.preferredHeight=e}setPreferredSize(e,t){(this.preferredSize.width!==e||this.preferredSize.height!==t)&&(this.preferredSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(e){this.s=e.scale,this.baseSize.set(e.baseWidth,e.baseHeight),this.preferredSize.set(e.preferredWidth,e.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return -1}constructor(e,t=-1,r=-1,n=1){super(),this.resizable=e,this.baseSize=new eZ.Vector2(1,1),this.preferredSize=new eZ.Vector2(t,r),this.target=this.preferredSize,this.s=n,this.effectiveSize=new eZ.Vector2,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}},ti=new class{getNextId(){return this.nextId++}reset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.nextId=e,this}constructor(e=0){this.nextId=e}}(2),ta=class extends Set{get layer(){return this._layer}set layer(e){let t=this._layer;for(let r of this)r.layers.disable(t),r.layers.enable(e);this._layer=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){let e=this.layer;for(let t of this)t.layers.disable(e);return super.clear()}set(e){for(let t of(this.clear(),e))this.add(t);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let t;return this.has(e)?(this.delete(e),t=!1):(this.add(e),t=!0),t}setVisible(e){for(let t of this)e?t.layers.enable(0):t.layers.disable(0);return this}constructor(e,t=ti.getNextId()){super(),this.exclusive=!1,this._layer=t,(this._layer<1||this._layer>31)&&(console.warn("Layer out of range, resetting to 2"),ti.reset(2),this._layer=ti.getNextId()),void 0!==e&&this.set(e)}},ts={ADD:0,ALPHA:23,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},to=new Map([[ts.ADD,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(x.rgb+y.rgb,y.a),y.a*opacity);}"],[ts.AVERAGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4((x.rgb+y.rgb)*0.5,y.a),y.a*opacity);}"],[ts.COLOR,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.xy,xHSL.z));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.COLOR_BURN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 a=x.rgb,b=y.rgb;vec3 z=mix(step(0.0,b)*(1.0-min(vec3(1.0),(1.0-a)/b)),vec3(1.0),step(1.0,a));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.COLOR_DODGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 a=x.rgb,b=y.rgb;vec3 z=step(0.0,a)*mix(min(vec3(1.0),a/max(1.0-b,1e-9)),vec3(1.0),step(1.0,b));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.DARKEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(min(x.rgb,y.rgb),y.a),y.a*opacity);}"],[ts.DIFFERENCE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(abs(x.rgb-y.rgb),y.a),y.a*opacity);}"],[ts.DIVIDE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(x.rgb/max(y.rgb,1e-12),y.a),y.a*opacity);}"],[ts.DST,null],[ts.EXCLUSION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4((x.rgb+y.rgb-2.0*x.rgb*y.rgb),y.a),y.a*opacity);}"],[ts.HARD_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 a=min(x.rgb,1.0);vec3 b=min(y.rgb,1.0);vec3 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,b));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.HARD_MIX,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(step(1.0,x.rgb+y.rgb),y.a),y.a*opacity);}"],[ts.HUE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.x,xHSL.yz));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.INVERT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(1.0-y.rgb,y.a),y.a*opacity);}"],[ts.INVERT_RGB,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(y.rgb*(1.0-x.rgb),y.a),y.a*opacity);}"],[ts.LIGHTEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(max(x.rgb,y.rgb),y.a),y.a*opacity);}"],[ts.LINEAR_BURN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(clamp(y.rgb+x.rgb-1.0,0.0,1.0),y.a),y.a*opacity);}"],[ts.LINEAR_DODGE,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(min(x.rgb+y.rgb,1.0),y.a),y.a*opacity);}"],[ts.LINEAR_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(clamp(2.0*y.rgb+x.rgb-1.0,0.0,1.0),y.a),y.a*opacity);}"],[ts.LUMINOSITY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.xy,yHSL.z));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.MULTIPLY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(x.rgb*y.rgb,y.a),y.a*opacity);}"],[ts.NEGATION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(1.0-abs(1.0-x.rgb-y.rgb),y.a),y.a*opacity);}"],[ts.NORMAL,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,y.a*opacity);}"],[ts.OVERLAY,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 z=mix(2.0*y.rgb*x.rgb,1.0-2.0*(1.0-y.rgb)*(1.0-x.rgb),step(0.5,x.rgb));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.PIN_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 y2=2.0*y.rgb;vec3 z=mix(mix(y2,x.rgb,step(0.5*x.rgb,y.rgb)),max(y2-1.0,vec3(0.0)),step(x.rgb,y2-1.0));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.REFLECT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 z=mix(min(x.rgb*x.rgb/max(1.0-y.rgb,1e-12),1.0),y.rgb,step(1.0,y.rgb));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.SATURATION,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.x,yHSL.y,xHSL.z));return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.SCREEN,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(x.rgb+y.rgb-min(x.rgb*y.rgb,1.0),y.a),y.a*opacity);}"],[ts.SOFT_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 a=x.rgb;vec3 b=y.rgb;vec3 y2=2.0*b;vec3 w=step(0.5,b);vec3 c=a-(1.0-y2)*a*(1.0-a);vec3 d=mix(a+(y2-1.0)*(sqrt(a)-a),a+(y2-1.0)*a*((16.0*a-12.0)*a+3.0),w*(1.0-step(0.25,a)));vec3 z=mix(c,d,w);return mix(x,vec4(z,y.a),y.a*opacity);}"],[ts.SRC,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}"],[ts.SUBTRACT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,vec4(max(x.rgb+y.rgb-1.0,0.0),y.a),y.a*opacity);}"],[ts.VIVID_LIGHT,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 z=mix(max(1.0-min((1.0-x.rgb)/(2.0*y.rgb),1.0),0.0),min(x.rgb/(2.0*(1.0-y.rgb)),1.0),step(0.5,y.rgb));return mix(x,vec4(z,y.a),y.a*opacity);}"]]),tl=class extends eZ.EventDispatcher{getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this._blendFunction}set blendFunction(e){this._blendFunction=e,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return to.get(this.blendFunction)}constructor(e,t=1){super(),this._blendFunction=e,this.opacity=new eZ.Uniform(t)}};eZ.CanvasTexture;var tu=class extends eZ.EventDispatcher{get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e){arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking}update(e,t,r){}setSize(e,t){}initialize(e,t,r){}dispose(){for(let e of Object.keys(this)){let t=this[e];(t instanceof eZ.WebGLRenderTarget||t instanceof eZ.Material||t instanceof eZ.Texture||t instanceof e$)&&this[e].dispose()}}constructor(e,t,{attributes:r=e6.NONE,blendFunction:n=ts.NORMAL,defines:i=new Map,uniforms:a=new Map,extensions:s=null,vertexShader:o=null}={}){super(),this.name=e,this.renderer=null,this.attributes=r,this.fragmentShader=t,this.vertexShader=o,this.defines=i,this.uniforms=a,this.extensions=s,this.blendMode=new tl(n),this.blendMode.addEventListener("change",e=>this.setChanged()),this._inputColorSpace=eZ.LinearSRGBColorSpace,this._outputColorSpace=eZ.NoColorSpace}},tc={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3},td=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],tf=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get kernelSequence(){return td[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(){return this.uniforms.scale.value}setScale(e){this.uniforms.scale.value=e}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(e){this.uniforms.kernel.value=e}setKernel(e){this.kernel=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t,.5*e,.5*t)}setSize(e,t){let r=1/e,n=1/t;this.uniforms.texelSize.value.set(r,n,.5*r,.5*n)}constructor(e=new eZ.Vector4){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector4),scale:new eZ.Uniform(1),kernel:new eZ.Uniform(0)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;\n#include \n}",vertexShader:"uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.setTexelSize(e.x,e.y),this.kernelSize=tc.MEDIUM}},th=class extends e${getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(e){this._blurMaterial=e}get dithering(){return this.copyMaterial.dithering}set dithering(e){this.copyMaterial.dithering=e}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(e){this.blurMaterial.kernelSize=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get scale(){return this.blurMaterial.scale}set scale(e){this.blurMaterial.scale=e}getScale(){return this.blurMaterial.scale}setScale(e){this.blurMaterial.scale=e}getKernelSize(){return this.kernelSize}setKernelSize(e){this.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,r,n,i){let a=this.scene,s=this.camera,o=this.renderTargetA,l=this.renderTargetB,u=this.blurMaterial,c=u.kernelSequence,d=t;this.fullscreenMaterial=u;for(let t=0,r=c.length;tthis.setSize(s.baseWidth,s.baseHeight)),this._blurMaterial=new tf,this._blurMaterial.kernelSize=e,this.copyMaterial=new e2}},tp=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get threshold(){return this.uniforms.threshold.value}set threshold(e){this.smoothing>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}getThreshold(){return this.threshold}setThreshold(e){this.threshold=e}get smoothing(){return this.uniforms.smoothing.value}set smoothing(e){this.threshold>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(e){this.smoothing=e}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(e){}get colorOutput(){return void 0!==this.defines.COLOR}set colorOutput(e){e?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(e){return this.colorOutput}setColorOutputEnabled(e){this.colorOutput=e}get useRange(){return null!==this.luminanceRange}set useRange(e){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(e){null!==e?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=e,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(e){this.luminanceRange=e}constructor(e=!1,t=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:eZ.REVISION.replace(/\D+/g,"")},uniforms:{inputBuffer:new eZ.Uniform(null),threshold:new eZ.Uniform(0),smoothing:new eZ.Uniform(1),range:new eZ.Uniform(null)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef RANGE\nuniform vec2 range;\n#elif defined(THRESHOLD)\nuniform float threshold;uniform float smoothing;\n#endif\nvarying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);float mask=1.0;\n#ifdef RANGE\nfloat low=step(range.x,l);float high=step(l,range.y);mask=low*high;\n#elif defined(THRESHOLD)\nmask=smoothstep(threshold,threshold+smoothing,l);\n#endif\n#ifdef COLOR\ngl_FragColor=texel*mask;\n#else\ngl_FragColor=vec4(l*mask);\n#endif\n}",vertexShader:e1}),this.colorOutput=e,this.luminanceRange=t}},tm=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#define WEIGHT_INNER 0.125\n#define WEIGHT_OUTER 0.0555555\nvarying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c;\n#include \n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}},tv=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}set supportBuffer(e){this.uniforms.supportBuffer.value=e}get radius(){return this.uniforms.radius.value}set radius(e){this.uniforms.radius.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new eZ.Uniform(null),supportBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2),radius:new eZ.Uniform(.85)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;\n#else\nuniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;\n#endif\nuniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius);\n#include \n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}},tg={RED:0,GREEN:1,BLUE:2,ALPHA:3},tA={DISCARD:0,MULTIPLY_RGB_SET_ALPHA:2,MULTIPLY_RGB:3},ty=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}set cocBuffer(e){this.uniforms.cocBuffer.value=e}setCoCBuffer(e){this.uniforms.cocBuffer.value=e}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(e){return this.scale}setScale(e){this.scale=e}generateKernel(){let e=new Float64Array(128),t=new Float64Array(32),r=0,n=0;for(let i=0,a=Math.sqrt(80);i<80;++i){let s=2.39996323*i,o=Math.sqrt(i)/a,l=o*Math.cos(s),u=o*Math.sin(s);i%5==0?(t[n++]=l,t[n++]=u):(e[r++]=l,e[r++]=u)}this.uniforms.kernel64.value=e,this.uniforms.kernel16.value=t}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(e=!1,t=!1){super({name:"BokehMaterial",defines:{PASS:e?"2":"1"},uniforms:{inputBuffer:new eZ.Uniform(null),cocBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2),kernel64:new eZ.Uniform(null),kernel16:new eZ.Uniform(null),scale:new eZ.Uniform(1)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#if PASS == 1\nuniform vec4 kernel64[32];\n#else\nuniform vec4 kernel16[8];\n#endif\nuniform lowp sampler2D cocBuffer;uniform vec2 texelSize;uniform float scale;varying vec2 vUv;void main(){\n#ifdef FOREGROUND\nvec2 cocNearFar=texture2D(cocBuffer,vUv).rg*scale;float coc=cocNearFar.x;\n#else\nfloat coc=texture2D(cocBuffer,vUv).g*scale;\n#endif\nif(coc==0.0){gl_FragColor=texture2D(inputBuffer,vUv);}else{\n#ifdef FOREGROUND\nvec2 step=texelSize*max(cocNearFar.x,cocNearFar.y);\n#else\nvec2 step=texelSize*coc;\n#endif\n#if PASS == 1\nvec4 acc=vec4(0.0);for(int i=0;i<32;++i){vec4 kernel=kernel64[i];vec2 uv=step*kernel.xy+vUv;acc+=texture2D(inputBuffer,uv);uv=step*kernel.zw+vUv;acc+=texture2D(inputBuffer,uv);}gl_FragColor=acc/64.0;\n#else\nvec4 maxValue=texture2D(inputBuffer,vUv);for(int i=0;i<8;++i){vec4 kernel=kernel16[i];vec2 uv=step*kernel.xy+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);uv=step*kernel.zw+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);}gl_FragColor=maxValue;\n#endif\n}}",vertexShader:e1}),t&&(this.defines.FOREGROUND="1"),this.generateKernel()}},tx=class extends eZ.ShaderMaterial{set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}get focusDistance(){return this.uniforms.focusDistance.value}set focusDistance(e){this.uniforms.focusDistance.value=e}get worldFocusDistance(){return this.focusDistance}set worldFocusDistance(e){this.focusDistance=e}getFocusDistance(e){this.uniforms.focusDistance.value=e}setFocusDistance(e){this.uniforms.focusDistance.value=e}get focalLength(){return this.focusRange}set focalLength(e){this.focusRange=e}get focusRange(){return this.uniforms.focusRange.value}set focusRange(e){this.uniforms.focusRange.value=e}get worldFocusRange(){return this.focusRange}set worldFocusRange(e){this.focusRange=e}getFocalLength(e){return this.focusRange}setFocalLength(e){this.focusRange=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){this.uniforms.projectionMatrix.value=e.projectionMatrix,this.uniforms.projectionMatrixInverse.value=e.projectionMatrixInverse,this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far;let t=void 0!==this.defines.PERSPECTIVE_CAMERA;e instanceof eZ.PerspectiveCamera?t||(this.defines.PERSPECTIVE_CAMERA=!0,this.needsUpdate=!0):t&&(delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}constructor(e=null){super({name:"CircleOfConfusionMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),projectionMatrix:new eZ.Uniform(null),projectionMatrixInverse:new eZ.Uniform(null),cameraNear:new eZ.Uniform(.3),cameraFar:new eZ.Uniform(1e3),focusDistance:new eZ.Uniform(0),focusRange:new eZ.Uniform(0)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform mat4 projectionMatrix;uniform mat4 projectionMatrixInverse;uniform float cameraNear;uniform float cameraFar;uniform float focusDistance;uniform float focusRange;varying vec2 vUv;float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nfloat depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nfloat depth=texture2D(depthBuffer,uv).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#elif defined(USE_REVERSED_DEPTH_BUFFER)\ndepth=1.0-depth;\n#endif\nreturn depth;}\n#ifdef PERSPECTIVE_CAMERA\n#define getViewZ(depth) perspectiveDepthToViewZ(depth, cameraNear, cameraFar)\n#else\n#define getViewZ(depth) orthographicDepthToViewZ(depth, cameraNear, cameraFar)\n#endif\nvec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(projectionMatrixInverse*clipPosition).xyz;}vec3 getViewPosition(const in vec2 screenPosition,const in float depth){return getViewPosition(screenPosition,depth,getViewZ(depth));}\n#define getDistance(viewPosition) length(viewPosition)\nvoid main(){float depth=readDepth(vUv);vec3 viewPosition=getViewPosition(vUv,depth);float distance=getDistance(viewPosition);float signedDistance=distance-focusDistance;float magnitude=smoothstep(0.0,focusRange,abs(signedDistance));gl_FragColor.rg=magnitude*vec2(step(signedDistance,0.0),step(0.0,signedDistance));}",vertexShader:e1}),this.uniforms.focalLength=this.uniforms.focusRange,null!==e&&this.copyCameraSettings(e)}},tB=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}set maskTexture(e){this.uniforms.maskTexture.value=e,delete this.defines.MASK_PRECISION_HIGH,e.type!==eZ.UnsignedByteType&&(this.defines.MASK_PRECISION_HIGH="1"),this.needsUpdate=!0}setMaskTexture(e){this.maskTexture=e}set colorChannel(e){this.defines.COLOR_CHANNEL=e.toFixed(0),this.needsUpdate=!0}setColorChannel(e){this.colorChannel=e}set maskFunction(e){this.defines.MASK_FUNCTION=e.toFixed(0),this.needsUpdate=!0}setMaskFunction(e){this.maskFunction=e}get inverted(){return void 0!==this.defines.INVERTED}set inverted(e){this.inverted&&!e?delete this.defines.INVERTED:e&&(this.defines.INVERTED="1"),this.needsUpdate=!0}isInverted(){return this.inverted}setInverted(e){this.inverted=e}get strength(){return this.uniforms.strength.value}set strength(e){this.uniforms.strength.value=e}getStrength(){return this.strength}setStrength(e){this.strength=e}constructor(e=null){super({name:"MaskMaterial",uniforms:{maskTexture:new eZ.Uniform(e),inputBuffer:new eZ.Uniform(null),strength:new eZ.Uniform(1)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef MASK_PRECISION_HIGH\nuniform mediump sampler2D maskTexture;\n#else\nuniform lowp sampler2D maskTexture;\n#endif\n#if MASK_FUNCTION != 0\nuniform float strength;\n#endif\nvarying vec2 vUv;void main(){\n#if COLOR_CHANNEL == 0\nfloat mask=texture2D(maskTexture,vUv).r;\n#elif COLOR_CHANNEL == 1\nfloat mask=texture2D(maskTexture,vUv).g;\n#elif COLOR_CHANNEL == 2\nfloat mask=texture2D(maskTexture,vUv).b;\n#else\nfloat mask=texture2D(maskTexture,vUv).a;\n#endif\n#if MASK_FUNCTION == 0\n#ifdef INVERTED\nmask=(mask>0.0)?0.0:1.0;\n#else\nmask=(mask>0.0)?1.0:0.0;\n#endif\n#else\nmask=clamp(mask*strength,0.0,1.0);\n#ifdef INVERTED\nmask=1.0-mask;\n#endif\n#endif\n#if MASK_FUNCTION == 3\nvec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=vec4(mask*texel.rgb,texel.a);\n#elif MASK_FUNCTION == 2\ngl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask);\n#else\ngl_FragColor=mask*texture2D(inputBuffer,vUv);\n#endif\n}",vertexShader:e1}),this.colorChannel=tg.RED,this.maskFunction=tA.DISCARD}},tC=class extends e${setInput(e){this.input=e}render(e,t,r,n,i){let a=this.fullscreenMaterial.uniforms;null!==t&&void 0!==a&&void 0!==a[this.input]&&(a[this.input].value=t.texture),e.setRenderTarget(this.renderToScreen?null:r),e.render(this.scene,this.camera)}initialize(e,t,r){void 0!==r&&r!==eZ.UnsignedByteType&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}constructor(e,t="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=e,this.input=t}},tS=new eZ.Vector3,tE=class extends tu{set mainCamera(e){this.camera=e,this.cocMaterial.copyCameraSettings(e)}get cocTexture(){return this.renderTargetCoC.texture}get maskFunction(){return this.maskPass.fullscreenMaterial.maskFunction}set maskFunction(e){this.maskFunction!==e&&(this.defines.set("MASK_FUNCTION",e.toFixed(0)),this.maskPass.fullscreenMaterial.maskFunction=e,this.setChanged())}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.cocMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get("scale").value}set bokehScale(e){this.bokehNearBasePass.fullscreenMaterial.scale=e,this.bokehNearFillPass.fullscreenMaterial.scale=e,this.bokehFarBasePass.fullscreenMaterial.scale=e,this.bokehFarFillPass.fullscreenMaterial.scale=e,this.maskPass.fullscreenMaterial.strength=e,this.uniforms.get("scale").value=e}getBokehScale(){return this.bokehScale}setBokehScale(e){this.bokehScale=e}getTarget(){return this.target}setTarget(e){this.target=e}calculateFocusDistance(e){return this.camera.getWorldPosition(tS).distanceTo(e)}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.cocMaterial.depthBuffer=e,this.cocMaterial.depthPacking=t}update(e,t,r){let n=this.renderTarget,i=this.renderTargetCoC,a=this.renderTargetCoCBlurred,s=this.renderTargetMasked;if(null!==this.target){let e=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=e}this.cocPass.render(e,null,i),this.blurPass.render(e,i,a),this.maskPass.render(e,t,s),this.bokehFarBasePass.render(e,s,n),this.bokehFarFillPass.render(e,n,this.renderTargetFar),this.bokehNearBasePass.render(e,t,n),this.bokehNearFillPass.render(e,n,this.renderTargetNear)}setSize(e,t){let r=this.resolution;r.setBaseSize(e,t);let n=r.width,i=r.height;this.cocPass.setSize(e,t),this.blurPass.setSize(e,t),this.maskPass.setSize(e,t),this.renderTargetFar.setSize(e,t),this.renderTargetCoC.setSize(e,t),this.renderTargetMasked.setSize(e,t),this.renderTarget.setSize(n,i),this.renderTargetNear.setSize(n,i),this.renderTargetCoCBlurred.setSize(n,i),this.bokehNearBasePass.fullscreenMaterial.setSize(e,t),this.bokehNearFillPass.fullscreenMaterial.setSize(e,t),this.bokehFarBasePass.fullscreenMaterial.setSize(e,t),this.bokehFarFillPass.fullscreenMaterial.setSize(e,t)}initialize(e,t,r){this.cocPass.initialize(e,t,r),this.maskPass.initialize(e,t,r),this.bokehNearBasePass.initialize(e,t,r),this.bokehNearFillPass.initialize(e,t,r),this.bokehFarBasePass.initialize(e,t,r),this.bokehFarFillPass.initialize(e,t,r),this.blurPass.initialize(e,t,eZ.UnsignedByteType),e.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH="1"),void 0!==r&&(this.renderTarget.texture.type=r,this.renderTargetNear.texture.type=r,this.renderTargetFar.texture.type=r,this.renderTargetMasked.texture.type=r,null!==e&&e.outputColorSpace===eZ.SRGBColorSpace&&(this.renderTarget.texture.colorSpace=eZ.SRGBColorSpace,this.renderTargetNear.texture.colorSpace=eZ.SRGBColorSpace,this.renderTargetFar.texture.colorSpace=eZ.SRGBColorSpace,this.renderTargetMasked.texture.colorSpace=eZ.SRGBColorSpace))}constructor(e,{blendFunction:t,worldFocusDistance:r,worldFocusRange:n,focalLength:i,focusDistance:a=r||3,focusRange:s=n||i||2,bokehScale:o=1,resolutionScale:l=.5,width:u,height:c,resolutionX:d=u||tn.AUTO_SIZE,resolutionY:f=c||tn.AUTO_SIZE}={}){super("DepthOfFieldEffect","#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D nearColorBuffer;uniform mediump sampler2D farColorBuffer;\n#else\nuniform lowp sampler2D nearColorBuffer;uniform lowp sampler2D farColorBuffer;\n#endif\n#if MASK_FUNCTION != 1 && MASK_FUNCTION != 2\nuniform lowp sampler2D farCoCBuffer;\n#endif\nuniform lowp sampler2D nearCoCBuffer;uniform float scale;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 colorNear=texture2D(nearColorBuffer,uv);vec4 colorFar=texture2D(farColorBuffer,uv);\n#if MASK_FUNCTION == 1 || MASK_FUNCTION == 2\nvec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,colorFar.a);cocNearFar.x=min(cocNearFar.x*scale,1.0);\n#else\nvec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,texture2D(farCoCBuffer,uv).g);cocNearFar=min(cocNearFar*scale,1.0);colorFar.a*=cocNearFar.y;\n#endif\nvec4 result=inputColor*(1.0-cocNearFar.y)+colorFar;result=mix(result,colorNear,cocNearFar.x);outputColor=result;}",{blendFunction:t,attributes:e6.DEPTH,uniforms:new Map([["nearColorBuffer",new eZ.Uniform(null)],["farColorBuffer",new eZ.Uniform(null)],["nearCoCBuffer",new eZ.Uniform(null)],["farCoCBuffer",new eZ.Uniform(null)],["scale",new eZ.Uniform(1)]])}),this.camera=e,this.renderTarget=new eZ.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="DoF.Intermediate",this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name="DoF.Masked.Far",this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name="DoF.Bokeh.Near",this.uniforms.get("nearColorBuffer").value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name="DoF.Bokeh.Far",this.uniforms.get("farColorBuffer").value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name="DoF.CoC",this.uniforms.get("farCoCBuffer").value=this.renderTargetCoC.texture,this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name="DoF.CoC.Blurred",this.uniforms.get("nearCoCBuffer").value=this.renderTargetCoCBlurred.texture,this.cocPass=new tC(new tx(e));let h=this.cocMaterial;h.focusDistance=a,h.focusRange=s,this.blurPass=new th({resolutionScale:l,resolutionX:d,resolutionY:f,kernelSize:tc.MEDIUM}),this.maskPass=new tC(new tB(this.renderTargetCoC.texture)),this.maskPass.fullscreenMaterial.colorChannel=tg.GREEN,this.maskFunction=tA.MULTIPLY_RGB,this.bokehNearBasePass=new tC(new ty(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new tC(new ty(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new tC(new ty(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new tC(new ty(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;let p=this.resolution=new tn(this,d,f,l);p.addEventListener("change",e=>this.setSize(p.baseWidth,p.baseHeight)),this.bokehScale=o}},tT=class extends eZ.DataTexture{constructor(e,t,r=eZ.RedFormat,n=eZ.UnsignedByteType){super(function(e,t,r){let n,i=new Map([[eZ.RedFormat,1],[eZ.RGFormat,2],[eZ.RGBAFormat,4]]);if(i.has(t)||console.error("Invalid noise texture format"),r===eZ.UnsignedByteType){n=new Uint8Array(e*i.get(t));for(let e=0,t=n.length;e\n#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform vec2 lightPosition;uniform float exposure;uniform float decay;uniform float density;uniform float weight;uniform float clampMax;varying vec2 vUv;void main(){vec2 coord=vUv;vec2 delta=lightPosition-coord;delta*=1.0/SAMPLES_FLOAT*density;float illuminationDecay=1.0;vec4 color=vec4(0.0);for(int i=0;i\n}",vertexShader:e1})}},tb=class extends e${set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get renderToScreen(){return super.renderToScreen}set renderToScreen(e){super.renderToScreen=e,this.clearPass.renderToScreen=e}get overrideMaterial(){let e=this.overrideMaterialManager;return null!==e?e.material:null}set overrideMaterial(e){let t=this.overrideMaterialManager;null!==e?null!==t?t.setMaterial(e):this.overrideMaterialManager=new tr(e):null!==t&&(t.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(e){this.overrideMaterial=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getSelection(){return this.selection}setSelection(e){this.selection=e}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(e){this.skipShadowMapUpdate=e}getClearPass(){return this.clearPass}render(e,t,r,n,i){let a=this.scene,s=this.camera,o=this.selection,l=s.layers.mask,u=a.background,c=e.shadowMap.autoUpdate,d=this.renderToScreen?null:t;null!==o&&s.layers.set(o.getLayer()),this.skipShadowMapUpdate&&(e.shadowMap.autoUpdate=!1),(this.ignoreBackground||null!==this.clearPass.overrideClearColor)&&(a.background=null),this.clearPass.enabled&&this.clearPass.render(e,t),e.setRenderTarget(d),null!==this.overrideMaterialManager?this.overrideMaterialManager.render(e,a,s):e.render(a,s),s.layers.mask=l,a.background=u,e.shadowMap.autoUpdate=c}constructor(e,t,r=null){super("RenderPass",e,t),this.needsSwap=!1,this.clearPass=new e4,this.overrideMaterialManager=null===r?null:new tr(r),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}},tM=new eZ.Vector3,tw=new eZ.Matrix4,tF={SCALE_UP:"lut.scaleup"};function tR(e,t,r){let n=document.createElement("canvas"),i=n.getContext("2d");if(n.width=e,n.height=t,r instanceof Image)i.drawImage(r,0,0);else{let n=i.createImageData(e,t);n.data.set(r),i.putImageData(n,0,0)}return n}var tI=class e{toCanvas(){return"undefined"==typeof document?null:tR(this.width,this.height,this.data)}static from(t){let r,{width:n,height:i}=t;if(t instanceof Image){let e=tR(n,i,t);null!==e&&(r=e.getContext("2d").getImageData(0,0,n,i).data)}else r=t.data;return new e(n,i,r)}constructor(e=0,t=0,r=null){this.width=e,this.height=t,this.data=r}},tP=new eZ.Color,tL=class e extends eZ.Data3DTexture{get isLookupTexture3D(){return!0}scaleUp(t){let r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=this.image;return t<=n.width?Promise.reject(Error("The target size must be greater than the current size")):new Promise((i,a)=>{let s=URL.createObjectURL(new Blob(['"use strict";(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case O.SCALE_UP:r=v.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})();\n'],{type:"text/javascript"})),o=new Worker(s);o.addEventListener("error",e=>a(e.error)),o.addEventListener("message",r=>{let n=new e(r.data,t);this.colorSpace=n.colorSpace,n.type=this.type,n.name=this.name,URL.revokeObjectURL(s),i(n)});let l=r?[n.data.buffer]:[];o.postMessage({operation:tF.SCALE_UP,data:n.data,size:t},l)})}applyLUT(e){let t=this.image,r=e.image,n=Math.min(t.width,t.height,t.depth);if(n!==Math.min(r.width,r.height,r.depth))console.error("Size mismatch");else if(e.type!==eZ.FloatType||this.type!==eZ.FloatType)console.error("Both LUTs must be FloatType textures");else if(e.format!==eZ.RGBAFormat||this.format!==eZ.RGBAFormat)console.error("Both LUTs must be RGBA textures");else{let e=t.data,i=r.data,a=n**2,s=n-1;for(let t=0,r=n**3;ta){r=new Uint8Array(e.length);for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:eZ.RGBADepthPacking;this.depthBuffer=e,this.depthPacking=t}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof eZ.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}constructor(e=null,t){super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),cameraNear:new eZ.Uniform(.3),cameraFar:new eZ.Uniform(1e3)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform float cameraNear;uniform float cameraFar;centroid varying float vViewZ;centroid varying vec4 vProjTexCoord;void main(){\n#include \nvec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;\n#if DEPTH_PACKING == 3201\nfloat depth=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord));\n#else\nfloat depth=texture2D(depthBuffer,projTexCoord).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#elif defined(USE_REVERSED_DEPTH_BUFFER)\ndepth=1.0-depth;\n#endif\n#ifdef PERSPECTIVE_CAMERA\nfloat viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nfloat viewZ=orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\nfloat depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}",vertexShader:"#include \n#include \n#include \n#include \nvarying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include \n#include \n#include \n#include \n#include \nvViewZ=mvPosition.z;vProjTexCoord=gl_Position;\n#include \n}"}),this.depthBuffer=e,this.depthPacking=eZ.RGBADepthPacking,this.copyCameraSettings(t)}},tN=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(e=new eZ.Vector2){super({name:"OutlineMaterial",uniforms:{inputBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.uniforms.texelSize.value.set(e.x,e.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}},tk=new eZ.Vector3,tj=new eZ.Vector3,tz=class extends eZ.ShaderMaterial{set depthBuffer0(e){this.uniforms.depthBuffer0.value=e}set depthPacking0(e){this.defines.DEPTH_PACKING_0=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer0=e,this.depthPacking0=t}set depthBuffer1(e){this.uniforms.depthBuffer1.value=e}set depthPacking1(e){this.defines.DEPTH_PACKING_1=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer1(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer1=e,this.depthPacking1=t}get maxDepthStrategy(){return Number(this.defines.DEPTH_TEST_STRATEGY)}set maxDepthStrategy(e){this.defines.DEPTH_TEST_STRATEGY=e.toFixed(0),this.needsUpdate=!0}get keepFar(){return this.maxDepthStrategy}set keepFar(e){this.maxDepthStrategy=e?tG.KEEP_MAX_DEPTH:tG.DISCARD_MAX_DEPTH}getMaxDepthStrategy(){return this.maxDepthStrategy}setMaxDepthStrategy(e){this.maxDepthStrategy=e}get epsilon(){return Number(this.defines.DEPTH_EPSILON)}set epsilon(e){this.defines.DEPTH_EPSILON=e.toFixed(16),this.needsUpdate=!0}getEpsilon(){return this.epsilon}setEpsilon(e){this.epsilon=e}get depthMode(){return Number(this.defines.DEPTH_MODE)}set depthMode(e){let t;switch(e){case eZ.NeverDepth:t="false";break;case eZ.AlwaysDepth:t="true";break;case eZ.EqualDepth:t="abs(d1 - d0) <= DEPTH_EPSILON";break;case eZ.NotEqualDepth:t="abs(d1 - d0) > DEPTH_EPSILON";break;case eZ.LessDepth:t="d0 > d1";break;case eZ.LessEqualDepth:t="d0 >= d1";break;case eZ.GreaterEqualDepth:t="d0 <= d1";break;case eZ.GreaterDepth:default:t="d0 < d1"}this.defines.DEPTH_MODE=e.toFixed(0),this.defines["depthTest(d0, d1)"]=t,this.needsUpdate=!0}getDepthMode(){return this.depthMode}setDepthMode(e){this.depthMode=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),e instanceof eZ.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}constructor(){super({name:"DepthMaskMaterial",defines:{DEPTH_EPSILON:"0.0001",DEPTH_PACKING_0:"0",DEPTH_PACKING_1:"0",DEPTH_TEST_STRATEGY:tG.KEEP_MAX_DEPTH},uniforms:{inputBuffer:new eZ.Uniform(null),depthBuffer0:new eZ.Uniform(null),depthBuffer1:new eZ.Uniform(null),cameraNearFar:new eZ.Uniform(new eZ.Vector2(1,1))},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1;\n#else\nuniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1;\n#endif\nuniform sampler2D inputBuffer;uniform vec2 cameraNearFar;float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);\n#endif\n}varying vec2 vUv;void main(){vec2 depth;\n#if DEPTH_PACKING_0 == 3201\ndepth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv));\n#else\ndepth.x=texture2D(depthBuffer0,vUv).r;\n#endif\n#if DEPTH_PACKING_1 == 3201\ndepth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv));\n#else\ndepth.y=texture2D(depthBuffer1,vUv).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat a=cameraNearFar.y/(cameraNearFar.y-cameraNearFar.x);float b=cameraNearFar.y*cameraNearFar.x/(cameraNearFar.x-cameraNearFar.y);float c=log2(cameraNearFar.y+1.0);float d=pow(2.0,depth.x*c)-1.0;depth.x=a+b/d;d=pow(2.0,depth.y*c)-1.0;depth.y=a+b/d;\n#elif defined(USE_REVERSED_DEPTH_BUFFER)\ndepth.x=1.0-depth.x;depth.y=1.0-depth.y;\n#endif\nbool isMaxDepth=(depth.x==1.0);\n#ifdef PERSPECTIVE_CAMERA\ndepth.x=viewZToOrthographicDepth(getViewZ(depth.x),cameraNearFar.x,cameraNearFar.y);depth.y=viewZToOrthographicDepth(getViewZ(depth.y),cameraNearFar.x,cameraNearFar.y);\n#endif\n#if DEPTH_TEST_STRATEGY == 0\nbool keep=depthTest(depth.x,depth.y);\n#elif DEPTH_TEST_STRATEGY == 1\nbool keep=isMaxDepth||depthTest(depth.x,depth.y);\n#else\nbool keep=!isMaxDepth&&depthTest(depth.x,depth.y);\n#endif\nif(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}",vertexShader:e1}),this.depthMode=eZ.LessDepth}},tK=class extends eZ.ShaderMaterial{set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}get edgeDetectionMode(){return Number(this.defines.EDGE_DETECTION_MODE)}set edgeDetectionMode(e){this.defines.EDGE_DETECTION_MODE=e.toFixed(0),this.needsUpdate=!0}getEdgeDetectionMode(){return this.edgeDetectionMode}setEdgeDetectionMode(e){this.edgeDetectionMode=e}get localContrastAdaptationFactor(){return Number(this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR)}set localContrastAdaptationFactor(e){this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR=e.toFixed("6"),this.needsUpdate=!0}getLocalContrastAdaptationFactor(){return this.localContrastAdaptationFactor}setLocalContrastAdaptationFactor(e){this.localContrastAdaptationFactor=e}get edgeDetectionThreshold(){return Number(this.defines.EDGE_THRESHOLD)}set edgeDetectionThreshold(e){this.defines.EDGE_THRESHOLD=e.toFixed("6"),this.defines.DEPTH_THRESHOLD=(.1*e).toFixed("6"),this.needsUpdate=!0}getEdgeDetectionThreshold(){return this.edgeDetectionThreshold}setEdgeDetectionThreshold(e){this.edgeDetectionThreshold=e}get predicationMode(){return Number(this.defines.PREDICATION_MODE)}set predicationMode(e){this.defines.PREDICATION_MODE=e.toFixed(0),this.needsUpdate=!0}getPredicationMode(){return this.predicationMode}setPredicationMode(e){this.predicationMode=e}set predicationBuffer(e){this.uniforms.predicationBuffer.value=e}setPredicationBuffer(e){this.uniforms.predicationBuffer.value=e}get predicationThreshold(){return Number(this.defines.PREDICATION_THRESHOLD)}set predicationThreshold(e){this.defines.PREDICATION_THRESHOLD=e.toFixed("6"),this.needsUpdate=!0}getPredicationThreshold(){return this.predicationThreshold}setPredicationThreshold(e){this.predicationThreshold=e}get predicationScale(){return Number(this.defines.PREDICATION_SCALE)}set predicationScale(e){this.defines.PREDICATION_SCALE=e.toFixed("6"),this.needsUpdate=!0}getPredicationScale(){return this.predicationScale}setPredicationScale(e){this.predicationScale=e}get predicationStrength(){return Number(this.defines.PREDICATION_STRENGTH)}set predicationStrength(e){this.defines.PREDICATION_STRENGTH=e.toFixed("6"),this.needsUpdate=!0}getPredicationStrength(){return this.predicationStrength}setPredicationStrength(e){this.predicationStrength=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(e=new eZ.Vector2,t=tO.COLOR){super({name:"EdgeDetectionMaterial",defines:{THREE_REVISION:eZ.REVISION.replace(/\D+/g,""),LOCAL_CONTRAST_ADAPTATION_FACTOR:"2.0",EDGE_THRESHOLD:"0.1",DEPTH_THRESHOLD:"0.01",PREDICATION_MODE:"0",PREDICATION_THRESHOLD:"0.01",PREDICATION_SCALE:"2.0",PREDICATION_STRENGTH:"1.0",DEPTH_PACKING:"0"},uniforms:{inputBuffer:new eZ.Uniform(null),depthBuffer:new eZ.Uniform(null),predicationBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(e)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\n#if EDGE_DETECTION_MODE == 1\n#include \n#endif\n#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);}\n#elif PREDICATION_MODE == 2\nuniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);}\n#endif\n#if PREDICATION_MODE != 0\nvec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);}\n#endif\n#if EDGE_DETECTION_MODE != 0\nuniform sampler2D inputBuffer;\n#endif\nvoid main(){\n#if EDGE_DETECTION_MODE == 0\nconst vec2 threshold=vec2(DEPTH_THRESHOLD);\n#elif PREDICATION_MODE != 0\nvec2 threshold=calculatePredicatedThreshold();\n#else\nconst vec2 threshold=vec2(EDGE_THRESHOLD);\n#endif\n#if EDGE_DETECTION_MODE == 0\nvec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 1\nfloat l=luminance(texture2D(inputBuffer,vUv).rgb);float lLeft=luminance(texture2D(inputBuffer,vUv0).rgb);float lTop=luminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=luminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=luminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=luminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=luminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 2\nvec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#endif\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\nvoid main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0);\n#if EDGE_DETECTION_MODE != 0\nvUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0);\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}"}),this.edgeDetectionMode=t}},tJ=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get searchTexture(){return this.uniforms.searchTexture.value}set searchTexture(e){this.uniforms.searchTexture.value=e}get areaTexture(){return this.uniforms.areaTexture.value}set areaTexture(e){this.uniforms.areaTexture.value=e}setLookupTextures(e,t){this.searchTexture=e,this.areaTexture=t}get orthogonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_INT)}set orthogonalSearchSteps(e){let t=Math.min(Math.max(e,0),112);this.defines.MAX_SEARCH_STEPS_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setOrthogonalSearchSteps(e){this.orthogonalSearchSteps=e}get diagonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_DIAG_INT)}set diagonalSearchSteps(e){let t=Math.min(Math.max(e,0),20);this.defines.MAX_SEARCH_STEPS_DIAG_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_DIAG_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setDiagonalSearchSteps(e){this.diagonalSearchSteps=e}get diagonalDetection(){return void 0===this.defines.DISABLE_DIAG_DETECTION}set diagonalDetection(e){e?delete this.defines.DISABLE_DIAG_DETECTION:this.defines.DISABLE_DIAG_DETECTION="1",this.needsUpdate=!0}isDiagonalDetectionEnabled(){return this.diagonalDetection}setDiagonalDetectionEnabled(e){this.diagonalDetection=e}get cornerRounding(){return Number(this.defines.CORNER_ROUNDING)}set cornerRounding(e){let t=Math.min(Math.max(e,0),100);this.defines.CORNER_ROUNDING=t.toFixed("4"),this.defines.CORNER_ROUNDING_NORM=(t/100).toFixed("4"),this.needsUpdate=!0}setCornerRounding(e){this.cornerRounding=e}get cornerDetection(){return void 0===this.defines.DISABLE_CORNER_DETECTION}set cornerDetection(e){e?delete this.defines.DISABLE_CORNER_DETECTION:this.defines.DISABLE_CORNER_DETECTION="1",this.needsUpdate=!0}isCornerRoundingEnabled(){return this.cornerDetection}setCornerRoundingEnabled(e){this.cornerDetection=e}setSize(e,t){let r=this.uniforms;r.texelSize.value.set(1/e,1/t),r.resolution.value.set(e,t)}constructor(e=new eZ.Vector2,t=new eZ.Vector2){super({name:"SMAAWeightsMaterial",defines:{MAX_SEARCH_STEPS_INT:"16",MAX_SEARCH_STEPS_FLOAT:"16.0",MAX_SEARCH_STEPS_DIAG_INT:"8",MAX_SEARCH_STEPS_DIAG_FLOAT:"8.0",CORNER_ROUNDING:"25",CORNER_ROUNDING_NORM:"0.25",AREATEX_MAX_DISTANCE:"16.0",AREATEX_MAX_DISTANCE_DIAG:"20.0",AREATEX_PIXEL_SIZE:"(1.0 / vec2(160.0, 560.0))",AREATEX_SUBTEX_SIZE:"(1.0 / 7.0)",SEARCHTEX_SIZE:"vec2(66.0, 33.0)",SEARCHTEX_PACKED_SIZE:"vec2(64.0, 16.0)"},uniforms:{inputBuffer:new eZ.Uniform(null),searchTexture:new eZ.Uniform(null),areaTexture:new eZ.Uniform(null),resolution:new eZ.Uniform(t),texelSize:new eZ.Uniform(e)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize)\n#if __VERSION__ < 300\n#define round(v) floor(v + 0.5)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;iend&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;iend&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0);\n#endif\n}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0);\n#endif\n}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){\n#if !defined(DISABLE_DIAG_DETECTION)\nweights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){\n#endif\nvec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d);\n#if !defined(DISABLE_DIAG_DETECTION)\n}else{e.r=0.0;}\n#endif\n}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}",vertexShader:"uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}"})}};function tV(e,t,r){return Math.min(Math.max((e+t)/(t-r),0),1)}var tQ=class extends eZ.ShaderMaterial{get near(){return this.uniforms.cameraNearFar.value.x}get far(){return this.uniforms.cameraNearFar.value.y}set normalDepthBuffer(e){this.uniforms.normalDepthBuffer.value=e,null!==e?this.defines.NORMAL_DEPTH="1":delete this.defines.NORMAL_DEPTH,this.needsUpdate=!0}setNormalDepthBuffer(e){this.normalDepthBuffer=e}set normalBuffer(e){this.uniforms.normalBuffer.value=e}setNormalBuffer(e){this.uniforms.normalBuffer.value=e}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}set noiseTexture(e){this.uniforms.noiseTexture.value=e}setNoiseTexture(e){this.uniforms.noiseTexture.value=e}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(e){this.defines.SAMPLES_INT=e.toFixed(0),this.defines.INV_SAMPLES_FLOAT=(1/e).toFixed(9),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(e){this.samples=e}get rings(){return Number(this.defines.SPIRAL_TURNS)}set rings(e){this.defines.SPIRAL_TURNS=e.toFixed(1),this.needsUpdate=!0}getRings(){return this.rings}setRings(e){this.rings=e}get intensity(){return this.uniforms.intensity.value}set intensity(e){this.uniforms.intensity.value=e,void 0===this.defines.LEGACY_INTENSITY&&(this.defines.LEGACY_INTENSITY="1",this.needsUpdate=!0)}getIntensity(){return this.uniforms.intensity.value}setIntensity(e){this.uniforms.intensity.value=e}get fade(){return this.uniforms.fade.value}set fade(e){this.uniforms.fade.value=e}getFade(){return this.uniforms.fade.value}setFade(e){this.uniforms.fade.value=e}get bias(){return this.uniforms.bias.value}set bias(e){this.uniforms.bias.value=e}getBias(){return this.uniforms.bias.value}setBias(e){this.uniforms.bias.value=e}get minRadiusScale(){return this.uniforms.minRadiusScale.value}set minRadiusScale(e){this.uniforms.minRadiusScale.value=e}getMinRadiusScale(){return this.uniforms.minRadiusScale.value}setMinRadiusScale(e){this.uniforms.minRadiusScale.value=e}updateRadius(){let e=this.r*this.resolution.height;this.defines.RADIUS=e.toFixed(11),this.defines.RADIUS_SQ=(e*e).toFixed(11),this.needsUpdate=!0}get radius(){return this.r}set radius(e){this.r=Math.min(Math.max(e,1e-6),1),this.updateRadius()}getRadius(){return this.radius}setRadius(e){this.radius=e}get distanceScaling(){return!0}set distanceScaling(e){}isDistanceScalingEnabled(){return this.distanceScaling}setDistanceScalingEnabled(e){this.distanceScaling=e}get distanceThreshold(){return this.uniforms.distanceCutoff.value.x}set distanceThreshold(e){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.distanceFalloff,0),1))}get worldDistanceThreshold(){var e,t;return-(e=this.distanceThreshold,e*((t=this.near)-this.far)-t)}set worldDistanceThreshold(e){this.distanceThreshold=tV(-e,this.near,this.far)}get distanceFalloff(){return this.uniforms.distanceCutoff.value.y-this.distanceThreshold}set distanceFalloff(e){this.uniforms.distanceCutoff.value.y=Math.min(Math.max(this.distanceThreshold+e,0),1)}get worldDistanceFalloff(){var e,t;return-(e=this.distanceFalloff,e*((t=this.near)-this.far)-t)}set worldDistanceFalloff(e){this.distanceFalloff=tV(-e,this.near,this.far)}setDistanceCutoff(e,t){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}get proximityThreshold(){return this.uniforms.proximityCutoff.value.x}set proximityThreshold(e){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.proximityFalloff,0),1))}get worldProximityThreshold(){var e,t;return-(e=this.proximityThreshold,e*((t=this.near)-this.far)-t)}set worldProximityThreshold(e){this.proximityThreshold=tV(-e,this.near,this.far)}get proximityFalloff(){return this.uniforms.proximityCutoff.value.y-this.proximityThreshold}set proximityFalloff(e){this.uniforms.proximityCutoff.value.y=Math.min(Math.max(this.proximityThreshold+e,0),1)}get worldProximityFalloff(){var e,t;return-(e=this.proximityFalloff,e*((t=this.near)-this.far)-t)}set worldProximityFalloff(e){this.proximityFalloff=tV(-e,this.near,this.far)}setProximityCutoff(e,t){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),this.uniforms.projectionMatrix.value.copy(e.projectionMatrix),this.uniforms.inverseProjectionMatrix.value.copy(e.projectionMatrix).invert(),e instanceof eZ.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){let r=this.uniforms,n=r.noiseTexture.value;null!==n&&r.noiseScale.value.set(e/n.image.width,t/n.image.height),r.texelSize.value.set(1/e,1/t),this.resolution.set(e,t),this.updateRadius()}constructor(e){super({name:"SSAOMaterial",defines:{SAMPLES_INT:"0",INV_SAMPLES_FLOAT:"0.0",SPIRAL_TURNS:"0.0",RADIUS:"1.0",RADIUS_SQ:"1.0",DISTANCE_SCALING:"1",DEPTH_PACKING:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),normalBuffer:new eZ.Uniform(null),normalDepthBuffer:new eZ.Uniform(null),noiseTexture:new eZ.Uniform(null),inverseProjectionMatrix:new eZ.Uniform(new eZ.Matrix4),projectionMatrix:new eZ.Uniform(new eZ.Matrix4),texelSize:new eZ.Uniform(new eZ.Vector2),cameraNearFar:new eZ.Uniform(new eZ.Vector2),distanceCutoff:new eZ.Uniform(new eZ.Vector2),proximityCutoff:new eZ.Uniform(new eZ.Vector2),noiseScale:new eZ.Uniform(new eZ.Vector2),minRadiusScale:new eZ.Uniform(.33),intensity:new eZ.Uniform(1),fade:new eZ.Uniform(.01),bias:new eZ.Uniform(0)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \nuniform vec2 cameraNearFar;\n#define cameraNear cameraNearFar.x\n#define cameraFar cameraNearFar.y\n#ifdef NORMAL_DEPTH\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D normalDepthBuffer;\n#else\nuniform mediump sampler2D normalDepthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){float depth=texture2D(normalDepthBuffer,uv).a;\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#endif\nreturn depth;}\n#else\nuniform lowp sampler2D normalBuffer;\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nfloat depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nfloat depth=texture2D(depthBuffer,uv).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#endif\nreturn depth;}\n#endif\nuniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform float intensity;uniform float minRadiusScale;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){float radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;float noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i1.0||coords.t<0.0||coords.t>1.0){continue;}float sampleDepth=readDepth(coords);float viewZ=getViewZ(sampleDepth);\n#ifdef PERSPECTIVE_CAMERA\nfloat linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar);\n#else\nfloat linearSampleDepth=sampleDepth;\n#endif\nfloat proximity=abs(depth-linearSampleDepth);if(proximity1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}set normalBuffer(e){this.uniforms.normalBuffer.value=e,null!==e?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(e){this.normalBuffer=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),normalBuffer:new eZ.Uniform(null),texelSize:new eZ.Uniform(new eZ.Vector2)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\n#ifdef DOWNSAMPLE_NORMALS\nuniform lowp sampler2D normalBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[4];distances[0]=abs(c-samples[0]);distances[1]=abs(c-samples[1]);distances[2]=abs(c-samples[2]);distances[3]=abs(c-samples[3]);float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t}render(e,t,r,n,i){e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){let r=this.resolution;r.setBaseSize(e,t),this.renderTarget.setSize(r.width,r.height),this.fullscreenMaterial.setSize(e,t)}initialize(e,t,r){let n=e.getContext();if(!(n.getExtension("EXT_color_buffer_float")||n.getExtension("EXT_color_buffer_half_float")))throw Error("Rendering to float texture is not supported.")}constructor({normalBuffer:e=null,resolutionScale:t=.5,width:r=tn.AUTO_SIZE,height:n=tn.AUTO_SIZE,resolutionX:i=r,resolutionY:a=n}={}){super("DepthDownsamplingPass");let s=new tW;s.normalBuffer=e,this.fullscreenMaterial=s,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new eZ.WebGLRenderTarget(1,1,{minFilter:eZ.NearestFilter,magFilter:eZ.NearestFilter,depthBuffer:!1,type:eZ.FloatType}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;let o=this.resolution=new tn(this,i,a,t);o.addEventListener("change",e=>this.setSize(o.baseWidth,o.baseHeight))}},t_=class extends eZ.ShaderMaterial{set luminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}setLuminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}set luminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}setLuminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}set mipLevel1x1(e){this.defines.MIP_LEVEL_1X1=e.toFixed(1),this.needsUpdate=!0}setMipLevel1x1(e){this.mipLevel1x1=e}set deltaTime(e){this.uniforms.deltaTime.value=e}setDeltaTime(e){this.uniforms.deltaTime.value=e}get minLuminance(){return this.uniforms.minLuminance.value}set minLuminance(e){this.uniforms.minLuminance.value=e}getMinLuminance(){return this.uniforms.minLuminance.value}setMinLuminance(e){this.uniforms.minLuminance.value=e}get adaptationRate(){return this.uniforms.tau.value}set adaptationRate(e){this.uniforms.tau.value=e}getAdaptationRate(){return this.uniforms.tau.value}setAdaptationRate(e){this.uniforms.tau.value=e}constructor(){super({name:"AdaptiveLuminanceMaterial",defines:{MIP_LEVEL_1X1:"0.0"},uniforms:{luminanceBuffer0:new eZ.Uniform(null),luminanceBuffer1:new eZ.Uniform(null),minLuminance:new eZ.Uniform(.01),deltaTime:new eZ.Uniform(0),tau:new eZ.Uniform(1)},extensions:{shaderTextureLOD:!0},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\nuniform lowp sampler2D luminanceBuffer0;uniform lowp sampler2D luminanceBuffer1;uniform float minLuminance;uniform float deltaTime;uniform float tau;varying vec2 vUv;void main(){float l0=unpackRGBAToFloat(texture2D(luminanceBuffer0,vUv));\n#if __VERSION__ < 300\nfloat l1=texture2DLodEXT(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#else\nfloat l1=textureLod(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#endif\nl0=max(minLuminance,l0);l1=max(minLuminance,l1);float adaptedLum=l0+(l1-l0)*(1.0-exp(-deltaTime*tau));gl_FragColor=(adaptedLum==1.0)?vec4(1.0):packFloatToRGBA(adaptedLum);}",vertexShader:e1})}};eZ.Loader,eZ.Loader,eZ.Loader,eZ.ShaderMaterial;var tZ=class extends eZ.ShaderMaterial{get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set inputDepthPacking(e){this.defines.INPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get outputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}set outputDepthPacking(e){this.defines.OUTPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.inputDepthPacking=t}getInputDepthPacking(){return Number(this.defines.INPUT_DEPTH_PACKING)}setInputDepthPacking(e){this.defines.INPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}getOutputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}setOutputDepthPacking(e){this.defines.OUTPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get texelPosition(){return this.uniforms.texelPosition.value}getTexelPosition(){return this.uniforms.texelPosition.value}setTexelPosition(e){this.uniforms.texelPosition.value=e}get mode(){return this.depthCopyMode}set mode(e){this.depthCopyMode=e,this.defines.DEPTH_COPY_MODE=e.toFixed(0),this.needsUpdate=!0}getMode(){return this.mode}setMode(e){this.mode=e}constructor(){super({name:"DepthCopyMaterial",defines:{INPUT_DEPTH_PACKING:"0",OUTPUT_DEPTH_PACKING:"0",DEPTH_COPY_MODE:"0"},uniforms:{depthBuffer:new eZ.Uniform(null),texelPosition:new eZ.Uniform(new eZ.Vector2)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \nvarying vec2 vUv;\n#ifdef NORMAL_DEPTH\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D normalDepthBuffer;\n#else\nuniform mediump sampler2D normalDepthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;}\n#else\n#if INPUT_DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if INPUT_DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}\n#endif\nvoid main(){\n#if INPUT_DEPTH_PACKING == OUTPUT_DEPTH_PACKING\ngl_FragColor=texture2D(depthBuffer,vUv);\n#else\nfloat depth=readDepth(vUv);\n#if OUTPUT_DEPTH_PACKING == 3201\ngl_FragColor=(depth==1.0)?vec4(1.0):packDepthToRGBA(depth);\n#else\ngl_FragColor=vec4(vec3(depth),1.0);\n#endif\n#endif\n}",vertexShader:"varying vec2 vUv;\n#if DEPTH_COPY_MODE == 1\nuniform vec2 texelPosition;\n#endif\nvoid main(){\n#if DEPTH_COPY_MODE == 1\nvUv=texelPosition;\n#else\nvUv=position.xy*0.5+0.5;\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}"}),this.depthCopyMode=tU.FULL}},tY=class extends eZ.ShaderMaterial{set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;this.depthBuffer=e,this.depthPacking=t}setShaderData(e){this.setShaderParts(e.shaderParts),this.setDefines(e.defines),this.setUniforms(e.uniforms),this.setExtensions(e.extensions)}setShaderParts(e){return this.fragmentShader="#include \n#include \n#include \n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nfloat depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nfloat depth=texture2D(depthBuffer,uv).r;\n#endif\n#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)\nfloat d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;\n#elif defined(USE_REVERSED_DEPTH_BUFFER)\ndepth=1.0-depth;\n#endif\nreturn depth;}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0;\n#ifdef ENCODE_OUTPUT\n#include \n#endif\n#include \n}".replace(e7.FRAGMENT_HEAD,e.get(e7.FRAGMENT_HEAD)||"").replace(e7.FRAGMENT_MAIN_UV,e.get(e7.FRAGMENT_MAIN_UV)||"").replace(e7.FRAGMENT_MAIN_IMAGE,e.get(e7.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}".replace(e7.VERTEX_HEAD,e.get(e7.VERTEX_HEAD)||"").replace(e7.VERTEX_MAIN_SUPPORT,e.get(e7.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(e){for(let t of e.entries())this.defines[t[0]]=t[1];return this.needsUpdate=!0,this}setUniforms(e){for(let t of e.entries())this.uniforms[t[0]]=t[1];return this}setExtensions(e){for(let t of(this.extensions={},e))this.extensions[t]=!0;return this}get encodeOutput(){return void 0!==this.defines.ENCODE_OUTPUT}set encodeOutput(e){this.encodeOutput!==e&&(e?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(e){return this.encodeOutput}setOutputEncodingEnabled(e){this.encodeOutput=e}get time(){return this.uniforms.time.value}set time(e){this.uniforms.time.value=e}setDeltaTime(e){this.uniforms.time.value+=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof eZ.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){let r=this.uniforms;r.resolution.value.set(e,t),r.texelSize.value.set(1/e,1/t),r.aspect.value=e/t}static get Section(){return e7}constructor(e,t,r,n,i=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:eZ.REVISION.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new eZ.Uniform(null),depthBuffer:new eZ.Uniform(null),resolution:new eZ.Uniform(new eZ.Vector2),texelSize:new eZ.Uniform(new eZ.Vector2),cameraNear:new eZ.Uniform(.3),cameraFar:new eZ.Uniform(1e3),aspect:new eZ.Uniform(1),time:new eZ.Uniform(0)},blending:eZ.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:i}),e&&this.setShaderParts(e),t&&this.setDefines(t),r&&this.setUniforms(r),this.copyCameraSettings(n)}};eZ.ShaderMaterial;var tq=Number(eZ.REVISION.replace(/\D+/g,"")),t$=255/256,t0=new Float32Array([255/256/0x1000000,255/256/65536,255/256/256,255/256]),t1=new Float32Array([t$,t$/256,t$/65536,1/0x1000000]);function t2(e,t,r){for(let n of t){let t="$1"+e+n.charAt(0).toUpperCase()+n.slice(1),i=RegExp("([^\\.])(\\b"+n+"\\b)","g");for(let e of r.entries())null!==e[1]&&r.set(e[0],e[1].replace(i,t))}}var t9=class extends e${set mainScene(e){for(let t of this.effects)t.mainScene=e}set mainCamera(e){for(let t of(this.fullscreenMaterial.copyCameraSettings(e),this.effects))t.mainCamera=e}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(e){this.fullscreenMaterial.encodeOutput=e}get dithering(){return this.fullscreenMaterial.dithering}set dithering(e){let t=this.fullscreenMaterial;t.dithering=e,t.needsUpdate=!0}setEffects(e){for(let e of this.effects)e.removeEventListener("change",this.listener);for(let t of(this.effects=e.sort((e,t)=>t.attributes-e.attributes),this.effects))t.addEventListener("change",this.listener)}updateMaterial(){let e=new te,t=0;for(let r of this.effects)if(r.blendMode.blendFunction===ts.DST)e.attributes|=r.getAttributes()&e6.DEPTH;else if((e.attributes&r.getAttributes()&e6.CONVOLUTION)!=0)throw Error("Convolution effects cannot be merged (".concat(r.name,")"));else!function(e,t,r){let n=t.getFragmentShader(),i=t.getVertexShader(),a=void 0!==n&&/mainImage/.test(n),s=void 0!==n&&/mainUv/.test(n);if(r.attributes|=t.getAttributes(),void 0===n)throw Error("Missing fragment shader (".concat(t.name,")"));if(s&&(r.attributes&e6.CONVOLUTION)!=0)throw Error("Effects that transform UVs are incompatible with convolution effects (".concat(t.name,")"));if(a||s){let o=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=r.shaderParts,u=l.get(e7.FRAGMENT_HEAD)||"",c=l.get(e7.FRAGMENT_MAIN_UV)||"",d=l.get(e7.FRAGMENT_MAIN_IMAGE)||"",f=l.get(e7.VERTEX_HEAD)||"",h=l.get(e7.VERTEX_MAIN_SUPPORT)||"",p=new Set,m=new Set;if(s&&(c+=" ".concat(e,"MainUv(UV);\n"),r.uvTransformation=!0),null!==i&&/mainSupport/.test(i)){let t=/mainSupport *\([\w\s]*?uv\s*?\)/.test(i);for(let n of(h+=" ".concat(e,"MainSupport("),h+=t?"vUv);\n":");\n",i.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g)))for(let e of n[1].split(/\s*,\s*/))r.varyings.add(e),p.add(e),m.add(e);for(let e of i.matchAll(o))m.add(e[1])}for(let e of n.matchAll(o))m.add(e[1]);for(let e of t.defines.keys())m.add(e.replace(/\([\w\s,]*\)/g,""));for(let e of t.uniforms.keys())m.add(e);m.delete("while"),m.delete("for"),m.delete("if"),t.uniforms.forEach((t,n)=>r.uniforms.set(e+n.charAt(0).toUpperCase()+n.slice(1),t)),t.defines.forEach((t,n)=>r.defines.set(e+n.charAt(0).toUpperCase()+n.slice(1),t));let g=new Map([["fragment",n],["vertex",i]]);t2(e,m,r.defines),t2(e,m,g),n=g.get("fragment"),i=g.get("vertex");let A=t.blendMode;if(r.blendModes.set(A.blendFunction,A),a){null!==t.inputColorSpace&&t.inputColorSpace!==r.colorSpace&&(d+=t.inputColorSpace===eZ.SRGBColorSpace?"color0 = sRGBTransferOETF(color0);\n ":"color0 = sRGBToLinear(color0);\n "),t.outputColorSpace!==eZ.NoColorSpace?r.colorSpace=t.outputColorSpace:null!==t.inputColorSpace&&(r.colorSpace=t.inputColorSpace),d+="".concat(e,"MainImage(color0, UV, "),(r.attributes&e6.DEPTH)!=0&&/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/.test(n)&&(d+="depth, ",r.readDepth=!0),d+="color1);\n ";let i=e+"BlendOpacity";r.uniforms.set(i,A.opacity),d+="color0 = blend".concat(A.blendFunction,"(color0, color1, ").concat(i,");\n\n "),u+="uniform float ".concat(i,";\n\n")}if(u+=n+"\n",null!==i&&(f+=i+"\n"),l.set(e7.FRAGMENT_HEAD,u),l.set(e7.FRAGMENT_MAIN_UV,c),l.set(e7.FRAGMENT_MAIN_IMAGE,d),l.set(e7.VERTEX_HEAD,f),l.set(e7.VERTEX_MAIN_SUPPORT,h),null!==t.extensions)for(let e of t.extensions)r.extensions.add(e)}else throw Error("Could not find mainImage or mainUv function (".concat(t.name,")"))}("e"+t++,r,e);let r=e.shaderParts.get(e7.FRAGMENT_HEAD),n=e.shaderParts.get(e7.FRAGMENT_MAIN_IMAGE),i=e.shaderParts.get(e7.FRAGMENT_MAIN_UV),a=/\bblend\b/g;for(let t of e.blendModes.values())r+=t.getShaderCode().replace(a,"blend".concat(t.blendFunction))+"\n";for(let[t,a]of((e.attributes&e6.DEPTH)!=0?(e.readDepth&&(n="float depth = readDepth(UV);\n\n "+n),this.needsDepthTexture=null===this.getDepthTexture()):this.needsDepthTexture=!1,e.colorSpace===eZ.SRGBColorSpace&&(n+="color0 = sRGBToLinear(color0);\n "),e.uvTransformation?(i="vec2 transformedUv = vUv;\n"+i,e.defines.set("UV","transformedUv")):e.defines.set("UV","vUv"),e.shaderParts.set(e7.FRAGMENT_HEAD,r),e.shaderParts.set(e7.FRAGMENT_MAIN_IMAGE,n),e.shaderParts.set(e7.FRAGMENT_MAIN_UV,i),e.shaderParts))null!==a&&e.shaderParts.set(t,a.trim().replace(/^#/,"\n#"));this.skipRendering=0===t,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(e)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eZ.BasicDepthPacking;for(let r of(this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t,this.effects))r.setDepthTexture(e,t)}render(e,t,r,n,i){for(let r of this.effects)r.update(e,t,n);if(!this.skipRendering||this.renderToScreen){let i=this.fullscreenMaterial;i.inputBuffer=t.texture,i.time+=n*this.timeScale,e.setRenderTarget(this.renderToScreen?null:r),e.render(this.scene,this.camera)}}setSize(e,t){for(let r of(this.fullscreenMaterial.setSize(e,t),this.effects))r.setSize(e,t)}initialize(e,t,r){for(let n of(this.renderer=e,this.effects))n.initialize(e,t,r);this.updateMaterial(),void 0!==r&&r!==eZ.UnsignedByteType&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){for(let e of(super.dispose(),this.effects))e.removeEventListener("change",this.listener),e.dispose()}handleEvent(e){"change"===e.type&&this.recompile()}constructor(e,...t){super("EffectPass"),this.fullscreenMaterial=new tY(null,null,null,e),this.listener=e=>this.handleEvent(e),this.effects=[],this.setEffects(t),this.skipRendering=!1,this.minTime=1,this.maxTime=1/0,this.timeScale=1}},t3=class extends e${set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,r,n,i){let a=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,a,a)}setSize(e,t){let r=this.resolution;r.setBaseSize(e,t),this.renderTarget.setSize(r.width,r.height)}constructor(e,t,{renderTarget:r,resolutionScale:n=1,width:i=tn.AUTO_SIZE,height:a=tn.AUTO_SIZE,resolutionX:s=i,resolutionY:o=a}={}){super("NormalPass"),this.needsSwap=!1,this.renderPass=new tb(e,t,new eZ.MeshNormalMaterial);let l=this.renderPass;l.ignoreBackground=!0,l.skipShadowMapUpdate=!0;let u=l.getClearPass();u.overrideClearColor=new eZ.Color(7829503),u.overrideClearAlpha=1,this.renderTarget=r,void 0===this.renderTarget&&(this.renderTarget=new eZ.WebGLRenderTarget(1,1,{minFilter:eZ.NearestFilter,magFilter:eZ.NearestFilter}),this.renderTarget.texture.name="NormalPass.Target");let c=this.resolution=new tn(this,s,o,n);c.addEventListener("change",e=>this.setSize(c.baseWidth,c.baseHeight))}};function t4(e,t,r,n){var i;return(i=e+(t-e)*.75)+(r+(n-r)*.75-i)*.875}function t8(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),t4(0,0,0,0),new Float32Array([0,0,0,0]),t4(0,0,0,1),new Float32Array([0,0,0,1]),t4(0,0,1,0),new Float32Array([0,0,1,0]),t4(0,0,1,1),new Float32Array([0,0,1,1]),t4(0,1,0,0),new Float32Array([0,1,0,0]),t4(0,1,0,1),new Float32Array([0,1,0,1]),t4(0,1,1,0),new Float32Array([0,1,1,0]),t4(0,1,1,1),new Float32Array([0,1,1,1]),t4(1,0,0,0),new Float32Array([1,0,0,0]),t4(1,0,0,1),new Float32Array([1,0,0,1]),t4(1,0,1,0),new Float32Array([1,0,1,0]),t4(1,0,1,1),new Float32Array([1,0,1,1]),t4(1,1,0,0),new Float32Array([1,1,0,0]),t4(1,1,0,1),new Float32Array([1,1,0,1]),t4(1,1,1,0),new Float32Array([1,1,1,0]),t4(1,1,1,1),new Float32Array([1,1,1,1]);function t5(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&e<1&&(e*=65536),(e=Math.floor(e))<256&&(e|=e<<8);for(var t,r=0;r<256;r++)t=1&r?rn[r]^255&e:rn[r]^e>>8&255,ri[r]=ri[r+256]=t,ra[r]=ra[r+256]=rr[t%12]}(0);function rs(e){var t=function(e){if("number"==typeof e)e=Math.abs(e);else if("string"==typeof e){var t=e;e=0;for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:.25,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.01,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1/0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:ro,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:.001,l="velocity_"+t;if(void 0===e.__damp&&(e.__damp={}),void 0===e.__damp[l]&&(e.__damp[l]=0),Math.abs(e[t]-r)<=o)return e[t]=r,!1;var u=2/(n=Math.max(1e-4,n)),c=s(u*i),d=e[t]-r,f=r,h=a*n;d=Math.min(Math.max(d,-h),h),r=e[t]-d;var p=(e.__damp[l]+u*d)*i;e.__damp[l]=(e.__damp[l]-u*p)*c;var m=r+(d+p)*c;return f-e[t]>0==m>f&&(m=f,e.__damp[l]=(m-f)/i),e[t]=m,!0}function ru(e,t,r,n,i,a,s,o){var l,u,c,d;return rl(e,t,e[t]+(c=(l=r-e[t])-Math.floor(l/(u=2*Math.PI))*u,(d=Math.max(0,Math.min(u,c)))>Math.PI&&(d-=2*Math.PI),d),n,i,a,s,o)}var rc=new ek.Vector2,rd=new ek.Vector3;function rf(e,t,r,n,i,a,s){return"number"==typeof t?rd.setScalar(t):Array.isArray(t)?rd.set(t[0],t[1],t[2]):rd.copy(t),o=rl(e,"x",rd.x,r,n,i,a,s),l=rl(e,"y",rd.y,r,n,i,a,s),u=rl(e,"z",rd.z,r,n,i,a,s),o||l||u}var rh=new ek.Vector4,rp=new ek.Euler,rm=new ek.Color,rv=new ek.Quaternion,rg=new ek.Vector4,rA=new ek.Vector4,ry=new ek.Vector4;function rx(e,t,r,n,i,a,s){Array.isArray(t)?rv.set(t[0],t[1],t[2],t[3]):rv.copy(t);var o=e.dot(rv)>0?1:-1;return rv.x*=o,rv.y*=o,rv.z*=o,rv.w*=o,B=rl(e,"x",rv.x,r,n,i,a,s),C=rl(e,"y",rv.y,r,n,i,a,s),S=rl(e,"z",rv.z,r,n,i,a,s),E=rl(e,"w",rv.w,r,n,i,a,s),rg.set(e.x,e.y,e.z,e.w).normalize(),rA.set(e.__damp.velocity_x,e.__damp.velocity_y,e.__damp.velocity_z,e.__damp.velocity_w),ry.copy(rg).multiplyScalar(rA.dot(rg)/rg.dot(rg)),e.__damp.velocity_x-=ry.x,e.__damp.velocity_y-=ry.y,e.__damp.velocity_z-=ry.z,e.__damp.velocity_w-=ry.w,e.set(rg.x,rg.y,rg.z,rg.w),B||C||S||E}var rB=new ek.Spherical,rC=new ek.Matrix4,rS=new ek.Vector3,rE=new ek.Quaternion,rT=new ek.Vector3,rD=Object.freeze({__proto__:null,rsqw:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/(2*Math.PI);return r/Math.atan(1/t)*Math.atan(Math.sin(2*Math.PI*e*n)/t)},exp:ro,damp:rl,dampAngle:ru,damp2:function(e,t,r,n,i,o,l){return"number"==typeof t?rc.setScalar(t):Array.isArray(t)?rc.set(t[0],t[1]):rc.copy(t),a=rl(e,"x",rc.x,r,n,i,o,l),s=rl(e,"y",rc.y,r,n,i,o,l),a||s},damp3:rf,damp4:function(e,t,r,n,i,a,s){return"number"==typeof t?rh.setScalar(t):Array.isArray(t)?rh.set(t[0],t[1],t[2],t[3]):rh.copy(t),c=rl(e,"x",rh.x,r,n,i,a,s),d=rl(e,"y",rh.y,r,n,i,a,s),f=rl(e,"z",rh.z,r,n,i,a,s),h=rl(e,"w",rh.w,r,n,i,a,s),c||d||f||h},dampE:function(e,t,r,n,i,a,s){return Array.isArray(t)?rp.set(t[0],t[1],t[2],t[3]):rp.copy(t),p=ru(e,"x",rp.x,r,n,i,a,s),m=ru(e,"y",rp.y,r,n,i,a,s),g=ru(e,"z",rp.z,r,n,i,a,s),p||m||g},dampC:function(e,t,r,n,i,a,s){return t instanceof ek.Color?rm.copy(t):Array.isArray(t)?rm.setRGB(t[0],t[1],t[2]):rm.set(t),A=rl(e,"r",rm.r,r,n,i,a,s),y=rl(e,"g",rm.g,r,n,i,a,s),x=rl(e,"b",rm.b,r,n,i,a,s),A||y||x},dampQ:rx,dampS:function(e,t,r,n,i,a,s){return Array.isArray(t)?rB.set(t[0],t[1],t[2]):rB.copy(t),T=rl(e,"radius",rB.radius,r,n,i,a,s),D=ru(e,"phi",rB.phi,r,n,i,a,s),b=ru(e,"theta",rB.theta,r,n,i,a,s),T||D||b},dampM:function(e,t,r,n,i,a,s){return void 0===e.__damp&&(e.__damp={position:new ek.Vector3,rotation:new ek.Quaternion,scale:new ek.Vector3},e.decompose(e.__damp.position,e.__damp.rotation,e.__damp.scale)),Array.isArray(t)?rC.set.apply(rC,t7(t)):rC.copy(t),rC.decompose(rS,rE,rT),M=rf(e.__damp.position,rS,r,n,i,a,s),w=rx(e.__damp.rotation,rE,r,n,i,a,s),F=rf(e.__damp.scale,rT,r,n,i,a,s),e.compose(e.__damp.position,e.__damp.rotation,e.__damp.scale),M||w||F}});ek.BufferGeometry;var rb=e.i(99749),rM=ek,rw=ek;new rw.OrthographicCamera(-1,1,1,-1,0,1);class rF extends rw.BufferGeometry{constructor(){super(),this.setAttribute("position",new rw.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new rw.Float32BufferAttribute([0,2,0,0,2,0],2))}}new rF;class rR extends rM.BufferGeometry{computeBoundingSphere(){}constructor(){super(),(0,rb._)(this,"boundingSphere",new rM.Sphere),this.setAttribute("position",new rM.BufferAttribute(new Float32Array([-1,-1,3,-1,-1,3]),2)),this.setAttribute("uv",new rM.BufferAttribute(new Float32Array([0,0,2,0,0,2]),2))}}let rI=new rR,rP=new rM.OrthographicCamera;class rL{render(e){e.render(this._mesh,rP)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}constructor(e){this._mesh=new rM.Mesh(rI,e),this._mesh.frustumCulled=!1}}let rU={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new rM.Matrix4},viewMat:{value:new rM.Matrix4},projViewMat:{value:new rM.Matrix4},projectionMatrixInv:{value:new rM.Matrix4},viewMatrixInv:{value:new rM.Matrix4},cameraPos:{value:new rM.Vector3},resolution:{value:new rM.Vector2},biasAdjustment:{value:new rM.Vector2},time:{value:0},samples:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},ortho:{value:!1},screenSpaceRadius:{value:!1},frame:{value:0}},depthWrite:!1,depthTest:!1,vertexShader:"\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n}",fragmentShader:"\n #define SAMPLES 16\n #define FSAMPLES 16.0\nuniform sampler2D sceneDiffuse;\nuniform highp sampler2D sceneNormal;\nuniform highp sampler2D sceneDepth;\nuniform mat4 projectionMatrixInv;\nuniform mat4 viewMatrixInv;\nuniform mat4 projMat;\nuniform mat4 viewMat;\nuniform mat4 projViewMat;\nuniform vec3 cameraPos;\nuniform vec2 resolution;\nuniform vec2 biasAdjustment;\nuniform float time;\nuniform vec3[SAMPLES] samples;\nuniform float radius;\nuniform float distanceFalloff;\nuniform float near;\nuniform float far;\nuniform float frame;\nuniform bool ortho;\nuniform bool screenSpaceRadius;\nuniform sampler2D bluenoise;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n /*return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);*/\n #ifdef ORTHO\n\n return linearize_depth_ortho(d, nearZ, farZ);\n\n #else\n return linearize_depth(linDepth, nearZ, farZ);\n #endif\n }\n\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n\n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n #ifdef REVERSEDEPTH\n float c0 = 1.0 - texelFetch(sceneDepth, p, 0).x;\n float l2 = 1.0 - texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = 1.0 - texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = 1.0 - texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = 1.0 - texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #else\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #endif\n\n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n\n vec3 ce = getWorldPos(c0, vUv).xyz;\n\n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n\n return normalize(cross(dpdx, dpdy));\n}\n\nmat3 makeRotationZ(float theta) {\n float c = cos(theta);\n float s = sin(theta);\n return mat3(c, - s, 0,\n s, c, 0,\n 0, 0, 1);\n }\n\nvoid main() {\n vec4 diffuse = texture2D(sceneDiffuse, vUv);\n #ifdef REVERSEDEPTH\n float depth = 1.0 - texture2D(sceneDepth, vUv).x;\n #else\n float depth = texture2D(sceneDepth, vUv).x;\n #endif\n if (depth == 1.0) {\n gl_FragColor = vec4(vec3(1.0), 1.0);\n return;\n }\n vec3 worldPos = getWorldPos(depth, vUv);\n #ifdef HALFRES\n vec3 normal = texture2D(sceneNormal, vUv).rgb;\n #else\n vec3 normal = computeNormal(worldPos, vUv);\n #endif\n vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0);\n vec2 harmoniousNumbers = vec2(\n 1.618033988749895,\n 1.324717957244746\n );\n noise.rg += harmoniousNumbers * frame;\n noise.rg = fract(noise.rg);\n vec3 helperVec = vec3(0.0, 1.0, 0.0);\n if (dot(helperVec, normal) > 0.99) {\n helperVec = vec3(1.0, 0.0, 0.0);\n }\n vec3 tangent = normalize(cross(helperVec, normal));\n vec3 bitangent = cross(normal, tangent);\n mediump mat3 tbn = mat3(tangent, bitangent, normal) * makeRotationZ( noise.r * 3.1415962 * 2.0) ;\n\n mediump float occluded = 0.0;\n mediump float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : radiusToUse * distanceFalloff * 0.2;\n float bias = (min(\n 0.1,\n distanceFalloffToUse * 0.1\n ) / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse;\n bias = biasAdjustment.x + biasAdjustment.y * bias;\n mediump float offsetMove = noise.g;\n mediump float offsetMoveInv = 1.0 / FSAMPLES;\n float farTimesNear = far * near;\n float farMinusNear = far - near;\n \n for(int i = 0; i < SAMPLES; i++) {\n mediump vec3 sampleDirection = tbn * samples[i];\n\n float moveAmt = fract(offsetMove);\n offsetMove += offsetMoveInv;\n vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection;\n vec4 offset = projMat * vec4(samplePos, 1.0);\n offset.xyz /= offset.w;\n offset.xyz = offset.xyz * 0.5 + 0.5;\n \n if (all(greaterThan(offset.xyz * (1.0 - offset.xyz), vec3(0.0)))) {\n #ifdef REVERSEDEPTH\n float sampleDepth = 1.0 - textureLod(sceneDepth, offset.xy, 0.0).x;\n #else\n float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x;\n #endif\n\n /*#ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n #ifdef ORTHO\n float distSample = near + farMinusNear * sampleDepth;\n #else\n float distSample = (farTimesNear) / (far - sampleDepth * farMinusNear);\n #endif\n #endif*/\n #ifdef ORTHO\n float distSample = near + sampleDepth * farMinusNear;\n #else\n #ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n float distSample = (farTimesNear) / (far - sampleDepth * farMinusNear);\n #endif\n #endif\n \n #ifdef ORTHO\n float distWorld = near + offset.z * farMinusNear;\n #else\n float distWorld = (farTimesNear) / (far - offset.z * farMinusNear);\n #endif\n \n mediump float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld)));\n vec2 diff = gl_FragCoord.xy - floor(offset.xy * resolution);\n occluded += rangeCheck * float(distSample != distWorld) * float(sampleDepth != depth) * step(distSample + bias, distWorld) * step(\n 1.0,\n dot(diff, diff)\n );\n \n totalWeight ++;\n }\n }\n float occ = clamp(1.0 - occluded / (totalWeight == 0.0 ? 1.0 : totalWeight), 0.0, 1.0);\n gl_FragColor = vec4(occ, 0.5 + 0.5 * normal);\n}"},rG={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},transparencyDWFalse:{value:null},transparencyDWTrue:{value:null},transparencyDWTrueDepth:{value:null},transparencyAware:{value:!1},projMat:{value:new rM.Matrix4},viewMat:{value:new rM.Matrix4},projectionMatrixInv:{value:new rM.Matrix4},viewMatrixInv:{value:new rM.Matrix4},cameraPos:{value:new rM.Vector3},resolution:{value:new rM.Vector2},color:{value:new rM.Vector3(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0},aoTones:{value:0}},depthWrite:!1,depthTest:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform highp sampler2D downsampledDepth;\n uniform highp sampler2D transparencyDWFalse;\n uniform highp sampler2D transparencyDWTrue;\n uniform highp sampler2D transparencyDWTrueDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform vec2 resolution;\n uniform vec3 color;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform float intensity;\n uniform float renderMode;\n uniform float near;\n uniform float far;\n uniform float aoTones;\n uniform bool gammaCorrection;\n uniform bool ortho;\n uniform bool screenSpaceRadius;\n uniform bool fog;\n uniform bool fogExp;\n uniform bool colorMultiply;\n uniform bool transparencyAware;\n uniform float fogDensity;\n uniform float fogNear;\n uniform float fogFar;\n uniform float radius;\n uniform float distanceFalloff;\n uniform vec3 cameraPos;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n // }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n #ifdef REVERSEDEPTH\n float c0 = 1.0 - texelFetch(sceneDepth, p, 0).x;\n float l2 = 1.0 - texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = 1.0 - texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = 1.0 - texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = 1.0 - texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #else\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #endif\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n\n #include \n #include \n void main() {\n //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0);\n vec4 sceneTexel = texture2D(sceneDiffuse, vUv);\n #ifdef REVERSEDEPTH\n float depth = 1.0 - texture2D(sceneDepth, vUv).x;\n #else\n float depth = texture2D(sceneDepth, vUv).x;\n #endif\n #ifdef HALFRES \n vec4 texel;\n if (depth == 1.0) {\n texel = vec4(0.0, 0.0, 0.0, 1.0);\n } else {\n vec3 worldPos = getWorldPos(depth, vUv);\n vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv);\n // vec4 texel = texture2D(tDiffuse, vUv);\n // Find closest depth;\n float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n for(float x = -1.0; x <= 1.0; x++) {\n for(float y = -1.0; y <= 1.0; y++) {\n vec2 offset = vec2(x, y);\n ivec2 p = ivec2(\n (vUv * resolution * 0.5) + offset\n );\n vec2 pUv = vec2(p) / (resolution * 0.5);\n float sampleDepth = texelFetch(downsampledDepth,p, 0).x;\n vec4 sampleInfo = texelFetch(tDiffuse, p, 0);\n vec3 normalSample = sampleInfo.gba * 2.0 - 1.0;\n vec3 worldPosSample = getWorldPos(sampleDepth, pUv);\n float tangentPlaneDist = abs(dot(worldPosSample - worldPos, normal));\n float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0);\n float weight = rangeCheck;\n totalWeight += weight;\n texel += sampleInfo * weight;\n }\n }\n if (totalWeight == 0.0) {\n texel = texture2D(tDiffuse, vUv);\n } else {\n texel /= totalWeight;\n }\n }\n #else\n vec4 texel = texture2D(tDiffuse, vUv);\n #endif\n\n #ifdef LOGDEPTH\n texel.r = clamp(texel.r, 0.0, 1.0);\n if (texel.r == 0.0) {\n texel.r = 1.0;\n }\n #endif\n \n float finalAo = pow(texel.r, intensity);\n if (aoTones > 0.0) {\n finalAo = ceil(finalAo * aoTones) / aoTones;\n }\n float fogFactor;\n float fogDepth = distance(\n cameraPos,\n getWorldPos(depth, vUv)\n );\n if (fog) {\n if (fogExp) {\n fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n } else {\n fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n }\n }\n if (transparencyAware) {\n float transparencyDWOff = texture2D(transparencyDWFalse, vUv).a;\n float transparencyDWOn = texture2D(transparencyDWTrue, vUv).a;\n float adjustmentFactorOff = transparencyDWOff;\n #ifdef REVERSEDEPTH\n float depthSample = 1.0 - texture2D(sceneDepth, vUv).r;\n float trueDepthSample = 1.0 - texture2D(transparencyDWTrueDepth, vUv).r;\n #else\n float depthSample = texture2D(sceneDepth, vUv).r;\n float trueDepthSample = texture2D(transparencyDWTrueDepth, vUv).r;\n #endif\n float adjustmentFactorOn = (1.0 - transparencyDWOn) * (\n trueDepthSample == depthSample ? 1.0 : 0.0\n );\n float adjustmentFactor = max(adjustmentFactorOff, adjustmentFactorOn);\n finalAo = mix(finalAo, 1.0, adjustmentFactor);\n }\n finalAo = mix(finalAo, 1.0, fogFactor);\n vec3 aoApplied = color * mix(vec3(1.0), sceneTexel.rgb, float(colorMultiply));\n if (renderMode == 0.0) {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 1.0) {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 2.0) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (renderMode == 3.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n } else if (renderMode == 4.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n }\n #include \n if (gammaCorrection) {\n gl_FragColor = sRGBTransferOETF(gl_FragColor);\n }\n }\n "},rO={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new rM.Matrix4},viewMat:{value:new rM.Matrix4},projectionMatrixInv:{value:new rM.Matrix4},viewMatrixInv:{value:new rM.Matrix4},cameraPos:{value:new rM.Vector3},resolution:{value:new rM.Vector2},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1.0);\n }",fragmentShader:"\n uniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform vec2 resolution;\n uniform float r;\n uniform float radius;\n uniform float worldRadius;\n uniform float index;\n uniform float near;\n uniform float far;\n uniform float distanceFalloff;\n uniform bool screenSpaceRadius;\n varying vec2 vUv;\n\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n highp float z_n = 2.0 * d - 1.0;\n return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear));\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return linearize_depth(linDepth, nearZ, farZ);\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n #ifndef ORTHO\n return getWorldPosLog(vec3(coord, depth));\n #endif\n #endif\n \n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n #include \n #define NUM_SAMPLES 16\n uniform vec2 poissonDisk[NUM_SAMPLES];\n void main() {\n const float pi = 3.14159;\n vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec2 uv = vUv;\n vec4 data = texture2D(tDiffuse, vUv);\n float occlusion = data.r;\n float baseOcc = data.r;\n vec3 normal = data.gba * 2.0 - 1.0;\n float count = 1.0;\n float d = texture2D(sceneDepth, vUv).x;\n if (d == 1.0) {\n gl_FragColor = data;\n return;\n }\n vec3 worldPos = getWorldPos(d, vUv);\n float size = radius;\n float angle;\n if (index == 0.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2;\n } else if (index == 1.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2;\n } else if (index == 2.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2;\n } else {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2;\n }\n\n mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(d, vUv +\n vec2(worldRadius, 0.0) / resolution)\n ) : worldRadius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : radiusToUse * distanceFalloff * 0.2;\n\n float invDistance = (1.0 / distanceFalloffToUse);\n for(int i = 0; i < NUM_SAMPLES; i++) {\n vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size;\n vec4 dataSample = texture2D(tDiffuse, uv + offset);\n float occSample = dataSample.r;\n vec3 normalSample = dataSample.gba * 2.0 - 1.0;\n float dSample = texture2D(sceneDepth, uv + offset).x;\n vec3 worldPosSample = getWorldPos(dSample, uv + offset);\n float tangentPlaneDist = abs(dot(worldPosSample - worldPos, normal));\n float rangeCheck = float(dSample != 1.0) * exp(-1.0 * tangentPlaneDist * invDistance ) * max(dot(normal, normalSample), 0.0);\n occlusion += occSample * rangeCheck;\n count += rangeCheck;\n }\n if (count > 0.0) {\n occlusion /= count;\n }\n occlusion = clamp(occlusion, 0.0, 1.0);\n if (occlusion == 0.0) {\n occlusion = 1.0;\n }\n gl_FragColor = vec4(occlusion, 0.5 + 0.5 * normal);\n }\n "},rH={uniforms:{sceneDepth:{value:null},resolution:{value:new rM.Vector2},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new rM.Matrix4},projectionMatrixInv:{value:new rM.Matrix4},logDepth:{value:!1},ortho:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform highp sampler2D sceneDepth;\n uniform vec2 resolution;\n uniform float near;\n uniform float far;\n uniform bool logDepth;\n uniform bool ortho;\n uniform mat4 viewMatrixInv;\n uniform mat4 projectionMatrixInv;\n varying vec2 vUv;\n layout(location = 1) out vec4 gNormal;\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n if (logDepth && !ortho) {\n return getWorldPosLog(vec3(coord, depth));\n }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n #ifdef REVERSEDEPTH\n float c0 = 1.0 - texelFetch(sceneDepth, p, 0).x;\n float l2 = 1.0 - texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = 1.0 - texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = 1.0 - texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = 1.0 - texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = 1.0 - texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = 1.0 - texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #else\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n #endif\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n void main() {\n vec2 uv = vUv - vec2(0.5) / resolution;\n vec2 pixelSize = vec2(1.0) / resolution;\n highp vec2[4] uvSamples;\n uvSamples[0] = uv;\n uvSamples[1] = uv + vec2(pixelSize.x, 0.0);\n uvSamples[2] = uv + vec2(0.0, pixelSize.y);\n uvSamples[3] = uv + pixelSize;\n #ifdef REVERSEDEPTH\n float depth00 = 1.0 - texture2D(sceneDepth, uvSamples[0]).r;\n float depth10 = 1.0 - texture2D(sceneDepth, uvSamples[1]).r;\n float depth01 = 1.0 - texture2D(sceneDepth, uvSamples[2]).r;\n float depth11 = 1.0 - texture2D(sceneDepth, uvSamples[3]).r;\n #else\n float depth00 = texture2D(sceneDepth, uvSamples[0]).r;\n float depth10 = texture2D(sceneDepth, uvSamples[1]).r;\n float depth01 = texture2D(sceneDepth, uvSamples[2]).r;\n float depth11 = texture2D(sceneDepth, uvSamples[3]).r;\n #endif\n float minDepth = min(min(depth00, depth10), min(depth01, depth11));\n float maxDepth = max(max(depth00, depth10), max(depth01, depth11));\n float targetDepth = minDepth;\n // Checkerboard pattern to avoid artifacts\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { \n targetDepth = maxDepth;\n }\n int chosenIndex = 0;\n float[4] samples;\n samples[0] = depth00;\n samples[1] = depth10;\n samples[2] = depth01;\n samples[3] = depth11;\n for(int i = 0; i < 4; ++i) {\n if (samples[i] == targetDepth) {\n chosenIndex = i;\n break;\n }\n }\n gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0);\n gNormal = vec4(computeNormal(\n getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex]\n ), 0.0);\n }"},rN=Uint8Array.from(atob("5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8S5k68bLHW9tfD+2k4zGev23ExJb4YTRKWrj82N5LjJ26lj1BkGZ0CsXLGGELoPaYQomjTqPxYqhfwOwDliNGVqux9ffuybqOKgsbB51B1GbZfG8vHDBE2JQGib1mnCmWOWAMJcHN0cKeDHY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nZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw=="),e=>e.charCodeAt(0)),rk=parseInt(rM.REVISION.replace(/\D+/g,""))>=162?class extends rM.WebGLRenderTarget{get texture(){return this.textures}constructor(e=1,t=1,r=1,n={}){super(e,t,{...n,count:r}),this.isWebGLMultipleRenderTargets=!0}}:class extends rM.WebGLRenderTarget{setSize(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this.width!==e||this.height!==t||this.depth!==r){this.width=e,this.height=t,this.depth=r;for(let n=0,i=this.texture.length;n{t.material&&t.material.transparent&&(e=!0)}),e&&(this.configuration.transparencyAware=!0)}}configureTransparencyTarget(){this.configuration.transparencyAware?(this.transparencyRenderTargetDWFalse=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.NearestFilter,type:rM.HalfFloatType,format:rM.RGBAFormat}),this.transparencyRenderTargetDWTrue=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.NearestFilter,type:rM.HalfFloatType,format:rM.RGBAFormat}),this.transparencyRenderTargetDWTrue.depthTexture=new rM.DepthTexture(this.width,this.height,rM.UnsignedIntType),this.depthCopyPass=new rL(new rM.ShaderMaterial({uniforms:{depthTexture:{value:this.depthTexture},reverseDepthBuffer:{value:this.configuration.depthBufferType===rz.Reverse}},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D depthTexture;\n uniform bool reverseDepthBuffer;\n varying vec2 vUv;\n void main() {\n if (reverseDepthBuffer) {\n float d = 1.0 - texture2D(depthTexture, vUv).r;\n \n d += 0.00001;\n gl_FragDepth = 1.0 - d;\n } else {\n float d = texture2D(depthTexture, vUv).r;\n d += 0.00001;\n gl_FragDepth = d;\n }\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n "}))):(this.transparencyRenderTargetDWFalse&&(this.transparencyRenderTargetDWFalse.dispose(),this.transparencyRenderTargetDWFalse=null),this.transparencyRenderTargetDWTrue&&(this.transparencyRenderTargetDWTrue.dispose(),this.transparencyRenderTargetDWTrue=null),this.depthCopyPass&&(this.depthCopyPass.dispose(),this.depthCopyPass=null))}renderTransparency(e){let t=this.scene.background,r=e.getClearColor(new rM.Color),n=e.getClearAlpha(),i=new Map,a=e.autoClearDepth;this.scene.traverse(e=>{i.set(e,e.visible)}),this.scene.background=null,e.autoClearDepth=!1,e.setClearColor(new rM.Color(0,0,0),0),this.depthCopyPass.material.uniforms.depthTexture.value=this.depthTexture,this.depthCopyPass.material.uniforms.reverseDepthBuffer.value=this.configuration.depthBufferType===rz.Reverse,e.setRenderTarget(this.transparencyRenderTargetDWFalse),this.scene.traverse(e=>{e.material&&(e.visible=i.get(e)&&(e.material.transparent&&!e.material.depthWrite&&!e.userData.treatAsOpaque||!!e.userData.cannotReceiveAO))}),e.clear(!0,!0,!0),this.depthCopyPass.render(e),e.render(this.scene,this.camera),e.setRenderTarget(this.transparencyRenderTargetDWTrue),this.scene.traverse(e=>{e.material&&(e.visible=i.get(e)&&e.material.transparent&&e.material.depthWrite&&!e.userData.treatAsOpaque)}),e.clear(!0,!0,!0),this.depthCopyPass.render(e),e.render(this.scene,this.camera),this.scene.traverse(e=>{e.visible=i.get(e)}),e.setClearColor(r,n),this.scene.background=t,e.autoClearDepth=a}configureSampleDependentPasses(){this.configureAOPass(this.configuration.depthBufferType,this.camera.isOrthographicCamera),this.configureDenoisePass(this.configuration.depthBufferType,this.camera.isOrthographicCamera)}configureAOPass(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rz.Default,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.firstFrame(),this.samples=this.generateHemisphereSamples(this.configuration.aoSamples);let r={...rU};r.fragmentShader=r.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e===rz.Log?r.fragmentShader="#define LOGDEPTH\n"+r.fragmentShader:e===rz.Reverse&&(r.fragmentShader="#define REVERSEDEPTH\n"+r.fragmentShader),t&&(r.fragmentShader="#define ORTHO\n"+r.fragmentShader),this.configuration.halfRes&&(r.fragmentShader="#define HALFRES\n"+r.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new rM.ShaderMaterial(r)):this.effectShaderQuad=new rL(new rM.ShaderMaterial(r))}configureDenoisePass(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rz.Default,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.firstFrame(),this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);let r={...rO};r.fragmentShader=r.fragmentShader.replace("16",this.configuration.denoiseSamples),e===rz.Log?r.fragmentShader="#define LOGDEPTH\n"+r.fragmentShader:e===rz.Reverse&&(r.fragmentShader="#define REVERSEDEPTH\n"+r.fragmentShader),t&&(r.fragmentShader="#define ORTHO\n"+r.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new rM.ShaderMaterial(r)):this.poissonBlurQuad=new rL(new rM.ShaderMaterial(r))}configureEffectCompositer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rz.Default,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.firstFrame();let r={...rG};e===rz.Log?r.fragmentShader="#define LOGDEPTH\n"+r.fragmentShader:e===rz.Reverse&&(r.fragmentShader="#define REVERSEDEPTH\n"+r.fragmentShader),t&&(r.fragmentShader="#define ORTHO\n"+r.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(r.fragmentShader="#define HALFRES\n"+r.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new rM.ShaderMaterial(r)):this.effectCompositerQuad=new rL(new rM.ShaderMaterial(r))}generateHemisphereSamples(e){let t=[];for(let r=0;r{e(t,r,n)},1)}(a,n,this)),e.xr.enabled=s}enableDebugMode(){this.debugMode=!0}disableDebugMode(){this.debugMode=!1}setDisplayMode(e){this.configuration.renderMode=["Combined","AO","No AO","Split","Split AO"].indexOf(e)}setQualityMode(e){"Performance"===e?(this.configuration.aoSamples=8,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):"Low"===e?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):"Medium"===e?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=12):"High"===e?(this.configuration.aoSamples=64,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=6):"Ultra"===e&&(this.configuration.aoSamples=64,this.configuration.denoiseSamples=16,this.configuration.denoiseRadius=6)}constructor(e,t,r=512,n=512){super(),this.width=r,this.height=n,this.clear=!0,this.camera=t,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,aoTones:0,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,biasOffset:0,biasMultiplier:0,color:new rM.Color(0,0,0),gammaCorrection:!0,depthBufferType:rz.Default,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0,transparencyAware:!1,accumulate:!1},{set:(e,t,r)=>{let n=e[t];return e[t]=r,r.equals?r.equals(n)||this.firstFrame():n!==r&&this.firstFrame(),"aoSamples"===t&&n!==r&&this.configureAOPass(this.configuration.depthBufferType,this.camera.isOrthographicCamera),"denoiseSamples"===t&&n!==r&&this.configureDenoisePass(this.configuration.depthBufferType,this.camera.isOrthographicCamera),"halfRes"===t&&n!==r&&(this.configureAOPass(this.configuration.depthBufferType,this.camera.isOrthographicCamera),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.depthBufferType,this.camera.isOrthographicCamera),this.setSize(this.width,this.height)),"depthAwareUpsampling"===t&&n!==r&&this.configureEffectCompositer(this.configuration.depthBufferType,this.camera.isOrthographicCamera),"gammaCorrection"===t&&(this.autosetGamma=!1),"transparencyAware"===t&&n!==r&&(this.autoDetectTransparency=!1,this.configureTransparencyTarget()),!0}}),this.samples=[],this.samplesDenoise=[],this.autoDetectTransparency=!0,this.frames=0,this.lastViewMatrix=new rM.Matrix4,this.lastProjectionMatrix=new rM.Matrix4,this.configureEffectCompositer(this.configuration.depthBufferType),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.detectTransparency(),this.configureTransparencyTarget(),this.copyQuad=new rL(new rM.ShaderMaterial({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n void main() {\n gl_FragColor = texture2D(tDiffuse, vUv);\n }\n "})),this.writeTargetInternal=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.LinearFilter,depthBuffer:!1,format:rM.RGBAFormat}),this.readTargetInternal=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.LinearFilter,depthBuffer:!1,format:rM.RGBAFormat}),this.outputTargetInternal=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.LinearFilter,depthBuffer:!1}),this.accumulationRenderTarget=new rM.WebGLRenderTarget(this.width,this.height,{minFilter:rM.LinearFilter,magFilter:rM.LinearFilter,depthBuffer:!1,format:rM.RGBAFormat,type:rM.HalfFloatType,stencilBuffer:!1,depthBuffer:!1,alpha:!0}),this.accumulationQuad=new rL(new rM.ShaderMaterial({uniforms:{frame:{value:0},tDiffuse:{value:null}},transparent:!0,opacity:1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float frame;\n varying vec2 vUv;\n void main() {\n vec4 color = texture2D(tDiffuse, vUv);\n gl_FragColor = vec4(color.rgb, 1.0 / (frame + 1.0));\n }\n "})),this.bluenoise=new rM.DataTexture(rN,128,128),this.bluenoise.colorSpace=rM.NoColorSpace,this.bluenoise.wrapS=rM.RepeatWrapping,this.bluenoise.wrapT=rM.RepeatWrapping,this.bluenoise.minFilter=rM.NearestFilter,this.bluenoise.magFilter=rM.NearestFilter,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.timeRollingAverage=.99,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new rM.Vector2,this._c=new rM.Color}}let rz={Default:1,Log:2,Reverse:3},rK=(0,eG.createContext)(null),rJ=e=>(2&e.getAttributes())==2,rV=(0,eG.memo)((0,eG.forwardRef)((e,t)=>{let{children:r,camera:n,scene:i,resolutionScale:a,enabled:s=!0,renderPriority:o=1,autoClear:l=!0,depthBuffer:u,enableNormalPass:c,stencilBuffer:d,multisampling:f=8,frameBufferType:h=ek.HalfFloatType}=e,{gl:p,scene:m,camera:g,size:A}=(0,eW.useThree)(),y=i||m,x=n||g,[B,C,S]=(0,eG.useMemo)(()=>{let e=new e5(p,{depthBuffer:u,stencilBuffer:d,multisampling:f,frameBufferType:h});e.addPass(new tb(y,x));let t=null,r=null;return c&&((r=new t3(y,x)).enabled=!1,e.addPass(r),void 0!==a&&((t=new tX({normalBuffer:r.texture,resolutionScale:a})).enabled=!1,e.addPass(t))),[e,r,t]},[x,p,u,d,f,h,y,c,a]);(0,eG.useEffect)(()=>null==B?void 0:B.setSize(A.width,A.height),[B,A]),(0,eX.useFrame)((e,t)=>{if(s){let e=p.autoClear;p.autoClear=l,d&&!l&&p.clearStencil(),B.render(t),p.autoClear=e}},s?o:0);let E=(0,eG.useRef)(null);(0,eG.useLayoutEffect)(()=>{let e=[],t=E.current.__r3f;if(t&&B){let n=t.children;for(let t=0;t{for(let t of e)null==B||B.removePass(t);C&&(C.enabled=!1),S&&(S.enabled=!1)}},[B,r,x,C,S]),(0,eG.useEffect)(()=>{let e=p.toneMapping;return p.toneMapping=ek.NoToneMapping,()=>{p.toneMapping=e}},[p]);let T=(0,eG.useMemo)(()=>({composer:B,normalPass:C,downSamplingPass:S,resolutionScale:a,camera:x,scene:y}),[B,C,S,a,x,y]);return(0,eG.useImperativeHandle)(t,()=>B,[B]),(0,eU.jsx)(rK.Provider,{value:T,children:(0,eU.jsx)("group",{ref:E,children:r})})}));var rQ=(e=>(e[e.Linear=0]="Linear",e[e.Radial=1]="Radial",e[e.MirroredLinear=2]="MirroredLinear",e))(rQ||{});let rW=(0,eG.forwardRef)((e,t)=>{let{halfRes:r,screenSpaceRadius:n,quality:i,depthAwareUpsampling:a=!0,aoRadius:s=5,aoSamples:o=16,denoiseSamples:l=4,denoiseRadius:u=12,distanceFalloff:c=1,intensity:d=1,color:f,renderMode:h=0}=e,{camera:p,scene:m}=(0,eW.useThree)(),g=(0,eG.useMemo)(()=>new rj(m,p),[p,m]);return(0,eG.useLayoutEffect)(()=>{(0,eH.s)(g.configuration,{color:f,aoRadius:s,distanceFalloff:c,intensity:d,aoSamples:o,denoiseSamples:l,denoiseRadius:u,screenSpaceRadius:n,renderMode:h,halfRes:r,depthAwareUpsampling:a})},[n,f,s,c,d,o,l,u,h,r,a,g]),(0,eG.useLayoutEffect)(()=>{i&&g.setQualityMode(i.charAt(0).toUpperCase()+i.slice(1))},[g,i]),(0,eU.jsx)("primitive",{ref:t,object:g})});function rX(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function r_(e,t){var r=rX(e,t,"get");return r.get?r.get.call(e):r.value}function rZ(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function rY(e,t,r){rZ(e,t),t.set(e,r)}function rq(e,t,r){var n=rX(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function r$(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}function r0(e,t){rZ(e,t),t.add(e)}var r1=class{subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}};e.i(47167);var r2={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r9=new(R=new WeakMap,I=new WeakMap,class{setTimeoutProvider(e){rq(this,R,e)}setTimeout(e,t){return r_(this,R).setTimeout(e,t)}clearTimeout(e){r_(this,R).clearTimeout(e)}setInterval(e,t){return r_(this,R).setInterval(e,t)}clearInterval(e){r_(this,R).clearInterval(e)}constructor(){rY(this,R,{writable:!0,value:r2}),rY(this,I,{writable:!0,value:!1})}}),r3="undefined"==typeof window||"Deno"in globalThis;function r4(){}function r8(e){return"number"==typeof e&&e>=0&&e!==1/0}function r5(e,t){return Math.max(e+(t||0)-Date.now(),0)}function r6(e,t){return"function"==typeof e?e(t):e}function r7(e,t){return"function"==typeof e?e(t):e}function ne(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==nr(s,t.options))return!1}else if(!ni(t.queryKey,s))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!a||!!a(t))}function nt(e,t){let{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(nn(t.options.mutationKey)!==nn(a))return!1}else if(!ni(t.options.mutationKey,a))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))}function nr(e,t){return((null==t?void 0:t.queryKeyHashFn)||nn)(e)}function nn(e){return JSON.stringify(e,(e,t)=>nl(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function ni(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>ni(e[r],t[r]))}var na=Object.prototype.hasOwnProperty;function ns(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function no(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nl(e){if(!nu(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!nu(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function nu(e){return"[object Object]"===Object.prototype.toString.call(e)}function nc(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let n=no(t)&&no(r);if(!n&&!(nl(t)&&nl(r)))return r;let i=(n?t:Object.keys(t)).length,a=n?r:Object.keys(r),s=a.length,o=n?Array(s):{},l=0;for(let u=0;u2&&void 0!==arguments[2]?arguments[2]:0,n=[...e,t];return r&&n.length>r?n.slice(1):n}function nf(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var nh=Symbol();function np(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==nh?e.queryFn:()=>Promise.reject(Error("Missing queryFn: '".concat(e.queryHash,"'")))}var nm=new(P=new WeakMap,L=new WeakMap,U=new WeakMap,class extends r1{onSubscribe(){r_(this,L)||this.setEventListener(r_(this,U))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=r_(this,L))||e.call(this),rq(this,L,void 0))}setEventListener(e){var t;rq(this,U,e),null==(t=r_(this,L))||t.call(this),rq(this,L,e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){r_(this,P)!==e&&(rq(this,P,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return"boolean"==typeof r_(this,P)?r_(this,P):(null==(e=globalThis.document)?void 0:e.visibilityState)!=="hidden"}constructor(){super(),rY(this,P,{writable:!0,value:void 0}),rY(this,L,{writable:!0,value:void 0}),rY(this,U,{writable:!0,value:void 0}),rq(this,U,e=>{if(!r3&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}}),nv=function(e){setTimeout(e,0)},ng=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=nv,a=n=>{t?e.push(n):i(()=>{r(n)})};return{batch:a=>{let s;t++;try{s=a()}finally{--t||(()=>{let t=e;e=[],t.length&&i(()=>{n(()=>{t.forEach(e=>{r(e)})})})})()}return s},batchCalls:e=>function(){for(var t=arguments.length,r=Array(t),n=0;n{e(...r)})},schedule:a,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}(),nA=new(G=new WeakMap,O=new WeakMap,H=new WeakMap,class extends r1{onSubscribe(){r_(this,O)||this.setEventListener(r_(this,H))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=r_(this,O))||e.call(this),rq(this,O,void 0))}setEventListener(e){var t;rq(this,H,e),null==(t=r_(this,O))||t.call(this),rq(this,O,e(this.setOnline.bind(this)))}setOnline(e){r_(this,G)!==e&&(rq(this,G,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return r_(this,G)}constructor(){super(),rY(this,G,{writable:!0,value:!0}),rY(this,O,{writable:!0,value:void 0}),rY(this,H,{writable:!0,value:void 0}),rq(this,H,e=>{if(!r3&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}});function ny(){let e,t,r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function nx(e){return Math.min(1e3*2**e,3e4)}function nB(e){return(null!=e?e:"online")!=="online"||nA.isOnline()}var nC=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function nS(e){let t,r=!1,n=0,i=ny(),a=()=>nm.isFocused()&&("always"===e.networkMode||nA.isOnline())&&e.canRun(),s=()=>nB(e.networkMode)&&e.canRun(),o=e=>{"pending"===i.status&&(null==t||t(),i.resolve(e))},l=e=>{"pending"===i.status&&(null==t||t(),i.reject(e))},u=()=>new Promise(r=>{var n;t=e=>{("pending"!==i.status||a())&&r(e)},null==(n=e.onPause)||n.call(e)}).then(()=>{if(t=void 0,"pending"===i.status){var r;null==(r=e.onContinue)||r.call(e)}}),c=()=>{let t;if("pending"!==i.status)return;let s=0===n?e.initialPromise:void 0;try{t=null!=s?s:e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(o).catch(t=>{var s,o,d;if("pending"!==i.status)return;let f=null!=(o=e.retry)?o:3*!r3,h=null!=(d=e.retryDelay)?d:nx,p="function"==typeof h?h(n,t):h,m=!0===f||"number"==typeof f&&n{r9.setTimeout(e,p)}).then(()=>a()?void 0:u()).then(()=>{r?l(t):c()})})};return{promise:i,status:()=>i.status,cancel:t=>{if("pending"===i.status){var r;let n=new nC(t);l(n),null==(r=e.onCancel)||r.call(e,n)}},continue:()=>(null==t||t(),i),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:s,start:()=>(s()?c():u().then(c),i)}}var nE=(N=new WeakMap,class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),r8(this.gcTime)&&rq(this,N,r9.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!=e?e:r3?1/0:3e5)}clearGcTimeout(){r_(this,N)&&(r9.clearTimeout(r_(this,N)),rq(this,N,void 0))}constructor(){rY(this,N,{writable:!0,value:void 0})}}),nT=(k=new WeakMap,j=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,V=new WeakMap,Q=new WeakMap,W=new WeakSet,class extends nE{get meta(){return this.options.meta}get promise(){var e;return null==(e=r_(this,J))?void 0:e.promise}setOptions(e){if(this.options={...r_(this,V),...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=nM(this.options);void 0!==e.data&&(this.setState(nb(e.data,e.dataUpdatedAt)),rq(this,k,e))}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||r_(this,z).remove(this)}setData(e,t){let r=nc(this.state.data,e,this.options);return r$(this,W,nw).call(this,{data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){r$(this,W,nw).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,r;let n=null==(t=r_(this,J))?void 0:t.promise;return null==(r=r_(this,J))||r.cancel(e),n?n.then(r4).catch(r4):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(r_(this,k))}isActive(){return this.observers.some(e=>!1!==r7(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===r6(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!r5(this.state.dataUpdatedAt,e))}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());null==t||t.refetch({cancelRefetch:!1}),null==(e=r_(this,J))||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());null==t||t.refetch({cancelRefetch:!1}),null==(e=r_(this,J))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),r_(this,z).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(r_(this,J)&&(r_(this,Q)?r_(this,J).cancel({revert:!0}):r_(this,J).cancelRetry()),this.scheduleGc()),r_(this,z).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||r$(this,W,nw).call(this,{type:"invalidate"})}async fetch(e,t){var r,n,i,a,s,o,l,u,c,d,f,h;if("idle"!==this.state.fetchStatus&&(null==(r=r_(this,J))?void 0:r.status())!=="rejected"){if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(r_(this,J))return r_(this,J).continueRetry(),r_(this,J).promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let p=new AbortController,m=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(rq(this,Q,!0),p.signal)})},g=()=>{let e=np(this.options,t),r=(()=>{let e={client:r_(this,K),queryKey:this.queryKey,meta:this.meta};return m(e),e})();return(rq(this,Q,!1),this.options.persister)?this.options.persister(e,r,this):e(r)},A=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:r_(this,K),state:this.state,fetchFn:g};return m(e),e})();null==(n=this.options.behavior)||n.onFetch(A,this),rq(this,j,this.state),("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(i=A.fetchOptions)?void 0:i.meta))&&r$(this,W,nw).call(this,{type:"fetch",meta:null==(a=A.fetchOptions)?void 0:a.meta}),rq(this,J,nS({initialPromise:null==t?void 0:t.initialPromise,fn:A.fetchFn,onCancel:e=>{e instanceof nC&&e.revert&&this.setState({...r_(this,j),fetchStatus:"idle"}),p.abort()},onFail:(e,t)=>{r$(this,W,nw).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{r$(this,W,nw).call(this,{type:"pause"})},onContinue:()=>{r$(this,W,nw).call(this,{type:"continue"})},retry:A.options.retry,retryDelay:A.options.retryDelay,networkMode:A.options.networkMode,canRun:()=>!0}));try{let e=await r_(this,J).start();if(void 0===e)throw Error("".concat(this.queryHash," data is undefined"));return this.setData(e),null==(s=(o=r_(this,z).config).onSuccess)||s.call(o,e,this),null==(l=(u=r_(this,z).config).onSettled)||l.call(u,e,this.state.error,this),e}catch(e){if(e instanceof nC){if(e.silent)return r_(this,J).promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw r$(this,W,nw).call(this,{type:"error",error:e}),null==(c=(d=r_(this,z).config).onError)||c.call(d,e,this),null==(f=(h=r_(this,z).config).onSettled)||f.call(h,this.state.data,e,this),e}finally{this.scheduleGc()}}constructor(e){var t;super(),r0(this,W),rY(this,k,{writable:!0,value:void 0}),rY(this,j,{writable:!0,value:void 0}),rY(this,z,{writable:!0,value:void 0}),rY(this,K,{writable:!0,value:void 0}),rY(this,J,{writable:!0,value:void 0}),rY(this,V,{writable:!0,value:void 0}),rY(this,Q,{writable:!0,value:void 0}),rq(this,Q,!1),rq(this,V,e.defaultOptions),this.setOptions(e.options),this.observers=[],rq(this,K,e.client),rq(this,z,r_(this,K).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,rq(this,k,nM(this.options)),this.state=null!=(t=e.state)?t:r_(this,k),this.scheduleGc()}});function nD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nB(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function nb(e,t){return{data:e,dataUpdatedAt:null!=t?t:Date.now(),error:null,isInvalidated:!1,status:"success"}}function nM(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function nw(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var r;return{...t,...nD(t.data,this.options),fetchMeta:null!=(r=e.meta)?r:null};case"success":let n={...t,...nb(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return rq(this,j,e.manual?n:void 0),n;case"error":let i=e.error;return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),ng.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),r_(this,z).notify({query:this,type:"updated",action:e})})}var nF=(X=new WeakMap,_=new WeakMap,Z=new WeakMap,Y=new WeakMap,q=new WeakMap,$=new WeakMap,ee=new WeakMap,et=new WeakMap,er=new WeakMap,en=new WeakMap,ei=new WeakMap,ea=new WeakMap,es=new WeakMap,eo=new WeakMap,el=new WeakMap,eu=new WeakSet,ec=new WeakSet,ed=new WeakSet,ef=new WeakSet,eh=new WeakSet,ep=new WeakSet,em=new WeakSet,ev=new WeakSet,eg=new WeakSet,class extends r1{bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(r_(this,_).addObserver(this),nR(r_(this,_),this.options)?r$(this,eu,nU).call(this):this.updateResult(),r$(this,eh,nN).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return nI(r_(this,_),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return nI(r_(this,_),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,r$(this,ep,nk).call(this),r$(this,em,nj).call(this),r_(this,_).removeObserver(this)}setOptions(e){let t=this.options,r=r_(this,_);if(this.options=r_(this,X).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof r7(this.options.enabled,r_(this,_)))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");r$(this,ev,nz).call(this),r_(this,_).setOptions(this.options),t._defaulted&&!ns(this.options,t)&&r_(this,X).getQueryCache().notify({type:"observerOptionsUpdated",query:r_(this,_),observer:this});let n=this.hasListeners();n&&nP(r_(this,_),r,this.options,t)&&r$(this,eu,nU).call(this),this.updateResult(),n&&(r_(this,_)!==r||r7(this.options.enabled,r_(this,_))!==r7(t.enabled,r_(this,_))||r6(this.options.staleTime,r_(this,_))!==r6(t.staleTime,r_(this,_)))&&r$(this,ec,nG).call(this);let i=r$(this,ed,nO).call(this);n&&(r_(this,_)!==r||r7(this.options.enabled,r_(this,_))!==r7(t.enabled,r_(this,_))||i!==r_(this,eo))&&r$(this,ef,nH).call(this,i)}getOptimisticResult(e){var t,r;let n=r_(this,X).getQueryCache().build(r_(this,X),e),i=this.createResult(n,e);return t=this,r=i,ns(t.getCurrentResult(),r)||(rq(this,Y,i),rq(this,$,this.options),rq(this,q,r_(this,_).state)),i}getCurrentResult(){return r_(this,Y)}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),null==t||t(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==r_(this,ee).status||r_(this,ee).reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){r_(this,el).add(e)}getCurrentQuery(){return r_(this,_)}refetch(){let{...e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.fetch({...e})}fetchOptimistic(e){let t=r_(this,X).defaultQueryOptions(e),r=r_(this,X).getQueryCache().build(r_(this,X),t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){var t;return r$(this,eu,nU).call(this,{...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then(()=>(this.updateResult(),r_(this,Y)))}createResult(e,t){let r,n=r_(this,_),i=this.options,a=r_(this,Y),s=r_(this,q),o=r_(this,$),l=e!==n?e.state:r_(this,Z),{state:u}=e,c={...u},d=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&nR(e,t),s=r&&nP(e,n,t,i);(a||s)&&(c={...c,...nD(u.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:f,errorUpdatedAt:h,status:p}=c;r=c.data;let m=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===p){let e;if((null==a?void 0:a.isPlaceholderData)&&t.placeholderData===(null==o?void 0:o.placeholderData))e=a.data,m=!0;else{var g;e="function"==typeof t.placeholderData?t.placeholderData(null==(g=r_(this,ei))?void 0:g.state.data,r_(this,ei)):t.placeholderData}void 0!==e&&(p="success",r=nc(null==a?void 0:a.data,e,t),d=!0)}if(t.select&&void 0!==r&&!m)if(a&&r===(null==s?void 0:s.data)&&t.select===r_(this,er))r=r_(this,en);else try{rq(this,er,t.select),r=t.select(r),r=nc(null==a?void 0:a.data,r,t),rq(this,en,r),rq(this,et,null)}catch(e){rq(this,et,e)}r_(this,et)&&(f=r_(this,et),r=r_(this,en),h=Date.now(),p="error");let A="fetching"===c.fetchStatus,y="pending"===p,x="error"===p,B=y&&A,C=void 0!==r,S={status:p,fetchStatus:c.fetchStatus,isPending:y,isSuccess:"success"===p,isError:x,isInitialLoading:B,isLoading:B,data:r,dataUpdatedAt:c.dataUpdatedAt,error:f,errorUpdatedAt:h,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:A,isRefetching:A&&!y,isLoadingError:x&&!C,isPaused:"paused"===c.fetchStatus,isPlaceholderData:d,isRefetchError:x&&C,isStale:nL(e,t),refetch:this.refetch,promise:r_(this,ee),isEnabled:!1!==r7(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===S.status?e.reject(S.error):void 0!==S.data&&e.resolve(S.data)},r=()=>{t(rq(this,ee,S.promise=ny()))},i=r_(this,ee);switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":("error"===S.status||S.data!==i.value)&&r();break;case"rejected":("error"!==S.status||S.error!==i.reason)&&r()}}return S}updateResult(){let e=r_(this,Y),t=this.createResult(r_(this,_),this.options);if(rq(this,q,r_(this,_).state),rq(this,$,this.options),void 0!==r_(this,q).data&&rq(this,ei,r_(this,_)),ns(t,e))return;rq(this,Y,t);let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!r_(this,el).size)return!0;let n=new Set(null!=r?r:r_(this,el));return this.options.throwOnError&&n.add("error"),Object.keys(r_(this,Y)).some(t=>r_(this,Y)[t]!==e[t]&&n.has(t))};r$(this,eg,nK).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&r$(this,eh,nN).call(this)}constructor(e,t){super(),r0(this,eu),r0(this,ec),r0(this,ed),r0(this,ef),r0(this,eh),r0(this,ep),r0(this,em),r0(this,ev),r0(this,eg),rY(this,X,{writable:!0,value:void 0}),rY(this,_,{writable:!0,value:void 0}),rY(this,Z,{writable:!0,value:void 0}),rY(this,Y,{writable:!0,value:void 0}),rY(this,q,{writable:!0,value:void 0}),rY(this,$,{writable:!0,value:void 0}),rY(this,ee,{writable:!0,value:void 0}),rY(this,et,{writable:!0,value:void 0}),rY(this,er,{writable:!0,value:void 0}),rY(this,en,{writable:!0,value:void 0}),rY(this,ei,{writable:!0,value:void 0}),rY(this,ea,{writable:!0,value:void 0}),rY(this,es,{writable:!0,value:void 0}),rY(this,eo,{writable:!0,value:void 0}),rY(this,el,{writable:!0,value:new Set}),this.options=t,rq(this,X,e),rq(this,et,null),rq(this,ee,ny()),this.bindMethods(),this.setOptions(t)}});function nR(e,t){return!1!==r7(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&nI(e,t,t.refetchOnMount)}function nI(e,t,r){if(!1!==r7(t.enabled,e)&&"static"!==r6(t.staleTime,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&nL(e,t)}return!1}function nP(e,t,r,n){return(e!==t||!1===r7(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&nL(e,r)}function nL(e,t){return!1!==r7(t.enabled,e)&&e.isStaleByTime(r6(t.staleTime,e))}function nU(e){r$(this,ev,nz).call(this);let t=r_(this,_).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(r4)),t}function nG(){r$(this,ep,nk).call(this);let e=r6(this.options.staleTime,r_(this,_));if(r3||r_(this,Y).isStale||!r8(e))return;let t=r5(r_(this,Y).dataUpdatedAt,e);rq(this,ea,r9.setTimeout(()=>{r_(this,Y).isStale||this.updateResult()},t+1))}function nO(){var e;return null!=(e="function"==typeof this.options.refetchInterval?this.options.refetchInterval(r_(this,_)):this.options.refetchInterval)&&e}function nH(e){r$(this,em,nj).call(this),rq(this,eo,e),!r3&&!1!==r7(this.options.enabled,r_(this,_))&&r8(r_(this,eo))&&0!==r_(this,eo)&&rq(this,es,r9.setInterval(()=>{(this.options.refetchIntervalInBackground||nm.isFocused())&&r$(this,eu,nU).call(this)},r_(this,eo)))}function nN(){r$(this,ec,nG).call(this),r$(this,ef,nH).call(this,r$(this,ed,nO).call(this))}function nk(){r_(this,ea)&&(r9.clearTimeout(r_(this,ea)),rq(this,ea,void 0))}function nj(){r_(this,es)&&(r9.clearInterval(r_(this,es)),rq(this,es,void 0))}function nz(){let e=r_(this,X).getQueryCache().build(r_(this,X),this.options);if(e===r_(this,_))return;let t=r_(this,_);rq(this,_,e),rq(this,Z,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}function nK(e){ng.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(r_(this,Y))}),r_(this,X).getQueryCache().notify({query:r_(this,_),type:"observerResultsUpdated"})})}var nJ=eG.createContext(void 0),nV=e=>{let{client:t,children:r}=e;return eG.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,eU.jsx)(nJ.Provider,{value:t,children:r})},nQ=eG.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),nW=eG.createContext(!1);nW.Provider;var nX=(e,t)=>void 0===t.state.data,n_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function nZ(e,t,r){var n,i,a,s,o;let l=eG.useContext(nW),u=eG.useContext(nQ),c=(e=>{let t=eG.useContext(nJ);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t})(r),d=c.defaultQueryOptions(e);if(null==(i=c.getDefaultOptions().queries)||null==(n=i._experimental_beforeQuery)||n.call(i,d),d._optimisticResults=l?"isRestoring":"optimistic",d.suspense){let e=e=>"static"===e?e:Math.max(null!=e?e:1e3,1e3),t=d.staleTime;d.staleTime="function"==typeof t?function(){for(var r=arguments.length,n=Array(r),i=0;i{u.clearReset()},[u]);let f=!c.getQueryCache().get(d.queryHash),[h]=eG.useState(()=>new t(c,d)),p=h.getOptimisticResult(d),m=!l&&!1!==e.subscribed;if(eG.useSyncExternalStore(eG.useCallback(e=>{let t=m?h.subscribe(ng.batchCalls(e)):r4;return h.updateResult(),t},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),eG.useEffect(()=>{h.setOptions(d)},[d,h]),(null==d?void 0:d.suspense)&&p.isPending)throw n_(d,h,u);if((e=>{var t,r;let{result:n,errorResetBoundary:i,throwOnError:a,query:s,suspense:o}=e;return n.isError&&!i.isReset()&&!n.isFetching&&s&&(o&&void 0===n.data||(t=a,r=[n.error,s],"function"==typeof t?t(...r):!!t))})({result:p,errorResetBoundary:u,throwOnError:d.throwOnError,query:c.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw p.error;if(null==(s=c.getDefaultOptions().queries)||null==(a=s._experimental_afterQuery)||a.call(s,d,p),d.experimental_prefetchInRender&&!r3&&p.isLoading&&p.isFetching&&!l){let e=f?n_(d,h,u):null==(o=c.getQueryCache().get(d.queryHash))?void 0:o.promise;null==e||e.catch(r4).finally(()=>{h.updateResult()})}return d.notifyOnChangeProps?p:h.trackResult(p)}var nY=e.i(54970),nq=e.i(12979),n$=e.i(47071),n0=e.i(62395),n1=e.i(75567),n2=e.i(79123);function n9(e){let{displacementMap:t,visibilityMask:r,textureNames:n,alphaMaps:i}=e,{debugMode:a}=(0,n2.useDebug)(),s=(0,n$.useTexture)(n.map(e=>(0,nq.terrainTextureToUrl)(e)),e=>{e.forEach(e=>(0,n1.setupColor)(e))}),o=(0,eG.useMemo)(()=>i.map(e=>(0,n1.setupMask)(e)),[i]),l=(0,eG.useMemo)(()=>({0:32,1:32,2:32,3:32,4:32,5:32}),[]),u=(0,eG.useCallback)(e=>{(0,n1.updateTerrainTextureShader)({shader:e,baseTextures:s,alphaTextures:o,visibilityMask:r,tiling:l,debugMode:a})},[s,o,r,l,a]);return(0,eU.jsx)("meshStandardMaterial",{displacementMap:t,map:t,displacementScale:2048,depthWrite:!0,side:a?ek.DoubleSide:ek.FrontSide,onBeforeCompile:u},"".concat(JSON.stringify(l),"-").concat(a))}function n3(e){let{heightMap:t,textureNames:r,alphaMaps:n,emptySquares:i}=e,a=(0,eG.useMemo)(()=>{let e=function(e){let t=new Float32Array(e.length);for(let r=0;r{if(!i.length)return null;let e=new Uint8Array(65536);for(let t of(e.fill(255),i)){let r=255&t,n=t>>8&255,i=t>>16;for(let t=0;t=0&&i{let e=(0,n0.getProperty)(r,"emptySquares");return e?e.split(" ").map(e=>parseInt(e,10)):[]},[r]),s=(0,eG.useMemo)(()=>{let[e,t,n]=(0,n0.getPosition)(r);return[e,0,n]},[r]),o=(0,eG.useMemo)(()=>(0,n0.getRotation)(r),[r]),l=(0,eG.useMemo)(()=>(0,n0.getScale)(r),[r]),u=(0,eG.useMemo)(()=>{let e=256*i,t=new ek.PlaneGeometry(e,e,256,256);return t.rotateX(-Math.PI/2),t.rotateY(-Math.PI/2),t.translate(1024,0,1024),t},[i]),{data:c}=nZ({queryKey:["terrain",n],queryFn:()=>(0,nq.loadTerrain)(n)},nF,void 0);return(0,eU.jsx)("group",{position:s,quaternion:o,scale:l,children:(0,eU.jsx)("mesh",{geometry:u,receiveShadow:!0,castShadow:!0,children:c?(0,eU.jsx)(n3,{heightMap:c.heightMap,emptySquares:a,textureNames:c.textureNames,alphaMaps:c.alphaMaps}):null})})}),n8=(0,eG.createContext)(null);function n5(){return(0,eG.useContext)(n8)}var n6=eG;let n7=(0,n6.createContext)(null),ie={didCatch:!1,error:null};class it extends n6.Component{static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,r,n=arguments.length,i=Array(n),a=0;a0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,n)){var i,a;null==(i=(a=this.props).onReset)||i.call(a,{next:n,prev:e.resetKeys,reason:"keys"}),this.setState(ie)}}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:n}=this.props,{didCatch:i,error:a}=this.state,s=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)s=t(e);else if(r)s=(0,n6.createElement)(r,e);else if(void 0!==n)s=n;else throw a}return(0,n6.createElement)(n7.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=ie}}var ir=e.i(31067),ii=ek;function ia(e,t){if(t===ek.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t!==ek.TriangleFanDrawMode&&t!==ek.TriangleStripDrawMode)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e;{let r=e.getIndex();if(null===r){let t=[],n=e.getAttribute("position");if(void 0===n)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e=2.0 are supported."));return}let o=new i1(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});o.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e=0&&void 0===s[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}o.setExtensions(a),o.setPlugins(s),o.parse(r,n)}parseAsync(e,t){let r=this;return new Promise(function(n,i){r.parse(e,t,n,i)})}constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new ig(e)}),this.register(function(e){return new iA(e)}),this.register(function(e){return new ib(e)}),this.register(function(e){return new iM(e)}),this.register(function(e){return new iw(e)}),this.register(function(e){return new ix(e)}),this.register(function(e){return new iB(e)}),this.register(function(e){return new iC(e)}),this.register(function(e){return new iS(e)}),this.register(function(e){return new iv(e)}),this.register(function(e){return new iE(e)}),this.register(function(e){return new iy(e)}),this.register(function(e){return new iD(e)}),this.register(function(e){return new iT(e)}),this.register(function(e){return new ip(e)}),this.register(function(e){return new iF(e)}),this.register(function(e){return new iR(e)})}}function id(){let e={};return{get:function(t){return e[t]},add:function(t,r){e[t]=r},remove:function(t){delete e[t]},removeAll:function(){e={}}}}let ih={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ip{_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let r=0,n=t.length;r=0))return null;else throw Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return t.loadTextureImage(e,i.source,a)}constructor(e){this.parser=e,this.name=ih.KHR_TEXTURE_BASISU}}class iM{loadTexture(e){let t=this.name,r=this.parser,n=r.json,i=n.textures[e];if(!i.extensions||!i.extensions[t])return null;let a=i.extensions[t],s=n.images[a.source],o=r.textureLoader;if(s.uri){let e=r.options.manager.getHandler(s.uri);null!==e&&(o=e)}return this.detectSupport().then(function(i){if(i)return r.loadTextureImage(e,a.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(t)>=0)throw Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){let t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}constructor(e){this.parser=e,this.name=ih.EXT_TEXTURE_WEBP,this.isSupported=null}}class iw{loadTexture(e){let t=this.name,r=this.parser,n=r.json,i=n.textures[e];if(!i.extensions||!i.extensions[t])return null;let a=i.extensions[t],s=n.images[a.source],o=r.textureLoader;if(s.uri){let e=r.options.manager.getHandler(s.uri);null!==e&&(o=e)}return this.detectSupport().then(function(i){if(i)return r.loadTextureImage(e,a.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(t)>=0)throw Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){let t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}constructor(e){this.parser=e,this.name=ih.EXT_TEXTURE_AVIF,this.isSupported=null}}class iF{loadBufferView(e){let t=this.parser.json,r=t.bufferViews[e];if(!r.extensions||!r.extensions[this.name])return null;{let e=r.extensions[this.name],n=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported)if(!(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0))return null;else throw Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return n.then(function(t){let r=e.byteOffset||0,n=e.byteLength||0,a=e.count,s=e.byteStride,o=new Uint8Array(t,r,n);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(a,s,o,e.mode,e.filter).then(function(e){return e.buffer}):i.ready.then(function(){let t=new ArrayBuffer(a*s);return i.decodeGltfBuffer(new Uint8Array(t),a,s,o,e.mode,e.filter),t})})}}constructor(e){this.name=ih.EXT_MESHOPT_COMPRESSION,this.parser=e}}class iR{createNodeMesh(e){let t=this.parser.json,r=t.nodes[e];if(!r.extensions||!r.extensions[this.name]||void 0===r.mesh)return null;for(let e of t.meshes[r.mesh].primitives)if(e.mode!==ij.TRIANGLES&&e.mode!==ij.TRIANGLE_STRIP&&e.mode!==ij.TRIANGLE_FAN&&void 0!==e.mode)return null;let n=r.extensions[this.name].attributes,i=[],a={};for(let e in n)i.push(this.parser.getDependency("accessor",n[e]).then(t=>(a[e]=t,a[e])));return i.length<1?null:(i.push(this.parser.createNodeMesh(e)),Promise.all(i).then(e=>{let t=e.pop(),r=t.isGroup?t.children:[t],n=e[0].count,i=[];for(let e of r){let t=new ii.Matrix4,r=new ii.Vector3,s=new ii.Quaternion,o=new ii.Vector3(1,1,1),l=new ii.InstancedMesh(e.geometry,e.material,n);for(let e=0;e=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},iW={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},iX={CUBICSPLINE:void 0,LINEAR:ii.InterpolateLinear,STEP:ii.InterpolateDiscrete},i_={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function iZ(e,t,r){for(let n in r.extensions)void 0===e[n]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[n]=r.extensions[n])}function iY(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function iq(e){let t="",r=Object.keys(e).sort();for(let n=0,i=r.length;n{let r=this.associations.get(e);for(let[n,a]of(null!=r&&this.associations.set(t,r),e.children.entries()))i(a,t.children[n])};return i(r,n),n.name+="_instance_"+e.uses[t]++,n}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let r=0;r=2&&a.setY(t,d[e*o+1]),o>=3&&a.setZ(t,d[e*o+2]),o>=4&&a.setW(t,d[e*o+3]),o>=5)throw Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return a})}loadTexture(e){let t=this.json,r=this.options,n=t.textures[e].source,i=t.images[n],a=this.textureLoader;if(i.uri){let e=r.manager.getHandler(i.uri);null!==e&&(a=e)}return this.loadTextureImage(e,n,a)}loadTextureImage(e,t,r){let n=this,i=this.json,a=i.textures[e],s=i.images[t],o=(s.uri||s.bufferView)+":"+a.sampler;if(this.textureCache[o])return this.textureCache[o];let l=this.loadImageSource(t,r).then(function(t){t.flipY=!1,t.name=a.name||s.name||"",""===t.name&&"string"==typeof s.uri&&!1===s.uri.startsWith("data:image/")&&(t.name=s.uri);let r=(i.samplers||{})[a.sampler]||{};return t.magFilter=iK[r.magFilter]||ii.LinearFilter,t.minFilter=iK[r.minFilter]||ii.LinearMipmapLinearFilter,t.wrapS=iJ[r.wrapS]||ii.RepeatWrapping,t.wrapT=iJ[r.wrapT]||ii.RepeatWrapping,n.associations.set(t,{textures:e}),t}).catch(function(){return null});return this.textureCache[o]=l,l}loadImageSource(e,t){let r=this.json,n=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(e=>e.clone());let i=r.images[e],a=self.URL||self.webkitURL,s=i.uri||"",o=!1;if(void 0!==i.bufferView)s=this.getDependency("bufferView",i.bufferView).then(function(e){o=!0;let t=new Blob([e],{type:i.mimeType});return s=a.createObjectURL(t)});else if(void 0===i.uri)throw Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");let l=Promise.resolve(s).then(function(e){return new Promise(function(r,i){let a=r;!0===t.isImageBitmapLoader&&(a=function(e){let t=new ii.Texture(e);t.needsUpdate=!0,r(t)}),t.load(ii.LoaderUtils.resolveURL(e,n.path),a,void 0,i)})}).then(function(e){var t;return!0===o&&a.revokeObjectURL(s),iY(e,i),e.userData.mimeType=i.mimeType||((t=i.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e}).catch(function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",s),e});return this.sourceCache[e]=l,l}assignTexture(e,t,r,n){let i=this;return this.getDependency("texture",r.index).then(function(a){if(!a)return null;if(void 0!==r.texCoord&&r.texCoord>0&&((a=a.clone()).channel=r.texCoord),i.extensions[ih.KHR_TEXTURE_TRANSFORM]){let e=void 0!==r.extensions?r.extensions[ih.KHR_TEXTURE_TRANSFORM]:void 0;if(e){let t=i.associations.get(a);a=i.extensions[ih.KHR_TEXTURE_TRANSFORM].extendTexture(a,e),i.associations.set(a,t)}}return void 0!==n&&("number"==typeof n&&(n=3001===n?il:iu),"colorSpace"in a?a.colorSpace=n:a.encoding=n===il?3001:3e3),e[t]=a,a})}assignFinalMaterial(e){let t=e.geometry,r=e.material,n=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,a=void 0===t.attributes.normal;if(e.isPoints){let e="PointsMaterial:"+r.uuid,t=this.cache.get(e);t||(t=new ii.PointsMaterial,ii.Material.prototype.copy.call(t,r),t.color.copy(r.color),t.map=r.map,t.sizeAttenuation=!1,this.cache.add(e,t)),r=t}else if(e.isLine){let e="LineBasicMaterial:"+r.uuid,t=this.cache.get(e);t||(t=new ii.LineBasicMaterial,ii.Material.prototype.copy.call(t,r),t.color.copy(r.color),t.map=r.map,this.cache.add(e,t)),r=t}if(n||i||a){let e="ClonedMaterial:"+r.uuid+":";n&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),a&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=r.clone(),i&&(t.vertexColors=!0),a&&(t.flatShading=!0),n&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(r))),r=t}e.material=r}getMaterialType(){return ii.MeshStandardMaterial}loadMaterial(e){let t,r=this,n=this.json,i=this.extensions,a=n.materials[e],s={},o=a.extensions||{},l=[];if(o[ih.KHR_MATERIALS_UNLIT]){let e=i[ih.KHR_MATERIALS_UNLIT];t=e.getMaterialType(),l.push(e.extendParams(s,a,r))}else{let n=a.pbrMetallicRoughness||{};if(s.color=new ii.Color(1,1,1),s.opacity=1,Array.isArray(n.baseColorFactor)){let e=n.baseColorFactor;s.color.setRGB(e[0],e[1],e[2],iu),s.opacity=e[3]}void 0!==n.baseColorTexture&&l.push(r.assignTexture(s,"map",n.baseColorTexture,il)),s.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,s.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(l.push(r.assignTexture(s,"metalnessMap",n.metallicRoughnessTexture)),l.push(r.assignTexture(s,"roughnessMap",n.metallicRoughnessTexture))),t=this._invokeOne(function(t){return t.getMaterialType&&t.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)})))}!0===a.doubleSided&&(s.side=ii.DoubleSide);let u=a.alphaMode||i_.OPAQUE;if(u===i_.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,u===i_.MASK&&(s.alphaTest=void 0!==a.alphaCutoff?a.alphaCutoff:.5)),void 0!==a.normalTexture&&t!==ii.MeshBasicMaterial&&(l.push(r.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new ii.Vector2(1,1),void 0!==a.normalTexture.scale)){let e=a.normalTexture.scale;s.normalScale.set(e,e)}if(void 0!==a.occlusionTexture&&t!==ii.MeshBasicMaterial&&(l.push(r.assignTexture(s,"aoMap",a.occlusionTexture)),void 0!==a.occlusionTexture.strength&&(s.aoMapIntensity=a.occlusionTexture.strength)),void 0!==a.emissiveFactor&&t!==ii.MeshBasicMaterial){let e=a.emissiveFactor;s.emissive=new ii.Color().setRGB(e[0],e[1],e[2],iu)}return void 0!==a.emissiveTexture&&t!==ii.MeshBasicMaterial&&l.push(r.assignTexture(s,"emissiveMap",a.emissiveTexture,il)),Promise.all(l).then(function(){let n=new t(s);return a.name&&(n.name=a.name),iY(n,a),r.associations.set(n,{materials:e}),a.extensions&&iZ(i,n,a),n})}createUniqueName(e){let t=ii.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){let t=this,r=this.extensions,n=this.primitiveCache,i=[];for(let a=0,s=e.length;a0&&function(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let r=0,n=t.weights.length;r1?new ii.Group:1===t.length?t[0]:new ii.Object3D)!==t[0])for(let e=0,r=t.length;e{let t=new Map;for(let[e,r]of n.associations)(e instanceof ii.Material||e instanceof ii.Texture)&&t.set(e,r);return e.traverse(e=>{let r=n.associations.get(e);null!=r&&t.set(e,r)}),t})(i),i})}_createAnimationTracks(e,t,r,n,i){let a,s=[],o=e.name?e.name:e.uuid,l=[];switch(iW[i.path]===iW.weights?e.traverse(function(e){e.morphTargetInfluences&&l.push(e.name?e.name:e.uuid)}):l.push(o),iW[i.path]){case iW.weights:a=ii.NumberKeyframeTrack;break;case iW.rotation:a=ii.QuaternionKeyframeTrack;break;case iW.position:case iW.scale:a=ii.VectorKeyframeTrack;break;default:a=1===r.itemSize?ii.NumberKeyframeTrack:ii.VectorKeyframeTrack}let u=void 0!==n.interpolation?iX[n.interpolation]:ii.InterpolateLinear,c=this._getArrayFromAccessor(r);for(let e=0,r=l.length;e-1)?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||r||n&&i<98?this.textureLoader=new ii.TextureLoader(this.options.manager):this.textureLoader=new ii.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ii.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}}function i2(e,t,r){let n=t.attributes,i=[];for(let t in n){let a=iQ[t]||t.toLowerCase();a in e.attributes||i.push(function(t,n){return r.getDependency("accessor",t).then(function(t){e.setAttribute(n,t)})}(n[t],a))}if(void 0!==t.indices&&!e.index){let n=r.getDependency("accessor",t.indices).then(function(t){e.setIndex(t)});i.push(n)}return iY(e,t),!function(e,t,r){let n=t.attributes,i=new ii.Box3;if(void 0===n.POSITION)return;{let e=r.json.accessors[n.POSITION],t=e.min,a=e.max;if(void 0===t||void 0===a)return console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new ii.Vector3(t[0],t[1],t[2]),new ii.Vector3(a[0],a[1],a[2])),e.normalized){let t=i$(iz[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}let a=t.targets;if(void 0!==a){let e=new ii.Vector3,t=new ii.Vector3;for(let n=0,i=a.length;n{let r={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,r).then(t).catch(n)},r,n)}decodeDracoFile(e,t,r,n){let i={attributeIDs:r||this.defaultAttributeIDs,attributeTypes:n||this.defaultAttributeTypes,useUniqueIDs:!!r};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){let r;for(let e in t.attributeTypes){let r=t.attributeTypes[e];void 0!==r.BYTES_PER_ELEMENT&&(t.attributeTypes[e]=r.name)}let n=JSON.stringify(t);if(i3.has(e)){let t=i3.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let i=this.workerNextTaskID++,a=e.byteLength,s=this._getWorker(i,a).then(n=>(r=n,new Promise((n,a)=>{r._callbacks[i]={resolve:n,reject:a},r.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return s.catch(()=>!0).then(()=>{r&&i&&this._releaseTask(r,i)}),i3.set(e,{key:n,promise:s}),s}_createGeometry(e){let t=new i9.BufferGeometry;e.index&&t.setIndex(new i9.BufferAttribute(e.index.array,1));for(let r=0;r{r.load(e,t,void 0,n)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;let e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(t=>{let r=t[0];e||(this.decoderConfig.wasmBinary=t[1]);let n=i8.toString(),i=["/* draco decoder */",r,"\n/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.lengtht._taskLoad?-1:1});let r=this.workerPool[this.workerPool.length-1];return r._taskCosts[e]=t,r._taskLoad+=t,r})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e{let t=e.draco,r=new t.Decoder,s=new t.DecoderBuffer;s.Init(new Int8Array(i),i.byteLength);try{let e=function(e,t,r,n){let i,a,s=n.attributeIDs,o=n.attributeTypes,l=t.GetEncodedGeometryType(r);if(l===e.TRIANGULAR_MESH)i=new e.Mesh,a=t.DecodeBufferToMesh(r,i);else if(l===e.POINT_CLOUD)i=new e.PointCloud,a=t.DecodeBufferToPointCloud(r,i);else throw Error("THREE.DRACOLoader: Unexpected geometry type.");if(!a.ok()||0===i.ptr)throw Error("THREE.DRACOLoader: Decoding failed: "+a.error_msg());let u={index:null,attributes:[]};for(let r in s){let a,l,c=self[o[r]];if(n.useUniqueIDs)l=s[r],a=t.GetAttributeByUniqueId(i,l);else{if(-1===(l=t.GetAttributeId(i,e[s[r]])))continue;a=t.GetAttribute(i,l)}u.attributes.push(function(e,t,r,n,i,a){let s=a.num_components(),o=r.num_points()*s,l=o*i.BYTES_PER_ELEMENT,u=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),c=e._malloc(l);t.GetAttributeDataArrayForAllPoints(r,a,u,l,c);let d=new i(e.HEAPF32.buffer,c,o).slice();return e._free(c),{name:n,array:d,itemSize:s}}(e,t,i,r,c,a))}return l===e.TRIANGULAR_MESH&&(u.index=function(e,t,r){let n=3*r.num_faces(),i=4*n,a=e._malloc(i);t.GetTrianglesUInt32Array(r,i,a);let s=new Uint32Array(e.HEAPF32.buffer,a,n).slice();return e._free(a),{array:s,itemSize:1}}(e,t,i)),e.destroy(i),u}(t,r,s,a),i=e.attributes.map(e=>e.array.buffer);e.index&&i.push(e.index.array.buffer),self.postMessage({type:"decode",id:n.id,geometry:e},i)}catch(e){console.error(e),self.postMessage({type:"error",id:n.id,error:e.message})}finally{t.destroy(s),t.destroy(r)}})}}}let i5={clone:function(e){let t=new Map,r=new Map,n=e.clone();return function e(t,r,n){n(t,r);for(let i=0;i{let{isChild:r=!1,object:n,children:i,deep:a,castShadow:s,receiveShadow:o,inject:l,keys:u,...c}=e,d={keys:u,deep:a,inject:l,castShadow:s,receiveShadow:o};if(Array.isArray(n=eG.useMemo(()=>{if(!1===r&&!Array.isArray(n)){let e=!1;if(n.traverse(t=>{t.isSkinnedMesh&&(e=!0)}),e)return i5.clone(n)}return n},[n,r])))return eG.createElement("group",(0,ir.default)({},c,{ref:t}),n.map(e=>eG.createElement(i6,(0,ir.default)({key:e.uuid,object:e},d))),i);let{children:f,...h}=function(e,t){let{keys:r=["near","far","color","distance","decay","penumbra","angle","intensity","skeleton","visible","castShadow","receiveShadow","morphTargetDictionary","morphTargetInfluences","name","geometry","material","position","rotation","scale","up","userData","bindMode","bindMatrix","bindMatrixInverse","skeleton"],deep:n,inject:i,castShadow:a,receiveShadow:s}=t,o={};for(let t of r)o[t]=e[t];return n&&(o.geometry&&"materialsOnly"!==n&&(o.geometry=o.geometry.clone()),o.material&&"geometriesOnly"!==n&&(o.material=o.material.clone())),i&&(o="function"==typeof i?{...o,children:i(e)}:eG.isValidElement(i)?{...o,children:i}:{...o,...i}),e instanceof ek.Mesh&&(a&&(o.castShadow=!0),s&&(o.receiveShadow=!0)),o}(n,d),p=n.type[0].toLowerCase()+n.type.slice(1);return eG.createElement(p,(0,ir.default)({},h,c,{ref:t}),n.children.map(e=>"Bone"===e.type?eG.createElement("primitive",(0,ir.default)({key:e.uuid,object:e},d)):eG.createElement(i6,(0,ir.default)({key:e.uuid,object:e},d,{isChild:!0}))),i,f)}),i7=null,ae="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function at(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=arguments.length>2?arguments[2]:void 0;return i=>{n&&n(i),e&&(i7||(i7=new i4),i7.setDecoderPath("string"==typeof e?e:ae),i.setDRACOLoader(i7)),r&&i.setMeshoptDecoder((()=>{let e;if(t)return t;let r=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!1};let i="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQB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/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");let a=WebAssembly.instantiate(function(e){let t=new Uint8Array(e.length);for(let r=0;r96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}let r=0;for(let i=0;i{(e=t.instance).exports.__wasm_call_ctors()});function s(t,r,n,i,a,s){let o=e.exports.sbrk,l=n+3&-4,u=o(l*i),c=o(a.length),d=new Uint8Array(e.exports.memory.buffer);d.set(a,c);let f=t(u,n,i,c,a.length);if(0===f&&s&&s(u,l,i),r.set(d.subarray(u,u+n*i)),o(u-o(0)),0!==f)throw Error("Malformed buffer data: ".concat(f))}let o={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},l={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return t={ready:a,supported:!0,decodeVertexBuffer(t,r,n,i,a){s(e.exports.meshopt_decodeVertexBuffer,t,r,n,i,e.exports[o[a]])},decodeIndexBuffer(t,r,n,i){s(e.exports.meshopt_decodeIndexBuffer,t,r,n,i)},decodeIndexSequence(t,r,n,i){s(e.exports.meshopt_decodeIndexSequence,t,r,n,i)},decodeGltfBuffer(t,r,n,i,a,u){s(e.exports[l[a]],t,r,n,i,e.exports[o[u]])}}})())}}let ar=(e,t,r,n)=>(0,e_.useLoader)(ic,e,at(t,r,n));ar.preload=(e,t,r,n)=>e_.useLoader.preload(ic,e,at(t,r,n)),ar.clear=e=>e_.useLoader.clear(ic,e),ar.setDecoderPath=e=>{ae=e};var an=e.i(89887);function ai(e){let{materialName:t}=e,r=(0,nq.textureToUrl)(t),n=(0,n$.useTexture)(r,e=>(0,n1.setupColor)(e));return(0,eU.jsx)("meshStandardMaterial",{map:n,side:2})}function aa(e){let{node:t}=e;return(0,eU.jsx)("mesh",{geometry:t.geometry,castShadow:!0,receiveShadow:!0,children:t.material?(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)("meshStandardMaterial",{color:"yellow",wireframe:!0}),children:Array.isArray(t.material)?t.material.map((e,t)=>(0,eU.jsx)(ai,{materialName:e.userData.resource_path},t)):(0,eU.jsx)(ai,{materialName:t.material.userData.resource_path})}):null})}let as=(0,eG.memo)(e=>{let{interiorFile:t}=e,{nodes:r}=ar((0,nq.interiorToUrl)(t)),{debugMode:n}=(0,n2.useDebug)();return(0,eU.jsxs)("group",{rotation:[0,-Math.PI/2,0],children:[Object.entries(r).filter(e=>{let[t,r]=e;return!r.material||!r.material.name.match(/\.\d+$/)}).map(e=>{let[t,r]=e;return(0,eU.jsx)(aa,{node:r},t)}),n?(0,eU.jsx)(an.FloatingLabel,{children:t}):null]})});function ao(e){let{color:t,label:r}=e;return(0,eU.jsxs)("mesh",{children:[(0,eU.jsx)("boxGeometry",{args:[10,10,10]}),(0,eU.jsx)("meshStandardMaterial",{color:t,wireframe:!0}),r?(0,eU.jsx)(an.FloatingLabel,{color:t,children:r}):null]})}function al(e){let{label:t}=e,{debugMode:r}=(0,n2.useDebug)();return r?(0,eU.jsx)(ao,{color:"red",label:t}):null}let au=(0,eG.memo)(function(e){let{object:t}=e,r=(0,n0.getProperty)(t,"interiorFile"),n=(0,eG.useMemo)(()=>(0,n0.getPosition)(t),[t]),i=(0,eG.useMemo)(()=>(0,n0.getScale)(t),[t]),a=(0,eG.useMemo)(()=>(0,n0.getRotation)(t),[t]);return(0,eU.jsx)("group",{position:n,quaternion:a,scale:i,children:(0,eU.jsx)(it,{fallback:(0,eU.jsx)(al,{label:r}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(ao,{color:"orange"}),children:(0,eU.jsx)(as,{interiorFile:r})})})})});function ac(e,t){let{path:r}=t,[n]=(0,e_.useLoader)(ek.CubeTextureLoader,[e],e=>e.setPath(r));return n}ac.preload=(e,t)=>{let{path:r}=t;return e_.useLoader.preload(ek.CubeTextureLoader,[e],e=>e.setPath(r))};function ad(e){return e.wrapS=ek.RepeatWrapping,e.wrapT=ek.RepeatWrapping,e.minFilter=ek.LinearFilter,e.magFilter=ek.LinearFilter,e.colorSpace=ek.SRGBColorSpace,e.needsUpdate=!0,e}function af(e){let{textureUrl:t,radius:r,heightPercent:n,speed:i,windDirection:a,layerIndex:s,debugMode:o,animationEnabled:l}=e,u=(0,eG.useRef)(null),c=(0,eG.useRef)(new ek.Vector2(0,0)),d=(0,n$.useTexture)(t,ad),f=(0,eG.useMemo)(()=>{let e=n-.05;return function(e,t,r,n){let i=new ek.BufferGeometry,a=new Float32Array(75),s=new Float32Array(50),o=[.05,.05,.05,.05,.05,.05,r,r,r,.05,.05,r,t,r,.05,.05,r,r,r,.05,.05,.05,.05,.05,.05],l=2*e/4;for(let t=0;t<5;t++)for(let r=0;r<5;r++){let n=5*t+r,i=-e+r*l,u=e-t*l,c=e*o[n];a[3*n]=i,a[3*n+1]=c,a[3*n+2]=u,s[2*n]=r/4,s[2*n+1]=t/4}!function(e){let t=t=>({x:e[3*t],y:e[3*t+1],z:e[3*t+2]}),r=(t,r,n,i)=>{e[3*t]=r,e[3*t+1]=n,e[3*t+2]=i},n=t(1),i=t(3),a=t(5),s=t(6),o=t(8),l=t(9),u=t(15),c=t(16),d=t(18),f=t(19),h=t(21),p=t(23),m=a.x+(n.x-a.x)*.5,g=a.y+(n.y-a.y)*.5,A=a.z+(n.z-a.z)*.5;r(0,s.x+(m-s.x)*2,s.y+(g-s.y)*2,s.z+(A-s.z)*2),m=l.x+(i.x-l.x)*.5,g=l.y+(i.y-l.y)*.5,A=l.z+(i.z-l.z)*.5,r(4,o.x+(m-o.x)*2,o.y+(g-o.y)*2,o.z+(A-o.z)*2),m=h.x+(u.x-h.x)*.5,g=h.y+(u.y-h.y)*.5,A=h.z+(u.z-h.z)*.5,r(20,c.x+(m-c.x)*2,c.y+(g-c.y)*2,c.z+(A-c.z)*2),m=p.x+(f.x-p.x)*.5,g=p.y+(f.y-p.y)*.5,A=p.z+(f.z-p.z)*.5,r(24,d.x+(m-d.x)*2,d.y+(g-d.y)*2,d.z+(A-d.z)*2)}(a);let u=function(e,t){let r=new Float32Array(25);for(let n=0;n<25;n++){let i=e[3*n],a=e[3*n+2],s=1.3-Math.sqrt(i*i+a*a)/t;s<.4?s=0:s>.8&&(s=1),r[n]=s}return r}(a,e),c=[];for(let e=0;e<4;e++)for(let t=0;t<4;t++){let r=5*e+t,n=r+1,i=r+5,a=i+1;c.push(r,i,a),c.push(r,a,n)}return i.setIndex(c),i.setAttribute("position",new ek.Float32BufferAttribute(a,3)),i.setAttribute("uv",new ek.Float32BufferAttribute(s,2)),i.setAttribute("alpha",new ek.Float32BufferAttribute(u,1)),i.computeBoundingSphere(),i}(r,n,e,0)},[r,n]),h=(0,eG.useMemo)(()=>new ek.ShaderMaterial({uniforms:{cloudTexture:{value:d},uvOffset:{value:new ek.Vector2(0,0)},debugMode:{value:+!!o},layerIndex:{value:s}},vertexShader:"\n attribute float alpha;\n\n uniform vec2 uvOffset;\n\n varying vec2 vUv;\n varying float vAlpha;\n\n void main() {\n // Apply UV offset for scrolling\n vUv = uv + uvOffset;\n vAlpha = alpha;\n\n vec4 pos = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n // Set depth to far plane so clouds are always visible and behind other geometry\n gl_Position = pos.xyww;\n }\n",fragmentShader:"\n uniform sampler2D cloudTexture;\n uniform float debugMode;\n uniform int layerIndex;\n\n varying vec2 vUv;\n varying float vAlpha;\n\n void main() {\n vec4 texColor = texture2D(cloudTexture, vUv);\n\n // Debug mode: show layer-colored clouds (red, green, blue for layers 0, 1, 2)\n if (debugMode > 0.5) {\n vec3 debugColor;\n if (layerIndex == 0) {\n debugColor = vec3(1.0, 0.3, 0.3); // Red\n } else if (layerIndex == 1) {\n debugColor = vec3(0.3, 1.0, 0.3); // Green\n } else {\n debugColor = vec3(0.3, 0.3, 1.0); // Blue\n }\n // Use same alpha calculation as normal mode\n gl_FragColor = vec4(debugColor, texColor.a * vAlpha);\n return;\n }\n\n // Tribes 2 uses GL_MODULATE: final = texture × vertex color\n // Vertex color is white with varying alpha, so:\n // Final RGB = Texture RGB × 1.0 = Texture RGB\n // Final Alpha = Texture Alpha × Vertex Alpha\n float finalAlpha = texColor.a * vAlpha;\n\n // Output clouds with texture color and combined alpha\n gl_FragColor = vec4(texColor.rgb, finalAlpha);\n }\n",transparent:!0,depthWrite:!1,side:ek.DoubleSide}),[d,o,s]);return(0,eX.useFrame)((e,t)=>{if(!u.current||!l)return;let r=1e3*t/32;c.current.x+=a.x*i*r,c.current.y+=a.y*i*r,c.current.x=c.current.x-Math.floor(c.current.x),c.current.y=c.current.y-Math.floor(c.current.y),u.current.uniforms.uvOffset.value.copy(c.current)}),(0,eG.useEffect)(()=>()=>{f.dispose(),h.dispose()},[f,h]),(0,eU.jsx)("mesh",{geometry:f,frustumCulled:!1,renderOrder:10,children:(0,eU.jsx)("primitive",{ref:u,object:h,attach:"material"})})}function ah(e){var t,r;let{object:n}=e,{debugMode:i}=(0,n2.useDebug)(),{animationEnabled:a}=(0,n2.useSettings)(),{data:s}=nZ({queryKey:["detailMapList",r=(0,n0.getProperty)(n,"materialList")],queryFn:()=>(0,nq.loadDetailMapList)(r),enabled:!!r},nF,void 0),o=.95*(null!=(t=(0,n0.getFloat)(n,"visibleDistance"))?t:500),l=(0,eG.useMemo)(()=>{var e,t,r;return[null!=(e=(0,n0.getFloat)(n,"cloudSpeed1"))?e:1e-4,null!=(t=(0,n0.getFloat)(n,"cloudSpeed2"))?t:2e-4,null!=(r=(0,n0.getFloat)(n,"cloudSpeed3"))?r:3e-4]},[n]),u=(0,eG.useMemo)(()=>{let e=[.35,.25,.2],t=[];for(let i=0;i<3;i++){var r;let a=null!=(r=(0,n0.getFloat)(n,"cloudHeightPer".concat(i)))?r:e[i];t.push(a)}return t},[n]),c=(0,eG.useMemo)(()=>{let e=(0,n0.getProperty)(n,"windVelocity");if(e){let[t,r]=e.split(" ").map(e=>parseFloat(e));if(0!==t||0!==r)return new ek.Vector2(t,r).normalize()}return new ek.Vector2(1,0)},[n]),d=(0,eG.useMemo)(()=>{if(!s)return[];let e=[];for(let n=7;n{let{camera:t}=e;f.current&&f.current.position.copy(t.position)}),d&&0!==d.length)?(0,eU.jsx)("group",{ref:f,children:d.map((e,t)=>{let r=(0,nq.textureToUrl)(e.texture);return(0,eU.jsx)(eG.Suspense,{fallback:null,children:(0,eU.jsx)(af,{textureUrl:r,radius:o,heightPercent:e.height,speed:e.speed,windDirection:c,layerIndex:t,debugMode:i,animationEnabled:a})},t)})}):null}let ap="".concat(nq.BASE_URL,"/black.png");function am(e){let{materialList:t,fogColor:r,fogDistance:n}=e,{data:i}=nZ({queryKey:["detailMapList",t],queryFn:()=>(0,nq.loadDetailMapList)(t)},nF,void 0),a=ac((0,eG.useMemo)(()=>i?[(0,nq.textureToUrl)(i[1]),(0,nq.textureToUrl)(i[3]),(0,nq.textureToUrl)(i[4]),(0,nq.textureToUrl)(i[5]),(0,nq.textureToUrl)(i[0]),(0,nq.textureToUrl)(i[2])]:[ap,ap,ap,ap,ap,ap],[i]),{path:""}),s=(0,eG.useRef)(null),o=!!r&&!!n,l=(0,eG.useMemo)(()=>o?new ek.ShaderMaterial({uniforms:{skybox:{value:a},fogColor:{value:r}},vertexShader:"\n varying vec3 vDirection;\n\n void main() {\n // Use position directly as direction (no world transform needed)\n vDirection = position;\n\n // Transform position but ignore translation\n vec4 pos = projectionMatrix * mat4(mat3(modelViewMatrix)) * vec4(position, 1.0);\n gl_Position = pos.xyww; // Set depth to far plane\n }\n ",fragmentShader:"\n uniform samplerCube skybox;\n uniform vec3 fogColor;\n\n varying vec3 vDirection;\n\n void main() {\n vec3 direction = normalize(vDirection);\n // Swap X and Z to match scene.backgroundRotation used in non-fog path\n direction = vec3(direction.z, direction.y, direction.x);\n vec4 skyColor = textureCube(skybox, direction);\n\n // Calculate fog factor based on vertical direction\n // direction.y: -1 = straight down, 0 = horizon, 1 = straight up\n // 100% fog from bottom to horizon, then fade from horizon (0) to 0.4\n float fogFactor = smoothstep(0.0, 0.4, direction.y);\n\n // Mix in sRGB space to match Three.js fog rendering\n vec3 finalColor = mix(fogColor, skyColor.rgb, fogFactor);\n gl_FragColor = vec4(finalColor, 1.0);\n }\n ",side:ek.BackSide,depthWrite:!1}):null,[a,r,o]);(0,eG.useEffect)(()=>{s.current&&o&&l&&(s.current.uniforms.skybox.value=a,s.current.uniforms.fogColor.value=r)},[a,r,o,l]);let{scene:u}=(0,eW.useThree)();return((0,eG.useEffect)(()=>{u.backgroundRotation=new ek.Euler(0,Math.PI/2,0)},[u]),o)?(0,eU.jsxs)("mesh",{scale:5e3,children:[(0,eU.jsx)("sphereGeometry",{args:[1,60,40]}),(0,eU.jsx)("primitive",{ref:s,object:l,attach:"material"})]}):(0,eU.jsx)("primitive",{attach:"background",object:a})}let av=e=>{e.fragmentShader=e.fragmentShader.replace("#include ","\n #include \n // Override roughness with map alpha channel if map exists\n #ifdef USE_MAP\n roughnessFactor = texture2D(map, vMapUv).a * 1;\n #endif\n ")};function ag(){let e=new ek.MeshStandardMaterial({side:2,metalness:0,roughness:1});return e.onBeforeCompile=av,e}let aA=(0,eG.createContext)(null);function ay(e){let{children:t,shapeName:r,type:n}=e,i=(0,eG.useMemo)(()=>({shapeName:r,type:n}),[r,n]);return(0,eU.jsx)(aA.Provider,{value:i,children:t})}var ax=e.i(51475);let aB=new Map;function aC(e){let{material:t,shapeName:r}=e,n=t.userData.resource_path,i=function(e){let{animationEnabled:t}=(0,n2.useSettings)(),{data:r}=nZ({queryKey:["ifl",e],queryFn:()=>(0,nq.loadImageFrameList)(e),enabled:!0,suspense:!0,throwOnError:nX,placeholderData:void 0},nF,void 0),n=(0,eG.useMemo)(()=>r.map(t=>(0,nq.iflTextureToUrl)(t.name,e)),[r,e]),i=(0,n$.useTexture)(n),a=(0,eG.useMemo)(()=>{var t;let n,a=aB.get(e);return a||(a=function(e){let t=e[0].image.width,r=e[0].image.height,n=e.length,i=Math.ceil(Math.sqrt(n)),a=Math.ceil(n/i),s=document.createElement("canvas");s.width=t*i,s.height=r*a;let o=s.getContext("2d");e.forEach((e,n)=>{let a=Math.floor(n/i);o.drawImage(e.image,n%i*t,a*r)});let l=new ek.CanvasTexture(s);return l.colorSpace=ek.SRGBColorSpace,l.generateMipmaps=!1,l.minFilter=ek.NearestFilter,l.magFilter=ek.NearestFilter,l.wrapS=ek.ClampToEdgeWrapping,l.wrapT=ek.ClampToEdgeWrapping,l.repeat.set(1/i,1/a),{texture:l,columns:i,rows:a,frameCount:n,frameStartTicks:[],totalTicks:0,lastFrame:-1}}(i),aB.set(e,a)),n=0,(t=a).frameStartTicks=r.map(e=>{let t=n;return n+=e.frameCount,t}),t.totalTicks=n,a},[e,i,r]);return(0,ax.useTick)(e=>{let r=t?function(e,t){if(0===e.totalTicks)return 0;let r=t%e.totalTicks,{frameStartTicks:n}=e;for(let e=n.length-1;e>=0;e--)if(r>=n[e])return e;return 0}(a,e):0;!function(e,t){if(t===e.lastFrame)return;e.lastFrame=t;let r=t%e.columns,n=e.rows-1-Math.floor(t/e.columns);e.texture.offset.set(r/e.columns,n/e.rows)}(a,r)}),a.texture}("textures/".concat(n,".ifl")),a=r&&/borg|xorg|porg|dorg/i.test(r),s=(0,eG.useMemo)(()=>{if(!a){let e=ag();return e.map=i,e}let e=t.clone();return e.map=i,e.transparent=!0,e.alphaTest=.9,e.side=2,e},[t,i,a]);return(0,eU.jsx)("primitive",{object:s,attach:"material"})}function aS(e){let{material:t,shapeName:r}=e,n=t.userData.resource_path,i=(0,eG.useMemo)(()=>(n||console.warn('No resource_path was found on "'.concat(r,'" - rendering fallback.')),n?(0,nq.textureToUrl)(n):nq.FALLBACK_TEXTURE_URL),[t,n,r]),a=r&&/borg|xorg|porg|dorg/i.test(r),s=(0,n$.useTexture)(i,e=>(a||(e.wrapS=e.wrapT=ek.RepeatWrapping,e.colorSpace=ek.SRGBColorSpace,e.flipY=!1,e.anisotropy=16,e.generateMipmaps=!0,e.minFilter=ek.LinearMipmapLinearFilter,e.magFilter=ek.LinearFilter,e.needsUpdate=!0),(0,n1.setupColor)(e))),o=(0,eG.useMemo)(()=>{if(!a){let e=ag();return e.map=s,e}let e=t.clone();return e.map=s,e.transparent=!0,e.alphaTest=.9,e.side=2,e},[t,s,a]);return(0,eU.jsx)("primitive",{object:o,attach:"material"})}function aE(e){var t;let{material:r,shapeName:n}=e,i=new Set(null!=(t=r.userData.flag_names)?t:[]).has("IflMaterial"),a=r.userData.resource_path;return i&&a?(0,eU.jsx)(aC,{material:r,shapeName:n}):r.name?(0,eU.jsx)(aS,{material:r,shapeName:n}):null}function aT(e){let{color:t,label:r}=e;return(0,eU.jsxs)("mesh",{children:[(0,eU.jsx)("boxGeometry",{args:[10,10,10]}),(0,eU.jsx)("meshStandardMaterial",{color:t,wireframe:!0}),r?(0,eU.jsx)(an.FloatingLabel,{color:t,children:r}):null]})}function aD(e){let{color:t,label:r}=e,{debugMode:n}=(0,n2.useDebug)();return n?(0,eU.jsx)(aT,{color:t,label:r}):null}let ab=(0,eG.memo)(function(){let{shapeName:e}=(0,eG.useContext)(aA),{debugMode:t}=(0,n2.useDebug)(),{nodes:r}=ar((0,nq.shapeToUrl)(e)),n=(0,eG.useMemo)(()=>{let e=Object.values(r).filter(e=>e.skeleton);if(e.length>0){var t=e[0].skeleton;let r=new Set;return t.bones.forEach((e,t)=>{e.name.match(/^Hulk/i)&&r.add(t)}),r}return new Set},[r]),i=(0,eG.useMemo)(()=>Object.entries(r).filter(e=>{let[t,r]=e;return r.material&&"Unassigned"!==r.material.name&&!r.name.match(/^Hulk/i)}).map(e=>{let[t,r]=e,i=function(e,t){if(0===t.size||!e.attributes.skinIndex)return e;let r=e.attributes.skinIndex,n=e.attributes.skinWeight,i=e.index,a=Array(r.count).fill(!1);for(let e=0;e.01&&t.has(s)){a[e]=!0;break}}if(i){let t=[],r=i.array;for(let e=0;e{let{node:r,geometry:n}=t;return(0,eU.jsx)("mesh",{geometry:n,castShadow:!0,receiveShadow:!0,children:r.material?(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)("meshStandardMaterial",{color:"gray",wireframe:!0}),children:Array.isArray(r.material)?r.material.map((t,r)=>(0,eU.jsx)(aE,{material:t,shapeName:e},r)):(0,eU.jsx)(aE,{material:r.material,shapeName:e})}):null},r.id)}),t?(0,eU.jsx)(an.FloatingLabel,{children:e}):null]})}),aM={Banner_Honor:"banner_honor.dts",Banner_Strength:"banner_strength.dts",Banner_Unity:"banner_unity.dts",CreativityPad:"station_teleport.dts",ExteriorFlagStand:"ext_flagstand.dts",FlipFlop:"switch.dts",GeneratorLarge:"station_generator_large.dts",InteriorFlagStand:"int_flagstand.dts",LightMaleHuman_Dead:"light_male_dead.dts",MediumMaleHuman_Dead:"medium_male_dead.dts",HeavyMaleHuman_Dead:"heavy_male_dead.dts",LogoProjector:"teamlogo_projector.dts",SensorLargePulse:"sensor_pulse_large.dts",SensorMediumPulse:"sensor_pulse_medium.dts",SolarPanel:"solarpanel.dts",StaticShape:"switch.dts",StationInventory:"station_inv_human.dts",StationVehicle:"vehicle_pad_station.dts",StationVehiclePad:"vehicle_pad.dts",Teleporter:"nexusbase.dts"},aw={AmmoPack:"pack_upgrade_ammo.dts",Beacon:"beacon.dts",Chaingun:"weapon_chaingun.dts",ChaingunAmmo:"ammo_chaingun.dts",CloakingPack:"pack_upgrade_cloaking.dts",ConcussionGrenade:"grenade.dts",DiscAmmo:"ammo_disc.dts",ELFGun:"weapon_elf.dts",EnergyPack:"pack_upgrade_energy.dts",Flag:"flag.dts",FlareGrenade:"grenade.dts",Grenade:"grenade.dts",GrenadeLauncher:"weapon_grenade_launcher.dts",GrenadeLauncherAmmo:"ammo_grenade.dts",InventoryDeployable:"pack_deploy_inventory.dts",Mine:"ammo_mine.dts",MotionSensorDeployable:"pack_deploy_sensor_motion.dts",Plasma:"weapon_plasma.dts",PlasmaAmmo:"ammo_plasma.dts",PulseSensorDeployable:"pack_deploy_sensor_pulse.dts",RepairKit:"repair_kit.dts",RepairPack:"pack_upgrade_repair.dts",RepairPatch:"repair_patch.dts",SatchelCharge:"pack_upgrade_satchel.dts",SensorJammerPack:"pack_upgrade_sensorjammer.dts",ShieldPack:"pack_upgrade_shield.dts",ShockLance:"weapon_shocklance.dts",SniperRifle:"weapon_sniper.dts"},aF={1:"Storm",2:"Inferno"},aR={AABarrelLarge:"turret_aa_large.dts",ELFBarrelLarge:"turret_elf_large.dts",MissileBarrelLarge:"turret_missile_large.dts",MortarBarrelLarge:"turret_mortar_large.dts",PlasmaBarrelLarge:"turret_fusion_large.dts",SentryTurret:"turret_sentry.dts",TurretBaseLarge:"turret_base_large.dts",SentryTurretBarrel:"turret_muzzlepoint.dts"};function aI(e){return i||(i=Object.fromEntries(Object.entries(aR).map(e=>{let[t,r]=e;return[t.toLowerCase(),r]}))),i[e.toLowerCase()]}let aP=(0,eG.createContext)(null);function aL(){let e=(0,eG.useContext)(aP);if(!e)throw Error("useCameras must be used within CamerasProvider");return e}function aU(e){let{children:t}=e,{camera:r}=(0,eW.useThree)(),[n,i]=(0,eG.useState)(0),[a,s]=(0,eG.useState)({}),o=(0,eG.useCallback)(e=>{s(t=>({...t,[e.id]:e}))},[]),l=(0,eG.useCallback)(e=>{s(t=>{let{[e.id]:r,...n}=t;return n})},[]),u=Object.keys(a).length,c=(0,eG.useCallback)(()=>{i(e=>0===u?0:(e+1)%u)},[u]),d=(0,eG.useCallback)(e=>{e>=0&&e{if(n({registerCamera:o,unregisterCamera:l,nextCamera:c,setCameraIndex:d,cameraCount:u}),[o,l,c,d,u]);return(0,eU.jsx)(aP.Provider,{value:f,children:t})}let aG=(0,eG.lazy)(()=>e.A(61921).then(e=>({default:e.AudioEmitter}))),aO={AudioEmitter:function(e){let{audioEnabled:t}=(0,n2.useSettings)();return t?(0,eU.jsx)(aG,{...e}):null},Camera:function(e){let{object:t}=e,{registerCamera:r,unregisterCamera:n}=aL(),i=(0,eG.useId)(),a=(0,n0.getProperty)(t,"dataBlock"),s=(0,eG.useMemo)(()=>(0,n0.getPosition)(t),[t]),o=(0,eG.useMemo)(()=>(0,n0.getRotation)(t),[t]);return(0,eG.useEffect)(()=>{if("Observer"===a){let e={id:i,position:new ek.Vector3(...s),rotation:o};return r(e),()=>{n(e)}}},[i,a,r,n,s,o]),null},ForceFieldBare:(0,eG.lazy)(()=>e.A(25147).then(e=>({default:e.ForceFieldBare}))),InteriorInstance:au,Item:function(e){var t,r;let{object:i}=e,a=n5(),s=null!=(t=(0,n0.getProperty)(i,"dataBlock"))?t:"",o=(0,eG.useMemo)(()=>(0,n0.getPosition)(i),[i]),l=(0,eG.useMemo)(()=>(0,n0.getScale)(i),[i]),u=(0,eG.useMemo)(()=>(0,n0.getRotation)(i),[i]),c=(n||(n=Object.fromEntries(Object.entries(aw).map(e=>{let[t,r]=e;return[t.toLowerCase(),r]}))),n[s.toLowerCase()]);c||console.error(" missing shape for dataBlock: ".concat(s));let d=(null==s?void 0:s.toLowerCase())==="flag",f=null!=(r=null==a?void 0:a.team)?r:null,h=f>0?aF[f]:null,p=d&&h?"".concat(h," Flag"):null;return(0,eU.jsx)(ay,{shapeName:c,type:"Item",children:(0,eU.jsx)("group",{position:o,quaternion:u,scale:l,children:c?(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:c}),children:(0,eU.jsxs)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"pink"}),children:[(0,eU.jsx)(ab,{}),p?(0,eU.jsx)(an.FloatingLabel,{opacity:.6,children:p}):null]})}):(0,eU.jsx)(aD,{color:"orange"})})})},SimGroup:function(e){var t;let{object:r}=e,n=n5(),i=(0,eG.useMemo)(()=>{let e=null,t=!1;if(n&&n.hasTeams){if(t=!0,null!=n.team)e=n.team;else if(r._name){let t=r._name.match(/^team(\d+)$/i);t&&(e=parseInt(t[1],10))}}else r._name&&(t="teams"===r._name.toLowerCase());return{object:r,parent:n,hasTeams:t,team:e}},[r,n]);return(0,eU.jsx)(n8.Provider,{value:i,children:(null!=(t=r._children)?t:[]).map((e,t)=>aH(e,t))})},Sky:function(e){var t;let{object:r}=e,{fogEnabled:n}=(0,n2.useSettings)(),i=(0,n0.getProperty)(r,"materialList"),a=(0,eG.useMemo)(()=>{let e=(0,n0.getProperty)(r,"SkySolidColor");if(e){let[t,r,n]=e.split(" ").map(e=>parseFloat(e));return[new ek.Color().setRGB(t,r,n),new ek.Color().setRGB(t,r,n).convertSRGBToLinear()]}},[r]),s=null!=(t=(0,n0.getInt)(r,"useSkyTextures"))?t:1,o=(0,n0.getFloat)(r,"fogDistance"),l=(0,eG.useMemo)(()=>{let e=(0,n0.getProperty)(r,"fogColor");if(e){let[t,r,n]=e.split(" ").map(e=>parseFloat(e));return[new ek.Color().setRGB(t,r,n),new ek.Color().setRGB(t,r,n).convertSRGBToLinear()]}},[r]),u=a||l,c=u?(0,eU.jsx)("color",{attach:"background",args:[u[0]]}):null;return(0,eU.jsxs)(eU.Fragment,{children:[i&&s?(0,eU.jsx)(eG.Suspense,{fallback:c,children:(0,eU.jsx)(am,{materialList:i,fogColor:n?null==l?void 0:l[1]:void 0,fogDistance:n?o:void 0})}):c,(0,eU.jsx)(eG.Suspense,{children:(0,eU.jsx)(ah,{object:r})}),n&&o&&l?(0,eU.jsx)("fog",{attach:"fog",color:l[1],near:100,far:Math.max(400,2*o)}):null]})},StaticShape:function(e){var t;let{object:n}=e,i=null!=(t=(0,n0.getProperty)(n,"dataBlock"))?t:"",a=(0,eG.useMemo)(()=>(0,n0.getPosition)(n),[n]),s=(0,eG.useMemo)(()=>(0,n0.getRotation)(n),[n]),o=(0,eG.useMemo)(()=>(0,n0.getScale)(n),[n]),l=(r||(r=Object.fromEntries(Object.entries(aM).map(e=>{let[t,r]=e;return[t.toLowerCase(),r]}))),r[i.toLowerCase()]);return l||console.error(" missing shape for dataBlock: ".concat(i)),(0,eU.jsx)(ay,{shapeName:l,type:"StaticShape",children:(0,eU.jsx)("group",{position:a,quaternion:s,scale:o,children:l?(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:l}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"yellow"}),children:(0,eU.jsx)(ab,{})})}):(0,eU.jsx)(aD,{color:"orange"})})})},Sun:function(e){let{object:t}=e;(0,eG.useMemo)(()=>{var e;let[r,n,i]=(null!=(e=(0,n0.getProperty)(t,"direction"))?e:"0 0 -1").split(" ").map(e=>parseFloat(e));return[5e3*r,5e3*n,5e3*i]},[t]);let r=(0,eG.useMemo)(()=>{var e;let[r,n,i]=(null!=(e=(0,n0.getProperty)(t,"color"))?e:"1 1 1 1").split(" ").map(e=>parseFloat(e));return[r,n,i]},[t]),n=(0,eG.useMemo)(()=>{var e;let[r,n,i]=(null!=(e=(0,n0.getProperty)(t,"ambient"))?e:"0.5 0.5 0.5 1").split(" ").map(e=>parseFloat(e));return[r,n,i]},[t]);return(0,eU.jsx)(eU.Fragment,{children:(0,eU.jsx)("hemisphereLight",{args:[new ek.Color(...r),new ek.Color(...n),2]})})},TerrainBlock:n4,TSStatic:function(e){let{object:t}=e,r=(0,n0.getProperty)(t,"shapeName"),n=(0,eG.useMemo)(()=>(0,n0.getPosition)(t),[t]),i=(0,eG.useMemo)(()=>(0,n0.getRotation)(t),[t]),a=(0,eG.useMemo)(()=>(0,n0.getScale)(t),[t]);return r||console.error(" missing shapeName for object",t),(0,eU.jsx)(ay,{shapeName:r,type:"TSStatic",children:(0,eU.jsx)("group",{position:n,quaternion:i,scale:a,children:(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:r}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"yellow"}),children:(0,eU.jsx)(ab,{})})})})})},Turret:function(e){var t;let{object:r}=e,n=null!=(t=(0,n0.getProperty)(r,"dataBlock"))?t:"",i=(0,n0.getProperty)(r,"initialBarrel"),a=(0,eG.useMemo)(()=>(0,n0.getPosition)(r),[r]),s=(0,eG.useMemo)(()=>(0,n0.getRotation)(r),[r]),o=(0,eG.useMemo)(()=>(0,n0.getScale)(r),[r]),l=aI(n),u="string"==typeof i?aI(i):void 0;return l||console.error(" missing shape for dataBlock: ".concat(n)),u||console.error(" missing shape for initialBarrel dataBlock: ".concat(i)),(0,eU.jsx)(ay,{shapeName:l,type:"Turret",children:(0,eU.jsxs)("group",{position:a,quaternion:s,scale:o,children:[l?(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:l}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"yellow"}),children:(0,eU.jsx)(ab,{})})}):(0,eU.jsx)(aD,{color:"orange"}),(0,eU.jsx)(ay,{shapeName:u,type:"Turret",children:(0,eU.jsx)("group",{position:[0,1.5,0],children:u?(0,eU.jsx)(it,{fallback:(0,eU.jsx)(aD,{color:"red",label:u}),children:(0,eU.jsx)(eG.Suspense,{fallback:(0,eU.jsx)(aT,{color:"yellow"}),children:(0,eU.jsx)(ab,{})})}):(0,eU.jsx)(aD,{color:"orange"})})})]})})},WaterBlock:(0,eG.lazy)(()=>e.A(18599).then(e=>({default:e.WaterBlock}))),WayPoint:function(e){let{object:t}=e;n5();let r=(0,eG.useMemo)(()=>(0,n0.getPosition)(t),[t]),n=(0,n0.getProperty)(t,"name");return n?(0,eU.jsx)(an.FloatingLabel,{position:r,opacity:.6,children:n}):null}};function aH(e,t){let r=aO[e._className];return r?(0,eU.jsx)(eG.Suspense,{children:(0,eU.jsx)(r,{object:e})},t):null}var aN=e.i(77482),ak=e.i(86608),aj=e.i(38433),az=e.i(33870),aK=e.i(91996);let aJ=async e=>{let t;try{t=(0,nq.getUrlForPath)(e)}catch(t){return console.warn("Script not in manifest: ".concat(e," (").concat(t,")")),null}try{let r=await fetch(t);if(!r.ok)return console.error("Script fetch failed: ".concat(e," (").concat(r.status,")")),null;return await r.text()}catch(t){return console.error("Script fetch error: ".concat(e)),console.error(t),null}},aV=(0,az.createScriptCache)(),aQ={findFiles:e=>{let t=(0,nY.default)(e,{nocase:!0});return(0,aK.getResourceList)().filter(e=>t(e)).map(e=>{let[t,r]=(0,aK.getSourceAndPath)(e);return r})},isFile:e=>null!=(0,aK.getResourceMap)()[(0,aK.getResourceKey)(e)]},aW=(0,eG.memo)(function(e){let{name:t,onLoadingChange:r}=e,{data:n}=nZ({queryKey:["parsedMission",t],queryFn:()=>(0,nq.loadMission)(t)},nF,void 0),{missionGroup:i,runtime:a,progress:s}=function(e,t){let[r,n]=(0,eG.useState)({missionGroup:void 0,runtime:void 0,progress:0});return(0,eG.useEffect)(()=>{if(!t)return;let r=new AbortController,i=t.missionTypes[0],a=(0,aj.createProgressTracker)(),s=()=>{n(e=>({...e,progress:a.progress}))};a.on("update",s);let{runtime:o}=(0,ak.runServer)({missionName:e,missionType:i,runtimeOptions:{loadScript:aJ,fileSystem:aQ,cache:aV,signal:r.signal,progress:a,ignoreScripts:["scripts/admin.cs","scripts/ai.cs","scripts/aiCTF.cs","scripts/aiTDM.cs","scripts/aiHunters.cs","scripts/deathMessages.cs","scripts/graphBuild.cs","scripts/navGraph.cs","scripts/serverTasks.cs","scripts/spdialog.cs"]},onMissionLoadDone:()=>{n({missionGroup:o.getObjectByName("MissionGroup"),runtime:o,progress:1})}});return()=>{a.off("update",s),r.abort(),o.destroy()}},[e,t]),r}(t,n),o=!i||!a;return((0,eG.useEffect)(()=>{null==r||r(o,s)},[o,s,r]),o)?null:(0,eU.jsx)(aN.RuntimeProvider,{runtime:a,children:aH(i)})});function aX(e,t){var r=rX(e,t,"update");if(r.set){if(!r.get)throw TypeError("attempted to read set only private field");return"__destrWrapper"in r||(r.__destrWrapper={set value(v){r.set.call(e,v)},get value(){return r.get.call(e)}}),r.__destrWrapper}if(!r.writable)throw TypeError("attempted to set read only private field");return r}var a_=(eA=new WeakMap,class extends r1{build(e,t,r){var n;let i=t.queryKey,a=null!=(n=t.queryHash)?n:nr(i,t),s=this.get(a);return s||(s=new nT({client:e,queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){r_(this,eA).has(e.queryHash)||(r_(this,eA).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=r_(this,eA).get(e.queryHash);t&&(e.destroy(),t===e&&r_(this,eA).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ng.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return r_(this,eA).get(e)}getAll(){return[...r_(this,eA).values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ne(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ne(e,t)):t}notify(e){ng.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ng.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ng.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}constructor(e={}){super(),rY(this,eA,{writable:!0,value:void 0}),this.config=e,rq(this,eA,new Map)}}),aZ=(ey=new WeakMap,ex=new WeakMap,eB=new WeakMap,eC=new WeakMap,eS=new WeakSet,class extends nE{setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){r_(this,ex).includes(e)||(r_(this,ex).push(e),this.clearGcTimeout(),r_(this,eB).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){rq(this,ex,r_(this,ex).filter(t=>t!==e)),this.scheduleGc(),r_(this,eB).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){r_(this,ex).length||("pending"===this.state.status?this.scheduleGc():r_(this,eB).remove(this))}continue(){var e,t;return null!=(t=null==(e=r_(this,eC))?void 0:e.continue())?t:this.execute(this.state.variables)}async execute(e){var t,r,n,i,a,s,o,l,u,c,d,f,h,p,m,g,A,y,x,B,C;let S=()=>{r$(this,eS,aY).call(this,{type:"continue"})},E={client:r_(this,ey),meta:this.options.meta,mutationKey:this.options.mutationKey};rq(this,eC,nS({fn:()=>this.options.mutationFn?this.options.mutationFn(e,E):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{r$(this,eS,aY).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{r$(this,eS,aY).call(this,{type:"pause"})},onContinue:S,retry:null!=(t=this.options.retry)?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>r_(this,eB).canRun(this)}));let T="pending"===this.state.status,D=!r_(this,eC).canStart();try{if(T)S();else{r$(this,eS,aY).call(this,{type:"pending",variables:e,isPaused:D}),await (null==(c=(d=r_(this,eB).config).onMutate)?void 0:c.call(d,e,this,E));let t=await (null==(f=(h=this.options).onMutate)?void 0:f.call(h,e,E));t!==this.state.context&&r$(this,eS,aY).call(this,{type:"pending",context:t,variables:e,isPaused:D})}let t=await r_(this,eC).start();return await (null==(r=(n=r_(this,eB).config).onSuccess)?void 0:r.call(n,t,e,this.state.context,this,E)),await (null==(i=(a=this.options).onSuccess)?void 0:i.call(a,t,e,this.state.context,E)),await (null==(s=(o=r_(this,eB).config).onSettled)?void 0:s.call(o,t,null,this.state.variables,this.state.context,this,E)),await (null==(l=(u=this.options).onSettled)?void 0:l.call(u,t,null,e,this.state.context,E)),r$(this,eS,aY).call(this,{type:"success",data:t}),t}catch(t){try{throw await (null==(p=(m=r_(this,eB).config).onError)?void 0:p.call(m,t,e,this.state.context,this,E)),await (null==(g=(A=this.options).onError)?void 0:g.call(A,t,e,this.state.context,E)),await (null==(y=(x=r_(this,eB).config).onSettled)?void 0:y.call(x,void 0,t,this.state.variables,this.state.context,this,E)),await (null==(B=(C=this.options).onSettled)?void 0:B.call(C,void 0,t,e,this.state.context,E)),t}finally{r$(this,eS,aY).call(this,{type:"error",error:t})}}finally{r_(this,eB).runNext(this)}}constructor(e){super(),r0(this,eS),rY(this,ey,{writable:!0,value:void 0}),rY(this,ex,{writable:!0,value:void 0}),rY(this,eB,{writable:!0,value:void 0}),rY(this,eC,{writable:!0,value:void 0}),rq(this,ey,e.client),this.mutationId=e.mutationId,rq(this,eB,e.mutationCache),rq(this,ex,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}});function aY(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),ng.batch(()=>{r_(this,ex).forEach(t=>{t.onMutationUpdate(e)}),r_(this,eB).notify({mutation:this,type:"updated",action:e})})}var aq=(eE=new WeakMap,eT=new WeakMap,eD=new WeakMap,class extends r1{build(e,t,r){let n=new aZ({client:e,mutationCache:this,mutationId:++aX(this,eD).value,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){r_(this,eE).add(e);let t=a$(e);if("string"==typeof t){let r=r_(this,eT).get(t);r?r.push(e):r_(this,eT).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(r_(this,eE).delete(e)){let t=a$(e);if("string"==typeof t){let r=r_(this,eT).get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&r_(this,eT).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=a$(e);if("string"!=typeof t)return!0;{let r=r_(this,eT).get(t),n=null==r?void 0:r.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=a$(e);if("string"!=typeof t)return Promise.resolve();{var r,n;let i=null==(r=r_(this,eT).get(t))?void 0:r.find(t=>t!==e&&t.state.isPaused);return null!=(n=null==i?void 0:i.continue())?n:Promise.resolve()}}clear(){ng.batch(()=>{r_(this,eE).forEach(e=>{this.notify({type:"removed",mutation:e})}),r_(this,eE).clear(),r_(this,eT).clear()})}getAll(){return Array.from(r_(this,eE))}find(e){let t={exact:!0,...e};return this.getAll().find(e=>nt(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getAll().filter(t=>nt(e,t))}notify(e){ng.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ng.batch(()=>Promise.all(e.map(e=>e.continue().catch(r4))))}constructor(e={}){super(),rY(this,eE,{writable:!0,value:void 0}),rY(this,eT,{writable:!0,value:void 0}),rY(this,eD,{writable:!0,value:void 0}),this.config=e,rq(this,eE,new Set),rq(this,eT,new Map),rq(this,eD,0)}});function a$(e){var t;return null==(t=e.options.scope)?void 0:t.id}function a0(e){return{onFetch:(t,r)=>{var n,i,a,s,o;let l=t.options,u=null==(a=t.fetchOptions)||null==(i=a.meta)||null==(n=i.fetchMore)?void 0:n.direction,c=(null==(s=t.state.data)?void 0:s.pages)||[],d=(null==(o=t.state.data)?void 0:o.pageParams)||[],f={pages:[],pageParams:[]},h=0,p=async()=>{let r=!1,n=np(t.options,t.fetchOptions),i=async(e,i,a)=>{if(r)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let s=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:a?"backward":"forward",meta:t.options.meta};return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)}),e})(),o=await n(s),{maxPages:l}=t.options,u=a?nf:nd;return{pages:u(e.pages,o,l),pageParams:u(e.pageParams,i,l)}};if(u&&c.length){let e="backward"===u,t={pages:c,pageParams:d},r=(e?function(e,t){var r;let{pages:n,pageParams:i}=t;return n.length>0?null==(r=e.getPreviousPageParam)?void 0:r.call(e,n[0],n,i[0],i):void 0}:a1)(l,t);f=await i(t,r,e)}else{let t=null!=e?e:c.length;do{var a;let e=0===h?null!=(a=d[0])?a:l.initialPageParam:a1(l,f);if(h>0&&null==e)break;f=await i(f,e),h++}while(h{var e,n;return null==(e=(n=t.options).persister)?void 0:e.call(n,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=p}}}function a1(e,t){let{pages:r,pageParams:n}=t,i=r.length-1;return r.length>0?e.getNextPageParam(r[i],r,n[i],n):void 0}var a2=(eb=new WeakMap,eM=new WeakMap,ew=new WeakMap,eF=new WeakMap,eR=new WeakMap,eI=new WeakMap,eP=new WeakMap,eL=new WeakMap,class{mount(){aX(this,eI).value++,1===r_(this,eI)&&(rq(this,eP,nm.subscribe(async e=>{e&&(await this.resumePausedMutations(),r_(this,eb).onFocus())})),rq(this,eL,nA.subscribe(async e=>{e&&(await this.resumePausedMutations(),r_(this,eb).onOnline())})))}unmount(){var e,t;aX(this,eI).value--,0===r_(this,eI)&&(null==(e=r_(this,eP))||e.call(this),rq(this,eP,void 0),null==(t=r_(this,eL))||t.call(this),rq(this,eL,void 0))}isFetching(e){return r_(this,eb).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return r_(this,eM).findAll({...e,status:"pending"}).length}getQueryData(e){var t;let r=this.defaultQueryOptions({queryKey:e});return null==(t=r_(this,eb).get(r.queryHash))?void 0:t.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=r_(this,eb).build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(r6(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return r_(this,eb).findAll(e).map(e=>{let{queryKey:t,state:r}=e;return[t,r.data]})}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),i=r_(this,eb).get(n.queryHash),a=null==i?void 0:i.state.data,s="function"==typeof t?t(a):t;if(void 0!==s)return r_(this,eb).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return ng.batch(()=>r_(this,eb).findAll(e).map(e=>{let{queryKey:n}=e;return[n,this.setQueryData(n,t,r)]}))}getQueryState(e){var t;let r=this.defaultQueryOptions({queryKey:e});return null==(t=r_(this,eb).get(r.queryHash))?void 0:t.state}removeQueries(e){let t=r_(this,eb);ng.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=r_(this,eb);return ng.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={revert:!0,...t};return Promise.all(ng.batch(()=>r_(this,eb).findAll(e).map(e=>e.cancel(r)))).then(r4).catch(r4)}invalidateQueries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ng.batch(()=>{var r,n;return(r_(this,eb).findAll(e).forEach(e=>{e.invalidate()}),(null==e?void 0:e.refetchType)==="none")?Promise.resolve():this.refetchQueries({...e,type:null!=(n=null!=(r=null==e?void 0:e.refetchType)?r:null==e?void 0:e.type)?n:"active"},t)})}refetchQueries(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={...r,cancelRefetch:null==(t=r.cancelRefetch)||t};return Promise.all(ng.batch(()=>r_(this,eb).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r4)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r4)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=r_(this,eb).build(this,t);return r.isStaleByTime(r6(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r4).catch(r4)}fetchInfiniteQuery(e){return e.behavior=a0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r4).catch(r4)}ensureInfiniteQueryData(e){return e.behavior=a0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nA.isOnline()?r_(this,eM).resumePausedMutations():Promise.resolve()}getQueryCache(){return r_(this,eb)}getMutationCache(){return r_(this,eM)}getDefaultOptions(){return r_(this,ew)}setDefaultOptions(e){rq(this,ew,e)}setQueryDefaults(e,t){r_(this,eF).set(nn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...r_(this,eF).values()],r={};return t.forEach(t=>{ni(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){r_(this,eR).set(nn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...r_(this,eR).values()],r={};return t.forEach(t=>{ni(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...r_(this,ew).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=nr(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===nh&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...r_(this,ew).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){r_(this,eb).clear(),r_(this,eM).clear()}constructor(e={}){rY(this,eb,{writable:!0,value:void 0}),rY(this,eM,{writable:!0,value:void 0}),rY(this,ew,{writable:!0,value:void 0}),rY(this,eF,{writable:!0,value:void 0}),rY(this,eR,{writable:!0,value:void 0}),rY(this,eI,{writable:!0,value:void 0}),rY(this,eP,{writable:!0,value:void 0}),rY(this,eL,{writable:!0,value:void 0}),rq(this,eb,e.queryCache||new a_),rq(this,eM,e.mutationCache||new aq),rq(this,ew,e.defaultOptions||{}),rq(this,eF,new Map),rq(this,eR,new Map),rq(this,eI,0)}}),a9=e.i(8155);let a3=e=>e,a4=e=>{let t=(0,a9.createStore)(e),r=e=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a3,r=eG.default.useSyncExternalStore(e.subscribe,eG.default.useCallback(()=>t(e.getState()),[e,t]),eG.default.useCallback(()=>t(e.getInitialState()),[e,t]));return eG.default.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},a8=eG.createContext(null);function a5(e){let{map:t,children:r,onChange:n,domElement:i}=e,a=t.map(e=>e.name+e.keys).join("-"),s=eG.useMemo(()=>{let e,r;return e=()=>t.reduce((e,t)=>({...e,[t.name]:!1}),{}),(r=(t,r,n)=>{let i=n.subscribe;return n.subscribe=(e,t,r)=>{let a=e;if(t){let i=(null==r?void 0:r.equalityFn)||Object.is,s=e(n.getState());a=r=>{let n=e(r);if(!i(s,n)){let e=s;t(s=n,e)}},(null==r?void 0:r.fireImmediately)&&t(s,s)}return i(a)},e(t,r,n)})?a4(r):a4},[a]),o=eG.useMemo(()=>[s.subscribe,s.getState,s],[a]),l=s.setState;return eG.useEffect(()=>{let e=t.map(e=>{let{name:t,keys:r,up:i}=e;return{keys:r,up:i,fn:e=>{l({[t]:e}),n&&n(t,e,o[1]())}}}).reduce((e,t)=>{let{keys:r,fn:n,up:i=!0}=t;return r.forEach(t=>e[t]={fn:n,pressed:!1,up:i}),e},{}),r=t=>{let{key:r,code:n}=t,i=e[r]||e[n];if(!i)return;let{fn:a,pressed:s,up:o}=i;i.pressed=!0,(o||!s)&&a(!0)},a=t=>{let{key:r,code:n}=t,i=e[r]||e[n];if(!i)return;let{fn:a,up:s}=i;i.pressed=!1,s&&a(!1)},s=i||window;return s.addEventListener("keydown",r,{passive:!0}),s.addEventListener("keyup",a,{passive:!0}),()=>{s.removeEventListener("keydown",r),s.removeEventListener("keyup",a)}},[i,a]),eG.createElement(a8.Provider,{value:o,children:r})}var a6=Object.defineProperty;class a7{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;let r=this._listeners;return void 0!==r[e]&&-1!==r[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;let r=this._listeners[e];if(void 0!==r){let e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;let t=this._listeners[e.type];if(void 0!==t){e.target=this;let r=t.slice(0);for(let t=0,n=r.length;t((e,t,r)=>t in e?a6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r))(this,"_listeners")}}var se=Object.defineProperty,st=(e,t,r)=>(((e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),r);let sr=new ek.Euler(0,0,0,"YXZ"),sn=new ek.Vector3,si={type:"change"},sa={type:"lock"},ss={type:"unlock"},so=Math.PI/2;class sl extends a7{constructor(e,t){super(),st(this,"camera"),st(this,"domElement"),st(this,"isLocked"),st(this,"minPolarAngle"),st(this,"maxPolarAngle"),st(this,"pointerSpeed"),st(this,"onMouseMove",e=>{this.domElement&&!1!==this.isLocked&&(sr.setFromQuaternion(this.camera.quaternion),sr.y-=.002*e.movementX*this.pointerSpeed,sr.x-=.002*e.movementY*this.pointerSpeed,sr.x=Math.max(so-this.maxPolarAngle,Math.min(so-this.minPolarAngle,sr.x)),this.camera.quaternion.setFromEuler(sr),this.dispatchEvent(si))}),st(this,"onPointerlockChange",()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(sa),this.isLocked=!0):(this.dispatchEvent(ss),this.isLocked=!1))}),st(this,"onPointerlockError",()=>{console.error("THREE.PointerLockControls: Unable to use Pointer Lock API")}),st(this,"connect",e=>{this.domElement=e||this.domElement,this.domElement&&(this.domElement.ownerDocument.addEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.addEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.addEventListener("pointerlockerror",this.onPointerlockError))}),st(this,"disconnect",()=>{this.domElement&&(this.domElement.ownerDocument.removeEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.removeEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener("pointerlockerror",this.onPointerlockError))}),st(this,"dispose",()=>{this.disconnect()}),st(this,"getObject",()=>this.camera),st(this,"direction",new ek.Vector3(0,0,-1)),st(this,"getDirection",e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion)),st(this,"moveForward",e=>{sn.setFromMatrixColumn(this.camera.matrix,0),sn.crossVectors(this.camera.up,sn),this.camera.position.addScaledVector(sn,e)}),st(this,"moveRight",e=>{sn.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(sn,e)}),st(this,"lock",()=>{this.domElement&&this.domElement.requestPointerLock()}),st(this,"unlock",()=>{this.domElement&&this.domElement.ownerDocument.exitPointerLock()}),this.camera=e,this.domElement=t,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1,t&&this.connect(t)}}var su=function(e){return e.forward="forward",e.backward="backward",e.left="left",e.right="right",e.up="up",e.down="down",e.camera1="camera1",e.camera2="camera2",e.camera3="camera3",e.camera4="camera4",e.camera5="camera5",e.camera6="camera6",e.camera7="camera7",e.camera8="camera8",e.camera9="camera9",e}(su||{});function sc(){let{speedMultiplier:e,setSpeedMultiplier:t}=(0,n2.useControls)(),[r,n]=function(e){let[t,r,n]=eG.useContext(a8);return[t,r]}(),{camera:i,gl:a}=(0,eW.useThree)(),{nextCamera:s,setCameraIndex:o,cameraCount:l}=aL(),u=(0,eG.useRef)(null),c=(0,eG.useRef)(new ek.Vector3),d=(0,eG.useRef)(new ek.Vector3),f=(0,eG.useRef)(new ek.Vector3);return(0,eG.useEffect)(()=>{let e=new sl(i,a.domElement);u.current=e;let t=t=>{e.isLocked?s():t.target===a.domElement&&e.lock()};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t),e.dispose()}},[i,a,s]),(0,eG.useEffect)(()=>{let e=["camera1","camera2","camera3","camera4","camera5","camera6","camera7","camera8","camera9"];return r(t=>{for(let r=0;r{let e=e=>{e.preventDefault();let r=e.deltaY>0?-1:1,n=Math.max(.05,Math.min(.5,Math.abs(.01*e.deltaY)))*r;t(e=>Math.max(.1,Math.min(5,Math.round((e+n)*20)/20)))},r=a.domElement;return r.addEventListener("wheel",e,{passive:!1}),()=>{r.removeEventListener("wheel",e)}},[a]),(0,eX.useFrame)((t,r)=>{let{forward:a,backward:s,left:o,right:l,up:u,down:h}=n();(a||s||o||l||u||h)&&(i.getWorldDirection(c.current),c.current.normalize(),d.current.crossVectors(i.up,c.current).normalize(),f.current.set(0,0,0),a&&f.current.add(c.current),s&&f.current.sub(c.current),o&&f.current.add(d.current),l&&f.current.sub(d.current),u&&(f.current.y+=1),h&&(f.current.y-=1),f.current.lengthSq()>0&&(f.current.normalize().multiplyScalar(80*e*r),i.position.add(f.current)))}),null}let sd=[{name:"forward",keys:["KeyW"]},{name:"backward",keys:["KeyS"]},{name:"left",keys:["KeyA"]},{name:"right",keys:["KeyD"]},{name:"up",keys:["Space"]},{name:"down",keys:["ShiftLeft","ShiftRight"]},{name:"camera1",keys:["Digit1"]},{name:"camera2",keys:["Digit2"]},{name:"camera3",keys:["Digit3"]},{name:"camera4",keys:["Digit4"]},{name:"camera5",keys:["Digit5"]},{name:"camera6",keys:["Digit6"]},{name:"camera7",keys:["Digit7"]},{name:"camera8",keys:["Digit8"]},{name:"camera9",keys:["Digit9"]}];function sf(){return(0,eG.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key||e.metaKey&&e.stopImmediatePropagation()};return window.addEventListener("keydown",e,{capture:!0}),window.addEventListener("keyup",e,{capture:!0}),()=>{window.removeEventListener("keydown",e,{capture:!0}),window.removeEventListener("keyup",e,{capture:!0})}},[]),(0,eU.jsx)(a5,{map:sd,children:(0,eU.jsx)(sc,{})})}var sh=function(){var e;return"undefined"!=typeof window&&!!(null==(e=window.document)?void 0:e.createElement)}();function sp(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function sm(e){return e?"self"in e?e.self:sp(e).defaultView||window:self}function sv(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{activeElement:r}=sp(e);if(!(null==r?void 0:r.nodeName))return null;if(sA(r)&&r.contentDocument)return sv(r.contentDocument.body,t);if(t){let e=r.getAttribute("aria-activedescendant");if(e){let t=sp(r).getElementById(e);if(t)return t}}return r}function sg(e,t){return e===t||e.contains(t)}function sA(e){return"IFRAME"===e.tagName}function sy(e){let t=e.tagName.toLowerCase();return"button"===t||"input"===t&&!!e.type&&-1!==sx.indexOf(e.type)}var sx=["button","color","file","image","reset","submit"];function sB(e){return"function"==typeof e.checkVisibility?e.checkVisibility():e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function sC(e){try{let t=e instanceof HTMLInputElement&&null!==e.selectionStart,r="TEXTAREA"===e.tagName;return t||r||!1}catch(e){return!1}}function sS(e){return e.isContentEditable||sC(e)}function sE(e){let t=0,r=0;if(sC(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let n=sp(e).getSelection();if((null==n?void 0:n.rangeCount)&&n.anchorNode&&sg(e,n.anchorNode)&&n.focusNode&&sg(e,n.focusNode)){let i=n.getRangeAt(0),a=i.cloneRange();a.selectNodeContents(e),a.setEnd(i.startContainer,i.startOffset),t=a.toString().length,a.setEnd(i.endContainer,i.endOffset),r=a.toString().length}}return{start:t,end:r}}function sT(e,t){let r=null==e?void 0:e.getAttribute("role");return r&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(r)?r:t}function sD(e){if(!e)return null;let t=e=>"auto"===e||"scroll"===e;if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:r}=getComputedStyle(e);if(t(r))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:r}=getComputedStyle(e);if(t(r))return e}return sD(e.parentElement)||document.scrollingElement||document.body}function sb(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n{if(n){let t=setTimeout(e,n);return()=>clearTimeout(t)}let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})(()=>{e.removeEventListener(t,a,!0),r()}),a=()=>{i(),r()};return e.addEventListener(t,a,{once:!0,capture:!0}),i}function sZ(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,i=[];try{for(let a of(n.document.addEventListener(e,t,r),Array.from(n.frames)))i.push(sZ(e,t,r,a))}catch(e){}return()=>{try{n.document.removeEventListener(e,t,r)}catch(e){}for(let e of i)e()}}var sY={...eG},sq=sY.useId;sY.useDeferredValue;var s$=sY.useInsertionEffect,s0=sh?eG.useLayoutEffect:eG.useEffect;function s1(e){let t=(0,eG.useRef)(()=>{throw Error("Cannot call an event handler while rendering.")});return s$?s$(()=>{t.current=e}):t.current=e,(0,eG.useCallback)(function(){for(var e,r=arguments.length,n=Array(r),i=0;i{if(t.some(Boolean))return e=>{for(let r of t)sk(r,e)}},t)}function s9(e){if(sq){let t=sq();return e||t}let[t,r]=(0,eG.useState)(e);return s0(()=>{if(e||t)return;let n=Math.random().toString(36).slice(2,8);r("id-".concat(n))},[e,t]),e||t}function s3(e,t){let r=(0,eG.useRef)(!1);(0,eG.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,eG.useEffect)(()=>()=>{r.current=!1},[])}function s4(){return(0,eG.useReducer)(()=>[],[])}function s8(e){return s1("function"==typeof e?e:()=>e)}function s5(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=(0,eG.useCallback)(r=>(e.wrapElement&&(r=e.wrapElement(r)),t(r)),[...r,e.wrapElement]);return{...e,wrapElement:n}}function s6(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0,[r,n]=(0,eG.useState)(null);return{portalRef:s2(n,t),portalNode:r,domReady:!e||r}}var s7=!1,oe=!1,ot=0,or=0;function on(e){(function(e){let t=e.movementX||e.screenX-ot,r=e.movementY||e.screenY-or;return ot=e.screenX,or=e.screenY,t||r||!1})(e)&&(oe=!0)}function oi(){oe=!1}function oa(e){let t=eG.forwardRef((t,r)=>e({...t,ref:r}));return t.displayName=e.displayName||e.name,t}function os(e,t){return eG.memo(e,t)}function oo(e,t){let r,{wrapElement:n,render:i,...a}=t,s=s2(t.ref,i&&(0,eG.isValidElement)(i)&&("ref"in i.props||"ref"in i)?({...i.props}).ref||i.ref:null);if(eG.isValidElement(i)){let e={...i.props,ref:s};r=eG.cloneElement(i,function(e,t){let r={...e};for(let n in t){if(!sI(t,n))continue;if("className"===n){let n="className";r[n]=e[n]?"".concat(e[n]," ").concat(t[n]):t[n];continue}if("style"===n){let n="style";r[n]=e[n]?{...e[n],...t[n]}:t[n];continue}let i=t[n];if("function"==typeof i&&n.startsWith("on")){let t=e[n];if("function"==typeof t){r[n]=function(){for(var e=arguments.length,r=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return e(t)};return t.displayName=e.name,t}function ou(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=eG.createContext(void 0),n=eG.createContext(void 0),i=()=>eG.useContext(r),a=t=>e.reduceRight((e,r)=>(0,eU.jsx)(r,{...t,children:e}),(0,eU.jsx)(r.Provider,{...t}));return{context:r,scopedContext:n,useContext:i,useScopedContext:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=eG.useContext(n),r=i();return e?t:t||r},useProviderContext:()=>{let e=eG.useContext(n),t=i();if(!e||e!==t)return t},ContextProvider:a,ScopedContextProvider:e=>(0,eU.jsx)(a,{...e,children:t.reduceRight((t,r)=>(0,eU.jsx)(r,{...e,children:t}),(0,eU.jsx)(n.Provider,{...e}))})}}var oc=ou(),od=oc.useContext;oc.useScopedContext,oc.useProviderContext;var of=ou([oc.ContextProvider],[oc.ScopedContextProvider]),oh=of.useContext;of.useScopedContext;var op=of.useProviderContext,om=of.ContextProvider,ov=of.ScopedContextProvider,og=(0,eG.createContext)(void 0),oA=(0,eG.createContext)(void 0),oy=(0,eG.createContext)(!0),ox="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function oB(e){return!(!e.matches(ox)||!sB(e)||e.closest("[inert]"))}function oC(e){if(!oB(e)||0>Number.parseInt(e.getAttribute("tabindex")||"0",10))return!1;if(!("form"in e)||!e.form||e.checked||"radio"!==e.type)return!0;let t=e.form.elements.namedItem(e.name);if(!t||!("length"in t))return!0;let r=sv(e);return!r||r===e||!("form"in r)||r.form!==e.form||r.name!==e.name}function oS(e,t){let r=Array.from(e.querySelectorAll(ox));t&&r.unshift(e);let n=r.filter(oB);return n.forEach((e,t)=>{if(sA(e)&&e.contentDocument){let r=e.contentDocument.body;n.splice(t,1,...oS(r))}}),n}function oE(e,t,r){let n=Array.from(e.querySelectorAll(ox)),i=n.filter(oC);return(t&&oC(e)&&i.unshift(e),i.forEach((e,t)=>{if(sA(e)&&e.contentDocument){let n=oE(e.contentDocument.body,!1,r);i.splice(t,1,...n)}}),!i.length&&r)?n:i}function oT(e,t){return function(e,t,r,n){let i=sv(e),a=oS(e,t),s=a.indexOf(i),o=a.slice(s+1);return o.find(oC)||(r?a.find(oC):null)||(n?o[0]:null)||null}(document.body,!1,e,t)}function oD(e,t){return function(e,t,r,n){let i=sv(e),a=oS(e,t).reverse(),s=a.indexOf(i),o=a.slice(s+1);return o.find(oC)||(r?a.find(oC):null)||(n?o[0]:null)||null}(document.body,!1,e,t)}function ob(e){let t=sv(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return!!r&&r===e.id}function oM(e){let t=sv(e);if(!t)return!1;if(sg(e,t))return!0;let r=t.getAttribute("aria-activedescendant");return!!r&&"id"in e&&(r===e.id||!!e.querySelector("#".concat(CSS.escape(r))))}function ow(e){!oM(e)&&oB(e)&&e.focus()}var oF=sK(),oR=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],oI=Symbol("safariFocusAncestor");function oP(e){return"input"===e.tagName.toLowerCase()&&!!e.type&&("radio"===e.type||"checkbox"===e.type)}function oL(e,t){return s1(r=>{null==e||e(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var oU=!1,oG=!0;function oO(e){let t=e.target;t&&"hasAttribute"in t&&!t.hasAttribute("data-focus-visible")&&(oG=!1)}function oH(e){e.metaKey||e.ctrlKey||e.altKey||(oG=!0)}var oN=ol(function(e){var t,r,n,i,a;let{focusable:s=!0,accessibleWhenDisabled:o,autoFocus:l,onFocusVisible:u,...c}=e,d=(0,eG.useRef)(null);(0,eG.useEffect)(()=>{s&&(oU||(sZ("mousedown",oO,!0),sZ("keydown",oH,!0),oU=!0))},[s]),oF&&(0,eG.useEffect)(()=>{if(!s)return;let e=d.current;if(!e||!oP(e))return;let t="labels"in e?e.labels:null;if(!t)return;let r=()=>queueMicrotask(()=>e.focus());for(let e of t)e.addEventListener("mouseup",r);return()=>{for(let e of t)e.removeEventListener("mouseup",r)}},[s]);let f=s&&sO(c),h=!!f&&!o,[p,m]=(0,eG.useState)(!1);(0,eG.useEffect)(()=>{s&&h&&p&&m(!1)},[s,h,p]),(0,eG.useEffect)(()=>{if(!s||!p)return;let e=d.current;if(!e||"undefined"==typeof IntersectionObserver)return;let t=new IntersectionObserver(()=>{oB(e)||m(!1)});return t.observe(e),()=>t.disconnect()},[s,p]);let g=oL(c.onKeyPressCapture,f),A=oL(c.onMouseDownCapture,f),y=oL(c.onClickCapture,f),x=c.onMouseDown,B=s1(e=>{if(null==x||x(e),e.defaultPrevented||!s)return;let t=e.currentTarget;if(!oF||sJ(e)||!sy(t)&&!oP(t))return;let r=!1,n=()=>{r=!0};t.addEventListener("focusin",n,{capture:!0,once:!0});let i=function(e){for(;e&&!oB(e);)e=e.closest(ox);return e||null}(t.parentElement);i&&(i[oI]=!0),s_(t,"mouseup",()=>{t.removeEventListener("focusin",n,!0),i&&(i[oI]=!1),r||ow(t)})}),C=(e,t)=>{if(t&&(e.currentTarget=t),!s)return;let r=e.currentTarget;r&&ob(r)&&(null==u||u(e),e.defaultPrevented||(r.dataset.focusVisible="true",m(!0)))},S=c.onKeyDownCapture,E=s1(e=>{if(null==S||S(e),e.defaultPrevented||!s||p||e.metaKey||e.altKey||e.ctrlKey||!sV(e))return;let t=e.currentTarget;s_(t,"focusout",()=>C(e,t))}),T=c.onFocusCapture,D=s1(e=>{if(null==T||T(e),e.defaultPrevented||!s)return;if(!sV(e))return void m(!1);let t=e.currentTarget;oG||function(e){let{tagName:t,readOnly:r,type:n}=e;return"TEXTAREA"===t&&!r||"SELECT"===t&&!r||("INPUT"!==t||r?!!e.isContentEditable||"combobox"===e.getAttribute("role")&&!!e.dataset.name:oR.includes(n))}(e.target)?s_(e.target,"focusout",()=>C(e,t)):m(!1)}),b=c.onBlur,M=s1(e=>{null==b||b(e),s&&sX(e)&&(e.currentTarget.removeAttribute("data-focus-visible"),m(!1))}),w=(0,eG.useContext)(oy),F=s1(e=>{s&&l&&e&&w&&queueMicrotask(()=>{!ob(e)&&oB(e)&&e.focus()})}),R=function(e,t){let r=e=>{if("string"==typeof e)return e},[n,i]=(0,eG.useState)(()=>r(void 0));return s0(()=>{let t=e&&"current"in e?e.current:e;i((null==t?void 0:t.tagName.toLowerCase())||r(void 0))},[e,t]),n}(d),I=s&&(!R||"button"===R||"summary"===R||"input"===R||"select"===R||"textarea"===R||"a"===R),P=s&&(!R||"button"===R||"input"===R||"select"===R||"textarea"===R),L=c.style,U=(0,eG.useMemo)(()=>h?{pointerEvents:"none",...L}:L,[h,L]);return c={"data-focus-visible":s&&p||void 0,"data-autofocus":l||void 0,"aria-disabled":f||void 0,...c,ref:s2(d,F,c.ref),style:U,tabIndex:(t=s,r=h,n=I,i=P,a=c.tabIndex,t?r?n&&!i?-1:void 0:n?a:a||0:a),disabled:!!P&&!!h||void 0,contentEditable:f?void 0:c.contentEditable,onKeyPressCapture:g,onClickCapture:y,onMouseDownCapture:A,onMouseDown:B,onKeyDownCapture:E,onFocusCapture:D,onBlur:M},sH(c)});function ok(e){let t=[];for(let r of e)t.push(...r);return t}function oj(e){return e.slice().reverse()}function oz(e,t,r){return s1(n=>{var i;if(null==t||t(n),n.defaultPrevented||n.isPropagationStopped()||!sV(n)||"Shift"===n.key||"Control"===n.key||"Alt"===n.key||"Meta"===n.key||function(e){let t=e.target;return(!t||!!sC(t))&&1===e.key.length&&!e.ctrlKey&&!e.metaKey}(n))return;let a=e.getState(),s=null==(i=sM(e,a.activeId))?void 0:i.element;if(!s)return;let{view:o,...l}=n;s!==(null==r?void 0:r.current)&&s.focus(),!function(e,t,r){let n=new KeyboardEvent(t,r);return e.dispatchEvent(n)}(s,n.type,l)&&n.preventDefault(),n.currentTarget.contains(s)&&n.stopPropagation()})}oa(function(e){return oo("div",oN(e))});var oK=ol(function(e){let{store:t,composite:r=!0,focusOnMove:n=r,moveOnKeyPress:i=!0,...a}=e,s=op();sU(t=t||s,!1);let o=(0,eG.useRef)(null),l=(0,eG.useRef)(null),u=function(e){let[t,r]=(0,eG.useState)(!1),n=(0,eG.useCallback)(()=>r(!0),[]),i=e.useState(t=>sM(e,t.activeId));return(0,eG.useEffect)(()=>{let e=null==i?void 0:i.element;t&&e&&(r(!1),e.focus({preventScroll:!0}))},[i,t]),n}(t),c=t.useState("moves"),[,d]=function(e){let[t,r]=(0,eG.useState)(null);return s0(()=>{if(null==t||!e)return;let r=null;return e(e=>(r=e,t)),()=>{e(r)}},[t,e]),[t,r]}(r?t.setBaseElement:null);(0,eG.useEffect)(()=>{var e;if(!t||!c||!r||!n)return;let{activeId:i}=t.getState(),a=null==(e=sM(t,i))?void 0:e.element;a&&("scrollIntoView"in a?(a.focus({preventScroll:!0}),a.scrollIntoView({block:"nearest",inline:"nearest",...void 0})):a.focus())},[t,c,r,n]),s0(()=>{if(!t||!c||!r)return;let{baseElement:e,activeId:n}=t.getState();if(null!==n||!e)return;let i=l.current;l.current=null,i&&sQ(i,{relatedTarget:e}),ob(e)||e.focus()},[t,c,r]);let f=t.useState("activeId"),h=t.useState("virtualFocus");s0(()=>{var e;if(!t||!r||!h)return;let n=l.current;if(l.current=null,!n)return;let i=(null==(e=sM(t,f))?void 0:e.element)||sv(n);i!==n&&sQ(n,{relatedTarget:i})},[t,f,h,r]);let p=oz(t,a.onKeyDownCapture,l),m=oz(t,a.onKeyUpCapture,l),g=a.onFocusCapture,A=s1(e=>{if(null==g||g(e),e.defaultPrevented||!t)return;let{virtualFocus:r}=t.getState();if(!r)return;let n=e.relatedTarget,i=function(e){let t=e[sw];return delete e[sw],t}(e.currentTarget);sV(e)&&i&&(e.stopPropagation(),l.current=n)}),y=a.onFocus,x=s1(e=>{if(null==y||y(e),e.defaultPrevented||!r||!t)return;let{relatedTarget:n}=e,{virtualFocus:i}=t.getState();i?sV(e)&&!sF(t,n)&&queueMicrotask(u):sV(e)&&t.setActiveId(null)}),B=a.onBlurCapture,C=s1(e=>{var r;if(null==B||B(e),e.defaultPrevented||!t)return;let{virtualFocus:n,activeId:i}=t.getState();if(!n)return;let a=null==(r=sM(t,i))?void 0:r.element,s=e.relatedTarget,o=sF(t,s),u=l.current;l.current=null,sV(e)&&o?(s===a?u&&u!==s&&sQ(u,e):a?sQ(a,e):u&&sQ(u,e),e.stopPropagation()):!sF(t,e.target)&&a&&sQ(a,e)}),S=a.onKeyDown,E=s8(i),T=s1(e=>{var r;if(null==S||S(e),e.nativeEvent.isComposing||e.defaultPrevented||!t||!sV(e))return;let{orientation:n,renderedItems:i,activeId:a}=t.getState(),s=sM(t,a);if(null==(r=null==s?void 0:s.element)?void 0:r.isConnected)return;let o="horizontal"!==n,l="vertical"!==n,u=i.some(e=>!!e.rowId);if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&sC(e.currentTarget))return;let c={ArrowUp:(u||o)&&(()=>{if(u){let e=ok(oj(function(e){let t=[];for(let r of e){let e=t.find(e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===r.rowId});e?e.push(r):t.push([r])}return t}(i))).find(e=>!e.disabled);return null==e?void 0:e.id}return null==t?void 0:t.last()}),ArrowRight:(u||l)&&t.first,ArrowDown:(u||o)&&t.first,ArrowLeft:(u||l)&&t.last,Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[e.key];if(c){let r=c();if(void 0!==r){if(!E(e))return;e.preventDefault(),t.move(r)}}});return a=s5(a,e=>(0,eU.jsx)(om,{value:t,children:e}),[t]),a={"aria-activedescendant":t.useState(e=>{var n;if(t&&r&&e.virtualFocus)return null==(n=sM(t,e.activeId))?void 0:n.id}),...a,ref:s2(o,d,a.ref),onKeyDownCapture:p,onKeyUpCapture:m,onFocusCapture:A,onFocus:x,onBlurCapture:C,onKeyDown:T},a=oN({focusable:t.useState(e=>r&&(e.virtualFocus||null===e.activeId)),...a})});oa(function(e){return oo("div",oK(e))});var oJ=ou();oJ.useContext,oJ.useScopedContext;var oV=oJ.useProviderContext,oQ=ou([oJ.ContextProvider],[oJ.ScopedContextProvider]);oQ.useContext,oQ.useScopedContext;var oW=oQ.useProviderContext,oX=oQ.ContextProvider,o_=oQ.ScopedContextProvider,oZ=(0,eG.createContext)(void 0),oY=(0,eG.createContext)(void 0),oq=ou([oX],[o_]);oq.useContext,oq.useScopedContext;var o$=oq.useProviderContext,o0=oq.ContextProvider,o1=oq.ScopedContextProvider,o2=ol(function(e){let{store:t,...r}=e,n=o$();return t=t||n,r={...r,ref:s2(null==t?void 0:t.setAnchorElement,r.ref)}});oa(function(e){return oo("div",o2(e))});var o9=(0,eG.createContext)(void 0),o3=ou([o0,om],[o1,ov]),o4=o3.useContext,o8=o3.useScopedContext,o5=o3.useProviderContext,o6=o3.ContextProvider,o7=o3.ScopedContextProvider,le=(0,eG.createContext)(void 0),lt=(0,eG.createContext)(!1);function lr(e,t){let r=e.__unstableInternals;return sU(r,"Invalid store"),r[t]}function ln(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:d;return r.add(t),p.set(t,e),()=>{var e;null==(e=h.get(t))||e(),h.delete(t),p.delete(t),r.delete(t)}},g=function(e,t){var n,o;let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!sI(i,e))return;let c=(o=i[e],"function"==typeof t?t("function"==typeof o?o():o):t);if(c===i[e])return;if(!l)for(let t of r)null==(n=null==t?void 0:t.setState)||n.call(t,e,c);let m=i;i={...i,[e]:c};let g=Symbol();s=g,u.add(e);let A=(t,r,n)=>{var a;let s=p.get(t);(!s||s.some(t=>n?n.has(t):t===e))&&(null==(a=h.get(t))||a(),h.set(t,t(i,r)))};for(let e of d)A(e,m);queueMicrotask(()=>{if(s!==g)return;let e=i;for(let e of f)A(e,a,u);a=e,u.clear()})},A={getState:()=>i,setState:g,__unstableInternals:{setup:e=>(c.add(e),()=>c.delete(e)),init:()=>{let e=l.size,t=Symbol();l.add(t);let n=()=>{l.delete(t),l.size||o()};if(e)return n;let a=Object.keys(i).map(e=>sP(...r.map(t=>{var r;let n=null==(r=null==t?void 0:t.getState)?void 0:r.call(t);if(n&&sI(n,e))return lo(t,[e],t=>{g(e,t[e],!0)})}))),s=[];for(let e of c)s.push(e());return o=sP(...a,...s,...r.map(la)),n},subscribe:(e,t)=>m(e,t),sync:(e,t)=>(h.set(t,t(i,i)),m(e,t)),batch:(e,t)=>(h.set(t,t(i,a)),m(e,t,f)),pick:e=>ln(function(e,t){let r={};for(let n of t)sI(e,n)&&(r[n]=e[n]);return r}(i,e),A),omit:e=>ln(function(e,t){let r={...e};for(let e of t)sI(r,e)&&delete r[e];return r}(i,e),A)}};return A}function li(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n!e.disabled&&e.value);return(null==n?void 0:n.value)===t}function lh(e,t){return!!t&&null!=e&&(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase()))}var lp=ol(function(e){let{store:t,focusable:r=!0,autoSelect:n=!1,getAutoSelectId:i,setValueOnChange:a,showMinLength:s=0,showOnChange:o,showOnMouseDown:l,showOnClick:u=l,showOnKeyDown:c,showOnKeyPress:d=c,blurActiveItemOnClick:f,setValueOnClick:h=!0,moveOnKeyPress:p=!0,autoComplete:m="list",...g}=e,A=o5();sU(t=t||A,!1);let y=(0,eG.useRef)(null),[x,B]=s4(),C=(0,eG.useRef)(!1),S=(0,eG.useRef)(!1),E=t.useState(e=>e.virtualFocus&&n),T="inline"===m||"both"===m,[D,b]=(0,eG.useState)(T);!function(e,t){let r=(0,eG.useRef)(!1);s0(()=>{if(r.current)return e();r.current=!0},t),s0(()=>()=>{r.current=!1},[])}(()=>{T&&b(!0)},[T]);let M=t.useState("value"),w=(0,eG.useRef)();(0,eG.useEffect)(()=>lo(t,["selectedValue","activeId"],(e,t)=>{w.current=t.selectedValue}),[]);let F=t.useState(e=>{var t;if(T&&D){if(e.activeValue&&Array.isArray(e.selectedValue)&&(e.selectedValue.includes(e.activeValue)||(null==(t=w.current)?void 0:t.includes(e.activeValue))))return;return e.activeValue}}),R=t.useState("renderedItems"),I=t.useState("open"),P=t.useState("contentElement"),L=(0,eG.useMemo)(()=>{if(!T||!D)return M;if(lf(R,F,E)){if(lh(M,F)){let e=(null==F?void 0:F.slice(M.length))||"";return M+e}return M}return F||M},[T,D,R,F,E,M]);(0,eG.useEffect)(()=>{let e=y.current;if(!e)return;let t=()=>b(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}},[]),(0,eG.useEffect)(()=>{if(!T||!D||!F||!lf(R,F,E)||!lh(M,F))return;let e=sR;return queueMicrotask(()=>{let t=y.current;if(!t)return;let{start:r,end:n}=sE(t),i=M.length,a=F.length;sb(t,i,a),e=()=>{if(!ob(t))return;let{start:e,end:s}=sE(t);e===i&&s===a&&sb(t,r,n)}}),()=>e()},[x,T,D,F,R,E,M]);let U=(0,eG.useRef)(null),G=s1(i),O=(0,eG.useRef)(null);(0,eG.useEffect)(()=>{if(!I||!P)return;let e=sD(P);if(!e)return;U.current=e;let r=()=>{C.current=!1},n=()=>{if(!t||!C.current)return;let{activeId:e}=t.getState();null!==e&&e!==O.current&&(C.current=!1)},i={passive:!0,capture:!0};return e.addEventListener("wheel",r,i),e.addEventListener("touchmove",r,i),e.addEventListener("scroll",n,i),()=>{e.removeEventListener("wheel",r,!0),e.removeEventListener("touchmove",r,!0),e.removeEventListener("scroll",n,!0)}},[I,P,t]),s0(()=>{M&&(S.current||(C.current=!0))},[M]),s0(()=>{"always"!==E&&I||(C.current=I)},[E,I]);let H=t.useState("resetValueOnSelect");s3(()=>{var e,r;let n=C.current;if(!t||!I||!n&&!H)return;let{baseElement:i,contentElement:a,activeId:s}=t.getState();if(!i||ob(i)){if(null==a?void 0:a.hasAttribute("data-placing")){let e=new MutationObserver(B);return e.observe(a,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(E&&n){let r=G(R),n=void 0!==r?r:null!=(e=function(e){let t=e.find(e=>{var t;return!e.disabled&&(null==(t=e.element)?void 0:t.getAttribute("role"))!=="tab"});return null==t?void 0:t.id}(R))?e:t.first();O.current=n,t.move(null!=n?n:null)}else{let e=null==(r=t.item(s||t.first()))?void 0:r.element;e&&"scrollIntoView"in e&&e.scrollIntoView({block:"nearest",inline:"nearest"})}}},[t,I,x,M,E,H,G,R]),(0,eG.useEffect)(()=>{if(!T)return;let e=y.current;if(!e)return;let r=[e,P].filter(e=>!!e),n=e=>{r.every(t=>sX(e,t))&&(null==t||t.setValue(L))};for(let e of r)e.addEventListener("focusout",n);return()=>{for(let e of r)e.removeEventListener("focusout",n)}},[T,P,t,L]);let N=e=>e.currentTarget.value.length>=s,k=g.onChange,j=s8(null!=o?o:N),z=s8(null!=a?a:!t.tag),K=s1(e=>{if(null==k||k(e),e.defaultPrevented||!t)return;let r=e.currentTarget,{value:n,selectionStart:i,selectionEnd:a}=r,s=e.nativeEvent;if(C.current=!0,"input"===s.type&&(s.isComposing&&(C.current=!1,S.current=!0),T)){let e="insertText"===s.inputType||"insertCompositionText"===s.inputType,t=i===n.length;b(e&&t)}if(z(e)){let e=n===t.getState().value;t.setValue(n),queueMicrotask(()=>{sb(r,i,a)}),T&&E&&e&&B()}j(e)&&t.show(),E&&C.current||t.setActiveId(null)}),J=g.onCompositionEnd,V=s1(e=>{C.current=!0,S.current=!1,null==J||J(e),!e.defaultPrevented&&E&&B()}),Q=g.onMouseDown,W=s8(null!=f?f:()=>!!(null==t?void 0:t.getState().includesBaseElement)),X=s8(h),_=s8(null!=u?u:N),Z=s1(e=>{null==Q||Q(e),e.defaultPrevented||e.button||e.ctrlKey||t&&(W(e)&&t.setActiveId(null),X(e)&&t.setValue(L),_(e)&&s_(e.currentTarget,"mouseup",t.show))}),Y=g.onKeyDown,q=s8(null!=d?d:N),$=s1(e=>{if(null==Y||Y(e),e.repeat||(C.current=!1),e.defaultPrevented||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||!t)return;let{open:r}=t.getState();!r&&("ArrowUp"===e.key||"ArrowDown"===e.key)&&q(e)&&(e.preventDefault(),t.show())}),ee=g.onBlur,et=s1(e=>{if(C.current=!1,null==ee||ee(e),e.defaultPrevented)return}),er=s9(g.id),en=t.useState(e=>null===e.activeId);return g={id:er,role:"combobox","aria-autocomplete":"inline"===m||"list"===m||"both"===m||"none"===m?m:void 0,"aria-haspopup":sT(P,"listbox"),"aria-expanded":I,"aria-controls":null==P?void 0:P.id,"data-active-item":en||void 0,value:L,...g,ref:s2(y,g.ref),onChange:K,onCompositionEnd:V,onMouseDown:Z,onKeyDown:$,onBlur:et},g=oK({store:t,focusable:r,...g,moveOnKeyPress:e=>!sG(p,e)&&(T&&b(!0),!0)}),{autoComplete:"off",...g=o2({store:t,...g})}}),lm=oa(function(e){return oo("input",lp(e))});function lv(e){let t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var lg=Symbol("composite-hover"),lA=ol(function(e){let{store:t,focusOnHover:r=!0,blurOnHoverEnd:n=!!r,...i}=e,a=oh();sU(t=t||a,!1);let s=((0,eG.useEffect)(()=>{s7||(sZ("mousemove",on,!0),sZ("mousedown",oi,!0),sZ("mouseup",oi,!0),sZ("keydown",oi,!0),sZ("scroll",oi,!0),s7=!0)},[]),s1(()=>oe)),o=i.onMouseMove,l=s8(r),u=s1(e=>{if((null==o||o(e),!e.defaultPrevented&&s())&&l(e)){if(!oM(e.currentTarget)){let e=null==t?void 0:t.getState().baseElement;e&&!ob(e)&&e.focus()}null==t||t.setActiveId(e.currentTarget.id)}}),c=i.onMouseLeave,d=s8(n),f=s1(e=>{var r;null==c||c(e),!(e.defaultPrevented||!s()||function(e){let t=lv(e);return!!t&&sg(e.currentTarget,t)}(e)||function(e){let t=lv(e);if(!t)return!1;do{if(sI(t,lg)&&t[lg])return!0;t=t.parentElement}while(t)return!1}(e))&&l(e)&&d(e)&&(null==t||t.setActiveId(null),null==(r=null==t?void 0:t.getState().baseElement)||r.focus())}),h=(0,eG.useCallback)(e=>{e&&(e[lg]=!0)},[]);return sH(i={...i,ref:s2(h,i.ref),onMouseMove:u,onMouseLeave:f})});os(oa(function(e){return oo("div",lA(e))}));var ly=ol(function(e){let{store:t,shouldRegisterItem:r=!0,getItem:n=sL,element:i,...a}=e,s=od();t=t||s;let o=s9(a.id),l=(0,eG.useRef)(i);return(0,eG.useEffect)(()=>{let e=l.current;if(!o||!e||!r)return;let i=n({id:o,element:e});return null==t?void 0:t.renderItem(i)},[o,r,n,t]),sH(a={...a,ref:s2(l,a.ref)})});function lx(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return"Enter"===e.key?sy(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(sy(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}oa(function(e){return oo("div",ly(e))});var lB=Symbol("command"),lC=ol(function(e){let{clickOnEnter:t=!0,clickOnSpace:r=!0,...n}=e,i=(0,eG.useRef)(null),[a,s]=(0,eG.useState)(!1);(0,eG.useEffect)(()=>{i.current&&s(sy(i.current))},[]);let[o,l]=(0,eG.useState)(!1),u=(0,eG.useRef)(!1),c=sO(n),[d,f]=function(e,t,r){let n=e.onLoadedMetadataCapture,i=(0,eG.useMemo)(()=>Object.assign(()=>{},{...n,[t]:r}),[n,t,r]);return[null==n?void 0:n[t],{onLoadedMetadataCapture:i}]}(n,lB,!0),h=n.onKeyDown,p=s1(e=>{null==h||h(e);let n=e.currentTarget;if(e.defaultPrevented||d||c||!sV(e)||sC(n)||n.isContentEditable)return;let i=t&&"Enter"===e.key,a=r&&" "===e.key,s="Enter"===e.key&&!t,o=" "===e.key&&!r;if(s||o)return void e.preventDefault();if(i||a){let t=lx(e);if(i){if(!t){e.preventDefault();let{view:t,...r}=e,i=()=>sW(n,r);sh&&/firefox\//i.test(navigator.userAgent)?s_(n,"keyup",i):queueMicrotask(i)}}else a&&(u.current=!0,t||(e.preventDefault(),l(!0)))}}),m=n.onKeyUp,g=s1(e=>{if(null==m||m(e),e.defaultPrevented||d||c||e.metaKey)return;let t=r&&" "===e.key;if(u.current&&t&&(u.current=!1,!lx(e))){e.preventDefault(),l(!1);let t=e.currentTarget,{view:r,...n}=e;queueMicrotask(()=>sW(t,n))}});return oN(n={"data-active":o||void 0,type:a?"button":void 0,...f,...n,ref:s2(i,n.ref),onKeyDown:p,onKeyUp:g})});oa(function(e){return oo("button",lC(e))});var{useSyncExternalStore:lS}=e.i(2239).default,lE=()=>()=>{};function lT(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sL,r=eG.useCallback(t=>e?ls(e,null,t):lE(),[e]),n=()=>{let r="string"==typeof t?t:null,n="function"==typeof t?t:null,i=null==e?void 0:e.getState();return n?n(i):i&&r&&sI(i,r)?i[r]:void 0};return lS(r,n,n)}function lD(e,t){let r=eG.useRef({}),n=eG.useCallback(t=>e?ls(e,null,t):lE(),[e]),i=()=>{let n=null==e?void 0:e.getState(),i=!1,a=r.current;for(let e in t){let r=t[e];if("function"==typeof r){let t=r(n);t!==a[e]&&(a[e]=t,i=!0)}if("string"==typeof r){if(!n||!sI(n,r))continue;let t=n[r];t!==a[e]&&(a[e]=t,i=!0)}}return i&&(r.current={...a}),r.current};return lS(n,i,i)}function lb(e,t,r,n){let i=sI(t,r)?t[r]:void 0,a=function(e){let t=(0,eG.useRef)(e);return s0(()=>{t.current=e}),t}({value:i,setValue:n?t[n]:void 0});s0(()=>lo(e,[r],(e,t)=>{let{value:n,setValue:i}=a.current;i&&e[r]!==t[r]&&e[r]!==n&&i(e[r])}),[e,r]),s0(()=>{if(void 0!==i)return e.setState(r,i),ll(e,[r],()=>{void 0!==i&&e.setState(r,i)})})}function lM(e,t){let[r,n]=eG.useState(()=>e(t));s0(()=>la(r),[r]);let i=eG.useCallback(e=>lT(r,e),[r]);return[eG.useMemo(()=>({...r,useState:i}),[r,i]),s1(()=>{n(r=>e({...t,...r.getState()}))})]}function lw(e,t,r){var n;let i,a,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t||!r)return;let{renderedItems:o}=t.getState(),l=sD(e);if(!l)return;let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.clientHeight,{top:n}=e.getBoundingClientRect(),i=1.5*Math.max(.875*r,r-40),a=t?r-i+n:i+n;return"HTML"===e.tagName?a+e.scrollTop:a}(l,s);for(let e=0;e1&&void 0!==arguments[1]&&arguments[1],{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}(l,s)-u,d=Math.abs(c);if(s&&c<=0||!s&&c>=0){void 0!==a&&ar||(e&&(null==h?void 0:h.baseElement)&&h.baseElement===e.baseElement?h.id:void 0),baseElement:e=>(null==e?void 0:e.baseElement)||void 0,isActiveItem:e=>!!e&&e.activeId===d,ariaSetSize:e=>null!=o?o:e&&(null==h?void 0:h.ariaSetSize)&&h.baseElement===e.baseElement?h.ariaSetSize:void 0,ariaPosInSet(e){if(null!=l)return l;if(!e||!(null==h?void 0:h.ariaPosInSet)||h.baseElement!==e.baseElement)return;let t=e.renderedItems.filter(e=>e.rowId===m);return h.ariaPosInSet+t.findIndex(e=>e.id===d)},isTabbable(e){if(!(null==e?void 0:e.renderedItems.length))return!0;if(e.virtualFocus)return!1;if(a)return!0;if(null===e.activeId)return!1;let r=null==t?void 0:t.item(e.activeId);return null!=r&&!!r.disabled||null==r||!r.element||e.activeId===d}}),C=(0,eG.useCallback)(e=>{var t;let r={...e,id:d||e.id,rowId:m,disabled:!!p,children:null==(t=e.element)?void 0:t.textContent};return s?s(r):r},[d,m,p,s]),S=u.onFocus,E=(0,eG.useRef)(!1),T=s1(e=>{var r,n;if(null==S||S(e),e.defaultPrevented||sJ(e)||!d||!t||(r=t,!sV(e)&&sF(r,e.target)))return;let{virtualFocus:i,baseElement:a}=t.getState();if(t.setActiveId(d),sS(e.currentTarget)&&function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(sC(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=sp(e).getSelection();null==r||r.selectAllChildren(e),t&&(null==r||r.collapseToEnd())}}(e.currentTarget),i&&sV(e))!sS(n=e.currentTarget)&&("INPUT"!==n.tagName||sy(n))&&(null==a?void 0:a.isConnected)&&((sK()&&e.currentTarget.hasAttribute("data-autofocus")&&e.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),E.current=!0,e.relatedTarget===a||sF(t,e.relatedTarget))?(a[sw]=!0,a.focus({preventScroll:!0})):a.focus())}),D=u.onBlurCapture,b=s1(e=>{if(null==D||D(e),e.defaultPrevented)return;let r=null==t?void 0:t.getState();(null==r?void 0:r.virtualFocus)&&E.current&&(E.current=!1,e.preventDefault(),e.stopPropagation())}),M=u.onKeyDown,w=s8(n),F=s8(i),R=s1(e=>{if(null==M||M(e),e.defaultPrevented||!sV(e)||!t)return;let{currentTarget:r}=e,n=t.getState(),i=t.item(d),a=!!(null==i?void 0:i.rowId),s="horizontal"!==n.orientation,o="vertical"!==n.orientation,l=()=>!(!a&&!o&&n.baseElement&&sC(n.baseElement)),u={ArrowUp:(a||s)&&t.up,ArrowRight:(a||o)&&t.next,ArrowDown:(a||s)&&t.down,ArrowLeft:(a||o)&&t.previous,Home:()=>{if(l())return!a||e.ctrlKey?null==t?void 0:t.first():null==t?void 0:t.previous(-1)},End:()=>{if(l())return!a||e.ctrlKey?null==t?void 0:t.last():null==t?void 0:t.next(-1)},PageUp:()=>lw(r,t,null==t?void 0:t.up,!0),PageDown:()=>lw(r,t,null==t?void 0:t.down)}[e.key];if(u){if(sS(r)){let t=sE(r),n=o&&"ArrowLeft"===e.key,i=o&&"ArrowRight"===e.key,a=s&&"ArrowUp"===e.key,l=s&&"ArrowDown"===e.key;if(i||l){let{length:e}=function(e){if(sC(e))return e.value;if(e.isContentEditable){let t=sp(e).createRange();return t.selectNodeContents(e),t.toString()}return""}(r);if(t.end!==e)return}else if((n||a)&&0!==t.start)return}let n=u();if(w(e)||void 0!==n){if(!F(e))return;e.preventDefault(),t.move(n)}}}),I=(0,eG.useMemo)(()=>({id:d,baseElement:g}),[d,g]);return u={id:d,"data-active-item":A||void 0,...u=s5(u,e=>(0,eU.jsx)(og.Provider,{value:I,children:e}),[I]),ref:s2(f,u.ref),tabIndex:B?u.tabIndex:-1,onFocus:T,onBlurCapture:b,onKeyDown:R},u=lC(u),sH({...u=ly({store:t,...u,getItem:C,shouldRegisterItem:!!d&&u.shouldRegisterItem}),"aria-setsize":y,"aria-posinset":x})});os(oa(function(e){return oo("button",lF(e))}));var lR=ol(function(e){var t,r;let{store:n,value:i,hideOnClick:a,setValueOnClick:s,selectValueOnClick:o=!0,resetValueOnSelect:l,focusOnHover:u=!1,moveOnKeyPress:c=!0,getItem:d,...f}=e,h=o8();sU(n=n||h,!1);let{resetValueOnSelectState:p,multiSelectable:m,selected:g}=lD(n,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable:e=>Array.isArray(e.selectedValue),selected:e=>(function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)})(e.selectedValue,i)}),A=(0,eG.useCallback)(e=>{let t={...e,value:i};return d?d(t):t},[i,d]);s=null!=s?s:!m,a=null!=a?a:null!=i&&!m;let y=f.onClick,x=s8(s),B=s8(o),C=s8(null!=(t=null!=l?l:p)?t:m),S=s8(a),E=s1(e=>{null==y||y(e),!(e.defaultPrevented||function(e){let t=e.currentTarget;if(!t)return!1;let r=t.tagName.toLowerCase();return!!e.altKey&&("a"===r||"button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type)}(e))&&!function(e){let t=e.currentTarget;if(!t)return!1;let r=sz();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let n=t.tagName.toLowerCase();return"a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type}(e)&&(null!=i&&(B(e)&&(C(e)&&(null==n||n.resetValue()),null==n||n.setSelectedValue(e=>Array.isArray(e)?e.includes(i)?e.filter(e=>e!==i):[...e,i]:i)),x(e)&&(null==n||n.setValue(i))),S(e)&&(null==n||n.hide()))}),T=f.onKeyDown,D=s1(e=>{if(null==T||T(e),e.defaultPrevented)return;let t=null==n?void 0:n.getState().baseElement;!(!t||ob(t))&&(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask(()=>t.focus()),sC(t)&&(null==n||n.setValue(t.value)))});m&&null!=g&&(f={"aria-selected":g,...f}),f=s5(f,e=>(0,eU.jsx)(le.Provider,{value:i,children:(0,eU.jsx)(lt.Provider,{value:null!=g&&g,children:e})}),[i,g]),f={role:null!=(r=({menu:"menuitem",listbox:"option",tree:"treeitem"})[(0,eG.useContext)(o9)])?r:"option",children:i,...f,onClick:E,onKeyDown:D};let b=s8(c);return f=lF({store:n,...f,getItem:A,moveOnKeyPress:e=>{if(!b(e))return!1;let t=new Event("combobox-item-move"),r=null==n?void 0:n.getState().baseElement;return null==r||r.dispatchEvent(t),!0}}),f=lA({store:n,focusOnHover:u,...f})}),lI=os(oa(function(e){return oo("div",lR(e))})),lP=e.i(74080);function lL(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function lU(){for(var e=arguments.length,t=Array(e),r=0;r{let r=t.endsWith("ms")?1:1e3,n=Number.parseFloat(t||"0s")*r;return n>e?n:e},0)}function lG(e,t,r){return!r&&!1!==t&&(!e||!!t)}var lO=ol(function(e){let{store:t,alwaysVisible:r,...n}=e,i=oV();sU(t=t||i,!1);let a=(0,eG.useRef)(null),s=s9(n.id),[o,l]=(0,eG.useState)(null),u=t.useState("open"),c=t.useState("mounted"),d=t.useState("animated"),f=t.useState("contentElement"),h=lT(t.disclosure,"contentElement");s0(()=>{a.current&&(null==t||t.setContentElement(a.current))},[t]),s0(()=>{let e;return null==t||t.setState("animated",t=>(e=t,!0)),()=>{void 0!==e&&(null==t||t.setState("animated",e))}},[t]),s0(()=>{if(d){var e;let t;return(null==f?void 0:f.isConnected)?(e=()=>{l(u?"enter":c?"leave":null)},t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)}),()=>cancelAnimationFrame(t)):void l(null)}},[d,f,u,c]),s0(()=>{if(!t||!d||!o||!f)return;let e=()=>null==t?void 0:t.setState("animating",!1),r=()=>(0,lP.flushSync)(e);if("leave"===o&&u||"enter"===o&&!u)return;if("number"==typeof d)return lL(d,r);let{transitionDuration:n,animationDuration:i,transitionDelay:a,animationDelay:s}=getComputedStyle(f),{transitionDuration:l="0",animationDuration:c="0",transitionDelay:p="0",animationDelay:m="0"}=h?getComputedStyle(h):{},g=lU(a,s,p,m)+lU(n,i,l,c);if(!g){"enter"===o&&t.setState("animated",!1),e();return}return lL(Math.max(g-1e3/60,0),r)},[t,d,f,h,u,o]);let p=lG(c,(n=s5(n,e=>(0,eU.jsx)(o_,{value:t,children:e}),[t])).hidden,r),m=n.style,g=(0,eG.useMemo)(()=>p?{...m,display:"none"}:m,[p,m]);return sH(n={id:s,"data-open":u||void 0,"data-enter":"enter"===o||void 0,"data-leave":"leave"===o||void 0,hidden:p,...n,ref:s2(s?t.setContentElement:null,a,n.ref),style:g})}),lH=oa(function(e){return oo("div",lO(e))});oa(function(e){let{unmountOnHide:t,...r}=e,n=oV();return!1===lT(r.store||n,e=>!t||(null==e?void 0:e.mounted))?null:(0,eU.jsx)(lH,{...r})});var lN=ol(function(e){let{store:t,alwaysVisible:r,...n}=e,i=o8(!0),a=o4(),s=!!(t=t||a)&&t===i;sU(t,!1);let o=(0,eG.useRef)(null),l=s9(n.id),u=t.useState("mounted"),c=lG(u,n.hidden,r),d=c?{...n.style,display:"none"}:n.style,f=t.useState(e=>Array.isArray(e.selectedValue)),h=function(e,t,r){let n=function(e){let[t]=(0,eG.useState)(e);return t}(r),[i,a]=(0,eG.useState)(n);return(0,eG.useEffect)(()=>{let r=e&&"current"in e?e.current:e;if(!r)return;let i=()=>{let e=r.getAttribute(t);a(null==e?n:e)},s=new MutationObserver(i);return s.observe(r,{attributeFilter:[t]}),i(),()=>s.disconnect()},[e,t,n]),i}(o,"role",n.role),p="listbox"===h||"tree"===h||"grid"===h,[m,g]=(0,eG.useState)(!1),A=t.useState("contentElement");s0(()=>{if(!u)return;let e=o.current;if(!e||A!==e)return;let t=()=>{g(!!e.querySelector("[role='listbox']"))},r=new MutationObserver(t);return r.observe(e,{subtree:!0,childList:!0,attributeFilter:["role"]}),t(),()=>r.disconnect()},[u,A]),m||(n={role:"listbox","aria-multiselectable":p&&f||void 0,...n}),n=s5(n,e=>(0,eU.jsx)(o7,{value:t,children:(0,eU.jsx)(o9.Provider,{value:h,children:e})}),[t,h]);let y=!l||i&&s?null:t.setContentElement;return sH(n={id:l,hidden:c,...n,ref:s2(y,o,n.ref),style:d})}),lk=oa(function(e){return oo("div",lN(e))}),lj=(0,eG.createContext)(null),lz=ol(function(e){return{...e,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px",...e.style}}});oa(function(e){return oo("span",lz(e))});var lK=ol(function(e){return lz(e={"data-focus-trap":"",tabIndex:0,"aria-hidden":!0,...e,style:{position:"fixed",top:0,left:0,...e.style}})}),lJ=oa(function(e){return oo("span",lK(e))});function lV(e){queueMicrotask(()=>{null==e||e.focus()})}var lQ=ol(function(e){let{preserveTabOrder:t,preserveTabOrderAnchor:r,portalElement:n,portalRef:i,portal:a=!0,...s}=e,o=(0,eG.useRef)(null),l=s2(o,s.ref),u=(0,eG.useContext)(lj),[c,d]=(0,eG.useState)(null),[f,h]=(0,eG.useState)(null),p=(0,eG.useRef)(null),m=(0,eG.useRef)(null),g=(0,eG.useRef)(null),A=(0,eG.useRef)(null);return s0(()=>{let e=o.current;if(!e||!a)return void d(null);let t=n?"function"==typeof n?n(e):n:sp(e).createElement("div");if(!t)return void d(null);let r=t.isConnected;if(r||(u||sp(e).body).appendChild(t),t.id||(t.id=e.id?"portal/".concat(e.id):function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";return"".concat(e?"".concat(e,"-"):"").concat(Math.random().toString(36).slice(2,8))}()),d(t),sk(i,t),!r)return()=>{t.remove(),sk(i,null)}},[a,n,u,i]),s0(()=>{if(!a||!t||!r)return;let e=sp(r).createElement("span");return e.style.position="fixed",r.insertAdjacentElement("afterend",e),h(e),()=>{e.remove(),h(null)}},[a,t,r]),(0,eG.useEffect)(()=>{if(!c||!t)return;let e=0,r=t=>{if(!sX(t))return;let r="focusin"===t.type;if(cancelAnimationFrame(e),r){let e=c.querySelectorAll("[data-tabindex]"),t=e=>{let t=e.getAttribute("data-tabindex");e.removeAttribute("data-tabindex"),t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")};for(let r of(c.hasAttribute("data-tabindex")&&t(c),e))t(r);return}e=requestAnimationFrame(()=>{for(let e of oE(c,!0))!function(e){var t;let r=null!=(t=e.getAttribute("tabindex"))?t:"";e.setAttribute("data-tabindex",r),e.setAttribute("tabindex","-1")}(e)})};return c.addEventListener("focusin",r,!0),c.addEventListener("focusout",r,!0),()=>{cancelAnimationFrame(e),c.removeEventListener("focusin",r,!0),c.removeEventListener("focusout",r,!0)}},[c,t]),s={...s=s5(s,e=>{if(e=(0,eU.jsx)(lj.Provider,{value:c||u,children:e}),!a)return e;if(!c)return(0,eU.jsx)("span",{ref:l,id:s.id,style:{position:"fixed"},hidden:!0});e=(0,eU.jsxs)(eU.Fragment,{children:[t&&c&&(0,eU.jsx)(lJ,{ref:m,"data-focus-trap":s.id,className:"__focus-trap-inner-before",onFocus:e=>{sX(e,c)?lV(oT()):lV(p.current)}}),e,t&&c&&(0,eU.jsx)(lJ,{ref:g,"data-focus-trap":s.id,className:"__focus-trap-inner-after",onFocus:e=>{sX(e,c)?lV(oD()):lV(A.current)}})]}),c&&(e=(0,lP.createPortal)(e,c));let r=(0,eU.jsxs)(eU.Fragment,{children:[t&&c&&(0,eU.jsx)(lJ,{ref:p,"data-focus-trap":s.id,className:"__focus-trap-outer-before",onFocus:e=>{e.relatedTarget!==A.current&&sX(e,c)?lV(m.current):lV(oD())}}),t&&(0,eU.jsx)("span",{"aria-owns":null==c?void 0:c.id,style:{position:"fixed"}}),t&&c&&(0,eU.jsx)(lJ,{ref:A,"data-focus-trap":s.id,className:"__focus-trap-outer-after",onFocus:e=>{if(sX(e,c))lV(g.current);else{let e=oT();if(e===m.current)return void requestAnimationFrame(()=>{var e;return null==(e=oT())?void 0:e.focus()});lV(e)}}})]});return f&&t&&(r=(0,lP.createPortal)(r,f)),(0,eU.jsxs)(eU.Fragment,{children:[r,e]})},[c,u,a,s.id,t,f]),ref:l}});oa(function(e){return oo("div",lQ(e))});var lW=(0,eG.createContext)(0);function lX(e){let{level:t,children:r}=e,n=(0,eG.useContext)(lW),i=Math.max(Math.min(t||n+1,6),1);return(0,eU.jsx)(lW.Provider,{value:i,children:r})}var l_=ol(function(e){let{autoFocusOnShow:t=!0,...r}=e;return s5(r,e=>(0,eU.jsx)(oy.Provider,{value:t,children:e}),[t])});oa(function(e){return oo("div",l_(e))});var lZ=new WeakMap;function lY(e,t,r){lZ.has(e)||lZ.set(e,new Map);let n=lZ.get(e),i=n.get(t);if(!i)return n.set(t,r()),()=>{var e;null==(e=n.get(t))||e(),n.delete(t)};let a=r(),s=()=>{a(),i(),n.delete(t)};return n.set(t,s),()=>{n.get(t)===s&&(a(),n.set(t,i))}}function lq(e,t,r){return lY(e,t,()=>{let n=e.getAttribute(t);return e.setAttribute(t,r),()=>{null==n?e.removeAttribute(t):e.setAttribute(t,n)}})}function l$(e,t,r){return lY(e,t,()=>{let n=t in e,i=e[t];return e[t]=r,()=>{n?e[t]=i:delete e[t]}})}function l0(e,t){return e?lY(e,"style",()=>{let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}):()=>{}}var l1=["SCRIPT","STYLE"];function l2(e){return"__ariakit-dialog-snapshot-".concat(e)}function l9(e,t,r,n){for(let i of t){if(!(null==i?void 0:i.isConnected))continue;let a=t.some(e=>!!e&&e!==i&&e.contains(i)),s=sp(i),o=i;for(;i.parentElement&&i!==s.body;){if(null==n||n(i.parentElement,o),!a)for(let n of i.parentElement.children)(function(e,t,r){return!l1.includes(t.tagName)&&!!function(e,t){let r=sp(t),n=l2(e);if(!r.body[n])return!0;for(;;){if(t===r.body)return!1;if(t[n])return!0;if(!t.parentElement)return!1;t=t.parentElement}}(e,t)&&!r.some(e=>e&&sg(t,e))})(e,n,t)&&r(n,o);i=i.parentElement}}}function l3(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ni===e))}function l4(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"__ariakit-dialog-".concat(t?"ancestor":"outside").concat(e?"-".concat(e):"")}function l8(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return sP(l$(e,l4("",!0),!0),l$(e,l4(t,!0),!0))}function l5(e,t){if(e[l4(t,!0)])return!0;let r=l4(t);for(;;){if(e[r])return!0;if(!e.parentElement)return!1;e=e.parentElement}}function l6(e,t){let r=[],n=t.map(e=>null==e?void 0:e.id);return l9(e,t,t=>{l3(t,...n)||r.unshift(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return sP(l$(e,l4(),!0),l$(e,l4(t),!0))}(t,e))},(t,n)=>{n.hasAttribute("data-dialog")&&n.id!==e||r.unshift(l8(t,e))}),()=>{for(let e of r)e()}}function l7(e){let{store:t,type:r,listener:n,capture:i,domReady:a}=e,s=s1(n),o=lT(t,"open"),l=(0,eG.useRef)(!1);s0(()=>{if(!o||!a)return;let{contentElement:e}=t.getState();if(!e)return;let r=()=>{l.current=!0};return e.addEventListener("focusin",r,!0),()=>e.removeEventListener("focusin",r,!0)},[t,o,a]),(0,eG.useEffect)(()=>{if(o)return sZ(r,e=>{let{contentElement:r,disclosureElement:n}=t.getState(),i=e.target;if(r&&i)!(!("HTML"===i.tagName||sg(sp(i).body,i))||sg(r,i)||function(e,t){if(!e)return!1;if(sg(e,t))return!0;let r=t.getAttribute("aria-activedescendant");if(r){let t=sp(e).getElementById(r);if(t)return sg(e,t)}return!1}(n,i)||i.hasAttribute("data-focus-trap")||function(e,t){if(!("clientY"in e))return!1;let r=t.getBoundingClientRect();return 0!==r.width&&0!==r.height&&r.top<=e.clientY&&e.clientY<=r.top+r.height&&r.left<=e.clientX&&e.clientX<=r.left+r.width}(e,r))&&(!l.current||l5(i,r.id))&&(i&&i[oI]||s(e))},i)},[o,i])}function ue(e,t){return"function"==typeof e?e(t):!!e}var ut=(0,eG.createContext)({});function ur(){return"inert"in HTMLElement.prototype}function un(e,t){if(!("style"in e))return sR;if(ur())return l$(e,"inert",!0);let r=oE(e,!0).map(e=>{if(null==t?void 0:t.some(t=>t&&sg(t,e)))return sR;let r=lY(e,"focus",()=>(e.focus=sR,()=>{delete e.focus}));return sP(lq(e,"tabindex","-1"),r)});return sP(...r,lq(e,"aria-hidden","true"),l0(e,{pointerEvents:"none",userSelect:"none",cursor:"default"}))}function ui(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lc(e.store,lu(e.disclosure,["contentElement","disclosureElement"]));ld(e,t);let r=null==t?void 0:t.getState(),n=sN(e.open,null==r?void 0:r.open,e.defaultOpen,!1),i=sN(e.animated,null==r?void 0:r.animated,!1),a=ln({open:n,animated:i,animating:!!i&&n,mounted:n,contentElement:sN(null==r?void 0:r.contentElement,null),disclosureElement:sN(null==r?void 0:r.disclosureElement,null)},t);return li(a,()=>lo(a,["animated","animating"],e=>{e.animated||a.setState("animating",!1)})),li(a,()=>ls(a,["open"],()=>{a.getState().animated&&a.setState("animating",!0)})),li(a,()=>lo(a,["open","animating"],e=>{a.setState("mounted",e.open||e.animating)})),{...a,disclosure:e.disclosure,setOpen:e=>a.setState("open",e),show:()=>a.setState("open",!0),hide:()=>a.setState("open",!1),toggle:()=>a.setState("open",e=>!e),stopAnimation:()=>a.setState("animating",!1),setContentElement:e=>a.setState("contentElement",e),setDisclosureElement:e=>a.setState("disclosureElement",e)}}function ua(e,t,r){return s3(t,[r.store,r.disclosure]),lb(e,r,"open","setOpen"),lb(e,r,"mounted","setMounted"),lb(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}ol(function(e){return e});var us=oa(function(e){return oo("div",e)});function uo(e){let{store:t,backdrop:r,alwaysVisible:n,hidden:i}=e,a=(0,eG.useRef)(null),s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,r]=lM(ui,e);return ua(t,r,e)}({disclosure:t}),o=lT(t,"contentElement");(0,eG.useEffect)(()=>{let e=a.current;e&&o&&(e.style.zIndex=getComputedStyle(o).zIndex)},[o]),s0(()=>{let e=null==o?void 0:o.id;if(!e)return;let t=a.current;if(t)return l8(t,e)},[o]);let l=lO({ref:a,store:s,role:"presentation","data-backdrop":(null==o?void 0:o.id)||"",alwaysVisible:n,hidden:null!=i?i:void 0,style:{position:"fixed",top:0,right:0,bottom:0,left:0}});if(!r)return null;if((0,eG.isValidElement)(r))return(0,eU.jsx)(us,{...l,render:r});let u="boolean"!=typeof r?r:"div";return(0,eU.jsx)(us,{...l,render:(0,eU.jsx)(u,{})})}function ul(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ui(e)}Object.assign(us,["a","button","details","dialog","div","form","h1","h2","h3","h4","h5","h6","header","img","input","label","li","nav","ol","p","section","select","span","summary","textarea","ul","svg"].reduce((e,t)=>(e[t]=oa(function(e){return oo(t,e)}),e),{}));var uu=sK();function uc(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;let r="current"in e?e.current:e;return r?t?oB(r)?r:null:r:null}var ud=ol(function(e){let{store:t,open:r,onClose:n,focusable:i=!0,modal:a=!0,portal:s=!!a,backdrop:o=!!a,hideOnEscape:l=!0,hideOnInteractOutside:u=!0,getPersistentElements:c,preventBodyScroll:d=!!a,autoFocusOnShow:f=!0,autoFocusOnHide:h=!0,initialFocus:p,finalFocus:m,unmountOnHide:g,unstable_treeSnapshotKey:A,...y}=e,x=oW(),B=(0,eG.useRef)(null),C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,r]=lM(ul,e);return ua(t,r,e)}({store:t||x,open:r,setOpen(e){if(e)return;let t=B.current;if(!t)return;let r=new Event("close",{bubbles:!1,cancelable:!0});n&&t.addEventListener("close",n,{once:!0}),t.dispatchEvent(r),r.defaultPrevented&&C.setOpen(!0)}}),{portalRef:S,domReady:E}=s6(s,y.portalRef),T=y.preserveTabOrder,D=lT(C,e=>T&&!a&&e.mounted),b=s9(y.id),M=lT(C,"open"),w=lT(C,"mounted"),F=lT(C,"contentElement"),R=lG(w,y.hidden,y.alwaysVisible),I=function(e){let{attribute:t,contentId:r,contentElement:n,enabled:i}=e,[a,s]=s4(),o=(0,eG.useCallback)(()=>{if(!i||!n)return!1;let{body:e}=sp(n),a=e.getAttribute(t);return!a||a===r},[a,i,n,t,r]);return(0,eG.useEffect)(()=>{if(!i||!r||!n)return;let{body:e}=sp(n);if(o())return e.setAttribute(t,r),()=>e.removeAttribute(t);let a=new MutationObserver(()=>(0,lP.flushSync)(s));return a.observe(e,{attributeFilter:[t]}),()=>a.disconnect()},[a,i,r,n,o,t]),o}({attribute:"data-dialog-prevent-body-scroll",contentElement:F,contentId:b,enabled:d&&!R});(0,eG.useEffect)(()=>{var e,t;if(!I()||!F)return;let r=sp(F),n=sm(F),{documentElement:i,body:a}=r,s=i.style.getPropertyValue("--scrollbar-width"),o=s?Number.parseInt(s,10):n.innerWidth-i.clientWidth,l=Math.round(i.getBoundingClientRect().left)+i.scrollLeft?"paddingLeft":"paddingRight",u=sz()&&!(sh&&navigator.platform.startsWith("Mac")&&!sj());return sP((e="--scrollbar-width",t="".concat(o,"px"),i?lY(i,e,()=>{let r=i.style.getPropertyValue(e);return i.style.setProperty(e,t),()=>{r?i.style.setProperty(e,r):i.style.removeProperty(e)}}):()=>{}),u?(()=>{var e,t;let{scrollX:r,scrollY:i,visualViewport:s}=n,u=null!=(e=null==s?void 0:s.offsetLeft)?e:0,c=null!=(t=null==s?void 0:s.offsetTop)?t:0,d=l0(a,{position:"fixed",overflow:"hidden",top:"".concat(-(i-Math.floor(c)),"px"),left:"".concat(-(r-Math.floor(u)),"px"),right:"0",[l]:"".concat(o,"px")});return()=>{d(),n.scrollTo({left:r,top:i,behavior:"instant"})}})():l0(a,{overflow:"hidden",[l]:"".concat(o,"px")}))},[I,F]);let P=function(e){let t=(0,eG.useRef)();return(0,eG.useEffect)(()=>{if(!e){t.current=null;return}return sZ("mousedown",e=>{t.current=e.target},!0)},[e]),t}(lT(C,"open")),L={store:C,domReady:E,capture:!0};l7({...L,type:"click",listener:e=>{let{contentElement:t}=C.getState(),r=P.current;r&&sB(r)&&l5(r,null==t?void 0:t.id)&&ue(u,e)&&C.hide()}}),l7({...L,type:"focusin",listener:e=>{let{contentElement:t}=C.getState();t&&e.target!==sp(t)&&ue(u,e)&&C.hide()}}),l7({...L,type:"contextmenu",listener:e=>{ue(u,e)&&C.hide()}});let{wrapElement:U,nestedDialogs:G}=function(e){let t=(0,eG.useContext)(ut),[r,n]=(0,eG.useState)([]),i=(0,eG.useCallback)(e=>{var r;return n(t=>[...t,e]),sP(null==(r=t.add)?void 0:r.call(t,e),()=>{n(t=>t.filter(t=>t!==e))})},[t]);s0(()=>lo(e,["open","contentElement"],r=>{var n;if(r.open&&r.contentElement)return null==(n=t.add)?void 0:n.call(t,e)}),[e,t]);let a=(0,eG.useMemo)(()=>({store:e,add:i}),[e,i]);return{wrapElement:(0,eG.useCallback)(e=>(0,eU.jsx)(ut.Provider,{value:a,children:e}),[a]),nestedDialogs:r}}(C);y=s5(y,U,[U]),s0(()=>{if(!M)return;let e=B.current,t=sv(e,!0);t&&"BODY"!==t.tagName&&(e&&sg(e,t)||C.setDisclosureElement(t))},[C,M]),uu&&(0,eG.useEffect)(()=>{if(!w)return;let{disclosureElement:e}=C.getState();if(!e||!sy(e))return;let t=()=>{let t=!1,r=()=>{t=!0};e.addEventListener("focusin",r,{capture:!0,once:!0}),s_(e,"mouseup",()=>{e.removeEventListener("focusin",r,!0),t||ow(e)})};return e.addEventListener("mousedown",t),()=>{e.removeEventListener("mousedown",t)}},[C,w]),(0,eG.useEffect)(()=>{if(!w||!E)return;let e=B.current;if(!e)return;let t=sm(e),r=t.visualViewport||t,n=()=>{var r,n;let i=null!=(n=null==(r=t.visualViewport)?void 0:r.height)?n:t.innerHeight;e.style.setProperty("--dialog-viewport-height","".concat(i,"px"))};return n(),r.addEventListener("resize",n),()=>{r.removeEventListener("resize",n)}},[w,E]),(0,eG.useEffect)(()=>{if(!a||!w||!E)return;let e=B.current;if(e&&!e.querySelector("[data-dialog-dismiss]")){var t=C.hide;let r=sp(e).createElement("button");return r.type="button",r.tabIndex=-1,r.textContent="Dismiss popup",Object.assign(r.style,{border:"0px",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"}),r.addEventListener("click",t),e.prepend(r),()=>{r.removeEventListener("click",t),r.remove()}}},[C,a,w,E]),s0(()=>{if(!ur()||M||!w||!E)return;let e=B.current;if(e)return un(e)},[M,w,E]);let O=M&&E;s0(()=>{if(!b||!O)return;var e=[B.current];let{body:t}=sp(e[0]),r=[];return l9(b,e,e=>{r.push(l$(e,l2(b),!0))}),sP(l$(t,l2(b),!0),()=>{for(let e of r)e()})},[b,O,A]);let H=s1(c);s0(()=>{if(!b||!O)return;let{disclosureElement:e}=C.getState(),t=[B.current,...H()||[],...G.map(e=>e.getState().contentElement)];return a?sP(l6(b,t),function(e,t){let r=[],n=t.map(e=>null==e?void 0:e.id);return l9(e,t,e=>{l3(e,...n)||!function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ni===e))}(e,...n)&&r.unshift(un(e,t))},e=>{e.hasAttribute("role")&&(t.some(t=>t&&sg(t,e))||r.unshift(lq(e,"role","none")))}),()=>{for(let e of r)e()}}(b,t)):l6(b,[e,...t])},[b,C,O,H,G,a,A]);let N=!!f,k=s8(f),[j,z]=(0,eG.useState)(!1);(0,eG.useEffect)(()=>{if(!M||!N||!E||!(null==F?void 0:F.isConnected))return;let e=uc(p,!0)||F.querySelector("[data-autofocus=true],[autofocus]")||function(e,t,r){let[n]=oE(e,t,r);return n||null}(F,!0,s&&D)||F,t=oB(e);k(t?e:null)&&(z(!0),queueMicrotask(()=>{e.focus(),uu&&t&&e.scrollIntoView({block:"nearest",inline:"nearest"})}))},[M,N,E,F,p,s,D,k]);let K=!!h,J=s8(h),[V,Q]=(0,eG.useState)(!1);(0,eG.useEffect)(()=>{if(M)return Q(!0),()=>Q(!1)},[M]);let W=(0,eG.useCallback)(function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{disclosureElement:r}=C.getState();if(function(e){let t=sv();return!(!t||e&&sg(e,t))&&!!oB(t)}(e))return;let n=uc(m)||r;if(null==n?void 0:n.id){let e=sp(n),t='[aria-activedescendant="'.concat(n.id,'"]'),r=e.querySelector(t);r&&(n=r)}if(n&&!oB(n)){let e=n.closest("[data-dialog]");if(null==e?void 0:e.id){let t=sp(e),r='[aria-controls~="'.concat(e.id,'"]'),i=t.querySelector(r);i&&(n=i)}}let i=n&&oB(n);if(!i&&t)return void requestAnimationFrame(()=>W(e,!1));J(i?n:null)&&i&&(null==n||n.focus({preventScroll:!0}))},[C,m,J]),X=(0,eG.useRef)(!1);s0(()=>{if(M||!V||!K)return;let e=B.current;X.current=!0,W(e)},[M,V,E,K,W]),(0,eG.useEffect)(()=>{if(!V||!K)return;let e=B.current;return()=>{if(X.current){X.current=!1;return}W(e)}},[V,K,W]);let _=s8(l);(0,eG.useEffect)(()=>{if(E&&w)return sZ("keydown",e=>{if("Escape"!==e.key||e.defaultPrevented)return;let t=B.current;if(!t||l5(t))return;let r=e.target;if(!r)return;let{disclosureElement:n}=C.getState();("BODY"===r.tagName||sg(t,r)||!n||sg(n,r))&&_(e)&&C.hide()},!0)},[C,E,w,_]);let Z=(y=s5(y,e=>(0,eU.jsx)(lX,{level:a?1:void 0,children:e}),[a])).hidden,Y=y.alwaysVisible;y=s5(y,e=>o?(0,eU.jsxs)(eU.Fragment,{children:[(0,eU.jsx)(uo,{store:C,backdrop:o,hidden:Z,alwaysVisible:Y}),e]}):e,[C,o,Z,Y]);let[q,$]=(0,eG.useState)(),[ee,et]=(0,eG.useState)();return y=l_({...y={id:b,"data-dialog":"",role:"dialog",tabIndex:i?-1:void 0,"aria-labelledby":q,"aria-describedby":ee,...y=s5(y,e=>(0,eU.jsx)(o_,{value:C,children:(0,eU.jsx)(oZ.Provider,{value:$,children:(0,eU.jsx)(oY.Provider,{value:et,children:e})})}),[C]),ref:s2(B,y.ref)},autoFocusOnShow:j}),y=lQ({portal:s,...y=oN({...y=lO({store:C,...y}),focusable:i}),portalRef:S,preserveTabOrder:D})});function uf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oW;return oa(function(r){let n=t();return lT(r.store||n,e=>!r.unmountOnHide||(null==e?void 0:e.mounted)||!!r.open)?(0,eU.jsx)(e,{...r}):null})}uf(oa(function(e){return oo("div",ud(e))}),oW);let uh=Math.min,up=Math.max,um=Math.round,uv=Math.floor,ug=e=>({x:e,y:e}),uA={left:"right",right:"left",bottom:"top",top:"bottom"},uy={start:"end",end:"start"};function ux(e,t){return"function"==typeof e?e(t):e}function uB(e){return e.split("-")[0]}function uC(e){return e.split("-")[1]}function uS(e){return"x"===e?"y":"x"}function uE(e){return"y"===e?"height":"width"}let uT=new Set(["top","bottom"]);function uD(e){return uT.has(uB(e))?"y":"x"}function ub(e){return e.replace(/start|end/g,e=>uy[e])}let uM=["left","right"],uw=["right","left"],uF=["top","bottom"],uR=["bottom","top"];function uI(e){return e.replace(/left|right|bottom|top/g,e=>uA[e])}function uP(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function uL(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function uU(e,t,r){let n,{reference:i,floating:a}=e,s=uD(t),o=uS(uD(t)),l=uE(o),u=uB(t),c="y"===s,d=i.x+i.width/2-a.width/2,f=i.y+i.height/2-a.height/2,h=i[l]/2-a[l]/2;switch(u){case"top":n={x:d,y:i.y-a.height};break;case"bottom":n={x:d,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:f};break;case"left":n={x:i.x-a.width,y:f};break;default:n={x:i.x,y:i.y}}switch(uC(t)){case"start":n[o]-=h*(r&&c?-1:1);break;case"end":n[o]+=h*(r&&c?-1:1)}return n}let uG=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,o=a.filter(Boolean),l=await (null==s.isRTL?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=uU(u,n,l),f=n,h={},p=0;for(let r=0;r{try{return e.matches(t)}catch(e){return!1}})}let u$=["transform","translate","scale","rotate","perspective"],u0=["transform","translate","scale","rotate","perspective","filter"],u1=["paint","layout","strict","content"];function u2(e){let t=u9(),r=uV(e)?u8(e):e;return u$.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||u0.some(e=>(r.willChange||"").includes(e))||u1.some(e=>(r.contain||"").includes(e))}function u9(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let u3=new Set(["html","body","#document"]);function u4(e){return u3.has(uj(e))}function u8(e){return uz(e).getComputedStyle(e)}function u5(e){return uV(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function u6(e){if("html"===uj(e))return e;let t=e.assignedSlot||e.parentNode||uW(e)&&e.host||uK(e);return uW(t)?t.host:t}function u7(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=u6(t);return u4(r)?t.ownerDocument?t.ownerDocument.body:t.body:uQ(r)&&u_(r)?r:e(r)}(e),a=i===(null==(n=e.ownerDocument)?void 0:n.body),s=uz(i);if(a){let e=ce(s);return t.concat(s,s.visualViewport||[],u_(i)?i:[],e&&r?u7(e):[])}return t.concat(i,u7(i,[],r))}function ce(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ct(e){let t=u8(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=uQ(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,o=um(r)!==a||um(n)!==s;return o&&(r=a,n=s),{width:r,height:n,$:o}}function cr(e){return uV(e)?e:e.contextElement}function cn(e){let t=cr(e);if(!uQ(t))return ug(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:a}=ct(t),s=(a?um(r.width):r.width)/n,o=(a?um(r.height):r.height)/i;return s&&Number.isFinite(s)||(s=1),o&&Number.isFinite(o)||(o=1),{x:s,y:o}}let ci=ug(0);function ca(e){let t=uz(e);return u9()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ci}function cs(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),s=cr(e),o=ug(1);t&&(n?uV(n)&&(o=cn(n)):o=cn(e));let l=(void 0===(i=r)&&(i=!1),n&&(!i||n===uz(s))&&i)?ca(s):ug(0),u=(a.left+l.x)/o.x,c=(a.top+l.y)/o.y,d=a.width/o.x,f=a.height/o.y;if(s){let e=uz(s),t=n&&uV(n)?uz(n):n,r=e,i=ce(r);for(;i&&n&&t!==r;){let e=cn(i),t=i.getBoundingClientRect(),n=u8(i),a=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=a,c+=s,i=ce(r=uz(i))}}return uL({width:d,height:f,x:u,y:c})}function co(e,t){let r=u5(e).scrollLeft;return t?t.left+r:cs(uK(e)).left+r}function cl(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-co(e,r),y:r.top+t.scrollTop}}let cu=new Set(["absolute","fixed"]);function cc(e,t,r){let n;if("viewport"===t)n=function(e,t){let r=uz(e),n=uK(e),i=r.visualViewport,a=n.clientWidth,s=n.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;let e=u9();(!e||e&&"fixed"===t)&&(o=i.offsetLeft,l=i.offsetTop)}let u=co(n);if(u<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,s=Math.abs(n.clientWidth-t.clientWidth-i);s<=25&&(a-=s)}else u<=25&&(a+=u);return{width:a,height:s,x:o,y:l}}(e,r);else if("document"===t)n=function(e){let t=uK(e),r=u5(e),n=e.ownerDocument.body,i=up(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=up(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+co(e),o=-r.scrollTop;return"rtl"===u8(n).direction&&(s+=up(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:o}}(uK(e));else if(uV(t))n=function(e,t){let r=cs(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=uQ(e)?cn(e):ug(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y;return{width:s,height:o,x:i*a.x,y:n*a.y}}(t,r);else{let r=ca(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return uL(n)}function cd(e){return"static"===u8(e).position}function cf(e,t){if(!uQ(e)||"fixed"===u8(e).position)return null;if(t)return t(e);let r=e.offsetParent;return uK(e)===r&&(r=r.ownerDocument.body),r}function ch(e,t){var r;let n=uz(e);if(uq(e))return n;if(!uQ(e)){let t=u6(e);for(;t&&!u4(t);){if(uV(t)&&!cd(t))return t;t=u6(t)}return n}let i=cf(e,t);for(;i&&(r=i,uZ.has(uj(r)))&&cd(i);)i=cf(i,t);return i&&u4(i)&&cd(i)&&!u2(i)?n:i||function(e){let t=u6(e);for(;uQ(t)&&!u4(t);){if(u2(t))return t;if(uq(t))break;t=u6(t)}return null}(e)||n}let cp=async function(e){let t=this.getOffsetParent||ch,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=uQ(t),i=uK(t),a="fixed"===r,s=cs(e,!0,a,t),o={scrollLeft:0,scrollTop:0},l=ug(0);if(n||!n&&!a)if(("body"!==uj(t)||u_(i))&&(o=u5(t)),n){let e=cs(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=co(i));a&&!n&&i&&(l.x=co(i));let u=!i||n||a?ug(0):cl(i,o);return{x:s.left+o.scrollLeft-l.x-u.x,y:s.top+o.scrollTop-l.y-u.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},cm={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,a="fixed"===i,s=uK(n),o=!!t&&uq(t.floating);if(n===s||o&&a)return r;let l={scrollLeft:0,scrollTop:0},u=ug(1),c=ug(0),d=uQ(n);if((d||!d&&!a)&&(("body"!==uj(n)||u_(s))&&(l=u5(n)),uQ(n))){let e=cs(n);u=cn(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}let f=!s||d||a?ug(0):cl(s,l);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}},getDocumentElement:uK,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[..."clippingAncestors"===r?uq(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=u7(e,[],!1).filter(e=>uV(e)&&"body"!==uj(e)),i=null,a="fixed"===u8(e).position,s=a?u6(e):e;for(;uV(s)&&!u4(s);){let t=u8(s),r=u2(s);r||"fixed"!==t.position||(i=null),(a?!r&&!i:!r&&"static"===t.position&&!!i&&cu.has(i.position)||u_(s)&&!r&&function e(t,r){let n=u6(t);return!(n===r||!uV(n)||u4(n))&&("fixed"===u8(n).position||e(n,r))}(e,s))?n=n.filter(e=>e!==s):i=t,s=u6(s)}return t.set(e,n),n}(t,this._c):[].concat(r),n],s=a[0],o=a.reduce((e,r)=>{let n=cc(t,r,i);return e.top=up(n.top,e.top),e.right=uh(n.right,e.right),e.bottom=uh(n.bottom,e.bottom),e.left=up(n.left,e.left),e},cc(t,s,i));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},getOffsetParent:ch,getElementRects:cp,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=ct(e);return{width:t,height:r}},getScale:cn,isElement:uV,isRTL:function(e){return"rtl"===u8(e).direction}};function cv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("function"==typeof DOMRect)return new DOMRect(e,t,r,n);let i={x:e,y:t,width:r,height:n,top:t,right:e+r,bottom:t+n,left:e};return{...i,toJSON:()=>i}}function cA(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}function cy(e){let t=window.devicePixelRatio||1;return Math.round(e*t)/t}var cx=ol(function(e){let{store:t,modal:r=!1,portal:n=!!r,preserveTabOrder:i=!0,autoFocusOnShow:a=!0,wrapperProps:s,fixed:o=!1,flip:l=!0,shift:u=0,slide:c=!0,overlap:d=!1,sameWidth:f=!1,fitViewport:h=!1,gutter:p,arrowPadding:m=4,overflowPadding:g=8,getAnchorRect:A,updatePosition:y,...x}=e,B=o$();sU(t=t||B,!1);let C=t.useState("arrowElement"),S=t.useState("anchorElement"),E=t.useState("disclosureElement"),T=t.useState("popoverElement"),D=t.useState("contentElement"),b=t.useState("placement"),M=t.useState("mounted"),w=t.useState("rendered"),F=(0,eG.useRef)(null),[R,I]=(0,eG.useState)(!1),{portalRef:P,domReady:L}=s6(n,x.portalRef),U=s1(A),G=s1(y),O=!!y;s0(()=>{if(!(null==T?void 0:T.isConnected))return;T.style.setProperty("--popover-overflow-padding","".concat(g,"px"));let e={contextElement:S||void 0,getBoundingClientRect:()=>{let e=null==U?void 0:U(S);if(e||!S){if(!e)return cg();let{x:t,y:r,width:n,height:i}=e;return cg(t,r,n,i)}return S.getBoundingClientRect()}},r=async()=>{var r,n,i,a;if(!M)return;C||(F.current=F.current||document.createElement("div"));let s=C||F.current,A=[(r={gutter:p,shift:u},void 0===(n=e=>{var t;let{placement:n}=e,i=((null==s?void 0:s.clientHeight)||0)/2,a="number"==typeof r.gutter?r.gutter+i:null!=(t=r.gutter)?t:i;return{crossAxis:n.split("-")[1]?void 0:r.shift,mainAxis:a,alignmentAxis:r.shift}})&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:i,y:a,placement:s,middlewareData:o}=e,l=await uN(e,n);return s===(null==(t=o.offset)?void 0:t.placement)&&null!=(r=o.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:s}}}}),function(e){var t;if(!1===e.flip)return;let r="string"==typeof e.flip?e.flip.split(" "):void 0;return sU(!r||r.every(cA),!1),{name:"flip",options:t={padding:e.overflowPadding,fallbackPlacements:r},async fn(e){var r,n,i,a,s;let{placement:o,middlewareData:l,rects:u,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:y=!0,...x}=ux(t,e);if(null!=(r=l.arrow)&&r.alignmentOffset)return{};let B=uB(o),C=uD(c),S=uB(c)===c,E=await (null==d.isRTL?void 0:d.isRTL(f.floating)),T=m||(S||!y?[uI(c)]:function(e){let t=uI(e);return[ub(e),t,ub(t)]}(c)),D="none"!==A;!m&&D&&T.push(...function(e,t,r,n){let i=uC(e),a=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?uw:uM;return t?uM:uw;case"left":case"right":return t?uF:uR;default:return[]}}(uB(e),"start"===r,n);return i&&(a=a.map(e=>e+"-"+i),t&&(a=a.concat(a.map(ub)))),a}(c,y,A,E));let b=[c,...T],M=await uO(e,x),w=[],F=(null==(n=l.flip)?void 0:n.overflows)||[];if(h&&w.push(M[B]),p){let e=function(e,t,r){void 0===r&&(r=!1);let n=uC(e),i=uS(uD(e)),a=uE(i),s="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=uI(s)),[s,uI(s)]}(o,u,E);w.push(M[e[0]],M[e[1]])}if(F=[...F,{placement:o,overflows:w}],!w.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=b[e];if(t&&("alignment"!==p||C===uD(t)||F.every(e=>uD(e.placement)!==C||e.overflows[0]>0)))return{data:{index:e,overflows:F},reset:{placement:t}};let r=null==(a=F.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!r)switch(g){case"bestFit":{let e=null==(s=F.filter(e=>{if(D){let t=uD(e.placement);return t===C||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:s[0];e&&(r=e);break}case"initialPlacement":r=c}if(o!==r)return{reset:{placement:r}}}return{}}}}({flip:l,overflowPadding:g}),function(e){if(e.slide||e.overlap){var t,r;return{name:"shift",options:r={mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:(void 0===t&&(t={}),{options:t,fn(e){let{x:r,y:n,placement:i,rects:a,middlewareData:s}=e,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=ux(t,e),c={x:r,y:n},d=uD(i),f=uS(d),h=c[f],p=c[d],m=ux(o,e),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,r=a.reference[f]+a.reference[e]-g.mainAxis;hr&&(h=r)}if(u){var A,y;let e="y"===f?"width":"height",t=uH.has(uB(i)),r=a.reference[d]-a.floating[e]+(t&&(null==(A=s.offset)?void 0:A[d])||0)+(t?0:g.crossAxis),n=a.reference[d]+a.reference[e]+(t?0:(null==(y=s.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);pn&&(p=n)}return{[f]:h,[d]:p}}})},async fn(e){let{x:t,y:n,placement:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:o={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=ux(r,e),u={x:t,y:n},c=await uO(e,l),d=uD(uB(i)),f=uS(d),h=u[f],p=u[d];if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=h+c[e],n=h-c[t];h=up(r,uh(h,n))}if(s){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",r=p+c[e],n=p-c[t];p=up(r,uh(p,n))}let m=o.fn({...e,[f]:h,[d]:p});return{...m,data:{x:m.x-t,y:m.y-n,enabled:{[f]:a,[d]:s}}}}}}}({slide:c,shift:u,overlap:d,overflowPadding:g}),function(e,t){if(e){let r;return{name:"arrow",options:r={element:e,padding:t.arrowPadding},async fn(e){let{x:t,y:n,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=e,{element:u,padding:c=0}=ux(r,e)||{};if(null==u)return{};let d=uP(c),f={x:t,y:n},h=uS(uD(i)),p=uE(h),m=await s.getDimensions(u),g="y"===h,A=g?"clientHeight":"clientWidth",y=a.reference[p]+a.reference[h]-f[h]-a.floating[p],x=f[h]-a.reference[h],B=await (null==s.getOffsetParent?void 0:s.getOffsetParent(u)),C=B?B[A]:0;C&&await (null==s.isElement?void 0:s.isElement(B))||(C=o.floating[A]||a.floating[p]);let S=C/2-m[p]/2-1,E=uh(d[g?"top":"left"],S),T=uh(d[g?"bottom":"right"],S),D=C-m[p]-T,b=C/2-m[p]/2+(y/2-x/2),M=up(E,uh(b,D)),w=!l.arrow&&null!=uC(i)&&b!==M&&a.reference[p]/2-(b{},...d}=ux(a,e),f=await uO(e,d),h=uB(s),p=uC(s),m="y"===uD(s),{width:g,height:A}=o.floating;"top"===h||"bottom"===h?(n=h,i=p===(await (null==l.isRTL?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(i=h,n="end"===p?"top":"bottom");let y=A-f.top-f.bottom,x=g-f.left-f.right,B=uh(A-f[n],y),C=uh(g-f[i],x),S=!e.middlewareData.shift,E=B,T=C;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(T=x),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(E=y),S&&!p){let e=up(f.left,0),t=up(f.right,0),r=up(f.top,0),n=up(f.bottom,0);m?T=g-2*(0!==e||0!==t?e+t:up(f.left,f.right)):E=A-2*(0!==r||0!==n?r+n:up(f.top,f.bottom))}await c({...e,availableWidth:T,availableHeight:E});let D=await l.getDimensions(u.floating);return g!==D.width||A!==D.height?{reset:{rects:!0}}:{}}}],y=await ((e,t,r)=>{let n=new Map,i={platform:cm,...r},a={...i.platform,_c:n};return uG(e,t,{...i,platform:a})})(e,T,{placement:b,strategy:o?"fixed":"absolute",middleware:A});null==t||t.setState("currentPlacement",y.placement),I(!0);let x=cy(y.x),B=cy(y.y);if(Object.assign(T.style,{top:"0",left:"0",transform:"translate3d(".concat(x,"px,").concat(B,"px,0)")}),s&&y.middlewareData.arrow){let{x:e,y:t}=y.middlewareData.arrow,r=y.placement.split("-")[0],n=s.clientWidth/2,i=s.clientHeight/2,a=null!=e?e+n:-n,o=null!=t?t+i:-i;T.style.setProperty("--popover-transform-origin",{top:"".concat(a,"px calc(100% + ").concat(i,"px)"),bottom:"".concat(a,"px ").concat(-i,"px"),left:"calc(100% + ".concat(n,"px) ").concat(o,"px"),right:"".concat(-n,"px ").concat(o,"px")}[r]),Object.assign(s.style,{left:null!=e?"".concat(e,"px"):"",top:null!=t?"".concat(t,"px"):"",[r]:"100%"})}},n=function(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,c=cr(e),d=a||s?[...c?u7(c):[],...u7(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),s&&e.addEventListener("resize",r)});let f=c&&l?function(e,t){let r,n=null,i=uK(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function s(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(o||t(),!f||!h)return;let p=uv(d),m=uv(i.clientWidth-(c+f)),g={rootMargin:-p+"px "+-m+"px "+-uv(i.clientHeight-(d+h))+"px "+-uv(c)+"px",threshold:up(0,uh(1,l))||1},A=!0;function y(t){let n=t[0].intersectionRatio;if(n!==l){if(!A)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==n||cv(u,e.getBoundingClientRect())||s(),A=!1}try{n=new IntersectionObserver(y,{...g,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(y,g)}n.observe(e)}(!0),a}(c,r):null,h=-1,p=null;o&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),c&&!u&&p.observe(c),p.observe(t));let m=u?cs(e):null;return u&&function t(){let n=cs(e);m&&!cv(m,n)&&r(),m=n,i=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",r),s&&e.removeEventListener("resize",r)}),null==f||f(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(i)}}(e,T,async()=>{O?(await G({updatePosition:r}),I(!0)):await r()},{elementResize:"function"==typeof ResizeObserver});return()=>{I(!1),n()}},[t,w,T,C,S,T,b,M,L,o,l,u,c,d,f,h,p,m,g,U,O,G]),s0(()=>{if(!M||!L||!(null==T?void 0:T.isConnected)||!(null==D?void 0:D.isConnected))return;let e=()=>{T.style.zIndex=getComputedStyle(D).zIndex};e();let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)},[M,L,T,D]);let H=o?"fixed":"absolute";return x=s5(x,e=>(0,eU.jsx)("div",{...s,style:{position:H,top:0,left:0,width:"max-content",...null==s?void 0:s.style},ref:null==t?void 0:t.setPopoverElement,children:e}),[t,H,s]),x={"data-placing":!R||void 0,...x=s5(x,e=>(0,eU.jsx)(o1,{value:t,children:e}),[t]),style:{position:"relative",...x.style}},x=ud({store:t,modal:r,portal:n,preserveTabOrder:i,preserveTabOrderAnchor:E||S,autoFocusOnShow:R&&a,...x,portalRef:P})});uf(oa(function(e){return oo("div",cx(e))}),o$);var cB=ol(function(e){let{store:t,modal:r,tabIndex:n,alwaysVisible:i,autoFocusOnHide:a=!0,hideOnInteractOutside:s=!0,...o}=e,l=o5();sU(t=t||l,!1);let u=t.useState("baseElement"),c=(0,eG.useRef)(!1),d=lT(t.tag,e=>null==e?void 0:e.renderedItems.length);return o=lN({store:t,alwaysVisible:i,...o}),o=cx({store:t,modal:r,alwaysVisible:i,backdrop:!1,autoFocusOnShow:!1,finalFocus:u,preserveTabOrderAnchor:null,unstable_treeSnapshotKey:d,...o,getPersistentElements(){var e;let n=(null==(e=o.getPersistentElements)?void 0:e.call(o))||[];if(!r||!t)return n;let{contentElement:i,baseElement:a}=t.getState();if(!a)return n;let s=sp(a),l=[];if((null==i?void 0:i.id)&&l.push('[aria-controls~="'.concat(i.id,'"]')),(null==a?void 0:a.id)&&l.push('[aria-controls~="'.concat(a.id,'"]')),!l.length)return[...n,a];let u=l.join(",");return[...n,...s.querySelectorAll(u)]},autoFocusOnHide:e=>!sG(a,e)&&(!c.current||(c.current=!1,!1)),hideOnInteractOutside(e){var r,n;let i=null==t?void 0:t.getState(),a=null==(r=null==i?void 0:i.contentElement)?void 0:r.id,o=null==(n=null==i?void 0:i.baseElement)?void 0:n.id;if(function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n'[aria-controls~="'.concat(e,'"]')).join(", ");return!!t&&e.matches(t)}return!1}(e.target,a,o))return!1;let l="function"==typeof s?s(e):s;return l&&(c.current="click"===e.type),l}})}),cC=uf(oa(function(e){return oo("div",cB(e))}),o5);(0,eG.createContext)(null),(0,eG.createContext)(null);var cS=ou([om],[ov]),cE=cS.useContext;cS.useScopedContext,cS.useProviderContext,cS.ContextProvider,cS.ScopedContextProvider;var cT={id:null};function cD(e,t){return e.find(e=>t?!e.disabled&&e.id!==t:!e.disabled)}function cb(e,t){return e.filter(e=>e.rowId===t)}function cM(e){let t=[];for(let r of e){let e=t.find(e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===r.rowId});e?e.push(r):t.push([r])}return t}function cw(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}var cF=sK()&&sj();function cR(){let{tag:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=lc(t.store,function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{},r=null==(e=t.store)?void 0:e.getState(),n=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ld(r,r.store);let n=null==(e=r.store)?void 0:e.getState(),i=sN(r.items,null==n?void 0:n.items,r.defaultItems,[]),a=new Map(i.map(e=>[e.id,e])),s={items:i,renderedItems:sN(null==n?void 0:n.renderedItems,[])},o=null==(t=r.store)?void 0:t.__unstablePrivateStore,l=ln({items:i,renderedItems:s.renderedItems},o),u=ln(s,r.store),c=e=>{let t=function(e,t){let r=e.map((e,t)=>[t,e]),n=!1;return(r.sort((e,r)=>{var i;let[a,s]=e,[o,l]=r,u=t(s),c=t(l);return u!==c&&u&&c?(i=u,c.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING)?(a>o&&(n=!0),-1):(a{let[t,r]=e;return r}):e}(e,e=>e.element);l.setState("renderedItems",t),u.setState("renderedItems",t)};li(u,()=>la(l)),li(l,()=>ll(l,["items"],e=>{u.setState("items",e.items)})),li(l,()=>ll(l,["renderedItems"],e=>{let t=!0,r=requestAnimationFrame(()=>{let{renderedItems:t}=u.getState();e.renderedItems!==t&&c(e.renderedItems)});if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(r);let n=new IntersectionObserver(()=>{if(t){t=!1;return}cancelAnimationFrame(r),r=requestAnimationFrame(()=>c(e.renderedItems))},{root:function(e){var t;let r=e.find(e=>!!e.element),n=[...e].reverse().find(e=>!!e.element),i=null==(t=null==r?void 0:r.element)?void 0:t.parentElement;for(;i&&(null==n?void 0:n.element);){let e=i;if(n&&e.contains(n.element))return i;i=i.parentElement}return sp(i).body}(e.renderedItems)});for(let t of e.renderedItems)t.element&&n.observe(t.element);return()=>{cancelAnimationFrame(r),n.disconnect()}}));let d=function(e,t){let r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t(t=>{let n=t.findIndex(t=>{let{id:r}=t;return r===e.id}),i=t.slice();if(-1!==n){let s={...r=t[n],...e};i[n]=s,a.set(e.id,s)}else i.push(e),a.set(e.id,e);return i}),()=>{t(t=>{if(!r)return n&&a.delete(e.id),t.filter(t=>{let{id:r}=t;return r!==e.id});let i=t.findIndex(t=>{let{id:r}=t;return r===e.id});if(-1===i)return t;let s=t.slice();return s[i]=r,a.set(e.id,r),s})}},f=e=>d(e,e=>l.setState("items",e),!0);return{...u,registerItem:f,renderItem:e=>sP(f(e),d(e,e=>l.setState("renderedItems",e))),item:e=>{if(!e)return null;let t=a.get(e);if(!t){let{items:r}=l.getState();(t=r.find(t=>t.id===e))&&a.set(e,t)}return t||null},__unstablePrivateStore:l}}(t),i=sN(t.activeId,null==r?void 0:r.activeId,t.defaultActiveId),a=ln({...n.getState(),id:sN(t.id,null==r?void 0:r.id,"id-".concat(Math.random().toString(36).slice(2,8))),activeId:i,baseElement:sN(null==r?void 0:r.baseElement,null),includesBaseElement:sN(t.includesBaseElement,null==r?void 0:r.includesBaseElement,null===i),moves:sN(null==r?void 0:r.moves,0),orientation:sN(t.orientation,null==r?void 0:r.orientation,"both"),rtl:sN(t.rtl,null==r?void 0:r.rtl,!1),virtualFocus:sN(t.virtualFocus,null==r?void 0:r.virtualFocus,!1),focusLoop:sN(t.focusLoop,null==r?void 0:r.focusLoop,!1),focusWrap:sN(t.focusWrap,null==r?void 0:r.focusWrap,!1),focusShift:sN(t.focusShift,null==r?void 0:r.focusShift,!1)},n,t.store);li(a,()=>lo(a,["renderedItems","activeId"],e=>{a.setState("activeId",t=>{var r;return void 0!==t?t:null==(r=cD(e.renderedItems))?void 0:r.id})}));let s=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"next",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=a.getState(),{skip:s=0,activeId:o=i.activeId,focusShift:l=i.focusShift,focusLoop:u=i.focusLoop,focusWrap:c=i.focusWrap,includesBaseElement:d=i.includesBaseElement,renderedItems:f=i.renderedItems,rtl:h=i.rtl}=n,p="up"===r||"down"===r,m="next"===r||"down"===r,g=p?ok(function(e,t,r){let n=cw(e);for(let i of e)for(let e=0;ee.id===o);if(!A)return null==(t=cD(g))?void 0:t.id;let y=g.some(e=>e.rowId),x=g.indexOf(A),B=g.slice(x+1),C=cb(B,A.rowId);if(s){let e=C.filter(e=>o?!e.disabled&&e.id!==o:!e.disabled),t=e.slice(s)[0]||e[e.length-1];return null==t?void 0:t.id}let S=u&&(p?"horizontal"!==u:"vertical"!==u),E=y&&c&&(p?"horizontal"!==c:"vertical"!==c),T=m?(!y||p)&&S&&d:!!p&&d;if(S){let e=cD(function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.findIndex(e=>e.id===t);return[...e.slice(n+1),...r?[cT]:[],...e.slice(0,n)]}(E&&!T?g:cb(g,A.rowId),o,T),o);return null==e?void 0:e.id}if(E){let e=cD(T?C:B,o);return T?(null==e?void 0:e.id)||null:null==e?void 0:e.id}let D=cD(C,o);return!D&&T?null:null==D?void 0:D.id};return{...n,...a,setBaseElement:e=>a.setState("baseElement",e),setActiveId:e=>a.setState("activeId",e),move:e=>{void 0!==e&&(a.setState("activeId",e),a.setState("moves",e=>e+1))},first:()=>{var e;return null==(e=cD(a.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=cD(oj(a.getState().renderedItems)))?void 0:e.id},next:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("next",e)),previous:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("previous",e)),down:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("down",e)),up:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("up",e))}}({...t,activeId:a,includesBaseElement:sN(t.includesBaseElement,null==i?void 0:i.includesBaseElement,!0),orientation:sN(t.orientation,null==i?void 0:i.orientation,"vertical"),focusLoop:sN(t.focusLoop,null==i?void 0:i.focusLoop,!0),focusWrap:sN(t.focusWrap,null==i?void 0:i.focusWrap,!0),virtualFocus:sN(t.virtualFocus,null==i?void 0:i.virtualFocus,!0)}),o=function(){let{popover:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=lc(t.store,lu(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));ld(t,r);let n=null==r?void 0:r.getState(),i=ul({...t,store:r}),a=sN(t.placement,null==n?void 0:n.placement,"bottom"),s=ln({...i.getState(),placement:a,currentPlacement:a,anchorElement:sN(null==n?void 0:n.anchorElement,null),popoverElement:sN(null==n?void 0:n.popoverElement,null),arrowElement:sN(null==n?void 0:n.arrowElement,null),rendered:Symbol("rendered")},i,r);return{...i,...s,setAnchorElement:e=>s.setState("anchorElement",e),setPopoverElement:e=>s.setState("popoverElement",e),setArrowElement:e=>s.setState("arrowElement",e),render:()=>s.setState("rendered",Symbol("rendered"))}}({...t,placement:sN(t.placement,null==i?void 0:i.placement,"bottom-start")}),l=sN(t.value,null==i?void 0:i.value,t.defaultValue,""),u=sN(t.selectedValue,null==i?void 0:i.selectedValue,null==n?void 0:n.values,t.defaultSelectedValue,""),c=Array.isArray(u),d={...s.getState(),...o.getState(),value:l,selectedValue:u,resetValueOnSelect:sN(t.resetValueOnSelect,null==i?void 0:i.resetValueOnSelect,c),resetValueOnHide:sN(t.resetValueOnHide,null==i?void 0:i.resetValueOnHide,c&&!e),activeValue:null==i?void 0:i.activeValue},f=ln(d,s,o,r);return cF&&li(f,()=>lo(f,["virtualFocus"],()=>{f.setState("virtualFocus",!1)})),li(f,()=>{if(e)return sP(lo(f,["selectedValue"],t=>{Array.isArray(t.selectedValue)&&e.setValues(t.selectedValue)}),lo(e,["values"],e=>{f.setState("selectedValue",e.values)}))}),li(f,()=>lo(f,["resetValueOnHide","mounted"],e=>{e.resetValueOnHide&&(e.mounted||f.setState("value",l))})),li(f,()=>lo(f,["open"],e=>{e.open||(f.setState("activeId",a),f.setState("moves",0))})),li(f,()=>lo(f,["moves","activeId"],(e,t)=>{e.moves===t.moves&&f.setState("activeValue",void 0)})),li(f,()=>ll(f,["moves","renderedItems"],(e,t)=>{if(e.moves===t.moves)return;let{activeId:r}=f.getState(),n=s.item(r);f.setState("activeValue",null==n?void 0:n.value)})),{...o,...s,...f,tag:e,setValue:e=>f.setState("value",e),resetValue:()=>f.setState("value",d.value),setSelectedValue:e=>f.setState("selectedValue",e)}}function cI(){var e,t,r,n,i,a;let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[o,l]=lM(cR,s=function(e){var t;let r=cE();return{id:s9((t=e={...e,tag:void 0!==e.tag?e.tag:r}).id),...t}}(s));return s3(l,[(e=s).tag]),lb(o,e,"value","setValue"),lb(o,e,"selectedValue","setSelectedValue"),lb(o,e,"resetValueOnHide"),lb(o,e,"resetValueOnSelect"),Object.assign((n=o,s3(i=l,[(a=e).popover]),lb(n,a,"placement"),t=ua(n,i,a),r=t,s3(l,[e.store]),lb(r,e,"items","setItems"),lb(t=r,e,"activeId","setActiveId"),lb(t,e,"includesBaseElement"),lb(t,e,"virtualFocus"),lb(t,e,"orientation"),lb(t,e,"rtl"),lb(t,e,"focusLoop"),lb(t,e,"focusWrap"),lb(t,e,"focusShift"),t),{tag:e.tag})}function cP(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=cI(e);return(0,eU.jsx)(o6,{value:t,children:e.children})}var cL=(0,eG.createContext)(void 0),cU=ol(function(e){let[t,r]=(0,eG.useState)();return sH(e={role:"group","aria-labelledby":t,...e=s5(e,e=>(0,eU.jsx)(cL.Provider,{value:r,children:e}),[])})});oa(function(e){return oo("div",cU(e))});var cG=ol(function(e){let{store:t,...r}=e;return cU(r)});oa(function(e){return oo("div",cG(e))});var cO=ol(function(e){let{store:t,...r}=e,n=o8();return sU(t=t||n,!1),"grid"===sT(t.useState("contentElement"))&&(r={role:"rowgroup",...r}),r=cG({store:t,...r})}),cH=oa(function(e){return oo("div",cO(e))}),cN=ol(function(e){let t=(0,eG.useContext)(cL),r=s9(e.id);return s0(()=>(null==t||t(r),()=>null==t?void 0:t(void 0)),[t,r]),sH(e={id:r,"aria-hidden":!0,...e})});oa(function(e){return oo("div",cN(e))});var ck=ol(function(e){let{store:t,...r}=e;return cN(r)});oa(function(e){return oo("div",ck(e))});var cj=ol(function(e){return ck(e)}),cz=oa(function(e){return oo("div",cj(e))}),cK=e.i(38360);let cJ={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},cV=(e,t)=>String(e.rankedValue).localeCompare(String(t.rankedValue));function cQ(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{keys:n,threshold:i=cJ.MATCHES,baseSort:a=cV,sorter:s=e=>e.sort((e,t)=>(function(e,t,r){let{rank:n,keyIndex:i}=e,{rank:a,keyIndex:s}=t;return n!==a?n>a?-1:1:i===s?r(e,t):i{let{rank:n,rankedValue:i,keyIndex:a,keyThreshold:s}=e,{itemValue:o,attributes:l}=t,d=cW(o,u,c),f=i,{minRanking:h,maxRanking:p,threshold:m}=l;return d=cJ.MATCHES?d=h:d>p&&(d=p),d>n&&(n=d,a=r,s=m,f=o),{rankedValue:f,rank:n,keyIndex:a,keyThreshold:s}},{rankedValue:o,rank:cJ.NO_MATCH,keyIndex:-1,keyThreshold:c.threshold}):{rankedValue:o,rank:cW(o,u,c),keyIndex:-1,keyThreshold:c.threshold}),{rank:f,keyThreshold:h=i}=d;return f>=h&&e.push({...d,item:a,index:s}),e},[])).map(e=>{let{item:t}=e;return t})}function cW(e,t,r){if(e=cX(e,r),(t=cX(t,r)).length>e.length)return cJ.NO_MATCH;if(e===t)return cJ.CASE_SENSITIVE_EQUAL;let n=function*(e,t){let r=-1;for(;(r=e.indexOf(t,r+1))>-1;)yield r;return -1}(e=e.toLowerCase(),t=t.toLowerCase()),i=n.next(),a=i.value;if(e.length===t.length&&0===a)return cJ.EQUAL;if(0===a)return cJ.STARTS_WITH;let s=i;for(;!s.done;){if(s.value>0&&" "===e[s.value-1])return cJ.WORD_STARTS_WITH;s=n.next()}return a>0?cJ.CONTAINS:1===t.length?cJ.NO_MATCH:(function(e){let t="",r=" ";for(let n=0;n-1))return cJ.NO_MATCH;var s=n-a;let o=r/t.length;return cJ.MATCHES+1/s*o}(e,t)}function cX(e,t){let{keepDiacritics:r}=t;return e="".concat(e),r||(e=(0,cK.default)(e)),e}cQ.rankings=cJ;let c_={maxRanking:1/0,minRanking:-1/0};var cZ=e.i(29402);let cY=new Set(["SkiFree","SkiFree_Daily","SkiFree_Randomizer"]),cq={"missions.vl2":"Official","TR2final105-client.vl2":"Team Rabbit 2","z_mappacks/CTF/Classic_maps_v1.vl2":"Classic","z_mappacks/CTF/DynamixFinalPack.vl2":"Official","z_mappacks/CTF/KryMapPack_b3EDIT.vl2":"KryMapPack","z_mappacks/CTF/S5maps.vl2":"S5","z_mappacks/CTF/S8maps.vl2":"S8","z_mappacks/CTF/TWL-MapPack.vl2":"TWL","z_mappacks/CTF/TWL-MapPackEDIT.vl2":"TWL","z_mappacks/CTF/TWL2-MapPack.vl2":"TWL2","z_mappacks/CTF/TWL2-MapPackEDIT.vl2":"TWL2","z_mappacks/TWL_T2arenaOfficialMaps.vl2":"Arena","z_mappacks/z_DMP2-V0.6.vl2":"DMP2 (Discord Map Pack)","z_mappacks/zDMP-4.7.3DX.vl2":"DMP (Discord Map Pack)"},c$={"z_mappacks/DM":"DM","z_mappacks/LCTF":"LCTF","z_mappacks/Lak":"LakRabbit"},c0=(0,aK.getMissionList)().filter(e=>!cY.has(e)).map(e=>{var t,r;let n=(0,aK.getMissionInfo)(e),[i]=(0,aK.getSourceAndPath)(n.resourcePath),a=(e=>{let t=e.match(/^(.*)(\/[^/]+)$/);return t?t[1]:""})(i),s=null!=(r=null!=(t=cq[i])?t:c$[a])?r:null;return{resourcePath:n.resourcePath,missionName:e,displayName:n.displayName,sourcePath:i,groupName:s,missionTypes:n.missionTypes}}),c1=new Map(c0.map(e=>[e.missionName,e])),c2=function(e){let t=new Map;for(let n of e){var r;let e=null!=(r=t.get(n.groupName))?r:[];e.push(n),t.set(n.groupName,e)}return t.forEach((e,r)=>{t.set(r,(0,cZ.default)(e,[e=>(e.displayName||e.missionName).toLowerCase()],["asc"]))}),(0,cZ.default)(Array.from(t.entries()),[e=>{let[t]=e;return"Official"===t?0:null==t?2:1},e=>{let[t]=e;return t?t.toLowerCase():""}],["asc","asc"])}(c0),c9="undefined"!=typeof navigator&&/Mac|iPhone|iPad|iPod/.test(navigator.platform);function c3(e){let{mission:t}=e;return(0,eU.jsxs)(eU.Fragment,{children:[(0,eU.jsxs)("span",{className:"MissionSelect-itemHeader",children:[(0,eU.jsx)("span",{className:"MissionSelect-itemName",children:t.displayName||t.missionName}),t.missionTypes.length>0&&(0,eU.jsx)("span",{className:"MissionSelect-itemTypes",children:t.missionTypes.map(e=>(0,eU.jsx)("span",{className:"MissionSelect-itemType",children:e},e))})]}),(0,eU.jsx)("span",{className:"MissionSelect-itemMissionName",children:t.missionName})]})}function c4(e){let{value:t,onChange:r}=e,[n,i]=(0,eG.useState)(""),a=(0,eG.useRef)(null),s=cI({resetValueOnHide:!0,selectedValue:t,setSelectedValue:e=>{e&&r(e)},setValue:e=>{(0,eG.startTransition)(()=>i(e))}});(0,eG.useEffect)(()=>{let e=e=>{if("k"===e.key&&(e.metaKey||e.ctrlKey)){var t;e.preventDefault(),null==(t=a.current)||t.focus(),s.show()}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s]);let o=c1.get(t),l=(0,eG.useMemo)(()=>n?{type:"flat",missions:cQ(c0,n,{keys:["displayName","missionName"]})}:{type:"grouped",groups:c2},[n]),u=o?o.displayName||o.missionName:t,c="flat"===l.type?0===l.missions.length:0===l.groups.length;return(0,eU.jsxs)(cP,{store:s,children:[(0,eU.jsxs)("div",{className:"MissionSelect-inputWrapper",children:[(0,eU.jsx)(lm,{ref:a,autoSelect:!0,placeholder:u,className:"MissionSelect-input",onFocus:()=>{document.exitPointerLock(),s.show()}}),(0,eU.jsx)("kbd",{className:"MissionSelect-shortcut",children:c9?"⌘K":"^K"})]}),(0,eU.jsx)(cC,{gutter:4,fitViewport:!0,className:"MissionSelect-popover",children:(0,eU.jsxs)(lk,{className:"MissionSelect-list",children:["flat"===l.type?l.missions.map(e=>(0,eU.jsx)(lI,{value:e.missionName,className:"MissionSelect-item",focusOnHover:!0,children:(0,eU.jsx)(c3,{mission:e})},e.missionName)):l.groups.map(e=>{let[t,r]=e;return t?(0,eU.jsxs)(cH,{className:"MissionSelect-group",children:[(0,eU.jsx)(cz,{className:"MissionSelect-groupLabel",children:t}),r.map(e=>(0,eU.jsx)(lI,{value:e.missionName,className:"MissionSelect-item",focusOnHover:!0,children:(0,eU.jsx)(c3,{mission:e})},e.missionName))]},t):(0,eU.jsx)(eG.Fragment,{children:r.map(e=>(0,eU.jsx)(lI,{value:e.missionName,className:"MissionSelect-item",focusOnHover:!0,children:(0,eU.jsx)(c3,{mission:e})},e.missionName))},"ungrouped")}),c&&(0,eU.jsx)("div",{className:"MissionSelect-noResults",children:"No missions found"})]})})]})}function c8(e){let{missionName:t,onChangeMission:r}=e,{fogEnabled:n,setFogEnabled:i,fov:a,setFov:s,audioEnabled:o,setAudioEnabled:l,animationEnabled:u,setAnimationEnabled:c}=(0,n2.useSettings)(),{speedMultiplier:d,setSpeedMultiplier:f}=(0,n2.useControls)(),{debugMode:h,setDebugMode:p}=(0,n2.useDebug)();return(0,eU.jsxs)("div",{id:"controls",onKeyDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),children:[(0,eU.jsx)(c4,{value:t,onChange:r}),(0,eU.jsxs)("div",{className:"CheckboxField",children:[(0,eU.jsx)("input",{id:"fogInput",type:"checkbox",checked:n,onChange:e=>{i(e.target.checked)}}),(0,eU.jsx)("label",{htmlFor:"fogInput",children:"Fog?"})]}),(0,eU.jsxs)("div",{className:"CheckboxField",children:[(0,eU.jsx)("input",{id:"audioInput",type:"checkbox",checked:o,onChange:e=>{l(e.target.checked)}}),(0,eU.jsx)("label",{htmlFor:"audioInput",children:"Audio?"})]}),(0,eU.jsxs)("div",{className:"CheckboxField",children:[(0,eU.jsx)("input",{id:"animationInput",type:"checkbox",checked:u,onChange:e=>{c(e.target.checked)}}),(0,eU.jsx)("label",{htmlFor:"animationInput",children:"Animation?"})]}),(0,eU.jsxs)("div",{className:"CheckboxField",children:[(0,eU.jsx)("input",{id:"debugInput",type:"checkbox",checked:h,onChange:e=>{p(e.target.checked)}}),(0,eU.jsx)("label",{htmlFor:"debugInput",children:"Debug?"})]}),(0,eU.jsxs)("div",{className:"Field",children:[(0,eU.jsx)("label",{htmlFor:"fovInput",children:"FOV"}),(0,eU.jsx)("input",{id:"fovInput",type:"range",min:75,max:120,step:5,value:a,onChange:e=>s(parseInt(e.target.value))}),(0,eU.jsx)("output",{htmlFor:"speedInput",children:a})]}),(0,eU.jsxs)("div",{className:"Field",children:[(0,eU.jsx)("label",{htmlFor:"speedInput",children:"Speed"}),(0,eU.jsx)("input",{id:"speedInput",type:"range",min:.1,max:5,step:.05,value:d,onChange:e=>f(parseFloat(e.target.value))})]})]})}let c5=eG.forwardRef((e,t)=>{let{envMap:r,resolution:n=256,frames:i=1/0,makeDefault:a,children:s,...o}=e,l=(0,eW.useThree)(e=>{let{set:t}=e;return t}),u=(0,eW.useThree)(e=>{let{camera:t}=e;return t}),c=(0,eW.useThree)(e=>{let{size:t}=e;return t}),d=eG.useRef(null);eG.useImperativeHandle(t,()=>d.current,[]);let f=eG.useRef(null),h=function(e,t,r){let n=(0,eW.useThree)(e=>e.size),i=(0,eW.useThree)(e=>e.viewport),a="number"==typeof e?e:n.width*i.dpr,s=n.height*i.dpr,o=("number"==typeof e?void 0:e)||{},{samples:l=0,depth:u,...c}=o,d=null!=u?u:o.depthBuffer,f=eG.useMemo(()=>{let e=new ek.WebGLRenderTarget(a,s,{minFilter:ek.LinearFilter,magFilter:ek.LinearFilter,type:ek.HalfFloatType,...c});return d&&(e.depthTexture=new ek.DepthTexture(a,s,ek.FloatType)),e.samples=l,e},[]);return eG.useLayoutEffect(()=>{f.setSize(a,s),l&&(f.samples=l)},[l,f,a,s]),eG.useEffect(()=>()=>f.dispose(),[]),f}(n);eG.useLayoutEffect(()=>{o.manual||(d.current.aspect=c.width/c.height)},[c,o]),eG.useLayoutEffect(()=>{d.current.updateProjectionMatrix()});let p=0,m=null,g="function"==typeof s;return(0,eX.useFrame)(e=>{g&&(i===1/0||p{if(a)return l(()=>({camera:d.current})),()=>l(()=>({camera:u}))},[d,a,l]),eG.createElement(eG.Fragment,null,eG.createElement("perspectiveCamera",(0,ir.default)({ref:d},o),!g&&s),eG.createElement("group",{ref:f},g&&s(h.texture)))});function c6(){let{fov:e}=(0,n2.useSettings)();return(0,eU.jsx)(c5,{makeDefault:!0,position:[0,256,0],fov:e})}var c7=e.i(51434),de=e.i(81405);function dt(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function dr(e){let{showPanel:t=0,className:r,parent:n}=e,i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,[n,i]=eG.useState();return eG.useLayoutEffect(()=>{let t=e();return i(t),dt(r,t),()=>dt(r,null)},t),n}(()=>new de.default,[]);return eG.useEffect(()=>{if(i){let e=n&&n.current||document.body;i.showPanel(t),null==e||e.appendChild(i.dom);let a=(null!=r?r:"").split(" ").filter(e=>e);a.length&&i.dom.classList.add(...a);let s=(0,eH.j)(()=>i.begin()),o=(0,eH.k)(()=>i.end());return()=>{a.length&&i.dom.classList.remove(...a),null==e||e.removeChild(i.dom),s(),o()}}},[n,i,r,t]),null}var dn=e.i(60099);function di(){let{debugMode:e}=(0,n2.useDebug)(),t=(0,eG.useRef)(null);return(0,eG.useEffect)(()=>{let e=t.current;e&&e.setColors("rgb(153, 255, 0)","rgb(0, 153, 255)","rgb(255, 153, 0)")}),e?(0,eU.jsxs)(eU.Fragment,{children:[(0,eU.jsx)(dr,{className:"StatsPanel"}),(0,eU.jsx)("axesHelper",{ref:t,args:[70],renderOrder:999,children:(0,eU.jsx)("lineBasicMaterial",{depthTest:!1,depthWrite:!1,fog:!1,vertexColors:!0})}),(0,eU.jsx)(dn.Html,{position:[80,0,0],center:!0,children:(0,eU.jsx)("span",{className:"AxisLabel","data-axis":"y",children:"Y"})}),(0,eU.jsx)(dn.Html,{position:[0,80,0],center:!0,children:(0,eU.jsx)("span",{className:"AxisLabel","data-axis":"z",children:"Z"})}),(0,eU.jsx)(dn.Html,{position:[0,0,80],center:!0,children:(0,eU.jsx)("span",{className:"AxisLabel","data-axis":"x",children:"X"})})]}):null}let da=new a2;function ds(){let e=(0,eO.useSearchParams)(),t=(0,eO.useRouter)(),[r,n]=(0,eG.useState)(e.get("mission")||"TWL2_WoodyMyrk"),[i,a]=(0,eG.useState)(0),[s,o]=(0,eG.useState)(!0),l=i<1;(0,eG.useEffect)(()=>{if(l)o(!0);else{let e=setTimeout(()=>o(!1),500);return()=>clearTimeout(e)}},[l]),(0,eG.useEffect)(()=>(window.setMissionName=n,window.getMissionList=aK.getMissionList,window.getMissionInfo=aK.getMissionInfo,()=>{delete window.setMissionName,delete window.getMissionList,delete window.getMissionInfo}),[]),(0,eG.useEffect)(()=>{let e=new URLSearchParams;e.set("mission",r),t.replace("?".concat(e.toString()),{scroll:!1})},[r,t]);let u=(0,eG.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(t)},[]);return(0,eU.jsx)(nV,{client:da,children:(0,eU.jsx)("main",{children:(0,eU.jsxs)(n2.SettingsProvider,{children:[(0,eU.jsxs)("div",{id:"canvasContainer",children:[s&&(0,eU.jsxs)("div",{id:"loadingIndicator","data-complete":!l,children:[(0,eU.jsx)("div",{className:"LoadingSpinner"}),(0,eU.jsx)("div",{className:"LoadingProgress",children:(0,eU.jsx)("div",{className:"LoadingProgress-bar",style:{width:"".concat(100*i,"%")}})}),(0,eU.jsxs)("div",{className:"LoadingProgress-text",children:[Math.round(100*i),"%"]})]}),(0,eU.jsxs)(eQ,{shadows:!0,frameloop:"always",children:[(0,eU.jsx)(aU,{children:(0,eU.jsxs)(c7.AudioProvider,{children:[(0,eU.jsx)(aW,{name:r,onLoadingChange:u},r),(0,eU.jsx)(c6,{}),(0,eU.jsx)(di,{}),(0,eU.jsx)(sf,{})]})}),(0,eU.jsx)(rV,{children:(0,eU.jsx)(rW,{intensity:3,aoRadius:3,quality:"performance"})})]})]}),(0,eU.jsx)(c8,{missionName:r,onChangeMission:n})]})})})}function dl(){return(0,eU.jsx)(eG.Suspense,{children:(0,eU.jsx)(ds,{})})}}]); \ No newline at end of file diff --git a/docs/_next/static/chunks/[next]_entry_page-loader_ts_43b523b5._.js b/docs/_next/static/chunks/[next]_entry_page-loader_ts_43b523b5._.js deleted file mode 100644 index 03d94929..00000000 --- a/docs/_next/static/chunks/[next]_entry_page-loader_ts_43b523b5._.js +++ /dev/null @@ -1,23 +0,0 @@ -(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[next]/entry/page-loader.ts { PAGE => \"[project]/node_modules/next/error.js [client] (ecmascript)\" } [client] (ecmascript)", ((__turbopack_context__, module, exports) => { - -const PAGE_PATH = "/_error"; -(window.__NEXT_P = window.__NEXT_P || []).push([ - PAGE_PATH, - ()=>{ - return __turbopack_context__.r("[project]/node_modules/next/error.js [client] (ecmascript)"); - } -]); -// @ts-expect-error module.hot exists -if (module.hot) { - // @ts-expect-error module.hot exists - module.hot.dispose(function() { - window.__NEXT_P.push([ - PAGE_PATH - ]); - }); -} -}), -]); - -//# sourceMappingURL=%5Bnext%5D_entry_page-loader_ts_43b523b5._.js.map \ No newline at end of file diff --git a/docs/_next/static/chunks/[next]_entry_page-loader_ts_43b523b5._.js.map b/docs/_next/static/chunks/[next]_entry_page-loader_ts_43b523b5._.js.map deleted file mode 100644 index 547e382e..00000000 --- a/docs/_next/static/chunks/[next]_entry_page-loader_ts_43b523b5._.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": [], - "sections": [ - {"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[next]/entry/page-loader.ts"],"sourcesContent":["const PAGE_PATH = \"/_error\";\n\n/// \n\n// inserted by rust code\ndeclare const PAGE_PATH: string\n\n // Adapted from https://github.com/vercel/next.js/blob/b7f9f1f98fc8ab602e84825105b5727272b72e7d/packages/next/src/build/webpack/loaders/next-client-pages-loader.ts\n;(window.__NEXT_P = window.__NEXT_P || []).push([\n PAGE_PATH,\n () => {\n return require('PAGE')\n },\n])\n// @ts-expect-error module.hot exists\nif (module.hot) {\n // @ts-expect-error module.hot exists\n module.hot.dispose(function () {\n window.__NEXT_P.push([PAGE_PATH])\n })\n}\n"],"names":[],"mappings":"AAAA,MAAM,YAAY;AAQjB,CAAC,OAAO,QAAQ,GAAG,OAAO,QAAQ,IAAI,EAAE,EAAE,IAAI,CAAC;IAC9C;IACA;QACE;IACF;CACD;AACD,qCAAqC;AACrC,IAAI,OAAO,GAAG,EAAE;IACd,qCAAqC;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC;QACjB,OAAO,QAAQ,CAAC,IAAI,CAAC;YAAC;SAAU;IAClC;AACF","ignoreList":[0],"debugId":null}}] -} \ No newline at end of file diff --git a/docs/_next/static/chunks/[next]_entry_page-loader_ts_742e4b53._.js b/docs/_next/static/chunks/[next]_entry_page-loader_ts_742e4b53._.js deleted file mode 100644 index 6c08e2d4..00000000 --- a/docs/_next/static/chunks/[next]_entry_page-loader_ts_742e4b53._.js +++ /dev/null @@ -1,23 +0,0 @@ -(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[next]/entry/page-loader.ts { PAGE => \"[project]/node_modules/next/app.js [client] (ecmascript)\" } [client] (ecmascript)", ((__turbopack_context__, module, exports) => { - -const PAGE_PATH = "/_app"; -(window.__NEXT_P = window.__NEXT_P || []).push([ - PAGE_PATH, - ()=>{ - return __turbopack_context__.r("[project]/node_modules/next/app.js [client] (ecmascript)"); - } -]); -// @ts-expect-error module.hot exists -if (module.hot) { - // @ts-expect-error module.hot exists - module.hot.dispose(function() { - window.__NEXT_P.push([ - PAGE_PATH - ]); - }); -} -}), -]); - -//# sourceMappingURL=%5Bnext%5D_entry_page-loader_ts_742e4b53._.js.map \ No newline at end of file diff --git a/docs/_next/static/chunks/[next]_entry_page-loader_ts_742e4b53._.js.map b/docs/_next/static/chunks/[next]_entry_page-loader_ts_742e4b53._.js.map deleted file mode 100644 index 5576343f..00000000 --- a/docs/_next/static/chunks/[next]_entry_page-loader_ts_742e4b53._.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": [], - "sections": [ - {"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[next]/entry/page-loader.ts"],"sourcesContent":["const PAGE_PATH = \"/_app\";\n\n/// \n\n// inserted by rust code\ndeclare const PAGE_PATH: string\n\n // Adapted from https://github.com/vercel/next.js/blob/b7f9f1f98fc8ab602e84825105b5727272b72e7d/packages/next/src/build/webpack/loaders/next-client-pages-loader.ts\n;(window.__NEXT_P = window.__NEXT_P || []).push([\n PAGE_PATH,\n () => {\n return require('PAGE')\n },\n])\n// @ts-expect-error module.hot exists\nif (module.hot) {\n // @ts-expect-error module.hot exists\n module.hot.dispose(function () {\n window.__NEXT_P.push([PAGE_PATH])\n })\n}\n"],"names":[],"mappings":"AAAA,MAAM,YAAY;AAQjB,CAAC,OAAO,QAAQ,GAAG,OAAO,QAAQ,IAAI,EAAE,EAAE,IAAI,CAAC;IAC9C;IACA;QACE;IACF;CACD;AACD,qCAAqC;AACrC,IAAI,OAAO,GAAG,EAAE;IACd,qCAAqC;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC;QACjB,OAAO,QAAQ,CAAC,IAAI,CAAC;YAAC;SAAU;IAClC;AACF","ignoreList":[0],"debugId":null}}] -} \ No newline at end of file diff --git a/docs/_next/static/chunks/[root-of-the-server]__092393de._.js b/docs/_next/static/chunks/[root-of-the-server]__092393de._.js deleted file mode 100644 index e577e942..00000000 --- a/docs/_next/static/chunks/[root-of-the-server]__092393de._.js +++ /dev/null @@ -1,481 +0,0 @@ -(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[turbopack]/browser/dev/hmr-client/hmr-client.ts [client] (ecmascript)", ((__turbopack_context__) => { -"use strict"; - -/// -/// -/// -/// -__turbopack_context__.s([ - "connect", - ()=>connect, - "setHooks", - ()=>setHooks, - "subscribeToUpdate", - ()=>subscribeToUpdate -]); -function connect(param) { - let { addMessageListener, sendMessage, onUpdateError = console.error } = param; - addMessageListener((msg)=>{ - switch(msg.type){ - case 'turbopack-connected': - handleSocketConnected(sendMessage); - break; - default: - try { - if (Array.isArray(msg.data)) { - for(let i = 0; i < msg.data.length; i++){ - handleSocketMessage(msg.data[i]); - } - } else { - handleSocketMessage(msg.data); - } - applyAggregatedUpdates(); - } catch (e) { - console.warn('[Fast Refresh] performing full reload\n\n' + "Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\n" + 'You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\n' + 'Consider migrating the non-React component export to a separate file and importing it into both files.\n\n' + 'It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\n' + 'Fast Refresh requires at least one parent function component in your React tree.'); - onUpdateError(e); - location.reload(); - } - break; - } - }); - const queued = globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS; - if (queued != null && !Array.isArray(queued)) { - throw new Error('A separate HMR handler was already registered'); - } - globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS = { - push: (param)=>{ - let [chunkPath, callback] = param; - subscribeToChunkUpdate(chunkPath, sendMessage, callback); - } - }; - if (Array.isArray(queued)) { - for (const [chunkPath, callback] of queued){ - subscribeToChunkUpdate(chunkPath, sendMessage, callback); - } - } -} -const updateCallbackSets = new Map(); -function sendJSON(sendMessage, message) { - sendMessage(JSON.stringify(message)); -} -function resourceKey(resource) { - return JSON.stringify({ - path: resource.path, - headers: resource.headers || null - }); -} -function subscribeToUpdates(sendMessage, resource) { - sendJSON(sendMessage, { - type: 'turbopack-subscribe', - ...resource - }); - return ()=>{ - sendJSON(sendMessage, { - type: 'turbopack-unsubscribe', - ...resource - }); - }; -} -function handleSocketConnected(sendMessage) { - for (const key of updateCallbackSets.keys()){ - subscribeToUpdates(sendMessage, JSON.parse(key)); - } -} -// we aggregate all pending updates until the issues are resolved -const chunkListsWithPendingUpdates = new Map(); -function aggregateUpdates(msg) { - const key = resourceKey(msg.resource); - let aggregated = chunkListsWithPendingUpdates.get(key); - if (aggregated) { - aggregated.instruction = mergeChunkListUpdates(aggregated.instruction, msg.instruction); - } else { - chunkListsWithPendingUpdates.set(key, msg); - } -} -function applyAggregatedUpdates() { - if (chunkListsWithPendingUpdates.size === 0) return; - hooks.beforeRefresh(); - for (const msg of chunkListsWithPendingUpdates.values()){ - triggerUpdate(msg); - } - chunkListsWithPendingUpdates.clear(); - finalizeUpdate(); -} -function mergeChunkListUpdates(updateA, updateB) { - let chunks; - if (updateA.chunks != null) { - if (updateB.chunks == null) { - chunks = updateA.chunks; - } else { - chunks = mergeChunkListChunks(updateA.chunks, updateB.chunks); - } - } else if (updateB.chunks != null) { - chunks = updateB.chunks; - } - let merged; - if (updateA.merged != null) { - if (updateB.merged == null) { - merged = updateA.merged; - } else { - // Since `merged` is an array of updates, we need to merge them all into - // one, consistent update. - // Since there can only be `EcmascriptMergeUpdates` in the array, there is - // no need to key on the `type` field. - let update = updateA.merged[0]; - for(let i = 1; i < updateA.merged.length; i++){ - update = mergeChunkListEcmascriptMergedUpdates(update, updateA.merged[i]); - } - for(let i = 0; i < updateB.merged.length; i++){ - update = mergeChunkListEcmascriptMergedUpdates(update, updateB.merged[i]); - } - merged = [ - update - ]; - } - } else if (updateB.merged != null) { - merged = updateB.merged; - } - return { - type: 'ChunkListUpdate', - chunks, - merged - }; -} -function mergeChunkListChunks(chunksA, chunksB) { - const chunks = {}; - for (const [chunkPath, chunkUpdateA] of Object.entries(chunksA)){ - const chunkUpdateB = chunksB[chunkPath]; - if (chunkUpdateB != null) { - const mergedUpdate = mergeChunkUpdates(chunkUpdateA, chunkUpdateB); - if (mergedUpdate != null) { - chunks[chunkPath] = mergedUpdate; - } - } else { - chunks[chunkPath] = chunkUpdateA; - } - } - for (const [chunkPath, chunkUpdateB] of Object.entries(chunksB)){ - if (chunks[chunkPath] == null) { - chunks[chunkPath] = chunkUpdateB; - } - } - return chunks; -} -function mergeChunkUpdates(updateA, updateB) { - if (updateA.type === 'added' && updateB.type === 'deleted' || updateA.type === 'deleted' && updateB.type === 'added') { - return undefined; - } - if (updateA.type === 'partial') { - invariant(updateA.instruction, 'Partial updates are unsupported'); - } - if (updateB.type === 'partial') { - invariant(updateB.instruction, 'Partial updates are unsupported'); - } - return undefined; -} -function mergeChunkListEcmascriptMergedUpdates(mergedA, mergedB) { - const entries = mergeEcmascriptChunkEntries(mergedA.entries, mergedB.entries); - const chunks = mergeEcmascriptChunksUpdates(mergedA.chunks, mergedB.chunks); - return { - type: 'EcmascriptMergedUpdate', - entries, - chunks - }; -} -function mergeEcmascriptChunkEntries(entriesA, entriesB) { - return { - ...entriesA, - ...entriesB - }; -} -function mergeEcmascriptChunksUpdates(chunksA, chunksB) { - if (chunksA == null) { - return chunksB; - } - if (chunksB == null) { - return chunksA; - } - const chunks = {}; - for (const [chunkPath, chunkUpdateA] of Object.entries(chunksA)){ - const chunkUpdateB = chunksB[chunkPath]; - if (chunkUpdateB != null) { - const mergedUpdate = mergeEcmascriptChunkUpdates(chunkUpdateA, chunkUpdateB); - if (mergedUpdate != null) { - chunks[chunkPath] = mergedUpdate; - } - } else { - chunks[chunkPath] = chunkUpdateA; - } - } - for (const [chunkPath, chunkUpdateB] of Object.entries(chunksB)){ - if (chunks[chunkPath] == null) { - chunks[chunkPath] = chunkUpdateB; - } - } - if (Object.keys(chunks).length === 0) { - return undefined; - } - return chunks; -} -function mergeEcmascriptChunkUpdates(updateA, updateB) { - if (updateA.type === 'added' && updateB.type === 'deleted') { - // These two completely cancel each other out. - return undefined; - } - if (updateA.type === 'deleted' && updateB.type === 'added') { - const added = []; - const deleted = []; - var _updateA_modules; - const deletedModules = new Set((_updateA_modules = updateA.modules) !== null && _updateA_modules !== void 0 ? _updateA_modules : []); - var _updateB_modules; - const addedModules = new Set((_updateB_modules = updateB.modules) !== null && _updateB_modules !== void 0 ? _updateB_modules : []); - for (const moduleId of addedModules){ - if (!deletedModules.has(moduleId)) { - added.push(moduleId); - } - } - for (const moduleId of deletedModules){ - if (!addedModules.has(moduleId)) { - deleted.push(moduleId); - } - } - if (added.length === 0 && deleted.length === 0) { - return undefined; - } - return { - type: 'partial', - added, - deleted - }; - } - if (updateA.type === 'partial' && updateB.type === 'partial') { - var _updateA_added, _updateB_added; - const added = new Set([ - ...(_updateA_added = updateA.added) !== null && _updateA_added !== void 0 ? _updateA_added : [], - ...(_updateB_added = updateB.added) !== null && _updateB_added !== void 0 ? _updateB_added : [] - ]); - var _updateA_deleted, _updateB_deleted; - const deleted = new Set([ - ...(_updateA_deleted = updateA.deleted) !== null && _updateA_deleted !== void 0 ? _updateA_deleted : [], - ...(_updateB_deleted = updateB.deleted) !== null && _updateB_deleted !== void 0 ? _updateB_deleted : [] - ]); - if (updateB.added != null) { - for (const moduleId of updateB.added){ - deleted.delete(moduleId); - } - } - if (updateB.deleted != null) { - for (const moduleId of updateB.deleted){ - added.delete(moduleId); - } - } - return { - type: 'partial', - added: [ - ...added - ], - deleted: [ - ...deleted - ] - }; - } - if (updateA.type === 'added' && updateB.type === 'partial') { - var _updateA_modules1, _updateB_added1; - const modules = new Set([ - ...(_updateA_modules1 = updateA.modules) !== null && _updateA_modules1 !== void 0 ? _updateA_modules1 : [], - ...(_updateB_added1 = updateB.added) !== null && _updateB_added1 !== void 0 ? _updateB_added1 : [] - ]); - var _updateB_deleted1; - for (const moduleId of (_updateB_deleted1 = updateB.deleted) !== null && _updateB_deleted1 !== void 0 ? _updateB_deleted1 : []){ - modules.delete(moduleId); - } - return { - type: 'added', - modules: [ - ...modules - ] - }; - } - if (updateA.type === 'partial' && updateB.type === 'deleted') { - var _updateB_modules1; - // We could eagerly return `updateB` here, but this would potentially be - // incorrect if `updateA` has added modules. - const modules = new Set((_updateB_modules1 = updateB.modules) !== null && _updateB_modules1 !== void 0 ? _updateB_modules1 : []); - if (updateA.added != null) { - for (const moduleId of updateA.added){ - modules.delete(moduleId); - } - } - return { - type: 'deleted', - modules: [ - ...modules - ] - }; - } - // Any other update combination is invalid. - return undefined; -} -function invariant(_, message) { - throw new Error("Invariant: ".concat(message)); -} -const CRITICAL = [ - 'bug', - 'error', - 'fatal' -]; -function compareByList(list, a, b) { - const aI = list.indexOf(a) + 1 || list.length; - const bI = list.indexOf(b) + 1 || list.length; - return aI - bI; -} -const chunksWithIssues = new Map(); -function emitIssues() { - const issues = []; - const deduplicationSet = new Set(); - for (const [_, chunkIssues] of chunksWithIssues){ - for (const chunkIssue of chunkIssues){ - if (deduplicationSet.has(chunkIssue.formatted)) continue; - issues.push(chunkIssue); - deduplicationSet.add(chunkIssue.formatted); - } - } - sortIssues(issues); - hooks.issues(issues); -} -function handleIssues(msg) { - const key = resourceKey(msg.resource); - let hasCriticalIssues = false; - for (const issue of msg.issues){ - if (CRITICAL.includes(issue.severity)) { - hasCriticalIssues = true; - } - } - if (msg.issues.length > 0) { - chunksWithIssues.set(key, msg.issues); - } else if (chunksWithIssues.has(key)) { - chunksWithIssues.delete(key); - } - emitIssues(); - return hasCriticalIssues; -} -const SEVERITY_ORDER = [ - 'bug', - 'fatal', - 'error', - 'warning', - 'info', - 'log' -]; -const CATEGORY_ORDER = [ - 'parse', - 'resolve', - 'code generation', - 'rendering', - 'typescript', - 'other' -]; -function sortIssues(issues) { - issues.sort((a, b)=>{ - const first = compareByList(SEVERITY_ORDER, a.severity, b.severity); - if (first !== 0) return first; - return compareByList(CATEGORY_ORDER, a.category, b.category); - }); -} -const hooks = { - beforeRefresh: ()=>{}, - refresh: ()=>{}, - buildOk: ()=>{}, - issues: (_issues)=>{} -}; -function setHooks(newHooks) { - Object.assign(hooks, newHooks); -} -function handleSocketMessage(msg) { - sortIssues(msg.issues); - handleIssues(msg); - switch(msg.type){ - case 'issues': - break; - case 'partial': - // aggregate updates - aggregateUpdates(msg); - break; - default: - // run single update - const runHooks = chunkListsWithPendingUpdates.size === 0; - if (runHooks) hooks.beforeRefresh(); - triggerUpdate(msg); - if (runHooks) finalizeUpdate(); - break; - } -} -function finalizeUpdate() { - hooks.refresh(); - hooks.buildOk(); - // This is used by the Next.js integration test suite to notify it when HMR - // updates have been completed. - // TODO: Only run this in test environments (gate by `process.env.__NEXT_TEST_MODE`) - if (globalThis.__NEXT_HMR_CB) { - globalThis.__NEXT_HMR_CB(); - globalThis.__NEXT_HMR_CB = null; - } -} -function subscribeToChunkUpdate(chunkListPath, sendMessage, callback) { - return subscribeToUpdate({ - path: chunkListPath - }, sendMessage, callback); -} -function subscribeToUpdate(resource, sendMessage, callback) { - const key = resourceKey(resource); - let callbackSet; - const existingCallbackSet = updateCallbackSets.get(key); - if (!existingCallbackSet) { - callbackSet = { - callbacks: new Set([ - callback - ]), - unsubscribe: subscribeToUpdates(sendMessage, resource) - }; - updateCallbackSets.set(key, callbackSet); - } else { - existingCallbackSet.callbacks.add(callback); - callbackSet = existingCallbackSet; - } - return ()=>{ - callbackSet.callbacks.delete(callback); - if (callbackSet.callbacks.size === 0) { - callbackSet.unsubscribe(); - updateCallbackSets.delete(key); - } - }; -} -function triggerUpdate(msg) { - const key = resourceKey(msg.resource); - const callbackSet = updateCallbackSets.get(key); - if (!callbackSet) { - return; - } - for (const callback of callbackSet.callbacks){ - callback(msg); - } - if (msg.type === 'notFound') { - // This indicates that the resource which we subscribed to either does not exist or - // has been deleted. In either case, we should clear all update callbacks, so if a - // new subscription is created for the same resource, it will send a new "subscribe" - // message to the server. - // No need to send an "unsubscribe" message to the server, it will have already - // dropped the update stream before sending the "notFound" message. - updateCallbackSets.delete(key); - } -} -}), -"[hmr-entry]/hmr-entry.js { ENTRY => \"[project]/pages/_error\" }", ((__turbopack_context__) => { -"use strict"; - -__turbopack_context__.r("[next]/entry/page-loader.ts { PAGE => \"[project]/node_modules/next/error.js [client] (ecmascript)\" } [client] (ecmascript)"); -}), -]); - -//# sourceMappingURL=%5Broot-of-the-server%5D__092393de._.js.map \ No newline at end of file diff --git a/docs/_next/static/chunks/[root-of-the-server]__092393de._.js.map b/docs/_next/static/chunks/[root-of-the-server]__092393de._.js.map deleted file mode 100644 index 04bb617e..00000000 --- a/docs/_next/static/chunks/[root-of-the-server]__092393de._.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": [], - "sections": [ - {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/dev/hmr-client/hmr-client.ts"],"sourcesContent":["/// \n/// \n/// \n/// \n\ntype SendMessage = (msg: any) => void\nexport type WebSocketMessage =\n | {\n type: 'turbopack-connected'\n }\n | {\n type: 'turbopack-message'\n data: Record\n }\n\nexport type ClientOptions = {\n addMessageListener: (cb: (msg: WebSocketMessage) => void) => void\n sendMessage: SendMessage\n onUpdateError: (err: unknown) => void\n}\n\nexport function connect({\n addMessageListener,\n sendMessage,\n onUpdateError = console.error,\n}: ClientOptions) {\n addMessageListener((msg) => {\n switch (msg.type) {\n case 'turbopack-connected':\n handleSocketConnected(sendMessage)\n break\n default:\n try {\n if (Array.isArray(msg.data)) {\n for (let i = 0; i < msg.data.length; i++) {\n handleSocketMessage(msg.data[i] as ServerMessage)\n }\n } else {\n handleSocketMessage(msg.data as ServerMessage)\n }\n applyAggregatedUpdates()\n } catch (e: unknown) {\n console.warn(\n '[Fast Refresh] performing full reload\\n\\n' +\n \"Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\\n\" +\n 'You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\\n' +\n 'Consider migrating the non-React component export to a separate file and importing it into both files.\\n\\n' +\n 'It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\\n' +\n 'Fast Refresh requires at least one parent function component in your React tree.'\n )\n onUpdateError(e)\n location.reload()\n }\n break\n }\n })\n\n const queued = globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS\n if (queued != null && !Array.isArray(queued)) {\n throw new Error('A separate HMR handler was already registered')\n }\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS = {\n push: ([chunkPath, callback]: [ChunkListPath, UpdateCallback]) => {\n subscribeToChunkUpdate(chunkPath, sendMessage, callback)\n },\n }\n\n if (Array.isArray(queued)) {\n for (const [chunkPath, callback] of queued) {\n subscribeToChunkUpdate(chunkPath, sendMessage, callback)\n }\n }\n}\n\ntype UpdateCallbackSet = {\n callbacks: Set\n unsubscribe: () => void\n}\n\nconst updateCallbackSets: Map = new Map()\n\nfunction sendJSON(sendMessage: SendMessage, message: ClientMessage) {\n sendMessage(JSON.stringify(message))\n}\n\ntype ResourceKey = string\n\nfunction resourceKey(resource: ResourceIdentifier): ResourceKey {\n return JSON.stringify({\n path: resource.path,\n headers: resource.headers || null,\n })\n}\n\nfunction subscribeToUpdates(\n sendMessage: SendMessage,\n resource: ResourceIdentifier\n): () => void {\n sendJSON(sendMessage, {\n type: 'turbopack-subscribe',\n ...resource,\n })\n\n return () => {\n sendJSON(sendMessage, {\n type: 'turbopack-unsubscribe',\n ...resource,\n })\n }\n}\n\nfunction handleSocketConnected(sendMessage: SendMessage) {\n for (const key of updateCallbackSets.keys()) {\n subscribeToUpdates(sendMessage, JSON.parse(key))\n }\n}\n\n// we aggregate all pending updates until the issues are resolved\nconst chunkListsWithPendingUpdates: Map =\n new Map()\n\nfunction aggregateUpdates(msg: PartialServerMessage) {\n const key = resourceKey(msg.resource)\n let aggregated = chunkListsWithPendingUpdates.get(key)\n\n if (aggregated) {\n aggregated.instruction = mergeChunkListUpdates(\n aggregated.instruction,\n msg.instruction\n )\n } else {\n chunkListsWithPendingUpdates.set(key, msg)\n }\n}\n\nfunction applyAggregatedUpdates() {\n if (chunkListsWithPendingUpdates.size === 0) return\n hooks.beforeRefresh()\n for (const msg of chunkListsWithPendingUpdates.values()) {\n triggerUpdate(msg)\n }\n chunkListsWithPendingUpdates.clear()\n finalizeUpdate()\n}\n\nfunction mergeChunkListUpdates(\n updateA: ChunkListUpdate,\n updateB: ChunkListUpdate\n): ChunkListUpdate {\n let chunks\n if (updateA.chunks != null) {\n if (updateB.chunks == null) {\n chunks = updateA.chunks\n } else {\n chunks = mergeChunkListChunks(updateA.chunks, updateB.chunks)\n }\n } else if (updateB.chunks != null) {\n chunks = updateB.chunks\n }\n\n let merged\n if (updateA.merged != null) {\n if (updateB.merged == null) {\n merged = updateA.merged\n } else {\n // Since `merged` is an array of updates, we need to merge them all into\n // one, consistent update.\n // Since there can only be `EcmascriptMergeUpdates` in the array, there is\n // no need to key on the `type` field.\n let update = updateA.merged[0]\n for (let i = 1; i < updateA.merged.length; i++) {\n update = mergeChunkListEcmascriptMergedUpdates(\n update,\n updateA.merged[i]\n )\n }\n\n for (let i = 0; i < updateB.merged.length; i++) {\n update = mergeChunkListEcmascriptMergedUpdates(\n update,\n updateB.merged[i]\n )\n }\n\n merged = [update]\n }\n } else if (updateB.merged != null) {\n merged = updateB.merged\n }\n\n return {\n type: 'ChunkListUpdate',\n chunks,\n merged,\n }\n}\n\nfunction mergeChunkListChunks(\n chunksA: Record,\n chunksB: Record\n): Record {\n const chunks: Record = {}\n\n for (const [chunkPath, chunkUpdateA] of Object.entries(chunksA) as Array<\n [ChunkPath, ChunkUpdate]\n >) {\n const chunkUpdateB = chunksB[chunkPath]\n if (chunkUpdateB != null) {\n const mergedUpdate = mergeChunkUpdates(chunkUpdateA, chunkUpdateB)\n if (mergedUpdate != null) {\n chunks[chunkPath] = mergedUpdate\n }\n } else {\n chunks[chunkPath] = chunkUpdateA\n }\n }\n\n for (const [chunkPath, chunkUpdateB] of Object.entries(chunksB) as Array<\n [ChunkPath, ChunkUpdate]\n >) {\n if (chunks[chunkPath] == null) {\n chunks[chunkPath] = chunkUpdateB\n }\n }\n\n return chunks\n}\n\nfunction mergeChunkUpdates(\n updateA: ChunkUpdate,\n updateB: ChunkUpdate\n): ChunkUpdate | undefined {\n if (\n (updateA.type === 'added' && updateB.type === 'deleted') ||\n (updateA.type === 'deleted' && updateB.type === 'added')\n ) {\n return undefined\n }\n\n if (updateA.type === 'partial') {\n invariant(updateA.instruction, 'Partial updates are unsupported')\n }\n\n if (updateB.type === 'partial') {\n invariant(updateB.instruction, 'Partial updates are unsupported')\n }\n\n return undefined\n}\n\nfunction mergeChunkListEcmascriptMergedUpdates(\n mergedA: EcmascriptMergedUpdate,\n mergedB: EcmascriptMergedUpdate\n): EcmascriptMergedUpdate {\n const entries = mergeEcmascriptChunkEntries(mergedA.entries, mergedB.entries)\n const chunks = mergeEcmascriptChunksUpdates(mergedA.chunks, mergedB.chunks)\n\n return {\n type: 'EcmascriptMergedUpdate',\n entries,\n chunks,\n }\n}\n\nfunction mergeEcmascriptChunkEntries(\n entriesA: Record | undefined,\n entriesB: Record | undefined\n): Record {\n return { ...entriesA, ...entriesB }\n}\n\nfunction mergeEcmascriptChunksUpdates(\n chunksA: Record | undefined,\n chunksB: Record | undefined\n): Record | undefined {\n if (chunksA == null) {\n return chunksB\n }\n\n if (chunksB == null) {\n return chunksA\n }\n\n const chunks: Record = {}\n\n for (const [chunkPath, chunkUpdateA] of Object.entries(chunksA) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n const chunkUpdateB = chunksB[chunkPath]\n if (chunkUpdateB != null) {\n const mergedUpdate = mergeEcmascriptChunkUpdates(\n chunkUpdateA,\n chunkUpdateB\n )\n if (mergedUpdate != null) {\n chunks[chunkPath] = mergedUpdate\n }\n } else {\n chunks[chunkPath] = chunkUpdateA\n }\n }\n\n for (const [chunkPath, chunkUpdateB] of Object.entries(chunksB) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n if (chunks[chunkPath] == null) {\n chunks[chunkPath] = chunkUpdateB\n }\n }\n\n if (Object.keys(chunks).length === 0) {\n return undefined\n }\n\n return chunks\n}\n\nfunction mergeEcmascriptChunkUpdates(\n updateA: EcmascriptMergedChunkUpdate,\n updateB: EcmascriptMergedChunkUpdate\n): EcmascriptMergedChunkUpdate | undefined {\n if (updateA.type === 'added' && updateB.type === 'deleted') {\n // These two completely cancel each other out.\n return undefined\n }\n\n if (updateA.type === 'deleted' && updateB.type === 'added') {\n const added = []\n const deleted = []\n const deletedModules = new Set(updateA.modules ?? [])\n const addedModules = new Set(updateB.modules ?? [])\n\n for (const moduleId of addedModules) {\n if (!deletedModules.has(moduleId)) {\n added.push(moduleId)\n }\n }\n\n for (const moduleId of deletedModules) {\n if (!addedModules.has(moduleId)) {\n deleted.push(moduleId)\n }\n }\n\n if (added.length === 0 && deleted.length === 0) {\n return undefined\n }\n\n return {\n type: 'partial',\n added,\n deleted,\n }\n }\n\n if (updateA.type === 'partial' && updateB.type === 'partial') {\n const added = new Set([...(updateA.added ?? []), ...(updateB.added ?? [])])\n const deleted = new Set([\n ...(updateA.deleted ?? []),\n ...(updateB.deleted ?? []),\n ])\n\n if (updateB.added != null) {\n for (const moduleId of updateB.added) {\n deleted.delete(moduleId)\n }\n }\n\n if (updateB.deleted != null) {\n for (const moduleId of updateB.deleted) {\n added.delete(moduleId)\n }\n }\n\n return {\n type: 'partial',\n added: [...added],\n deleted: [...deleted],\n }\n }\n\n if (updateA.type === 'added' && updateB.type === 'partial') {\n const modules = new Set([\n ...(updateA.modules ?? []),\n ...(updateB.added ?? []),\n ])\n\n for (const moduleId of updateB.deleted ?? []) {\n modules.delete(moduleId)\n }\n\n return {\n type: 'added',\n modules: [...modules],\n }\n }\n\n if (updateA.type === 'partial' && updateB.type === 'deleted') {\n // We could eagerly return `updateB` here, but this would potentially be\n // incorrect if `updateA` has added modules.\n\n const modules = new Set(updateB.modules ?? [])\n\n if (updateA.added != null) {\n for (const moduleId of updateA.added) {\n modules.delete(moduleId)\n }\n }\n\n return {\n type: 'deleted',\n modules: [...modules],\n }\n }\n\n // Any other update combination is invalid.\n\n return undefined\n}\n\nfunction invariant(_: never, message: string): never {\n throw new Error(`Invariant: ${message}`)\n}\n\nconst CRITICAL = ['bug', 'error', 'fatal']\n\nfunction compareByList(list: any[], a: any, b: any) {\n const aI = list.indexOf(a) + 1 || list.length\n const bI = list.indexOf(b) + 1 || list.length\n return aI - bI\n}\n\nconst chunksWithIssues: Map = new Map()\n\nfunction emitIssues() {\n const issues = []\n const deduplicationSet = new Set()\n\n for (const [_, chunkIssues] of chunksWithIssues) {\n for (const chunkIssue of chunkIssues) {\n if (deduplicationSet.has(chunkIssue.formatted)) continue\n\n issues.push(chunkIssue)\n deduplicationSet.add(chunkIssue.formatted)\n }\n }\n\n sortIssues(issues)\n\n hooks.issues(issues)\n}\n\nfunction handleIssues(msg: ServerMessage): boolean {\n const key = resourceKey(msg.resource)\n let hasCriticalIssues = false\n\n for (const issue of msg.issues) {\n if (CRITICAL.includes(issue.severity)) {\n hasCriticalIssues = true\n }\n }\n\n if (msg.issues.length > 0) {\n chunksWithIssues.set(key, msg.issues)\n } else if (chunksWithIssues.has(key)) {\n chunksWithIssues.delete(key)\n }\n\n emitIssues()\n\n return hasCriticalIssues\n}\n\nconst SEVERITY_ORDER = ['bug', 'fatal', 'error', 'warning', 'info', 'log']\nconst CATEGORY_ORDER = [\n 'parse',\n 'resolve',\n 'code generation',\n 'rendering',\n 'typescript',\n 'other',\n]\n\nfunction sortIssues(issues: Issue[]) {\n issues.sort((a, b) => {\n const first = compareByList(SEVERITY_ORDER, a.severity, b.severity)\n if (first !== 0) return first\n return compareByList(CATEGORY_ORDER, a.category, b.category)\n })\n}\n\nconst hooks = {\n beforeRefresh: () => {},\n refresh: () => {},\n buildOk: () => {},\n issues: (_issues: Issue[]) => {},\n}\n\nexport function setHooks(newHooks: typeof hooks) {\n Object.assign(hooks, newHooks)\n}\n\nfunction handleSocketMessage(msg: ServerMessage) {\n sortIssues(msg.issues)\n\n handleIssues(msg)\n\n switch (msg.type) {\n case 'issues':\n // issues are already handled\n break\n case 'partial':\n // aggregate updates\n aggregateUpdates(msg)\n break\n default:\n // run single update\n const runHooks = chunkListsWithPendingUpdates.size === 0\n if (runHooks) hooks.beforeRefresh()\n triggerUpdate(msg)\n if (runHooks) finalizeUpdate()\n break\n }\n}\n\nfunction finalizeUpdate() {\n hooks.refresh()\n hooks.buildOk()\n\n // This is used by the Next.js integration test suite to notify it when HMR\n // updates have been completed.\n // TODO: Only run this in test environments (gate by `process.env.__NEXT_TEST_MODE`)\n if (globalThis.__NEXT_HMR_CB) {\n globalThis.__NEXT_HMR_CB()\n globalThis.__NEXT_HMR_CB = null\n }\n}\n\nfunction subscribeToChunkUpdate(\n chunkListPath: ChunkListPath,\n sendMessage: SendMessage,\n callback: UpdateCallback\n): () => void {\n return subscribeToUpdate(\n {\n path: chunkListPath,\n },\n sendMessage,\n callback\n )\n}\n\nexport function subscribeToUpdate(\n resource: ResourceIdentifier,\n sendMessage: SendMessage,\n callback: UpdateCallback\n) {\n const key = resourceKey(resource)\n let callbackSet: UpdateCallbackSet\n const existingCallbackSet = updateCallbackSets.get(key)\n if (!existingCallbackSet) {\n callbackSet = {\n callbacks: new Set([callback]),\n unsubscribe: subscribeToUpdates(sendMessage, resource),\n }\n updateCallbackSets.set(key, callbackSet)\n } else {\n existingCallbackSet.callbacks.add(callback)\n callbackSet = existingCallbackSet\n }\n\n return () => {\n callbackSet.callbacks.delete(callback)\n\n if (callbackSet.callbacks.size === 0) {\n callbackSet.unsubscribe()\n updateCallbackSets.delete(key)\n }\n }\n}\n\nfunction triggerUpdate(msg: ServerMessage) {\n const key = resourceKey(msg.resource)\n const callbackSet = updateCallbackSets.get(key)\n if (!callbackSet) {\n return\n }\n\n for (const callback of callbackSet.callbacks) {\n callback(msg)\n }\n\n if (msg.type === 'notFound') {\n // This indicates that the resource which we subscribed to either does not exist or\n // has been deleted. In either case, we should clear all update callbacks, so if a\n // new subscription is created for the same resource, it will send a new \"subscribe\"\n // message to the server.\n // No need to send an \"unsubscribe\" message to the server, it will have already\n // dropped the update stream before sending the \"notFound\" message.\n updateCallbackSets.delete(key)\n }\n}\n"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,4DAA4D;AAC5D,6DAA6D;AAC7D,6DAA6D;;;;;;;;;AAkBtD,SAAS,QAAQ,KAIR;QAJQ,EACtB,kBAAkB,EAClB,WAAW,EACX,gBAAgB,QAAQ,KAAK,EACf,GAJQ;IAKtB,mBAAmB,CAAC;QAClB,OAAQ,IAAI,IAAI;YACd,KAAK;gBACH,sBAAsB;gBACtB;YACF;gBACE,IAAI;oBACF,IAAI,MAAM,OAAO,CAAC,IAAI,IAAI,GAAG;wBAC3B,IAAK,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,IAAK;4BACxC,oBAAoB,IAAI,IAAI,CAAC,EAAE;wBACjC;oBACF,OAAO;wBACL,oBAAoB,IAAI,IAAI;oBAC9B;oBACA;gBACF,EAAE,OAAO,GAAY;oBACnB,QAAQ,IAAI,CACV,8CACE,mIACA,qIACA,+GACA,8HACA;oBAEJ,cAAc;oBACd,SAAS,MAAM;gBACjB;gBACA;QACJ;IACF;IAEA,MAAM,SAAS,WA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,CAAC,qBAAqB;QACxB,cAAc;YACZ,WAAW,IAAI,IAAI;gBAAC;aAAS;YAC7B,aAAa,mBAAmB,aAAa;QAC/C;QACA,mBAAmB,GAAG,CAAC,KAAK;IAC9B,OAAO;QACL,oBAAoB,SAAS,CAAC,GAAG,CAAC;QAClC,cAAc;IAChB;IAEA,OAAO;QACL,YAAY,SAAS,CAAC,MAAM,CAAC;QAE7B,IAAI,YAAY,SAAS,CAAC,IAAI,KAAK,GAAG;YACpC,YAAY,WAAW;YACvB,mBAAmB,MAAM,CAAC;QAC5B;IACF;AACF;AAEA,SAAS,cAAc,GAAkB;IACvC,MAAM,MAAM,YAAY,IAAI,QAAQ;IACpC,MAAM,cAAc,mBAAmB,GAAG,CAAC;IAC3C,IAAI,CAAC,aAAa;QAChB;IACF;IAEA,KAAK,MAAM,YAAY,YAAY,SAAS,CAAE;QAC5C,SAAS;IACX;IAEA,IAAI,IAAI,IAAI,KAAK,YAAY;QAC3B,mFAAmF;QACnF,kFAAkF;QAClF,oFAAoF;QACpF,yBAAyB;QACzB,+EAA+E;QAC/E,mEAAmE;QACnE,mBAAmB,MAAM,CAAC;IAC5B;AACF","ignoreList":[0],"debugId":null}}] -} \ No newline at end of file diff --git a/docs/_next/static/chunks/[root-of-the-server]__45f039c3._.js b/docs/_next/static/chunks/[root-of-the-server]__45f039c3._.js deleted file mode 100644 index 59532364..00000000 --- a/docs/_next/static/chunks/[root-of-the-server]__45f039c3._.js +++ /dev/null @@ -1,481 +0,0 @@ -(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[turbopack]/browser/dev/hmr-client/hmr-client.ts [client] (ecmascript)", ((__turbopack_context__) => { -"use strict"; - -/// -/// -/// -/// -__turbopack_context__.s([ - "connect", - ()=>connect, - "setHooks", - ()=>setHooks, - "subscribeToUpdate", - ()=>subscribeToUpdate -]); -function connect(param) { - let { addMessageListener, sendMessage, onUpdateError = console.error } = param; - addMessageListener((msg)=>{ - switch(msg.type){ - case 'turbopack-connected': - handleSocketConnected(sendMessage); - break; - default: - try { - if (Array.isArray(msg.data)) { - for(let i = 0; i < msg.data.length; i++){ - handleSocketMessage(msg.data[i]); - } - } else { - handleSocketMessage(msg.data); - } - applyAggregatedUpdates(); - } catch (e) { - console.warn('[Fast Refresh] performing full reload\n\n' + "Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\n" + 'You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\n' + 'Consider migrating the non-React component export to a separate file and importing it into both files.\n\n' + 'It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\n' + 'Fast Refresh requires at least one parent function component in your React tree.'); - onUpdateError(e); - location.reload(); - } - break; - } - }); - const queued = globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS; - if (queued != null && !Array.isArray(queued)) { - throw new Error('A separate HMR handler was already registered'); - } - globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS = { - push: (param)=>{ - let [chunkPath, callback] = param; - subscribeToChunkUpdate(chunkPath, sendMessage, callback); - } - }; - if (Array.isArray(queued)) { - for (const [chunkPath, callback] of queued){ - subscribeToChunkUpdate(chunkPath, sendMessage, callback); - } - } -} -const updateCallbackSets = new Map(); -function sendJSON(sendMessage, message) { - sendMessage(JSON.stringify(message)); -} -function resourceKey(resource) { - return JSON.stringify({ - path: resource.path, - headers: resource.headers || null - }); -} -function subscribeToUpdates(sendMessage, resource) { - sendJSON(sendMessage, { - type: 'turbopack-subscribe', - ...resource - }); - return ()=>{ - sendJSON(sendMessage, { - type: 'turbopack-unsubscribe', - ...resource - }); - }; -} -function handleSocketConnected(sendMessage) { - for (const key of updateCallbackSets.keys()){ - subscribeToUpdates(sendMessage, JSON.parse(key)); - } -} -// we aggregate all pending updates until the issues are resolved -const chunkListsWithPendingUpdates = new Map(); -function aggregateUpdates(msg) { - const key = resourceKey(msg.resource); - let aggregated = chunkListsWithPendingUpdates.get(key); - if (aggregated) { - aggregated.instruction = mergeChunkListUpdates(aggregated.instruction, msg.instruction); - } else { - chunkListsWithPendingUpdates.set(key, msg); - } -} -function applyAggregatedUpdates() { - if (chunkListsWithPendingUpdates.size === 0) return; - hooks.beforeRefresh(); - for (const msg of chunkListsWithPendingUpdates.values()){ - triggerUpdate(msg); - } - chunkListsWithPendingUpdates.clear(); - finalizeUpdate(); -} -function mergeChunkListUpdates(updateA, updateB) { - let chunks; - if (updateA.chunks != null) { - if (updateB.chunks == null) { - chunks = updateA.chunks; - } else { - chunks = mergeChunkListChunks(updateA.chunks, updateB.chunks); - } - } else if (updateB.chunks != null) { - chunks = updateB.chunks; - } - let merged; - if (updateA.merged != null) { - if (updateB.merged == null) { - merged = updateA.merged; - } else { - // Since `merged` is an array of updates, we need to merge them all into - // one, consistent update. - // Since there can only be `EcmascriptMergeUpdates` in the array, there is - // no need to key on the `type` field. - let update = updateA.merged[0]; - for(let i = 1; i < updateA.merged.length; i++){ - update = mergeChunkListEcmascriptMergedUpdates(update, updateA.merged[i]); - } - for(let i = 0; i < updateB.merged.length; i++){ - update = mergeChunkListEcmascriptMergedUpdates(update, updateB.merged[i]); - } - merged = [ - update - ]; - } - } else if (updateB.merged != null) { - merged = updateB.merged; - } - return { - type: 'ChunkListUpdate', - chunks, - merged - }; -} -function mergeChunkListChunks(chunksA, chunksB) { - const chunks = {}; - for (const [chunkPath, chunkUpdateA] of Object.entries(chunksA)){ - const chunkUpdateB = chunksB[chunkPath]; - if (chunkUpdateB != null) { - const mergedUpdate = mergeChunkUpdates(chunkUpdateA, chunkUpdateB); - if (mergedUpdate != null) { - chunks[chunkPath] = mergedUpdate; - } - } else { - chunks[chunkPath] = chunkUpdateA; - } - } - for (const [chunkPath, chunkUpdateB] of Object.entries(chunksB)){ - if (chunks[chunkPath] == null) { - chunks[chunkPath] = chunkUpdateB; - } - } - return chunks; -} -function mergeChunkUpdates(updateA, updateB) { - if (updateA.type === 'added' && updateB.type === 'deleted' || updateA.type === 'deleted' && updateB.type === 'added') { - return undefined; - } - if (updateA.type === 'partial') { - invariant(updateA.instruction, 'Partial updates are unsupported'); - } - if (updateB.type === 'partial') { - invariant(updateB.instruction, 'Partial updates are unsupported'); - } - return undefined; -} -function mergeChunkListEcmascriptMergedUpdates(mergedA, mergedB) { - const entries = mergeEcmascriptChunkEntries(mergedA.entries, mergedB.entries); - const chunks = mergeEcmascriptChunksUpdates(mergedA.chunks, mergedB.chunks); - return { - type: 'EcmascriptMergedUpdate', - entries, - chunks - }; -} -function mergeEcmascriptChunkEntries(entriesA, entriesB) { - return { - ...entriesA, - ...entriesB - }; -} -function mergeEcmascriptChunksUpdates(chunksA, chunksB) { - if (chunksA == null) { - return chunksB; - } - if (chunksB == null) { - return chunksA; - } - const chunks = {}; - for (const [chunkPath, chunkUpdateA] of Object.entries(chunksA)){ - const chunkUpdateB = chunksB[chunkPath]; - if (chunkUpdateB != null) { - const mergedUpdate = mergeEcmascriptChunkUpdates(chunkUpdateA, chunkUpdateB); - if (mergedUpdate != null) { - chunks[chunkPath] = mergedUpdate; - } - } else { - chunks[chunkPath] = chunkUpdateA; - } - } - for (const [chunkPath, chunkUpdateB] of Object.entries(chunksB)){ - if (chunks[chunkPath] == null) { - chunks[chunkPath] = chunkUpdateB; - } - } - if (Object.keys(chunks).length === 0) { - return undefined; - } - return chunks; -} -function mergeEcmascriptChunkUpdates(updateA, updateB) { - if (updateA.type === 'added' && updateB.type === 'deleted') { - // These two completely cancel each other out. - return undefined; - } - if (updateA.type === 'deleted' && updateB.type === 'added') { - const added = []; - const deleted = []; - var _updateA_modules; - const deletedModules = new Set((_updateA_modules = updateA.modules) !== null && _updateA_modules !== void 0 ? _updateA_modules : []); - var _updateB_modules; - const addedModules = new Set((_updateB_modules = updateB.modules) !== null && _updateB_modules !== void 0 ? _updateB_modules : []); - for (const moduleId of addedModules){ - if (!deletedModules.has(moduleId)) { - added.push(moduleId); - } - } - for (const moduleId of deletedModules){ - if (!addedModules.has(moduleId)) { - deleted.push(moduleId); - } - } - if (added.length === 0 && deleted.length === 0) { - return undefined; - } - return { - type: 'partial', - added, - deleted - }; - } - if (updateA.type === 'partial' && updateB.type === 'partial') { - var _updateA_added, _updateB_added; - const added = new Set([ - ...(_updateA_added = updateA.added) !== null && _updateA_added !== void 0 ? _updateA_added : [], - ...(_updateB_added = updateB.added) !== null && _updateB_added !== void 0 ? _updateB_added : [] - ]); - var _updateA_deleted, _updateB_deleted; - const deleted = new Set([ - ...(_updateA_deleted = updateA.deleted) !== null && _updateA_deleted !== void 0 ? _updateA_deleted : [], - ...(_updateB_deleted = updateB.deleted) !== null && _updateB_deleted !== void 0 ? _updateB_deleted : [] - ]); - if (updateB.added != null) { - for (const moduleId of updateB.added){ - deleted.delete(moduleId); - } - } - if (updateB.deleted != null) { - for (const moduleId of updateB.deleted){ - added.delete(moduleId); - } - } - return { - type: 'partial', - added: [ - ...added - ], - deleted: [ - ...deleted - ] - }; - } - if (updateA.type === 'added' && updateB.type === 'partial') { - var _updateA_modules1, _updateB_added1; - const modules = new Set([ - ...(_updateA_modules1 = updateA.modules) !== null && _updateA_modules1 !== void 0 ? _updateA_modules1 : [], - ...(_updateB_added1 = updateB.added) !== null && _updateB_added1 !== void 0 ? _updateB_added1 : [] - ]); - var _updateB_deleted1; - for (const moduleId of (_updateB_deleted1 = updateB.deleted) !== null && _updateB_deleted1 !== void 0 ? _updateB_deleted1 : []){ - modules.delete(moduleId); - } - return { - type: 'added', - modules: [ - ...modules - ] - }; - } - if (updateA.type === 'partial' && updateB.type === 'deleted') { - var _updateB_modules1; - // We could eagerly return `updateB` here, but this would potentially be - // incorrect if `updateA` has added modules. - const modules = new Set((_updateB_modules1 = updateB.modules) !== null && _updateB_modules1 !== void 0 ? _updateB_modules1 : []); - if (updateA.added != null) { - for (const moduleId of updateA.added){ - modules.delete(moduleId); - } - } - return { - type: 'deleted', - modules: [ - ...modules - ] - }; - } - // Any other update combination is invalid. - return undefined; -} -function invariant(_, message) { - throw new Error("Invariant: ".concat(message)); -} -const CRITICAL = [ - 'bug', - 'error', - 'fatal' -]; -function compareByList(list, a, b) { - const aI = list.indexOf(a) + 1 || list.length; - const bI = list.indexOf(b) + 1 || list.length; - return aI - bI; -} -const chunksWithIssues = new Map(); -function emitIssues() { - const issues = []; - const deduplicationSet = new Set(); - for (const [_, chunkIssues] of chunksWithIssues){ - for (const chunkIssue of chunkIssues){ - if (deduplicationSet.has(chunkIssue.formatted)) continue; - issues.push(chunkIssue); - deduplicationSet.add(chunkIssue.formatted); - } - } - sortIssues(issues); - hooks.issues(issues); -} -function handleIssues(msg) { - const key = resourceKey(msg.resource); - let hasCriticalIssues = false; - for (const issue of msg.issues){ - if (CRITICAL.includes(issue.severity)) { - hasCriticalIssues = true; - } - } - if (msg.issues.length > 0) { - chunksWithIssues.set(key, msg.issues); - } else if (chunksWithIssues.has(key)) { - chunksWithIssues.delete(key); - } - emitIssues(); - return hasCriticalIssues; -} -const SEVERITY_ORDER = [ - 'bug', - 'fatal', - 'error', - 'warning', - 'info', - 'log' -]; -const CATEGORY_ORDER = [ - 'parse', - 'resolve', - 'code generation', - 'rendering', - 'typescript', - 'other' -]; -function sortIssues(issues) { - issues.sort((a, b)=>{ - const first = compareByList(SEVERITY_ORDER, a.severity, b.severity); - if (first !== 0) return first; - return compareByList(CATEGORY_ORDER, a.category, b.category); - }); -} -const hooks = { - beforeRefresh: ()=>{}, - refresh: ()=>{}, - buildOk: ()=>{}, - issues: (_issues)=>{} -}; -function setHooks(newHooks) { - Object.assign(hooks, newHooks); -} -function handleSocketMessage(msg) { - sortIssues(msg.issues); - handleIssues(msg); - switch(msg.type){ - case 'issues': - break; - case 'partial': - // aggregate updates - aggregateUpdates(msg); - break; - default: - // run single update - const runHooks = chunkListsWithPendingUpdates.size === 0; - if (runHooks) hooks.beforeRefresh(); - triggerUpdate(msg); - if (runHooks) finalizeUpdate(); - break; - } -} -function finalizeUpdate() { - hooks.refresh(); - hooks.buildOk(); - // This is used by the Next.js integration test suite to notify it when HMR - // updates have been completed. - // TODO: Only run this in test environments (gate by `process.env.__NEXT_TEST_MODE`) - if (globalThis.__NEXT_HMR_CB) { - globalThis.__NEXT_HMR_CB(); - globalThis.__NEXT_HMR_CB = null; - } -} -function subscribeToChunkUpdate(chunkListPath, sendMessage, callback) { - return subscribeToUpdate({ - path: chunkListPath - }, sendMessage, callback); -} -function subscribeToUpdate(resource, sendMessage, callback) { - const key = resourceKey(resource); - let callbackSet; - const existingCallbackSet = updateCallbackSets.get(key); - if (!existingCallbackSet) { - callbackSet = { - callbacks: new Set([ - callback - ]), - unsubscribe: subscribeToUpdates(sendMessage, resource) - }; - updateCallbackSets.set(key, callbackSet); - } else { - existingCallbackSet.callbacks.add(callback); - callbackSet = existingCallbackSet; - } - return ()=>{ - callbackSet.callbacks.delete(callback); - if (callbackSet.callbacks.size === 0) { - callbackSet.unsubscribe(); - updateCallbackSets.delete(key); - } - }; -} -function triggerUpdate(msg) { - const key = resourceKey(msg.resource); - const callbackSet = updateCallbackSets.get(key); - if (!callbackSet) { - return; - } - for (const callback of callbackSet.callbacks){ - callback(msg); - } - if (msg.type === 'notFound') { - // This indicates that the resource which we subscribed to either does not exist or - // has been deleted. In either case, we should clear all update callbacks, so if a - // new subscription is created for the same resource, it will send a new "subscribe" - // message to the server. - // No need to send an "unsubscribe" message to the server, it will have already - // dropped the update stream before sending the "notFound" message. - updateCallbackSets.delete(key); - } -} -}), -"[hmr-entry]/hmr-entry.js { ENTRY => \"[project]/pages/_app\" }", ((__turbopack_context__) => { -"use strict"; - -__turbopack_context__.r("[next]/entry/page-loader.ts { PAGE => \"[project]/node_modules/next/app.js [client] (ecmascript)\" } [client] (ecmascript)"); -}), -]); - -//# sourceMappingURL=%5Broot-of-the-server%5D__45f039c3._.js.map \ No newline at end of file diff --git a/docs/_next/static/chunks/[root-of-the-server]__45f039c3._.js.map b/docs/_next/static/chunks/[root-of-the-server]__45f039c3._.js.map deleted file mode 100644 index 04bb617e..00000000 --- a/docs/_next/static/chunks/[root-of-the-server]__45f039c3._.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": [], - "sections": [ - {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/dev/hmr-client/hmr-client.ts"],"sourcesContent":["/// \n/// \n/// \n/// \n\ntype SendMessage = (msg: any) => void\nexport type WebSocketMessage =\n | {\n type: 'turbopack-connected'\n }\n | {\n type: 'turbopack-message'\n data: Record\n }\n\nexport type ClientOptions = {\n addMessageListener: (cb: (msg: WebSocketMessage) => void) => void\n sendMessage: SendMessage\n onUpdateError: (err: unknown) => void\n}\n\nexport function connect({\n addMessageListener,\n sendMessage,\n onUpdateError = console.error,\n}: ClientOptions) {\n addMessageListener((msg) => {\n switch (msg.type) {\n case 'turbopack-connected':\n handleSocketConnected(sendMessage)\n break\n default:\n try {\n if (Array.isArray(msg.data)) {\n for (let i = 0; i < msg.data.length; i++) {\n handleSocketMessage(msg.data[i] as ServerMessage)\n }\n } else {\n handleSocketMessage(msg.data as ServerMessage)\n }\n applyAggregatedUpdates()\n } catch (e: unknown) {\n console.warn(\n '[Fast Refresh] performing full reload\\n\\n' +\n \"Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\\n\" +\n 'You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\\n' +\n 'Consider migrating the non-React component export to a separate file and importing it into both files.\\n\\n' +\n 'It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\\n' +\n 'Fast Refresh requires at least one parent function component in your React tree.'\n )\n onUpdateError(e)\n location.reload()\n }\n break\n }\n })\n\n const queued = globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS\n if (queued != null && !Array.isArray(queued)) {\n throw new Error('A separate HMR handler was already registered')\n }\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS = {\n push: ([chunkPath, callback]: [ChunkListPath, UpdateCallback]) => {\n subscribeToChunkUpdate(chunkPath, sendMessage, callback)\n },\n }\n\n if (Array.isArray(queued)) {\n for (const [chunkPath, callback] of queued) {\n subscribeToChunkUpdate(chunkPath, sendMessage, callback)\n }\n }\n}\n\ntype UpdateCallbackSet = {\n callbacks: Set\n unsubscribe: () => void\n}\n\nconst updateCallbackSets: Map = new Map()\n\nfunction sendJSON(sendMessage: SendMessage, message: ClientMessage) {\n sendMessage(JSON.stringify(message))\n}\n\ntype ResourceKey = string\n\nfunction resourceKey(resource: ResourceIdentifier): ResourceKey {\n return JSON.stringify({\n path: resource.path,\n headers: resource.headers || null,\n })\n}\n\nfunction subscribeToUpdates(\n sendMessage: SendMessage,\n resource: ResourceIdentifier\n): () => void {\n sendJSON(sendMessage, {\n type: 'turbopack-subscribe',\n ...resource,\n })\n\n return () => {\n sendJSON(sendMessage, {\n type: 'turbopack-unsubscribe',\n ...resource,\n })\n }\n}\n\nfunction handleSocketConnected(sendMessage: SendMessage) {\n for (const key of updateCallbackSets.keys()) {\n subscribeToUpdates(sendMessage, JSON.parse(key))\n }\n}\n\n// we aggregate all pending updates until the issues are resolved\nconst chunkListsWithPendingUpdates: Map =\n new Map()\n\nfunction aggregateUpdates(msg: PartialServerMessage) {\n const key = resourceKey(msg.resource)\n let aggregated = chunkListsWithPendingUpdates.get(key)\n\n if (aggregated) {\n aggregated.instruction = mergeChunkListUpdates(\n aggregated.instruction,\n msg.instruction\n )\n } else {\n chunkListsWithPendingUpdates.set(key, msg)\n }\n}\n\nfunction applyAggregatedUpdates() {\n if (chunkListsWithPendingUpdates.size === 0) return\n hooks.beforeRefresh()\n for (const msg of chunkListsWithPendingUpdates.values()) {\n triggerUpdate(msg)\n }\n chunkListsWithPendingUpdates.clear()\n finalizeUpdate()\n}\n\nfunction mergeChunkListUpdates(\n updateA: ChunkListUpdate,\n updateB: ChunkListUpdate\n): ChunkListUpdate {\n let chunks\n if (updateA.chunks != null) {\n if (updateB.chunks == null) {\n chunks = updateA.chunks\n } else {\n chunks = mergeChunkListChunks(updateA.chunks, updateB.chunks)\n }\n } else if (updateB.chunks != null) {\n chunks = updateB.chunks\n }\n\n let merged\n if (updateA.merged != null) {\n if (updateB.merged == null) {\n merged = updateA.merged\n } else {\n // Since `merged` is an array of updates, we need to merge them all into\n // one, consistent update.\n // Since there can only be `EcmascriptMergeUpdates` in the array, there is\n // no need to key on the `type` field.\n let update = updateA.merged[0]\n for (let i = 1; i < updateA.merged.length; i++) {\n update = mergeChunkListEcmascriptMergedUpdates(\n update,\n updateA.merged[i]\n )\n }\n\n for (let i = 0; i < updateB.merged.length; i++) {\n update = mergeChunkListEcmascriptMergedUpdates(\n update,\n updateB.merged[i]\n )\n }\n\n merged = [update]\n }\n } else if (updateB.merged != null) {\n merged = updateB.merged\n }\n\n return {\n type: 'ChunkListUpdate',\n chunks,\n merged,\n }\n}\n\nfunction mergeChunkListChunks(\n chunksA: Record,\n chunksB: Record\n): Record {\n const chunks: Record = {}\n\n for (const [chunkPath, chunkUpdateA] of Object.entries(chunksA) as Array<\n [ChunkPath, ChunkUpdate]\n >) {\n const chunkUpdateB = chunksB[chunkPath]\n if (chunkUpdateB != null) {\n const mergedUpdate = mergeChunkUpdates(chunkUpdateA, chunkUpdateB)\n if (mergedUpdate != null) {\n chunks[chunkPath] = mergedUpdate\n }\n } else {\n chunks[chunkPath] = chunkUpdateA\n }\n }\n\n for (const [chunkPath, chunkUpdateB] of Object.entries(chunksB) as Array<\n [ChunkPath, ChunkUpdate]\n >) {\n if (chunks[chunkPath] == null) {\n chunks[chunkPath] = chunkUpdateB\n }\n }\n\n return chunks\n}\n\nfunction mergeChunkUpdates(\n updateA: ChunkUpdate,\n updateB: ChunkUpdate\n): ChunkUpdate | undefined {\n if (\n (updateA.type === 'added' && updateB.type === 'deleted') ||\n (updateA.type === 'deleted' && updateB.type === 'added')\n ) {\n return undefined\n }\n\n if (updateA.type === 'partial') {\n invariant(updateA.instruction, 'Partial updates are unsupported')\n }\n\n if (updateB.type === 'partial') {\n invariant(updateB.instruction, 'Partial updates are unsupported')\n }\n\n return undefined\n}\n\nfunction mergeChunkListEcmascriptMergedUpdates(\n mergedA: EcmascriptMergedUpdate,\n mergedB: EcmascriptMergedUpdate\n): EcmascriptMergedUpdate {\n const entries = mergeEcmascriptChunkEntries(mergedA.entries, mergedB.entries)\n const chunks = mergeEcmascriptChunksUpdates(mergedA.chunks, mergedB.chunks)\n\n return {\n type: 'EcmascriptMergedUpdate',\n entries,\n chunks,\n }\n}\n\nfunction mergeEcmascriptChunkEntries(\n entriesA: Record | undefined,\n entriesB: Record | undefined\n): Record {\n return { ...entriesA, ...entriesB }\n}\n\nfunction mergeEcmascriptChunksUpdates(\n chunksA: Record | undefined,\n chunksB: Record | undefined\n): Record | undefined {\n if (chunksA == null) {\n return chunksB\n }\n\n if (chunksB == null) {\n return chunksA\n }\n\n const chunks: Record = {}\n\n for (const [chunkPath, chunkUpdateA] of Object.entries(chunksA) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n const chunkUpdateB = chunksB[chunkPath]\n if (chunkUpdateB != null) {\n const mergedUpdate = mergeEcmascriptChunkUpdates(\n chunkUpdateA,\n chunkUpdateB\n )\n if (mergedUpdate != null) {\n chunks[chunkPath] = mergedUpdate\n }\n } else {\n chunks[chunkPath] = chunkUpdateA\n }\n }\n\n for (const [chunkPath, chunkUpdateB] of Object.entries(chunksB) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n if (chunks[chunkPath] == null) {\n chunks[chunkPath] = chunkUpdateB\n }\n }\n\n if (Object.keys(chunks).length === 0) {\n return undefined\n }\n\n return chunks\n}\n\nfunction mergeEcmascriptChunkUpdates(\n updateA: EcmascriptMergedChunkUpdate,\n updateB: EcmascriptMergedChunkUpdate\n): EcmascriptMergedChunkUpdate | undefined {\n if (updateA.type === 'added' && updateB.type === 'deleted') {\n // These two completely cancel each other out.\n return undefined\n }\n\n if (updateA.type === 'deleted' && updateB.type === 'added') {\n const added = []\n const deleted = []\n const deletedModules = new Set(updateA.modules ?? [])\n const addedModules = new Set(updateB.modules ?? [])\n\n for (const moduleId of addedModules) {\n if (!deletedModules.has(moduleId)) {\n added.push(moduleId)\n }\n }\n\n for (const moduleId of deletedModules) {\n if (!addedModules.has(moduleId)) {\n deleted.push(moduleId)\n }\n }\n\n if (added.length === 0 && deleted.length === 0) {\n return undefined\n }\n\n return {\n type: 'partial',\n added,\n deleted,\n }\n }\n\n if (updateA.type === 'partial' && updateB.type === 'partial') {\n const added = new Set([...(updateA.added ?? []), ...(updateB.added ?? [])])\n const deleted = new Set([\n ...(updateA.deleted ?? []),\n ...(updateB.deleted ?? []),\n ])\n\n if (updateB.added != null) {\n for (const moduleId of updateB.added) {\n deleted.delete(moduleId)\n }\n }\n\n if (updateB.deleted != null) {\n for (const moduleId of updateB.deleted) {\n added.delete(moduleId)\n }\n }\n\n return {\n type: 'partial',\n added: [...added],\n deleted: [...deleted],\n }\n }\n\n if (updateA.type === 'added' && updateB.type === 'partial') {\n const modules = new Set([\n ...(updateA.modules ?? []),\n ...(updateB.added ?? []),\n ])\n\n for (const moduleId of updateB.deleted ?? []) {\n modules.delete(moduleId)\n }\n\n return {\n type: 'added',\n modules: [...modules],\n }\n }\n\n if (updateA.type === 'partial' && updateB.type === 'deleted') {\n // We could eagerly return `updateB` here, but this would potentially be\n // incorrect if `updateA` has added modules.\n\n const modules = new Set(updateB.modules ?? [])\n\n if (updateA.added != null) {\n for (const moduleId of updateA.added) {\n modules.delete(moduleId)\n }\n }\n\n return {\n type: 'deleted',\n modules: [...modules],\n }\n }\n\n // Any other update combination is invalid.\n\n return undefined\n}\n\nfunction invariant(_: never, message: string): never {\n throw new Error(`Invariant: ${message}`)\n}\n\nconst CRITICAL = ['bug', 'error', 'fatal']\n\nfunction compareByList(list: any[], a: any, b: any) {\n const aI = list.indexOf(a) + 1 || list.length\n const bI = list.indexOf(b) + 1 || list.length\n return aI - bI\n}\n\nconst chunksWithIssues: Map = new Map()\n\nfunction emitIssues() {\n const issues = []\n const deduplicationSet = new Set()\n\n for (const [_, chunkIssues] of chunksWithIssues) {\n for (const chunkIssue of chunkIssues) {\n if (deduplicationSet.has(chunkIssue.formatted)) continue\n\n issues.push(chunkIssue)\n deduplicationSet.add(chunkIssue.formatted)\n }\n }\n\n sortIssues(issues)\n\n hooks.issues(issues)\n}\n\nfunction handleIssues(msg: ServerMessage): boolean {\n const key = resourceKey(msg.resource)\n let hasCriticalIssues = false\n\n for (const issue of msg.issues) {\n if (CRITICAL.includes(issue.severity)) {\n hasCriticalIssues = true\n }\n }\n\n if (msg.issues.length > 0) {\n chunksWithIssues.set(key, msg.issues)\n } else if (chunksWithIssues.has(key)) {\n chunksWithIssues.delete(key)\n }\n\n emitIssues()\n\n return hasCriticalIssues\n}\n\nconst SEVERITY_ORDER = ['bug', 'fatal', 'error', 'warning', 'info', 'log']\nconst CATEGORY_ORDER = [\n 'parse',\n 'resolve',\n 'code generation',\n 'rendering',\n 'typescript',\n 'other',\n]\n\nfunction sortIssues(issues: Issue[]) {\n issues.sort((a, b) => {\n const first = compareByList(SEVERITY_ORDER, a.severity, b.severity)\n if (first !== 0) return first\n return compareByList(CATEGORY_ORDER, a.category, b.category)\n })\n}\n\nconst hooks = {\n beforeRefresh: () => {},\n refresh: () => {},\n buildOk: () => {},\n issues: (_issues: Issue[]) => {},\n}\n\nexport function setHooks(newHooks: typeof hooks) {\n Object.assign(hooks, newHooks)\n}\n\nfunction handleSocketMessage(msg: ServerMessage) {\n sortIssues(msg.issues)\n\n handleIssues(msg)\n\n switch (msg.type) {\n case 'issues':\n // issues are already handled\n break\n case 'partial':\n // aggregate updates\n aggregateUpdates(msg)\n break\n default:\n // run single update\n const runHooks = chunkListsWithPendingUpdates.size === 0\n if (runHooks) hooks.beforeRefresh()\n triggerUpdate(msg)\n if (runHooks) finalizeUpdate()\n break\n }\n}\n\nfunction finalizeUpdate() {\n hooks.refresh()\n hooks.buildOk()\n\n // This is used by the Next.js integration test suite to notify it when HMR\n // updates have been completed.\n // TODO: Only run this in test environments (gate by `process.env.__NEXT_TEST_MODE`)\n if (globalThis.__NEXT_HMR_CB) {\n globalThis.__NEXT_HMR_CB()\n globalThis.__NEXT_HMR_CB = null\n }\n}\n\nfunction subscribeToChunkUpdate(\n chunkListPath: ChunkListPath,\n sendMessage: SendMessage,\n callback: UpdateCallback\n): () => void {\n return subscribeToUpdate(\n {\n path: chunkListPath,\n },\n sendMessage,\n callback\n )\n}\n\nexport function subscribeToUpdate(\n resource: ResourceIdentifier,\n sendMessage: SendMessage,\n callback: UpdateCallback\n) {\n const key = resourceKey(resource)\n let callbackSet: UpdateCallbackSet\n const existingCallbackSet = updateCallbackSets.get(key)\n if (!existingCallbackSet) {\n callbackSet = {\n callbacks: new Set([callback]),\n unsubscribe: subscribeToUpdates(sendMessage, resource),\n }\n updateCallbackSets.set(key, callbackSet)\n } else {\n existingCallbackSet.callbacks.add(callback)\n callbackSet = existingCallbackSet\n }\n\n return () => {\n callbackSet.callbacks.delete(callback)\n\n if (callbackSet.callbacks.size === 0) {\n callbackSet.unsubscribe()\n updateCallbackSets.delete(key)\n }\n }\n}\n\nfunction triggerUpdate(msg: ServerMessage) {\n const key = resourceKey(msg.resource)\n const callbackSet = updateCallbackSets.get(key)\n if (!callbackSet) {\n return\n }\n\n for (const callback of callbackSet.callbacks) {\n callback(msg)\n }\n\n if (msg.type === 'notFound') {\n // This indicates that the resource which we subscribed to either does not exist or\n // has been deleted. In either case, we should clear all update callbacks, so if a\n // new subscription is created for the same resource, it will send a new \"subscribe\"\n // message to the server.\n // No need to send an \"unsubscribe\" message to the server, it will have already\n // dropped the update stream before sending the \"notFound\" message.\n updateCallbackSets.delete(key)\n }\n}\n"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,4DAA4D;AAC5D,6DAA6D;AAC7D,6DAA6D;;;;;;;;;AAkBtD,SAAS,QAAQ,KAIR;QAJQ,EACtB,kBAAkB,EAClB,WAAW,EACX,gBAAgB,QAAQ,KAAK,EACf,GAJQ;IAKtB,mBAAmB,CAAC;QAClB,OAAQ,IAAI,IAAI;YACd,KAAK;gBACH,sBAAsB;gBAC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,OAAO;IACb,MAAM,OAAO;IAEb,2EAA2E;IAC3E,+BAA+B;IAC/B,oFAAoF;IACpF,IAAI,WAAW,aAAa,EAAE;QAC5B,WAAW,aAAa;QACxB,WAAW,aAAa,GAAG;IAC7B;AACF;AAEA,SAAS,uBACP,aAA4B,EAC5B,WAAwB,EACxB,QAAwB;IAExB,OAAO,kBACL;QACE,MAAM;IACR,GACA,aACA;AAEJ;AAEO,SAAS,kBACd,QAA4B,EAC5B,WAAwB,EACxB,QAAwB;IAExB,MAAM,MAAM,YAAY;IACxB,IAAI;IACJ,MAAM,sBAAsB,mBAAmB,GAAG,CAAC;IACnD,IAAI,CAAC,qBAAqB;QACxB,cAAc;YACZ,WAAW,IAAI,IAAI;gBAAC;aAAS;YAC7B,aAAa,mBAAmB,aAAa;QAC/C;QACA,mBAAmB,GAAG,CAAC,KAAK;IAC9B,OAAO;QACL,oBAAoB,SAAS,CAAC,GAAG,CAAC;QAClC,cAAc;IAChB;IAEA,OAAO;QACL,YAAY,SAAS,CAAC,MAAM,CAAC;QAE7B,IAAI,YAAY,SAAS,CAAC,IAAI,KAAK,GAAG;YACpC,YAAY,WAAW;YACvB,mBAAmB,MAAM,CAAC;QAC5B;IACF;AACF;AAEA,SAAS,cAAc,GAAkB;IACvC,MAAM,MAAM,YAAY,IAAI,QAAQ;IACpC,MAAM,cAAc,mBAAmB,GAAG,CAAC;IAC3C,IAAI,CAAC,aAAa;QAChB;IACF;IAEA,KAAK,MAAM,YAAY,YAAY,SAAS,CAAE;QAC5C,SAAS;IACX;IAEA,IAAI,IAAI,IAAI,KAAK,YAAY;QAC3B,mFAAmF;QACnF,kFAAkF;QAClF,oFAAoF;QACpF,yBAAyB;QACzB,+EAA+E;QAC/E,mEAAmE;QACnE,mBAAmB,MAAM,CAAC;IAC5B;AACF","ignoreList":[0],"debugId":null}}] -} \ No newline at end of file diff --git a/docs/_next/static/chunks/86f923aa0f996fe4.js b/docs/_next/static/chunks/e48d3b25285f3054.js similarity index 95% rename from docs/_next/static/chunks/86f923aa0f996fe4.js rename to docs/_next/static/chunks/e48d3b25285f3054.js index 4d9511df..7b7ab519 100644 --- a/docs/_next/static/chunks/86f923aa0f996fe4.js +++ b/docs/_next/static/chunks/e48d3b25285f3054.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24478,(e,t,n)=>{"use strict";n.ConcurrentRoot=1,n.ContinuousEventPriority=8,n.DefaultEventPriority=32,n.DiscreteEventPriority=2,n.IdleEventPriority=0x10000000,n.LegacyRoot=0,n.NoEventPriority=0},39695,(e,t,n)=>{"use strict";t.exports=e.r(24478)},55838,(e,t,n)=>{"use strict";var r=e.r(71645),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,s=r.useEffect,o=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return o(function(){i.value=n,i.getSnapshot=t,u(i)&&c({inst:i})},[e,n,t]),s(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},2239,(e,t,n)=>{"use strict";t.exports=e.r(55838)},52822,(e,t,n)=>{"use strict";var r=e.r(71645),i=e.r(2239),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,o=r.useRef,l=r.useEffect,u=r.useMemo,c=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var h=o(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;var p=s(e,(h=u(function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return o=t}return o=e}if(t=o,a(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(s=e,t):(s=e,o=n)}var s,o,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,i]))[0],h[1]);return l(function(){d.hasValue=!0,d.value=p},[p]),c(p),p}},30224,(e,t,n)=>{"use strict";t.exports=e.r(52822)},29779,(e,t,n)=>{"use strict";function r(e,t){var n=e.length;for(e.push(t);0>>1,i=e[r];if(0>>1;rs(l,n))us(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[o]=n,r=o);else if(us(c,n))e[r]=c,e[u]=n,r=u;else break}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(n.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();n.unstable_now=function(){return u.now()-c}}var h=[],d=[],p=1,f=null,m=3,g=!1,v=!1,y=!1,_="function"==typeof setTimeout?setTimeout:null,x="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function S(e){for(var t=i(d);null!==t;){if(null===t.callback)a(d);else if(t.startTime<=e)a(d),t.sortIndex=t.expirationTime,r(h,t);else break;t=i(d)}}function M(e){if(y=!1,S(e),!v)if(null!==i(h))v=!0,L();else{var t=i(d);null!==t&&N(M,t.startTime-e)}}var w=!1,E=-1,T=5,A=-1;function C(){return!(n.unstable_now()-Ae&&C());){var s=f.callback;if("function"==typeof s){f.callback=null,m=f.priorityLevel;var l=s(f.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof l){f.callback=l,S(e),t=!0;break t}f===i(h)&&a(h),S(e)}else a(h);f=i(h)}if(null!==f)t=!0;else{var u=i(d);null!==u&&N(M,u.startTime-e),t=!1}}break e}finally{f=null,m=r,g=!1}}}finally{t?o():w=!1}}}if("function"==typeof b)o=function(){b(R)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,I=P.port2;P.port1.onmessage=R,o=function(){I.postMessage(null)}}else o=function(){_(R,0)};function L(){w||(w=!0,o())}function N(e,t){E=_(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_continueExecution=function(){v||g||(v=!0,L())},n.unstable_forceFrameRate=function(e){0>e||125s?(e.sortIndex=a,r(d,e),null===i(h)&&e===i(d)&&(y?(x(E),E=-1):y=!0,N(M,a-s))):(e.sortIndex=o,r(h,e),v||g||(v=!0,L())),e},n.unstable_shouldYield=C,n.unstable_wrapCallback=function(e){var t=m;return function(){var n=m;m=t;try{return e.apply(this,arguments)}finally{m=n}}}},51849,(e,t,n)=>{"use strict";t.exports=e.r(29779)},40336,(e,t,n)=>{"use strict";var r=e.i(47167);t.exports=function(t){function n(e,t,n,r){return new rP(e,t,n,r)}function i(){}function a(e){var t="https://react.dev/errors/"+e;if(1)":-1i||u[r]!==c[i]){var h="\n"+u[r].replace(" at new "," at ");return e.displayName&&h.includes("")&&(h=h.replace("",e.displayName)),h}while(1<=r&&0<=i)break}}}finally{io=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?l(n):""}function c(e){try{var t="";do t+=function(e){switch(e.tag){case 26:case 27:case 5:return l(e.type);case 16:return l("Lazy");case 13:return l("Suspense");case 19:return l("SuspenseList");case 0:case 15:return u(e.type,!1);case 11:return u(e.type.render,!1);case 1:return u(e.type,!0);default:return""}}(e),e=e.return;while(e)return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function h(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do 0!=(4098&(t=e).flags)&&(n=t.return),e=t.return;while(e)}return 3===t.tag?n:null}function d(e){if(h(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(null===(t=h(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return d(i),e;if(s===r)return d(i),t;s=s.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){return{current:e}}function m(e){0>a4||(e.current=a3[a4],a3[a4]=null,a4--)}function g(e,t){a3[++a4]=e.current,e.current=t}function v(e){var t=42&e;if(0!==t)return t;switch(e&-e){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:return 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 4194176&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function y(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=e.warmLanes;e=0!==e.finishedLanes;var o=0x7ffffff&n;return 0!==o?0!=(n=o&~i)?r=v(n):0!=(a&=o)?r=v(a):e||0!=(s=o&~s)&&(r=v(s)):0!=(o=n&~i)?r=v(o):0!==a?r=v(a):e||0!=(s=n&~s)&&(r=v(s)),0===r?0:0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(s=t&-t)||32===i&&0!=(4194176&s))?t:r}function _(e,t){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function x(){var e=a7;return 0==(4194176&(a7<<=1))&&(a7=128),e}function b(){var e=se;return 0==(0x3c00000&(se<<=1))&&(se=4194304),e}function S(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function M(e,t){e.pendingLanes|=t,0x10000000!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function w(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-a6(t);e.entangledLanes|=t,e.entanglements[r]=0x40000000|e.entanglements[r]|4194218&n}function E(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-a6(n),i=1<>=s,i-=s,sb=1<<32-a6(t)+i|n<d?(p=h,h=null):p=h.sibling;var v=m(n,h,s[d],o);if(null===v){null===h&&(h=p);break}e&&h&&null===v.alternate&&t(n,h),a=l(v,a,d),null===c?u=v:c.sibling=v,c=v,h=p}if(d===s.length)return r(n,h),sR&&C(n,d),u;if(null===h){for(;dp?(v=d,d=null):v=d.sibling;var _=m(n,d,y.value,u);if(null===_){null===d&&(d=v);break}e&&d&&null===_.alternate&&t(n,d),s=l(_,s,p),null===h?c=_:h.sibling=_,h=_,d=v}if(y.done)return r(n,d),sR&&C(n,p),c;if(null===d){for(;!y.done;p++,y=o.next())null!==(y=f(n,y.value,u))&&(s=l(y,s,p),null===h?c=y:h.sibling=y,h=y);return sR&&C(n,p),c}for(d=i(d);!y.done;p++,y=o.next())null!==(y=g(d,n,p,y.value,u))&&(e&&null!==y.alternate&&d.delete(null===y.key?p:y.key),s=l(y,s,p),null===h?c=y:h.sibling=y,h=y);return e&&d.forEach(function(e){return t(n,e)}),sR&&C(n,p),c}(c,h,d=v.call(d),p)}if("function"==typeof d.then)return n(c,h,ev(d),p);if(d.$$typeof===r3)return n(c,h,nl(c,d),p);e_(c,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"==typeof d?(d=""+d,null!==h&&6===h.tag?(r(c,h.sibling),(p=o(h,d)).return=c):(r(c,h),(p=rF(d,c.mode,p)).return=c),u(c=p)):r(c,h)}(c,h,d,p);return sQ=null,v}catch(e){if(e===sJ)throw e;var y=n(29,e,null,c.mode);return y.lanes=p,y.return=c,y}finally{}}}function eS(e,t){g(s4,e=o1),g(s3,t),o1=e|t.baseLanes}function eM(){g(s4,o1),g(s3,s3.current)}function ew(){o1=s4.current,m(s3),m(s4)}function eE(e){var t=e.alternate;g(s8,1&s8.current),g(s5,e),null===s6&&(null===t||null!==s3.current?s6=e:null!==t.memoizedState&&(s6=e))}function eT(e){if(22===e.tag){if(g(s8,s8.current),g(s5,e),null===s6){var t=e.alternate;null!==t&&null!==t.memoizedState&&(s6=e)}}else eA(e)}function eA(){g(s8,s8.current),g(s5,s5.current)}function eC(e){m(s5),s6===e&&(s6=null),m(s8)}function eR(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||ap(n)||af(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function eP(){throw Error(a(321))}function eI(e,t){if(null===t)return!1;for(var n=0;na?a:8);var s=is.T,o={};is.T=o,tC(e,!1,t,n);try{var l=i(),u=is.S;if(null!==u&&u(o,l),null!==l&&"object"==typeof l&&"function"==typeof l.then){var c,h,d=(c=[],h={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},l.then(function(){h.status="fulfilled",h.value=r;for(var e=0;e";case oB:return":has("+(n6(e)||"")+")";case oH:return'[role="'+e.value+'"]';case oG:return'"'+e.value+'"';case oV:return'[data-testname="'+e.value+'"]';default:throw Error(a(365))}}function n8(e,t){var n=[];e=[e,0];for(var r=0;rln&&(t.flags|=128,r=!0,nM(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=eR(s))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,nS(t,e),nM(i,!0),null===i.tail&&"hidden"===i.tailMode&&!s.alternate&&!sR)return nw(t),null}else 2*sa()-i.renderingStartTime>ln&&0x20000000!==n&&(t.flags|=128,r=!0,nM(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(null!==(e=i.last)?e.sibling=s:t.child=s,i.last=s)}if(null!==i.tail)return t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=sa(),t.sibling=null,e=s8.current,g(s8,r?1&e|2:1&e),t;return nw(t),null;case 22:case 23:return eC(t),ew(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!=(0x20000000&n)&&0==(128&t.flags)&&(nw(t),6&t.subtreeFlags&&(t.flags|=8192)):nw(t),null!==(n=t.updateQueue)&&nS(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&m(oA),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),nt(oE),nw(t),null;case 25:return null}throw Error(a(156,t.tag))}(t.alternate,t,o1);if(null!==n){oY=n;return}if(null!==(t=t.sibling)){oY=t;return}oY=t=e}while(null!==t)0===o2&&(o2=5)}function r_(e,t){do{var n=function(e,t){switch(I(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return nt(oE),N(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return U(t),null;case 13:if(eC(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));B()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return m(s8),null;case 4:return N(),null;case 10:return nt(t.type),null;case 22:case 23:return eC(t),ew(),null!==e&&m(oA),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return nt(oE),null;default:return null}}(e.alternate,e);if(null!==n){n.flags&=32767,oY=n;return}if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling)){oY=e;return}oY=e=n}while(null!==e)o2=6,oY=null}function rx(e,t,n,r,i,s,o,l,u,c){var h=is.T,d=iN();try{iL(2),is.T=null,function(e,t,n,r,i,s,o,l){do rS();while(null!==ls)if(0!=(6&oX))throw Error(a(327));var u,c,h=e.finishedWork;if(r=e.finishedLanes,null!==h){if(e.finishedWork=null,e.finishedLanes=0,h===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var d=h.lanes|h.childLanes;!function(e,t,n,r,i,a){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(n=s&~n;0n?32:n;n=is.T;var i=iN();try{if(iL(r),is.T=null,null===ls)var s=!1;else{r=lu,lu=null;var o=ls,l=lo;if(ls=null,lo=0,0!=(6&oX))throw Error(a(331));var u=oX;if(oX|=4,n2(o.current),nZ(o,o.current,l,r),oX=u,J(0,!1),sh&&"function"==typeof sh.onPostCommitFiberRoot)try{sh.onPostCommitFiberRoot(sc,o)}catch(e){}s=!0}return s}finally{iL(i),is.T=n,rb(e,t)}}return!1}function rM(e,t,n){t=A(n,t),t=tk(e.stateNode,t,2),null!==(e=ea(e,t,2))&&(M(e,2),Y(e))}function rw(e,t,n){if(3===e.tag)rM(e,e,n);else for(;null!==t;){if(3===t.tag){rM(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===li||!li.has(r))){e=A(n,e),null!==(r=ea(t,n=tz(2),2))&&(tB(n,r,t,e),M(r,2),Y(r));break}}t=t.return}}function rE(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new oj;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(o0=!0,i.add(n),e=rT.bind(null,e,t,n),t.then(e,e))}function rT(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,oq===e&&(oJ&n)===n&&(4===o2||3===o2&&(0x3c00000&oJ)===oJ&&300>sa()-lt?0==(2&oX)&&rl(e,0):o5|=n,o8===oJ&&(o8=0)),Y(e)}function rA(e,t){0===t&&(t=b()),null!==(e=j(e,t))&&(M(e,t),Y(e))}function rC(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),rA(e,n)}function rR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}null!==r&&r.delete(t),rA(e,n)}function rP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rI(e){return!(!(e=e.prototype)||!e.isReactComponent)}function rL(e,t){var r=e.alternate;return null===r?((r=n(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=0x1e00000&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function rN(e,t){e.flags&=0x1e00002;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,e.dependencies=null===(t=n.dependencies)?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function rD(e,t,r,i,s,o){var l=0;if(i=e,"function"==typeof e)rI(e)&&(l=1);else if("string"==typeof e)l=aF&&aK?ak(e,r,sM.current)?26:a2(e)?27:5:aF?ak(e,r,sM.current)?26:5:aK&&a2(e)?27:5;else e:switch(e){case r$:return rU(r.children,s,o,t);case rQ:l=8,s|=24;break;case r0:return(e=n(12,r,t,2|s)).elementType=r0,e.lanes=o,e;case r5:return(e=n(13,r,t,s)).elementType=r5,e.lanes=o,e;case r6:return(e=n(19,r,t,s)).elementType=r6,e.lanes=o,e;case r7:return rO(r,s,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case r1:case r3:l=10;break e;case r2:l=9;break e;case r4:l=11;break e;case r8:l=14;break e;case r9:l=16,i=null;break e}l=29,r=Error(a(130,null===e?"null":typeof e,"")),i=null}return(t=n(l,r,t,s)).elementType=e,t.type=i,t.lanes=o,t}function rU(e,t,r,i){return(e=n(7,e,i,t)).lanes=r,e}function rO(e,t,r,i){(e=n(22,e,i,t)).elementType=r7,e.lanes=r;var s={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=s._current;if(null===e)throw Error(a(456));if(0==(2&s._pendingVisibility)){var t=j(e,2);null!==t&&(s._pendingVisibility|=2,rt(t,e,2))}},attach:function(){var e=s._current;if(null===e)throw Error(a(456));if(0!=(2&s._pendingVisibility)){var t=j(e,2);null!==t&&(s._pendingVisibility&=-3,rt(t,e,2))}}};return e.stateNode=s,e}function rF(e,t,r){return(e=n(6,e,null,t)).lanes=r,e}function rk(e,t,r){return(t=n(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rz(e,t,n,r,i,a,s,o){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=iE,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=S(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=S(0),this.hiddenUpdates=S(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function rB(e,t,r,i,a,s,o,l,u,c,h,d){return e=new rz(e,t,r,o,l,u,c,d),t=1,!0===s&&(t|=24),s=n(3,null,null,t),e.current=s,s.stateNode=e,t=nc(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:i,isDehydrated:r,cache:t},en(s),e}function rH(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,e=Object.keys(e).join(",")))}return null===(e=null!==(e=p(t))?function e(t){var n=t.tag;if(5===n||26===n||27===n||6===n)return t;for(t=t.child;null!==t;){if(null!==(n=e(t)))return n;t=t.sibling}return null}(e):null)?null:id(e.stateNode)}function rV(e,t,n,r,i,a){i=i?a5:a5,null===r.context?r.context=i:r.pendingContext=i,(r=ei(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=ea(e,r,t))&&(rt(n,e,t),es(n,e,t))}function rG(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n>>=0)?32:31-(a8(e)/a9|0)|0},a8=Math.log,a9=Math.LN2,a7=128,se=4194304,st=rq.unstable_scheduleCallback,sn=rq.unstable_cancelCallback,sr=rq.unstable_shouldYield,si=rq.unstable_requestPaint,sa=rq.unstable_now,ss=rq.unstable_ImmediatePriority,so=rq.unstable_UserBlockingPriority,sl=rq.unstable_NormalPriority,su=rq.unstable_IdlePriority,sc=(rq.log,rq.unstable_setDisableYieldValue,null),sh=null,sd="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},sp=new WeakMap,sf=[],sm=0,sg=null,sv=0,sy=[],s_=0,sx=null,sb=1,sS="",sM=f(null),sw=f(null),sE=f(null),sT=f(null),sA=null,sC=null,sR=!1,sP=null,sI=!1,sL=Error(a(519)),sN=[],sD=0,sU=0,sO=null,sF=null,sk=!1,sz=!1,sB=!1,sH=0,sV=null,sG=0,sW=0,sj=null,sX=!1,sq=!1,sY=Object.prototype.hasOwnProperty,sJ=Error(a(460)),sZ=Error(a(474)),sK={then:function(){}},s$=null,sQ=null,s0=0,s1=eb(!0),s2=eb(!1),s3=f(null),s4=f(0),s5=f(null),s6=null,s8=f(0),s9=0,s7=null,oe=null,ot=null,on=!1,or=!1,oi=!1,oa=0,os=0,oo=null,ol=0,ou=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},oc={readContext:no,use:eV,useCallback:eP,useContext:eP,useEffect:eP,useImperativeHandle:eP,useLayoutEffect:eP,useInsertionEffect:eP,useMemo:eP,useReducer:eP,useRef:eP,useState:eP,useDebugValue:eP,useDeferredValue:eP,useTransition:eP,useSyncExternalStore:eP,useId:eP};oc.useCacheRefresh=eP,oc.useMemoCache=eP,oc.useHostTransitionStatus=eP,oc.useFormState=eP,oc.useActionState=eP,oc.useOptimistic=eP;var oh={readContext:no,use:eV,useCallback:function(e,t){return ez().memoizedState=[e,void 0===t?null:t],e},useContext:no,useEffect:tl,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,ts(4194308,4,td.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=ez();t=void 0===t?null:t;var r=e();return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ez();if(void 0!==n)var i=n(t);else i=t;return r.memoizedState=r.baseState=i,r.queue=e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},e=e.dispatch=tE.bind(null,s7,e),[r.memoizedState,e]},useRef:function(e){return ez().memoizedState={current:e}},useState:function(e){var t=(e=e0(e)).queue,n=tT.bind(null,s7,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:tf,useDeferredValue:function(e,t){return tv(ez(),e,t)},useTransition:function(){var e=e0(!1);return e=t_.bind(null,s7,e.queue,!0,!1),ez().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=s7,i=ez();if(sR){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===oq)throw Error(a(349));0!=(60&oJ)||eJ(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,tl(eK.bind(null,r,s,e),[e]),r.flags|=2048,ti(9,eZ.bind(null,r,s,n,t),{destroy:void 0},null),n},useId:function(){var e=ez(),t=oq.identifierPrefix;if(sR){var n=sS,r=sb;t=":"+t+"R"+(n=(r&~(1<<32-a6(r)-1)).toString(32)+n),0<(n=oa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ol++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return ez().memoizedState=tw.bind(null,s7)}};oh.useMemoCache=eG,oh.useHostTransitionStatus=tb,oh.useFormState=e7,oh.useActionState=e7,oh.useOptimistic=function(e){var t=ez();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=tC.bind(null,s7,!0,n),n.dispatch=t,[e,t]};var od={readContext:no,use:eV,useCallback:tm,useContext:no,useEffect:tu,useImperativeHandle:tp,useInsertionEffect:tc,useLayoutEffect:th,useMemo:tg,useReducer:ej,useRef:ta,useState:function(){return ej(eW)},useDebugValue:tf,useDeferredValue:function(e,t){return ty(eB(),oe.memoizedState,e,t)},useTransition:function(){var e=ej(eW)[0],t=eB().memoizedState;return["boolean"==typeof e?e:eH(e),t]},useSyncExternalStore:eY,useId:tS};od.useCacheRefresh=tM,od.useMemoCache=eG,od.useHostTransitionStatus=tb,od.useFormState=te,od.useActionState=te,od.useOptimistic=function(e,t){return e1(eB(),oe,e,t)};var op={readContext:no,use:eV,useCallback:tm,useContext:no,useEffect:tu,useImperativeHandle:tp,useInsertionEffect:tc,useLayoutEffect:th,useMemo:tg,useReducer:eq,useRef:ta,useState:function(){return eq(eW)},useDebugValue:tf,useDeferredValue:function(e,t){var n=eB();return null===oe?tv(n,e,t):ty(n,oe.memoizedState,e,t)},useTransition:function(){var e=eq(eW)[0],t=eB().memoizedState;return["boolean"==typeof e?e:eH(e),t]},useSyncExternalStore:eY,useId:tS};op.useCacheRefresh=tM,op.useMemoCache=eG,op.useHostTransitionStatus=tb,op.useFormState=tr,op.useActionState=tr,op.useOptimistic=function(e,t){var n=eB();return null!==oe?e1(n,oe,e,t):(n.baseState=e,[e,n.queue.dispatch])};var of={isMounted:function(e){return!!(e=e._reactInternals)&&h(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=n7(),i=ei(r);i.payload=t,null!=n&&(i.callback=n),null!==(t=ea(e,i,r))&&(rt(t,e,r),es(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=n7(),i=ei(r);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=ea(e,i,r))&&(rt(t,e,r),es(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=n7(),r=ei(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=ea(e,r,n))&&(rt(t,e,n),es(t,e,n))}},om="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof r.default&&"function"==typeof r.default.emit)return void r.default.emit("uncaughtException",e);console.error(e)},og=Error(a(461)),ov=!1,oy={dehydrated:null,treeContext:null,retryLane:0},o_=f(null),ox=null,ob=null,oS="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},oM=rq.unstable_scheduleCallback,ow=rq.unstable_NormalPriority,oE={$$typeof:r3,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},oT=is.S;is.S=function(e,t){"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===sV){var n=sV=[];sG=0,sW=ee(),sj={status:"pending",value:void 0,then:function(e){n.push(e)}}}sG++,t.then(et,et)}(0,t),null!==oT&&oT(e,t)};var oA=f(null),oC=!1,oR=!1,oP=!1,oI="function"==typeof WeakSet?WeakSet:Set,oL=null,oN=!1,oD=null,oU=!1,oO=null,oF=8192,ok={getCacheForType:function(e){var t=no(oE),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},oz=0,oB=1,oH=2,oV=3,oG=4;if("function"==typeof Symbol&&Symbol.for){var oW=Symbol.for;oz=oW("selector.component"),oB=oW("selector.has_pseudo_class"),oH=oW("selector.role"),oV=oW("selector.test_id"),oG=oW("selector.text")}var oj="function"==typeof WeakMap?WeakMap:Map,oX=0,oq=null,oY=null,oJ=0,oZ=0,oK=null,o$=!1,oQ=!1,o0=!1,o1=0,o2=0,o3=0,o4=0,o5=0,o6=0,o8=0,o9=null,o7=null,le=!1,lt=0,ln=1/0,lr=null,li=null,la=!1,ls=null,lo=0,ll=0,lu=null,lc=0,lh=null;return rj.attemptContinuousHydration=function(e){if(13===e.tag){var t=j(e,0x4000000);null!==t&&rt(t,e,0x4000000),rW(e,0x4000000)}},rj.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=n7(),n=j(e,t);null!==n&&rt(n,e,t),rW(e,t)}},rj.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if((e=e.stateNode).current.memoizedState.isDehydrated){var t=v(e.pendingLanes);if(0!==t){for(e.pendingLanes|=2,e.entangledLanes|=2;t;){var n=1<<31-a6(t);e.entanglements[1]|=n,t&=~n}Y(e),0==(6&oX)&&(ln=sa()+500,J(0,!1))}}break;case 13:null!==(t=j(e,2))&&rt(t,e,2),rs(),rW(e,2)}},rj.batchedUpdates=function(e,t){return e(t)},rj.createComponentSelector=function(e){return{$$typeof:oz,value:e}},rj.createContainer=function(e,t,n,r,i,a,s,o,l,u){return rB(e,t,!1,null,n,r,a,s,o,l,u,null)},rj.createHasPseudoClassSelector=function(e){return{$$typeof:oB,value:e}},rj.createHydrationContainer=function(e,t,n,r,i,a,s,o,l,u,c,h,d){var p;return(e=rB(n,r,!0,e,i,a,o,l,u,c,h,d)).context=(p=null,a5),n=e.current,(i=ei(r=n7())).callback=null!=t?t:null,ea(n,i,r),e.current.lanes=r,M(e,r),Y(e),e},rj.createPortal=function(e,t,n){var r=3=c&&s>=d&&i<=h&&o<=p){e.splice(t,1);break}if(r!==c||n.width!==u.width||po){if(!(s!==d||n.height!==u.height||hi)){c>r&&(u.width+=c-r,u.x=r),hs&&(u.height+=d-s,u.y=s),pn&&(n=l)),l ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},rj.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 27:case 5:return id(e.child.stateNode);default:return e.child.stateNode}},rj.injectIntoDevTools=function(){var e={bundleType:0,version:iu,rendererPackageName:ic,currentDispatcherRef:is,findFiberByHostInstance:iP,reconcilerVersion:"19.0.0"};if(null!==ih&&(e.rendererConfig=ih),"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{sc=t.inject(e),sh=t}catch(e){}e=!!t.checkDCE}}return e},rj.isAlreadyRendering=function(){return!1},rj.observeVisibleRects=function(e,t,n,r){if(!iq)throw Error(a(363));var i=i0(e=n9(e,t),n,r).disconnect;return{disconnect:function(){i()}}},rj.shouldError=function(){return null},rj.shouldSuspend=function(){return!1},rj.startHostTransition=function(e,t,n,r){if(5!==e.tag)throw Error(a(476));var s=tx(e).queue;t_(e,s,t,iV,null===n?i:function(){var t=tx(e).next.queue;return tA(e,t,{},n7()),n(r)})},rj.updateContainer=function(e,t,n,r){var i=t.current,a=n7();return rV(i,a,e,t,n,r),a},rj.updateContainerSync=function(e,t,n,r){return 0===t.tag&&rS(),rV(t.current,2,e,t,n,r),2},rj},t.exports.default=t.exports,Object.defineProperty(t.exports,"__esModule",{value:!0})},98133,(e,t,n)=>{"use strict";t.exports=e.r(40336)},45015,(e,t,n)=>{"use strict";function r(e,t){var n=e.length;for(e.push(t);0>>1,i=e[r];if(0>>1;rs(l,n))us(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[o]=n,r=o);else if(us(c,n))e[r]=c,e[u]=n,r=u;else break}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(n.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();n.unstable_now=function(){return u.now()-c}}var h=[],d=[],p=1,f=null,m=3,g=!1,v=!1,y=!1,_="function"==typeof setTimeout?setTimeout:null,x="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function S(e){for(var t=i(d);null!==t;){if(null===t.callback)a(d);else if(t.startTime<=e)a(d),t.sortIndex=t.expirationTime,r(h,t);else break;t=i(d)}}function M(e){if(y=!1,S(e),!v)if(null!==i(h))v=!0,L();else{var t=i(d);null!==t&&N(M,t.startTime-e)}}var w=!1,E=-1,T=5,A=-1;function C(){return!(n.unstable_now()-Ae&&C());){var s=f.callback;if("function"==typeof s){f.callback=null,m=f.priorityLevel;var l=s(f.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof l){f.callback=l,S(e),t=!0;break t}f===i(h)&&a(h),S(e)}else a(h);f=i(h)}if(null!==f)t=!0;else{var u=i(d);null!==u&&N(M,u.startTime-e),t=!1}}break e}finally{f=null,m=r,g=!1}}}finally{t?o():w=!1}}}if("function"==typeof b)o=function(){b(R)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,I=P.port2;P.port1.onmessage=R,o=function(){I.postMessage(null)}}else o=function(){_(R,0)};function L(){w||(w=!0,o())}function N(e,t){E=_(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_continueExecution=function(){v||g||(v=!0,L())},n.unstable_forceFrameRate=function(e){0>e||125s?(e.sortIndex=a,r(d,e),null===i(h)&&e===i(d)&&(y?(x(E),E=-1):y=!0,N(M,a-s))):(e.sortIndex=o,r(h,e),v||g||(v=!0,L())),e},n.unstable_shouldYield=C,n.unstable_wrapCallback=function(e){var t=m;return function(){var n=m;m=t;try{return e.apply(this,arguments)}finally{m=n}}}},95087,(e,t,n)=>{"use strict";t.exports=e.r(45015)},16096,90072,8560,8155,46791,46712,e=>{"use strict";let t,n,r,i,a,s,o,l,u,c;e.s(["useThree",()=>pj],16096),e.s(["B",()=>pb,"C",()=>pj,"D",()=>pX,"E",()=>pS,"G",()=>pJ,"a",()=>p_,"b",()=>py,"c",()=>fa,"d",()=>fo,"e",()=>p0,"f",()=>fE,"i",()=>pg,"j",()=>ff,"k",()=>fm,"o",()=>fl,"s",()=>pO,"u",()=>px],46712),e.i(47167);var h=e.i(71645),d=e.i(39695);e.s(["ACESFilmicToneMapping",()=>ef,"AddEquation",()=>N,"AddOperation",()=>eu,"AdditiveAnimationBlendMode",()=>tH,"AdditiveBlending",()=>R,"AgXToneMapping",()=>eg,"AlphaFormat",()=>e$,"AlwaysCompare",()=>nm,"AlwaysDepth",()=>ee,"AlwaysStencilFunc",()=>no,"AmbientLight",()=>un,"AnimationAction",()=>uY,"AnimationClip",()=>lU,"AnimationLoader",()=>lG,"AnimationMixer",()=>uZ,"AnimationObjectGroup",()=>uq,"AnimationUtils",()=>lS,"ArcCurve",()=>od,"ArrayCamera",()=>uS,"ArrowHelper",()=>ck,"AttachedBindMode",()=>ey,"Audio",()=>uP,"AudioAnalyser",()=>uO,"AudioContext",()=>ug,"AudioListener",()=>uR,"AudioLoader",()=>uv,"AxesHelper",()=>cz,"BackSide",()=>E,"BasicDepthPacking",()=>tj,"BasicShadowMap",()=>x,"BatchedMesh",()=>sL,"Bone",()=>a1,"BooleanKeyframeTrack",()=>lC,"Box2",()=>cr,"Box3",()=>rf,"Box3Helper",()=>cU,"BoxGeometry",()=>ai,"BoxHelper",()=>cD,"BufferAttribute",()=>iF,"BufferGeometry",()=>i0,"BufferGeometryLoader",()=>uu,"ByteType",()=>eB,"Cache",()=>lO,"Camera",()=>ac,"CameraHelper",()=>cI,"CanvasTexture",()=>s6,"CapsuleGeometry",()=>s7,"CatmullRomCurve3",()=>oy,"CineonToneMapping",()=>ep,"CircleGeometry",()=>oe,"ClampToEdgeWrapping",()=>eA,"Clock",()=>uM,"Color",()=>iE,"ColorKeyframeTrack",()=>lR,"ColorManagement",()=>n8,"CompressedArrayTexture",()=>s4,"CompressedCubeTexture",()=>s5,"CompressedTexture",()=>s3,"CompressedTextureLoader",()=>lW,"ConeGeometry",()=>on,"ConstantAlphaFactor",()=>K,"ConstantColorFactor",()=>J,"Controls",()=>cH,"CubeCamera",()=>am,"CubeReflectionMapping",()=>eb,"CubeRefractionMapping",()=>eS,"CubeTexture",()=>ag,"CubeTextureLoader",()=>lq,"CubeUVReflectionMapping",()=>eE,"CubicBezierCurve",()=>oS,"CubicBezierCurve3",()=>oM,"CubicInterpolant",()=>lw,"CullFaceBack",()=>v,"CullFaceFront",()=>y,"CullFaceFrontBack",()=>_,"CullFaceNone",()=>g,"Curve",()=>oc,"CurvePath",()=>oP,"CustomBlending",()=>L,"CustomToneMapping",()=>em,"CylinderGeometry",()=>ot,"Cylindrical",()=>ce,"Data3DTexture",()=>rd,"DataArrayTexture",()=>rc,"DataTexture",()=>a2,"DataTextureLoader",()=>lY,"DataUtils",()=>iN,"DecrementStencilOp",()=>t6,"DecrementWrapStencilOp",()=>t9,"DefaultLoadingManager",()=>lk,"DepthFormat",()=>e1,"DepthStencilFormat",()=>e2,"DepthTexture",()=>s8,"DetachedBindMode",()=>e_,"DirectionalLight",()=>ut,"DirectionalLightHelper",()=>cC,"DiscreteInterpolant",()=>lT,"DodecahedronGeometry",()=>oi,"DoubleSide",()=>T,"DstAlphaFactor",()=>W,"DstColorFactor",()=>X,"DynamicCopyUsage",()=>nM,"DynamicDrawUsage",()=>nv,"DynamicReadUsage",()=>nx,"EdgesGeometry",()=>ou,"EllipseCurve",()=>oh,"EqualCompare",()=>nc,"EqualDepth",()=>er,"EqualStencilFunc",()=>nn,"EquirectangularReflectionMapping",()=>eM,"EquirectangularRefractionMapping",()=>ew,"Euler",()=>rK,"EventDispatcher",()=>nL,"ExternalTexture",()=>s9,"ExtrudeGeometry",()=>oQ,"FileLoader",()=>lV,"Float16BufferAttribute",()=>ij,"Float32BufferAttribute",()=>iX,"FloatType",()=>ej,"Fog",()=>aS,"FogExp2",()=>ab,"FramebufferTexture",()=>s2,"FrontSide",()=>w,"Frustum",()=>sd,"FrustumArray",()=>sm,"GLBufferAttribute",()=>u2,"GLSL1",()=>nE,"GLSL3",()=>nT,"GreaterCompare",()=>nd,"GreaterDepth",()=>ea,"GreaterEqualCompare",()=>nf,"GreaterEqualDepth",()=>ei,"GreaterEqualStencilFunc",()=>ns,"GreaterStencilFunc",()=>ni,"GridHelper",()=>cM,"Group",()=>ay,"HalfFloatType",()=>eX,"HemisphereLight",()=>lK,"HemisphereLightHelper",()=>cS,"IcosahedronGeometry",()=>o1,"ImageBitmapLoader",()=>um,"ImageLoader",()=>lX,"ImageUtils",()=>re,"IncrementStencilOp",()=>t5,"IncrementWrapStencilOp",()=>t8,"InstancedBufferAttribute",()=>a6,"InstancedBufferGeometry",()=>ul,"InstancedInterleavedBuffer",()=>u1,"InstancedMesh",()=>si,"Int16BufferAttribute",()=>iH,"Int32BufferAttribute",()=>iG,"Int8BufferAttribute",()=>ik,"IntType",()=>eG,"InterleavedBuffer",()=>aw,"InterleavedBufferAttribute",()=>aT,"Interpolant",()=>lM,"InterpolateDiscrete",()=>tD,"InterpolateLinear",()=>tU,"InterpolateSmooth",()=>tO,"InterpolationSamplingMode",()=>nI,"InterpolationSamplingType",()=>nP,"InvertStencilOp",()=>t7,"KeepStencilOp",()=>t3,"KeyframeTrack",()=>lA,"LOD",()=>aW,"LatheGeometry",()=>o2,"Layers",()=>r$,"LessCompare",()=>nu,"LessDepth",()=>et,"LessEqualCompare",()=>nh,"LessEqualDepth",()=>en,"LessEqualStencilFunc",()=>nr,"LessStencilFunc",()=>nt,"Light",()=>lZ,"LightProbe",()=>ua,"Line",()=>sH,"Line3",()=>ch,"LineBasicMaterial",()=>sN,"LineCurve",()=>ow,"LineCurve3",()=>oE,"LineDashedMaterial",()=>lg,"LineLoop",()=>sX,"LineSegments",()=>sj,"LinearFilter",()=>eD,"LinearInterpolant",()=>lE,"LinearMipMapLinearFilter",()=>ek,"LinearMipMapNearestFilter",()=>eO,"LinearMipmapLinearFilter",()=>eF,"LinearMipmapNearestFilter",()=>eU,"LinearSRGBColorSpace",()=>tQ,"LinearToneMapping",()=>eh,"LinearTransfer",()=>t0,"Loader",()=>lz,"LoaderUtils",()=>uo,"LoadingManager",()=>lF,"LoopOnce",()=>tI,"LoopPingPong",()=>tN,"LoopRepeat",()=>tL,"MOUSE",()=>f,"Material",()=>iC,"MaterialLoader",()=>us,"MathUtils",()=>nG,"Matrix2",()=>ct,"Matrix3",()=>nJ,"Matrix4",()=>rH,"MaxEquation",()=>F,"Mesh",()=>an,"MeshBasicMaterial",()=>iR,"MeshDepthMaterial",()=>lp,"MeshDistanceMaterial",()=>lf,"MeshLambertMaterial",()=>ld,"MeshMatcapMaterial",()=>lm,"MeshNormalMaterial",()=>lh,"MeshPhongMaterial",()=>lu,"MeshPhysicalMaterial",()=>ll,"MeshStandardMaterial",()=>lo,"MeshToonMaterial",()=>lc,"MinEquation",()=>O,"MirroredRepeatWrapping",()=>eC,"MixOperation",()=>el,"MultiplyBlending",()=>I,"MultiplyOperation",()=>eo,"NearestFilter",()=>eR,"NearestMipMapLinearFilter",()=>eN,"NearestMipMapNearestFilter",()=>eI,"NearestMipmapLinearFilter",()=>eL,"NearestMipmapNearestFilter",()=>eP,"NeutralToneMapping",()=>ev,"NeverCompare",()=>nl,"NeverDepth",()=>Q,"NeverStencilFunc",()=>ne,"NoBlending",()=>A,"NoColorSpace",()=>tK,"NoToneMapping",()=>ec,"NormalAnimationBlendMode",()=>tB,"NormalBlending",()=>C,"NotEqualCompare",()=>np,"NotEqualDepth",()=>es,"NotEqualStencilFunc",()=>na,"NumberKeyframeTrack",()=>lP,"Object3D",()=>ia,"ObjectLoader",()=>uc,"ObjectSpaceNormalMap",()=>tZ,"OctahedronGeometry",()=>o3,"OneFactor",()=>z,"OneMinusConstantAlphaFactor",()=>$,"OneMinusConstantColorFactor",()=>Z,"OneMinusDstAlphaFactor",()=>j,"OneMinusDstColorFactor",()=>q,"OneMinusSrcAlphaFactor",()=>G,"OneMinusSrcColorFactor",()=>H,"OrthographicCamera",()=>l7,"PCFShadowMap",()=>b,"PCFSoftShadowMap",()=>S,"Path",()=>oI,"PerspectiveCamera",()=>af,"Plane",()=>sl,"PlaneGeometry",()=>o4,"PlaneHelper",()=>cO,"PointLight",()=>l9,"PointLightHelper",()=>cy,"Points",()=>s$,"PointsMaterial",()=>sq,"PolarGridHelper",()=>cw,"PolyhedronGeometry",()=>or,"PositionalAudio",()=>uU,"PropertyBinding",()=>uX,"PropertyMixer",()=>uF,"QuadraticBezierCurve",()=>oT,"QuadraticBezierCurve3",()=>oA,"Quaternion",()=>nj,"QuaternionKeyframeTrack",()=>lL,"QuaternionLinearInterpolant",()=>lI,"RAD2DEG",()=>nO,"RED_GREEN_RGTC2_Format",()=>tR,"RED_RGTC1_Format",()=>tA,"REVISION",()=>p,"RGBADepthPacking",()=>tX,"RGBAFormat",()=>e0,"RGBAIntegerFormat",()=>e9,"RGBA_ASTC_10x10_Format",()=>tb,"RGBA_ASTC_10x5_Format",()=>ty,"RGBA_ASTC_10x6_Format",()=>t_,"RGBA_ASTC_10x8_Format",()=>tx,"RGBA_ASTC_12x10_Format",()=>tS,"RGBA_ASTC_12x12_Format",()=>tM,"RGBA_ASTC_4x4_Format",()=>tc,"RGBA_ASTC_5x4_Format",()=>th,"RGBA_ASTC_5x5_Format",()=>td,"RGBA_ASTC_6x5_Format",()=>tp,"RGBA_ASTC_6x6_Format",()=>tf,"RGBA_ASTC_8x5_Format",()=>tm,"RGBA_ASTC_8x6_Format",()=>tg,"RGBA_ASTC_8x8_Format",()=>tv,"RGBA_BPTC_Format",()=>tw,"RGBA_ETC2_EAC_Format",()=>tu,"RGBA_PVRTC_2BPPV1_Format",()=>ts,"RGBA_PVRTC_4BPPV1_Format",()=>ta,"RGBA_S3TC_DXT1_Format",()=>te,"RGBA_S3TC_DXT3_Format",()=>tt,"RGBA_S3TC_DXT5_Format",()=>tn,"RGBDepthPacking",()=>tq,"RGBFormat",()=>eQ,"RGBIntegerFormat",()=>e8,"RGB_BPTC_SIGNED_Format",()=>tE,"RGB_BPTC_UNSIGNED_Format",()=>tT,"RGB_ETC1_Format",()=>to,"RGB_ETC2_Format",()=>tl,"RGB_PVRTC_2BPPV1_Format",()=>ti,"RGB_PVRTC_4BPPV1_Format",()=>tr,"RGB_S3TC_DXT1_Format",()=>e7,"RGDepthPacking",()=>tY,"RGFormat",()=>e5,"RGIntegerFormat",()=>e6,"RawShaderMaterial",()=>ls,"Ray",()=>rB,"Raycaster",()=>u4,"RectAreaLight",()=>ur,"RedFormat",()=>e3,"RedIntegerFormat",()=>e4,"ReinhardToneMapping",()=>ed,"RenderTarget",()=>rl,"RenderTarget3D",()=>uK,"RepeatWrapping",()=>eT,"ReplaceStencilOp",()=>t4,"ReverseSubtractEquation",()=>U,"RingGeometry",()=>o5,"SIGNED_RED_GREEN_RGTC2_Format",()=>tP,"SIGNED_RED_RGTC1_Format",()=>tC,"SRGBColorSpace",()=>t$,"SRGBTransfer",()=>t1,"Scene",()=>aM,"ShaderMaterial",()=>au,"ShadowMaterial",()=>la,"Shape",()=>oL,"ShapeGeometry",()=>o6,"ShapePath",()=>cB,"ShapeUtils",()=>oZ,"ShortType",()=>eH,"Skeleton",()=>a5,"SkeletonHelper",()=>cv,"SkinnedMesh",()=>a0,"Source",()=>rn,"Sphere",()=>rL,"SphereGeometry",()=>o8,"Spherical",()=>u7,"SphericalHarmonics3",()=>ui,"SplineCurve",()=>oC,"SpotLight",()=>l3,"SpotLightHelper",()=>cp,"Sprite",()=>aB,"SpriteMaterial",()=>aA,"SrcAlphaFactor",()=>V,"SrcAlphaSaturateFactor",()=>Y,"SrcColorFactor",()=>B,"StaticCopyUsage",()=>nS,"StaticDrawUsage",()=>ng,"StaticReadUsage",()=>n_,"StereoCamera",()=>ub,"StreamCopyUsage",()=>nw,"StreamDrawUsage",()=>ny,"StreamReadUsage",()=>nb,"StringKeyframeTrack",()=>lN,"SubtractEquation",()=>D,"SubtractiveBlending",()=>P,"TOUCH",()=>m,"TangentSpaceNormalMap",()=>tJ,"TetrahedronGeometry",()=>o9,"Texture",()=>rs,"TextureLoader",()=>lJ,"TextureUtils",()=>cG,"Timer",()=>u8,"TimestampQuery",()=>nR,"TorusGeometry",()=>o7,"TorusKnotGeometry",()=>le,"Triangle",()=>ix,"TriangleFanDrawMode",()=>tW,"TriangleStripDrawMode",()=>tG,"TrianglesDrawMode",()=>tV,"TubeGeometry",()=>lt,"UVMapping",()=>ex,"Uint16BufferAttribute",()=>iV,"Uint32BufferAttribute",()=>iW,"Uint8BufferAttribute",()=>iz,"Uint8ClampedBufferAttribute",()=>iB,"Uniform",()=>u$,"UniformsGroup",()=>u0,"UniformsUtils",()=>al,"UnsignedByteType",()=>ez,"UnsignedInt101111Type",()=>eK,"UnsignedInt248Type",()=>eJ,"UnsignedInt5999Type",()=>eZ,"UnsignedIntType",()=>eW,"UnsignedShort4444Type",()=>eq,"UnsignedShort5551Type",()=>eY,"UnsignedShortType",()=>eV,"VSMShadowMap",()=>M,"Vector2",()=>nW,"Vector3",()=>nX,"Vector4",()=>ro,"VectorKeyframeTrack",()=>lD,"VideoFrameTexture",()=>s1,"VideoTexture",()=>s0,"WebGL3DRenderTarget",()=>rp,"WebGLArrayRenderTarget",()=>rh,"WebGLCoordinateSystem",()=>nA,"WebGLCubeRenderTarget",()=>av,"WebGLRenderTarget",()=>ru,"WebGPUCoordinateSystem",()=>nC,"WebXRController",()=>ax,"WireframeGeometry",()=>ln,"WrapAroundEnding",()=>tz,"ZeroCurvatureEnding",()=>tF,"ZeroFactor",()=>k,"ZeroSlopeEnding",()=>tk,"ZeroStencilOp",()=>t2,"arrayNeedsUint32",()=>nK,"cloneUniforms",()=>aa,"createCanvasElement",()=>n1,"createElementNS",()=>n0,"getByteLength",()=>cV,"getUnlitUniformColorSpace",()=>ao,"mergeUniforms",()=>as,"probeAsync",()=>n4,"warnOnce",()=>n3],90072);let p="180",f={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},m={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},g=0,v=1,y=2,_=3,x=0,b=1,S=2,M=3,w=0,E=1,T=2,A=0,C=1,R=2,P=3,I=4,L=5,N=100,D=101,U=102,O=103,F=104,k=200,z=201,B=202,H=203,V=204,G=205,W=206,j=207,X=208,q=209,Y=210,J=211,Z=212,K=213,$=214,Q=0,ee=1,et=2,en=3,er=4,ei=5,ea=6,es=7,eo=0,el=1,eu=2,ec=0,eh=1,ed=2,ep=3,ef=4,em=5,eg=6,ev=7,ey="attached",e_="detached",ex=300,eb=301,eS=302,eM=303,ew=304,eE=306,eT=1e3,eA=1001,eC=1002,eR=1003,eP=1004,eI=1004,eL=1005,eN=1005,eD=1006,eU=1007,eO=1007,eF=1008,ek=1008,ez=1009,eB=1010,eH=1011,eV=1012,eG=1013,eW=1014,ej=1015,eX=1016,eq=1017,eY=1018,eJ=1020,eZ=35902,eK=35899,e$=1021,eQ=1022,e0=1023,e1=1026,e2=1027,e3=1028,e4=1029,e5=1030,e6=1031,e8=1032,e9=1033,e7=33776,te=33777,tt=33778,tn=33779,tr=35840,ti=35841,ta=35842,ts=35843,to=36196,tl=37492,tu=37496,tc=37808,th=37809,td=37810,tp=37811,tf=37812,tm=37813,tg=37814,tv=37815,ty=37816,t_=37817,tx=37818,tb=37819,tS=37820,tM=37821,tw=36492,tE=36494,tT=36495,tA=36283,tC=36284,tR=36285,tP=36286,tI=2200,tL=2201,tN=2202,tD=2300,tU=2301,tO=2302,tF=2400,tk=2401,tz=2402,tB=2500,tH=2501,tV=0,tG=1,tW=2,tj=3200,tX=3201,tq=3202,tY=3203,tJ=0,tZ=1,tK="",t$="srgb",tQ="srgb-linear",t0="linear",t1="srgb",t2=0,t3=7680,t4=7681,t5=7682,t6=7683,t8=34055,t9=34056,t7=5386,ne=512,nt=513,nn=514,nr=515,ni=516,na=517,ns=518,no=519,nl=512,nu=513,nc=514,nh=515,nd=516,np=517,nf=518,nm=519,ng=35044,nv=35048,ny=35040,n_=35045,nx=35049,nb=35041,nS=35046,nM=35050,nw=35042,nE="100",nT="300 es",nA=2e3,nC=2001,nR={COMPUTE:"compute",RENDER:"render"},nP={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},nI={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};class nL{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return void 0!==n&&void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){let n=this._listeners;if(void 0===n)return;let r=n[e];if(void 0!==r){let e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(void 0===t)return;let n=t[e.type];if(void 0!==n){e.target=this;let t=n.slice(0);for(let n=0,r=t.length;n>8&255]+nN[e>>16&255]+nN[e>>24&255]+"-"+nN[255&t]+nN[t>>8&255]+"-"+nN[t>>16&15|64]+nN[t>>24&255]+"-"+nN[63&n|128]+nN[n>>8&255]+"-"+nN[n>>16&255]+nN[n>>24&255]+nN[255&r]+nN[r>>8&255]+nN[r>>16&255]+nN[r>>24&255]).toLowerCase()}function nk(e,t,n){return Math.max(t,Math.min(n,e))}function nz(e,t){return(e%t+t)%t}function nB(e,t,n){return(1-n)*e+n*t}function nH(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/0xffffffff;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/0x7fffffff,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error("Invalid component type.")}}function nV(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(0xffffffff*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(0x7fffffff*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw Error("Invalid component type.")}}let nG={DEG2RAD:nU,RAD2DEG:nO,generateUUID:nF,clamp:nk,euclideanModulo:nz,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:nB,damp:function(e,t,n,r){return nB(e,t,1-Math.exp(-n*r))},pingpong:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t-Math.abs(nz(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(nD=e);let t=nD+=0x6d2b79f5;return t=Math.imul(t^t>>>15,1|t),(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/0x100000000},degToRad:function(e){return e*nU},radToDeg:function(e){return e*nO},isPowerOfTwo:function(e){return(e&e-1)==0&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){let a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),u=a((t+r)/2),c=s((t+r)/2),h=a((t-r)/2),d=s((t-r)/2),p=a((r-t)/2),f=s((r-t)/2);switch(i){case"XYX":e.set(o*c,l*h,l*d,o*u);break;case"YZY":e.set(l*d,o*c,l*h,o*u);break;case"ZXZ":e.set(l*h,l*d,o*c,o*u);break;case"XZX":e.set(o*c,l*f,l*p,o*u);break;case"YXY":e.set(l*p,o*c,l*f,o*u);break;case"ZYZ":e.set(l*f,l*p,o*c,o*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:nV,denormalize:nH};class nW{get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=nk(this.x,e.x,t.x),this.y=nk(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=nk(this.x,e,t),this.y=nk(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nk(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(nk(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}constructor(e=0,t=0){nW.prototype.isVector2=!0,this.x=e,this.y=t}}class nj{static slerpFlat(e,t,n,r,i,a,s){let o=n[r+0],l=n[r+1],u=n[r+2],c=n[r+3],h=i[a+0],d=i[a+1],p=i[a+2],f=i[a+3];if(0===s){e[t+0]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c;return}if(1===s){e[t+0]=h,e[t+1]=d,e[t+2]=p,e[t+3]=f;return}if(c!==f||o!==h||l!==d||u!==p){let e=1-s,t=o*h+l*d+u*p+c*f,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){let i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,s=Math.sin(s*a)/i}let i=s*n;if(o=o*e+h*i,l=l*e+d*i,u=u*e+p*i,c=c*e+f*i,e===1-s){let e=1/Math.sqrt(o*o+l*l+u*u+c*c);o*=e,l*=e,u*=e,c*=e}}e[t]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c}static multiplyQuaternionsFlat(e,t,n,r,i,a){let s=n[r],o=n[r+1],l=n[r+2],u=n[r+3],c=i[a],h=i[a+1],d=i[a+2],p=i[a+3];return e[t]=s*p+u*c+o*d-l*h,e[t+1]=o*p+u*h+l*c-s*d,e[t+2]=l*p+u*d+s*h-o*c,e[t+3]=u*p-s*c-o*h-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=e._x,r=e._y,i=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(n/2),u=s(r/2),c=s(i/2),h=o(n/2),d=o(r/2),p=o(i/2);switch(a){case"XYZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"YXZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"ZXY":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"ZYX":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"YZX":this._x=h*u*c+l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c-h*d*p;break;case"XZY":this._x=h*u*c-l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c+h*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],s=t[5],o=t[9],l=t[2],u=t[6],c=t[10],h=n+s+c;if(h>0){let e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(u-o)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>s&&n>c){let e=2*Math.sqrt(1+n-s-c);this._w=(u-o)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(s>c){let e=2*Math.sqrt(1+s-n-c);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(o+u)/e}else{let e=2*Math.sqrt(1+c-n-s);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(o+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x),this._w=n,this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(nk(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(0===n)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,s=t._x,o=t._y,l=t._z,u=t._w;return this._x=n*u+a*s+r*l-i*o,this._y=r*u+a*o+i*s-n*l,this._z=i*u+a*l+n*o-r*s,this._w=a*u-n*s-r*o-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);let n=this._x,r=this._y,i=this._z,a=this._w,s=a*e._w+n*e._x+r*e._y+i*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;let o=1-s*s;if(o<=Number.EPSILON){let e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this}let l=Math.sqrt(o),u=Math.atan2(l,s),c=Math.sin((1-t)*u)/l,h=Math.sin(t*u)/l;return this._w=a*c+this._w*h,this._x=n*c+this._x*h,this._y=r*c+this._y*h,this._z=i*c+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}}class nX{set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(nY.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(nY.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*r-s*n),u=2*(s*t-i*r),c=2*(i*n-a*t);return this.x=t+o*l+a*c-s*u,this.y=n+o*u+s*l-i*c,this.z=r+o*c+i*u-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=nk(this.x,e.x,t.x),this.y=nk(this.y,e.y,t.y),this.z=nk(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=nk(this.x,e,t),this.y=nk(this.y,e,t),this.z=nk(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nk(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,s=t.y,o=t.z;return this.x=r*o-i*s,this.y=i*a-n*o,this.z=n*s-r*a,this}projectOnVector(e){let t=e.lengthSq();if(0===t)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return nq.copy(this).projectOnVector(e),this.sub(nq)}reflect(e){return this.sub(nq.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(nk(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=2*Math.random()-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}constructor(e=0,t=0,n=0){nX.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}}let nq=new nX,nY=new nj;class nJ{set(e,t,n,r,i,a,s,o,l){let u=this.elements;return u[0]=e,u[1]=r,u[2]=s,u[3]=t,u[4]=i,u[5]=o,u[6]=n,u[7]=a,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[3],o=n[6],l=n[1],u=n[4],c=n[7],h=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],v=r[1],y=r[4],_=r[7],x=r[2],b=r[5],S=r[8];return i[0]=a*f+s*v+o*x,i[3]=a*m+s*y+o*b,i[6]=a*g+s*_+o*S,i[1]=l*f+u*v+c*x,i[4]=l*m+u*y+c*b,i[7]=l*g+u*_+c*S,i[2]=h*f+d*v+p*x,i[5]=h*m+d*y+p*b,i[8]=h*g+d*_+p*S,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8];return t*a*u-t*s*l-n*i*u+n*s*o+r*i*l-r*a*o}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=u*a-s*l,h=s*o-u*i,d=l*i-a*o,p=t*c+n*h+r*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);let f=1/p;return e[0]=c*f,e[1]=(r*l-u*n)*f,e[2]=(s*n-r*a)*f,e[3]=h*f,e[4]=(u*t-r*o)*f,e[5]=(r*i-s*t)*f,e[6]=d*f,e[7]=(n*o-l*t)*f,e[8]=(a*t-n*i)*f,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,s){let o=Math.cos(i),l=Math.sin(i);return this.set(n*o,n*l,-n*(o*a+l*s)+a+e,-r*l,r*o,-r*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(nZ.makeScale(e,t)),this}rotate(e){return this.premultiply(nZ.makeRotation(-e)),this}translate(e,t){return this.premultiply(nZ.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}constructor(e,t,n,r,i,a,s,o,l){nJ.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l)}}let nZ=new nJ;function nK(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}let n$={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function nQ(e,t){return new n$[e](t)}function n0(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function n1(){let e=n0("canvas");return e.style.display="block",e}let n2={};function n3(e){e in n2||(n2[e]=!0,console.warn(e))}function n4(e,t,n){return new Promise(function(r,i){setTimeout(function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:i();break;case e.TIMEOUT_EXPIRED:setTimeout(a,n);break;default:r()}},n)})}let n5=new nJ().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),n6=new nJ().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),n8=function(){let e={enabled:!0,workingColorSpace:tQ,spaces:{},convert:function(e,t,n){return!1!==this.enabled&&t!==n&&t&&n&&(this.spaces[t].transfer===t1&&(e.r=n9(e.r),e.g=n9(e.g),e.b=n9(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===t1&&(e.r=n7(e.r),e.g=n7(e.g),e.b=n7(e.b))),e},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===tK?t0:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.workingColorSpace;return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.workingColorSpace;return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return n3("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return n3("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[tQ]:{primaries:t,whitePoint:r,transfer:t0,toXYZ:n5,fromXYZ:n6,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:t$},outputColorSpaceConfig:{drawingBufferColorSpace:t$}},[t$]:{primaries:t,whitePoint:r,transfer:t1,toXYZ:n5,fromXYZ:n6,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:t$}}}),e}();function n9(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function n7(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class re{static getDataURL(e){let n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image/png";if(/^data:/i.test(e.src)||"undefined"==typeof HTMLCanvasElement)return e.src;if(e instanceof HTMLCanvasElement)n=e;else{void 0===t&&(t=n0("canvas")),t.width=e.width,t.height=e.height;let r=t.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=t}return n.toDataURL(r)}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){let t=n0("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==ex)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case eT:e.x=e.x-Math.floor(e.x);break;case eA:e.x=e.x<0?0:1;break;case eC:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case eT:e.y=e.y-Math.floor(e.y);break;case eA:e.y=e.y<0?0:1;break;case eC:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){!0===e&&this.pmremVersion++}constructor(e=rs.DEFAULT_IMAGE,t=rs.DEFAULT_MAPPING,n=eA,r=eA,i=eD,a=eF,s=e0,o=ez,l=rs.DEFAULT_ANISOTROPY,u=tK){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:ri++}),this.uuid=nF(),this.name="",this.source=new rn(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=a,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=o,this.offset=new nW(0,0),this.repeat=new nW(1,1),this.center=new nW(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new nJ,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!e&&!!e.depth&&e.depth>1,this.pmremVersion=0}}rs.DEFAULT_IMAGE=null,rs.DEFAULT_MAPPING=ex,rs.DEFAULT_ANISOTROPY=1;class ro{get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i,a=e.elements,s=a[0],o=a[4],l=a[8],u=a[1],c=a[5],h=a[9],d=a[2],p=a[6],f=a[10];if(.01>Math.abs(o-u)&&.01>Math.abs(l-d)&&.01>Math.abs(h-p)){if(.1>Math.abs(o+u)&&.1>Math.abs(l+d)&&.1>Math.abs(h+p)&&.1>Math.abs(s+c+f-3))return this.set(1,0,0,0),this;t=Math.PI;let e=(s+1)/2,a=(c+1)/2,m=(f+1)/2,g=(o+u)/4,v=(l+d)/4,y=(h+p)/4;return e>a&&e>m?e<.01?(n=0,r=.707106781,i=.707106781):(r=g/(n=Math.sqrt(e)),i=v/n):a>m?a<.01?(n=.707106781,r=0,i=.707106781):(n=g/(r=Math.sqrt(a)),i=y/r):m<.01?(n=.707106781,r=.707106781,i=0):(n=v/(i=Math.sqrt(m)),r=y/i),this.set(n,r,i,t),this}let m=Math.sqrt((p-h)*(p-h)+(l-d)*(l-d)+(u-o)*(u-o));return .001>Math.abs(m)&&(m=1),this.x=(p-h)/m,this.y=(l-d)/m,this.z=(u-o)/m,this.w=Math.acos((s+c+f-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=nk(this.x,e.x,t.x),this.y=nk(this.y,e.y,t.y),this.z=nk(this.z,e.z,t.z),this.w=nk(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=nk(this.x,e,t),this.y=nk(this.y,e,t),this.z=nk(this.z,e,t),this.w=nk(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nk(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}constructor(e=0,t=0,n=0,r=1){ro.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}}class rl extends nL{_setTextureOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={minFilter:eD,generateMipmaps:!1,flipY:!1,internalFormat:null};void 0!==e.mapping&&(t.mapping=e.mapping),void 0!==e.wrapS&&(t.wrapS=e.wrapS),void 0!==e.wrapT&&(t.wrapT=e.wrapT),void 0!==e.wrapR&&(t.wrapR=e.wrapR),void 0!==e.magFilter&&(t.magFilter=e.magFilter),void 0!==e.minFilter&&(t.minFilter=e.minFilter),void 0!==e.format&&(t.format=e.format),void 0!==e.type&&(t.type=e.type),void 0!==e.anisotropy&&(t.anisotropy=e.anisotropy),void 0!==e.colorSpace&&(t.colorSpace=e.colorSpace),void 0!==e.flipY&&(t.flipY=e.flipY),void 0!==e.generateMipmaps&&(t.generateMipmaps=e.generateMipmaps),void 0!==e.internalFormat&&(t.internalFormat=e.internalFormat);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.textures.length;r1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t1&&void 0!==arguments[1]&&arguments[1];return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=Infinity,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x1&&void 0!==arguments[1]&&arguments[1];e.updateWorldMatrix(!1,!1);let n=e.geometry;if(void 0!==n){let r=n.getAttribute("position");if(!0===t&&void 0!==r&&!0!==e.isInstancedMesh)for(let t=0,n=r.count;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,rg),rg.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(rw),rE.subVectors(this.max,rw),ry.subVectors(e.a,rw),r_.subVectors(e.b,rw),rx.subVectors(e.c,rw),rb.subVectors(r_,ry),rS.subVectors(rx,r_),rM.subVectors(ry,rx);let t=[0,-rb.z,rb.y,0,-rS.z,rS.y,0,-rM.z,rM.y,rb.z,0,-rb.x,rS.z,0,-rS.x,rM.z,0,-rM.x,-rb.y,rb.x,0,-rS.y,rS.x,0,-rM.y,rM.x,0];return!!rC(t,ry,r_,rx,rE)&&!!rC(t=[1,0,0,0,1,0,0,0,1],ry,r_,rx,rE)&&(rT.crossVectors(rb,rS),rC(t=[rT.x,rT.y,rT.z],ry,r_,rx,rE))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,rg).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(rg).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(rm[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),rm[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),rm[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),rm[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),rm[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),rm[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),rm[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),rm[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(rm)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}constructor(e=new nX(Infinity,Infinity,Infinity),t=new nX(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}}let rm=[new nX,new nX,new nX,new nX,new nX,new nX,new nX,new nX],rg=new nX,rv=new rf,ry=new nX,r_=new nX,rx=new nX,rb=new nX,rS=new nX,rM=new nX,rw=new nX,rE=new nX,rT=new nX,rA=new nX;function rC(e,t,n,r,i){for(let a=0,s=e.length-3;a<=s;a+=3){rA.fromArray(e,a);let s=i.x*Math.abs(rA.x)+i.y*Math.abs(rA.y)+i.z*Math.abs(rA.z),o=t.dot(rA),l=n.dot(rA),u=r.dot(rA);if(Math.max(-Math.max(o,l,u),Math.min(o,l,u))>s)return!1}return!0}let rR=new rf,rP=new nX,rI=new nX;class rL{set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;void 0!==t?n.copy(t):rR.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?e.makeEmpty():(e.set(this.center,this.center),e.expandByScalar(this.radius)),e}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;rP.subVectors(e,this.center);let t=rP.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(rP,n/e),this.radius+=n}return this}union(e){return e.isEmpty()||(this.isEmpty()?this.copy(e):!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(rI.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(rP.copy(e.center).add(rI)),this.expandByPoint(rP.copy(e.center).sub(rI)))),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}constructor(e=new nX,t=-1){this.isSphere=!0,this.center=e,this.radius=t}}let rN=new nX,rD=new nX,rU=new nX,rO=new nX,rF=new nX,rk=new nX,rz=new nX;class rB{set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,rN)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=rN.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(rN.copy(this.origin).addScaledVector(this.direction,t),rN.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){let i,a,s,o;rD.copy(e).add(t).multiplyScalar(.5),rU.copy(t).sub(e).normalize(),rO.copy(this.origin).sub(rD);let l=.5*e.distanceTo(t),u=-this.direction.dot(rU),c=rO.dot(this.direction),h=-rO.dot(rU),d=rO.lengthSq(),p=Math.abs(1-u*u);if(p>0)if(i=u*h-c,a=u*c-h,o=l*p,i>=0)if(a>=-o)if(a<=o){let e=1/p;i*=e,a*=e,s=i*(i+u*a+2*c)+a*(u*i+a+2*h)+d}else s=-(i=Math.max(0,-(u*(a=l)+c)))*i+a*(a+2*h)+d;else s=-(i=Math.max(0,-(u*(a=-l)+c)))*i+a*(a+2*h)+d;else a<=-o?(a=(i=Math.max(0,-(-u*l+c)))>0?-l:Math.min(Math.max(-l,-h),l),s=-i*i+a*(a+2*h)+d):a<=o?(i=0,s=(a=Math.min(Math.max(-l,-h),l))*(a+2*h)+d):(a=(i=Math.max(0,-(u*l+c)))>0?l:Math.min(Math.max(-l,-h),l),s=-i*i+a*(a+2*h)+d);else a=u>0?-l:l,s=-(i=Math.max(0,-(u*a+c)))*i+a*(a+2*h)+d;return n&&n.copy(this.origin).addScaledVector(this.direction,i),r&&r.copy(rD).addScaledVector(rU,a),s}intersectSphere(e,t){rN.subVectors(e.center,this.origin);let n=rN.dot(this.direction),r=rN.dot(rN)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),s=n-a,o=n+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return!(e.radius<0)&&this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return!!(0===t||e.normal.dot(this.direction)*t<0)}intersectBox(e,t){let n,r,i,a,s,o,l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,h=this.origin;return(l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),u>=0?(i=(e.min.y-h.y)*u,a=(e.max.y-h.y)*u):(i=(e.max.y-h.y)*u,a=(e.min.y-h.y)*u),n>a||i>r||((i>n||isNaN(n))&&(n=i),(a=0?(s=(e.min.z-h.z)*c,o=(e.max.z-h.z)*c):(s=(e.max.z-h.z)*c,o=(e.min.z-h.z)*c),n>o||s>r||((s>n||n!=n)&&(n=s),(o=0?n:r,t)}intersectsBox(e){return null!==this.intersectBox(e,rN)}intersectTriangle(e,t,n,r,i){let a;rF.subVectors(t,e),rk.subVectors(n,e),rz.crossVectors(rF,rk);let s=this.direction.dot(rz);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}rO.subVectors(this.origin,e);let o=a*this.direction.dot(rk.crossVectors(rO,rk));if(o<0)return null;let l=a*this.direction.dot(rF.cross(rO));if(l<0||o+l>s)return null;let u=-a*rO.dot(rz);return u<0?null:this.at(u/s,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}constructor(e=new nX,t=new nX(0,0,-1)){this.origin=e,this.direction=t}}class rH{set(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=u,g[10]=c,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new rH().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,r=1/rV.setFromMatrixColumn(e,0).length(),i=1/rV.setFromMatrixColumn(e,1).length(),a=1/rV.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),s=Math.sin(n),o=Math.cos(r),l=Math.sin(r),u=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){let e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=-o*c,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*o,t[2]=i-e*l,t[6]=r+n*l,t[10]=a*o}else if("YXZ"===e.order){let e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e+i*s,t[4]=r*s-n,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=a*o}else if("ZXY"===e.order){let e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e-i*s,t[4]=-a*c,t[8]=r+n*s,t[1]=n+r*s,t[5]=a*u,t[9]=i-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){let e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*c,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){let e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=i-e*c,t[8]=r*c+n,t[1]=c,t[5]=a*u,t[9]=-s*u,t[2]=-l*u,t[6]=n*c+r,t[10]=e-i*c}else if("XZY"===e.order){let e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=-c,t[8]=l*u,t[1]=e*c+i,t[5]=a*u,t[9]=n*c-r,t[2]=r*c-n,t[6]=s*u,t[10]=i*c+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(rW,e,rj)}lookAt(e,t,n){let r=this.elements;return rY.subVectors(e,t),0===rY.lengthSq()&&(rY.z=1),rY.normalize(),rX.crossVectors(n,rY),0===rX.lengthSq()&&(1===Math.abs(n.z)?rY.x+=1e-4:rY.z+=1e-4,rY.normalize(),rX.crossVectors(n,rY)),rX.normalize(),rq.crossVectors(rY,rX),r[0]=rX.x,r[4]=rq.x,r[8]=rY.x,r[1]=rX.y,r[5]=rq.y,r[9]=rY.y,r[2]=rX.z,r[6]=rq.z,r[10]=rY.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[4],o=n[8],l=n[12],u=n[1],c=n[5],h=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],x=n[15],b=r[0],S=r[4],M=r[8],w=r[12],E=r[1],T=r[5],A=r[9],C=r[13],R=r[2],P=r[6],I=r[10],L=r[14],N=r[3],D=r[7],U=r[11],O=r[15];return i[0]=a*b+s*E+o*R+l*N,i[4]=a*S+s*T+o*P+l*D,i[8]=a*M+s*A+o*I+l*U,i[12]=a*w+s*C+o*L+l*O,i[1]=u*b+c*E+h*R+d*N,i[5]=u*S+c*T+h*P+d*D,i[9]=u*M+c*A+h*I+d*U,i[13]=u*w+c*C+h*L+d*O,i[2]=p*b+f*E+m*R+g*N,i[6]=p*S+f*T+m*P+g*D,i[10]=p*M+f*A+m*I+g*U,i[14]=p*w+f*C+m*L+g*O,i[3]=v*b+y*E+_*R+x*N,i[7]=v*S+y*T+_*P+x*D,i[11]=v*M+y*A+_*I+x*U,i[15]=v*w+y*C+_*L+x*O,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],s=e[5],o=e[9],l=e[13],u=e[2],c=e[6],h=e[10],d=e[14],p=e[3],f=e[7];return p*(i*o*c-r*l*c-i*s*h+n*l*h+r*s*d-n*o*d)+f*(t*o*d-t*l*h+i*a*h-r*a*d+r*l*u-i*o*u)+e[11]*(t*l*c-t*s*d-i*a*c+n*a*d+i*s*u-n*l*u)+e[15]*(-r*s*u-t*o*c+t*s*h+r*a*c-n*a*h+n*o*u)}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],p=e[12],f=e[13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]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,s=e.y,o=e.z,l=i*a,u=i*s;return this.set(l*a+n,l*s-r*o,l*o+r*s,0,l*s+r*o,u*s+n,u*o-r*a,0,l*o-r*s,u*o+r*a,i*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,i=t._x,a=t._y,s=t._z,o=t._w,l=i+i,u=a+a,c=s+s,h=i*l,d=i*u,p=i*c,f=a*u,m=a*c,g=s*c,v=o*l,y=o*u,_=o*c,x=n.x,b=n.y,S=n.z;return r[0]=(1-(f+g))*x,r[1]=(d+_)*x,r[2]=(p-y)*x,r[3]=0,r[4]=(d-_)*b,r[5]=(1-(h+g))*b,r[6]=(m+v)*b,r[7]=0,r[8]=(p+y)*S,r[9]=(m-v)*S,r[10]=(1-(h+f))*S,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements,i=rV.set(r[0],r[1],r[2]).length(),a=rV.set(r[4],r[5],r[6]).length(),s=rV.set(r[8],r[9],r[10]).length();0>this.determinant()&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],rG.copy(this);let o=1/i,l=1/a,u=1/s;return rG.elements[0]*=o,rG.elements[1]*=o,rG.elements[2]*=o,rG.elements[4]*=l,rG.elements[5]*=l,rG.elements[6]*=l,rG.elements[8]*=u,rG.elements[9]*=u,rG.elements[10]*=u,t.setFromRotationMatrix(rG),n.x=i,n.y=a,n.z=s,this}makePerspective(e,t,n,r,i,a){let s,o,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:nA,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=this.elements;if(u)s=i/(a-i),o=a*i/(a-i);else if(l===nA)s=-(a+i)/(a-i),o=-2*a*i/(a-i);else if(l===nC)s=-a/(a-i),o=-a*i/(a-i);else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+l);return c[0]=2*i/(t-e),c[4]=0,c[8]=(t+e)/(t-e),c[12]=0,c[1]=0,c[5]=2*i/(n-r),c[9]=(n+r)/(n-r),c[13]=0,c[2]=0,c[6]=0,c[10]=s,c[14]=o,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,i,a){let s,o,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:nA,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=this.elements;if(u)s=1/(a-i),o=a/(a-i);else if(l===nA)s=-2/(a-i),o=-(a+i)/(a-i);else if(l===nC)s=-1/(a-i),o=-i/(a-i);else throw Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+l);return c[0]=2/(t-e),c[4]=0,c[8]=0,c[12]=-(t+e)/(t-e),c[1]=0,c[5]=2/(n-r),c[9]=0,c[13]=-(n+r)/(n-r),c[2]=0,c[6]=0,c[10]=s,c[14]=o,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}constructor(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m){rH.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m)}}let rV=new nX,rG=new rH,rW=new nX(0,0,0),rj=new nX(1,1,1),rX=new nX,rq=new nX,rY=new nX,rJ=new rH,rZ=new nj;class rK{get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._order;return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=e.elements,i=r[0],a=r[4],s=r[8],o=r[1],l=r[5],u=r[9],c=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(nk(s,-1,1)),.9999999>Math.abs(s)?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-nk(u,-1,1)),.9999999>Math.abs(u)?(this._y=Math.atan2(s,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(nk(h,-1,1)),.9999999>Math.abs(h)?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-nk(c,-1,1)),.9999999>Math.abs(c)?(this._x=Math.atan2(h,d),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(nk(o,-1,1)),.9999999>Math.abs(o)?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-nk(a,-1,1)),.9999999>Math.abs(a)?(this._x=Math.atan2(h,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return rJ.makeRotationFromQuaternion(e),this.setFromRotationMatrix(rJ,t,n)}setFromVector3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order;return this.set(e.x,e.y,e.z,t)}reorder(e){return rZ.setFromEuler(this),this.setFromQuaternion(rZ,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}constructor(e=0,t=0,n=0,r=rK.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}}rK.DEFAULT_ORDER="XYZ";class r${set(e){this.mask=1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:[];this[e]===t&&n.push(this);let r=this.children;for(let i=0,a=r.length;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),null!==this._colorsTexture&&(r.colorsTexture=this._colorsTexture.toJSON(e)),null!==this.boundingSphere&&(r.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(r.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),u.length>0&&(n.animations=u),c.length>0&&(n.nodes=c)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){is.subVectors(r,t),io.subVectors(n,t),il.subVectors(e,t);let a=is.dot(is),s=is.dot(io),o=is.dot(il),l=io.dot(io),u=io.dot(il),c=a*l-s*s;if(0===c)return i.set(0,0,0),null;let h=1/c,d=(l*o-s*u)*h,p=(a*u-s*o)*h;return i.set(1-d-p,p,d)}static containsPoint(e,t,n,r){return null!==this.getBarycoord(e,t,n,r,iu)&&iu.x>=0&&iu.y>=0&&iu.x+iu.y<=1}static getInterpolation(e,t,n,r,i,a,s,o){return null===this.getBarycoord(e,t,n,r,iu)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(i,iu.x),o.addScaledVector(a,iu.y),o.addScaledVector(s,iu.z),o)}static getInterpolatedAttribute(e,t,n,r,i,a){return iv.setScalar(0),iy.setScalar(0),i_.setScalar(0),iv.fromBufferAttribute(e,t),iy.fromBufferAttribute(e,n),i_.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(iv,i.x),a.addScaledVector(iy,i.y),a.addScaledVector(i_,i.z),a}static isFrontFacing(e,t,n,r){return is.subVectors(n,t),io.subVectors(e,t),0>is.cross(io).dot(r)}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return is.subVectors(this.c,this.b),io.subVectors(this.a,this.b),.5*is.cross(io).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ix.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ix.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,i){return ix.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return ix.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ix.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n,r,i=this.a,a=this.b,s=this.c;ic.subVectors(a,i),ih.subVectors(s,i),ip.subVectors(e,i);let o=ic.dot(ip),l=ih.dot(ip);if(o<=0&&l<=0)return t.copy(i);im.subVectors(e,a);let u=ic.dot(im),c=ih.dot(im);if(u>=0&&c<=u)return t.copy(a);let h=o*c-u*l;if(h<=0&&o>=0&&u<=0)return n=o/(o-u),t.copy(i).addScaledVector(ic,n);ig.subVectors(e,s);let d=ic.dot(ig),p=ih.dot(ig);if(p>=0&&d<=p)return t.copy(s);let f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return r=l/(l-p),t.copy(i).addScaledVector(ih,r);let m=u*p-d*c;if(m<=0&&c-u>=0&&d-p>=0)return id.subVectors(s,a),r=(c-u)/(c-u+(d-p)),t.copy(a).addScaledVector(id,r);let g=1/(m+f+h);return n=f*g,r=h*g,t.copy(i).addScaledVector(ic,n).addScaledVector(ih,r)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}constructor(e=new nX,t=new nX,n=new nX){this.a=e,this.b=t,this.c=n}}let ib={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},iS={h:0,s:0,l:0},iM={h:0,s:0,l:0};function iw(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*6*(2/3-n):e}class iE{set(e,t,n){return void 0===t&&void 0===n?e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e):this.setRGB(e,t,n),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t$;return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,n8.colorSpaceToWorking(this,t),this}setRGB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n8.workingColorSpace;return this.r=e,this.g=t,this.b=n,n8.colorSpaceToWorking(this,r),this}setHSL(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n8.workingColorSpace;if(e=nz(e,1),t=nk(t,0,1),n=nk(n,0,1),0===t)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=iw(i,r,e+1/3),this.g=iw(i,r,e),this.b=iw(i,r,e-1/3)}return n8.colorSpaceToWorking(this,r),this}setStyle(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t$;function r(t){void 0!==t&&1>parseFloat(t)&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}if(t=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=t[1],s=t[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,n);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,n);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(t=/^\#([A-Fa-f\d]+)$/.exec(e)){let r=t[1],i=r.length;if(3===i)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(6===i)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t$,n=ib[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=n9(e.r),this.g=n9(e.g),this.b=n9(e.b),this}copyLinearToSRGB(e){return this.r=n7(e.r),this.g=n7(e.g),this.b=n7(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t$;return n8.workingToColorSpace(iT.copy(this),e),65536*Math.round(nk(255*iT.r,0,255))+256*Math.round(nk(255*iT.g,0,255))+Math.round(nk(255*iT.b,0,255))}getHexString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t$;return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e){let t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n8.workingColorSpace;n8.workingToColorSpace(iT.copy(this),r);let i=iT.r,a=iT.g,s=iT.b,o=Math.max(i,a,s),l=Math.min(i,a,s),u=(l+o)/2;if(l===o)t=0,n=0;else{let e=o-l;switch(n=u<=.5?e/(o+l):e/(2-o-l),o){case i:t=(a-s)/e+6*(a1&&void 0!==arguments[1]?arguments[1]:n8.workingColorSpace;return n8.workingToColorSpace(iT.copy(this),t),e.r=iT.r,e.g=iT.g,e.b=iT.b,e}getStyle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t$;n8.workingToColorSpace(iT.copy(this),e);let t=iT.r,n=iT.g,r=iT.b;return e!==t$?"color(".concat(e," ").concat(t.toFixed(3)," ").concat(n.toFixed(3)," ").concat(r.toFixed(3),")"):"rgb(".concat(Math.round(255*t),",").concat(Math.round(255*n),",").concat(Math.round(255*r),")")}offsetHSL(e,t,n){return this.getHSL(iS),this.setHSL(iS.h+e,iS.s+t,iS.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(iS),e.getHSL(iM);let n=nB(iS.h,iM.h,t),r=nB(iS.s,iM.s,t),i=nB(iS.l,iM.l,t);return this.setHSL(n,r,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}}let iT=new iE;iE.NAMES=ib;let iA=0;class iC extends nL{get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(let t in e){let n=e[t];if(void 0===n){console.warn("THREE.Material: parameter '".concat(t,"' has value of undefined."));continue}let r=this[t];if(void 0===r){console.warn("THREE.Material: '".concat(t,"' is not a property of THREE.").concat(this.type,"."));continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),void 0!==this.dispersion&&(n.dispersion=this.dispersion),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==C&&(n.blending=this.blending),this.side!==w&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==V&&(n.blendSrc=this.blendSrc),this.blendDst!==G&&(n.blendDst=this.blendDst),this.blendEquation!==N&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==en&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==no&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==t3&&(n.stencilFail=this.stencilFail),this.stencilZFail!==t3&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==t3&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(null!==t){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:iA++}),this.uuid=nF(),this.name="",this.type="Material",this.blending=C,this.side=w,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=V,this.blendDst=G,this.blendEquation=N,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new iE(0,0,0),this.blendAlpha=0,this.depthFunc=en,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=no,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=t3,this.stencilZFail=t3,this.stencilZPass=t3,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}}class iR extends iC{copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new iE(0xffffff),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rK,this.combine=eo,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}}let iP=function(){let e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-27?(r[e]=0,r[256|e]=32768,i[e]=24,i[256|e]=24):t<-14?(r[e]=1024>>-t-14,r[256|e]=1024>>-t-14|32768,i[e]=-t-1,i[256|e]=-t-1):t<=15?(r[e]=t+15<<10,r[256|e]=t+15<<10|32768,i[e]=13,i[256|e]=13):t<128?(r[e]=31744,r[256|e]=64512,i[e]=24,i[256|e]=24):(r[e]=31744,r[256|e]=64512,i[e]=13,i[256|e]=13)}let a=new Uint32Array(2048),s=new Uint32Array(64),o=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;(8388608&t)==0;)t<<=1,n-=8388608;t&=-8388609,n+=0x38800000,a[e]=t|n}for(let e=1024;e<2048;++e)a[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=0x47800000,s[32]=0x80000000;for(let e=33;e<63;++e)s[e]=0x80000000+(e-32<<23);s[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(o[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:s,offsetTable:o}}();function iI(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=nk(e,-65504,65504),iP.floatView[0]=e;let t=iP.uint32View[0],n=t>>23&511;return iP.baseTable[n]+((8388607&t)>>iP.shiftTable[n])}function iL(e){let t=e>>10;return iP.uint32View[0]=iP.mantissaTable[iP.offsetTable[t]+(1023&e)]+iP.exponentTable[t],iP.floatView[0]}class iN{static toHalfFloat(e){return iI(e)}static fromHalfFloat(e){return iL(e)}}let iD=new nX,iU=new nW,iO=0;class iF{onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=nH(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=nV(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=nH(t,this.array)),t}setX(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=nH(t,this.array)),t}setY(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=nH(t,this.array)),t}setZ(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=nH(t,this.array)),t}setW(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array),r=nV(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array),r=nV(r,this.array),i=nV(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==ng&&(e.usage=this.usage),e}constructor(e,t,n=!1){if(Array.isArray(e))throw TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:iO++}),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=ng,this.updateRanges=[],this.gpuType=ej,this.version=0}}class ik extends iF{constructor(e,t,n){super(new Int8Array(e),t,n)}}class iz extends iF{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class iB extends iF{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class iH extends iF{constructor(e,t,n){super(new Int16Array(e),t,n)}}class iV extends iF{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class iG extends iF{constructor(e,t,n){super(new Int32Array(e),t,n)}}class iW extends iF{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class ij extends iF{getX(e){let t=iL(this.array[e*this.itemSize]);return this.normalized&&(t=nH(t,this.array)),t}setX(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize]=iI(t),this}getY(e){let t=iL(this.array[e*this.itemSize+1]);return this.normalized&&(t=nH(t,this.array)),t}setY(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+1]=iI(t),this}getZ(e){let t=iL(this.array[e*this.itemSize+2]);return this.normalized&&(t=nH(t,this.array)),t}setZ(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+2]=iI(t),this}getW(e){let t=iL(this.array[e*this.itemSize+3]);return this.normalized&&(t=nH(t,this.array)),t}setW(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+3]=iI(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array)),this.array[e+0]=iI(t),this.array[e+1]=iI(n),this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array),r=nV(r,this.array)),this.array[e+0]=iI(t),this.array[e+1]=iI(n),this.array[e+2]=iI(r),this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array),r=nV(r,this.array),i=nV(i,this.array)),this.array[e+0]=iI(t),this.array[e+1]=iI(n),this.array[e+2]=iI(r),this.array[e+3]=iI(i),this}constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}}class iX extends iF{constructor(e,t,n){super(new Float32Array(e),t,n)}}let iq=0,iY=new rH,iJ=new ia,iZ=new nX,iK=new rf,i$=new rf,iQ=new nX;class i0 extends nL{getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(nK(e)?iW:iV)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(void 0!==n){let t=new nJ().getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}let r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return iY.makeRotationFromQuaternion(e),this.applyMatrix4(iY),this}rotateX(e){return iY.makeRotationX(e),this.applyMatrix4(iY),this}rotateY(e){return iY.makeRotationY(e),this.applyMatrix4(iY),this}rotateZ(e){return iY.makeRotationZ(e),this.applyMatrix4(iY),this}translate(e,t,n){return iY.makeTranslation(e,t,n),this.applyMatrix4(iY),this}scale(e,t,n){return iY.makeScale(e,t,n),this.applyMatrix4(iY),this}lookAt(e){return iJ.lookAt(e),iJ.updateMatrix(),this.applyMatrix4(iJ.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(iZ).negate(),this.translate(iZ.x,iZ.y,iZ.z),this}setFromPoints(e){let t=this.getAttribute("position");if(void 0===t){let t=[];for(let n=0,r=e.length;nt.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new rf);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new nX(-1/0,-1/0,-1/0),new nX(Infinity,Infinity,Infinity));return}if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e0&&(e.userData=this.userData),void 0!==this.parameters){let t=this.parameters;for(let n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return null!==s&&(e.data.boundingSphere=s.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;null!==n&&this.setIndex(n.clone());let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2)||(i1.copy(i).invert(),i2.copy(e.ray).applyMatrix4(i1),(null===n.boundingBox||!1!==i2.intersectsBox(n.boundingBox))&&this._computeIntersections(e,t,i2))}_computeIntersections(e,t,n){let r,i=this.geometry,a=this.material,s=i.index,o=i.attributes.position,l=i.attributes.uv,u=i.attributes.uv1,c=i.attributes.normal,h=i.groups,d=i.drawRange;if(null!==s)if(Array.isArray(a))for(let i=0,o=h.length;in.far?null:{distance:l,point:at.clone(),object:e}}(e,t,n,r,i5,i6,i8,ae);if(c){let e=new nX;ix.getBarycoord(ae,i5,i6,i8,e),i&&(c.uv=ix.getInterpolatedAttribute(i,o,l,u,e,new nW)),a&&(c.uv1=ix.getInterpolatedAttribute(a,o,l,u,e,new nW)),s&&(c.normal=ix.getInterpolatedAttribute(s,o,l,u,e,new nX),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));let t={a:o,b:l,c:u,normal:new nX,materialIndex:0};ix.getNormal(i5,i6,i8,t.normal),c.face=t,c.barycoord=e}return c}class ai extends i0{copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ai(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};let s=this;r=Math.floor(r),i=Math.floor(i);let o=[],l=[],u=[],c=[],h=0,d=0;function p(e,t,n,r,i,a,p,f,m,g,v){let y=a/m,_=p/g,x=a/2,b=p/2,S=f/2,M=m+1,w=g+1,E=0,T=0,A=new nX;for(let a=0;a0?1:-1,u.push(A.x,A.y,A.z),c.push(o/m),c.push(1-a/g),E+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}}class ac extends ia{get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new rH,this.projectionMatrix=new rH,this.projectionMatrixInverse=new rH,this.coordinateSystem=nA,this._reversedDepth=!1}}let ah=new nX,ad=new nW,ap=new nW;class af extends ac{copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=2*nO*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(.5*nU*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*nO*Math.atan(Math.tan(.5*nU*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){ah.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ah.x,ah.y).multiplyScalar(-e/ah.z),ah.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ah.x,ah.y).multiplyScalar(-e/ah.z)}getViewSize(e,t){return this.getViewBounds(e,ad,ap),t.subVectors(ap,ad)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(.5*nU*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(null!==this.view&&this.view.enabled){let e=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/s,r*=a.width/e,n*=a.height/s}let s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}}class am extends ia{updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,s,o]=t;for(let e of t)this.remove(e);if(e===nA)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else if(e===nC)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1);else throw Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,s,o,l,u]=this.children,c=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,a),e.setRenderTarget(n,2,r),e.render(t,s),e.setRenderTarget(n,3,r),e.render(t,o),e.setRenderTarget(n,4,r),e.render(t,l),n.texture.generateMipmaps=f,e.setRenderTarget(n,5,r),e.render(t,u),e.setRenderTarget(c,h,d),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let r=new af(-90,1,e,t);r.layers=this.layers,this.add(r);let i=new af(-90,1,e,t);i.layers=this.layers,this.add(i);let a=new af(-90,1,e,t);a.layers=this.layers,this.add(a);let s=new af(-90,1,e,t);s.layers=this.layers,this.add(s);let o=new af(-90,1,e,t);o.layers=this.layers,this.add(o);let l=new af(-90,1,e,t);l.layers=this.layers,this.add(l)}}class ag extends rs{get images(){return this.image}set images(e){this.image=e}constructor(e=[],t=eb,n,r,i,a,s,o,l,u){super(e,t,n,r,i,a,s,o,l,u),this.isCubeTexture=!0,this.flipY=!1}}class av extends ru{fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n=new ai(5,5,5),r=new au({name:"CubemapFromEquirect",uniforms:aa({tEquirect:{value:null}}),vertexShader:"\n\n varying vec3 vWorldDirection;\n\n vec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n }\n\n void main() {\n\n vWorldDirection = transformDirection( position, modelMatrix );\n\n #include \n #include \n\n }\n ",fragmentShader:"\n\n uniform sampler2D tEquirect;\n\n varying vec3 vWorldDirection;\n\n #include \n\n void main() {\n\n vec3 direction = normalize( vWorldDirection );\n\n vec2 sampleUV = equirectUv( direction );\n\n gl_FragColor = texture2D( tEquirect, sampleUV );\n\n }\n ",side:E,blending:A});r.uniforms.tEquirect.value=t;let i=new an(n,r),a=t.minFilter;return t.minFilter===eF&&(t.minFilter=eD),new am(1,10,this).update(e,i),t.minFilter=a,i.geometry.dispose(),i.material.dispose(),this}clear(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=!(arguments.length>3)||void 0===arguments[3]||arguments[3],i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1};this.texture=new ag([n,n,n,n,n,n]),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}}class ay extends ia{constructor(){super(),this.isGroup=!0,this.type="Group"}}let a_={type:"move"};class ax{getHandSpace(){return null===this._hand&&(this._hand=new ay,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new ay,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new nX,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new nX),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new ay,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new nX,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new nX),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null,s=this._targetRay,o=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){for(let r of(a=!0,e.hand.values())){let e=t.getJointPose(r,n),i=this._getHandJoint(l,r);null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.matrixWorldNeedsUpdate=!0,i.jointRadius=e.radius),i.visible=null!==e}let r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position);l.inputState.pinching&&s>.025?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=.015&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&null!==(i=t.getPose(e.gripSpace,n))&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1);null!==s&&(null===(r=t.getPose(e.targetRaySpace,n))&&null!==i&&(r=i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(a_)))}return null!==s&&(s.visible=null!==r),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){let n=new ay;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}constructor(){this._targetRay=null,this._grip=null,this._hand=null}}class ab{clone(){return new ab(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new iE(e),this.density=t}}class aS{clone(){return new aS(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new iE(e),this.near=t,this.far=n}}class aM extends ia{copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new rK,this.environmentIntensity=1,this.environmentRotation=new rK,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}}class aw{onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=nF()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=nF()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=ng,this.updateRanges=[],this.version=0,this.uuid=nF()}}let aE=new nX;class aT{get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;te.far||t.push({distance:o,point:aC.clone(),uv:ix.getInterpolation(aC,aD,aU,aO,aF,ak,az,new nW),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}constructor(e=new aA){if(super(),this.isSprite=!0,this.type="Sprite",void 0===n){n=new i0;let e=new aw(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);n.setIndex([0,1,2,0,2,3]),n.setAttribute("position",new aT(e,3,0,!1)),n.setAttribute("uv",new aT(e,2,3,!1))}this.geometry=n,this.material=e,this.center=new nW(.5,.5),this.count=1}}function aH(e,t,n,r,i,a){aI.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(aL.x=a*aI.x-i*aI.y,aL.y=i*aI.x+a*aI.y):aL.copy(aI),e.copy(t),e.x+=aL.x,e.y+=aL.y,e.applyMatrix4(aN)}let aV=new nX,aG=new nX;class aW extends ia{copy(e){super.copy(e,!1);let t=e.levels;for(let e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n=Math.abs(n);let i=this.levels;for(t=0;t0){let n,r;for(n=1,r=t.length;n0){aV.setFromMatrixPosition(this.matrixWorld);let n=e.ray.origin.distanceTo(aV);this.getObjectForDistance(n).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){let n,r;aV.setFromMatrixPosition(e.matrixWorld),aG.setFromMatrixPosition(this.matrixWorld);let i=aV.distanceTo(aG)/e.zoom;for(n=1,t[0].object.visible=!0,r=t.length;n=e)t[n-1].object.visible=!1,t[n].object.visible=!0;else break}for(this._currentLevel=n-1;n1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||so.getNormalMatrix(e),r=this.coplanarPoint(sa).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}constructor(e=new nX(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}}let su=new rL,sc=new nW(.5,.5),sh=new nX;class sd{set(e,t,n,r,i,a){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nA,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.planes,i=e.elements,a=i[0],s=i[1],o=i[2],l=i[3],u=i[4],c=i[5],h=i[6],d=i[7],p=i[8],f=i[9],m=i[10],g=i[11],v=i[12],y=i[13],_=i[14],x=i[15];if(r[0].setComponents(l-a,d-u,g-p,x-v).normalize(),r[1].setComponents(l+a,d+u,g+p,x+v).normalize(),r[2].setComponents(l+s,d+c,g+f,x+y).normalize(),r[3].setComponents(l-s,d-c,g-f,x-y).normalize(),n)r[4].setComponents(o,h,m,_).normalize(),r[5].setComponents(l-o,d-h,g-m,x-_).normalize();else if(r[4].setComponents(l-o,d-h,g-m,x-_).normalize(),t===nA)r[5].setComponents(l+o,d+h,g+m,x+_).normalize();else if(t===nC)r[5].setComponents(o,h,m,_).normalize();else throw Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),su.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),su.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(su)}intersectsSprite(e){return su.center.set(0,0,0),su.radius=.7071067811865476+sc.distanceTo(e.center),su.applyMatrix4(e.matrixWorld),this.intersectsSphere(su)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)0?e.max.x:e.min.x,sh.y=r.normal.y>0?e.max.y:e.min.y,sh.z=r.normal.z>0?e.max.z:e.min.z,0>r.distanceToPoint(sh))return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(0>t[n].distanceToPoint(e))return!1;return!0}clone(){return new this.constructor().copy(this)}constructor(e=new sl,t=new sl,n=new sl,r=new sl,i=new sl,a=new sl){this.planes=[e,t,n,r,i,a]}}let sp=new rH,sf=new sd;class sm{intersectsObject(e,t){if(!t.isArrayCamera||0===t.cameras.length)return!1;for(let n=0;n=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});let s=i[this.index];a.push(s),this.index++,s.start=e,s.count=t,s.z=n,s.index=r}reset(){this.list.length=0,this.index=0}constructor(){this.index=0,this.pool=[],this.list=[]}},sR=new an,sP=[];function sI(e,t){if(e.constructor!==t.constructor){let n=Math.min(e.length,t.length);for(let r=0;r65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new iF(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){let t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(let n in t.attributes){if(!e.hasAttribute(n))throw Error('THREE.BatchedMesh: Added geometry missing "'.concat(n,'". All geometries must have consistent attributes.'));let r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.normalized)throw Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){let t=this._instanceInfo;if(e<0||e>=t.length||!1===t[e].active)throw Error("THREE.BatchedMesh: Invalid instanceId ".concat(e,". Instance is either out of range or has been deleted."))}validateGeometryId(e){let t=this._geometryInfo;if(e<0||e>=t.length||!1===t[e].active)throw Error("THREE.BatchedMesh: Invalid geometryId ".concat(e,". Geometry is either out of range or has been deleted."))}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new rf);let e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n=this.maxInstanceCount&&0===this._availableInstanceIds.length)throw Error("THREE.BatchedMesh: Maximum item count reached.");let t={visible:!0,active:!0,geometryIndex:e},n=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(sg),n=this._availableInstanceIds.shift(),this._instanceInfo[n]=t):(n=this._instanceInfo.length,this._instanceInfo.push(t));let r=this._matricesTexture;s_.identity().toArray(r.image.data,16*n),r.needsUpdate=!0;let i=this._colorsTexture;return i&&(sx.toArray(i.image.data,4*n),i.needsUpdate=!0),this._visibilityChanged=!0,n}addGeometry(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this._initializeGeometry(e),this._validateGeometry(e);let i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},a=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=-1===n?e.getAttribute("position").count:n;let s=e.getIndex();if(null!==s&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=-1===r?s.count:r),-1!==i.indexStart&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(sg),a[t=this._availableGeometryIds.shift()]=i):(t=this._geometryCount,this._geometryCount++,a.push(i)),this.setGeometryAt(t,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,t}setGeometryAt(e,t){if(e>=this._geometryCount)throw Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);let n=this.geometry,r=null!==n.getIndex(),i=n.getIndex(),a=t.getIndex(),s=this._geometryInfo[e];if(r&&a.count>s.reservedIndexCount||t.attributes.position.count>s.reservedVertexCount)throw Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");let o=s.vertexStart,l=s.reservedVertexCount;for(let e in s.vertexCount=t.getAttribute("position").count,n.attributes){let r=t.getAttribute(e),i=n.getAttribute(e);!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){let i=e.count;for(let a=0;a=t.length||!1===t[e].active)return this;let n=this._instanceInfo;for(let t=0,r=n.length;tt).sort((e,t)=>n[e].vertexStart-n[t].vertexStart),i=this.geometry;for(let a=0,s=n.length;a=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingBox){let e=new rf,t=n.index,i=n.attributes.position;for(let n=r.start,a=r.start+r.count;n=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingSphere){let t=new rL;this.getBoundingBoxAt(e,sM),sM.getCenter(t.center);let i=n.index,a=n.attributes.position,s=0;for(let e=r.start,n=r.start+r.count;e1&&void 0!==arguments[1]?arguments[1]:{};this.validateGeometryId(e);let n=this._geometryInfo[e];return t.vertexStart=n.vertexStart,t.vertexCount=n.vertexCount,t.reservedVertexCount=n.reservedVertexCount,t.indexStart=n.indexStart,t.indexCount=n.indexCount,t.reservedIndexCount=n.reservedIndexCount,t.start=n.start,t.count=n.count,t}setInstanceCount(e){let t=this._availableInstanceIds,n=this._instanceInfo;for(t.sort(sg);t[t.length-1]===n.length-1;)n.pop(),t.pop();if(ee.active);if(Math.max(...n.map(e=>e.vertexStart+e.reservedVertexCount))>e)throw Error("BatchedMesh: Geometry vertex values are being used outside the range ".concat(t,". Cannot shrink further."));if(this.geometry.index&&Math.max(...n.map(e=>e.indexStart+e.reservedIndexCount))>t)throw Error("BatchedMesh: Geometry index values are being used outside the range ".concat(t,". Cannot shrink further."));let r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new i0,this._initializeGeometry(r));let i=this.geometry;for(let e in r.index&&sI(r.index.array,i.index.array),r.attributes)sI(r.attributes[e].array,i.attributes[e].array)}raycast(e,t){let n=this._instanceInfo,r=this._geometryInfo,i=this.matrixWorld,a=this.geometry;sR.material=this.material,sR.geometry.index=a.index,sR.geometry.attributes=a.attributes,null===sR.geometry.boundingBox&&(sR.geometry.boundingBox=new rf),null===sR.geometry.boundingSphere&&(sR.geometry.boundingSphere=new rL);for(let a=0,s=n.length;a({...e,boundingBox:null!==e.boundingBox?e.boundingBox.clone():null,boundingSphere:null!==e.boundingSphere?e.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),null!==this._colorsTexture&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,null!==this._colorsTexture&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,r,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let a=r.getIndex(),s=null===a?1:a.array.BYTES_PER_ELEMENT,o=this._instanceInfo,l=this._multiDrawStarts,u=this._multiDrawCounts,c=this._geometryInfo,h=this.perObjectFrustumCulled,d=this._indirectTexture,p=d.image.data,f=n.isArrayCamera?sS:sb;h&&!n.isArrayCamera&&(s_.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),sb.setFromProjectionMatrix(s_,n.coordinateSystem,n.reversedDepth));let m=0;if(this.sortObjects){s_.copy(this.matrixWorld).invert(),sE.setFromMatrixPosition(n.matrixWorld).applyMatrix4(s_),sT.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(s_);for(let e=0,t=o.length;e0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;er)return;sz.applyMatrix4(e.matrixWorld);let l=t.ray.origin.distanceTo(sz);if(!(lt.far))return{distance:l,point:sB.clone().applyMatrix4(e.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:e}}let sG=new nX,sW=new nX;class sj extends sH{computeLineDistances(){let e=this.geometry;if(null===e.index){let t=e.attributes.position,n=[];for(let e=0,r=t.count;e0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;ei.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:s})}}class s0 extends rs{clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){0!==this._requestVideoFrameCallbackId&&this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),super.dispose()}constructor(e,t,n,r,i=eD,a=eD,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;let u=this;"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(function t(){u.needsUpdate=!0,u._requestVideoFrameCallbackId=e.requestVideoFrameCallback(t)}))}}class s1 extends s0{update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}constructor(e,t,n,r,i,a,s,o){super({},e,t,n,r,i,a,s,o),this.isVideoFrameTexture=!0}}class s2 extends rs{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=eR,this.minFilter=eR,this.generateMipmaps=!1,this.needsUpdate=!0}}class s3 extends rs{constructor(e,t,n,r,i,a,s,o,l,u,c,h){super(null,a,s,o,l,u,r,i,c,h),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class s4 extends s3{addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=eA,this.layerUpdates=new Set}}class s5 extends s3{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,eb),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class s6 extends rs{constructor(e,t,n,r,i,a,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class s8 extends rs{copy(e){return super.copy(e),this.source=new rn(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}constructor(e,t,n=eW,r,i,a,s=eR,o=eR,l,u=e1,c=1){if(u!==e1&&u!==e2)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super({width:e,height:t,depth:c},r,i,a,s,o,u,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}}class s9 extends rs{copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}}class s7 extends i0{copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new s7(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}constructor(e=1,t=1,n=4,r=8,i=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:r,heightSegments:i},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),r=Math.max(3,Math.floor(r));let a=[],s=[],o=[],l=[],u=t/2,c=Math.PI/2*e,h=t,d=2*c+h,p=2*n+(i=Math.max(1,Math.floor(i))),f=r+1,m=new nX,g=new nX;for(let v=0;v<=p;v++){let y=0,_=0,x=0,b=0;if(v<=n){let t=v/n,r=t*Math.PI/2;_=-u-e*Math.cos(r),x=e*Math.sin(r),b=-e*Math.cos(r),y=t*c}else if(v<=n+i){let r=(v-n)/i;_=-u+r*t,x=e,b=0,y=c+r*h}else{let t=(v-n-i)/n,r=t*Math.PI/2;_=u+e*Math.sin(r),x=e*Math.cos(r),b=e*Math.sin(r),y=c+h+t*c}let S=Math.max(0,Math.min(1,y/d)),M=0;0===v?M=.5/r:v===p&&(M=-.5/r);for(let e=0;e<=r;e++){let t=e/r,n=t*Math.PI*2,i=Math.sin(n),a=Math.cos(n);g.x=-x*a,g.y=_,g.z=x*i,s.push(g.x,g.y,g.z),m.set(-x*a,b,x*i),m.normalize(),o.push(m.x,m.y,m.z),l.push(t+M,S)}if(v>0){let e=(v-1)*f;for(let t=0;t0||0!==r)&&(u.push(a,s,l),y+=3),(t>0||r!==i-1)&&(u.push(s,o,l),y+=3)}l.addGroup(g,y,0),g+=y})(),!1===a&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(u),this.setAttribute("position",new iX(c,3)),this.setAttribute("normal",new iX(h,3)),this.setAttribute("uv",new iX(d,2))}}class on extends ot{static fromJSON(e){return new on(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}constructor(e=1,t=1,n=32,r=1,i=!1,a=0,s=2*Math.PI){super(0,e,t,n,r,i,a,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:s}}}class or extends i0{copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new or(e.vertices,e.indices,e.radius,e.details)}constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};let i=[],a=[];function s(e){i.push(e.x,e.y,e.z)}function o(t,n){let r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function l(e,t,n,r){r<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=r/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}(function(e){let n=new nX,r=new nX,i=new nX;for(let a=0;a.9&&s<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new iX(i,3)),this.setAttribute("normal",new iX(i.slice(),3)),this.setAttribute("uv",new iX(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}}class oi extends or{static fromJSON(e){return new oi(e.radius,e.detail)}constructor(e=1,t=0){let n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}}let oa=new nX,os=new nX,oo=new nX,ol=new ix;class ou extends i0{copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){let n=Math.cos(nU*t),r=e.getIndex(),i=e.getAttribute("position"),a=r?r.count:i.count,s=[0,0,0],o=["a","b","c"],l=[,,,],u={},c=[];for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:5,t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){let e=this.getLengths();return e[e.length-1]}getLengths(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.arcLengthDivisions;if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let t=[],n,r=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)t.push(i+=(n=this.getPoint(a/e)).distanceTo(r)),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getLengths(),i=0,a=r.length;t=n||e*r[a-1];let s=0,o=a-1,l;for(;s<=o;)if((l=r[i=Math.floor(s+(o-s)/2)]-t)<0)s=i+1;else if(l>0)o=i-1;else{o=i;break}if(r[i=o]===t)return i/(a-1);let u=r[i],c=r[i+1];return(i+(t-u)/(c-u))/(a-1)}getTangent(e,t){let n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);let i=this.getPoint(n),a=this.getPoint(r),s=t||(i.isVector2?new nW:new nX);return s.copy(a).sub(i).normalize(),s}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new nX,r=[],i=[],a=[],s=new nX,o=new rH;for(let t=0;t<=e;t++){let n=t/e;r[t]=this.getTangentAt(n,new nX)}i[0]=new nX,a[0]=new nX;let l=Number.MAX_VALUE,u=Math.abs(r[0].x),c=Math.abs(r[0].y),h=Math.abs(r[0].z);u<=l&&(l=u,n.set(1,0,0)),c<=l&&(l=c,n.set(0,1,0)),h<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),s.crossVectors(r[t-1],r[t]),s.length()>Number.EPSILON){s.normalize();let e=Math.acos(nk(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(o.makeRotationAxis(s,e))}a[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(nk(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(o.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}}class oh extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW,n=2*Math.PI,r=this.aEndAngle-this.aStartAngle,i=Math.abs(r)n;)r-=n;r1&&void 0!==arguments[1]?arguments[1]:new nX,i=this.points,a=i.length,s=(a-!this.closed)*e,o=Math.floor(s),l=s-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/a)+1)*a:0===l&&o===a-1&&(o=a-2,l=1),this.closed||o>0?t=i[(o-1)%a]:(of.subVectors(i[0],i[1]).add(i[0]),t=of);let u=i[o%a],c=i[(o+1)%a];if(this.closed||o+21&&void 0!==arguments[1]?arguments[1]:new nW,n=this.v0,r=this.v1,i=this.v2,a=this.v3;return t.set(ob(e,n.x,r.x,i.x,a.x),ob(e,n.y,r.y,i.y,a.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}constructor(e=new nW,t=new nW,n=new nW,r=new nW){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}}class oM extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nX,n=this.v0,r=this.v1,i=this.v2,a=this.v3;return t.set(ob(e,n.x,r.x,i.x,a.x),ob(e,n.y,r.y,i.y,a.y),ob(e,n.z,r.z,i.z,a.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}constructor(e=new nX,t=new nX,n=new nX,r=new nX){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}}class ow extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW;return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW;return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}constructor(e=new nW,t=new nW){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}}class oE extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nX;return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nX;return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}constructor(e=new nX,t=new nX){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}}class oT extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW,n=this.v0,r=this.v1,i=this.v2;return t.set(ox(e,n.x,r.x,i.x),ox(e,n.y,r.y,i.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}constructor(e=new nW,t=new nW,n=new nW){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}}class oA extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nX,n=this.v0,r=this.v1,i=this.v2;return t.set(ox(e,n.x,r.x,i.x),ox(e,n.y,r.y,i.y),ox(e,n.z,r.z,i.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}constructor(e=new nX,t=new nX,n=new nX){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}}class oC extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW,n=this.points,r=(n.length-1)*e,i=Math.floor(r),a=r-i,s=n[0===i?i:i-1],o=n[i],l=n[i>n.length-2?n.length-1:i+1],u=n[i>n.length-3?n.length-1:i+2];return t.set(o_(a,s.x,o.x,l.x,u.x),o_(a,s.y,o.y,l.y,u.y)),t}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){let e=r[i]-n,a=this.curves[i],s=a.getLength(),o=0===s?0:1-e/s;return a.getPointAt(o,t)}i++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,r=this.curves.length;n0&&void 0!==arguments[0]?arguments[0]:40,t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,n=[];for(let r=0,i=this.curves;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);let u=l.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}constructor(e){super(),this.type="Path",this.currentPoint=new nW,e&&this.setFromPoints(e)}}class oL extends oI{getPointsHoles(e){let t=[];for(let n=0,r=this.holes.length;n0)for(let i=t;i=t;i-=r)a=oX(i/r|0,e[i],e[i+1],a);return a&&oB(a,a.next)&&(oq(a),a=a.next),a}function oD(e,t){if(!e)return e;t||(t=e);let n=e,r;do if(r=!1,!n.steiner&&(oB(n,n.next)||0===oz(n.prev,n,n.next))){if(oq(n),(n=t=n.prev)===n.next)break;r=!0}else n=n.next;while(r||n!==t)return t}function oU(e,t){let n=e.x-t.x;return 0===n&&0==(n=e.y-t.y)&&(n=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),n}function oO(e,t,n,r,i){return(e=((e=((e=((e=((e=(e-n)*i|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-r)*i|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function oF(e,t,n,r,i,a,s,o){return(i-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(r-o)>=(n-s)*(t-o)&&(n-s)*(a-o)>=(i-s)*(r-o)}function ok(e,t,n,r,i,a,s,o){return(e!==s||t!==o)&&oF(e,t,n,r,i,a,s,o)}function oz(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function oB(e,t){return e.x===t.x&&e.y===t.y}function oH(e,t,n,r){let i=oG(oz(e,t,n)),a=oG(oz(e,t,r)),s=oG(oz(n,r,e)),o=oG(oz(n,r,t));return!!(i!==a&&s!==o||0===i&&oV(e,n,t)||0===a&&oV(e,r,t)||0===s&&oV(n,e,r)||0===o&&oV(n,t,r))}function oV(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function oG(e){return e>0?1:e<0?-1:0}function oW(e,t){return 0>oz(e.prev,e,e.next)?oz(e,t,e.next)>=0&&oz(e,e.prev,t)>=0:0>oz(e,t,e.prev)||0>oz(e,e.next,t)}function oj(e,t){let n=oY(e.i,e.x,e.y),r=oY(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function oX(e,t,n,r){let i=oY(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function oq(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function oY(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class oJ{static triangulate(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return function(e,t){let n,r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,s=t&&t.length,o=s?t[0]*a:e.length,l=oN(e,0,o,a,!0),u=[];if(!l||l.next===l.prev)return u;if(s&&(l=function(e,t,n,r){let i=[];for(let n=0,a=t.length;n=r.next.y&&r.next.y!==r.y){let e=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>s&&(s=e,n=r.x=r.x&&r.x>=l&&i!==r.x&&oF(an.x||r.x===n.x&&(h=n,d=r,0>oz(h.prev,h,d.prev)&&0>oz(d.next,h,h.next))))&&(n=r,c=t)}r=r.next}while(r!==o)return n}(e,t);if(!n)return t;let r=oj(n,e);return oD(r,r.next),oD(n,n.next)}(i[e],n);return n}(e,t,l,a)),e.length>80*a){n=1/0,r=1/0;let t=-1/0,s=-1/0;for(let i=a;it&&(t=a),o>s&&(s=o)}i=0!==(i=Math.max(t-n,s-r))?32767/i:0}return function e(t,n,r,i,a,s,o){if(!t)return;!o&&s&&function(e,t,n,r){let i=e;do 0===i.z&&(i.z=oO(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e)i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n=1;do{let r,i=e;e=null;let a=null;for(t=0;i;){t++;let s=i,o=0;for(let e=0;e0||l>0&&s;)0!==o&&(0===l||!s||i.z<=s.z)?(r=i,i=i.nextZ,o--):(r=s,s=s.nextZ,l--),a?a.nextZ=r:e=r,r.prevZ=a,a=r;i=s}a.nextZ=null,n*=2}while(t>1)}(i)}(t,i,a,s);let l=t;for(;t.prev!==t.next;){let u=t.prev,c=t.next;if(s?function(e,t,n,r){let i=e.prev,a=e.next;if(oz(i,e,a)>=0)return!1;let s=i.x,o=e.x,l=a.x,u=i.y,c=e.y,h=a.y,d=Math.min(s,o,l),p=Math.min(u,c,h),f=Math.max(s,o,l),m=Math.max(u,c,h),g=oO(d,p,t,n,r),v=oO(f,m,t,n,r),y=e.prevZ,_=e.nextZ;for(;y&&y.z>=g&&_&&_.z<=v;){if(y.x>=d&&y.x<=f&&y.y>=p&&y.y<=m&&y!==i&&y!==a&&ok(s,u,o,c,l,h,y.x,y.y)&&oz(y.prev,y,y.next)>=0||(y=y.prevZ,_.x>=d&&_.x<=f&&_.y>=p&&_.y<=m&&_!==i&&_!==a&&ok(s,u,o,c,l,h,_.x,_.y)&&oz(_.prev,_,_.next)>=0))return!1;_=_.nextZ}for(;y&&y.z>=g;){if(y.x>=d&&y.x<=f&&y.y>=p&&y.y<=m&&y!==i&&y!==a&&ok(s,u,o,c,l,h,y.x,y.y)&&oz(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;_&&_.z<=v;){if(_.x>=d&&_.x<=f&&_.y>=p&&_.y<=m&&_!==i&&_!==a&&ok(s,u,o,c,l,h,_.x,_.y)&&oz(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}(t,i,a,s):function(e){let t=e.prev,n=e.next;if(oz(t,e,n)>=0)return!1;let r=t.x,i=e.x,a=n.x,s=t.y,o=e.y,l=n.y,u=Math.min(r,i,a),c=Math.min(s,o,l),h=Math.max(r,i,a),d=Math.max(s,o,l),p=n.next;for(;p!==t;){if(p.x>=u&&p.x<=h&&p.y>=c&&p.y<=d&&ok(r,s,i,o,a,l,p.x,p.y)&&oz(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}(t)){n.push(u.i,t.i,c.i),oq(t),t=c.next,l=c.next;continue}if((t=c)===l){o?1===o?e(t=function(e,t){let n=e;do{let r=n.prev,i=n.next.next;!oB(r,i)&&oH(r,n,n.next,i)&&oW(r,i)&&oW(i,r)&&(t.push(r.i,n.i,i.i),oq(n),oq(n.next),n=e=i),n=n.next}while(n!==e)return oD(n)}(oD(t),n),n,r,i,a,s,2):2===o&&function(t,n,r,i,a,s){let o=t;do{let t=o.next.next;for(;t!==o.prev;){var l,u;if(o.i!==t.i&&(l=o,u=t,l.next.i!==u.i&&l.prev.i!==u.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&oH(n,n.next,e,t))return!0;n=n.next}while(n!==e)return!1}(l,u)&&(oW(l,u)&&oW(u,l)&&function(e,t){let n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e)return r}(l,u)&&(oz(l.prev,l,u.prev)||oz(l,u.prev,u))||oB(l,u)&&oz(l.prev,l,l.next)>0&&oz(u.prev,u,u.next)>0))){let l=oj(o,t);o=oD(o,o.next),l=oD(l,l.next),e(o,n,r,i,a,s,0),e(l,n,r,i,a,s,0);return}t=t.next}o=o.next}while(o!==t)}(t,n,r,i,a,s):e(oD(t),n,r,i,a,s,1);break}}}(l,u,a,n,r,i,0),u}(e,t,n)}}class oZ{static area(e){let t=e.length,n=0;for(let r=t-1,i=0;ioZ.area(e)}static triangulateShape(e,t){let n=[],r=[],i=[];oK(e),o$(n,e);let a=e.length;t.forEach(oK);for(let e=0;e2&&e[t-1].equals(e[0])&&e.pop()}function o$(e,t){for(let n=0;nNumber.EPSILON){let h=Math.sqrt(c),d=Math.sqrt(l*l+u*u),p=t.x-o/h,f=t.y+s/h,m=((n.x-u/d-p)*u-(n.y+l/d-f)*l)/(s*u-o*l),g=(r=p+s*m-e.x)*r+(i=f+o*m-e.y)*i;if(g<=2)return new nW(r,i);a=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(u)&&(e=!0),e?(r=-o,i=s,a=Math.sqrt(c)):(r=s,i=o,a=Math.sqrt(c/2))}return new nW(r/a,i/a)}let L=[];for(let e=0,t=C.length,n=t-1,r=e+1;e=0;e--){let t=e/y,n=m*Math.cos(t*Math.PI/2),r=g*Math.sin(t*Math.PI/2)+v;for(let e=0,t=C.length;e=0;){let a=i,s=i-1;s<0&&(s=e.length-1);for(let e=0,i=d+2*y;e0)&&d.push(t,i,l),(e!==n-1||o0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new nW(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return nk(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new iE(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new iE(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new iE(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}}class lu extends iC{copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new iE(0xffffff),this.specular=new iE(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new iE(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rK,this.combine=eo,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}}class lc extends iC{copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new iE(0xffffff),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new iE(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}}class lh extends iC{copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}}class ld extends iC{copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new iE(0xffffff),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new iE(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rK,this.combine=eo,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}}class lp extends iC{copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=tj,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}}class lf extends iC{copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}}class lm extends iC{copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new iE(0xffffff),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}}class lg extends sN{copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}}function lv(e,t){return e&&e.constructor!==t?"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e):e}function ly(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function l_(e){let t=e.length,n=Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort(function(t,n){return e[t]-e[n]}),n}function lx(e,t,n){let r=e.length,i=new e.constructor(r);for(let a=0,s=0;s!==r;++a){let r=n[a]*t;for(let n=0;n!==t;++n)i[s++]=e[r+n]}return i}function lb(e,t,n,r){let i=1,a=e[0];for(;void 0!==a&&void 0===a[r];)a=e[i++];if(void 0===a)return;let s=a[r];if(void 0!==s)if(Array.isArray(s))do void 0!==(s=a[r])&&(t.push(a.time),n.push(...s)),a=e[i++];while(void 0!==a)else if(void 0!==s.toArray)do void 0!==(s=a[r])&&(t.push(a.time),s.toArray(n,n.length)),a=e[i++];while(void 0!==a)else do void 0!==(s=a[r])&&(t.push(a.time),n.push(s)),a=e[i++];while(void 0!==a)}class lS{static convertArray(e,t){return lv(e,t)}static isTypedArray(e){return ly(e)}static getKeyframeOrder(e){return l_(e)}static sortedArray(e,t,n){return lx(e,t,n)}static flattenJSON(e,t,n,r){lb(e,t,n,r)}static subclip(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30;return function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30,a=e.clone();a.name=t;let s=[];for(let e=0;e=r)){l.push(t.times[e]);for(let n=0;na.tracks[e].times[0]&&(o=a.tracks[e].times[0]);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;r<=0&&(r=30);let i=n.tracks.length,a=t/r;for(let t=0;t=i.times[d]){let e=d*u+l,t=e+u-l;r=i.values.slice(e,t)}else{let e=i.createInterpolant(),t=l,n=u-l;e.evaluate(a),r=e.resultBuffer.slice(t,n)}"quaternion"===s&&new nj().fromArray(r).normalize().conjugate().toArray(r);let p=o.times.length;for(let e=0;e=i)){let s=t[1];e=(i=t[--n-1]))break r}a=n,n=0;break i}break n}for(;n>>1;et;)--a;if(++a,0!==i||a!==r){i>=a&&(i=(a=Math.max(a,1))-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==a&&a>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,a),e=!1;break}a=r}if(void 0!==r&&ly(r))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===tO,i=e.length-1,a=1;for(let s=1;s0){e[a]=e[i];for(let e=i*n,r=a*n,s=0;s!==n;++s)t[r+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=new this.constructor(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}constructor(e,t,n,r){if(void 0===e)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=lv(t,this.TimeBufferType),this.values=lv(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}}lA.prototype.ValueTypeName="",lA.prototype.TimeBufferType=Float32Array,lA.prototype.ValueBufferType=Float32Array,lA.prototype.DefaultInterpolation=tU;class lC extends lA{constructor(e,t,n){super(e,t,n)}}lC.prototype.ValueTypeName="bool",lC.prototype.ValueBufferType=Array,lC.prototype.DefaultInterpolation=tD,lC.prototype.InterpolantFactoryMethodLinear=void 0,lC.prototype.InterpolantFactoryMethodSmooth=void 0;class lR extends lA{constructor(e,t,n,r){super(e,t,n,r)}}lR.prototype.ValueTypeName="color";class lP extends lA{constructor(e,t,n,r){super(e,t,n,r)}}lP.prototype.ValueTypeName="number";class lI extends lM{interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(n-t)/(r-t),l=e*s;for(let e=l+s;l!==e;l+=4)nj.slerpFlat(i,0,a,l-s,a,l,o);return i}constructor(e,t,n,r){super(e,t,n,r)}}class lL extends lA{InterpolantFactoryMethodLinear(e){return new lI(this.times,this.values,this.getValueSize(),e)}constructor(e,t,n,r){super(e,t,n,r)}}lL.prototype.ValueTypeName="quaternion",lL.prototype.InterpolantFactoryMethodSmooth=void 0;class lN extends lA{constructor(e,t,n){super(e,t,n)}}lN.prototype.ValueTypeName="string",lN.prototype.ValueBufferType=Array,lN.prototype.DefaultInterpolation=tD,lN.prototype.InterpolantFactoryMethodLinear=void 0,lN.prototype.InterpolantFactoryMethodSmooth=void 0;class lD extends lA{constructor(e,t,n,r){super(e,t,n,r)}}lD.prototype.ValueTypeName="vector";class lU{static parse(e){let t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push((function(e){if(void 0===e.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");let t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return lP;case"vector":case"vector2":case"vector3":case"vector4":return lD;case"color":return lR;case"quaternion":return lL;case"bool":case"boolean":return lC;case"string":return lN}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){let t=[],n=[];lb(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)})(n[e]).scale(r));let i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i.userData=JSON.parse(e.userData||"{}"),i}static toJSON(e){let t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let e=0,r=n.length;e!==r;++e)t.push(lA.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){let i=t.length,a=[];for(let e=0;e1){let e=a[1],t=r[e];t||(r[e]=t=[]),t.push(n)}}let a=[];for(let e in r)a.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return a}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let n=function(e,t,n,r,i){if(0!==n.length){let a=[],s=[];lb(n,a,s,r),0!==a.length&&i.push(new e(t,a,s))}},r=[],i=e.name||"default",a=e.fps||30,s=e.blendMode,o=e.length||-1,l=e.hierarchy||[];for(let e=0;e{t&&t(i),this.manager.itemEnd(e)},0),i;if(void 0!==lB[e])return void lB[e].push({onLoad:t,onProgress:n,onError:r});lB[e]=[],lB[e].push({onLoad:t,onProgress:n,onError:r});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:"function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),s=this.mimeType,o=this.responseType;fetch(a).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;let n=lB[e],r=t.body.getReader(),i=t.headers.get("X-File-Size")||t.headers.get("Content-Length"),a=i?parseInt(i):0,s=0!==a,o=0;return new Response(new ReadableStream({start(e){!function t(){r.read().then(r=>{let{done:i,value:l}=r;if(i)e.close();else{let r=new ProgressEvent("progress",{lengthComputable:s,loaded:o+=l.byteLength,total:a});for(let e=0,t=n.length;e{e.error(t)})}()}}))}throw new lH('fetch for "'.concat(t.url,'" responded with ').concat(t.status,": ").concat(t.statusText),t)}).then(e=>{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>new DOMParser().parseFromString(e,s));case"json":return e.json();default:if(""===s)return e.text();{let t=/charset="?([^;"\s]*)"?/i.exec(s),n=new TextDecoder(t&&t[1]?t[1].toLowerCase():void 0);return e.arrayBuffer().then(e=>n.decode(e))}}}).then(t=>{lO.add("file:".concat(e),t);let n=lB[e];delete lB[e];for(let e=0,r=n.length;e{let n=lB[e];if(void 0===n)throw this.manager.itemError(e),t;delete lB[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}}class lG extends lz{load(e,t,n,r){let i=this,a=new lV(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t=[];for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:0,n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),l5.setFromMatrixPosition(e.matrixWorld),n.position.copy(l5),l6.copy(n.position),l6.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(l6),n.updateMatrixWorld(),r.makeTranslation(-l5.x,-l5.y,-l5.z),l4.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(l4,n.coordinateSystem,n.reversedDepth)}constructor(){super(new af(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new nW(4,2),this._viewportCount=6,this._viewports=[new ro(2,1,1,1),new ro(0,1,1,1),new ro(3,1,1,1),new ro(1,1,1,1),new ro(3,0,1,1),new ro(1,0,1,1)],this._cubeDirections=[new nX(1,0,0),new nX(-1,0,0),new nX(0,0,1),new nX(0,0,-1),new nX(0,1,0),new nX(0,-1,0)],this._cubeUps=[new nX(0,1,0),new nX(0,1,0),new nX(0,1,0),new nX(0,1,0),new nX(0,0,1),new nX(0,0,-1)]}}class l9 extends lZ{get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new l8}}class l7 extends ac{copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,a=n+e,s=r+t,o=r-t;if(null!==this.view&&this.view.enabled){let e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,s,o,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}}class ue extends l1{constructor(){super(new l7(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class ut extends lZ{dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ia.DEFAULT_UP),this.updateMatrix(),this.target=new ia,this.shadow=new ue}}class un extends lZ{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class ur extends lZ{get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){let t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}}class ui{set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){let n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*r),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*r*1.092548),t.addScaledVector(a[5],r*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],n*i*1.092548),t.addScaledVector(a[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){let n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*r),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*r),t.addScaledVector(a[5],.858086*r*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*n*i),t.addScaledVector(a[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){let n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new nX)}}class ua extends lZ{copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){let t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}constructor(e=new ui,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}}class us extends lz{load(e,t,n,r){let i=this,a=new lV(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}let r=this.createMaterialFromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=new iE().setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.dispersion&&(r.dispersion=e.dispersion),void 0!==e.iridescence&&(r.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(r.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.anisotropy&&(r.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(r.anisotropyRotation=e.anisotropyRotation),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.alphaHash&&(r.alphaHash=e.alphaHash),void 0!==e.depthFunc&&(r.depthFunc=e.depthFunc),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.blendSrc&&(r.blendSrc=e.blendSrc),void 0!==e.blendDst&&(r.blendDst=e.blendDst),void 0!==e.blendEquation&&(r.blendEquation=e.blendEquation),void 0!==e.blendSrcAlpha&&(r.blendSrcAlpha=e.blendSrcAlpha),void 0!==e.blendDstAlpha&&(r.blendDstAlpha=e.blendDstAlpha),void 0!==e.blendEquationAlpha&&(r.blendEquationAlpha=e.blendEquationAlpha),void 0!==e.blendColor&&void 0!==r.blendColor&&r.blendColor.setHex(e.blendColor),void 0!==e.blendAlpha&&(r.blendAlpha=e.blendAlpha),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),void 0!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(r.forceSinglePass=e.forceSinglePass),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(let t in e.uniforms){let i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case"t":r.uniforms[t].value=n(i.value);break;case"c":r.uniforms[t].value=new iE().setHex(i.value);break;case"v2":r.uniforms[t].value=new nW().fromArray(i.value);break;case"v3":r.uniforms[t].value=new nX().fromArray(i.value);break;case"v4":r.uniforms[t].value=new ro().fromArray(i.value);break;case"m3":r.uniforms[t].value=new nJ().fromArray(i.value);break;case"m4":r.uniforms[t].value=new rH().fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(let t in e.extensions)r.extensions[t]=e.extensions[t];if(void 0!==e.lights&&(r.lights=e.lights),void 0!==e.clipping&&(r.clipping=e.clipping),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=new nW().fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapRotation&&r.envMapRotation.fromArray(e.envMapRotation),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=new nW().fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.anisotropyMap&&(r.anisotropyMap=n(e.anisotropyMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return us.createMaterialFromType(e)}static createMaterialFromType(e){return new({ShadowMaterial:la,SpriteMaterial:aA,RawShaderMaterial:ls,ShaderMaterial:au,PointsMaterial:sq,MeshPhysicalMaterial:ll,MeshStandardMaterial:lo,MeshPhongMaterial:lu,MeshToonMaterial:lc,MeshNormalMaterial:lh,MeshLambertMaterial:ld,MeshDepthMaterial:lp,MeshDistanceMaterial:lf,MeshBasicMaterial:iR,MeshMatcapMaterial:lm,LineDashedMaterial:lg,LineBasicMaterial:sN,Material:iC})[e]}constructor(e){super(e),this.textures={}}}class uo{static extractUrlBase(e){let t=e.lastIndexOf("/");return -1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e))?e:t+e}}class ul extends i0{copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}}class uu extends lz{load(e,t,n,r){let i=this,a=new lV(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t={},n={};function r(e,r){if(void 0!==t[r])return t[r];let i=e.interleavedBuffers[r],a=function(e,t){if(void 0!==n[t])return n[t];let r=new Uint32Array(e.arrayBuffers[t]).buffer;return n[t]=r,r}(e,i.buffer),s=new aw(nQ(i.type,a),i.stride);return s.uuid=i.uuid,t[r]=s,s}let i=e.isInstancedBufferGeometry?new ul:new i0,a=e.data.index;if(void 0!==a){let e=nQ(a.type,a.array);i.setIndex(new iF(e,1))}let s=e.data.attributes;for(let t in s){let n,a=s[t];if(a.isInterleavedBufferAttribute)n=new aT(r(e.data,a.data),a.itemSize,a.offset,a.normalized);else{let e=nQ(a.type,a.array);n=new(a.isInstancedBufferAttribute?a6:iF)(e,a.itemSize,a.normalized)}void 0!==a.name&&(n.name=a.name),void 0!==a.usage&&n.setUsage(a.usage),i.setAttribute(t,n)}let o=e.data.morphAttributes;if(o)for(let t in o){let n=o[t],a=[];for(let t=0,i=n.length;t0){(n=new lX(new lF(t))).setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t0){(t=new lX(this.manager)).setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t{let t=null,n=null;return void 0!==e.boundingBox&&(t=new rf().fromJSON(e.boundingBox)),void 0!==e.boundingSphere&&(n=new rL().fromJSON(e.boundingSphere)),{...e,boundingBox:t,boundingSphere:n}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=c(e.matricesTexture.uuid),a._indirectTexture=c(e.indirectTexture.uuid),void 0!==e.colorsTexture&&(a._colorsTexture=c(e.colorsTexture.uuid)),void 0!==e.boundingSphere&&(a.boundingSphere=new rL().fromJSON(e.boundingSphere)),void 0!==e.boundingBox&&(a.boundingBox=new rf().fromJSON(e.boundingBox));break;case"LOD":a=new aW;break;case"Line":a=new sH(l(e.geometry),u(e.material));break;case"LineLoop":a=new sX(l(e.geometry),u(e.material));break;case"LineSegments":a=new sj(l(e.geometry),u(e.material));break;case"PointCloud":case"Points":a=new s$(l(e.geometry),u(e.material));break;case"Sprite":a=new aB(u(e.material));break;case"Group":a=new ay;break;case"Bone":a=new a1;break;default:a=new ia}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(a.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.up&&a.up.fromArray(e.up),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.intensity&&(a.shadow.intensity=e.shadow.intensity),void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(a.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.frustumCulled&&(a.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(a.renderOrder=e.renderOrder),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.layers&&(a.layers.mask=e.layers),void 0!==e.children){let s=e.children;for(let e=0;e{if(!0!==uf.has(a))return t&&t(n),i.manager.itemEnd(e),n;r&&r(uf.get(a)),i.manager.itemError(e),i.manager.itemEnd(e)}):(setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0),a);let s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,s.signal="function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;let o=fetch(e,s).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))}).then(function(n){return lO.add("image-bitmap:".concat(e),n),t&&t(n),i.manager.itemEnd(e),n}).catch(function(t){r&&r(t),uf.set(o,t),lO.remove("image-bitmap:".concat(e)),i.manager.itemError(e),i.manager.itemEnd(e)});lO.add("image-bitmap:".concat(e),o),i.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}}class ug{static getContext(){return void 0===r&&(r=new(window.AudioContext||window.webkitAudioContext)),r}static setContext(e){r=e}}class uv extends lz{load(e,t,n,r){let i=this,a=new lV(this.manager);function s(t){r?r(t):console.error(t),i.manager.itemError(e)}a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(e){try{let n=e.slice(0);ug.getContext().decodeAudioData(n,function(e){t(e)}).catch(s)}catch(e){s(e)}},n,r)}constructor(e){super(e)}}let uy=new rH,u_=new rH,ux=new rH;class ub{update(e){let t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){let n,r;t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,ux.copy(e.projectionMatrix);let i=t.eyeSep/2,a=i*t.near/t.focus,s=t.near*Math.tan(nU*t.fov*.5)/t.zoom;u_.elements[12]=-i,uy.elements[12]=i,n=-s*t.aspect+a,r=s*t.aspect+a,ux.elements[0]=2*t.near/(r-n),ux.elements[8]=(r+n)/(r-n),this.cameraL.projectionMatrix.copy(ux),n=-s*t.aspect-a,r=s*t.aspect-a,ux.elements[0]=2*t.near/(r-n),ux.elements[8]=(r+n)/(r-n),this.cameraR.projectionMatrix.copy(ux)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(u_),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(uy)}constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new af,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new af,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}}class uS extends af{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class uM{start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}}let uw=new nX,uE=new nj,uT=new nX,uA=new nX,uC=new nX;class uR extends ia{getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);let t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(uw,uE,uT),uA.set(0,0,-1).applyQuaternion(uE),uC.set(0,1,0).applyQuaternion(uE),t.positionX){let e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(uw.x,e),t.positionY.linearRampToValueAtTime(uw.y,e),t.positionZ.linearRampToValueAtTime(uw.z,e),t.forwardX.linearRampToValueAtTime(uA.x,e),t.forwardY.linearRampToValueAtTime(uA.y,e),t.forwardZ.linearRampToValueAtTime(uA.z,e),t.upX.linearRampToValueAtTime(uC.x,e),t.upY.linearRampToValueAtTime(uC.y,e),t.upZ.linearRampToValueAtTime(uC.z,e)}else t.setPosition(uw.x,uw.y,uw.z),t.setOrientation(uA.x,uA.y,uA.z,uC.x,uC.y,uC.z)}constructor(){super(),this.type="AudioListener",this.context=ug.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new uM}}class uP extends ia{getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this)}stop(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this._progress=0,null!==this.source&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this)}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){s.setValue(n,r);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n;e!==r;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){nj.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){let a=this._workIndex*i;nj.multiplyQuaternionsFlat(e,a,e,t,e,n),nj.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){let a=1-r;for(let s=0;s!==i;++s){let i=t+s;e[i]=e[i]*a+e[n+s]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){let i=t+a;e[i]=e[i]+e[n+a]*r}}constructor(e,t,n){let r,i,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}}let uk="\\[\\]\\.:\\/",uz=RegExp("["+uk+"]","g"),uB="[^"+uk+"]",uH="[^"+uk.replace("\\.","")+"]",uV=/((?:WC+[\/:])*)/.source.replace("WC",uB),uG=/(WCOD+)?/.source.replace("WCOD",uH),uW=RegExp("^"+uV+uG+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uB)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uB)+"$"),uj=["material","materials","bones","map"];class uX{static create(e,t,n){return e&&e.isAnimationObjectGroup?new uX.Composite(e,t,n):new uX(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(uz,"")}static parseTrackName(e){let t=uW.exec(e);if(null===t)throw Error("PropertyBinding: Cannot parse trackName: "+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){let e=n.nodeName.substring(r+1);-1!==uj.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){let n=function(e){for(let r=0;r=i){let a=i++,u=e[a];t[u.uuid]=l,e[l]=u,t[o]=a,e[a]=s;for(let e=0;e!==r;++e){let t=n[e],r=t[a],i=t[l];t[l]=r,t[a]=i}}}this.nCachedObjects_=i}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,a=e.length;for(let s=0,o=arguments.length;s!==o;++s){let o=arguments[s],l=o.uuid,u=t[l];if(void 0!==u)if(delete t[l],u0&&(t[s.uuid]=u),e[u]=s,e.pop();for(let e=0;e!==r;++e){let t=n[e];t[u]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){let n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(void 0!==r)return i[r];let a=this._paths,s=this._parsedPaths,o=this._objects,l=o.length,u=this.nCachedObjects_,c=Array(l);r=i.length,n[e]=r,a.push(e),s.push(t),i.push(c);for(let n=u,r=o.length;n!==r;++n){let r=o[n];c[n]=new uX(r,e,t)}return c}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){let r=this._paths,i=this._parsedPaths,a=this._bindings,s=a.length-1,o=a[s];t[e[s]]=n,a[n]=o,a.pop(),i[n]=i[s],i.pop(),r[n]=r[s],r.pop()}}constructor(){this.isAnimationObjectGroup=!0,this.uuid=nF(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;let e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};let t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}}class uY{play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.fadeOut(t),this.fadeIn(t),!0===n){let n=this._clip.duration,r=e._clip.duration;e.warp(1,r/n,t),this.warp(n/r,1,t)}return this}crossFadeTo(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let r=this._mixer,i=r.time,a=this.timeScale,s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);let o=s.parameterPositions,l=s.sampleValues;return o[0]=i,o[1]=i+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){let e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);let i=this._startTime;if(null!==i){let r=(e-i)*n;r<0||0===n?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);let a=this._updateTime(t),s=this._updateWeight(e);if(s>0){let e=this._interpolants,t=this._propertyBindings;if(this.blendMode===tH)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(s);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(null!==n){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,r=this.time+e,i=this._loopCount,a=n===tN;if(0===e)return -1===i?r:a&&(1&i)==1?t-r:r;if(n===tI){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));s:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break s}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),r>=t||r<0){let n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);let s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){let t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(a&&(1&i)==1)return t-r}return r}_setEndings(e,t,n){let r=this._interpolantSettings;n?(r.endingStart=tk,r.endingEnd=tk):(e?r.endingStart=this.zeroSlopeAtStart?tk:tF:r.endingStart=tz,t?r.endingEnd=this.zeroSlopeAtEnd?tk:tF:r.endingEnd=tz)}_scheduleFading(e,t,n){let r=this._mixer,i=r.time,a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);let s=a.parameterPositions,o=a.sampleValues;return s[0]=i,o[0]=t,s[1]=i+e,o[1]=n,this}constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;let i=t.tracks,a=i.length,s=Array(a),o={endingStart:tF,endingEnd:tF};for(let e=0;e!==a;++e){let t=i[e].createInterpolant(null);s[e]=t,t.settings=o}this._interpolantSettings=o,this._interpolants=s,this._propertyBindings=Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=tL,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}}let uJ=new Float32Array(1);class uZ extends nL{_bindAction(e,t){let n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,s=e._interpolants,o=n.uuid,l=this._bindingsByRootAndName,u=l[o];void 0===u&&(u={},l[o]=u);for(let e=0;e!==i;++e){let i=r[e],l=i.name,c=u[l];if(void 0!==c)++c.referenceCount,a[e]=c;else{if(void 0!==(c=a[e])){null===c._cacheIndex&&(++c.referenceCount,this._addInactiveBinding(c,o,l));continue}let r=t&&t._propertyBindings[e].binding.parsedPath;c=new uF(uX.create(n,l,r),i.ValueTypeName,i.getValueSize()),++c.referenceCount,this._addInactiveBinding(c,o,l),a[e]=c}s[e].resultBuffer=c.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){let t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return null!==t&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1;for(let s=0;s!==n;++s)t[s]._update(r,e,i,a);let s=this._bindings,o=this._nActiveBindings;for(let e=0;e!==o;++e)s[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e1)||void 0===arguments[1]||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return u6(e,this,n,t),n.sort(u5),n}intersectObjects(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let r=0,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,r){let i=this.elements;return i[0]=e,i[2]=t,i[1]=n,i[3]=r,this}constructor(e,t,n,r){ct.prototype.isMatrix2=!0,this.elements=[1,0,0,1],void 0!==e&&this.set(e,t,n,r)}}let cn=new nW;class cr{set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,cn).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}constructor(e=new nW(Infinity,Infinity),t=new nW(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}}let ci=new nX,ca=new nX,cs=new nX,co=new nX,cl=new nX,cu=new nX,cc=new nX;class ch{set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){ci.subVectors(e,this.start),ca.subVectors(this.end,this.start);let n=ca.dot(ca),r=ca.dot(ci)/n;return t&&(r=nk(r,0,1)),r}closestPointToPoint(e,t,n){let r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}distanceSqToLine3(e){let t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cu,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cc,a=1e-8*1e-8,s=this.start,o=e.start,l=this.end,u=e.end;cs.subVectors(l,s),co.subVectors(u,o),cl.subVectors(s,o);let c=cs.dot(cs),h=co.dot(co),d=co.dot(cl);if(c<=a&&h<=a)return r.copy(s),i.copy(o),r.sub(i),r.dot(r);if(c<=a)t=0,n=nk(n=d/h,0,1);else{let e=cs.dot(cl);if(h<=a)n=0,t=nk(-e/c,0,1);else{let r=cs.dot(co),i=c*h-r*r;t=0!==i?nk((r*d-e*h)/i,0,1):0,(n=(r*t+d)/h)<0?(n=0,t=nk(-e/c,0,1)):n>1&&(n=1,t=nk((r-e)/c,0,1))}}return r.copy(s).add(cs.multiplyScalar(t)),i.copy(o).add(co.multiplyScalar(n)),r.sub(i),r.dot(r)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}constructor(e=new nX,t=new nX){this.start=e,this.end=t}}let cd=new nX;class cp extends ia{dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);let e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),cd.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(cd),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";let n=new i0,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1;e<32;e++,t++){let n=e/32*Math.PI*2,i=t/32*Math.PI*2;r.push(Math.cos(n),Math.sin(n),1,Math.cos(i),Math.sin(i),1)}n.setAttribute("position",new iX(r,3));let i=new sN({fog:!1,toneMapped:!1});this.cone=new sj(n,i),this.add(this.cone),this.update()}}let cf=new nX,cm=new rH,cg=new rH;class cv extends sj{updateMatrixWorld(e){let t=this.bones,n=this.geometry,r=n.getAttribute("position");cg.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e1)for(let n=0;n.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{cF.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(cF,t)}}setLength(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.2*e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.2*t;this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}constructor(e=new nX(0,0,1),t=new nX(0,0,0),n=1,r=0xffff00,s=.2*n,o=.2*s){super(),this.type="ArrowHelper",void 0===i&&((i=new i0).setAttribute("position",new iX([0,0,0,0,1,0],3)),(a=new on(.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new sH(i,new sN({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new an(a,new iR({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,s,o)}}class cz extends sj{setColors(e,t,n){let r=new iE,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}constructor(e=1){let t=new i0;t.setAttribute("position",new iX([0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],3)),t.setAttribute("color",new iX([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(t,new sN({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}}class cB{moveTo(e,t){return this.currentPath=new oI,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){let t,n,r,i,a,s=oZ.isClockWise,o=this.subPaths;if(0===o.length)return[];let l=[];if(1===o.length)return n=o[0],(r=new oL).curves=n.curves,l.push(r),l;let u=!s(o[0].getPoints());u=e?!u:u;let c=[],h=[],d=[],p=0;h[0]=void 0,d[p]=[];for(let r=0,a=o.length;r1){let e=!1,t=0;for(let e=0,t=h.length;eNumber.EPSILON){if(l<0&&(n=t[a],o=-o,s=t[i],l=-l),e.ys.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{let t=l*(e.x-n.x)-o*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return r})(a.p,h[r].p)&&(n!==r&&t++,s?(s=!1,c[r].push(a)):e=!0);s&&c[n].push(a)}}t>0&&!1===e&&(d=c)}for(let e=0,t=h.length;et?(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e}static cover(e,t){let n=e.image&&e.image.width?e.image.width/e.image.height:1;return n>t?(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e}static fill(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e}static getByteLength(e,t,n,r){return cV(e,t,n,r)}}function cW(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function cj(e){let t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);let r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))},update:function(n,r){if(n.isInterleavedBufferAttribute&&(n=n.data),n.isGLBufferAttribute){let e=t.get(n);(!e||e.versione.start-t.start);let t=0;for(let e=1;eha,"ShaderChunk",()=>cX,"ShaderLib",()=>cY,"UniformsLib",()=>cq,"WebGLRenderer",()=>d2,"WebGLUtils",()=>dJ],8560);let cX={alphahash_fragment:"#ifdef USE_ALPHAHASH\n if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n const float ALPHA_HASH_SCALE = 0.05;\n float hash2D( vec2 value ) {\n return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n }\n float hash3D( vec3 value ) {\n return hash2D( vec2( hash2D( value.xy ), value.z ) );\n }\n float getAlphaHashThreshold( vec3 position ) {\n float maxDeriv = max(\n length( dFdx( position.xyz ) ),\n length( dFdy( position.xyz ) )\n );\n float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n vec2 pixScales = vec2(\n exp2( floor( log2( pixScale ) ) ),\n exp2( ceil( log2( pixScale ) ) )\n );\n vec2 alpha = vec2(\n hash3D( floor( pixScales.x * position.xyz ) ),\n hash3D( floor( pixScales.y * position.xyz ) )\n );\n float lerpFactor = fract( log2( pixScale ) );\n float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n float a = min( lerpFactor, 1.0 - lerpFactor );\n vec3 cases = vec3(\n x * x / ( 2.0 * a * ( 1.0 - a ) ),\n ( x - 0.5 * a ) / ( 1.0 - a ),\n 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n );\n float threshold = ( x < ( 1.0 - a ) )\n ? ( ( x < a ) ? cases.x : cases.y )\n : cases.z;\n return clamp( threshold , 1.0e-6, 1.0 );\n }\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n #ifdef ALPHA_TO_COVERAGE\n diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n if ( diffuseColor.a < alphaTest ) discard;\n #endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n uniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n #if defined( USE_CLEARCOAT ) \n clearcoatSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_SHEEN ) \n sheenSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n #endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n #if ! defined( GL_ANGLE_multi_draw )\n #define gl_DrawID _gl_DrawID\n uniform int _gl_DrawID;\n #endif\n uniform highp sampler2D batchingTexture;\n uniform highp usampler2D batchingIdTexture;\n mat4 getBatchingMatrix( const in float i ) {\n int size = textureSize( batchingTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n float getIndirectIndex( const in int i ) {\n int size = textureSize( batchingIdTexture, 0 ).x;\n int x = i % size;\n int y = i / size;\n return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n }\n#endif\n#ifdef USE_BATCHING_COLOR\n uniform sampler2D batchingColorTexture;\n vec3 getBatchingColor( const in float i ) {\n int size = textureSize( batchingColorTexture, 0 ).x;\n int j = int( i );\n int x = j % size;\n int y = j / size;\n return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n }\n#endif",batching_vertex:"#ifdef USE_BATCHING\n mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n vPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n return 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( specularColor, 1.0, dotVH );\n float G = G_BlinnPhong_Implicit( );\n float D = D_BlinnPhong( shininess, dotNH );\n return F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n const mat3 XYZ_TO_REC709 = mat3(\n 3.2404542, -0.9692660, 0.0556434,\n -1.5371385, 1.8760108, -0.2040259,\n -0.4985314, 0.0415560, 1.0572252\n );\n vec3 Fresnel0ToIor( vec3 fresnel0 ) {\n vec3 sqrtF0 = sqrt( fresnel0 );\n return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n }\n vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n }\n float IorToFresnel0( float transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n }\n vec3 evalSensitivity( float OPD, vec3 shift ) {\n float phase = 2.0 * PI * OPD * 1.0e-9;\n vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n xyz /= 1.0685e-7;\n vec3 rgb = XYZ_TO_REC709 * xyz;\n return rgb;\n }\n vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n vec3 I;\n float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n float cosTheta2Sq = 1.0 - sinTheta2Sq;\n if ( cosTheta2Sq < 0.0 ) {\n return vec3( 1.0 );\n }\n float cosTheta2 = sqrt( cosTheta2Sq );\n float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n float R12 = F_Schlick( R0, 1.0, cosTheta1 );\n float T121 = 1.0 - R12;\n float phi12 = 0.0;\n if ( iridescenceIOR < outsideIOR ) phi12 = PI;\n float phi21 = PI - phi12;\n vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n vec3 phi23 = vec3( 0.0 );\n if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n vec3 phi = vec3( phi21 ) + phi23;\n vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n vec3 r123 = sqrt( R123 );\n vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n vec3 C0 = R12 + Rs;\n I = C0;\n vec3 Cm = Rs - T121;\n for ( int m = 1; m <= 2; ++ m ) {\n Cm *= r123;\n vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n I += Cm * Sm;\n }\n return max( I, vec3( 0.0 ) );\n }\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n uniform sampler2D bumpMap;\n uniform float bumpScale;\n vec2 dHdxy_fwd() {\n vec2 dSTdx = dFdx( vBumpMapUv );\n vec2 dSTdy = dFdy( vBumpMapUv );\n float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n return vec2( dBx, dBy );\n }\n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n vec3 vN = surf_norm;\n vec3 R1 = cross( vSigmaY, vN );\n vec3 R2 = cross( vN, vSigmaX );\n float fDet = dot( vSigmaX, R1 ) * faceDirection;\n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n return normalize( abs( fDet ) * surf_norm - vGrad );\n }\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n vec4 plane;\n #ifdef ALPHA_TO_COVERAGE\n float distanceToPlane, distanceGradient;\n float clipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n if ( clipOpacity == 0.0 ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n float unionClipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n }\n #pragma unroll_loop_end\n clipOpacity *= 1.0 - unionClipOpacity;\n #endif\n diffuseColor.a *= clipOpacity;\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n #endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#elif defined( USE_COLOR )\n diffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR )\n varying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n varying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n vColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n vColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n vColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n vColor.xyz *= batchingColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n varying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n mat3 tmp;\n tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n return tmp;\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n uv.x += filterInt * 3.0 * cubeUV_minTileSize;\n uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n uv.x *= CUBEUV_TEXEL_WIDTH;\n uv.y *= CUBEUV_TEXEL_HEIGHT;\n #ifdef texture2DGradEXT\n return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n #else\n return texture2D( envMap, uv ).rgb;\n #endif\n }\n #define cubeUV_r0 1.0\n #define cubeUV_m0 - 2.0\n #define cubeUV_r1 0.8\n #define cubeUV_m1 - 1.0\n #define cubeUV_r4 0.4\n #define cubeUV_m4 2.0\n #define cubeUV_r5 0.305\n #define cubeUV_m5 3.0\n #define cubeUV_r6 0.21\n #define cubeUV_m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= cubeUV_r1 ) {\n mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n } else if ( roughness >= cubeUV_r4 ) {\n mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n } else if ( roughness >= cubeUV_r5 ) {\n mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n } else if ( roughness >= cubeUV_r6 ) {\n mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n vec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n mat3 bm = mat3( batchingMatrix );\n transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n transformedNormal = bm * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = bm * transformedTangent;\n #endif\n#endif\n#ifdef USE_INSTANCING\n mat3 im = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n transformedNormal = im * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = im * transformedTangent;\n #endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n #ifdef FLIP_SIDED\n transformedTangent = - transformedTangent;\n #endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n emissiveColor = sRGBTransferEOTF( emissiveColor );\n #endif\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearTransferOETF( in vec4 value ) {\n return value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n #else\n vec4 envColor = vec4( 0.0 );\n #endif\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform float flipEnvMap;\n uniform mat3 envMapRotation;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n \n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n vec3 getIBLIrradiance( const in vec3 normal ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n return PI * envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n return envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n #ifdef USE_ANISOTROPY\n vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 bentNormal = cross( bitangent, viewDir );\n bentNormal = normalize( cross( bentNormal, bitangent ) );\n bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n return getIBLRadiance( viewDir, bentNormal, roughness );\n #else\n return vec3( 0.0 );\n #endif\n }\n #endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif",fog_vertex:"#ifdef USE_FOG\n vFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float vFogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return vec3( texture2D( gradientMap, coord ).r );\n #else\n vec2 fw = fwidth( coord ) * 0.5;\n return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n #endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n vec3 diffuseColor;\n float specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Lambert\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n uniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n return irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if ( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n return smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n light.color = directionalLight.color;\n light.direction = directionalLight.direction;\n light.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = pointLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float lightDistance = length( lVector );\n light.color = pointLight.color;\n light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n }\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = spotLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float angleCos = dot( light.direction, spotLight.direction );\n float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n if ( spotAttenuation > 0.0 ) {\n float lightDistance = length( lVector );\n light.color = spotLight.color * spotAttenuation;\n light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n } else {\n light.color = vec3( 0.0 );\n light.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n float dotNL = dot( normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n }\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n material.ior = ior;\n #ifdef USE_SPECULAR\n float specularIntensityFactor = specularIntensity;\n vec3 specularColorFactor = specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n #endif\n material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n #else\n float specularIntensityFactor = 1.0;\n vec3 specularColorFactor = vec3( 1.0 );\n material.specularF90 = 1.0;\n #endif\n material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n material.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n material.clearcoat = clearcoat;\n material.clearcoatRoughness = clearcoatRoughness;\n material.clearcoatF0 = vec3( 0.04 );\n material.clearcoatF90 = 1.0;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n material.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n material.iridescence = iridescence;\n material.iridescenceIOR = iridescenceIOR;\n #ifdef USE_IRIDESCENCEMAP\n material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n #endif\n #ifdef USE_IRIDESCENCE_THICKNESSMAP\n material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n #else\n material.iridescenceThickness = iridescenceThicknessMaximum;\n #endif\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheenColor;\n #ifdef USE_SHEEN_COLORMAP\n material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n #endif\n material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n #ifdef USE_SHEEN_ROUGHNESSMAP\n material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n #ifdef USE_ANISOTROPYMAP\n mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n #else\n vec2 anisotropyV = anisotropyVector;\n #endif\n material.anisotropy = length( anisotropyV );\n if( material.anisotropy == 0.0 ) {\n anisotropyV = vec2( 1.0, 0.0 );\n } else {\n anisotropyV /= material.anisotropy;\n material.anisotropy = saturate( material.anisotropy );\n }\n material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n vec3 diffuseColor;\n float roughness;\n vec3 specularColor;\n float specularF90;\n float dispersion;\n #ifdef USE_CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n vec3 clearcoatF0;\n float clearcoatF90;\n #endif\n #ifdef USE_IRIDESCENCE\n float iridescence;\n float iridescenceIOR;\n float iridescenceThickness;\n vec3 iridescenceFresnel;\n vec3 iridescenceF0;\n #endif\n #ifdef USE_SHEEN\n vec3 sheenColor;\n float sheenRoughness;\n #endif\n #ifdef IOR\n float ior;\n #endif\n #ifdef USE_TRANSMISSION\n float transmission;\n float transmissionAlpha;\n float thickness;\n float attenuationDistance;\n vec3 attenuationColor;\n #endif\n #ifdef USE_ANISOTROPY\n float anisotropy;\n float alphaT;\n vec3 anisotropyT;\n vec3 anisotropyB;\n #endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n float v = 0.5 / ( gv + gl );\n return saturate(v);\n }\n float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n float a2 = alphaT * alphaB;\n highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n highp float v2 = dot( v, v );\n float w2 = a2 / v2;\n return RECIPROCAL_PI * a2 * pow2 ( w2 );\n }\n#endif\n#ifdef USE_CLEARCOAT\n vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n vec3 f0 = material.clearcoatF0;\n float f90 = material.clearcoatF90;\n float roughness = material.clearcoatRoughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( V * D );\n }\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n vec3 f0 = material.specularColor;\n float f90 = material.specularF90;\n float roughness = material.roughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n #ifdef USE_IRIDESCENCE\n F = mix( F, material.iridescenceFresnel, material.iridescence );\n #endif\n #ifdef USE_ANISOTROPY\n float dotTL = dot( material.anisotropyT, lightDir );\n float dotTV = dot( material.anisotropyT, viewDir );\n float dotTH = dot( material.anisotropyT, halfDir );\n float dotBL = dot( material.anisotropyB, lightDir );\n float dotBV = dot( material.anisotropyB, viewDir );\n float dotBH = dot( material.anisotropyB, halfDir );\n float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n #else\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n #endif\n return F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n float alpha = pow2( roughness );\n float invAlpha = 1.0 / alpha;\n float cos2h = dotNH * dotNH;\n float sin2h = max( 1.0 - cos2h, 0.0078125 );\n return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float D = D_Charlie( sheenRoughness, dotNH );\n float V = V_Neubelt( dotNV, dotNL );\n return sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n float r2 = roughness * roughness;\n float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n return saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n return specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n #ifdef USE_IRIDESCENCE\n vec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n #else\n vec3 Fr = specularColor;\n #endif\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 normal = geometryNormal;\n vec3 viewDir = geometryViewDir;\n vec3 position = geometryPosition;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.roughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n }\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifdef USE_CLEARCOAT\n float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = dotNLcc * directLight.color;\n clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n #endif\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n #ifdef USE_CLEARCOAT\n clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n #endif\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n #ifdef USE_IRIDESCENCE\n computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n #else\n computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n #endif\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n float dotNVi = saturate( dot( normal, geometryViewDir ) );\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n if ( material.iridescence > 0.0 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n #if defined( USE_LIGHT_PROBES )\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n #endif\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n iblIrradiance += getIBLIrradiance( geometryNormal );\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n #ifdef USE_ANISOTROPY\n radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n #else\n radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n #endif\n #ifdef USE_CLEARCOAT\n clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n #endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n vec4 sampledDiffuseColor = texture2D( map, vMapUv );\n #ifdef DECODE_VIDEO_TEXTURE\n sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n #endif\n diffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n uniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n #if defined( USE_POINTS_UV )\n vec2 uv = vUv;\n #else\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n #endif\n#endif\n#ifdef USE_MAP\n diffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n varying vec2 vUv;\n#else\n #if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n #endif\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n metalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n }\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS )\n vColor *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n #if defined( USE_COLOR_ALPHA )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n #elif defined( USE_COLOR )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n #endif\n }\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n #ifndef USE_INSTANCING_MORPH\n uniform float morphTargetBaseInfluence;\n uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n #endif\n uniform sampler2DArray morphTargetsTexture;\n uniform ivec2 morphTargetsTextureSize;\n vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n int y = texelIndex / morphTargetsTextureSize.x;\n int x = texelIndex - y * morphTargetsTextureSize.x;\n ivec3 morphUV = ivec3( x, y, morphTargetIndex );\n return texelFetch( morphTargetsTexture, morphUV, 0 );\n }\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal *= faceDirection;\n #endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n #ifdef USE_TANGENT\n mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn = getTangentFrame( - vViewPosition, normal,\n #if defined( USE_NORMALMAP )\n vNormalMapUv\n #elif defined( USE_CLEARCOAT_NORMALMAP )\n vClearcoatNormalMapUv\n #else\n vUv\n #endif\n );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn[0] *= faceDirection;\n tbn[1] *= faceDirection;\n #endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n #ifdef USE_TANGENT\n mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn2[0] *= faceDirection;\n tbn2[1] *= faceDirection;\n #endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n return mat3( T * scale, B * scale, N );\n }\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n vec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n clearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n uniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n if( v <= 0.0 )\n return vec4( 0., 0., 0., 0. );\n if( v >= 1.0 )\n return vec4( 1., 1., 1., 1. );\n float vuf;\n float af = modf( v * PackFactors.a, vuf );\n float bf = modf( vuf * ShiftRight8, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n if( v <= 0.0 )\n return vec3( 0., 0., 0. );\n if( v >= 1.0 )\n return vec3( 1., 1., 1. );\n float vuf;\n float bf = modf( v * PackFactors.b, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n if( v <= 0.0 )\n return vec2( 0., 0. );\n if( v >= 1.0 )\n return vec2( 1., 1. );\n float vuf;\n float gf = modf( v * 256., vuf );\n return vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n return dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n mvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n roughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n float depth = unpackRGBAToDepth( texture2D( depths, uv ) );\n #ifdef USE_REVERSED_DEPTH_BUFFER\n return step( depth, compare );\n #else\n return step( compare, depth );\n #endif\n }\n vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n return unpackRGBATo2Half( texture2D( shadow, uv ) );\n }\n float VSMShadow( sampler2D shadow, vec2 uv, float compare ) {\n float occlusion = 1.0;\n vec2 distribution = texture2DDistribution( shadow, uv );\n #ifdef USE_REVERSED_DEPTH_BUFFER\n float hard_shadow = step( distribution.x, compare );\n #else\n float hard_shadow = step( compare, distribution.x );\n #endif\n if ( hard_shadow != 1.0 ) {\n float distance = compare - distribution.x;\n float variance = max( 0.00000, distribution.y * distribution.y );\n float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n }\n return occlusion;\n }\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n #if defined( SHADOWMAP_TYPE_PCF )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx0 = - texelSize.x * shadowRadius;\n float dy0 = - texelSize.y * shadowRadius;\n float dx1 = + texelSize.x * shadowRadius;\n float dy1 = + texelSize.y * shadowRadius;\n float dx2 = dx0 / 2.0;\n float dy2 = dy0 / 2.0;\n float dx3 = dx1 / 2.0;\n float dy3 = dy1 / 2.0;\n shadow = (\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n ) * ( 1.0 / 17.0 );\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx = texelSize.x;\n float dy = texelSize.y;\n vec2 uv = shadowCoord.xy;\n vec2 f = fract( uv * shadowMapSize + 0.5 );\n uv -= f * texelSize;\n shadow = (\n texture2DCompare( shadowMap, uv, shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n f.x ),\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n f.x ),\n f.y )\n ) * ( 1.0 / 9.0 );\n #elif defined( SHADOWMAP_TYPE_VSM )\n shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n #else\n shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n vec2 cubeToUV( vec3 v, float texelSizeY ) {\n vec3 absV = abs( v );\n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n absV *= scaleToCube;\n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n vec2 planar = v.xy;\n float almostATexel = 1.5 * texelSizeY;\n float almostOne = 1.0 - almostATexel;\n if ( absV.z >= almostOne ) {\n if ( v.z > 0.0 )\n planar.x = 4.0 - v.x;\n } else if ( absV.x >= almostOne ) {\n float signX = sign( v.x );\n planar.x = v.z * signX + 2.0 * signX;\n } else if ( absV.y >= almostOne ) {\n float signY = sign( v.y );\n planar.x = v.x + 2.0 * signY + 2.0;\n planar.y = v.z * signY - 2.0;\n }\n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n }\n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n float shadow = 1.0;\n vec3 lightToPosition = shadowCoord.xyz;\n \n float lightToPositionLength = length( lightToPosition );\n if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n shadow = (\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n ) * ( 1.0 / 9.0 );\n #else\n shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n vec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n shadowWorldPosition = worldPosition;\n #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n #endif\n vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n uniform highp sampler2D boneTexture;\n mat4 getBoneMatrix( const in float i ) {\n int size = textureSize( boneTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n return saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n vec3( 1.6605, - 0.1246, - 0.0182 ),\n vec3( - 0.5876, 1.1329, - 0.1006 ),\n vec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n vec3( 0.6274, 0.0691, 0.0164 ),\n vec3( 0.3293, 0.9195, 0.0880 ),\n vec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n vec3 x2 = x * x;\n vec3 x4 = x2 * x2;\n return + 15.5 * x4 * x2\n - 40.14 * x4 * x\n + 31.96 * x4\n - 6.868 * x2 * x\n + 0.4298 * x2\n + 0.1191 * x\n - 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n const mat3 AgXInsetMatrix = mat3(\n vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n );\n const mat3 AgXOutsetMatrix = mat3(\n vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n );\n const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;\n color *= toneMappingExposure;\n color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n color = AgXInsetMatrix * color;\n color = max( color, 1e-10 ); color = log2( color );\n color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n color = clamp( color, 0.0, 1.0 );\n color = agxDefaultContrastApprox( color );\n color = AgXOutsetMatrix * color;\n color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n color = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n color = clamp( color, 0.0, 1.0 );\n return color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n const float StartCompression = 0.8 - 0.04;\n const float Desaturation = 0.15;\n color *= toneMappingExposure;\n float x = min( color.r, min( color.g, color.b ) );\n float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n color -= offset;\n float peak = max( color.r, max( color.g, color.b ) );\n if ( peak < StartCompression ) return color;\n float d = 1. - StartCompression;\n float newPeak = 1. - d * d / ( peak + d - StartCompression );\n color *= newPeak / peak;\n float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n return mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n material.transmission = transmission;\n material.transmissionAlpha = 1.0;\n material.thickness = thickness;\n material.attenuationDistance = attenuationDistance;\n material.attenuationColor = attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n #endif\n #ifdef USE_THICKNESSMAP\n material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n #endif\n vec3 pos = vWorldPosition;\n vec3 v = normalize( cameraPosition - pos );\n vec3 n = inverseTransformDirection( normal, viewMatrix );\n vec4 transmitted = getIBLVolumeRefraction(\n n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n material.attenuationColor, material.attenuationDistance );\n material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform float attenuationDistance;\n uniform vec3 attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec3 vWorldPosition;\n float w0( float a ) {\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n }\n float w1( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n }\n float w2( float a ){\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n }\n float w3( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * a );\n }\n float g0( float a ) {\n return w0( a ) + w1( a );\n }\n float g1( float a ) {\n return w2( a ) + w3( a );\n }\n float h0( float a ) {\n return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n }\n float h1( float a ) {\n return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n }\n vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n uv = uv * texelSize.zw + 0.5;\n vec2 iuv = floor( uv );\n vec2 fuv = fract( uv );\n float g0x = g0( fuv.x );\n float g1x = g1( fuv.x );\n float h0x = h0( fuv.x );\n float h1x = h1( fuv.x );\n float h0y = h0( fuv.y );\n float h1y = h1( fuv.y );\n vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n }\n vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n vec2 fLodSizeInv = 1.0 / fLodSize;\n vec2 cLodSizeInv = 1.0 / cLodSize;\n vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n return mix( fSample, cSample, fract( lod ) );\n }\n vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n vec3 modelScale;\n modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n return normalize( refractionVector ) * thickness * modelScale;\n }\n float applyIorToRoughness( const in float roughness, const in float ior ) {\n return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n }\n vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n }\n vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n if ( isinf( attenuationDistance ) ) {\n return vec3( 1.0 );\n } else {\n vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;\n }\n }\n vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n const in vec3 attenuationColor, const in float attenuationDistance ) {\n vec4 transmittedLight;\n vec3 transmittance;\n #ifdef USE_DISPERSION\n float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n for ( int i = 0; i < 3; i ++ ) {\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n transmittedLight[ i ] = transmissionSample[ i ];\n transmittedLight.a += transmissionSample.a;\n transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n }\n transmittedLight.a /= 3.0;\n #else\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n #endif\n vec3 attenuatedColor = transmittance * transmittedLight.rgb;\n vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n }\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n uniform mat3 mapTransform;\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n uniform mat3 alphaMapTransform;\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n uniform mat3 lightMapTransform;\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n uniform mat3 aoMapTransform;\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n uniform mat3 bumpMapTransform;\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n uniform mat3 normalMapTransform;\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n uniform mat3 displacementMapTransform;\n varying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n uniform mat3 emissiveMapTransform;\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n uniform mat3 metalnessMapTransform;\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n uniform mat3 roughnessMapTransform;\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n uniform mat3 anisotropyMapTransform;\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n uniform mat3 clearcoatMapTransform;\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform mat3 clearcoatNormalMapTransform;\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform mat3 clearcoatRoughnessMapTransform;\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n uniform mat3 sheenColorMapTransform;\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n uniform mat3 sheenRoughnessMapTransform;\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n uniform mat3 iridescenceMapTransform;\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform mat3 iridescenceThicknessMapTransform;\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n uniform mat3 specularMapTransform;\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n uniform mat3 specularColorMapTransform;\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n uniform mat3 specularIntensityMapTransform;\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n vUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_BATCHING\n worldPosition = batchingMatrix * worldPosition;\n #endif\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n #ifdef DECODE_VIDEO_TEXTURE\n texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include \n #include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n gl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n uniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n #ifdef ENVMAP_TYPE_CUBE\n vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n #else\n vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include \n #include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n gl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n gl_FragColor = texColor;\n gl_FragColor.a *= opacity;\n #include \n #include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include \n #include \n #include \n #include \n #ifdef USE_DISPLACEMENTMAP\n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n vec4 diffuseColor = vec4( 1.0 );\n #include \n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include \n #include \n #include \n #include \n #include \n #ifdef USE_REVERSED_DEPTH_BUFFER\n float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n #else\n float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n #endif\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #elif DEPTH_PACKING == 3202\n gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n #elif DEPTH_PACKING == 3203\n gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n #endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #ifdef USE_DISPLACEMENTMAP\n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n vec4 diffuseColor = vec4( 1.0 );\n #include \n #include \n #include \n #include \n #include \n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n #include \n #include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vLineDistance = scale * lineDistance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n #include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n #include \n #include \n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include \n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n #include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n #else\n vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n #include \n #include \n #include \n #include \n #include \n #include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n vViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n #include \n #include \n #include \n #include \n gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n #ifdef OPAQUE\n gl_FragColor.a = 1.0;\n #endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n #include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n varying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n #define IOR\n #define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n uniform float specularIntensity;\n uniform vec3 specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n uniform sampler2D specularColorMap;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n uniform sampler2D specularIntensityMap;\n #endif\n#endif\n#ifdef USE_CLEARCOAT\n uniform float clearcoat;\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n uniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n uniform float iridescence;\n uniform float iridescenceIOR;\n uniform float iridescenceThicknessMinimum;\n uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheenColor;\n uniform float sheenRoughness;\n #ifdef USE_SHEEN_COLORMAP\n uniform sampler2D sheenColorMap;\n #endif\n #ifdef USE_SHEEN_ROUGHNESSMAP\n uniform sampler2D sheenRoughnessMap;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n uniform vec2 anisotropyVector;\n #ifdef USE_ANISOTROPYMAP\n uniform sampler2D anisotropyMap;\n #endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include \n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n #ifdef USE_SHEEN\n float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n #endif\n #ifdef USE_CLEARCOAT\n float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n varying vec2 vUv;\n uniform mat3 uvTransform;\n#endif\nvoid main() {\n #ifdef USE_POINTS_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include \n #include \n #include \n #include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n vec3 outgoingLight = vec3( 0.0 );\n #include \n #include \n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n #include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include \n #include \n #include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 mvPosition = modelViewMatrix[ 3 ];\n vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include \n #include \n #include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n vec3 outgoingLight = vec3( 0.0 );\n #include \n #include \n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n}"},cq={common:{diffuse:{value:new iE(0xffffff)},opacity:{value:1},map:{value:null},mapTransform:{value:new nJ},alphaMap:{value:null},alphaMapTransform:{value:new nJ},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new nJ}},envmap:{envMap:{value:null},envMapRotation:{value:new nJ},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new nJ}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new nJ}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new nJ},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new nJ},normalScale:{value:new nW(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new nJ},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new nJ}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new nJ}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new nJ}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new iE(0xffffff)}},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 iE(0xffffff)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new nJ},alphaTest:{value:0},uvTransform:{value:new nJ}},sprite:{diffuse:{value:new iE(0xffffff)},opacity:{value:1},center:{value:new nW(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new nJ},alphaMap:{value:null},alphaMapTransform:{value:new nJ},alphaTest:{value:0}}},cY={basic:{uniforms:as([cq.common,cq.specularmap,cq.envmap,cq.aomap,cq.lightmap,cq.fog]),vertexShader:cX.meshbasic_vert,fragmentShader:cX.meshbasic_frag},lambert:{uniforms:as([cq.common,cq.specularmap,cq.envmap,cq.aomap,cq.lightmap,cq.emissivemap,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.fog,cq.lights,{emissive:{value:new iE(0)}}]),vertexShader:cX.meshlambert_vert,fragmentShader:cX.meshlambert_frag},phong:{uniforms:as([cq.common,cq.specularmap,cq.envmap,cq.aomap,cq.lightmap,cq.emissivemap,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.fog,cq.lights,{emissive:{value:new iE(0)},specular:{value:new iE(1118481)},shininess:{value:30}}]),vertexShader:cX.meshphong_vert,fragmentShader:cX.meshphong_frag},standard:{uniforms:as([cq.common,cq.envmap,cq.aomap,cq.lightmap,cq.emissivemap,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.roughnessmap,cq.metalnessmap,cq.fog,cq.lights,{emissive:{value:new iE(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:cX.meshphysical_vert,fragmentShader:cX.meshphysical_frag},toon:{uniforms:as([cq.common,cq.aomap,cq.lightmap,cq.emissivemap,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.gradientmap,cq.fog,cq.lights,{emissive:{value:new iE(0)}}]),vertexShader:cX.meshtoon_vert,fragmentShader:cX.meshtoon_frag},matcap:{uniforms:as([cq.common,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.fog,{matcap:{value:null}}]),vertexShader:cX.meshmatcap_vert,fragmentShader:cX.meshmatcap_frag},points:{uniforms:as([cq.points,cq.fog]),vertexShader:cX.points_vert,fragmentShader:cX.points_frag},dashed:{uniforms:as([cq.common,cq.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:cX.linedashed_vert,fragmentShader:cX.linedashed_frag},depth:{uniforms:as([cq.common,cq.displacementmap]),vertexShader:cX.depth_vert,fragmentShader:cX.depth_frag},normal:{uniforms:as([cq.common,cq.bumpmap,cq.normalmap,cq.displacementmap,{opacity:{value:1}}]),vertexShader:cX.meshnormal_vert,fragmentShader:cX.meshnormal_frag},sprite:{uniforms:as([cq.sprite,cq.fog]),vertexShader:cX.sprite_vert,fragmentShader:cX.sprite_frag},background:{uniforms:{uvTransform:{value:new nJ},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:cX.background_vert,fragmentShader:cX.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new nJ}},vertexShader:cX.backgroundCube_vert,fragmentShader:cX.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:cX.cube_vert,fragmentShader:cX.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:cX.equirect_vert,fragmentShader:cX.equirect_frag},distanceRGBA:{uniforms:as([cq.common,cq.displacementmap,{referencePosition:{value:new nX},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:cX.distanceRGBA_vert,fragmentShader:cX.distanceRGBA_frag},shadow:{uniforms:as([cq.lights,cq.fog,{color:{value:new iE(0)},opacity:{value:1}}]),vertexShader:cX.shadow_vert,fragmentShader:cX.shadow_frag}};cY.physical={uniforms:as([cY.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new nJ},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new nJ},clearcoatNormalScale:{value:new nW(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new nJ},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new nJ},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new nJ},sheen:{value:0},sheenColor:{value:new iE(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new nJ},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new nJ},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new nJ},transmissionSamplerSize:{value:new nW},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new nJ},attenuationDistance:{value:0},attenuationColor:{value:new iE(0)},specularColor:{value:new iE(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new nJ},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new nJ},anisotropyVector:{value:new nW},anisotropyMap:{value:null},anisotropyMapTransform:{value:new nJ}}]),vertexShader:cX.meshphysical_vert,fragmentShader:cX.meshphysical_frag};let cJ={r:0,b:0,g:0},cZ=new rK,cK=new rH;function c$(e,t,n,r,i,a,s){let o,l,u=new iE(0),c=+(!0!==a),h=null,d=0,p=null;function f(e){let r=!0===e.isScene?e.background:null;return r&&r.isTexture&&(r=(e.backgroundBlurriness>0?n:t).get(r)),r}function m(t,n){t.getRGB(cJ,ao(e)),r.buffers.color.setClear(cJ.r,cJ.g,cJ.b,n,s)}return{getClearColor:function(){return u},setClearColor:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;u.set(e),m(u,c=t)},getClearAlpha:function(){return c},setClearAlpha:function(e){m(u,c=e)},render:function(t){let n=!1,i=f(t);null===i?m(u,c):i&&i.isColor&&(m(i,1),n=!0);let a=e.xr.getEnvironmentBlendMode();"additive"===a?r.buffers.color.setClear(0,0,0,1,s):"alpha-blend"===a&&r.buffers.color.setClear(0,0,0,0,s),(e.autoClear||n)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))},addToRenderList:function(t,n){let r=f(n);r&&(r.isCubeTexture||r.mapping===eE)?(void 0===l&&((l=new an(new ai(1,1,1),new au({name:"BackgroundCubeMaterial",uniforms:aa(cY.backgroundCube.uniforms),vertexShader:cY.backgroundCube.vertexShader,fragmentShader:cY.backgroundCube.fragmentShader,side:E,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),cZ.copy(n.backgroundRotation),cZ.x*=-1,cZ.y*=-1,cZ.z*=-1,r.isCubeTexture&&!1===r.isRenderTargetTexture&&(cZ.y*=-1,cZ.z*=-1),l.material.uniforms.envMap.value=r,l.material.uniforms.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,l.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(cK.makeRotationFromEuler(cZ)),l.material.toneMapped=n8.getTransfer(r.colorSpace)!==t1,(h!==r||d!==r.version||p!==e.toneMapping)&&(l.material.needsUpdate=!0,h=r,d=r.version,p=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null)):r&&r.isTexture&&(void 0===o&&((o=new an(new o4(2,2),new au({name:"BackgroundMaterial",uniforms:aa(cY.background.uniforms),vertexShader:cY.background.vertexShader,fragmentShader:cY.background.fragmentShader,side:w,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(o)),o.material.uniforms.t2D.value=r,o.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,o.material.toneMapped=n8.getTransfer(r.colorSpace)!==t1,!0===r.matrixAutoUpdate&&r.updateMatrix(),o.material.uniforms.uvTransform.value.copy(r.matrix),(h!==r||d!==r.version||p!==e.toneMapping)&&(o.material.needsUpdate=!0,h=r,d=r.version,p=e.toneMapping),o.layers.enableAll(),t.unshift(o,o.geometry,o.material,0,0,null))},dispose:function(){void 0!==l&&(l.geometry.dispose(),l.material.dispose(),l=void 0),void 0!==o&&(o.geometry.dispose(),o.material.dispose(),o=void 0)}}}function cQ(e,t){let n=e.getParameter(e.MAX_VERTEX_ATTRIBS),r={},i=u(null),a=i,s=!1;function o(t){return e.bindVertexArray(t)}function l(t){return e.deleteVertexArray(t)}function u(e){let t=[],r=[],i=[];for(let e=0;e=0){let n=i[t],r=s[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n||n.attribute!==r||r&&n.data!==r.data)return!0;o++}return a.attributesNum!==o||a.index!==r}(n,m,l,g))&&function(e,t,n,r){let i={},s=t.attributes,o=0,l=n.getAttributes();for(let t in l)if(l[t].location>=0){let n=s[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));let r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,o++}a.attributes=i,a.attributesNum=o,a.index=r}(n,m,l,g),null!==g&&t.update(g,e.ELEMENT_ARRAY_BUFFER),(v||s)&&(s=!1,function(n,r,i,a){c();let s=a.attributes,o=i.getAttributes(),l=r.defaultAttributeValues;for(let r in o){let i=o[r];if(i.location>=0){let o=s[r];if(void 0===o&&("instanceMatrix"===r&&n.instanceMatrix&&(o=n.instanceMatrix),"instanceColor"===r&&n.instanceColor&&(o=n.instanceColor)),void 0!==o){let r=o.normalized,s=o.itemSize,l=t.get(o);if(void 0===l)continue;let u=l.buffer,c=l.type,p=l.bytesPerElement,m=c===e.INT||c===e.UNSIGNED_INT||o.gpuType===eG;if(o.isInterleavedBufferAttribute){let t=o.data,l=t.stride,g=o.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let s=void 0!==n.precision?n.precision:"highp",o=a(s);o!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",o,"instead."),s=o);let l=!0===n.logarithmicDepthBuffer,u=!0===n.reversedDepthBuffer&&t.has("EXT_clip_control"),c=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS);return{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has("EXT_texture_filter_anisotropic")){let n=t.get("EXT_texture_filter_anisotropic");i=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:a,textureFormatReadable:function(t){return t===e0||r.convert(t)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(n){let i=n===eX&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return n===ez||r.convert(n)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)||n===ej||!!i},precision:s,logarithmicDepthBuffer:l,reversedDepthBuffer:u,maxTextures:c,maxVertexTextures:h,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:h>0,maxSamples:e.getParameter(e.MAX_SAMPLES)}}function c2(e){let t=this,n=null,r=0,i=!1,a=!1,s=new sl,o=new nJ,l={value:null,needsUpdate:!1};function u(e,n,r,i){let a=null!==e?e.length:0,u=null;if(0!==a){if(u=l.value,!0!==i||null===u){let t=r+4*a,i=n.matrixWorldInverse;o.getNormalMatrix(i),(null===u||u.length0),t.numPlanes=r,t.numIntersection=0)}}function c3(e){let t=new WeakMap;function n(e,t){return t===eM?e.mapping=eb:t===ew&&(e.mapping=eS),e}function r(e){let n=e.target;n.removeEventListener("dispose",r);let i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){let a=i.mapping;if(a===eM||a===ew)if(t.has(i))return n(t.get(i).texture,i.mapping);else{let a=i.image;if(!a||!(a.height>0))return null;{let s=new av(a.height);return s.fromEquirectangularTexture(e,i),t.set(i,s),i.addEventListener("dispose",r),n(s.texture,i.mapping)}}}return i},dispose:function(){t=new WeakMap}}}let c4=[.125,.215,.35,.446,.526,.582],c5=new l7,c6=new iE,c8=null,c9=0,c7=0,he=!1,ht=(1+Math.sqrt(5))/2,hn=1/ht,hr=[new nX(-ht,hn,0),new nX(ht,hn,0),new nX(-hn,0,ht),new nX(hn,0,ht),new nX(0,ht,-hn),new nX(0,ht,hn),new nX(-1,1,-1),new nX(1,1,-1),new nX(-1,1,1),new nX(1,1,1)],hi=new nX;class ha{fromScene(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},{size:a=256,position:s=hi}=i;c8=this._renderer.getRenderTarget(),c9=this._renderer.getActiveCubeFace(),c7=this._renderer.getActiveMipmapLevel(),he=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,n,r,o,s),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this._fromTexture(e,t)}fromCubemap(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=hu(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=hl(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?o=c4[s-e+4-1]:0===s&&(o=0),r.push(o);let l=1/(a-2),u=-l,c=1+l,h=[u,u,c,u,c,c,u,u,c,c,u,c],d=new Float32Array(108),p=new Float32Array(72),f=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];d.set(r,18*e),p.set(h,12*e);let i=[e,e,e,e,e,e];f.set(i,6*e)}let m=new i0;m.setAttribute("position",new iF(d,3)),m.setAttribute("uv",new iF(p,2)),m.setAttribute("faceIndex",new iF(f,1)),t.push(m),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){let r=new Float32Array(20),i=new nX(0,1,0);return new au({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:"".concat(e,".0")},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:hc(),fragmentShader:"\n\n precision mediump float;\n precision mediump int;\n\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n uniform int samples;\n uniform float weights[ n ];\n uniform bool latitudinal;\n uniform float dTheta;\n uniform float mipInt;\n uniform vec3 poleAxis;\n\n #define ENVMAP_TYPE_CUBE_UV\n #include \n\n vec3 getSample( float theta, vec3 axis ) {\n\n float cosTheta = cos( theta );\n // Rodrigues' axis-angle rotation\n vec3 sampleDirection = vOutputDirection * cosTheta\n + cross( axis, vOutputDirection ) * sin( theta )\n + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n return bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n }\n\n void main() {\n\n vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n if ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n }\n\n axis = normalize( axis );\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n for ( int i = 1; i < n; i++ ) {\n\n if ( i >= samples ) {\n\n break;\n\n }\n\n float theta = dTheta * float( i );\n gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n }\n\n }\n ",blending:A,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){let t=new an(this._lodPlanes[0],e);this._renderer.compile(t,c5)}_sceneToCubeUV(e,t,n,r,i){let a=new af(90,1,t,n),s=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],l=this._renderer,u=l.autoClear,c=l.toneMapping;l.getClearColor(c6),l.toneMapping=ec,l.autoClear=!1,l.state.buffers.depth.getReversed()&&(l.setRenderTarget(r),l.clearDepth(),l.setRenderTarget(null));let h=new iR({name:"PMREM.Background",side:E,depthWrite:!1,depthTest:!1}),d=new an(new ai,h),p=!1,f=e.background;f?f.isColor&&(h.color.copy(f),e.background=null,p=!0):(h.color.copy(c6),p=!0);for(let t=0;t<6;t++){let n=t%3;0===n?(a.up.set(0,s[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x+o[t],i.y,i.z)):1===n?(a.up.set(0,0,s[t]),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y+o[t],i.z)):(a.up.set(0,s[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y,i.z+o[t]));let u=this._cubeSize;ho(r,n*u,t>2?u:0,u,u),l.setRenderTarget(r),p&&l.render(d,a),l.render(e,a)}d.geometry.dispose(),d.material.dispose(),l.toneMapping=c,l.autoClear=u,e.background=f}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===eb||e.mapping===eS;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=hu()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=hl());let i=r?this._cubemapMaterial:this._equirectMaterial,a=new an(this._lodPlanes[0],i);i.uniforms.envMap.value=e;let s=this._cubeSize;ho(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,c5)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let r=this._lodPlanes.length;for(let t=1;t20&&console.warn("sigmaRadians, ".concat(i,", is too large and will clip, as it requested ").concat(f," samples when the maximum is set to ").concat(20));let m=[],g=0;for(let e=0;e<20;++e){let t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:ev-4?r-v+4:0),_,3*y,2*y),o.setRenderTarget(t),o.render(u,c5)}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)}}function hs(e,t,n){let r=new ru(e,t,n);return r.texture.mapping=eE,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function ho(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function hl(){return new au({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:hc(),fragmentShader:"\n\n precision mediump float;\n precision mediump int;\n\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n\n #include \n\n void main() {\n\n vec3 outputDirection = normalize( vOutputDirection );\n vec2 uv = equirectUv( outputDirection );\n\n gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n }\n ",blending:A,depthTest:!1,depthWrite:!1})}function hu(){return new au({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:hc(),fragmentShader:"\n\n precision mediump float;\n precision mediump int;\n\n uniform float flipEnvMap;\n\n varying vec3 vOutputDirection;\n\n uniform samplerCube envMap;\n\n void main() {\n\n gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n }\n ",blending:A,depthTest:!1,depthWrite:!1})}function hc(){return"\n\n precision mediump float;\n precision mediump int;\n\n attribute float faceIndex;\n\n varying vec3 vOutputDirection;\n\n // RH coordinate system; PMREM face-indexing convention\n vec3 getDirection( vec2 uv, float face ) {\n\n uv = 2.0 * uv - 1.0;\n\n vec3 direction = vec3( uv, 1.0 );\n\n if ( face == 0.0 ) {\n\n direction = direction.zyx; // ( 1, v, u ) pos x\n\n } else if ( face == 1.0 ) {\n\n direction = direction.xzy;\n direction.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n } else if ( face == 2.0 ) {\n\n direction.x *= -1.0; // ( -u, v, 1 ) pos z\n\n } else if ( face == 3.0 ) {\n\n direction = direction.zyx;\n direction.xz *= -1.0; // ( -1, v, -u ) neg x\n\n } else if ( face == 4.0 ) {\n\n direction = direction.xzy;\n direction.xy *= -1.0; // ( -u, -1, v ) neg y\n\n } else if ( face == 5.0 ) {\n\n direction.z *= -1.0; // ( u, v, -1 ) neg z\n\n }\n\n return direction;\n\n }\n\n void main() {\n\n vOutputDirection = getDirection( uv, faceIndex );\n gl_Position = vec4( position, 1.0 );\n\n }\n "}function hh(e){let t=new WeakMap,n=null;function r(e){let n=e.target;n.removeEventListener("dispose",r);let i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){let a=i.mapping,s=a===eM||a===ew,o=a===eb||a===eS;if(s||o){let a=t.get(i),l=void 0!==a?a.texture.pmremVersion:0;if(i.isRenderTargetTexture&&i.pmremVersion!==l)return null===n&&(n=new ha(e)),(a=s?n.fromEquirectangular(i,a):n.fromCubemap(i,a)).texture.pmremVersion=i.pmremVersion,t.set(i,a),a.texture;{if(void 0!==a)return a.texture;let l=i.image;return s&&l&&l.height>0||o&&l&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(l)?(null===n&&(n=new ha(e)),(a=s?n.fromEquirectangular(i):n.fromCubemap(i)).texture.pmremVersion=i.pmremVersion,t.set(i,a),i.addEventListener("dispose",r),a.texture):null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function hd(e){let t={};function n(n){let r;if(void 0!==t[n])return t[n];switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(e){let t=n(e);return null===t&&n3("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function hp(e,t,n,r){let i={},a=new WeakMap;function s(e){let o=e.target;for(let e in null!==o.index&&t.remove(o.index),o.attributes)t.remove(o.attributes[e]);o.removeEventListener("dispose",s),delete i[o.id];let l=a.get(o);l&&(t.remove(l),a.delete(o)),r.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,n.memory.geometries--}function o(e){let n=[],r=e.index,i=e.attributes.position,s=0;if(null!==r){let e=r.array;s=r.version;for(let t=0,r=e.length;tt.maxTextureSize&&(f=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let m=new Float32Array(p*f*4*c),g=new rc(m,p,f,c);g.type=ej,g.needsUpdate=!0;let v=4*d;for(let t=0;t0)return e;let i=t*n,a=hM[i];if(void 0===a&&(a=new Float32Array(i),hM[i]=a),0!==t){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function hR(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n":" "," ").concat(i,": ").concat(n[e]))}return r.join("\n")}(e.getShaderSource(t),r)}}let dv=new nX;function dy(e){return""!==e}function d_(e,t){let n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function dx(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}let db=/^[ \t]*#include +<([\w\d./]+)>/gm;function dS(e){return e.replace(db,dw)}let dM=new Map;function dw(e,t){let n=cX[t];if(void 0===n){let e=dM.get(t);if(void 0!==e)n=cX[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e);else throw Error("Can not resolve #include <"+t+">")}return dS(n)}let dE=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function dT(e){return e.replace(dE,dA)}function dA(e,t,n,r){let i="";for(let e=parseInt(t);e0&&(i+="\n"),(a=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x].filter(dy).join("\n")).length>0&&(a+="\n")):(i=[dC(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+g:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+f:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif","\n"].filter(dy).join("\n"),a=[dC(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+m:"",n.envMap?"#define "+g:"",n.envMap?"#define "+v:"",y?"#define CUBEUV_TEXEL_WIDTH "+y.texelWidth:"",y?"#define CUBEUV_TEXEL_HEIGHT "+y.texelHeight:"",y?"#define CUBEUV_MAX_MIP "+y.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+f:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ec?"#define TONE_MAPPING":"",n.toneMapping!==ec?cX.tonemapping_pars_fragment:"",n.toneMapping!==ec?function(e,t){let n;switch(t){case eh:n="Linear";break;case ed:n="Reinhard";break;case ep:n="Cineon";break;case ef:n="ACESFilmic";break;case eg:n="AgX";break;case ev:n="Neutral";break;case em:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",cX.colorspace_pars_fragment,function(e,t){let n=function(e){n8._getMatrix(dm,n8.workingColorSpace,e);let t="mat3( ".concat(dm.elements.map(e=>e.toFixed(4))," )");switch(n8.getTransfer(e)){case t0:return[t,"LinearTransferOETF"];case t1:return[t,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",e),[t,"LinearTransferOETF"]}}(t);return["vec4 ".concat(e,"( vec4 value ) {")," return ".concat(n[1],"( vec4( value.rgb * ").concat(n[0],", value.a ) );"),"}"].join("\n")}("linearToOutputTexel",n.outputColorSpace),function(){n8.getLuminanceCoefficients(dv);let e=dv.x.toFixed(4),t=dv.y.toFixed(4),n=dv.z.toFixed(4);return["float luminance( const in vec3 rgb ) {"," const vec3 weights = vec3( ".concat(e,", ").concat(t,", ").concat(n," );")," return dot( weights, rgb );\n}"].join("\n")}(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(dy).join("\n")),d=dx(d=d_(d=dS(d),n),n),p=dx(p=d_(p=dS(p),n),n),d=dT(d),p=dT(p),!0!==n.isRawShaderMaterial&&(E="#version 300 es\n",i=[_,"#define attribute in\n#define varying out\n#define texture2D texture"].join("\n")+"\n"+i,a=["#define varying in",n.glslVersion===nT?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===nT?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+a);let T=E+i+d,A=E+a+p,C=dp(c,c.VERTEX_SHADER,T),R=dp(c,c.FRAGMENT_SHADER,A);function P(t){if(e.debug.checkShaderErrors){let n=c.getProgramInfoLog(w)||"",r=c.getShaderInfoLog(C)||"",s=c.getShaderInfoLog(R)||"",o=n.trim(),l=r.trim(),u=s.trim(),h=!0,d=!0;if(!1===c.getProgramParameter(w,c.LINK_STATUS))if(h=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(c,w,C,R);else{let e=dg(c,C,"vertex"),n=dg(c,R,"fragment");console.error("THREE.WebGLProgram: Shader Error "+c.getError()+" - VALIDATE_STATUS "+c.getProgramParameter(w,c.VALIDATE_STATUS)+"\n\nMaterial Name: "+t.name+"\nMaterial Type: "+t.type+"\n\nProgram Info Log: "+o+"\n"+e+"\n"+n)}else""!==o?console.warn("THREE.WebGLProgram: Program Info Log:",o):(""===l||""===u)&&(d=!1);d&&(t.diagnostics={runnable:h,programLog:o,vertexShader:{log:l,prefix:i},fragmentShader:{log:u,prefix:a}})}c.deleteShader(C),c.deleteShader(R),s=new dd(c,w),o=function(e,t){let n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i0,Z=a.clearcoat>0,K=a.dispersion>0,$=a.iridescence>0,Q=a.sheen>0,ee=a.transmission>0,et=J&&!!a.anisotropyMap,en=Z&&!!a.clearcoatMap,er=Z&&!!a.clearcoatNormalMap,ei=Z&&!!a.clearcoatRoughnessMap,ea=$&&!!a.iridescenceMap,es=$&&!!a.iridescenceThicknessMap,eo=Q&&!!a.sheenColorMap,el=Q&&!!a.sheenRoughnessMap,eu=!!a.specularMap,eh=!!a.specularColorMap,ed=!!a.specularIntensityMap,ep=ee&&!!a.transmissionMap,ef=ee&&!!a.thicknessMap,em=!!a.gradientMap,eg=!!a.alphaMap,ev=a.alphaTest>0,ey=!!a.alphaHash,e_=!!a.extensions,ex=ec;a.toneMapped&&(null===D||!0===D.isXRRenderTarget)&&(ex=e.toneMapping);let eb={shaderID:P,shaderType:a.type,shaderName:a.name,vertexShader:y,fragmentShader:_,defines:a.defines,customVertexShaderID:x,customFragmentShaderID:b,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:p,batching:F,batchingColor:F&&null!==v._colorsTexture,instancing:O,instancingColor:O&&null!==v.instanceColor,instancingMorph:O&&null!==v.morphTexture,supportsVertexTextures:d,outputColorSpace:null===D?e.outputColorSpace:!0===D.isXRRenderTarget?D.texture.colorSpace:tQ,alphaToCoverage:!!a.alphaToCoverage,map:k,matcap:z,envMap:B,envMapMode:B&&A.mapping,envMapCubeUVHeight:R,aoMap:H,lightMap:V,bumpMap:G,normalMap:W,displacementMap:d&&j,emissiveMap:X,normalMapObjectSpace:W&&a.normalMapType===tZ,normalMapTangentSpace:W&&a.normalMapType===tJ,metalnessMap:q,roughnessMap:Y,anisotropy:J,anisotropyMap:et,clearcoat:Z,clearcoatMap:en,clearcoatNormalMap:er,clearcoatRoughnessMap:ei,dispersion:K,iridescence:$,iridescenceMap:ea,iridescenceThicknessMap:es,sheen:Q,sheenColorMap:eo,sheenRoughnessMap:el,specularMap:eu,specularColorMap:eh,specularIntensityMap:ed,transmission:ee,transmissionMap:ep,thicknessMap:ef,gradientMap:em,opaque:!1===a.transparent&&a.blending===C&&!1===a.alphaToCoverage,alphaMap:eg,alphaTest:ev,alphaHash:ey,combine:a.combine,mapUv:k&&m(a.map.channel),aoMapUv:H&&m(a.aoMap.channel),lightMapUv:V&&m(a.lightMap.channel),bumpMapUv:G&&m(a.bumpMap.channel),normalMapUv:W&&m(a.normalMap.channel),displacementMapUv:j&&m(a.displacementMap.channel),emissiveMapUv:X&&m(a.emissiveMap.channel),metalnessMapUv:q&&m(a.metalnessMap.channel),roughnessMapUv:Y&&m(a.roughnessMap.channel),anisotropyMapUv:et&&m(a.anisotropyMap.channel),clearcoatMapUv:en&&m(a.clearcoatMap.channel),clearcoatNormalMapUv:er&&m(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ei&&m(a.clearcoatRoughnessMap.channel),iridescenceMapUv:ea&&m(a.iridescenceMap.channel),iridescenceThicknessMapUv:es&&m(a.iridescenceThicknessMap.channel),sheenColorMapUv:eo&&m(a.sheenColorMap.channel),sheenRoughnessMapUv:el&&m(a.sheenRoughnessMap.channel),specularMapUv:eu&&m(a.specularMap.channel),specularColorMapUv:eh&&m(a.specularColorMap.channel),specularIntensityMapUv:ed&&m(a.specularIntensityMap.channel),transmissionMapUv:ep&&m(a.transmissionMap.channel),thicknessMapUv:ef&&m(a.thicknessMap.channel),alphaMapUv:eg&&m(a.alphaMap.channel),vertexTangents:!!M.attributes.tangent&&(W||J),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!M.attributes.color&&4===M.attributes.color.itemSize,pointsUvs:!0===v.isPoints&&!!M.attributes.uv&&(k||eg),fog:!!S,useFog:!0===a.fog,fogExp2:!!S&&S.isFogExp2,flatShading:!0===a.flatShading&&!1===a.wireframe,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:h,reversedDepthBuffer:U,skinning:!0===v.isSkinnedMesh,morphTargets:void 0!==M.morphAttributes.position,morphNormals:void 0!==M.morphAttributes.normal,morphColors:void 0!==M.morphAttributes.color,morphTargetsCount:L,morphTextureStride:N,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:ex,decodeVideoTexture:k&&!0===a.map.isVideoTexture&&n8.getTransfer(a.map.colorSpace)===t1,decodeVideoTextureEmissive:X&&!0===a.emissiveMap.isVideoTexture&&n8.getTransfer(a.emissiveMap.colorSpace)===t1,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===T,flipSided:a.side===E,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionClipCullDistance:e_&&!0===a.extensions.clipCullDistance&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(e_&&!0===a.extensions.multiDraw||F)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:a.customProgramCacheKey()};return eb.vertexUv1s=u.has(1),eb.vertexUv2s=u.has(2),eb.vertexUv3s=u.has(3),u.clear(),eb},getProgramCacheKey:function(t){var n,r,i,a;let s=[];if(t.shaderID?s.push(t.shaderID):(s.push(t.customVertexShaderID),s.push(t.customFragmentShaderID)),void 0!==t.defines)for(let e in t.defines)s.push(e),s.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(n=s,r=t,n.push(r.precision),n.push(r.outputColorSpace),n.push(r.envMapMode),n.push(r.envMapCubeUVHeight),n.push(r.mapUv),n.push(r.alphaMapUv),n.push(r.lightMapUv),n.push(r.aoMapUv),n.push(r.bumpMapUv),n.push(r.normalMapUv),n.push(r.displacementMapUv),n.push(r.emissiveMapUv),n.push(r.metalnessMapUv),n.push(r.roughnessMapUv),n.push(r.anisotropyMapUv),n.push(r.clearcoatMapUv),n.push(r.clearcoatNormalMapUv),n.push(r.clearcoatRoughnessMapUv),n.push(r.iridescenceMapUv),n.push(r.iridescenceThicknessMapUv),n.push(r.sheenColorMapUv),n.push(r.sheenRoughnessMapUv),n.push(r.specularMapUv),n.push(r.specularColorMapUv),n.push(r.specularIntensityMapUv),n.push(r.transmissionMapUv),n.push(r.thicknessMapUv),n.push(r.combine),n.push(r.fogExp2),n.push(r.sizeAttenuation),n.push(r.morphTargetsCount),n.push(r.morphAttributeCount),n.push(r.numDirLights),n.push(r.numPointLights),n.push(r.numSpotLights),n.push(r.numSpotLightMaps),n.push(r.numHemiLights),n.push(r.numRectAreaLights),n.push(r.numDirLightShadows),n.push(r.numPointLightShadows),n.push(r.numSpotLightShadows),n.push(r.numSpotLightShadowsWithMaps),n.push(r.numLightProbes),n.push(r.shadowMapType),n.push(r.toneMapping),n.push(r.numClippingPlanes),n.push(r.numClipIntersection),n.push(r.depthPacking),i=s,a=t,o.disableAll(),a.supportsVertexTextures&&o.enable(0),a.instancing&&o.enable(1),a.instancingColor&&o.enable(2),a.instancingMorph&&o.enable(3),a.matcap&&o.enable(4),a.envMap&&o.enable(5),a.normalMapObjectSpace&&o.enable(6),a.normalMapTangentSpace&&o.enable(7),a.clearcoat&&o.enable(8),a.iridescence&&o.enable(9),a.alphaTest&&o.enable(10),a.vertexColors&&o.enable(11),a.vertexAlphas&&o.enable(12),a.vertexUv1s&&o.enable(13),a.vertexUv2s&&o.enable(14),a.vertexUv3s&&o.enable(15),a.vertexTangents&&o.enable(16),a.anisotropy&&o.enable(17),a.alphaHash&&o.enable(18),a.batching&&o.enable(19),a.dispersion&&o.enable(20),a.batchingColor&&o.enable(21),a.gradientMap&&o.enable(22),i.push(o.mask),o.disableAll(),a.fog&&o.enable(0),a.useFog&&o.enable(1),a.flatShading&&o.enable(2),a.logarithmicDepthBuffer&&o.enable(3),a.reversedDepthBuffer&&o.enable(4),a.skinning&&o.enable(5),a.morphTargets&&o.enable(6),a.morphNormals&&o.enable(7),a.morphColors&&o.enable(8),a.premultipliedAlpha&&o.enable(9),a.shadowMapEnabled&&o.enable(10),a.doubleSided&&o.enable(11),a.flipSided&&o.enable(12),a.useDepthPacking&&o.enable(13),a.dithering&&o.enable(14),a.transmission&&o.enable(15),a.sheen&&o.enable(16),a.opaque&&o.enable(17),a.pointsUvs&&o.enable(18),a.decodeVideoTexture&&o.enable(19),a.decodeVideoTextureEmissive&&o.enable(20),a.alphaToCoverage&&o.enable(21),i.push(o.mask),s.push(e.outputColorSpace)),s.push(t.customProgramCacheKey),s.join()},getUniforms:function(e){let t,n=f[e.type];if(n){let e=cY[n];t=al.clone(e.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,n){let r;for(let e=0,t=c.length;e0?r.push(c):!0===s.transparent?i.push(c):n.push(c)},unshift:function(e,t,s,o,l,u){let c=a(e,t,s,o,l,u);s.transmission>0?r.unshift(c):!0===s.transparent?i.unshift(c):n.unshift(c)},finish:function(){for(let n=t,r=e.length;n1&&n.sort(e||dU),r.length>1&&r.sort(t||dO),i.length>1&&i.sort(t||dO)}}}function dk(){let e=new WeakMap;return{get:function(t,n){let r,i=e.get(t);return void 0===i?(r=new dF,e.set(t,[r])):n>=i.length?(r=new dF,i.push(r)):r=i[n],r},dispose:function(){e=new WeakMap}}}function dz(){let e={};return{get:function(t){let n;if(void 0!==e[t.id])return e[t.id];switch(t.type){case"DirectionalLight":n={direction:new nX,color:new iE};break;case"SpotLight":n={position:new nX,direction:new nX,color:new iE,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new nX,color:new iE,distance:0,decay:0};break;case"HemisphereLight":n={direction:new nX,skyColor:new iE,groundColor:new iE};break;case"RectAreaLight":n={color:new iE,position:new nX,halfWidth:new nX,halfHeight:new nX}}return e[t.id]=n,n}}}let dB=0;function dH(e,t){return 2*!!t.castShadow-2*!!e.castShadow+ +!!t.map-!!e.map}function dV(e){let t=new dz,n=function(){let e={};return{get:function(t){let n;if(void 0!==e[t.id])return e[t.id];switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new nW};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new nW,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),r={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 e=0;e<9;e++)r.probe.push(new nX);let i=new nX,a=new rH,s=new rH;return{setup:function(i){let a=0,s=0,o=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let l=0,u=0,c=0,h=0,d=0,p=0,f=0,m=0,g=0,v=0,y=0;i.sort(dH);for(let e=0,_=i.length;e<_;e++){let _=i[e],x=_.color,b=_.intensity,S=_.distance,M=_.shadow&&_.shadow.map?_.shadow.map.texture:null;if(_.isAmbientLight)a+=x.r*b,s+=x.g*b,o+=x.b*b;else if(_.isLightProbe){for(let e=0;e<9;e++)r.probe[e].addScaledVector(_.sh.coefficients[e],b);y++}else if(_.isDirectionalLight){let e=t.get(_);if(e.color.copy(_.color).multiplyScalar(_.intensity),_.castShadow){let e=_.shadow,t=n.get(_);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,r.directionalShadow[l]=t,r.directionalShadowMap[l]=M,r.directionalShadowMatrix[l]=_.shadow.matrix,p++}r.directional[l]=e,l++}else if(_.isSpotLight){let e=t.get(_);e.position.setFromMatrixPosition(_.matrixWorld),e.color.copy(x).multiplyScalar(b),e.distance=S,e.coneCos=Math.cos(_.angle),e.penumbraCos=Math.cos(_.angle*(1-_.penumbra)),e.decay=_.decay,r.spot[c]=e;let i=_.shadow;if(_.map&&(r.spotLightMap[g]=_.map,g++,i.updateMatrices(_),_.castShadow&&v++),r.spotLightMatrix[c]=i.matrix,_.castShadow){let e=n.get(_);e.shadowIntensity=i.intensity,e.shadowBias=i.bias,e.shadowNormalBias=i.normalBias,e.shadowRadius=i.radius,e.shadowMapSize=i.mapSize,r.spotShadow[c]=e,r.spotShadowMap[c]=M,m++}c++}else if(_.isRectAreaLight){let e=t.get(_);e.color.copy(x).multiplyScalar(b),e.halfWidth.set(.5*_.width,0,0),e.halfHeight.set(0,.5*_.height,0),r.rectArea[h]=e,h++}else if(_.isPointLight){let e=t.get(_);if(e.color.copy(_.color).multiplyScalar(_.intensity),e.distance=_.distance,e.decay=_.decay,_.castShadow){let e=_.shadow,t=n.get(_);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,t.shadowCameraNear=e.camera.near,t.shadowCameraFar=e.camera.far,r.pointShadow[u]=t,r.pointShadowMap[u]=M,r.pointShadowMatrix[u]=_.shadow.matrix,f++}r.point[u]=e,u++}else if(_.isHemisphereLight){let e=t.get(_);e.skyColor.copy(_.color).multiplyScalar(b),e.groundColor.copy(_.groundColor).multiplyScalar(b),r.hemi[d]=e,d++}}h>0&&(!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=cq.LTC_FLOAT_1,r.rectAreaLTC2=cq.LTC_FLOAT_2):(r.rectAreaLTC1=cq.LTC_HALF_1,r.rectAreaLTC2=cq.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=s,r.ambient[2]=o;let _=r.hash;(_.directionalLength!==l||_.pointLength!==u||_.spotLength!==c||_.rectAreaLength!==h||_.hemiLength!==d||_.numDirectionalShadows!==p||_.numPointShadows!==f||_.numSpotShadows!==m||_.numSpotMaps!==g||_.numLightProbes!==y)&&(r.directional.length=l,r.spot.length=c,r.rectArea.length=h,r.point.length=u,r.hemi.length=d,r.directionalShadow.length=p,r.directionalShadowMap.length=p,r.pointShadow.length=f,r.pointShadowMap.length=f,r.spotShadow.length=m,r.spotShadowMap.length=m,r.directionalShadowMatrix.length=p,r.pointShadowMatrix.length=f,r.spotLightMatrix.length=m+g-v,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=v,r.numLightProbes=y,_.directionalLength=l,_.pointLength=u,_.spotLength=c,_.rectAreaLength=h,_.hemiLength=d,_.numDirectionalShadows=p,_.numPointShadows=f,_.numSpotShadows=m,_.numSpotMaps=g,_.numLightProbes=y,r.version=dB++)},setupView:function(e,t){let n=0,o=0,l=0,u=0,c=0,h=t.matrixWorldInverse;for(let t=0,d=e.length;t1&&void 0!==arguments[1]?arguments[1]:0,a=t.get(n);return void 0===a?(r=new dG(e),t.set(n,[r])):i>=a.length?(r=new dG(e),a.push(r)):r=a[i],r},dispose:function(){t=new WeakMap}}}function dj(e,t,n){let r=new sd,i=new nW,a=new nW,s=new ro,o=new lp({depthPacking:tX}),l=new lf,u={},c=n.maxTextureSize,h={[w]:E,[E]:w,[T]:T},d=new au({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new nW},radius:{value:4}},vertexShader:"void main() {\n gl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n const float samples = float( VSM_SAMPLES );\n float mean = 0.0;\n float squared_mean = 0.0;\n float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n float uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n for ( float i = 0.0; i < samples; i ++ ) {\n float uvOffset = uvStart + i * uvStride;\n #ifdef HORIZONTAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean / samples;\n squared_mean = squared_mean / samples;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),p=d.clone();p.defines.HORIZONTAL_PASS=1;let f=new i0;f.setAttribute("position",new iF(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new an(f,d),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=b;let v=this.type;function y(t,n,r,i){let a=null,s=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)a=s;else if(a=!0===r.isPointLight?l:o,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0||!0===n.alphaToCoverage){let e=a.uuid,t=n.uuid,r=u[e];void 0===r&&(r={},u[e]=r);let i=r[t];void 0===i&&(i=a.clone(),r[t]=i,n.addEventListener("dispose",_)),a=i}return a.visible=n.visible,a.wireframe=n.wireframe,i===M?a.side=null!==n.shadowSide?n.shadowSide:n.side:a.side=null!==n.shadowSide?n.shadowSide:h[n.side],a.alphaMap=n.alphaMap,a.alphaTest=!0===n.alphaToCoverage?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===r.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=r),a}function _(e){for(let t in e.target.removeEventListener("dispose",_),u){let n=u[t],r=e.target.uuid;r in n&&(n[r].dispose(),delete n[r])}}this.render=function(n,o,l){if(!1===g.enabled||!1===g.autoUpdate&&!1===g.needsUpdate||0===n.length)return;let u=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),_=e.state;_.setBlending(A),!0===_.buffers.depth.getReversed()?_.buffers.color.setClear(0,0,0,0):_.buffers.color.setClear(1,1,1,1),_.buffers.depth.setTest(!0),_.setScissorTest(!1);let x=v!==M&&this.type===M,b=v===M&&this.type!==M;for(let u=0,h=n.length;uc||i.y>c)&&(i.x>c&&(a.x=Math.floor(c/g.x),i.x=a.x*g.x,f.mapSize.x=a.x),i.y>c&&(a.y=Math.floor(c/g.y),i.y=a.y*g.y,f.mapSize.y=a.y)),null===f.map||!0===x||!0===b){let e=this.type!==M?{minFilter:eR,magFilter:eR}:{};null!==f.map&&f.map.dispose(),f.map=new ru(i.x,i.y,e),f.map.texture.name=h.name+".shadowMap",f.camera.updateProjectionMatrix()}e.setRenderTarget(f.map),e.clear();let v=f.getViewportCount();for(let n=0;n=1:-1!==em.indexOf("OpenGL ES")&&(ef=parseFloat(/^OpenGL ES (\d)/.exec(em)[1])>=2);let eg=null,ev={},ey=e.getParameter(e.SCISSOR_BOX),e_=e.getParameter(e.VIEWPORT),ex=new ro().fromArray(ey),eb=new ro().fromArray(e_);function eS(t,n,r,i){let a=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let s=0;sn||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1)if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&e instanceof VideoFrame){let n=Math.floor(r*i.width),a=Math.floor(r*i.height);void 0===o&&(o=f(n,a));let s=t?f(n,a):o;return s.width=n,s.height=a,s.getContext("2d").drawImage(e,0,0,n,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+i.width+"x"+i.height+") to ("+n+"x"+a+")."),s}else"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+i.width+"x"+i.height+").");return e}function g(e){return e.generateMipmaps}function v(t){e.generateMipmap(t)}function y(n,r,i,a){let s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;if(r===e.RED&&(i===e.FLOAT&&(o=e.R32F),i===e.HALF_FLOAT&&(o=e.R16F),i===e.UNSIGNED_BYTE&&(o=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.R8UI),i===e.UNSIGNED_SHORT&&(o=e.R16UI),i===e.UNSIGNED_INT&&(o=e.R32UI),i===e.BYTE&&(o=e.R8I),i===e.SHORT&&(o=e.R16I),i===e.INT&&(o=e.R32I)),r===e.RG&&(i===e.FLOAT&&(o=e.RG32F),i===e.HALF_FLOAT&&(o=e.RG16F),i===e.UNSIGNED_BYTE&&(o=e.RG8)),r===e.RG_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.RG8UI),i===e.UNSIGNED_SHORT&&(o=e.RG16UI),i===e.UNSIGNED_INT&&(o=e.RG32UI),i===e.BYTE&&(o=e.RG8I),i===e.SHORT&&(o=e.RG16I),i===e.INT&&(o=e.RG32I)),r===e.RGB_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.RGB8UI),i===e.UNSIGNED_SHORT&&(o=e.RGB16UI),i===e.UNSIGNED_INT&&(o=e.RGB32UI),i===e.BYTE&&(o=e.RGB8I),i===e.SHORT&&(o=e.RGB16I),i===e.INT&&(o=e.RGB32I)),r===e.RGBA_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.RGBA8UI),i===e.UNSIGNED_SHORT&&(o=e.RGBA16UI),i===e.UNSIGNED_INT&&(o=e.RGBA32UI),i===e.BYTE&&(o=e.RGBA8I),i===e.SHORT&&(o=e.RGBA16I),i===e.INT&&(o=e.RGBA32I)),r===e.RGB&&(i===e.UNSIGNED_INT_5_9_9_9_REV&&(o=e.RGB9_E5),i===e.UNSIGNED_INT_10F_11F_11F_REV&&(o=e.R11F_G11F_B10F)),r===e.RGBA){let t=s?t0:n8.getTransfer(a);i===e.FLOAT&&(o=e.RGBA32F),i===e.HALF_FLOAT&&(o=e.RGBA16F),i===e.UNSIGNED_BYTE&&(o=t===t1?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(o=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(o=e.RGB5_A1)}return(o===e.R16F||o===e.R32F||o===e.RG16F||o===e.RG32F||o===e.RGBA16F||o===e.RGBA32F)&&t.get("EXT_color_buffer_float"),o}function _(t,n){let r;return t?null===n||n===eW||n===eJ?r=e.DEPTH24_STENCIL8:n===ej?r=e.DEPTH32F_STENCIL8:n===eV&&(r=e.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===n||n===eW||n===eJ?r=e.DEPTH_COMPONENT24:n===ej?r=e.DEPTH_COMPONENT32F:n===eV&&(r=e.DEPTH_COMPONENT16),r}function x(e,t){return!0===g(e)||e.isFramebufferTexture&&e.minFilter!==eR&&e.minFilter!==eD?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function b(e){let t=e.target;t.removeEventListener("dispose",b),function(e){let t=r.get(e);if(void 0===t.__webglInit)return;let n=e.source,i=d.get(n);if(i){let r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&M(e),0===Object.keys(i).length&&d.delete(n)}r.remove(e)}(t),t.isVideoTexture&&h.delete(t)}function S(t){let n=t.target;n.removeEventListener("dispose",S),function(t){let n=r.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),r.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(n.__webglFramebuffer[t]))for(let r=0;r0&&a.__version!==t.version){let e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void L(a,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}else t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}let T={[eT]:e.REPEAT,[eA]:e.CLAMP_TO_EDGE,[eC]:e.MIRRORED_REPEAT},A={[eR]:e.NEAREST,[eP]:e.NEAREST_MIPMAP_NEAREST,[eL]:e.NEAREST_MIPMAP_LINEAR,[eD]:e.LINEAR,[eU]:e.LINEAR_MIPMAP_NEAREST,[eF]:e.LINEAR_MIPMAP_LINEAR},C={[nl]:e.NEVER,[nm]:e.ALWAYS,[nu]:e.LESS,[nh]:e.LEQUAL,[nc]:e.EQUAL,[nf]:e.GEQUAL,[nd]:e.GREATER,[np]:e.NOTEQUAL};function R(n,a){if((a.type===ej&&!1===t.has("OES_texture_float_linear")&&(a.magFilter===eD||a.magFilter===eU||a.magFilter===eL||a.magFilter===eF||a.minFilter===eD||a.minFilter===eU||a.minFilter===eL||a.minFilter===eF)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(n,e.TEXTURE_WRAP_S,T[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,T[a.wrapT]),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,T[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,A[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,A[a.minFilter]),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,C[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic"))&&a.magFilter!==eR&&(a.minFilter===eL||a.minFilter===eF)&&(a.type!==ej||!1!==t.has("OES_texture_float_linear"))&&(a.anisotropy>1||r.get(a).__currentAnisotropy)){let s=t.get("EXT_texture_filter_anisotropic");e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy}}function P(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",b));let i=n.source,a=d.get(i);void 0===a&&(a={},d.set(i,a));let o=function(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(o!==t.__cacheKey){void 0===a[o]&&(a[o]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,r=!0),a[o].usedTimes++;let i=a[t.__cacheKey];void 0!==i&&(a[t.__cacheKey].usedTimes--,0===i.usedTimes&&M(n)),t.__cacheKey=o,t.__webglTexture=a[o].texture}return r}function I(e,t,n){return Math.floor(Math.floor(e/n)/t)}function L(t,s,o){let l=e.TEXTURE_2D;(s.isDataArrayTexture||s.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),s.isData3DTexture&&(l=e.TEXTURE_3D);let u=P(t,s),c=s.source;n.bindTexture(l,t.__webglTexture,e.TEXTURE0+o);let h=r.get(c);if(c.version!==h.__version||!0===u){let t;n.activeTexture(e.TEXTURE0+o);let r=n8.getPrimaries(n8.workingColorSpace),d=s.colorSpace===tK?null:n8.getPrimaries(s.colorSpace),p=s.colorSpace===tK||r===d?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,p);let f=m(s.image,!1,i.maxTextureSize);f=H(s,f);let b=a.convert(s.format,s.colorSpace),S=a.convert(s.type),M=y(s.internalFormat,b,S,s.colorSpace,s.isVideoTexture);R(l,s);let w=s.mipmaps,E=!0!==s.isVideoTexture,T=void 0===h.__version||!0===u,A=c.dataReady,C=x(s,f);if(s.isDepthTexture)M=_(s.format===e2,s.type),T&&(E?n.texStorage2D(e.TEXTURE_2D,1,M,f.width,f.height):n.texImage2D(e.TEXTURE_2D,0,M,f.width,f.height,0,b,S,null));else if(s.isDataTexture)if(w.length>0){E&&T&&n.texStorage2D(e.TEXTURE_2D,C,M,w[0].width,w[0].height);for(let r=0,i=w.length;re.start-t.start);let o=0;for(let e=1;e0){let i=cV(t.width,t.height,s.format,s.type);for(let a of s.layerUpdates){let s=t.data.subarray(a*i/t.data.BYTES_PER_ELEMENT,(a+1)*i/t.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,r,0,0,a,t.width,t.height,1,b,s)}s.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,r,0,0,0,t.width,t.height,f.depth,b,t.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,r,M,t.width,t.height,f.depth,0,t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else E?A&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,r,0,0,0,t.width,t.height,f.depth,b,S,t.data):n.texImage3D(e.TEXTURE_2D_ARRAY,r,M,t.width,t.height,f.depth,0,b,S,t.data)}else{E&&T&&n.texStorage2D(e.TEXTURE_2D,C,M,w[0].width,w[0].height);for(let r=0,i=w.length;r0){let t=cV(f.width,f.height,s.format,s.type);for(let r of s.layerUpdates){let i=f.data.subarray(r*t/f.data.BYTES_PER_ELEMENT,(r+1)*t/f.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,r,f.width,f.height,1,b,S,i)}s.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,f.width,f.height,f.depth,b,S,f.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,M,f.width,f.height,f.depth,0,b,S,f.data);else if(s.isData3DTexture)E?(T&&n.texStorage3D(e.TEXTURE_3D,C,M,f.width,f.height,f.depth),A&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,f.width,f.height,f.depth,b,S,f.data)):n.texImage3D(e.TEXTURE_3D,0,M,f.width,f.height,f.depth,0,b,S,f.data);else if(s.isFramebufferTexture){if(T)if(E)n.texStorage2D(e.TEXTURE_2D,C,M,f.width,f.height);else{let t=f.width,r=f.height;for(let i=0;i>=1,r>>=1}}else if(w.length>0){if(E&&T){let t=V(w[0]);n.texStorage2D(e.TEXTURE_2D,C,M,t.width,t.height)}for(let r=0,i=w.length;r>c),r=Math.max(1,i.height>>c);u===e.TEXTURE_3D||u===e.TEXTURE_2D_ARRAY?n.texImage3D(u,c,p,t,r,i.depth,0,h,d,null):n.texImage2D(u,c,p,t,r,0,h,d,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),B(i)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,o,u,m.__webglTexture,0,z(i)):(u===e.TEXTURE_2D||u>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&u<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,o,u,m.__webglTexture,c),n.bindFramebuffer(e.FRAMEBUFFER,null)}function D(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){let i=n.depthTexture,a=i&&i.isDepthTexture?i.type:null,s=_(n.stencilBuffer,a),o=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=z(n);B(n)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,u,s,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,u,s,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,s,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,o,e.RENDERBUFFER,t)}else{let t=n.textures;for(let i=0;i{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,e.removeEventListener("dispose",t)};e.addEventListener("dispose",t),i.__depthDisposeCallback=t}i.__boundDepthTexture=e}if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(a)throw Error("target.depthTexture not supported in Cube render targets");let e=t.texture.mipmaps;e&&e.length>0?U(i.__webglFramebuffer[0],t):U(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),void 0===i.__webglDepthbuffer[r])i.__webglDepthbuffer[r]=e.createRenderbuffer(),D(i.__webglDepthbuffer[r],t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=i.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a)}}else{let r=t.texture.mipmaps;if(r&&r.length>0?n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),void 0===i.__webglDepthbuffer)i.__webglDepthbuffer=e.createRenderbuffer(),D(i.__webglDepthbuffer,t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,r)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}let F=[],k=[];function z(e){return Math.min(i.maxSamples,e.samples)}function B(e){let n=r.get(e);return e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function H(e,t){let n=e.colorSpace,r=e.format,i=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||n!==tQ&&n!==tK&&(n8.getTransfer(n)===t1?(r!==e0||i!==ez)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),t}function V(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?(c.width=e.naturalWidth||e.width,c.height=e.naturalHeight||e.height):"undefined"!=typeof VideoFrame&&e instanceof VideoFrame?(c.width=e.displayWidth,c.height=e.displayHeight):(c.width=e.width,c.height=e.height),c}this.allocateTextureUnit=function(){let e=w;return e>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+i.maxTextures),w+=1,e},this.resetTextureUnits=function(){w=0},this.setTexture2D=E,this.setTexture2DArray=function(t,i){let a=r.get(t);if(!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version)return void L(a,t,i);n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function(t,i){let a=r.get(t);if(!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version)return void L(a,t,i);n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,s){let o=r.get(t);if(t.version>0&&o.__version!==t.version)return void function(t,s,o){if(6!==s.image.length)return;let l=P(t,s),u=s.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);let c=r.get(u);if(u.version!==c.__version||!0===l){let t;n.activeTexture(e.TEXTURE0+o);let r=n8.getPrimaries(n8.workingColorSpace),h=s.colorSpace===tK?null:n8.getPrimaries(s.colorSpace),d=s.colorSpace===tK||r===h?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);let p=s.isCompressedTexture||s.image[0].isCompressedTexture,f=s.image[0]&&s.image[0].isDataTexture,_=[];for(let e=0;e<6;e++)p||f?_[e]=f?s.image[e].image:s.image[e]:_[e]=m(s.image[e],!0,i.maxCubemapSize),_[e]=H(s,_[e]);let b=_[0],S=a.convert(s.format,s.colorSpace),M=a.convert(s.type),w=y(s.internalFormat,S,M,s.colorSpace),E=!0!==s.isVideoTexture,T=void 0===c.__version||!0===l,A=u.dataReady,C=x(s,b);if(R(e.TEXTURE_CUBE_MAP,s),p){E&&T&&n.texStorage2D(e.TEXTURE_CUBE_MAP,C,w,b.width,b.height);for(let r=0;r<6;r++){t=_[r].mipmaps;for(let i=0;i0&&C++;let r=V(_[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,C,w,r.width,r.height)}for(let r=0;r<6;r++)if(f){E?A&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,0,0,_[r].width,_[r].height,S,M,_[r].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,w,_[r].width,_[r].height,0,S,M,_[r].data);for(let i=0;i1;if(!h&&(void 0===l.__webglTexture&&(l.__webglTexture=e.createTexture()),l.__version=i.version,s.memory.textures++),c){o.__webglFramebuffer=[];for(let t=0;t<6;t++)if(i.mipmaps&&i.mipmaps.length>0){o.__webglFramebuffer[t]=[];for(let n=0;n0){o.__webglFramebuffer=[];for(let t=0;t0&&!1===B(t)){o.__webglMultisampledFramebuffer=e.createFramebuffer(),o.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,o.__webglMultisampledFramebuffer);for(let n=0;n0)for(let r=0;r0)for(let n=0;n0){if(!1===B(t)){let i=t.textures,a=t.width,s=t.height,o=e.COLOR_BUFFER_BIT,l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,c=r.get(t),h=i.length>1;if(h)for(let t=0;t0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer);for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:tK,a=n8.getTransfer(i);if(n===ez)return e.UNSIGNED_BYTE;if(n===eq)return e.UNSIGNED_SHORT_4_4_4_4;if(n===eY)return e.UNSIGNED_SHORT_5_5_5_1;if(n===eZ)return e.UNSIGNED_INT_5_9_9_9_REV;if(n===eK)return e.UNSIGNED_INT_10F_11F_11F_REV;if(n===eB)return e.BYTE;if(n===eH)return e.SHORT;if(n===eV)return e.UNSIGNED_SHORT;if(n===eG)return e.INT;if(n===eW)return e.UNSIGNED_INT;if(n===ej)return e.FLOAT;if(n===eX)return e.HALF_FLOAT;if(n===e$)return e.ALPHA;if(n===eQ)return e.RGB;if(n===e0)return e.RGBA;if(n===e1)return e.DEPTH_COMPONENT;if(n===e2)return e.DEPTH_STENCIL;if(n===e3)return e.RED;if(n===e4)return e.RED_INTEGER;if(n===e5)return e.RG;if(n===e6)return e.RG_INTEGER;if(n===e9)return e.RGBA_INTEGER;if(n===e7||n===te||n===tt||n===tn)if(a===t1){if(null===(r=t.get("WEBGL_compressed_texture_s3tc_srgb")))return null;if(n===e7)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===tt)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===tn)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(null===(r=t.get("WEBGL_compressed_texture_s3tc")))return null;if(n===e7)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===tt)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===tn)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===tr||n===ti||n===ta||n===ts){if(null===(r=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(n===tr)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ti)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===ta)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ts)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===to||n===tl||n===tu){if(null===(r=t.get("WEBGL_compressed_texture_etc")))return null;if(n===to||n===tl)return a===t1?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===tu)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}if(n===tc||n===th||n===td||n===tp||n===tf||n===tm||n===tg||n===tv||n===ty||n===t_||n===tx||n===tb||n===tS||n===tM){if(null===(r=t.get("WEBGL_compressed_texture_astc")))return null;if(n===tc)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===th)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===td)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===tp)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===tf)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===tm)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===tg)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===tv)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===ty)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===t_)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===tx)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===tb)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===tS)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===tM)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===tw||n===tE||n===tT){if(null===(r=t.get("EXT_texture_compression_bptc")))return null;if(n===tw)return a===t1?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===tE)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===tT)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(n===tA||n===tC||n===tR||n===tP){if(null===(r=t.get("EXT_texture_compression_rgtc")))return null;if(n===tA)return r.COMPRESSED_RED_RGTC1_EXT;if(n===tC)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===tR)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===tP)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return n===eJ?e.UNSIGNED_INT_24_8:void 0!==e[n]?e[n]:null}}}class dZ{init(e,t){if(null===this.texture){let n=new s9(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(null!==this.texture&&null===this.mesh){let t=e.cameras[0].viewport,n=new au({vertexShader:"\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n if ( coord.x >= 1.0 ) {\n\n gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n } else {\n\n gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n }\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new an(new o4(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}}class dK extends nL{constructor(e,t){super();let n=this,r=null,i=1,a=null,s="local-floor",o=1,l=null,u=null,c=null,h=null,d=null,p=null,f="undefined"!=typeof XRWebGLBinding,m=new dZ,g={},v=t.getContextAttributes(),y=null,_=null,x=[],b=[],S=new nW,M=null,w=new af;w.viewport=new ro;let E=new af;E.viewport=new ro;let T=[w,E],A=new uS,C=null,R=null;function P(e){let t=b.indexOf(e.inputSource);if(-1===t)return;let n=x[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function I(){r.removeEventListener("select",P),r.removeEventListener("selectstart",P),r.removeEventListener("selectend",P),r.removeEventListener("squeeze",P),r.removeEventListener("squeezestart",P),r.removeEventListener("squeezeend",P),r.removeEventListener("end",I),r.removeEventListener("inputsourceschange",L);for(let e=0;e=0&&(b[r]=null,x[r].disconnect(n))}for(let t=0;t=b.length){b.push(n),r=e;break}else if(null===b[e]){b[e]=n,r=e;break}if(-1===r)break}let i=x[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=x[e];return void 0===t&&(t=new ax,x[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=x[e];return void 0===t&&(t=new ax,x[e]=t),t.getGripSpace()},this.getHand=function(e){let t=x[e];return void 0===t&&(t=new ax,x[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==h?h:d},this.getBinding=function(){return null===c&&f&&(c=new XRWebGLBinding(r,t)),c},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(u){if(null!==(r=u)){if(y=e.getRenderTarget(),r.addEventListener("select",P),r.addEventListener("selectstart",P),r.addEventListener("selectend",P),r.addEventListener("squeeze",P),r.addEventListener("squeezestart",P),r.addEventListener("squeezeend",P),r.addEventListener("end",I),r.addEventListener("inputsourceschange",L),!0!==v.xrCompatible&&await t.makeXRCompatible(),M=e.getPixelRatio(),e.getSize(S),f&&"createProjectionLayer"in XRWebGLBinding.prototype){let n=null,a=null,s=null;v.depth&&(s=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=v.stencil?e2:e1,a=v.stencil?eJ:eW);let o={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:i};h=(c=this.getBinding()).createProjectionLayer(o),r.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),_=new ru(h.textureWidth,h.textureHeight,{format:e0,type:ez,depthTexture:new s8(h.textureWidth,h.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:4*!!v.antialias,resolveDepthBuffer:!1===h.ignoreDepthValues,resolveStencilBuffer:!1===h.ignoreDepthValues})}else{let n={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:i};d=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:d}),e.setPixelRatio(1),e.setSize(d.framebufferWidth,d.framebufferHeight,!1),_=new ru(d.framebufferWidth,d.framebufferHeight,{format:e0,type:ez,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:!1===d.ignoreDepthValues,resolveStencilBuffer:!1===d.ignoreDepthValues})}_.isXRRenderTarget=!0,this.setFoveation(o),l=null,a=await r.requestReferenceSpace(s),F.setContext(r),F.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};let N=new nX,D=new nX;function U(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){var t,n,i;if(null===r)return;let a=e.near,s=e.far;null!==m.texture&&(m.depthNear>0&&(a=m.depthNear),m.depthFar>0&&(s=m.depthFar)),A.near=E.near=w.near=a,A.far=E.far=w.far=s,(C!==A.near||R!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),C=A.near,R=A.far),A.layers.mask=6|e.layers.mask,w.layers.mask=3&A.layers.mask,E.layers.mask=5&A.layers.mask;let o=e.parent,l=A.cameras;U(A,o);for(let e=0;e0&&(e.alphaTest.value=r.alphaTest);let i=t.get(r),a=i.envMap,s=i.envMapRotation;a&&(e.envMap.value=a,d$.copy(s),d$.x*=-1,d$.y*=-1,d$.z*=-1,a.isCubeTexture&&!1===a.isRenderTargetTexture&&(d$.y*=-1,d$.z*=-1),e.envMapRotation.value.setFromMatrix4(dQ.makeRotationFromEuler(d$)),e.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,ao(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,a,s,o){var l,u,c,h,d,p,f,m,g,v,y,_,x,b,S,M,w,T,A,C,R;i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),l=e,(u=i).gradientMap&&(l.gradientMap.value=u.gradientMap)):i.isMeshPhongMaterial?(r(e,i),c=e,h=i,c.specular.value.copy(h.specular),c.shininess.value=Math.max(h.shininess,1e-4)):i.isMeshStandardMaterial?(r(e,i),d=e,p=i,d.metalness.value=p.metalness,p.metalnessMap&&(d.metalnessMap.value=p.metalnessMap,n(p.metalnessMap,d.metalnessMapTransform)),d.roughness.value=p.roughness,p.roughnessMap&&(d.roughnessMap.value=p.roughnessMap,n(p.roughnessMap,d.roughnessMapTransform)),p.envMap&&(d.envMapIntensity.value=p.envMapIntensity),i.isMeshPhysicalMaterial&&(f=e,m=i,g=o,f.ior.value=m.ior,m.sheen>0&&(f.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),f.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(f.sheenColorMap.value=m.sheenColorMap,n(m.sheenColorMap,f.sheenColorMapTransform)),m.sheenRoughnessMap&&(f.sheenRoughnessMap.value=m.sheenRoughnessMap,n(m.sheenRoughnessMap,f.sheenRoughnessMapTransform))),m.clearcoat>0&&(f.clearcoat.value=m.clearcoat,f.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(f.clearcoatMap.value=m.clearcoatMap,n(m.clearcoatMap,f.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,n(m.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(f.clearcoatNormalMap.value=m.clearcoatNormalMap,n(m.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===E&&f.clearcoatNormalScale.value.negate())),m.dispersion>0&&(f.dispersion.value=m.dispersion),m.iridescence>0&&(f.iridescence.value=m.iridescence,f.iridescenceIOR.value=m.iridescenceIOR,f.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(f.iridescenceMap.value=m.iridescenceMap,n(m.iridescenceMap,f.iridescenceMapTransform)),m.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=m.iridescenceThicknessMap,n(m.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),m.transmission>0&&(f.transmission.value=m.transmission,f.transmissionSamplerMap.value=g.texture,f.transmissionSamplerSize.value.set(g.width,g.height),m.transmissionMap&&(f.transmissionMap.value=m.transmissionMap,n(m.transmissionMap,f.transmissionMapTransform)),f.thickness.value=m.thickness,m.thicknessMap&&(f.thicknessMap.value=m.thicknessMap,n(m.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=m.attenuationDistance,f.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(f.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(f.anisotropyMap.value=m.anisotropyMap,n(m.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=m.specularIntensity,f.specularColor.value.copy(m.specularColor),m.specularColorMap&&(f.specularColorMap.value=m.specularColorMap,n(m.specularColorMap,f.specularColorMapTransform)),m.specularIntensityMap&&(f.specularIntensityMap.value=m.specularIntensityMap,n(m.specularIntensityMap,f.specularIntensityMapTransform)))):i.isMeshMatcapMaterial?(r(e,i),v=e,(y=i).matcap&&(v.matcap.value=y.matcap)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(_=e,x=i,_.diffuse.value.copy(x.color),_.opacity.value=x.opacity,x.map&&(_.map.value=x.map,n(x.map,_.mapTransform)),i.isLineDashedMaterial&&(b=e,S=i,b.dashSize.value=S.dashSize,b.totalSize.value=S.dashSize+S.gapSize,b.scale.value=S.scale)):i.isPointsMaterial?(M=e,w=i,T=a,A=s,M.diffuse.value.copy(w.color),M.opacity.value=w.opacity,M.size.value=w.size*T,M.scale.value=.5*A,w.map&&(M.map.value=w.map,n(w.map,M.uvTransform)),w.alphaMap&&(M.alphaMap.value=w.alphaMap,n(w.alphaMap,M.alphaMapTransform)),w.alphaTest>0&&(M.alphaTest.value=w.alphaTest)):i.isSpriteMaterial?(C=e,R=i,C.diffuse.value.copy(R.color),C.opacity.value=R.opacity,C.rotation.value=R.rotation,R.map&&(C.map.value=R.map,n(R.map,C.mapTransform)),R.alphaMap&&(C.alphaMap.value=R.alphaMap,n(R.alphaMap,C.alphaMapTransform)),R.alphaTest>0&&(C.alphaTest.value=R.alphaTest)):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function d1(e,t,n,r){let i={},a={},s=[],o=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function l(e){let t={boundary:0,storage:0};return"number"==typeof e||"boolean"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function u(t){let n=t.target;n.removeEventListener("dispose",u);let r=s.indexOf(n.__bindingPointIndex);s.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}return{bind:function(e,t){let n=t.program;r.uniformBlockBinding(e,n)},update:function(n,c){let h=i[n.id];void 0===h&&(function(e){let t=e.uniforms,n=0;for(let e=0,r=t.length;e0&&(n+=16-r),e.__size=n,e.__cache={}}(n),h=function(t){let n=function(){for(let e=0;e2)||void 0===arguments[2]||arguments[2];if(eT.isPresenting)return void console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");ea=e,es=t,P.width=Math.floor(e*eo),P.height=Math.floor(t*eo),!0===n&&(P.style.width=e+"px",P.style.height=t+"px"),this.setViewport(0,0,e,t)},this.getDrawingBufferSize=function(e){return e.set(ea*eo,es*eo).floor()},this.setDrawingBufferSize=function(e,t,n){ea=e,es=t,eo=n,P.width=Math.floor(e*n),P.height=Math.floor(t*n),this.setViewport(0,0,e,t)},this.getCurrentViewport=function(e){return e.copy(ee)},this.getViewport=function(e){return e.copy(eh)},this.setViewport=function(e,t,n,r){e.isVector4?eh.set(e.x,e.y,e.z,e.w):eh.set(e,t,n,r),i.viewport(ee.copy(eh).multiplyScalar(eo).round())},this.getScissor=function(e){return e.copy(ed)},this.setScissor=function(e,t,n,r){e.isVector4?ed.set(e.x,e.y,e.z,e.w):ed.set(e,t,n,r),i.scissor(et.copy(ed).multiplyScalar(eo).round())},this.getScissorTest=function(){return ep},this.setScissorTest=function(e){i.setScissorTest(ep=e)},this.setOpaqueSort=function(e){el=e},this.setTransparentSort=function(e){eu=e},this.getClearColor=function(e){return e.copy(x.getClearColor())},this.setClearColor=function(){x.setClearColor(...arguments)},this.getClearAlpha=function(){return x.getClearAlpha()},this.setClearAlpha=function(){x.setClearAlpha(...arguments)},this.clear=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=0;if(e){let e=!1;if(null!==K){let t=K.texture.format;e=t===e9||t===e6||t===e4}if(e){let e=K.texture.type,t=e===ez||e===eW||e===eV||e===eJ||e===eq||e===eY,n=x.getClearColor(),r=x.getClearAlpha(),i=n.r,a=n.g,s=n.b;t?(H[0]=i,H[1]=a,H[2]=s,H[3]=r,eM.clearBufferuiv(eM.COLOR,0,H)):(V[0]=i,V[1]=a,V[2]=s,V[3]=r,eM.clearBufferiv(eM.COLOR,0,V))}else r|=eM.COLOR_BUFFER_BIT}t&&(r|=eM.DEPTH_BUFFER_BIT),n&&(r|=eM.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(0xffffffff)),eM.clear(r)},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(){P.removeEventListener("webglcontextlost",eA,!1),P.removeEventListener("webglcontextrestored",eC,!1),P.removeEventListener("webglcontextcreationerror",eR,!1),x.dispose(),g.dispose(),v.dispose(),s.dispose(),l.dispose(),u.dispose(),d.dispose(),C.dispose(),R.dispose(),f.dispose(),eT.dispose(),eT.removeEventListener("sessionstart",eN),eT.removeEventListener("sessionend",eD),eU.stop()},this.renderBufferDirect=function(e,t,a,d,p,f){let g;null===t&&(t=ex);let v=p.isMesh&&0>p.matrixWorld.determinant(),_=function(e,t,n,a,c){var h,d;!0!==t.isScene&&(t=ex),o.resetTextureUnits();let p=t.fog,f=a.isMeshStandardMaterial?t.environment:null,g=null===K?q.outputColorSpace:!0===K.isXRRenderTarget?K.texture.colorSpace:tQ,v=(a.isMeshStandardMaterial?u:l).get(a.envMap||f),_=!0===a.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,x=!!n.attributes.tangent&&(!!a.normalMap||a.anisotropy>0),S=!!n.morphAttributes.position,M=!!n.morphAttributes.normal,w=!!n.morphAttributes.color,E=ec;a.toneMapped&&(null===K||!0===K.isXRRenderTarget)&&(E=q.toneMapping);let T=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,A=void 0!==T?T.length:0,C=s.get(a),P=W.state.lights;if(!0===em&&(!0===eg||e!==Q)){let t=e===Q&&a.id===$;y.setState(a,e,t)}let I=!1;a.version===C.__version?C.needsLights&&C.lightsStateVersion!==P.state.version||C.outputColorSpace!==g||c.isBatchedMesh&&!1===C.batching?I=!0:c.isBatchedMesh||!0!==C.batching?c.isBatchedMesh&&!0===C.batchingColor&&null===c.colorTexture||c.isBatchedMesh&&!1===C.batchingColor&&null!==c.colorTexture||c.isInstancedMesh&&!1===C.instancing?I=!0:c.isInstancedMesh||!0!==C.instancing?c.isSkinnedMesh&&!1===C.skinning?I=!0:c.isSkinnedMesh||!0!==C.skinning?c.isInstancedMesh&&!0===C.instancingColor&&null===c.instanceColor||c.isInstancedMesh&&!1===C.instancingColor&&null!==c.instanceColor||c.isInstancedMesh&&!0===C.instancingMorph&&null===c.morphTexture||c.isInstancedMesh&&!1===C.instancingMorph&&null!==c.morphTexture||C.envMap!==v||!0===a.fog&&C.fog!==p||void 0!==C.numClippingPlanes&&(C.numClippingPlanes!==y.numPlanes||C.numIntersection!==y.numIntersection)||C.vertexAlphas!==_||C.vertexTangents!==x||C.morphTargets!==S||C.morphNormals!==M||C.morphColors!==w||C.toneMapping!==E?I=!0:C.morphTargetsCount!==A&&(I=!0):I=!0:I=!0:I=!0:(I=!0,C.__version=a.version);let L=C.currentProgram;!0===I&&(L=ej(a,t,c));let N=!1,D=!1,U=!1,O=L.getUniforms(),F=C.uniforms;if(i.useProgram(L.program)&&(N=!0,D=!0,U=!0),a.id!==$&&($=a.id,D=!0),N||Q!==e){i.buffers.depth.getReversed()&&!0!==e.reversedDepth&&(e._reversedDepth=!0,e.updateProjectionMatrix()),O.setValue(eM,"projectionMatrix",e.projectionMatrix),O.setValue(eM,"viewMatrix",e.matrixWorldInverse);let t=O.map.cameraPosition;void 0!==t&&t.setValue(eM,ey.setFromMatrixPosition(e.matrixWorld)),r.logarithmicDepthBuffer&&O.setValue(eM,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(a.isMeshPhongMaterial||a.isMeshToonMaterial||a.isMeshLambertMaterial||a.isMeshBasicMaterial||a.isMeshStandardMaterial||a.isShaderMaterial)&&O.setValue(eM,"isOrthographic",!0===e.isOrthographicCamera),Q!==e&&(Q=e,D=!0,U=!0)}if(c.isSkinnedMesh){O.setOptional(eM,c,"bindMatrix"),O.setOptional(eM,c,"bindMatrixInverse");let e=c.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),O.setValue(eM,"boneTexture",e.boneTexture,o))}c.isBatchedMesh&&(O.setOptional(eM,c,"batchingTexture"),O.setValue(eM,"batchingTexture",c._matricesTexture,o),O.setOptional(eM,c,"batchingIdTexture"),O.setValue(eM,"batchingIdTexture",c._indirectTexture,o),O.setOptional(eM,c,"batchingColorTexture"),null!==c._colorsTexture&&O.setValue(eM,"batchingColorTexture",c._colorsTexture,o));let k=n.morphAttributes;if((void 0!==k.position||void 0!==k.normal||void 0!==k.color)&&b.update(c,n,L),(D||C.receiveShadow!==c.receiveShadow)&&(C.receiveShadow=c.receiveShadow,O.setValue(eM,"receiveShadow",c.receiveShadow)),a.isMeshGouraudMaterial&&null!==a.envMap&&(F.envMap.value=v,F.flipEnvMap.value=v.isCubeTexture&&!1===v.isRenderTargetTexture?-1:1),a.isMeshStandardMaterial&&null===a.envMap&&null!==t.environment&&(F.envMapIntensity.value=t.environmentIntensity),D&&(O.setValue(eM,"toneMappingExposure",q.toneMappingExposure),C.needsLights&&(h=F,d=U,h.ambientLightColor.needsUpdate=d,h.lightProbe.needsUpdate=d,h.directionalLights.needsUpdate=d,h.directionalLightShadows.needsUpdate=d,h.pointLights.needsUpdate=d,h.pointLightShadows.needsUpdate=d,h.spotLights.needsUpdate=d,h.spotLightShadows.needsUpdate=d,h.rectAreaLights.needsUpdate=d,h.hemisphereLights.needsUpdate=d),p&&!0===a.fog&&m.refreshFogUniforms(F,p),m.refreshMaterialUniforms(F,a,eo,es,W.state.transmissionRenderTarget[e.id]),dd.upload(eM,eZ(C),F,o)),a.isShaderMaterial&&!0===a.uniformsNeedUpdate&&(dd.upload(eM,eZ(C),F,o),a.uniformsNeedUpdate=!1),a.isSpriteMaterial&&O.setValue(eM,"center",c.center),O.setValue(eM,"modelViewMatrix",c.modelViewMatrix),O.setValue(eM,"normalMatrix",c.normalMatrix),O.setValue(eM,"modelMatrix",c.matrixWorld),a.isShaderMaterial||a.isRawShaderMaterial){let e=a.uniformsGroups;for(let t=0,n=e.length;t2&&void 0!==arguments[2]?arguments[2]:null;null===n&&(n=e),(W=v.get(n)).init(t),X.push(W),n.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(W.pushLight(e),e.castShadow&&W.pushShadow(e))}),e!==n&&e.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(W.pushLight(e),e.castShadow&&W.pushShadow(e))}),W.setupLights();let r=new Set;return e.traverse(function(e){if(!(e.isMesh||e.isPoints||e.isLine||e.isSprite))return;let t=e.material;if(t)if(Array.isArray(t))for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:null,i=this.compile(e,t,r);return new Promise(t=>{function r(){if(i.forEach(function(e){s.get(e).currentProgram.isReady()&&i.delete(e)}),0===i.size)return void t(e);setTimeout(r,10)}null!==n.get("KHR_parallel_shader_compile")?r():setTimeout(r,10)})};let eL=null;function eN(){eU.stop()}function eD(){eU.start()}let eU=new cW;function eO(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers)){if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)W.pushLight(e),e.castShadow&&W.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||ef.intersectsSprite(e)){r&&e_.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ev);let t=d.update(e),i=e.material;i.visible&&G.push(e,t,i,n,e_.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||ef.intersectsObject(e))){let t=d.update(e),i=e.material;if(r&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),e_.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),e_.copy(t.boundingSphere.center)),e_.applyMatrix4(e.matrixWorld).applyMatrix4(ev)),Array.isArray(i)){let r=t.groups;for(let a=0,s=r.length;a0&&eH(a,t,n),s.length>0&&eH(s,t,n),o.length>0&&eH(o,t,n),i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),i.setPolygonOffset(!1)}function eB(e,t,r,i){if(null!==(!0===r.isScene?r.overrideMaterial:null))return;void 0===W.state.transmissionRenderTarget[i.id]&&(W.state.transmissionRenderTarget[i.id]=new ru(1,1,{generateMipmaps:!0,type:n.has("EXT_color_buffer_half_float")||n.has("EXT_color_buffer_float")?eX:ez,minFilter:eF,samples:4,stencilBuffer:N,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:n8.workingColorSpace}));let a=W.state.transmissionRenderTarget[i.id],s=i.viewport||ee;a.setSize(s.z*q.transmissionResolutionScale,s.w*q.transmissionResolutionScale);let l=q.getRenderTarget(),u=q.getActiveCubeFace(),c=q.getActiveMipmapLevel();q.setRenderTarget(a),q.getClearColor(er),(ei=q.getClearAlpha())<1&&q.setClearColor(0xffffff,.5),q.clear(),eb&&x.render(r);let h=q.toneMapping;q.toneMapping=ec;let d=i.viewport;if(void 0!==i.viewport&&(i.viewport=void 0),W.setupLightsView(i),!0===em&&y.setGlobalState(q.clippingPlanes,i),eH(e,r,i),o.updateMultisampleRenderTarget(a),o.updateRenderTargetMipmap(a),!1===n.has("WEBGL_multisampled_render_to_texture")){let e=!1;for(let n=0,a=t.length;n0)for(let t=0,a=n.length;t0&&eB(r,i,e,t),eb&&x.render(e),ek(G,e,t);null!==K&&0===Z&&(o.updateMultisampleRenderTarget(K),o.updateRenderTargetMipmap(K)),!0===e.isScene&&e.onAfterRender(q,e,t),C.resetDefaultState(),$=-1,Q=null,X.pop(),X.length>0?(W=X[X.length-1],!0===em&&y.setGlobalState(q.clippingPlanes,W.state.camera)):W=null,j.pop(),G=j.length>0?j[j.length-1]:null},this.getActiveCubeFace=function(){return J},this.getActiveMipmapLevel=function(){return Z},this.getRenderTarget=function(){return K},this.setRenderTargetTextures=function(e,t,n){let r=s.get(e);r.__autoAllocateDepthBuffer=!1===e.resolveDepthBuffer,!1===r.__autoAllocateDepthBuffer&&(r.__useRenderToTexture=!1),s.get(e.texture).__webglTexture=t,s.get(e.depthTexture).__webglTexture=r.__autoAllocateDepthBuffer?void 0:n,r.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(e,t){let n=s.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t};let e$=eM.createFramebuffer();this.setRenderTarget=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;K=e,J=t,Z=n;let r=!0,a=null,l=!1,u=!1;if(e){let c=s.get(e);if(void 0!==c.__useDefaultFramebuffer)i.bindFramebuffer(eM.FRAMEBUFFER,null),r=!1;else if(void 0===c.__webglFramebuffer)o.setupRenderTarget(e);else if(c.__hasExternalTextures)o.rebindTextures(e,s.get(e.texture).__webglTexture,s.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){let t=e.depthTexture;if(c.__boundDepthTexture!==t){if(null!==t&&s.has(t)&&(e.width!==t.image.width||e.height!==t.image.height))throw Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");o.setupDepthRenderbuffer(e)}}let h=e.texture;(h.isData3DTexture||h.isDataArrayTexture||h.isCompressedArrayTexture)&&(u=!0);let d=s.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(a=Array.isArray(d[t])?d[t][n]:d[t],l=!0):a=e.samples>0&&!1===o.useMultisampledRTT(e)?s.get(e).__webglMultisampledFramebuffer:Array.isArray(d)?d[n]:d,ee.copy(e.viewport),et.copy(e.scissor),en=e.scissorTest}else ee.copy(eh).multiplyScalar(eo).floor(),et.copy(ed).multiplyScalar(eo).floor(),en=ep;if(0!==n&&(a=e$),i.bindFramebuffer(eM.FRAMEBUFFER,a)&&r&&i.drawBuffers(e,a),i.viewport(ee),i.scissor(et),i.setScissorTest(en),l){let r=s.get(e.texture);eM.framebufferTexture2D(eM.FRAMEBUFFER,eM.COLOR_ATTACHMENT0,eM.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(u)for(let r=0;r7&&void 0!==arguments[7]?arguments[7]:0;if(!(e&&e.isWebGLRenderTarget))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let h=s.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==u&&(h=h[u]),h){i.bindFramebuffer(eM.FRAMEBUFFER,h);try{let i=e.textures[c],s=i.format,u=i.type;if(!r.textureFormatReadable(s))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!r.textureTypeReadable(u))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-a&&n>=0&&n<=e.height-o&&(e.textures.length>1&&eM.readBuffer(eM.COLOR_ATTACHMENT0+c),eM.readPixels(t,n,a,o,A.convert(s),A.convert(u),l))}finally{let e=null!==K?s.get(K).__webglFramebuffer:null;i.bindFramebuffer(eM.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,a,o,l,u){let c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;if(!(e&&e.isWebGLRenderTarget))throw Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let h=s.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==u&&(h=h[u]),h)if(t>=0&&t<=e.width-a&&n>=0&&n<=e.height-o){i.bindFramebuffer(eM.FRAMEBUFFER,h);let u=e.textures[c],d=u.format,p=u.type;if(!r.textureFormatReadable(d))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!r.textureTypeReadable(p))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");let f=eM.createBuffer();eM.bindBuffer(eM.PIXEL_PACK_BUFFER,f),eM.bufferData(eM.PIXEL_PACK_BUFFER,l.byteLength,eM.STREAM_READ),e.textures.length>1&&eM.readBuffer(eM.COLOR_ATTACHMENT0+c),eM.readPixels(t,n,a,o,A.convert(d),A.convert(p),0);let m=null!==K?s.get(K).__webglFramebuffer:null;i.bindFramebuffer(eM.FRAMEBUFFER,m);let g=eM.fenceSync(eM.SYNC_GPU_COMMANDS_COMPLETE,0);return eM.flush(),await n4(eM,g,4),eM.bindBuffer(eM.PIXEL_PACK_BUFFER,f),eM.getBufferSubData(eM.PIXEL_PACK_BUFFER,0,l),eM.deleteBuffer(f),eM.deleteSync(g),l}else throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Math.pow(2,-n),a=Math.floor(e.image.width*r),s=Math.floor(e.image.height*r),l=null!==t?t.x:0,u=null!==t?t.y:0;o.setTexture2D(e,0),eM.copyTexSubImage2D(eM.TEXTURE_2D,n,0,0,l,u,a,s),i.unbindTexture()};let eQ=eM.createFramebuffer(),e0=eM.createFramebuffer();this.copyTextureToTexture=function(e,t){let n,r,a,l,u,c,h,d,p,f,m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,v=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,y=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;null===y&&(0!==v?(n3("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),y=v,v=0):y=0);let _=e.isCompressedTexture?e.mipmaps[y]:e.image;if(null!==m)n=m.max.x-m.min.x,r=m.max.y-m.min.y,a=m.isBox3?m.max.z-m.min.z:1,l=m.min.x,u=m.min.y,c=m.isBox3?m.min.z:0;else{let t=Math.pow(2,-v);n=Math.floor(_.width*t),r=Math.floor(_.height*t),a=e.isDataArrayTexture?_.depth:e.isData3DTexture?Math.floor(_.depth*t):1,l=0,u=0,c=0}null!==g?(h=g.x,d=g.y,p=g.z):(h=0,d=0,p=0);let x=A.convert(t.format),b=A.convert(t.type);t.isData3DTexture?(o.setTexture3D(t,0),f=eM.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(o.setTexture2DArray(t,0),f=eM.TEXTURE_2D_ARRAY):(o.setTexture2D(t,0),f=eM.TEXTURE_2D),eM.pixelStorei(eM.UNPACK_FLIP_Y_WEBGL,t.flipY),eM.pixelStorei(eM.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),eM.pixelStorei(eM.UNPACK_ALIGNMENT,t.unpackAlignment);let S=eM.getParameter(eM.UNPACK_ROW_LENGTH),M=eM.getParameter(eM.UNPACK_IMAGE_HEIGHT),w=eM.getParameter(eM.UNPACK_SKIP_PIXELS),E=eM.getParameter(eM.UNPACK_SKIP_ROWS),T=eM.getParameter(eM.UNPACK_SKIP_IMAGES);eM.pixelStorei(eM.UNPACK_ROW_LENGTH,_.width),eM.pixelStorei(eM.UNPACK_IMAGE_HEIGHT,_.height),eM.pixelStorei(eM.UNPACK_SKIP_PIXELS,l),eM.pixelStorei(eM.UNPACK_SKIP_ROWS,u),eM.pixelStorei(eM.UNPACK_SKIP_IMAGES,c);let C=e.isDataArrayTexture||e.isData3DTexture,R=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let o=s.get(e),f=s.get(t),m=s.get(o.__renderTarget),g=s.get(f.__renderTarget);i.bindFramebuffer(eM.READ_FRAMEBUFFER,m.__webglFramebuffer),i.bindFramebuffer(eM.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let i=0;id5],8155);let d4=e=>{let t,n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,i,a);return a},d5=e=>e?d4(e):d4,{useSyncExternalStoreWithSelector:d6}=d3.default,d8=e=>e,d9=(e,t)=>{let n=d5(e),r=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d8,n=arguments.length>2?arguments[2]:void 0,r=d6(e.subscribe,e.getState,e.getInitialState,t,n);return h.default.useDebugValue(r),r}(n,e,r)};return Object.assign(r,n),r},d7=(e,t)=>e?d9(e,t):d9,pe=[];function pt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e===t;if(e===t)return!0;if(!e||!t)return!1;let r=e.length;if(t.length!==r)return!1;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};for(let i of(null===t&&(t=[e]),pe))if(pt(t,i.keys,i.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(i,"error"))throw i.error;if(Object.prototype.hasOwnProperty.call(i,"response"))return r.lifespan&&r.lifespan>0&&(i.timeout&&clearTimeout(i.timeout),i.timeout=setTimeout(i.remove,r.lifespan)),i.response;if(!n)throw i.promise}let i={keys:t,equal:r.equal,remove:()=>{let e=pe.indexOf(i);-1!==e&&pe.splice(e,1)},promise:("object"==typeof e&&"function"==typeof e.then?e:e(...t)).then(e=>{i.response=e,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))}).catch(e=>i.error=e)};if(pe.push(i),!n)throw i.promise}var pr=e.i(98133),pi=e.i(95087),pa=e.i(43476);e.s(["FiberProvider",()=>pc,"traverseFiber",()=>po,"useContextBridge",()=>pf,"useFiber",()=>ph],46791);var ps=h;function po(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){let e=po(r,t,n);if(e)return e;r=t?null:r.sibling}}function pl(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}(()=>{var e,t;return"undefined"!=typeof window&&((null==(e=window.document)?void 0:e.createElement)||(null==(t=window.navigator)?void 0:t.product)==="ReactNative")})()?ps.useLayoutEffect:ps.useEffect;let pu=pl(ps.createContext(null));class pc extends ps.Component{render(){return ps.createElement(pu.Provider,{value:this._reactInternals},this.props.children)}}function ph(){let e=ps.useContext(pu);if(null===e)throw Error("its-fine: useFiber must be called within a !");let t=ps.useId();return ps.useMemo(()=>{for(let n of[e,null==e?void 0:e.alternate]){if(!n)continue;let e=po(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}let pd=Symbol.for("react.context"),pp=e=>null!==e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===pd;function pf(){let e=function(){let e=ph(),[t]=ps.useState(()=>new Map);t.clear();let n=e;for(;n;){let e=n.type;pp(e)&&e!==pu&&!t.has(e)&&t.set(e,ps.use(pl(e))),n=n.return}return t}();return ps.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>ps.createElement(t,null,ps.createElement(n.Provider,{...r,value:e.get(n)})),e=>ps.createElement(pc,{...e})),[e])}function pm(e){let t=e.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}h.act;let pg=e=>e&&e.hasOwnProperty("current"),pv=e=>null!=e&&("string"==typeof e||"number"==typeof e||e.isColor),py=((e,t)=>"undefined"!=typeof window&&((null==(e=window.document)?void 0:e.createElement)||(null==(t=window.navigator)?void 0:t.product)==="ReactNative"))()?h.useLayoutEffect:h.useEffect;function p_(e){let t=h.useRef(e);return py(()=>void(t.current=e),[e]),t}function px(){let e=ph(),t=pf();return h.useMemo(()=>n=>{let{children:r}=n,i=po(e,!0,e=>e.type===h.StrictMode)?h.StrictMode:h.Fragment;return(0,pa.jsx)(i,{children:(0,pa.jsx)(t,{children:r})})},[e,t])}function pb(e){let{set:t}=e;return py(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}let pS=(e=>((e=class extends h.Component{componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}constructor(...e){super(...e),this.state={error:!1}}}).getDerivedStateFromError=()=>({error:!0}),e))();function pM(e){var t;let n="undefined"!=typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],n),e[1]):e}function pw(e){var t;return null==(t=e.__r3f)?void 0:t.root.getState()}let pE={obj:e=>e===Object(e)&&!pE.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,nul:e=>null===e,arr:e=>Array.isArray(e),equ(e,t){let n,{arrays:r="shallow",objects:i="reference",strict:a=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(typeof e!=typeof t||!!e!=!!t)return!1;if(pE.str(e)||pE.num(e)||pE.boo(e))return e===t;let s=pE.obj(e);if(s&&"reference"===i)return e===t;let o=pE.arr(e);if(o&&"reference"===r)return e===t;if((o||s)&&e===t)return!0;for(n in e)if(!(n in t))return!1;if(s&&"shallow"===r&&"shallow"===i){for(n in a?t:e)if(!pE.equ(e[n],t[n],{strict:a,objects:"reference"}))return!1}else for(n in a?t:e)if(e[n]!==t[n])return!1;if(pE.und(n)){if(o&&0===e.length&&0===t.length||s&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}},pT=["children","key","ref"];function pA(e,t,n,r){let i=null==e?void 0:e.__r3f;return!i&&(i={root:t,type:n,parent:null,children:[],props:function(e){let t={};for(let n in e)pT.includes(n)||(t[n]=e[n]);return t}(r),object:e,eventCount:0,handlers:{},isHidden:!1},e&&(e.__r3f=i)),i}function pC(e,t){let n=e[t];if(!t.includes("-"))return{root:e,key:t,target:n};for(let i of(n=e,t.split("-"))){var r;t=i,e=n,n=null==(r=n)?void 0:r[t]}return{root:e,key:t,target:n}}let pR=/-\d+$/;function pP(e,t){if(pE.str(t.props.attach)){if(pR.test(t.props.attach)){let n=t.props.attach.replace(pR,""),{root:r,key:i}=pC(e.object,n);Array.isArray(r[i])||(r[i]=[])}let{root:n,key:r}=pC(e.object,t.props.attach);t.previousAttach=n[r],n[r]=t.object}else pE.fun(t.props.attach)&&(t.previousAttach=t.props.attach(e.object,t.object))}function pI(e,t){if(pE.str(t.props.attach)){let{root:n,key:r}=pC(e.object,t.props.attach),i=t.previousAttach;void 0===i?delete n[r]:n[r]=i}else null==t.previousAttach||t.previousAttach(e.object,t.object);delete t.previousAttach}let pL=[...pT,"args","dispose","attach","object","onUpdate","dispose"],pN=new Map,pD=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],pU=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function pO(e,t){var n,r;let i=e.__r3f,a=i&&pm(i).getState(),s=null==i?void 0:i.eventCount;for(let n in t){let s=t[n];if(pL.includes(n))continue;if(i&&pU.test(n)){"function"==typeof s?i.handlers[n]=s:delete i.handlers[n],i.eventCount=Object.keys(i.handlers).length;continue}if(void 0===s)continue;let{root:o,key:l,target:u}=pC(e,n);u instanceof r$&&s instanceof r$?u.mask=s.mask:u instanceof iE&&pv(s)?u.set(s):null!==u&&"object"==typeof u&&"function"==typeof u.set&&"function"==typeof u.copy&&null!=s&&s.constructor&&u.constructor===s.constructor?u.copy(s):null!==u&&"object"==typeof u&&"function"==typeof u.set&&Array.isArray(s)?"function"==typeof u.fromArray?u.fromArray(s):u.set(...s):null!==u&&"object"==typeof u&&"function"==typeof u.set&&"number"==typeof s?"function"==typeof u.setScalar?u.setScalar(s):u.set(s):(o[l]=s,a&&!a.linear&&pD.includes(l)&&null!=(r=o[l])&&r.isTexture&&o[l].format===e0&&o[l].type===ez&&(o[l].colorSpace=t$))}if(null!=i&&i.parent&&null!=a&&a.internal&&null!=(n=i.object)&&n.isObject3D&&s!==i.eventCount){let e=i.object,t=a.internal.interaction.indexOf(e);t>-1&&a.internal.interaction.splice(t,1),i.eventCount&&null!==e.raycast&&a.internal.interaction.push(e)}return i&&void 0===i.props.attach&&(i.object.isBufferGeometry?i.props.attach="geometry":i.object.isMaterial&&(i.props.attach="material")),i&&pF(i),e}function pF(e){var t;if(!e.parent)return;null==e.props.onUpdate||e.props.onUpdate(e.object);let n=null==(t=e.root)||null==t.getState?void 0:t.getState();n&&0===n.internal.frames&&n.invalidate()}function pk(e,t){!e.manual&&(e&&e.isOrthographicCamera?(e.left=-(t.width/2),e.right=t.width/2,e.top=t.height/2,e.bottom=-(t.height/2)):e.aspect=t.width/t.height,e.updateProjectionMatrix())}let pz=e=>null==e?void 0:e.isObject3D;function pB(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function pH(e,t,n,r){let i=n.get(t);i&&(n.delete(t),0===n.size&&(e.delete(r),i.target.releasePointerCapture(r)))}let pV=e=>!!(null!=e&&e.render),pG=h.createContext(null);function pW(){let e=h.useContext(pG);if(!e)throw Error("R3F: Hooks can only be used within the Canvas component!");return e}function pj(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e,t=arguments.length>1?arguments[1]:void 0;return pW()(e,t)}function pX(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=pW(),r=n.getState().internal.subscribe,i=p_(e);return py(()=>r(i,t,n),[t,r,n]),null}let pq=new WeakMap;function pY(e,t){return function(n){let r;for(var i,a=arguments.length,s=Array(a>1?a-1:0),o=1;onew Promise((n,i)=>r.load(e,e=>{pz(null==e?void 0:e.scene)&&Object.assign(e,function(e){let t={nodes:{},materials:{},meshes:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material),e.isMesh&&!t.meshes[e.name]&&(t.meshes[e.name]=e)}),t}(e.scene)),n(e)},t,t=>i(Error("Could not load ".concat(e,": ").concat(null==t?void 0:t.message)))))))}}function pJ(e,t,n,r){let i=Array.isArray(t)?t:[t],a=pn(pY(n,r),[e,...i],!1,{equal:pE.equ});return Array.isArray(t)?a:a[0]}pJ.preload=function(e,t,n){let r,i=Array.isArray(t)?t:[t];pn(pY(n),[e,...i],!0,r)},pJ.clear=function(e,t){var n=[e,...Array.isArray(t)?t:[t]];if(void 0===n||0===n.length)pe.splice(0,pe.length);else{let e=pe.find(e=>pt(n,e.keys,e.equal));e&&e.remove()}};let pZ={},pK=/^three(?=[A-Z])/,p$=e=>"".concat(e[0].toUpperCase()).concat(e.slice(1)),pQ=0;function p0(e){if("function"==typeof e){let t="".concat(pQ++);return pZ[t]=e,t}Object.assign(pZ,e)}function p1(e,t){let n=p$(e),r=pZ[n];if("primitive"!==e&&!r)throw Error("R3F: ".concat(n," is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively"));if("primitive"===e&&!t.object)throw Error("R3F: Primitives without 'object' are invalid!");if(void 0!==t.args&&!Array.isArray(t.args))throw Error("R3F: The args prop must be an array!")}function p2(e){if(e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?pP(e.parent,e):pz(e.object)&&!1!==e.props.visible&&(e.object.visible=!0),e.isHidden=!1,pF(e)}}function p3(e,t,n){let r=t.root.getState();if(e.parent||e.object===r.scene){if(!t.object){var i,a;let e=pZ[p$(t.type)];t.object=null!=(i=t.props.object)?i:new e(...null!=(a=t.props.args)?a:[]),t.object.__r3f=t}if(pO(t.object,t.props),t.props.attach)pP(e,t);else if(pz(t.object)&&pz(e.object)){let r=e.object.children.indexOf(null==n?void 0:n.object);if(n&&-1!==r){let n=e.object.children.indexOf(t.object);-1!==n?(e.object.children.splice(n,1),e.object.children.splice(n{try{e.dispose()}catch(e){}};"undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?t():(0,pi.unstable_scheduleCallback)(pi.unstable_IdlePriority,t)}}function p8(e,t,n){if(!t)return;t.parent=null;let r=e.children.indexOf(t);-1!==r&&e.children.splice(r,1),t.props.attach?pI(e,t):pz(t.object)&&pz(e.object)&&(e.object.remove(t.object),function(e,t){let{internal:n}=e.getState();n.interaction=n.interaction.filter(e=>e!==t),n.initialHits=n.initialHits.filter(e=>e!==t),n.hovered.forEach((e,r)=>{(e.eventObject===t||e.object===t)&&n.hovered.delete(r)}),n.capturedMap.forEach((e,r)=>{pH(n.capturedMap,t,e,r)})}(pm(t),t.object));let i=null!==t.props.dispose&&!1!==n;for(let e=t.children.length-1;e>=0;e--){let n=t.children[e];p8(t,n,i)}t.children.length=0,delete t.object.__r3f,i&&"primitive"!==t.type&&"Scene"!==t.object.type&&p6(t.object),void 0===n&&pF(t)}let p9=[],p7=()=>{},fe={},ft=0,fn=function(e){let t=(0,pr.default)(e);return t.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:h.version}),t}({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:function(e,t,n){var r;return p1(e=p$(e)in pZ?e:e.replace(pK,""),t),"primitive"===e&&null!=(r=t.object)&&r.__r3f&&delete t.object.__r3f,pA(t.object,n,e,t)},removeChild:p8,appendChild:p4,appendInitialChild:p4,insertBefore:p5,appendChildToContainer(e,t){let n=e.getState().scene.__r3f;t&&n&&p4(n,t)},removeChildFromContainer(e,t){let n=e.getState().scene.__r3f;t&&n&&p8(n,t)},insertInContainerBefore(e,t,n){let r=e.getState().scene.__r3f;t&&n&&r&&p5(r,t,n)},getRootHostContext:()=>fe,getChildHostContext:()=>fe,commitUpdate(e,t,n,r,i){var a,s,o;p1(t,r);let l=!1;if("primitive"===e.type&&n.object!==r.object||(null==(a=r.args)?void 0:a.length)!==(null==(s=n.args)?void 0:s.length)?l=!0:null!=(o=r.args)&&o.some((e,t)=>{var r;return e!==(null==(r=n.args)?void 0:r[t])})&&(l=!0),l)p9.push([e,{...r},i]);else{let t=function(e,t){let n={};for(let r in t)if(!pL.includes(r)&&!pE.equ(t[r],e.props[r]))for(let e in n[r]=t[r],t)e.startsWith("".concat(r,"-"))&&(n[e]=t[e]);for(let r in e.props){if(pL.includes(r)||t.hasOwnProperty(r))continue;let{root:i,key:a}=pC(e.object,r);if(i.constructor&&0===i.constructor.length){let e=function(e){let t=pN.get(e.constructor);try{t||(t=new e.constructor,pN.set(e.constructor,t))}catch(e){}return t}(i);pE.und(e)||(n[a]=e[a])}else n[a]=0}return n}(e,r);Object.keys(t).length&&(Object.assign(e.props,t),pO(e.object,t))}(null===i.sibling||(4&i.flags)==0)&&function(){for(let[e]of p9){let t=e.parent;if(t)for(let n of(e.props.attach?pI(t,e):pz(e.object)&&pz(t.object)&&t.object.remove(e.object),e.children))n.props.attach?pI(e,n):pz(n.object)&&pz(e.object)&&e.object.remove(n.object);e.isHidden&&p2(e),e.object.__r3f&&delete e.object.__r3f,"primitive"!==e.type&&p6(e.object)}for(let[r,i,a]of p9){r.props=i;let s=r.parent;if(s){let i=pZ[p$(r.type)];r.object=null!=(e=r.props.object)?e:new i(...null!=(t=r.props.args)?t:[]),r.object.__r3f=r;var e,t,n=r.object;for(let e of[a,a.alternate])if(null!==e)if("function"==typeof e.ref){null==e.refCleanup||e.refCleanup();let t=e.ref(n);"function"==typeof t&&(e.refCleanup=t)}else e.ref&&(e.ref.current=n);for(let e of(pO(r.object,r.props),r.props.attach?pP(s,r):pz(r.object)&&pz(s.object)&&s.object.add(r.object),r.children))e.props.attach?pP(r,e):pz(e.object)&&pz(r.object)&&r.object.add(e.object);pF(r)}}p9.length=0}()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:e=>null==e?void 0:e.object,prepareForCommit:()=>null,preparePortalMount:e=>pA(e.getState().scene,e,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:function(e){if(!e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?pI(e.parent,e):pz(e.object)&&(e.object.visible=!1),e.isHidden=!0,pF(e)}},unhideInstance:p2,createTextInstance:p7,hideTextInstance:p7,unhideTextInstance:p7,scheduleTimeout:"function"==typeof setTimeout?setTimeout:void 0,cancelTimeout:"function"==typeof clearTimeout?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:h.createContext(null),setCurrentUpdatePriority(e){ft=e},getCurrentUpdatePriority:()=>ft,resolveUpdatePriority(){var e;if(0!==ft)return ft;switch("undefined"!=typeof window&&(null==(e=window.event)?void 0:e.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return d.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return d.ContinuousEventPriority;default:return d.DefaultEventPriority}},resetFormInstance(){}}),fr=new Map,fi={objects:"shallow",strict:!1};function fa(e){let t,n,r=fr.get(e),i=null==r?void 0:r.fiber,a=null==r?void 0:r.store;r&&console.warn("R3F.createRoot should only be called once!");let s="function"==typeof reportError?reportError:console.error,o=a||((e,t)=>{let n=d7((n,r)=>{let i,a=new nX,s=new nX,o=new nX;function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r().camera,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r().size,{width:i,height:l,top:u,left:c}=n,h=i/l;t.isVector3?o.copy(t):o.set(...t);let d=e.getWorldPosition(a).distanceTo(o);if(e&&e.isOrthographicCamera)return{width:i/e.zoom,height:l/e.zoom,top:u,left:c,factor:1,distance:d,aspect:h};{let t=2*Math.tan(e.fov*Math.PI/180/2)*d,n=i/l*t;return{width:n,height:t,top:u,left:c,factor:i/n,distance:d,aspect:h}}}let u=e=>n(t=>({performance:{...t.performance,current:e}})),c=new nW;return{set:n,get:r,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return e(r(),t)},advance:(e,n)=>t(e,n,r()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new uM,pointer:c,mouse:c,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{let e=r();i&&clearTimeout(i),e.performance.current!==e.performance.min&&u(e.performance.min),i=setTimeout(()=>u(r().performance.max),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:l},setEvents:e=>n(t=>({...t,events:{...t.events,...e}})),setSize:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=r().camera,u={width:e,height:t,top:i,left:a};n(e=>({size:u,viewport:{...e.viewport,...l(o,s,u)}}))},setDpr:e=>n(t=>{let n=pM(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}}),setFrameloop:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"always",t=r().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),n(()=>({frameloop:e}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:h.createRef(),active:!1,frames:0,priority:0,subscribe:(e,t,n)=>{let i=r().internal;return i.priority=i.priority+ +(t>0),i.subscribers.push({ref:e,priority:t,store:n}),i.subscribers=i.subscribers.sort((e,t)=>e.priority-t.priority),()=>{let n=r().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(t>0),n.subscribers=n.subscribers.filter(t=>t.ref!==e))}}}}}),r=n.getState(),i=r.size,a=r.viewport.dpr,s=r.camera;return n.subscribe(()=>{let{camera:e,size:t,viewport:r,gl:o,set:l}=n.getState();if(t.width!==i.width||t.height!==i.height||r.dpr!==a){i=t,a=r.dpr,pk(e,t),r.dpr>0&&o.setPixelRatio(r.dpr);let n="undefined"!=typeof HTMLCanvasElement&&o.domElement instanceof HTMLCanvasElement;o.setSize(t.width,t.height,n)}e!==s&&(s=e,l(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),n.subscribe(t=>e(t)),n})(fS,fM),l=i||fn.createContainer(o,d.ConcurrentRoot,null,!1,null,"",s,s,s,null);r||fr.set(e,{fiber:l,store:o});let u=!1,c=null;return{async configure(){var r,i;let a,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c=new Promise(e=>a=e);let{gl:l,size:h,scene:d,events:p,onCreated:f,shadows:m=!1,linear:g=!1,flat:v=!1,legacy:y=!1,orthographic:_=!1,frameloop:w="always",dpr:E=[1,2],performance:T,raycaster:A,camera:C,onPointerMissed:R}=s,P=o.getState(),I=P.gl;if(!P.gl){let t={canvas:e,powerPreference:"high-performance",antialias:!0,alpha:!0},n="function"==typeof l?await l(t):l;I=pV(n)?n:new d2({...t,...l}),P.set({gl:I})}let L=P.raycaster;L||P.set({raycaster:L=new u4});let{params:N,...D}=A||{};if(pE.equ(D,L,fi)||pO(L,{...D}),pE.equ(N,L.params,fi)||pO(L,{params:{...L.params,...N}}),!P.camera||P.camera===n&&!pE.equ(n,C,fi)){n=C;let e=null==C?void 0:C.isCamera,t=e?C:_?new l7(0,0,0,0,.1,1e3):new af(75,0,.1,1e3);!e&&(t.position.z=5,C&&(pO(t,C),!t.manual&&("aspect"in C||"left"in C||"right"in C||"bottom"in C||"top"in C)&&(t.manual=!0,t.updateProjectionMatrix())),P.camera||null!=C&&C.rotation||t.lookAt(0,0,0)),P.set({camera:t}),L.camera=t}if(!P.scene){let e;null!=d&&d.isScene?pA(e=d,o,"",{}):(pA(e=new aM,o,"",{}),d&&pO(e,d)),P.set({scene:e})}p&&!P.events.handlers&&P.set({events:p(o)});let U=function(e,t){if(!t&&"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){let{width:t,height:n,top:r,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:n,top:r,left:i}}return!t&&"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0}:{width:0,height:0,top:0,left:0,...t}}(e,h);if(pE.equ(U,P.size,fi)||P.setSize(U.width,U.height,U.top,U.left),E&&P.viewport.dpr!==pM(E)&&P.setDpr(E),P.frameloop!==w&&P.setFrameloop(w),P.onPointerMissed||P.set({onPointerMissed:R}),T&&!pE.equ(T,P.performance,fi)&&P.set(e=>({performance:{...e.performance,...T}})),!P.xr){let e=(e,t)=>{let n=o.getState();"never"!==n.frameloop&&fM(e,!0,n,t)},t=()=>{let t=o.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||fS(t)},n={connect(){let e=o.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){let e=o.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};"function"==typeof(null==(r=I.xr)?void 0:r.addEventListener)&&n.connect(),P.set({xr:n})}if(I.shadowMap){let e=I.shadowMap.enabled,t=I.shadowMap.type;I.shadowMap.enabled=!!m,pE.boo(m)?I.shadowMap.type=S:pE.str(m)?I.shadowMap.type=null!=(i=({basic:x,percentage:b,soft:S,variance:M})[m])?i:S:pE.obj(m)&&Object.assign(I.shadowMap,m),(e!==I.shadowMap.enabled||t!==I.shadowMap.type)&&(I.shadowMap.needsUpdate=!0)}return n8.enabled=!y,u||(I.outputColorSpace=g?tQ:t$,I.toneMapping=v?ec:ef),P.legacy!==y&&P.set(()=>({legacy:y})),P.linear!==g&&P.set(()=>({linear:g})),P.flat!==v&&P.set(()=>({flat:v})),!l||pE.fun(l)||pV(l)||pE.equ(l,I,fi)||pO(I,l),t=f,u=!0,a(),this},render(n){return u||c||this.configure(),c.then(()=>{fn.updateContainer((0,pa.jsx)(fs,{store:o,children:n,onCreated:t,rootElement:e}),l,null,()=>void 0)}),o},unmount(){fo(e)}}}function fs(e){let{store:t,children:n,onCreated:r,rootElement:i}=e;return py(()=>{let e=t.getState();e.set(e=>({internal:{...e.internal,active:!0}})),r&&r(e),t.getState().events.connected||null==e.events.connect||e.events.connect(i)},[]),(0,pa.jsx)(pG.Provider,{value:t,children:n})}function fo(e,t){let n=fr.get(e),r=null==n?void 0:n.fiber;if(r){let i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),fn.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(a=i.gl)||null==a.forceContextLoss||a.forceContextLoss(),null!=(s=i.gl)&&s.xr&&i.xr.disconnect();var n,r,a,s,o=i.scene;for(let e in"Scene"!==o.type&&(null==o.dispose||o.dispose()),o){let t=o[e];(null==t?void 0:t.type)!=="Scene"&&(null==t||null==t.dispose||t.dispose())}fr.delete(e),t&&t(e)}catch(e){}},500)})}}function fl(e,t,n){return(0,pa.jsx)(fu,{children:e,container:t,state:n})}function fu(e){let{state:t={},children:n,container:r}=e,{events:i,size:a,...s}=t,o=pW(),[l]=h.useState(()=>new u4),[u]=h.useState(()=>new nW),c=p_((e,t)=>{let n;if(t.camera&&a){let r=t.camera;n=e.viewport.getCurrentViewport(r,new nX,a),r!==e.camera&&pk(r,a)}return{...e,...t,scene:r,raycaster:l,pointer:u,mouse:u,previousRoot:o,events:{...e.events,...t.events,...i},size:{...e.size,...a},viewport:{...e.viewport,...n},setEvents:e=>t.set(t=>({...t,events:{...t.events,...e}}))}}),d=h.useMemo(()=>{let e=d7((e,t)=>({...s,set:e,get:t})),t=t=>e.setState(e=>c.current(t,e));return t(o.getState()),o.subscribe(t),e},[o,r]);return(0,pa.jsx)(pa.Fragment,{children:fn.createPortal((0,pa.jsx)(pG.Provider,{value:d,children:n}),d,null)})}function fc(e,t){let n={callback:e};return t.add(n),()=>void t.delete(n)}let fh=new Set,fd=new Set,fp=new Set,ff=e=>fc(e,fh),fm=e=>fc(e,fd);function fg(e,t){if(e.size)for(let{callback:n}of e.values())n(t)}function fv(e,t){switch(e){case"before":return fg(fh,t);case"after":return fg(fd,t);case"tail":return fg(fp,t)}}function fy(e,t,n){let r=t.clock.getDelta();"never"===t.frameloop&&"number"==typeof e&&(r=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),s=t.internal.subscribers;for(let e=0;e0)&&!(null!=(t=c.gl.xr)&&t.isPresenting)&&(l+=fy(e,c))}if(fx=!1,fv("after",e),0===l)return fv("tail",e),f_=!1,cancelAnimationFrame(u)}function fS(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!e)return fr.forEach(e=>fS(e.store.getState(),n));(null==(t=e.gl.xr)||!t.isPresenting)&&e.internal.active&&"never"!==e.frameloop&&(n>1?e.internal.frames=Math.min(60,e.internal.frames+n):fx?e.internal.frames=2:e.internal.frames=1,f_||(f_=!0,requestAnimationFrame(fb)))}function fM(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(t&&fv("before",e),n)fy(e,n,r);else for(let t of fr.values())fy(e,t.store.getState());t&&fv("after",e)}let fw={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function fE(e){let{handlePointer:t}=function(e){function t(e){return e.filter(e=>["Move","Over","Enter","Out","Leave"].some(t=>{var n;return null==(n=e.__r3f)?void 0:n.handlers["onPointer"+t]}))}function n(t){let{internal:n}=e.getState();for(let e of n.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){let r=e.eventObject.__r3f;if(n.hovered.delete(pB(e)),null!=r&&r.eventCount){let n=r.handlers,i={...e,intersections:t};null==n.onPointerOut||n.onPointerOut(i),null==n.onPointerLeave||n.onPointerLeave(i)}}}function r(e,t){for(let n=0;nn([]);case"onLostPointerCapture":return t=>{let{internal:r}=e.getState();"pointerId"in t&&r.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{r.capturedMap.has(t.pointerId)&&(r.capturedMap.delete(t.pointerId),n([]))})}}return function(a){let{onPointerMissed:s,internal:o}=e.getState();o.lastEvent.current=a;let l="onPointerMove"===i,u="onClick"===i||"onContextMenu"===i||"onDoubleClick"===i,c=function(t,n){let r=e.getState(),i=new Set,a=[],s=n?n(r.internal.interaction):r.internal.interaction;for(let e=0;e{let n=pw(e.object),r=pw(t.object);return n&&r&&r.events.priority-n.events.priority||e.distance-t.distance}).filter(e=>{let t=pB(e);return!i.has(t)&&(i.add(t),!0)});for(let e of(r.events.filter&&(o=r.events.filter(o,r)),o)){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&r.internal.capturedMap.has(t.pointerId))for(let e of r.internal.capturedMap.get(t.pointerId).values())i.has(pB(e.intersection))||a.push(e.intersection);return a}(a,l?t:void 0),h=u?function(t){let{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}(a):0;"onPointerDown"===i&&(o.initialClick=[a.offsetX,a.offsetY],o.initialHits=c.map(e=>e.eventObject)),u&&!c.length&&h<=2&&(r(a,o.interaction),s&&s(a)),l&&n(c),!function(e,t,r,i){if(e.length){let a={stopped:!1};for(let s of e){let o=pw(s.object);if(o||s.object.traverseAncestors(e=>{let t=pw(e);if(t)return o=t,!1}),o){let{raycaster:l,pointer:u,camera:c,internal:h}=o,d=new nX(u.x,u.y,0).unproject(c),p=e=>{var t,n;return null!=(t=null==(n=h.capturedMap.get(e))?void 0:n.has(s.eventObject))&&t},f=e=>{let n={intersection:s,target:t.target};h.capturedMap.has(e)?h.capturedMap.get(e).set(s.eventObject,n):h.capturedMap.set(e,new Map([[s.eventObject,n]])),t.target.setPointerCapture(e)},m=e=>{let t=h.capturedMap.get(e);t&&pH(h.capturedMap,s.eventObject,t,e)},g={};for(let e in t){let n=t[e];"function"!=typeof n&&(g[e]=n)}let v={...s,...g,pointer:u,intersections:e,stopped:a.stopped,delta:r,unprojectedPoint:d,ray:l.ray,camera:c,stopPropagation(){let r="pointerId"in t&&h.capturedMap.get(t.pointerId);(!r||r.has(s.eventObject))&&(v.stopped=a.stopped=!0,h.hovered.size&&Array.from(h.hovered.values()).find(e=>e.eventObject===s.eventObject)&&n([...e.slice(0,e.indexOf(s)),s]))},target:{hasPointerCapture:p,setPointerCapture:f,releasePointerCapture:m},currentTarget:{hasPointerCapture:p,setPointerCapture:f,releasePointerCapture:m},nativeEvent:t};if(i(v),!0===a.stopped)break}}}}(c,a,h,function(e){let t=e.eventObject,n=t.__r3f;if(!(null!=n&&n.eventCount))return;let s=n.handlers;if(l){if(s.onPointerOver||s.onPointerEnter||s.onPointerOut||s.onPointerLeave){let t=pB(e),n=o.hovered.get(t);n?n.stopped&&e.stopPropagation():(o.hovered.set(t,e),null==s.onPointerOver||s.onPointerOver(e),null==s.onPointerEnter||s.onPointerEnter(e))}null==s.onPointerMove||s.onPointerMove(e)}else{let n=s[i];n?(!u||o.initialHits.includes(t))&&(r(a,o.interaction.filter(e=>!o.initialHits.includes(e))),n(e)):u&&o.initialHits.includes(t)&&r(a,o.interaction.filter(e=>!o.initialHits.includes(e)))}})}}}}(e);return{priority:1,enabled:!0,compute(e,t,n){t.pointer.set(e.offsetX/t.size.width*2-1,-(2*(e.offsetY/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(fw).reduce((e,n)=>({...e,[n]:t(n)}),{}),update:()=>{var t;let{events:n,internal:r}=e.getState();null!=(t=r.lastEvent)&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{let{set:n,events:r}=e.getState();if(null==r.disconnect||r.disconnect(),n(e=>({events:{...e.events,connected:t}})),r.handlers)for(let e in r.handlers){let n=r.handlers[e],[i,a]=fw[e];t.addEventListener(i,n,{passive:a})}},disconnect:()=>{let{set:t,events:n}=e.getState();if(n.connected){if(n.handlers)for(let e in n.handlers){let t=n.handlers[e],[r]=fw[e];n.connected.removeEventListener(r,t)}t(e=>({events:{...e.events,connected:void 0}}))}}}}},99749,e=>{"use strict";function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.s(["_",()=>t])},53487,(e,t,n)=>{"use strict";let r="[^".concat("\\\\/","]"),i="[^/]",a="(?:".concat("\\/","|$)"),s="(?:^|".concat("\\/",")"),o="".concat("\\.","{1,2}").concat(a),l="(?!".concat(s).concat(o,")"),u="(?!".concat("\\.","{0,1}").concat(a,")"),c="(?!".concat(o,")"),h={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:a,DOTS_SLASH:o,NO_DOT:"(?!".concat("\\.",")"),NO_DOTS:l,NO_DOT_SLASH:u,NO_DOTS_SLASH:c,QMARK_NO_DOT:"[^.".concat("\\/","]"),STAR:"".concat(i,"*?"),START_ANCHOR:s,SEP:"/"},d={...h,SLASH_LITERAL:"[".concat("\\\\/","]"),QMARK:r,STAR:"".concat(r,"*?"),DOTS_SLASH:"".concat("\\.","{1,2}(?:[").concat("\\\\/","]|$)"),NO_DOT:"(?!".concat("\\.",")"),NO_DOTS:"(?!(?:^|[".concat("\\\\/","])").concat("\\.","{1,2}(?:[").concat("\\\\/","]|$))"),NO_DOT_SLASH:"(?!".concat("\\.","{0,1}(?:[").concat("\\\\/","]|$))"),NO_DOTS_SLASH:"(?!".concat("\\.","{1,2}(?:[").concat("\\\\/","]|$))"),QMARK_NO_DOT:"[^.".concat("\\\\/","]"),START_ANCHOR:"(?:^|[".concat("\\\\/","])"),END_ANCHOR:"(?:[".concat("\\\\/","]|$)"),SEP:"\\"};t.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:"))".concat(e.STAR,")")},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?d:h}},19241,(e,t,n)=>{"use strict";var r=e.i(47167);let{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:a,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:o}=e.r(53487);n.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),n.hasRegexChars=e=>s.test(e),n.isRegexChar=e=>1===e.length&&n.hasRegexChars(e),n.escapeRegex=e=>e.replace(o,"\\$1"),n.toPosixSlashes=e=>e.replace(i,"/"),n.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){let e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return void 0!==r.default&&!!r.default.platform&&"win32"===r.default.platform},n.removeBackslashes=e=>e.replace(a,e=>"\\"===e?"":e),n.escapeLast=(e,t,r)=>{let i=e.lastIndexOf(t,r);return -1===i?e:"\\"===e[i-1]?n.escapeLast(e,t,i-1):"".concat(e.slice(0,i),"\\").concat(e.slice(i))},n.removePrefix=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},n.wrapOutput=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains?"":"^",i=n.contains?"":"$",a="".concat(r,"(?:").concat(e,")").concat(i);return!0===t.negated&&(a="(?:^(?!".concat(a,").*$)")),a},n.basename=function(e){let{windows:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}},26094,(e,t,n)=>{"use strict";let r=e.r(19241),{CHAR_ASTERISK:i,CHAR_AT:a,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:o,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:f,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:v,CHAR_RIGHT_SQUARE_BRACKET:y}=e.r(53487),_=e=>e===c||e===s,x=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let n,b,S=t||{},M=e.length-1,w=!0===S.parts||!0===S.scanToEnd,E=[],T=[],A=[],C=e,R=-1,P=0,I=0,L=!1,N=!1,D=!1,U=!1,O=!1,F=!1,k=!1,z=!1,B=!1,H=!1,V=0,G={value:"",depth:0,isGlob:!1},W=()=>R>=M,j=()=>C.charCodeAt(R+1),X=()=>(n=b,C.charCodeAt(++R));for(;R0&&(Y=C.slice(0,P),C=C.slice(P),I-=P),q&&!0===D&&I>0?(q=C.slice(0,I),J=C.slice(I)):!0===D?(q="",J=C):q=C,q&&""!==q&&"/"!==q&&q!==C&&_(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===S.unescape&&(J&&(J=r.removeBackslashes(J)),q&&!0===k&&(q=r.removeBackslashes(q)));let Z={prefix:Y,input:e,start:P,base:q,glob:J,isBrace:L,isBracket:N,isGlob:D,isExtglob:U,isGlobstar:O,negated:z,negatedExtglob:B};if(!0===S.tokens&&(Z.maxDepth=0,_(b)||T.push(G),Z.tokens=T),!0===S.parts||!0===S.tokens){let t;for(let n=0;n{"use strict";let r=e.r(53487),i=e.r(19241),{MAX_LENGTH:a,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:u}=r,c=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();let n="[".concat(e.join("-"),"]");try{new RegExp(n)}catch(t){return e.map(e=>i.escapeRegex(e)).join("..")}return n},h=(e,t)=>"Missing ".concat(e,': "').concat(t,'" - use "\\\\').concat(t,'" to match literal characters'),d=(e,t)=>{let n;if("string"!=typeof e)throw TypeError("Expected a string");e=u[e]||e;let p={...t},f="number"==typeof p.maxLength?Math.min(a,p.maxLength):a,m=e.length;if(m>f)throw SyntaxError("Input length: ".concat(m,", exceeds maximum allowed length: ").concat(f));let g={type:"bos",value:"",output:p.prepend||""},v=[g],y=p.capture?"":"?:",_=r.globChars(p.windows),x=r.extglobChars(_),{DOT_LITERAL:b,PLUS_LITERAL:S,SLASH_LITERAL:M,ONE_CHAR:w,DOTS_SLASH:E,NO_DOT:T,NO_DOT_SLASH:A,NO_DOTS_SLASH:C,QMARK:R,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:L}=_,N=e=>"(".concat(y,"(?:(?!").concat(L).concat(e.dot?E:b,").)*?)"),D=p.dot?"":T,U=p.dot?R:P,O=!0===p.bash?N(p):I;p.capture&&(O="(".concat(O,")")),"boolean"==typeof p.noext&&(p.noextglob=p.noext);let F={input:e,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};m=(e=i.removePrefix(e,F)).length;let k=[],z=[],B=[],H=g,V=()=>F.index===m-1,G=F.peek=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return e[F.index+t]},W=F.advance=()=>e[++F.index]||"",j=()=>e.slice(F.index+1),X=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;F.consumed+=e,F.index+=t},q=e=>{F.output+=null!=e.output?e.output:e.value,X(e.value)},Y=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)W(),F.start++,e++;return e%2!=0&&(F.negated=!0,F.start++,!0)},J=e=>{F[e]++,B.push(e)},Z=e=>{F[e]--,B.pop()},K=e=>{if("globstar"===H.type){let t=F.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||k.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(F.output=F.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=O,F.output+=H.output)}if(k.length&&"paren"!==e.type&&(k[k.length-1].inner+=e.value),(e.value||e.output)&&q(e),H&&"text"===H.type&&"text"===e.type){H.output=(H.output||H.value)+e.value,H.value+=e.value;return}e.prev=H,v.push(e),H=e},$=(e,t)=>{let n={...x[t],conditions:1,inner:""};n.prev=H,n.parens=F.parens,n.output=F.output;let r=(p.capture?"(":"")+n.open;J("parens"),K({type:e,value:t,output:F.output?"":w}),K({type:"paren",extglob:!0,value:W(),output:r}),k.push(n)},Q=e=>{let r,i=e.close+(p.capture?")":"");if("negate"===e.type){let n=O;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(n=N(p)),(n!==O||V()||/^\)+$/.test(j()))&&(i=e.close=")$))".concat(n)),e.inner.includes("*")&&(r=j())&&/^\.[^\\/.]+$/.test(r)){let a=d(r,{...t,fastpaths:!1}).output;i=e.close=")".concat(a,")").concat(n,")")}"bos"===e.prev.type&&(F.negatedExtglob=!0)}K({type:"paren",extglob:!0,value:n,output:i}),Z("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,r=e.replace(l,(e,t,r,i,a,s)=>"\\"===i?(n=!0,e):"?"===i?t?t+i+(a?R.repeat(a.length):""):0===s?U+(a?R.repeat(a.length):""):R.repeat(r.length):"."===i?b.repeat(r.length):"*"===i?t?t+i+(a?O:""):O:t?e:"\\".concat(e));return(!0===n&&(r=!0===p.unescape?r.replace(/\\/g,""):r.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),r===e&&!0===p.contains)?F.output=e:F.output=i.wrapOutput(r,F,t),F}for(;!V();){if("\0"===(n=W()))continue;if("\\"===n){let e=G();if("/"===e&&!0!==p.bash||"."===e||";"===e)continue;if(!e){K({type:"text",value:n+="\\"});continue}let t=/^\\+/.exec(j()),r=0;if(t&&t[0].length>2&&(r=t[0].length,F.index+=r,r%2!=0&&(n+="\\")),!0===p.unescape?n=W():n+=W(),0===F.brackets){K({type:"text",value:n});continue}}if(F.brackets>0&&("]"!==n||"["===H.value||"[^"===H.value)){if(!1!==p.posix&&":"===n){let e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){let e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=s[H.value.slice(e+2)];if(n){H.value=t+n,F.backtrack=!0,W(),g.output||1!==v.indexOf(H)||(g.output=w);continue}}}("["===n&&":"!==G()||"-"===n&&"]"===G())&&(n="\\".concat(n)),"]"===n&&("["===H.value||"[^"===H.value)&&(n="\\".concat(n)),!0===p.posix&&"!"===n&&"["===H.value&&(n="^"),H.value+=n,q({value:n});continue}if(1===F.quotes&&'"'!==n){n=i.escapeRegex(n),H.value+=n,q({value:n});continue}if('"'===n){F.quotes=+(1!==F.quotes),!0===p.keepQuotes&&K({type:"text",value:n});continue}if("("===n){J("parens"),K({type:"paren",value:n});continue}if(")"===n){if(0===F.parens&&!0===p.strictBrackets)throw SyntaxError(h("opening","("));let e=k[k.length-1];if(e&&F.parens===e.parens+1){Q(k.pop());continue}K({type:"paren",value:n,output:F.parens?")":"\\)"}),Z("parens");continue}if("["===n){if(!0!==p.nobracket&&j().includes("]"))J("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw SyntaxError(h("closing","]"));n="\\".concat(n)}K({type:"bracket",value:n});continue}if("]"===n){if(!0===p.nobracket||H&&"bracket"===H.type&&1===H.value.length){K({type:"text",value:n,output:"\\".concat(n)});continue}if(0===F.brackets){if(!0===p.strictBrackets)throw SyntaxError(h("opening","["));K({type:"text",value:n,output:"\\".concat(n)});continue}Z("brackets");let e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(n="/".concat(n)),H.value+=n,q({value:n}),!1===p.literalBrackets||i.hasRegexChars(e))continue;let t=i.escapeRegex(H.value);if(F.output=F.output.slice(0,-H.value.length),!0===p.literalBrackets){F.output+=t,H.value=t;continue}H.value="(".concat(y).concat(t,"|").concat(H.value,")"),F.output+=H.value;continue}if("{"===n&&!0!==p.nobrace){J("braces");let e={type:"brace",value:n,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};z.push(e),K(e);continue}if("}"===n){let e=z[z.length-1];if(!0===p.nobrace||!e){K({type:"text",value:n,output:n});continue}let t=")";if(!0===e.dots){let e=v.slice(),n=[];for(let t=e.length-1;t>=0&&(v.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=c(n,p),F.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){let r=F.output.slice(0,e.outputIndex),i=F.tokens.slice(e.tokensIndex);for(let a of(e.value=e.output="\\{",n=t="\\}",F.output=r,i))F.output+=a.output||a.value}K({type:"brace",value:n,output:t}),Z("braces"),z.pop();continue}if("|"===n){k.length>0&&k[k.length-1].conditions++,K({type:"text",value:n});continue}if(","===n){let e=n,t=z[z.length-1];t&&"braces"===B[B.length-1]&&(t.comma=!0,e="|"),K({type:"comma",value:n,output:e});continue}if("/"===n){if("dot"===H.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",v.pop(),H=g;continue}K({type:"slash",value:n,output:M});continue}if("."===n){if(F.braces>0&&"dot"===H.type){"."===H.value&&(H.output=b);let e=z[z.length-1];H.type="dots",H.output+=n,H.value+=n,e.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==H.type&&"slash"!==H.type){K({type:"text",value:n,output:b});continue}K({type:"dot",value:n,output:b});continue}if("?"===n){if(!(H&&"("===H.value)&&!0!==p.noextglob&&"("===G()&&"?"!==G(2)){$("qmark",n);continue}if(H&&"paren"===H.type){let e=G(),t=n;("("!==H.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(j()))||(t="\\".concat(n)),K({type:"text",value:n,output:t});continue}if(!0!==p.dot&&("slash"===H.type||"bos"===H.type)){K({type:"qmark",value:n,output:P});continue}K({type:"qmark",value:n,output:R});continue}if("!"===n){if(!0!==p.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){$("negate",n);continue}if(!0!==p.nonegate&&0===F.index){Y();continue}}if("+"===n){if(!0!==p.noextglob&&"("===G()&&"?"!==G(2)){$("plus",n);continue}if(H&&"("===H.value||!1===p.regex){K({type:"plus",value:n,output:S});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||F.parens>0){K({type:"plus",value:n});continue}K({type:"plus",value:S});continue}if("@"===n){if(!0!==p.noextglob&&"("===G()&&"?"!==G(2)){K({type:"at",extglob:!0,value:n,output:""});continue}K({type:"text",value:n});continue}if("*"!==n){("$"===n||"^"===n)&&(n="\\".concat(n));let e=o.exec(j());e&&(n+=e[0],F.index+=e[0].length),K({type:"text",value:n});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=n,H.output=O,F.backtrack=!0,F.globstar=!0,X(n);continue}let t=j();if(!0!==p.noextglob&&/^\([^?]/.test(t)){$("star",n);continue}if("star"===H.type){if(!0===p.noglobstar){X(n);continue}let r=H.prev,i=r.prev,a="slash"===r.type||"bos"===r.type,s=i&&("star"===i.type||"globstar"===i.type);if(!0===p.bash&&(!a||t[0]&&"/"!==t[0])){K({type:"star",value:n,output:""});continue}let o=F.braces>0&&("comma"===r.type||"brace"===r.type),l=k.length&&("pipe"===r.type||"paren"===r.type);if(!a&&"paren"!==r.type&&!o&&!l){K({type:"star",value:n,output:""});continue}for(;"/**"===t.slice(0,3);){let n=e[F.index+4];if(n&&"/"!==n)break;t=t.slice(3),X("/**",3)}if("bos"===r.type&&V()){H.type="globstar",H.value+=n,H.output=N(p),F.output=H.output,F.globstar=!0,X(n);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!s&&V()){F.output=F.output.slice(0,-(r.output+H.output).length),r.output="(?:".concat(r.output),H.type="globstar",H.output=N(p)+(p.strictSlashes?")":"|$)"),H.value+=n,F.globstar=!0,F.output+=r.output+H.output,X(n);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===t[0]){let e=void 0!==t[1]?"|$":"";F.output=F.output.slice(0,-(r.output+H.output).length),r.output="(?:".concat(r.output),H.type="globstar",H.output="".concat(N(p)).concat(M,"|").concat(M).concat(e,")"),H.value+=n,F.output+=r.output+H.output,F.globstar=!0,X(n+W()),K({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===t[0]){H.type="globstar",H.value+=n,H.output="(?:^|".concat(M,"|").concat(N(p)).concat(M,")"),F.output=H.output,F.globstar=!0,X(n+W()),K({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-H.output.length),H.type="globstar",H.output=N(p),H.value+=n,F.output+=H.output,F.globstar=!0,X(n);continue}let r={type:"star",value:n,output:O};if(!0===p.bash){r.output=".*?",("bos"===H.type||"slash"===H.type)&&(r.output=D+r.output),K(r);continue}if(H&&("bracket"===H.type||"paren"===H.type)&&!0===p.regex){r.output=n,K(r);continue}(F.index===F.start||"slash"===H.type||"dot"===H.type)&&("dot"===H.type?(F.output+=A,H.output+=A):!0===p.dot?(F.output+=C,H.output+=C):(F.output+=D,H.output+=D),"*"!==G()&&(F.output+=w,H.output+=w)),K(r)}for(;F.brackets>0;){if(!0===p.strictBrackets)throw SyntaxError(h("closing","]"));F.output=i.escapeLast(F.output,"["),Z("brackets")}for(;F.parens>0;){if(!0===p.strictBrackets)throw SyntaxError(h("closing",")"));F.output=i.escapeLast(F.output,"("),Z("parens")}for(;F.braces>0;){if(!0===p.strictBrackets)throw SyntaxError(h("closing","}"));F.output=i.escapeLast(F.output,"{"),Z("braces")}if(!0!==p.strictSlashes&&("star"===H.type||"bracket"===H.type)&&K({type:"maybe_slash",value:"",output:"".concat(M,"?")}),!0===F.backtrack)for(let e of(F.output="",F.tokens))F.output+=null!=e.output?e.output:e.value,e.suffix&&(F.output+=e.suffix);return F};d.fastpaths=(e,t)=>{let n={...t},s="number"==typeof n.maxLength?Math.min(a,n.maxLength):a,o=e.length;if(o>s)throw SyntaxError("Input length: ".concat(o,", exceeds maximum allowed length: ").concat(s));e=u[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:c,ONE_CHAR:h,DOTS_SLASH:d,NO_DOT:p,NO_DOTS:f,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:v}=r.globChars(n.windows),y=n.dot?f:p,_=n.dot?m:p,x=n.capture?"":"?:",b=!0===n.bash?".*?":g;n.capture&&(b="(".concat(b,")"));let S=e=>!0===e.noglobstar?b:"(".concat(x,"(?:(?!").concat(v).concat(e.dot?d:l,").)*?)"),M=e=>{switch(e){case"*":return"".concat(y).concat(h).concat(b);case".*":return"".concat(l).concat(h).concat(b);case"*.*":return"".concat(y).concat(b).concat(l).concat(h).concat(b);case"*/*":return"".concat(y).concat(b).concat(c).concat(h).concat(_).concat(b);case"**":return y+S(n);case"**/*":return"(?:".concat(y).concat(S(n)).concat(c,")?").concat(_).concat(h).concat(b);case"**/*.*":return"(?:".concat(y).concat(S(n)).concat(c,")?").concat(_).concat(b).concat(l).concat(h).concat(b);case"**/.*":return"(?:".concat(y).concat(S(n)).concat(c,")?").concat(l).concat(h).concat(b);default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=M(t[1]);if(!n)return;return n+l+t[2]}}},w=M(i.removePrefix(e,{negated:!1,prefix:""}));return w&&!0!==n.strictSlashes&&(w+="".concat(c,"?")),w},t.exports=d},53174,(e,t,n)=>{"use strict";let r=e.r(26094),i=e.r(17932),a=e.r(19241),s=e.r(53487),o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Array.isArray(e)){let r=e.map(e=>o(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=e&&"object"==typeof e&&!Array.isArray(e)&&e.tokens&&e.input;if(""===e||"string"!=typeof e&&!r)throw TypeError("Expected pattern to be a non-empty string");let i=t||{},a=i.windows,s=r?o.compileRe(e,t):o.makeRe(e,t,!1,!0),l=s.state;delete s.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=o(i.ignore,e,n)}let c=function(n){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{isMatch:c,match:h,output:d}=o.test(n,s,t,{glob:e,posix:a}),p={glob:e,state:l,regex:s,posix:a,input:n,output:d,match:h,isMatch:c};return("function"==typeof i.onResult&&i.onResult(p),!1===c)?(p.isMatch=!1,!!r&&p):u(n)?("function"==typeof i.onIgnore&&i.onIgnore(p),p.isMatch=!1,!!r&&p):("function"==typeof i.onMatch&&i.onMatch(p),!r||p)};return n&&(c.state=l),c};o.test=function(e,t,n){let{glob:r,posix:i}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("string"!=typeof e)throw TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};let s=n||{},l=s.format||(i?a.toPosixSlashes:null),u=e===r,c=u&&l?l(e):e;return!1===u&&(u=(c=l?l(e):e)===r),(!1===u||!0===s.capture)&&(u=!0===s.matchBase||!0===s.basename?o.matchBase(e,t,n,i):t.exec(c)),{isMatch:!!u,match:u,output:c}},o.matchBase=(e,t,n)=>(t instanceof RegExp?t:o.makeRe(t,n)).test(a.basename(e)),o.isMatch=(e,t,n)=>o(t,n)(e),o.parse=(e,t)=>Array.isArray(e)?e.map(e=>o.parse(e,t)):i(e,{...t,fastpaths:!1}),o.scan=(e,t)=>r(e,t),o.compileRe=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!0===n)return e.output;let i=t||{},a=i.contains?"":"^",s=i.contains?"":"$",l="".concat(a,"(?:").concat(e.output,")").concat(s);e&&!0===e.negated&&(l="^(?!".concat(l,").*$"));let u=o.toRegex(l,t);return!0===r&&(u.state=e),u},o.makeRe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e||"string"!=typeof e)throw TypeError("Expected a non-empty string");let a={negated:!1,fastpaths:!0};return!1!==t.fastpaths&&("."===e[0]||"*"===e[0])&&(a.output=i.fastpaths(e,t)),a.output||(a=i(e,t)),o.compileRe(a,t,n,r)},o.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},o.constants=s,t.exports=o},54970,(e,t,n)=>{"use strict";let r=e.r(53174),i=e.r(19241);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t&&(null===t.windows||void 0===t.windows)&&(t={...t,windows:i.isWindows()}),r(e,t,n)}Object.assign(a,r),t.exports=a},98223,71726,91996,e=>{"use strict";function t(e){return e.split(/(?:\r\n|\r|\n)/g).map(e=>e.trim()).filter(Boolean).filter(e=>!e.startsWith(";")).map(e=>{let t=e.match(/^(.+)\s(\d+)$/);if(!t)return{name:e,frameCount:1};{let e=parseInt(t[2],10);return{name:t[1],frameCount:e}}})}e.s(["parseImageFileList",()=>t],98223),e.s(["getActualResourceKey",()=>l,"getMissionInfo",()=>d,"getMissionList",()=>p,"getResourceKey",()=>a,"getResourceList",()=>u,"getResourceMap",()=>s,"getSourceAndPath",()=>o,"getStandardTextureResourceKey",()=>h],91996);var n=e.i(63738);function r(e){return e.replace(/\\/g,"/").replace(/\/+/g,"/")}e.s(["normalizePath",()=>r],71726);let i=n.default;function a(e){return r(e).toLowerCase()}function s(){return i.resources}function o(e){let[t,...n]=i.resources[e],[r,a]=n[n.length-1];return[r,null!=a?a:t]}function l(e){let t=a(e);if(i.resources[t])return t;let n=t.replace(/\d+(\.(png))$/i,"$1");if(i.resources[n])return n;throw Error("Resource not found in manifest: ".concat(e))}function u(){return Object.keys(i.resources)}let c=["",".jpg",".png",".gif",".bmp"];function h(e){let t=a(e);for(let e of c){let n="".concat(t).concat(e);if(i.resources[n])return n}return t}function d(e){let t=i.missions[e];if(!t)throw Error("Mission not found: ".concat(e));return t}function p(){return Object.keys(i.missions)}},92552,(e,t,n)=>{"use strict";let r,i;function a(e,t){return t.reduce((e,t)=>{let[n,r]=t;return{type:"BinaryExpression",operator:n,left:e,right:r}},e)}function s(e,t){return{type:"UnaryExpression",operator:e,argument:t}}class o extends SyntaxError{format(e){let t="Error: "+this.message;if(this.location){let n=null,r=e.find(e=>e.source===this.location.source);r&&(n=r.text.split(/\r\n|\n|\r/g));let i=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,s=this.location.source+":"+a.line+":"+a.column;if(n){let e=this.location.end,r="".padEnd(a.line.toString().length," "),o=n[i.line-1],l=(i.line===e.line?e.column:o.length+1)-i.column||1;t+="\n --> "+s+"\n"+r+" |\n"+a.line+" | "+o+"\n"+r+" | "+"".padEnd(i.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function n(e){return e.codePointAt(0).toString(16).toUpperCase()}let r=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function i(e){return r?e.replace(r,e=>"\\u{"+n(e)+"}"):e}function a(e){return i(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+n(e)))}function s(e){return i(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+n(e)))}let o={literal:e=>'"'+a(e.text)+'"',class(e){let t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return o[e.type](e)}return"Expected "+function(e){let t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let n=1;n]/,C=/^[+\-]/,R=/^[%*\/]/,P=/^[!\-~]/,I=/^[a-zA-Z_]/,L=/^[a-zA-Z0-9_]/,N=/^[ \t]/,D=/^[^"\\\n\r]/,U=/^[^'\\\n\r]/,O=/^[0-9a-fA-F]/,F=/^[0-9]/,k=/^[xX]/,z=/^[^\n\r]/,B=/^[\n\r]/,H=/^[ \t\n\r]/,V=tT(";",!1),G=tT("package",!1),W=tT("{",!1),j=tT("}",!1),X=tT("function",!1),q=tT("(",!1),Y=tT(")",!1),J=tT("::",!1),Z=tT(",",!1),K=tT("datablock",!1),$=tT(":",!1),Q=tT("new",!1),ee=tT("[",!1),et=tT("]",!1),en=tT("=",!1),er=tT(".",!1),ei=tT("if",!1),ea=tT("else",!1),es=tT("for",!1),eo=tT("while",!1),el=tT("do",!1),eu=tT("switch$",!1),ec=tT("switch",!1),eh=tT("case",!1),ed=tT("default",!1),ep=tT("or",!1),ef=tT("return",!1),em=tT("break",!1),eg=tT("continue",!1),ev=tT("+=",!1),ey=tT("-=",!1),e_=tT("*=",!1),ex=tT("/=",!1),eb=tT("%=",!1),eS=tT("<<=",!1),eM=tT(">>=",!1),ew=tT("&=",!1),eE=tT("|=",!1),eT=tT("^=",!1),eA=tT("?",!1),eC=tT("||",!1),eR=tT("&&",!1),eP=tT("|",!1),eI=tT("^",!1),eL=tT("&",!1),eN=tT("==",!1),eD=tT("!=",!1),eU=tT("<=",!1),eO=tT(">=",!1),eF=tA(["<",">"],!1,!1,!1),ek=tT("$=",!1),ez=tT("!$=",!1),eB=tT("@",!1),eH=tT("NL",!1),eV=tT("TAB",!1),eG=tT("SPC",!1),eW=tT("<<",!1),ej=tT(">>",!1),eX=tA(["+","-"],!1,!1,!1),eq=tA(["%","*","/"],!1,!1,!1),eY=tA(["!","-","~"],!1,!1,!1),eJ=tT("++",!1),eZ=tT("--",!1),eK=tT("*",!1),e$=tT("%",!1),eQ=tA([["a","z"],["A","Z"],"_"],!1,!1,!1),e0=tA([["a","z"],["A","Z"],["0","9"],"_"],!1,!1,!1),e1=tT("$",!1),e2=tT("parent",!1),e3=tA([" "," "],!1,!1,!1),e4=tT('"',!1),e5=tT("'",!1),e6=tT("\\",!1),e8=tA(['"',"\\","\n","\r"],!0,!1,!1),e9=tA(["'","\\","\n","\r"],!0,!1,!1),e7=tT("n",!1),te=tT("r",!1),tt=tT("t",!1),tn=tT("x",!1),tr=tA([["0","9"],["a","f"],["A","F"]],!1,!1,!1),ti=tT("cr",!1),ta=tT("cp",!1),ts=tT("co",!1),to=tT("c",!1),tl=tA([["0","9"]],!1,!1,!1),tu={type:"any"},tc=tT("0",!1),th=tA(["x","X"],!1,!1,!1),td=tT("-",!1),tp=tT("true",!1),tf=tT("false",!1),tm=tT("//",!1),tg=tA(["\n","\r"],!0,!1,!1),tv=tA(["\n","\r"],!1,!1,!1),ty=tT("/*",!1),t_=tT("*/",!1),tx=tA([" "," ","\n","\r"],!1,!1,!1),tb=0|t.peg$currPos,tS=[{line:1,column:1}],tM=tb,tw=t.peg$maxFailExpected||[],tE=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in c))throw Error("Can't start parsing from rule \""+t.startRule+'".');h=c[t.startRule]}function tT(e,t){return{type:"literal",text:e,ignoreCase:t}}function tA(e,t,n,r){return{type:"class",parts:e,inverted:t,ignoreCase:n,unicode:r}}function tC(t){let n,r=tS[t];if(r)return r;if(t>=tS.length)n=tS.length-1;else for(n=t;!tS[--n];);for(r={line:(r=tS[n]).line,column:r.column};ntM&&(tM=tb,tw=[]),tw.push(e))}function tI(){let e,t,n;for(nh(),e=[],t=tb,(n=nl())===l&&(n=tL()),n!==l?t=n=[n,nh()]:(tb=t,t=l);t!==l;)e.push(t),t=tb,(n=nl())===l&&(n=tL()),n!==l?t=n=[n,nh()]:(tb=t,t=l);return{type:"Program",body:e.map(e=>{let[t]=e;return t}).filter(Boolean),execScriptPaths:Array.from(r),hasDynamicExec:i}}function tL(){let t,n,r,i,a,s,o,u,c,h,f,_,x,w,E,T,A;return(t=function(){let t,n,r,i,a,s,o,u;if(t=tb,e.substr(tb,7)===d?(n=d,tb+=7):(n=l,0===tE&&tP(G)),n!==l)if(nc()!==l)if((r=nr())!==l)if(nu(),123===e.charCodeAt(tb)?(i="{",tb++):(i=l,0===tE&&tP(W)),i!==l){for(nh(),a=[],s=tb,(o=nl())===l&&(o=tL()),o!==l?s=o=[o,u=nh()]:(tb=s,s=l);s!==l;)a.push(s),s=tb,(o=nl())===l&&(o=tL()),o!==l?s=o=[o,u=nh()]:(tb=s,s=l);(125===e.charCodeAt(tb)?(s="}",tb++):(s=l,0===tE&&tP(j)),s!==l)?(o=nu(),59===e.charCodeAt(tb)?(u=";",tb++):(u=l,0===tE&&tP(V)),u===l&&(u=null),t={type:"PackageDeclaration",name:r,body:a.map(e=>{let[t]=e;return t}).filter(Boolean)}):(tb=t,t=l)}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o;if(t=tb,e.substr(tb,8)===p?(n=p,tb+=8):(n=l,0===tE&&tP(X)),n!==l)if(nc()!==l)if((r=function(){let t,n,r,i;if(t=tb,(n=nr())!==l)if("::"===e.substr(tb,2)?(r="::",tb+=2):(r=l,0===tE&&tP(J)),r!==l)if((i=nr())!==l)t={type:"MethodName",namespace:n,method:i};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t===l&&(t=nr()),t}())!==l)if(nu(),40===e.charCodeAt(tb)?(i="(",tb++):(i=l,0===tE&&tP(q)),i!==l)if(nu(),(a=function(){let t,n,r,i,a,s,o,u;if(t=tb,(n=nr())!==l){for(r=[],i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=nr())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=nr())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);t=[n,...r.map(e=>{let[,,,t]=e;return t})]}else tb=t,t=l;return t}())===l&&(a=null),nu(),41===e.charCodeAt(tb)?(s=")",tb++):(s=l,0===tE&&tP(Y)),s!==l)if(nu(),(o=tH())!==l)t={type:"FunctionDeclaration",name:r,params:a||[],body:o};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&((r=tb,(i=tN())!==l)?(nu(),59===e.charCodeAt(tb)?(a=";",tb++):(a=l,0===tE&&tP(V)),a===l&&(a=null),nu(),r=i):(tb=r,r=l),(t=r)===l&&((s=tb,(o=tD())!==l)?(nu(),59===e.charCodeAt(tb)?(u=";",tb++):(u=l,0===tE&&tP(V)),u===l&&(u=null),nu(),s=o):(tb=s,s=l),(t=s)===l&&(t=function(){let t,n,r,i,a,s,o,u,c,h,d;if(t=tb,"if"===e.substr(tb,2)?(n="if",tb+=2):(n=l,0===tE&&tP(ei)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(a=")",tb++):(a=l,0===tE&&tP(Y)),a!==l)if(nu(),(s=tL())!==l){var p;o=tb,u=nu(),e.substr(tb,4)===m?(c=m,tb+=4):(c=l,0===tE&&tP(ea)),c!==l?(h=nu(),(d=tL())!==l?o=u=[u,c,h,d]:(tb=o,o=l)):(tb=o,o=l),o===l&&(o=null),t={type:"IfStatement",test:i,consequent:s,alternate:(p=o)?p[3]:null}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o,u,c,h;if(t=tb,"for"===e.substr(tb,3)?(n="for",tb+=3):(n=l,0===tE&&tP(es)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())===l&&(i=null),nu(),59===e.charCodeAt(tb)?(a=";",tb++):(a=l,0===tE&&tP(V)),a!==l)if(nu(),(s=tV())===l&&(s=null),nu(),59===e.charCodeAt(tb)?(o=";",tb++):(o=l,0===tE&&tP(V)),o!==l)if(nu(),(u=tV())===l&&(u=null),nu(),41===e.charCodeAt(tb)?(c=")",tb++):(c=l,0===tE&&tP(Y)),c!==l)if(nu(),(h=tL())!==l){var d,p;d=i,p=s,t={type:"ForStatement",init:d,test:p,update:u,body:h}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o,u;if(t=tb,"do"===e.substr(tb,2)?(n="do",tb+=2):(n=l,0===tE&&tP(el)),n!==l)if(nu(),(r=tL())!==l)if(nu(),e.substr(tb,5)===g?(i=g,tb+=5):(i=l,0===tE&&tP(eo)),i!==l)if(nu(),40===e.charCodeAt(tb)?(a="(",tb++):(a=l,0===tE&&tP(q)),a!==l)if(nu(),(s=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(o=")",tb++):(o=l,0===tE&&tP(Y)),o!==l)nu(),59===e.charCodeAt(tb)?(u=";",tb++):(u=l,0===tE&&tP(V)),u===l&&(u=null),t={type:"DoWhileStatement",test:s,body:r};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s;if(t=tb,e.substr(tb,5)===g?(n=g,tb+=5):(n=l,0===tE&&tP(eo)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(a=")",tb++):(a=l,0===tE&&tP(Y)),a!==l)if(nu(),(s=tL())!==l)t={type:"WhileStatement",test:i,body:s};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o,u,c,h;if(t=tb,e.substr(tb,7)===v?(n=v,tb+=7):(n=l,0===tE&&tP(eu)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(a=")",tb++):(a=l,0===tE&&tP(Y)),a!==l)if(nu(),123===e.charCodeAt(tb)?(s="{",tb++):(s=l,0===tE&&tP(W)),s!==l){for(nh(),o=[],u=tb,(c=nl())===l&&(c=tB()),c!==l?u=c=[c,h=nh()]:(tb=u,u=l);u!==l;)o.push(u),u=tb,(c=nl())===l&&(c=tB()),c!==l?u=c=[c,h=nh()]:(tb=u,u=l);(125===e.charCodeAt(tb)?(u="}",tb++):(u=l,0===tE&&tP(j)),u!==l)?t={type:"SwitchStatement",stringMode:!0,discriminant:i,cases:o.map(e=>{let[t]=e;return t}).filter(e=>e&&"SwitchCase"===e.type)}:(tb=t,t=l)}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;if(t===l)if(t=tb,e.substr(tb,6)===y?(n=y,tb+=6):(n=l,0===tE&&tP(ec)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(a=")",tb++):(a=l,0===tE&&tP(Y)),a!==l)if(nu(),123===e.charCodeAt(tb)?(s="{",tb++):(s=l,0===tE&&tP(W)),s!==l){for(nh(),o=[],u=tb,(c=nl())===l&&(c=tB()),c!==l?u=c=[c,h=nh()]:(tb=u,u=l);u!==l;)o.push(u),u=tb,(c=nl())===l&&(c=tB()),c!==l?u=c=[c,h=nh()]:(tb=u,u=l);(125===e.charCodeAt(tb)?(u="}",tb++):(u=l,0===tE&&tP(j)),u!==l)?t={type:"SwitchStatement",stringMode:!1,discriminant:i,cases:o.map(e=>{let[t]=e;return t}).filter(e=>e&&"SwitchCase"===e.type)}:(tb=t,t=l)}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a;if(t=tb,e.substr(tb,6)===b?(n=b,tb+=6):(n=l,0===tE&&tP(ef)),n!==l)if(r=tb,(i=nc())!==l&&(a=tV())!==l?r=i=[i,a]:(tb=r,r=l),r===l&&(r=null),i=nu(),59===e.charCodeAt(tb)?(a=";",tb++):(a=l,0===tE&&tP(V)),a!==l){var s;t={type:"ReturnStatement",value:(s=r)?s[1]:null}}else tb=t,t=l;else tb=t,t=l;return t}())===l&&(c=tb,e.substr(tb,5)===S?(h=S,tb+=5):(h=l,0===tE&&tP(em)),h!==l?(nu(),59===e.charCodeAt(tb)?(f=";",tb++):(f=l,0===tE&&tP(V)),f!==l?c={type:"BreakStatement"}:(tb=c,c=l)):(tb=c,c=l),(t=c)===l&&(_=tb,e.substr(tb,8)===M?(x=M,tb+=8):(x=l,0===tE&&tP(eg)),x!==l?(nu(),59===e.charCodeAt(tb)?(w=";",tb++):(w=l,0===tE&&tP(V)),w!==l?_={type:"ContinueStatement"}:(tb=_,_=l)):(tb=_,_=l),(t=_)===l&&((E=tb,(T=tV())!==l&&(nu(),59===e.charCodeAt(tb)?(A=";",tb++):(A=l,0===tE&&tP(V)),A!==l))?E={type:"ExpressionStatement",expression:T}:(tb=E,E=l),(t=E)===l&&(t=tH())===l&&(t=nl())===l)))))&&(t=tb,nu(),59===e.charCodeAt(tb)?(n=";",tb++):(n=l,0===tE&&tP(V)),n!==l?(nu(),t=null):(tb=t,t=l)),t}function tN(){let t,n,r,i,a,s,o,u,c,h,d,p,m,g;if(t=tb,e.substr(tb,9)===f?(n=f,tb+=9):(n=l,0===tE&&tP(K)),n!==l)if(nc()!==l)if((r=nr())!==l)if(nu(),40===e.charCodeAt(tb)?(i="(",tb++):(i=l,0===tE&&tP(q)),i!==l)if(nu(),(a=tO())===l&&(a=null),nu(),41===e.charCodeAt(tb)?(s=")",tb++):(s=l,0===tE&&tP(Y)),s!==l){var v,y,_;if(nu(),o=tb,58===e.charCodeAt(tb)?(u=":",tb++):(u=l,0===tE&&tP($)),u!==l?(c=nu(),(h=nr())!==l?o=u=[u,c,h]:(tb=o,o=l)):(tb=o,o=l),o===l&&(o=null),u=nu(),c=tb,123===e.charCodeAt(tb)?(h="{",tb++):(h=l,0===tE&&tP(W)),h!==l){for(d=nu(),p=[],m=tU();m!==l;)p.push(m),m=tU();m=nu(),125===e.charCodeAt(tb)?(g="}",tb++):(g=l,0===tE&&tP(j)),g!==l?c=h=[h,d,p,m,g,nu()]:(tb=c,c=l)}else tb=c,c=l;c===l&&(c=null),v=a,y=o,_=c,t={type:"DatablockDeclaration",className:r,instanceName:v,parent:y?y[2]:null,body:_?_[2].filter(Boolean):[]}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}function tD(){let t,n,r,i,a,s,o,u,c,h,d,p;if(t=tb,"new"===e.substr(tb,3)?(n="new",tb+=3):(n=l,0===tE&&tP(Q)),n!==l)if(nc()!==l)if((r=function(){let t,n,r,i,a,s,o,u,c,h;if((t=tb,40===e.charCodeAt(tb)?(n="(",tb++):(n=l,0===tE&&tP(q)),n!==l&&(r=nu(),(i=tV())!==l&&(a=nu(),41===e.charCodeAt(tb)?(s=")",tb++):(s=l,0===tE&&tP(Y)),s!==l)))?t=i:(tb=t,t=l),t===l)if(t=tb,(n=nr())!==l){var d;for(r=[],i=tb,a=nu(),91===e.charCodeAt(tb)?(s="[",tb++):(s=l,0===tE&&tP(ee)),s!==l?(o=nu(),(u=tz())!==l?(c=nu(),93===e.charCodeAt(tb)?(h="]",tb++):(h=l,0===tE&&tP(et)),h!==l?i=a=[a,s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),91===e.charCodeAt(tb)?(s="[",tb++):(s=l,0===tE&&tP(ee)),s!==l?(o=nu(),(u=tz())!==l?(c=nu(),93===e.charCodeAt(tb)?(h="]",tb++):(h=l,0===tE&&tP(et)),h!==l?i=a=[a,s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);d=n,t=r.reduce((e,t)=>{let[,,,n]=t;return{type:"IndexExpression",object:e,index:n}},d)}else tb=t,t=l;return t}())!==l)if(nu(),40===e.charCodeAt(tb)?(i="(",tb++):(i=l,0===tE&&tP(q)),i!==l)if(nu(),(a=tO())===l&&(a=null),nu(),41===e.charCodeAt(tb)?(s=")",tb++):(s=l,0===tE&&tP(Y)),s!==l){var f;if(nu(),o=tb,123===e.charCodeAt(tb)?(u="{",tb++):(u=l,0===tE&&tP(W)),u!==l){for(c=nu(),h=[],d=tU();d!==l;)h.push(d),d=tU();d=nu(),125===e.charCodeAt(tb)?(p="}",tb++):(p=l,0===tE&&tP(j)),p!==l?o=u=[u,c,h,d,p,nu()]:(tb=o,o=l)}else tb=o,o=l;o===l&&(o=null),t={type:"ObjectDeclaration",className:r,instanceName:a,body:(f=o)?f[2].filter(Boolean):[]}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}function tU(){let t,n,r;return(t=tb,(n=tD())!==l)?(nu(),59===e.charCodeAt(tb)?(r=";",tb++):(r=l,0===tE&&tP(V)),r===l&&(r=null),nu(),t=n):(tb=t,t=l),t===l&&((t=tb,(n=tN())!==l)?(nu(),59===e.charCodeAt(tb)?(r=";",tb++):(r=l,0===tE&&tP(V)),r===l&&(r=null),nu(),t=n):(tb=t,t=l),t===l&&(t=function(){let t,n,r,i,a;if(t=tb,nu(),(n=tF())!==l)if(nu(),61===e.charCodeAt(tb)?(r="=",tb++):(r=l,0===tE&&tP(en)),r!==l)if(nu(),(i=tV())!==l)nu(),59===e.charCodeAt(tb)?(a=";",tb++):(a=l,0===tE&&tP(V)),a===l&&(a=null),nu(),t={type:"Assignment",target:n,value:i};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=nl())===l&&(t=function(){let t,n;if(t=[],n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx)),n!==l)for(;n!==l;)t.push(n),n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx));else t=l;return t!==l&&(t=null),t}())),t}function tO(){let e;return(e=tQ())===l&&(e=nr())===l&&(e=no()),e}function tF(){let e,t,n,r;if(e=tb,(t=t9())!==l){for(n=[],r=tk();r!==l;)n.push(r),r=tk();e=n.reduce((e,t)=>"property"===t.type?{type:"MemberExpression",object:e,property:t.value}:{type:"IndexExpression",object:e,index:t.value},t)}else tb=e,e=l;return e}function tk(){let t,n,r,i;return(t=tb,46===e.charCodeAt(tb)?(n=".",tb++):(n=l,0===tE&&tP(er)),n!==l&&(nu(),(r=nr())!==l))?t={type:"property",value:r}:(tb=t,t=l),t===l&&((t=tb,91===e.charCodeAt(tb)?(n="[",tb++):(n=l,0===tE&&tP(ee)),n!==l&&(nu(),(r=tz())!==l&&(nu(),93===e.charCodeAt(tb)?(i="]",tb++):(i=l,0===tE&&tP(et)),i!==l)))?t={type:"index",value:r}:(tb=t,t=l)),t}function tz(){let t,n,r,i,a,s,o,u;if(t=tb,(n=tV())!==l){for(r=[],i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=tV())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=tV())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);t=r.length>0?[n,...r.map(e=>{let[,,,t]=e;return t})]:n}else tb=t,t=l;return t}function tB(){let t,n,r,i,a,s,o,u,c;if(t=tb,e.substr(tb,4)===_?(n=_,tb+=4):(n=l,0===tE&&tP(eh)),n!==l)if(nc()!==l)if((r=function(){let t,n,r,i,a,s,o,u;if(t=tb,(n=t4())!==l){for(r=[],i=tb,a=nu(),"or"===e.substr(tb,2)?(s="or",tb+=2):(s=l,0===tE&&tP(ep)),s!==l&&(o=nc())!==l&&(u=t4())!==l?i=a=[a,s,o,u]:(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),"or"===e.substr(tb,2)?(s="or",tb+=2):(s=l,0===tE&&tP(ep)),s!==l&&(o=nc())!==l&&(u=t4())!==l?i=a=[a,s,o,u]:(tb=i,i=l);t=r.length>0?[n,...r.map(e=>{let[,,,t]=e;return t})]:n}else tb=t,t=l;return t}())!==l)if(nu(),58===e.charCodeAt(tb)?(i=":",tb++):(i=l,0===tE&&tP($)),i!==l){for(a=nh(),s=[],o=tb,(u=nl())===l&&(u=tL()),u!==l?o=u=[u,c=nh()]:(tb=o,o=l);o!==l;)s.push(o),o=tb,(u=nl())===l&&(u=tL()),u!==l?o=u=[u,c=nh()]:(tb=o,o=l);t={type:"SwitchCase",test:r,consequent:s.map(e=>{let[t]=e;return t}).filter(Boolean)}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;if(t===l)if(t=tb,e.substr(tb,7)===x?(n=x,tb+=7):(n=l,0===tE&&tP(ed)),n!==l)if(nu(),58===e.charCodeAt(tb)?(r=":",tb++):(r=l,0===tE&&tP($)),r!==l){for(nh(),i=[],a=tb,(s=nl())===l&&(s=tL()),s!==l?a=s=[s,o=nh()]:(tb=a,a=l);a!==l;)i.push(a),a=tb,(s=nl())===l&&(s=tL()),s!==l?a=s=[s,o=nh()]:(tb=a,a=l);t={type:"SwitchCase",test:null,consequent:i.map(e=>{let[t]=e;return t}).filter(Boolean)}}else tb=t,t=l;else tb=t,t=l;return t}function tH(){let t,n,r,i,a,s;if(t=tb,123===e.charCodeAt(tb)?(n="{",tb++):(n=l,0===tE&&tP(W)),n!==l){for(nh(),r=[],i=tb,(a=nl())===l&&(a=tL()),a!==l?i=a=[a,s=nh()]:(tb=i,i=l);i!==l;)r.push(i),i=tb,(a=nl())===l&&(a=tL()),a!==l?i=a=[a,s=nh()]:(tb=i,i=l);(125===e.charCodeAt(tb)?(i="}",tb++):(i=l,0===tE&&tP(j)),i!==l)?t={type:"BlockStatement",body:r.map(e=>{let[t]=e;return t}).filter(Boolean)}:(tb=t,t=l)}else tb=t,t=l;return t}function tV(){let t,n,r,i;if(t=tb,(n=tF())!==l)if(nu(),(r=tG())!==l)if(nu(),(i=tV())!==l)t={type:"AssignmentExpression",operator:r,target:n,value:i};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t===l&&(t=function(){let t,n,r,i,a,s;if(t=tb,(n=tW())!==l)if(nu(),63===e.charCodeAt(tb)?(r="?",tb++):(r=l,0===tE&&tP(eA)),r!==l)if(nu(),(i=tV())!==l)if(nu(),58===e.charCodeAt(tb)?(a=":",tb++):(a=l,0===tE&&tP($)),a!==l)if(nu(),(s=tV())!==l)t={type:"ConditionalExpression",test:n,consequent:i,alternate:s};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t===l&&(t=tW()),t}()),t}function tG(){let t;return 61===e.charCodeAt(tb)?(t="=",tb++):(t=l,0===tE&&tP(en)),t===l&&("+="===e.substr(tb,2)?(t="+=",tb+=2):(t=l,0===tE&&tP(ev)),t===l&&("-="===e.substr(tb,2)?(t="-=",tb+=2):(t=l,0===tE&&tP(ey)),t===l&&("*="===e.substr(tb,2)?(t="*=",tb+=2):(t=l,0===tE&&tP(e_)),t===l&&("/="===e.substr(tb,2)?(t="/=",tb+=2):(t=l,0===tE&&tP(ex)),t===l&&("%="===e.substr(tb,2)?(t="%=",tb+=2):(t=l,0===tE&&tP(eb)),t===l&&("<<="===e.substr(tb,3)?(t="<<=",tb+=3):(t=l,0===tE&&tP(eS)),t===l&&(">>="===e.substr(tb,3)?(t=">>=",tb+=3):(t=l,0===tE&&tP(eM)),t===l&&("&="===e.substr(tb,2)?(t="&=",tb+=2):(t=l,0===tE&&tP(ew)),t===l&&("|="===e.substr(tb,2)?(t="|=",tb+=2):(t=l,0===tE&&tP(eE)),t===l&&("^="===e.substr(tb,2)?(t="^=",tb+=2):(t=l,0===tE&&tP(eT)))))))))))),t}function tW(){let t,n,r,i,s,o,u,c;if(t=tb,(n=tj())!==l){for(r=[],i=tb,s=nu(),"||"===e.substr(tb,2)?(o="||",tb+=2):(o=l,0===tE&&tP(eC)),o!==l?(u=nu(),(c=tj())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),"||"===e.substr(tb,2)?(o="||",tb+=2):(o=l,0===tE&&tP(eC)),o!==l?(u=nu(),(c=tj())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tj(){let t,n,r,i,s,o,u,c;if(t=tb,(n=tX())!==l){for(r=[],i=tb,s=nu(),"&&"===e.substr(tb,2)?(o="&&",tb+=2):(o=l,0===tE&&tP(eR)),o!==l?(u=nu(),(c=tX())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),"&&"===e.substr(tb,2)?(o="&&",tb+=2):(o=l,0===tE&&tP(eR)),o!==l?(u=nu(),(c=tX())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tX(){let t,n,r,i,s,o,u,c,h;if(t=tb,(n=tq())!==l){for(r=[],i=tb,s=nu(),124===e.charCodeAt(tb)?(o="|",tb++):(o=l,0===tE&&tP(eP)),o!==l?(u=tb,tE++,124===e.charCodeAt(tb)?(c="|",tb++):(c=l,0===tE&&tP(eP)),tE--,c===l?u=void 0:(tb=u,u=l),u!==l?(c=nu(),(h=tq())!==l?i=s=[s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),124===e.charCodeAt(tb)?(o="|",tb++):(o=l,0===tE&&tP(eP)),o!==l?(u=tb,tE++,124===e.charCodeAt(tb)?(c="|",tb++):(c=l,0===tE&&tP(eP)),tE--,c===l?u=void 0:(tb=u,u=l),u!==l?(c=nu(),(h=tq())!==l?i=s=[s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tq(){let t,n,r,i,s,o,u,c;if(t=tb,(n=tY())!==l){for(r=[],i=tb,s=nu(),94===e.charCodeAt(tb)?(o="^",tb++):(o=l,0===tE&&tP(eI)),o!==l?(u=nu(),(c=tY())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),94===e.charCodeAt(tb)?(o="^",tb++):(o=l,0===tE&&tP(eI)),o!==l?(u=nu(),(c=tY())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tY(){let t,n,r,i,s,o,u,c,h;if(t=tb,(n=tJ())!==l){for(r=[],i=tb,s=nu(),38===e.charCodeAt(tb)?(o="&",tb++):(o=l,0===tE&&tP(eL)),o!==l?(u=tb,tE++,38===e.charCodeAt(tb)?(c="&",tb++):(c=l,0===tE&&tP(eL)),tE--,c===l?u=void 0:(tb=u,u=l),u!==l?(c=nu(),(h=tJ())!==l?i=s=[s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),38===e.charCodeAt(tb)?(o="&",tb++):(o=l,0===tE&&tP(eL)),o!==l?(u=tb,tE++,38===e.charCodeAt(tb)?(c="&",tb++):(c=l,0===tE&&tP(eL)),tE--,c===l?u=void 0:(tb=u,u=l),u!==l?(c=nu(),(h=tJ())!==l?i=s=[s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tJ(){let e,t,n,r,i,s,o,u;if(e=tb,(t=tK())!==l){for(n=[],r=tb,i=nu(),(s=tZ())!==l?(o=nu(),(u=tK())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);r!==l;)n.push(r),r=tb,i=nu(),(s=tZ())!==l?(o=nu(),(u=tK())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);e=a(t,n.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=e,e=l;return e}function tZ(){let t;return"=="===e.substr(tb,2)?(t="==",tb+=2):(t=l,0===tE&&tP(eN)),t===l&&("!="===e.substr(tb,2)?(t="!=",tb+=2):(t=l,0===tE&&tP(eD))),t}function tK(){let e,t,n,r,i,s,o,u;if(e=tb,(t=tQ())!==l){for(n=[],r=tb,i=nu(),(s=t$())!==l?(o=nu(),(u=tQ())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);r!==l;)n.push(r),r=tb,i=nu(),(s=t$())!==l?(o=nu(),(u=tQ())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);e=a(t,n.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=e,e=l;return e}function t$(){let t;return"<="===e.substr(tb,2)?(t="<=",tb+=2):(t=l,0===tE&&tP(eU)),t===l&&(">="===e.substr(tb,2)?(t=">=",tb+=2):(t=l,0===tE&&tP(eO)),t===l&&(t=e.charAt(tb),A.test(t)?tb++:(t=l,0===tE&&tP(eF)))),t}function tQ(){let e,t,n,r,i,s,o,u;if(e=tb,(t=t2())!==l){for(n=[],r=tb,i=nu(),(s=t1())!==l?(o=nu(),(u=t0())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);r!==l;)n.push(r),r=tb,i=nu(),(s=t1())!==l?(o=nu(),(u=t0())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);e=a(t,n.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=e,e=l;return e}function t0(){let e,t,n,r;if(e=tb,(t=tF())!==l)if(nu(),(n=tG())!==l)if(nu(),(r=tV())!==l)e={type:"AssignmentExpression",operator:n,target:t,value:r};else tb=e,e=l;else tb=e,e=l;else tb=e,e=l;return e===l&&(e=t2()),e}function t1(){let t;return"$="===e.substr(tb,2)?(t="$=",tb+=2):(t=l,0===tE&&tP(ek)),t===l&&("!$="===e.substr(tb,3)?(t="!$=",tb+=3):(t=l,0===tE&&tP(ez)),t===l&&(64===e.charCodeAt(tb)?(t="@",tb++):(t=l,0===tE&&tP(eB)),t===l&&("NL"===e.substr(tb,2)?(t="NL",tb+=2):(t=l,0===tE&&tP(eH)),t===l&&("TAB"===e.substr(tb,3)?(t="TAB",tb+=3):(t=l,0===tE&&tP(eV)),t===l&&("SPC"===e.substr(tb,3)?(t="SPC",tb+=3):(t=l,0===tE&&tP(eG))))))),t}function t2(){let e,t,n,r,i,s,o,u;if(e=tb,(t=t4())!==l){for(n=[],r=tb,i=nu(),(s=t3())!==l?(o=nu(),(u=t4())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);r!==l;)n.push(r),r=tb,i=nu(),(s=t3())!==l?(o=nu(),(u=t4())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);e=a(t,n.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=e,e=l;return e}function t3(){let t;return"<<"===e.substr(tb,2)?(t="<<",tb+=2):(t=l,0===tE&&tP(eW)),t===l&&(">>"===e.substr(tb,2)?(t=">>",tb+=2):(t=l,0===tE&&tP(ej))),t}function t4(){let t,n,r,i,s,o,u,c;if(t=tb,(n=t5())!==l){for(r=[],i=tb,s=nu(),o=e.charAt(tb),C.test(o)?tb++:(o=l,0===tE&&tP(eX)),o!==l?(u=nu(),(c=t5())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),o=e.charAt(tb),C.test(o)?tb++:(o=l,0===tE&&tP(eX)),o!==l?(u=nu(),(c=t5())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function t5(){let t,n,r,i,s,o,u,c;if(t=tb,(n=t6())!==l){for(r=[],i=tb,s=nu(),o=e.charAt(tb),R.test(o)?tb++:(o=l,0===tE&&tP(eq)),o!==l?(u=nu(),(c=t6())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),o=e.charAt(tb),R.test(o)?tb++:(o=l,0===tE&&tP(eq)),o!==l?(u=nu(),(c=t6())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function t6(){let t,n,r;return(t=tb,n=e.charAt(tb),P.test(n)?tb++:(n=l,0===tE&&tP(eY)),n!==l&&(nu(),(r=t8())!==l))?t=s(n,r):(tb=t,t=l),t===l&&((t=tb,"++"===e.substr(tb,2)?(n="++",tb+=2):(n=l,0===tE&&tP(eJ)),n===l&&("--"===e.substr(tb,2)?(n="--",tb+=2):(n=l,0===tE&&tP(eZ))),n!==l&&(nu(),(r=t8())!==l))?t=s(n,r):(tb=t,t=l),t===l&&((t=tb,42===e.charCodeAt(tb)?(n="*",tb++):(n=l,0===tE&&tP(eK)),n!==l&&(nu(),(r=t8())!==l))?t={type:"TagDereferenceExpression",argument:r}:(tb=t,t=l),t===l&&(t=function(){let t,n,r;if(t=tb,(n=t9())!==l)if(nu(),"++"===e.substr(tb,2)?(r="++",tb+=2):(r=l,0===tE&&tP(eJ)),r===l&&("--"===e.substr(tb,2)?(r="--",tb+=2):(r=l,0===tE&&tP(eZ))),r!==l)t={type:"PostfixExpression",operator:r,argument:n};else tb=t,t=l;else tb=t,t=l;return t===l&&(t=t9()),t}()))),t}function t8(){let e,t,n,r;if(e=tb,(t=tF())!==l)if(nu(),(n=tG())!==l)if(nu(),(r=tV())!==l)e={type:"AssignmentExpression",operator:n,target:t,value:r};else tb=e,e=l;else tb=e,e=l;else tb=e,e=l;return e===l&&(e=t6()),e}function t9(){let t,n,a,s,o,u,c,h,d,p;if(t=tb,(n=function(){let t,n,r,i,a,s,o,u,c,h,d,p,f,m,g,v;if(t=tb,(o=tD())===l&&(o=tN())===l&&(o=function(){let t,n,r,i;if(t=tb,34===e.charCodeAt(tb)?(n='"',tb++):(n=l,0===tE&&tP(e4)),n!==l){for(r=[],i=ni();i!==l;)r.push(i),i=ni();(34===e.charCodeAt(tb)?(i='"',tb++):(i=l,0===tE&&tP(e4)),i!==l)?t={type:"StringLiteral",value:r.join("")}:(tb=t,t=l)}else tb=t,t=l;if(t===l)if(t=tb,39===e.charCodeAt(tb)?(n="'",tb++):(n=l,0===tE&&tP(e5)),n!==l){for(r=[],i=na();i!==l;)r.push(i),i=na();(39===e.charCodeAt(tb)?(i="'",tb++):(i=l,0===tE&&tP(e5)),i!==l)?t={type:"StringLiteral",value:r.join(""),tagged:!0}:(tb=t,t=l)}else tb=t,t=l;return t}())===l&&(o=no())===l&&((u=tb,e.substr(tb,4)===E?(c=E,tb+=4):(c=l,0===tE&&tP(tp)),c===l&&(e.substr(tb,5)===T?(c=T,tb+=5):(c=l,0===tE&&tP(tf))),c!==l&&(h=tb,tE++,d=np(),tE--,d===l?h=void 0:(tb=h,h=l),h!==l))?u={type:"BooleanLiteral",value:"true"===c}:(tb=u,u=l),(o=u)===l&&((p=ne())===l&&(p=nt())===l&&(p=nn()),(o=p)===l))&&((f=tb,40===e.charCodeAt(tb)?(m="(",tb++):(m=l,0===tE&&tP(q)),m!==l&&(nu(),(g=tV())!==l&&(nu(),41===e.charCodeAt(tb)?(v=")",tb++):(v=l,0===tE&&tP(Y)),v!==l)))?f=g:(tb=f,f=l),o=f),(n=o)!==l){for(r=[],i=tb,a=nu(),(s=tk())!==l?i=a=[a,s]:(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),(s=tk())!==l?i=a=[a,s]:(tb=i,i=l);t=r.reduce((e,t)=>{let[,n]=t;return"property"===n.type?{type:"MemberExpression",object:e,property:n.value}:{type:"IndexExpression",object:e,index:n.value}},n)}else tb=t,t=l;return t}())!==l){for(a=[],s=tb,o=nu(),40===e.charCodeAt(tb)?(u="(",tb++):(u=l,0===tE&&tP(q)),u!==l?(c=nu(),(h=t7())===l&&(h=null),d=nu(),41===e.charCodeAt(tb)?(p=")",tb++):(p=l,0===tE&&tP(Y)),p!==l?s=o=[o,u,c,h,d,p]:(tb=s,s=l)):(tb=s,s=l),s===l&&(s=tb,o=nu(),(u=tk())!==l?s=o=[o,u]:(tb=s,s=l));s!==l;)a.push(s),s=tb,o=nu(),40===e.charCodeAt(tb)?(u="(",tb++):(u=l,0===tE&&tP(q)),u!==l?(c=nu(),(h=t7())===l&&(h=null),d=nu(),41===e.charCodeAt(tb)?(p=")",tb++):(p=l,0===tE&&tP(Y)),p!==l?s=o=[o,u,c,h,d,p]:(tb=s,s=l)):(tb=s,s=l),s===l&&(s=tb,o=nu(),(u=tk())!==l?s=o=[o,u]:(tb=s,s=l));t=a.reduce((e,t)=>{if("("===t[1]){var n;let[,,,a]=t;return n=a||[],"Identifier"===e.type&&"exec"===e.name.toLowerCase()&&(n.length>0&&"StringLiteral"===n[0].type?r.add(n[0].value):i=!0),{type:"CallExpression",callee:e,arguments:n}}let a=t[1];return"property"===a.type?{type:"MemberExpression",object:e,property:a.value}:{type:"IndexExpression",object:e,index:a.value}},n)}else tb=t,t=l;return t}function t7(){let t,n,r,i,a,s,o,u;if(t=tb,(n=tV())!==l){for(r=[],i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=tV())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=tV())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);t=[n,...r.map(e=>{let[,,,t]=e;return t})]}else tb=t,t=l;return t}function ne(){let t,n,r,i,a,s,o;if(t=tb,37===e.charCodeAt(tb)?(n="%",tb++):(n=l,0===tE&&tP(e$)),n!==l){if(r=tb,i=tb,a=e.charAt(tb),I.test(a)?tb++:(a=l,0===tE&&tP(eQ)),a!==l){for(s=[],o=e.charAt(tb),L.test(o)?tb++:(o=l,0===tE&&tP(e0));o!==l;)s.push(o),o=e.charAt(tb),L.test(o)?tb++:(o=l,0===tE&&tP(e0));i=a=[a,s]}else tb=i,i=l;(r=i!==l?e.substring(r,tb):i)!==l?t={type:"Variable",scope:"local",name:r}:(tb=t,t=l)}else tb=t,t=l;return t}function nt(){let t,n,r,i,a,s,o,u,c,h,d,p,f;if(t=tb,36===e.charCodeAt(tb)?(n="$",tb++):(n=l,0===tE&&tP(e1)),n!==l){if(r=tb,i=tb,"::"===e.substr(tb,2)?(a="::",tb+=2):(a=l,0===tE&&tP(J)),a===l&&(a=null),s=e.charAt(tb),I.test(s)?tb++:(s=l,0===tE&&tP(eQ)),s!==l){for(o=[],u=e.charAt(tb),L.test(u)?tb++:(u=l,0===tE&&tP(e0));u!==l;)o.push(u),u=e.charAt(tb),L.test(u)?tb++:(u=l,0===tE&&tP(e0));if(u=[],c=tb,"::"===e.substr(tb,2)?(h="::",tb+=2):(h=l,0===tE&&tP(J)),h!==l)if(d=e.charAt(tb),I.test(d)?tb++:(d=l,0===tE&&tP(eQ)),d!==l){for(p=[],f=e.charAt(tb),L.test(f)?tb++:(f=l,0===tE&&tP(e0));f!==l;)p.push(f),f=e.charAt(tb),L.test(f)?tb++:(f=l,0===tE&&tP(e0));c=h=[h,d,p]}else tb=c,c=l;else tb=c,c=l;for(;c!==l;)if(u.push(c),c=tb,"::"===e.substr(tb,2)?(h="::",tb+=2):(h=l,0===tE&&tP(J)),h!==l)if(d=e.charAt(tb),I.test(d)?tb++:(d=l,0===tE&&tP(eQ)),d!==l){for(p=[],f=e.charAt(tb),L.test(f)?tb++:(f=l,0===tE&&tP(e0));f!==l;)p.push(f),f=e.charAt(tb),L.test(f)?tb++:(f=l,0===tE&&tP(e0));c=h=[h,d,p]}else tb=c,c=l;else tb=c,c=l;i=a=[a,s,o,u]}else tb=i,i=l;(r=i!==l?e.substring(r,tb):i)!==l?t={type:"Variable",scope:"global",name:r}:(tb=t,t=l)}else tb=t,t=l;return t}function nn(){let t,n,r,i,a,s,o,u,c,h,d;if(t=tb,n=tb,r=tb,e.substr(tb,6)===w?(i=w,tb+=6):(i=l,0===tE&&tP(e2)),i!==l){for(a=[],s=e.charAt(tb),N.test(s)?tb++:(s=l,0===tE&&tP(e3));s!==l;)a.push(s),s=e.charAt(tb),N.test(s)?tb++:(s=l,0===tE&&tP(e3));if("::"===e.substr(tb,2)?(s="::",tb+=2):(s=l,0===tE&&tP(J)),s!==l){for(o=[],u=e.charAt(tb),N.test(u)?tb++:(u=l,0===tE&&tP(e3));u!==l;)o.push(u),u=e.charAt(tb),N.test(u)?tb++:(u=l,0===tE&&tP(e3));if(u=e.charAt(tb),I.test(u)?tb++:(u=l,0===tE&&tP(eQ)),u!==l){for(c=[],h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));h!==l;)c.push(h),h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));r=i=[i,a,s,o,u,c]}else tb=r,r=l}else tb=r,r=l}else tb=r,r=l;if((n=r!==l?e.substring(n,tb):r)!==l&&(n={type:"Identifier",name:n.replace(/\s+/g,"")}),(t=n)===l){if(t=tb,n=tb,r=tb,e.substr(tb,6)===w?(i=w,tb+=6):(i=l,0===tE&&tP(e2)),i!==l){if(a=[],s=tb,"::"===e.substr(tb,2)?(o="::",tb+=2):(o=l,0===tE&&tP(J)),o!==l)if(u=e.charAt(tb),I.test(u)?tb++:(u=l,0===tE&&tP(eQ)),u!==l){for(c=[],h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));h!==l;)c.push(h),h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));s=o=[o,u,c]}else tb=s,s=l;else tb=s,s=l;if(s!==l)for(;s!==l;)if(a.push(s),s=tb,"::"===e.substr(tb,2)?(o="::",tb+=2):(o=l,0===tE&&tP(J)),o!==l)if(u=e.charAt(tb),I.test(u)?tb++:(u=l,0===tE&&tP(eQ)),u!==l){for(c=[],h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));h!==l;)c.push(h),h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));s=o=[o,u,c]}else tb=s,s=l;else tb=s,s=l;else a=l;a!==l?r=i=[i,a]:(tb=r,r=l)}else tb=r,r=l;if((n=r!==l?e.substring(n,tb):r)!==l&&(n={type:"Identifier",name:n}),(t=n)===l){if(t=tb,n=tb,r=tb,i=e.charAt(tb),I.test(i)?tb++:(i=l,0===tE&&tP(eQ)),i!==l){for(a=[],s=e.charAt(tb),L.test(s)?tb++:(s=l,0===tE&&tP(e0));s!==l;)a.push(s),s=e.charAt(tb),L.test(s)?tb++:(s=l,0===tE&&tP(e0));if(s=[],o=tb,"::"===e.substr(tb,2)?(u="::",tb+=2):(u=l,0===tE&&tP(J)),u!==l)if(c=e.charAt(tb),I.test(c)?tb++:(c=l,0===tE&&tP(eQ)),c!==l){for(h=[],d=e.charAt(tb),L.test(d)?tb++:(d=l,0===tE&&tP(e0));d!==l;)h.push(d),d=e.charAt(tb),L.test(d)?tb++:(d=l,0===tE&&tP(e0));o=u=[u,c,h]}else tb=o,o=l;else tb=o,o=l;for(;o!==l;)if(s.push(o),o=tb,"::"===e.substr(tb,2)?(u="::",tb+=2):(u=l,0===tE&&tP(J)),u!==l)if(c=e.charAt(tb),I.test(c)?tb++:(c=l,0===tE&&tP(eQ)),c!==l){for(h=[],d=e.charAt(tb),L.test(d)?tb++:(d=l,0===tE&&tP(e0));d!==l;)h.push(d),d=e.charAt(tb),L.test(d)?tb++:(d=l,0===tE&&tP(e0));o=u=[u,c,h]}else tb=o,o=l;else tb=o,o=l;r=i=[i,a,s]}else tb=r,r=l;(n=r!==l?e.substring(n,tb):r)!==l&&(n={type:"Identifier",name:n}),t=n}}return t}function nr(){let e;return(e=ne())===l&&(e=nt())===l&&(e=nn()),e}function ni(){let t,n,r;return(t=tb,92===e.charCodeAt(tb)?(n="\\",tb++):(n=l,0===tE&&tP(e6)),n!==l&&(r=ns())!==l)?t=r:(tb=t,t=l),t===l&&(t=e.charAt(tb),D.test(t)?tb++:(t=l,0===tE&&tP(e8))),t}function na(){let t,n,r;return(t=tb,92===e.charCodeAt(tb)?(n="\\",tb++):(n=l,0===tE&&tP(e6)),n!==l&&(r=ns())!==l)?t=r:(tb=t,t=l),t===l&&(t=e.charAt(tb),U.test(t)?tb++:(t=l,0===tE&&tP(e9))),t}function ns(){let t,n,r,i,a,s;return t=tb,110===e.charCodeAt(tb)?(n="n",tb++):(n=l,0===tE&&tP(e7)),n!==l&&(n="\n"),(t=n)===l&&(t=tb,114===e.charCodeAt(tb)?(n="r",tb++):(n=l,0===tE&&tP(te)),n!==l&&(n="\r"),(t=n)===l)&&(t=tb,116===e.charCodeAt(tb)?(n="t",tb++):(n=l,0===tE&&tP(tt)),n!==l&&(n=" "),(t=n)===l)&&((t=tb,120===e.charCodeAt(tb)?(n="x",tb++):(n=l,0===tE&&tP(tn)),n!==l&&(r=tb,i=tb,a=e.charAt(tb),O.test(a)?tb++:(a=l,0===tE&&tP(tr)),a!==l?(s=e.charAt(tb),O.test(s)?tb++:(s=l,0===tE&&tP(tr)),s!==l?i=a=[a,s]:(tb=i,i=l)):(tb=i,i=l),(r=i!==l?e.substring(r,tb):i)!==l))?t=String.fromCharCode(parseInt(r,16)):(tb=t,t=l),t===l&&(t=tb,"cr"===e.substr(tb,2)?(n="cr",tb+=2):(n=l,0===tE&&tP(ti)),n!==l&&(n="\x0f"),(t=n)===l&&(t=tb,"cp"===e.substr(tb,2)?(n="cp",tb+=2):(n=l,0===tE&&tP(ta)),n!==l&&(n="\x10"),(t=n)===l))&&(t=tb,"co"===e.substr(tb,2)?(n="co",tb+=2):(n=l,0===tE&&tP(ts)),n!==l&&(n="\x11"),(t=n)===l)&&((t=tb,99===e.charCodeAt(tb)?(n="c",tb++):(n=l,0===tE&&tP(to)),n!==l&&(r=e.charAt(tb),F.test(r)?tb++:(r=l,0===tE&&tP(tl)),r!==l))?t=String.fromCharCode([2,3,4,5,6,7,8,11,12,14][parseInt(r,10)]):(tb=t,t=l),t===l&&(t=tb,e.length>tb?(n=e.charAt(tb),tb++):(n=l,0===tE&&tP(tu)),t=n))),t}function no(){let t,n,r,i,a,s,o,u,c;if(t=tb,n=tb,r=tb,48===e.charCodeAt(tb)?(i="0",tb++):(i=l,0===tE&&tP(tc)),i!==l)if(a=e.charAt(tb),k.test(a)?tb++:(a=l,0===tE&&tP(th)),a!==l){if(s=[],o=e.charAt(tb),O.test(o)?tb++:(o=l,0===tE&&tP(tr)),o!==l)for(;o!==l;)s.push(o),o=e.charAt(tb),O.test(o)?tb++:(o=l,0===tE&&tP(tr));else s=l;s!==l?r=i=[i,a,s]:(tb=r,r=l)}else tb=r,r=l;else tb=r,r=l;if((n=r!==l?e.substring(n,tb):r)!==l&&(r=tb,tE++,i=np(),tE--,i===l?r=void 0:(tb=r,r=l),r!==l)?t={type:"NumberLiteral",value:parseInt(n,16)}:(tb=t,t=l),t===l){if(t=tb,n=tb,r=tb,45===e.charCodeAt(tb)?(i="-",tb++):(i=l,0===tE&&tP(td)),i===l&&(i=null),a=[],s=e.charAt(tb),F.test(s)?tb++:(s=l,0===tE&&tP(tl)),s!==l)for(;s!==l;)a.push(s),s=e.charAt(tb),F.test(s)?tb++:(s=l,0===tE&&tP(tl));else a=l;if(a!==l){if(s=tb,46===e.charCodeAt(tb)?(o=".",tb++):(o=l,0===tE&&tP(er)),o!==l){if(u=[],c=e.charAt(tb),F.test(c)?tb++:(c=l,0===tE&&tP(tl)),c!==l)for(;c!==l;)u.push(c),c=e.charAt(tb),F.test(c)?tb++:(c=l,0===tE&&tP(tl));else u=l;u!==l?s=o=[o,u]:(tb=s,s=l)}else tb=s,s=l;s===l&&(s=null),r=i=[i,a,s]}else tb=r,r=l;if(r===l)if(r=tb,45===e.charCodeAt(tb)?(i="-",tb++):(i=l,0===tE&&tP(td)),i===l&&(i=null),46===e.charCodeAt(tb)?(a=".",tb++):(a=l,0===tE&&tP(er)),a!==l){if(s=[],o=e.charAt(tb),F.test(o)?tb++:(o=l,0===tE&&tP(tl)),o!==l)for(;o!==l;)s.push(o),o=e.charAt(tb),F.test(o)?tb++:(o=l,0===tE&&tP(tl));else s=l;s!==l?r=i=[i,a,s]:(tb=r,r=l)}else tb=r,r=l;(n=r!==l?e.substring(n,tb):r)!==l&&(r=tb,tE++,i=np(),tE--,i===l?r=void 0:(tb=r,r=l),r!==l)?t={type:"NumberLiteral",value:parseFloat(n)}:(tb=t,t=l)}return t}function nl(){let t;return(t=function(){let t,n,r,i,a;if(t=tb,"//"===e.substr(tb,2)?(n="//",tb+=2):(n=l,0===tE&&tP(tm)),n!==l){for(r=tb,i=[],a=e.charAt(tb),z.test(a)?tb++:(a=l,0===tE&&tP(tg));a!==l;)i.push(a),a=e.charAt(tb),z.test(a)?tb++:(a=l,0===tE&&tP(tg));r=e.substring(r,tb),i=e.charAt(tb),B.test(i)?tb++:(i=l,0===tE&&tP(tv)),i===l&&(i=null),t={type:"Comment",value:r}}else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o;if(t=tb,"/*"===e.substr(tb,2)?(n="/*",tb+=2):(n=l,0===tE&&tP(ty)),n!==l){for(r=tb,i=[],a=tb,s=tb,tE++,"*/"===e.substr(tb,2)?(o="*/",tb+=2):(o=l,0===tE&&tP(t_)),tE--,o===l?s=void 0:(tb=s,s=l),s!==l?(e.length>tb?(o=e.charAt(tb),tb++):(o=l,0===tE&&tP(tu)),o!==l?a=s=[s,o]:(tb=a,a=l)):(tb=a,a=l);a!==l;)i.push(a),a=tb,s=tb,tE++,"*/"===e.substr(tb,2)?(o="*/",tb+=2):(o=l,0===tE&&tP(t_)),tE--,o===l?s=void 0:(tb=s,s=l),s!==l?(e.length>tb?(o=e.charAt(tb),tb++):(o=l,0===tE&&tP(tu)),o!==l?a=s=[s,o]:(tb=a,a=l)):(tb=a,a=l);(r=e.substring(r,tb),"*/"===e.substr(tb,2)?(i="*/",tb+=2):(i=l,0===tE&&tP(t_)),i!==l)?t={type:"Comment",value:r}:(tb=t,t=l)}else tb=t,t=l;return t}()),t}function nu(){let t,n;for(t=[],n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx)),n===l&&(n=nd());n!==l;)t.push(n),n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx)),n===l&&(n=nd());return t}function nc(){let t,n,r,i;if(t=tb,n=[],r=e.charAt(tb),H.test(r)?tb++:(r=l,0===tE&&tP(tx)),r!==l)for(;r!==l;)n.push(r),r=e.charAt(tb),H.test(r)?tb++:(r=l,0===tE&&tP(tx));else n=l;if(n!==l){for(r=[],i=e.charAt(tb),H.test(i)?tb++:(i=l,0===tE&&tP(tx)),i===l&&(i=nd());i!==l;)r.push(i),i=e.charAt(tb),H.test(i)?tb++:(i=l,0===tE&&tP(tx)),i===l&&(i=nd());t=n=[n,r]}else tb=t,t=l;return t}function nh(){let t,n;for(t=[],n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx));n!==l;)t.push(n),n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx));return t}function nd(){let t,n,r,i,a,s;if(t=tb,"//"===e.substr(tb,2)?(n="//",tb+=2):(n=l,0===tE&&tP(tm)),n!==l){for(r=[],i=e.charAt(tb),z.test(i)?tb++:(i=l,0===tE&&tP(tg));i!==l;)r.push(i),i=e.charAt(tb),z.test(i)?tb++:(i=l,0===tE&&tP(tg));i=e.charAt(tb),B.test(i)?tb++:(i=l,0===tE&&tP(tv)),i===l&&(i=null),t=n=[n,r,i]}else tb=t,t=l;if(t===l)if(t=tb,"/*"===e.substr(tb,2)?(n="/*",tb+=2):(n=l,0===tE&&tP(ty)),n!==l){for(r=[],i=tb,a=tb,tE++,"*/"===e.substr(tb,2)?(s="*/",tb+=2):(s=l,0===tE&&tP(t_)),tE--,s===l?a=void 0:(tb=a,a=l),a!==l?(e.length>tb?(s=e.charAt(tb),tb++):(s=l,0===tE&&tP(tu)),s!==l?i=a=[a,s]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=tb,tE++,"*/"===e.substr(tb,2)?(s="*/",tb+=2):(s=l,0===tE&&tP(t_)),tE--,s===l?a=void 0:(tb=a,a=l),a!==l?(e.length>tb?(s=e.charAt(tb),tb++):(s=l,0===tE&&tP(tu)),s!==l?i=a=[a,s]:(tb=i,i=l)):(tb=i,i=l);"*/"===e.substr(tb,2)?(i="*/",tb+=2):(i=l,0===tE&&tP(t_)),i!==l?t=n=[n,r,i]:(tb=t,t=l)}else tb=t,t=l;return t}function np(){let t;return t=e.charAt(tb),L.test(t)?tb++:(t=l,0===tE&&tP(e0)),t}r=new Set,i=!1;let nf=(n=h())!==l&&tb===e.length;function nm(){var t,r,i;throw n!==l&&tb0&&void 0!==arguments[0]?arguments[0]:tb,n=e.codePointAt(t);return void 0===n?"":String.fromCodePoint(n)}(tM):null,i=tM{"use strict";e.s(["getFloat",()=>N,"getInt",()=>D,"getPosition",()=>U,"getProperty",()=>L,"getRotation",()=>F,"getScale",()=>O,"parseMissionScript",()=>I],62395);var t=e.i(90072);e.s(["parse",()=>T,"runServer",()=>A],86608);var n=e.i(92552),r=e.i(99749);function i(e){let t=e.indexOf("::");return -1===t?null:{namespace:e.slice(0,t),method:e.slice(t+2)}}let a={"+":"$.add","-":"$.sub","*":"$.mul","/":"$.div","<":"$.lt","<=":"$.le",">":"$.gt",">=":"$.ge","==":"$.eq","!=":"$.ne","%":"$.mod","&":"$.bitand","|":"$.bitor","^":"$.bitxor","<<":"$.shl",">>":"$.shr"};class s{getAccessInfo(e){if("Variable"===e.type){let t=JSON.stringify(e.name),n="global"===e.scope?this.globals:this.locals;return{getter:"".concat(n,".get(").concat(t,")"),setter:e=>"".concat(n,".set(").concat(t,", ").concat(e,")"),postIncHelper:"".concat(n,".postInc(").concat(t,")"),postDecHelper:"".concat(n,".postDec(").concat(t,")")}}if("MemberExpression"===e.type){let t=this.expression(e.object),n="Identifier"===e.property.type?JSON.stringify(e.property.name):this.expression(e.property);return{getter:"".concat(this.runtime,".prop(").concat(t,", ").concat(n,")"),setter:e=>"".concat(this.runtime,".setProp(").concat(t,", ").concat(n,", ").concat(e,")"),postIncHelper:"".concat(this.runtime,".propPostInc(").concat(t,", ").concat(n,")"),postDecHelper:"".concat(this.runtime,".propPostDec(").concat(t,", ").concat(n,")")}}if("IndexExpression"===e.type){let t=Array.isArray(e.index)?e.index.map(e=>this.expression(e)):[this.expression(e.index)];if("Variable"===e.object.type){let n=JSON.stringify(e.object.name),r="global"===e.object.scope?this.globals:this.locals,i=t.join(", ");return{getter:"".concat(r,".get(").concat(n,", ").concat(i,")"),setter:e=>"".concat(r,".set(").concat(n,", ").concat(i,", ").concat(e,")"),postIncHelper:"".concat(r,".postInc(").concat(n,", ").concat(i,")"),postDecHelper:"".concat(r,".postDec(").concat(n,", ").concat(i,")")}}if("MemberExpression"===e.object.type){let n=e.object,r=this.expression(n.object),i="Identifier"===n.property.type?JSON.stringify(n.property.name):this.expression(n.property),a="".concat(this.runtime,".key(").concat(i,", ").concat(t.join(", "),")");return{getter:"".concat(this.runtime,".prop(").concat(r,", ").concat(a,")"),setter:e=>"".concat(this.runtime,".setProp(").concat(r,", ").concat(a,", ").concat(e,")"),postIncHelper:"".concat(this.runtime,".propPostInc(").concat(r,", ").concat(a,")"),postDecHelper:"".concat(this.runtime,".propPostDec(").concat(r,", ").concat(a,")")}}let n=this.expression(e.object),r=1===t.length?t[0]:"".concat(this.runtime,".key(").concat(t.join(", "),")");return{getter:"".concat(this.runtime,".getIndex(").concat(n,", ").concat(r,")"),setter:e=>"".concat(this.runtime,".setIndex(").concat(n,", ").concat(r,", ").concat(e,")"),postIncHelper:"".concat(this.runtime,".indexPostInc(").concat(n,", ").concat(r,")"),postDecHelper:"".concat(this.runtime,".indexPostDec(").concat(n,", ").concat(r,")")}}return null}generate(e){let t=[];for(let n of e.body){let e=this.statement(n);e&&t.push(e)}return t.join("\n\n")}statement(e){switch(e.type){case"Comment":return"";case"ExpressionStatement":return this.line("".concat(this.expression(e.expression),";"));case"FunctionDeclaration":return this.functionDeclaration(e);case"PackageDeclaration":return this.packageDeclaration(e);case"DatablockDeclaration":return this.datablockDeclaration(e);case"ObjectDeclaration":return this.line("".concat(this.objectDeclaration(e),";"));case"IfStatement":return this.ifStatement(e);case"ForStatement":return this.forStatement(e);case"WhileStatement":return this.whileStatement(e);case"DoWhileStatement":return this.doWhileStatement(e);case"SwitchStatement":return this.switchStatement(e);case"ReturnStatement":return this.returnStatement(e);case"BreakStatement":return this.line("break;");case"ContinueStatement":return this.line("continue;");case"BlockStatement":return this.blockStatement(e);default:throw Error("Unknown statement type: ".concat(e.type))}}functionDeclaration(e){let t=i(e.name.name);if(t){let n=t.namespace,r=t.method;this.currentClass=n.toLowerCase(),this.currentFunction=r.toLowerCase();let i=this.functionBody(e.body,e.params);return this.currentClass=null,this.currentFunction=null,"".concat(this.line("".concat(this.runtime,".registerMethod(").concat(JSON.stringify(n),", ").concat(JSON.stringify(r),", function() {")),"\n").concat(i,"\n").concat(this.line("});"))}{let t=e.name.name;this.currentFunction=t.toLowerCase();let n=this.functionBody(e.body,e.params);return this.currentFunction=null,"".concat(this.line("".concat(this.runtime,".registerFunction(").concat(JSON.stringify(t),", function() {")),"\n").concat(n,"\n").concat(this.line("});"))}}functionBody(e,t){this.indentLevel++;let n=[];n.push(this.line("const ".concat(this.locals," = ").concat(this.runtime,".locals();")));for(let e=0;ethis.statement(e)).join("\n\n");return this.indentLevel--,"".concat(this.line("".concat(this.runtime,".package(").concat(t,", function() {")),"\n").concat(n,"\n").concat(this.line("});"))}datablockDeclaration(e){let t=JSON.stringify(e.className.name),n=e.instanceName?JSON.stringify(e.instanceName.name):"null",r=e.parent?JSON.stringify(e.parent.name):"null",i=this.objectBody(e.body);return this.line("".concat(this.runtime,".datablock(").concat(t,", ").concat(n,", ").concat(r,", ").concat(i,");"))}objectDeclaration(e){let t="Identifier"===e.className.type?JSON.stringify(e.className.name):this.expression(e.className),n=null===e.instanceName?"null":"Identifier"===e.instanceName.type?JSON.stringify(e.instanceName.name):this.expression(e.instanceName),r=[],i=[];for(let t of e.body)"Assignment"===t.type?r.push(t):i.push(t);let a=this.objectBody(r);if(i.length>0){let e=i.map(e=>this.objectDeclaration(e)).join(",\n");return"".concat(this.runtime,".create(").concat(t,", ").concat(n,", ").concat(a,", [\n").concat(e,"\n])")}return"".concat(this.runtime,".create(").concat(t,", ").concat(n,", ").concat(a,")")}objectBody(e){if(0===e.length)return"{}";let t=[];for(let n of e)if("Assignment"===n.type){let e=this.expression(n.value);if("Identifier"===n.target.type){let r=n.target.name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(r)?t.push("".concat(r,": ").concat(e)):t.push("[".concat(JSON.stringify(r),"]: ").concat(e))}else if("IndexExpression"===n.target.type){let r=this.objectPropertyKey(n.target);t.push("[".concat(r,"]: ").concat(e))}else{let r=this.expression(n.target);t.push("[".concat(r,"]: ").concat(e))}}if(t.length<=1)return"{ ".concat(t.join(", ")," }");let n=this.indent.repeat(this.indentLevel+1),r=this.indent.repeat(this.indentLevel);return"{\n".concat(n).concat(t.join(",\n"+n),"\n").concat(r,"}")}objectPropertyKey(e){let t="Identifier"===e.object.type?JSON.stringify(e.object.name):this.expression(e.object),n=Array.isArray(e.index)?e.index.map(e=>this.expression(e)).join(", "):this.expression(e.index);return"".concat(this.runtime,".key(").concat(t,", ").concat(n,")")}ifStatement(e){let t=this.expression(e.test),n=this.statementAsBlock(e.consequent);if(e.alternate)if("IfStatement"===e.alternate.type){let r=this.ifStatement(e.alternate).replace(/^\s*/,"");return this.line("if (".concat(t,") ").concat(n," else ").concat(r))}else{let r=this.statementAsBlock(e.alternate);return this.line("if (".concat(t,") ").concat(n," else ").concat(r))}return this.line("if (".concat(t,") ").concat(n))}forStatement(e){let t=e.init?this.expression(e.init):"",n=e.test?this.expression(e.test):"",r=e.update?this.expression(e.update):"",i=this.statementAsBlock(e.body);return this.line("for (".concat(t,"; ").concat(n,"; ").concat(r,") ").concat(i))}whileStatement(e){let t=this.expression(e.test),n=this.statementAsBlock(e.body);return this.line("while (".concat(t,") ").concat(n))}doWhileStatement(e){let t=this.statementAsBlock(e.body),n=this.expression(e.test);return this.line("do ".concat(t," while (").concat(n,");"))}switchStatement(e){if(e.stringMode)return this.switchStringStatement(e);let t=this.expression(e.discriminant);this.indentLevel++;let n=[];for(let t of e.cases)n.push(this.switchCase(t));return this.indentLevel--,"".concat(this.line("switch (".concat(t,") {")),"\n").concat(n.join("\n"),"\n").concat(this.line("}"))}switchCase(e){let t=[];if(null===e.test)t.push(this.line("default:"));else if(Array.isArray(e.test))for(let n of e.test)t.push(this.line("case ".concat(this.expression(n),":")));else t.push(this.line("case ".concat(this.expression(e.test),":")));for(let n of(this.indentLevel++,e.consequent))t.push(this.statement(n));return t.push(this.line("break;")),this.indentLevel--,t.join("\n")}switchStringStatement(e){let t=this.expression(e.discriminant),n=[];for(let t of e.cases)if(null===t.test)n.push("default: () => { ".concat(this.blockContent(t.consequent)," }"));else if(Array.isArray(t.test))for(let e of t.test)n.push("".concat(this.expression(e),": () => { ").concat(this.blockContent(t.consequent)," }"));else n.push("".concat(this.expression(t.test),": () => { ").concat(this.blockContent(t.consequent)," }"));return this.line("".concat(this.runtime,".switchStr(").concat(t,", { ").concat(n.join(", ")," });"))}returnStatement(e){return e.value?this.line("return ".concat(this.expression(e.value),";")):this.line("return;")}blockStatement(e){this.indentLevel++;let t=e.body.map(e=>this.statement(e)).join("\n");return this.indentLevel--,"{\n".concat(t,"\n").concat(this.line("}"))}statementAsBlock(e){if("BlockStatement"===e.type)return this.blockStatement(e);this.indentLevel++;let t=this.statement(e);return this.indentLevel--,"{\n".concat(t,"\n").concat(this.line("}"))}blockContent(e){return e.map(e=>this.statement(e).trim()).join(" ")}expression(e){switch(e.type){case"Identifier":return this.identifier(e);case"Variable":return this.variable(e);case"NumberLiteral":case"BooleanLiteral":return String(e.value);case"StringLiteral":return JSON.stringify(e.value);case"BinaryExpression":return this.binaryExpression(e);case"UnaryExpression":return this.unaryExpression(e);case"PostfixExpression":return this.postfixExpression(e);case"AssignmentExpression":return this.assignmentExpression(e);case"ConditionalExpression":return"(".concat(this.expression(e.test)," ? ").concat(this.expression(e.consequent)," : ").concat(this.expression(e.alternate),")");case"CallExpression":return this.callExpression(e);case"MemberExpression":return this.memberExpression(e);case"IndexExpression":return this.indexExpression(e);case"TagDereferenceExpression":return"".concat(this.runtime,".deref(").concat(this.expression(e.argument),")");case"ObjectDeclaration":return this.objectDeclaration(e);case"DatablockDeclaration":return"".concat(this.runtime,".datablock(").concat(JSON.stringify(e.className.name),", ").concat(e.instanceName?JSON.stringify(e.instanceName.name):"null",", ").concat(e.parent?JSON.stringify(e.parent.name):"null",", ").concat(this.objectBody(e.body),")");default:throw Error("Unknown expression type: ".concat(e.type))}}identifier(e){let t=i(e.name);return t&&"parent"===t.namespace.toLowerCase()?e.name:t?"".concat(this.runtime,".nsRef(").concat(JSON.stringify(t.namespace),", ").concat(JSON.stringify(t.method),")"):JSON.stringify(e.name)}variable(e){return"global"===e.scope?"".concat(this.globals,".get(").concat(JSON.stringify(e.name),")"):"".concat(this.locals,".get(").concat(JSON.stringify(e.name),")")}binaryExpression(e){let t=this.expression(e.left),n=this.expression(e.right),r=e.operator,i=this.concatExpression(t,r,n);if(i)return i;if("$="===r)return"".concat(this.runtime,".streq(").concat(t,", ").concat(n,")");if("!$="===r)return"!".concat(this.runtime,".streq(").concat(t,", ").concat(n,")");if("&&"===r||"||"===r)return"(".concat(t," ").concat(r," ").concat(n,")");let s=a[r];return s?"".concat(s,"(").concat(t,", ").concat(n,")"):"(".concat(t," ").concat(r," ").concat(n,")")}unaryExpression(e){if("++"===e.operator||"--"===e.operator){let t=this.getAccessInfo(e.argument);if(t){let n="++"===e.operator?1:-1;return t.setter("".concat(this.runtime,".add(").concat(t.getter,", ").concat(n,")"))}}let t=this.expression(e.argument);return"~"===e.operator?"".concat(this.runtime,".bitnot(").concat(t,")"):"-"===e.operator?"".concat(this.runtime,".neg(").concat(t,")"):"".concat(e.operator).concat(t)}postfixExpression(e){let t=this.getAccessInfo(e.argument);if(t){let n="++"===e.operator?t.postIncHelper:t.postDecHelper;if(n)return n}return"".concat(this.expression(e.argument)).concat(e.operator)}assignmentExpression(e){let t=this.expression(e.value),n=e.operator,r=this.getAccessInfo(e.target);if(!r)throw Error("Unhandled assignment target type: ".concat(e.target.type));if("="===n)return r.setter(t);{let e=n.slice(0,-1),i=this.compoundAssignmentValue(r.getter,e,t);return r.setter(i)}}callExpression(e){let t=e.arguments.map(e=>this.expression(e)).join(", ");if("Identifier"===e.callee.type){let n=e.callee.name,r=i(n);if(r&&"parent"===r.namespace.toLowerCase())if(this.currentClass)return"".concat(this.runtime,".parent(").concat(JSON.stringify(this.currentClass),", ").concat(JSON.stringify(r.method),", arguments[0]").concat(t?", "+t:"",")");else if(this.currentFunction)return"".concat(this.runtime,".parentFunc(").concat(JSON.stringify(this.currentFunction)).concat(t?", "+t:"",")");else throw Error("Parent:: call outside of function context");return r?"".concat(this.runtime,".nsCall(").concat(JSON.stringify(r.namespace),", ").concat(JSON.stringify(r.method)).concat(t?", "+t:"",")"):"".concat(this.functions,".call(").concat(JSON.stringify(n)).concat(t?", "+t:"",")")}if("MemberExpression"===e.callee.type){let n=this.expression(e.callee.object),r="Identifier"===e.callee.property.type?JSON.stringify(e.callee.property.name):this.expression(e.callee.property);return"".concat(this.runtime,".call(").concat(n,", ").concat(r).concat(t?", "+t:"",")")}let n=this.expression(e.callee);return"".concat(n,"(").concat(t,")")}memberExpression(e){let t=this.expression(e.object);return e.computed||"Identifier"!==e.property.type?"".concat(this.runtime,".prop(").concat(t,", ").concat(this.expression(e.property),")"):"".concat(this.runtime,".prop(").concat(t,", ").concat(JSON.stringify(e.property.name),")")}indexExpression(e){let t=Array.isArray(e.index)?e.index.map(e=>this.expression(e)):[this.expression(e.index)];if("Variable"===e.object.type){let n=JSON.stringify(e.object.name),r="global"===e.object.scope?this.globals:this.locals;return"".concat(r,".get(").concat(n,", ").concat(t.join(", "),")")}if("MemberExpression"===e.object.type){let n=e.object,r=this.expression(n.object),i="Identifier"===n.property.type?JSON.stringify(n.property.name):this.expression(n.property),a="".concat(this.runtime,".key(").concat(i,", ").concat(t.join(", "),")");return"".concat(this.runtime,".prop(").concat(r,", ").concat(a,")")}let n=this.expression(e.object);return 1===t.length?"".concat(this.runtime,".getIndex(").concat(n,", ").concat(t[0],")"):"".concat(this.runtime,".getIndex(").concat(n,", ").concat(this.runtime,".key(").concat(t.join(", "),"))")}line(e){return this.indent.repeat(this.indentLevel)+e}concatExpression(e,t,n){switch(t){case"@":return"".concat(this.runtime,".concat(").concat(e,", ").concat(n,")");case"SPC":return"".concat(this.runtime,".concat(").concat(e,', " ", ').concat(n,")");case"TAB":return"".concat(this.runtime,".concat(").concat(e,', "\\t", ').concat(n,")");case"NL":return"".concat(this.runtime,".concat(").concat(e,', "\\n", ').concat(n,")");default:return null}}compoundAssignmentValue(e,t,n){let r=this.concatExpression(e,t,n);if(r)return r;let i=a[t];return i?"".concat(i,"(").concat(e,", ").concat(n,")"):"(".concat(e," ").concat(t," ").concat(n,")")}constructor(e={}){var t,n,i,a,s;(0,r._)(this,"indent",void 0),(0,r._)(this,"runtime",void 0),(0,r._)(this,"functions",void 0),(0,r._)(this,"globals",void 0),(0,r._)(this,"locals",void 0),(0,r._)(this,"indentLevel",0),(0,r._)(this,"currentClass",null),(0,r._)(this,"currentFunction",null),this.indent=null!=(t=e.indent)?t:" ",this.runtime=null!=(n=e.runtime)?n:"$",this.functions=null!=(i=e.functions)?i:"$f",this.globals=null!=(a=e.globals)?a:"$g",this.locals=null!=(s=e.locals)?s:"$l"}}e.s(["createRuntime",()=>E,"createScriptCache",()=>b],33870);var o=e.i(54970);class l{get size(){return this.map.size}get(e){let t=this.keyLookup.get(e.toLowerCase());return void 0!==t?this.map.get(t):void 0}set(e,t){let n=e.toLowerCase(),r=this.keyLookup.get(n);return void 0!==r?this.map.set(r,t):(this.keyLookup.set(n,e),this.map.set(e,t)),this}has(e){return this.keyLookup.has(e.toLowerCase())}delete(e){let t=e.toLowerCase(),n=this.keyLookup.get(t);return void 0!==n&&(this.keyLookup.delete(t),this.map.delete(n))}clear(){this.map.clear(),this.keyLookup.clear()}keys(){return this.map.keys()}values(){return this.map.values()}entries(){return this.map.entries()}[Symbol.iterator](){return this.map[Symbol.iterator]()}forEach(e){for(let[t,n]of this.map)e(n,t,this)}get[Symbol.toStringTag](){return"CaseInsensitiveMap"}getOriginalKey(e){return this.keyLookup.get(e.toLowerCase())}constructor(e){if((0,r._)(this,"map",new Map),(0,r._)(this,"keyLookup",new Map),e)for(let[t,n]of e)this.set(t,n)}}class u{get size(){return this.set.size}add(e){return this.set.add(e.toLowerCase()),this}has(e){return this.set.has(e.toLowerCase())}delete(e){return this.set.delete(e.toLowerCase())}clear(){this.set.clear()}[Symbol.iterator](){return this.set[Symbol.iterator]()}get[Symbol.toStringTag](){return"CaseInsensitiveSet"}constructor(e){if((0,r._)(this,"set",new Set),e)for(let t of e)this.add(t)}}function c(e){return e.replace(/\\/g,"/").toLowerCase()}function h(e){return String(null!=e?e:"")}function d(e){return Number(e)||0}function p(e){let t=h(e||"0 0 0").split(" ").map(Number);return[t[0]||0,t[1]||0,t[2]||0]}function f(e,t,n){let r=0;for(;t+r0;){if(r>=e.length)return"";let i=f(e,r,n);if(r+i>=e.length)return"";r+=i+1,t--}let i=f(e,r,n);return 0===i?"":e.substring(r,r+i)}function g(e,t,n,r){let i=0,a=t;for(;a>0;){if(i>=e.length)return"";let t=f(e,i,r);if(i+t>=e.length)return"";i+=t+1,a--}let s=i,o=n-t+1;for(;o>0;){let t=f(e,i,r);if((i+=t)>=e.length)break;i++,o--}let l=i;return l>s&&r.includes(e[l-1])&&l--,e.substring(s,l)}function v(e,t){if(""===e)return 0;let n=0;for(let r=0;rt&&s>=e.length)break}return a.join(i)}function _(e,t,n,r){let i=[],a=0,s=0;for(;a1?n-1:0),i=1;ih(e).replace(/\\([ntr\\])/g,(e,t)=>"n"===t?"\n":"t"===t?" ":"r"===t?"\r":"\\"),expandescape:e=>h(e).replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r"),export(e,t,n){console.warn("export(".concat(e,"): not implemented"))},quit(){console.warn("quit(): not implemented in browser")},trace(e){},isobject:e=>t().$.isObject(e),nametoid:e=>t().$.nameToId(e),strlen:e=>h(e).length,strchr(e,t){var n;let r=h(e),i=null!=(n=h(t)[0])?n:"",a=r.indexOf(i);return a>=0?r.substring(a):""},strpos:(e,t,n)=>h(e).indexOf(h(t),d(n)),strcmp(e,t){let n=h(e),r=h(t);return nr)},stricmp(e,t){let n=h(e).toLowerCase(),r=h(t).toLowerCase();return nr)},strstr:(e,t)=>h(e).indexOf(h(t)),getsubstr(e,t,n){let r=h(e),i=d(t);return void 0===n?r.substring(i):r.substring(i,i+d(n))},getword:(e,t)=>m(h(e),d(t)," \n"),getwordcount:e=>v(h(e)," \n"),getfield:(e,t)=>m(h(e),d(t)," \n"),getfieldcount:e=>v(h(e)," \n"),setword:(e,t,n)=>y(h(e),d(t),h(n)," \n"," "),setfield:(e,t,n)=>y(h(e),d(t),h(n)," \n"," "),firstword:e=>m(h(e),0," \n"),restwords:e=>g(h(e),1,1e6," \n"),trim:e=>h(e).trim(),ltrim:e=>h(e).replace(/^\s+/,""),rtrim:e=>h(e).replace(/\s+$/,""),strupr:e=>h(e).toUpperCase(),strlwr:e=>h(e).toLowerCase(),strreplace:(e,t,n)=>h(e).split(h(t)).join(h(n)),filterstring:(e,t)=>h(e),stripchars(e,t){let n=h(e),r=new Set(h(t).split(""));return n.split("").filter(e=>!r.has(e)).join("")},getfields(e,t,n){let r=void 0!==n?Number(n):1e6;return g(h(e),d(t),r," \n")},getwords(e,t,n){let r=void 0!==n?Number(n):1e6;return g(h(e),d(t),r," \n")},removeword:(e,t)=>_(h(e),d(t)," \n"," "),removefield:(e,t)=>_(h(e),d(t)," \n"," "),getrecord:(e,t)=>m(h(e),d(t),"\n"),getrecordcount:e=>v(h(e),"\n"),setrecord:(e,t,n)=>y(h(e),d(t),h(n),"\n","\n"),removerecord:(e,t)=>_(h(e),d(t),"\n","\n"),nexttoken(e,t,n){throw Error("nextToken() is not implemented: it requires variable mutation")},strtoplayername:e=>h(e).replace(/[^\w\s-]/g,"").trim(),mabs:e=>Math.abs(d(e)),mfloor:e=>Math.floor(d(e)),mceil:e=>Math.ceil(d(e)),msqrt:e=>Math.sqrt(d(e)),mpow:(e,t)=>Math.pow(d(e),d(t)),msin:e=>Math.sin(d(e)),mcos:e=>Math.cos(d(e)),mtan:e=>Math.tan(d(e)),masin:e=>Math.asin(d(e)),macos:e=>Math.acos(d(e)),matan:(e,t)=>Math.atan2(d(e),d(t)),mlog:e=>Math.log(d(e)),getrandom(e,t){if(void 0===e)return Math.random();if(void 0===t)return Math.floor(Math.random()*(d(e)+1));let n=d(e);return Math.floor(Math.random()*(d(t)-n+1))+n},mdegtorad:e=>d(e)*(Math.PI/180),mradtodeg:e=>d(e)*(180/Math.PI),mfloatlength:(e,t)=>d(e).toFixed(d(t)),getboxcenter(e){let t=h(e).split(" ").map(Number),n=t[0]||0,r=t[1]||0,i=t[2]||0,a=t[3]||0,s=t[4]||0,o=t[5]||0;return"".concat((n+a)/2," ").concat((r+s)/2," ").concat((i+o)/2)},vectoradd(e,t){let[n,r,i]=p(e),[a,s,o]=p(t);return"".concat(n+a," ").concat(r+s," ").concat(i+o)},vectorsub(e,t){let[n,r,i]=p(e),[a,s,o]=p(t);return"".concat(n-a," ").concat(r-s," ").concat(i-o)},vectorscale(e,t){let[n,r,i]=p(e),a=d(t);return"".concat(n*a," ").concat(r*a," ").concat(i*a)},vectordot(e,t){let[n,r,i]=p(e),[a,s,o]=p(t);return n*a+r*s+i*o},vectorcross(e,t){let[n,r,i]=p(e),[a,s,o]=p(t);return"".concat(r*o-i*s," ").concat(i*a-n*o," ").concat(n*s-r*a)},vectorlen(e){let[t,n,r]=p(e);return Math.sqrt(t*t+n*n+r*r)},vectornormalize(e){let[t,n,r]=p(e),i=Math.sqrt(t*t+n*n+r*r);return 0===i?"0 0 0":"".concat(t/i," ").concat(n/i," ").concat(r/i)},vectordist(e,t){let[n,r,i]=p(e),[a,s,o]=p(t),l=n-a,u=r-s,c=i-o;return Math.sqrt(l*l+u*u+c*c)},matrixcreate(e,t){throw Error("MatrixCreate() not implemented: requires axis-angle rotation math")},matrixcreatefromeuler(e){throw Error("MatrixCreateFromEuler() not implemented: requires Euler→Quaternion→AxisAngle conversion")},matrixmultiply(e,t){throw Error("MatrixMultiply() not implemented: requires full 4x4 matrix multiplication")},matrixmulpoint(e,t){throw Error("MatrixMulPoint() not implemented: requires full transform application")},matrixmulvector(e,t){throw Error("MatrixMulVector() not implemented: requires rotation matrix application")},getsimtime:()=>Date.now()-t().state.startTime,getrealtime:()=>Date.now(),schedule(e,n,r){for(var i=arguments.length,a=Array(i>3?i-3:0),s=3;s{l.state.pendingTimeouts.delete(u);try{l.$f.call(String(r),...a)}catch(e){throw console.error("schedule: error calling ".concat(r,":"),e),e}},o);return l.state.pendingTimeouts.add(u),u},cancel(e){clearTimeout(e),t().state.pendingTimeouts.delete(e)},iseventpending:e=>t().state.pendingTimeouts.has(e),exec(e){let n=String(null!=e?e:"");if(console.debug("exec(".concat(JSON.stringify(n),"): preparing to execute…")),!n.includes("."))return console.error("exec: invalid script file name ".concat(JSON.stringify(n),".")),!1;let r=c(n),i=t(),{executedScripts:a,scripts:s}=i.state;if(a.has(r))return console.debug("exec(".concat(JSON.stringify(n),"): skipping (already executed)")),!0;let o=s.get(r);return null==o?(console.warn("exec(".concat(JSON.stringify(n),"): script not found")),!1):(a.add(r),console.debug("exec(".concat(JSON.stringify(n),"): executing!")),i.executeAST(o),!0)},compile(e){throw Error("compile() not implemented: requires DSO bytecode compiler")},isdemo:()=>!1,isfile:e=>n?n.isFile(h(e)):(console.warn("isFile(): no fileSystem handler configured"),!1),fileext(e){let t=h(e),n=t.lastIndexOf(".");return n>=0?t.substring(n):""},filebase(e){let t=h(e),n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),r=t.lastIndexOf("."),i=n>=0?n+1:0,a=r>i?r:t.length;return t.substring(i,a)},filepath(e){let t=h(e),n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return n>=0?t.substring(0,n):""},expandfilename(e){throw Error("expandFilename() not implemented: requires filesystem path expansion")},findfirstfile(e){var t;return n?(a=h(e),r=n.findFiles(a),i=0,null!=(t=r[i++])?t:""):(console.warn("findFirstFile(): no fileSystem handler configured"),"")},findnextfile(e){var t;let s=h(e);if(s!==a){if(!n)return"";a=s,r=n.findFiles(s)}return null!=(t=r[i++])?t:""},getfilecrc:e=>h(e),iswriteablefilename:e=>!1,activatepackage(e){t().$.activatePackage(h(e))},deactivatepackage(e){t().$.deactivatePackage(h(e))},ispackage:e=>t().$.isPackage(h(e)),isactivepackage:e=>t().$.isActivePackage(h(e)),getpackagelist:()=>t().$.getPackageList(),addmessagecallback(e,t){},alxcreatesource(){for(var e=arguments.length,t=Array(e),n=0;n0,alxlistenerf(e,t){},alxplay(){for(var e=arguments.length,t=Array(e),n=0;n!1,lockmouse(e){},addmaterialmapping(e,t){},flushtexturecache(){},getdesktopresolution:()=>"1920 1080 32",getdisplaydevicelist:()=>"OpenGL",getresolutionlist:e=>"640 480 800 600 1024 768 1280 720 1920 1080",getvideodriverinfo:()=>"WebGL",isdevicefullscreenonly:e=>!1,isfullscreen:()=>!1,screenshot(e){},setdisplaydevice:e=>!0,setfov(e){},setinteriorrendermode(e){},setopenglanisotropy(e){},setopenglmipreduction(e){},setopenglskymipreduction(e){},setopengltexturecompressionhint(e){},setscreenmode(e,t,n,r){},setverticalsync(e){},setzoomspeed(e){},togglefullscreen(){},videosetgammacorrection(e){},snaptoggle(){},addtaggedstring:e=>0,buildtaggedstring(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rh(e),gettag:e=>0,gettaggedstring:e=>"",removetaggedstring(e){},commandtoclient(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r!0,allowconnections(e){},startheartbeat(){},stopheartbeat(){},gotowebpage(e){},deletedatablocks(){},preloaddatablock:e=>!0,containerboxempty(){for(var e=arguments.length,t=Array(e),n=0;n0,containersearchnext:()=>0,initcontainerradiussearch(){for(var e=arguments.length,t=Array(e),n=0;n0,getcontrolobjectspeed:()=>0,getterrainheight:e=>0,lightscene(){for(var e=arguments.length,t=Array(e),n=0;n>>0}function w(e){if(null==e)return null;if("string"==typeof e)return e||null;if("number"==typeof e)return String(e);throw Error("Invalid instance name type: ".concat(typeof e))}function E(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=new l,a=new l,h=new l,d=[],p=new u,f=3,m=1027,g=new Map,v=new l,y=new l,_=new l,E=new l,A=new l;if(r.globals)for(let[e,t]of Object.entries(r.globals)){if(!e.startsWith("$"))throw Error('Global variable "'.concat(e,'" must start with $, e.g. "$').concat(e,'"'));_.set(e.slice(1),t)}let C=new Set,R=new Set,P=r.ignoreScripts&&r.ignoreScripts.length>0?(0,o.default)(r.ignoreScripts,{nocase:!0}):null,I=null!=(e=r.cache)?e:b(),L=I.scripts,N=I.generatedCode,D=new Map;function U(e){let t=D.get(e);return t&&t.length>0?t[t.length-1]:void 0}function O(e,t,n){let r;(r=D.get(e))||(r=[],D.set(e,r)),r.push(t);try{return n()}finally{let t=D.get(e);t&&t.pop()}}function F(e,t){return"".concat(e.toLowerCase(),"::").concat(t.toLowerCase())}function k(e,t){var n,r;return null!=(r=null==(n=i.get(e))?void 0:n.get(t))?r:null}let z=new Set,B=null,H=null,V=(null!=(t=r.builtins)?t:x)({runtime:()=>H,fileSystem:null!=(n=r.fileSystem)?n:null});function G(e){let t=h.get(e);if(!t)return void p.add(e);if(!t.active){for(let[e,n]of(t.active=!0,d.push(t.name),t.methods)){i.has(e)||i.set(e,new l);let t=i.get(e);for(let[e,r]of n)t.has(e)||t.set(e,[]),t.get(e).push(r)}for(let[e,n]of t.functions)a.has(e)||a.set(e,[]),a.get(e).push(n)}}function W(e){var t,n;return null==e||""===e?null:"object"==typeof e&&null!=e._id?e:"string"==typeof e?null!=(t=v.get(e))?t:null:"number"==typeof e&&null!=(n=g.get(e))?n:null}function j(e,t,n){let r=W(e);if(null==r)return 0;let i=J(r[t]);return r[t]=i+n,i}function X(e,t){let n=k(e,t);return n&&n.length>0?n[n.length-1]:null}function q(e,t,n,r){let i=k(e,t);return i&&0!==i.length?{found:!0,result:O(F(e,t),i.length-1,()=>i[i.length-1](n,...r))}:{found:!1}}function Y(e,t,n,r){let i=E.get(e);if(i){let e=i.get(t);if(e)for(let t of e)t(n,...r)}}function J(e){if(null==e||""===e)return 0;let t=Number(e);return isNaN(t)?0:t}function Z(e){if(!e||""===e)return null;e.startsWith("/")&&(e=e.slice(1));let t=e.split("/"),n=null;for(let e=0;e{var n;return(null==(n=t._name)?void 0:n.toLowerCase())===e});n=null!=t?t:null}if(!n)return null}}return n}function K(e){return null==e||""===e?null:Z(String(e))}function $(e){function t(e,t){return e+t.join("_")}return{get(n){for(var r,i=arguments.length,a=Array(i>1?i-1:0),s=1;s1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;at.toLowerCase()===e.toLowerCase());for(let[e,r]of(-1!==n&&d.splice(n,1),t.methods)){let t=i.get(e);if(t)for(let[e,n]of r){let r=t.get(e);if(r){let e=r.indexOf(n);-1!==e&&r.splice(e,1)}}}for(let[e,n]of t.functions){let t=a.get(e);if(t){let e=t.indexOf(n);-1!==e&&t.splice(e,1)}}},create:function(e,t,n,r){let i=S(e),a=m++,s={_class:i,_className:e,_id:a};for(let[e,t]of Object.entries(n))s[S(e)]=t;s.superclass&&(s._superClass=S(String(s.superclass)),s.class&&A.set(S(String(s.class)),s._superClass)),g.set(a,s);let o=w(t);if(o&&(s._name=o,v.set(o,s)),r){for(let e of r)e._parent=s;s._children=r}let l=X(e,"onAdd");return l&&l(s),s},datablock:function(e,t,n,r){let i=S(e),a=f++,s={_class:i,_className:e,_id:a,_isDatablock:!0},o=w(n);if(o){let e=y.get(o);if(e){for(let[t,n]of Object.entries(e))t.startsWith("_")||(s[t]=n);s._parent=e}}for(let[e,t]of Object.entries(r))s[S(e)]=t;g.set(a,s);let l=w(t);return l&&(s._name=l,v.set(l,s),y.set(l,s)),s},deleteObject:function e(t){let n;if(null==t||("number"==typeof t?n=g.get(t):"string"==typeof t?n=v.get(t):"object"==typeof t&&t._id&&(n=t),!n))return!1;let r=X(n._className,"onRemove");if(r&&r(n),g.delete(n._id),n._name&&v.delete(n._name),n._isDatablock&&n._name&&y.delete(n._name),n._parent&&n._parent._children){let e=n._parent._children.indexOf(n);-1!==e&&n._parent._children.splice(e,1)}if(n._children)for(let t of[...n._children])e(t);return!0},prop:function(e,t){var n;let r=W(e);return null==r?"":null!=(n=r[S(t)])?n:""},setProp:function(e,t,n){let r=W(e);return null==r||(r[S(t)]=n),n},getIndex:function(e,t){var n;let r=W(e);return null==r?"":null!=(n=r[String(t)])?n:""},setIndex:function(e,t,n){let r=W(e);return null==r||(r[String(t)]=n),n},propPostInc:function(e,t){return j(e,S(t),1)},propPostDec:function(e,t){return j(e,S(t),-1)},indexPostInc:function(e,t){return j(e,String(t),1)},indexPostDec:function(e,t){return j(e,String(t),-1)},key:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2?n-2:0),i=2;i2?n-2:0),i=2;io(...r)),u=r[0];return u&&"object"==typeof u&&Y(e,t,u,r.slice(1)),l},nsRef:function(e,t){let n=k(e,t);if(!n||0===n.length)return null;let r=F(e,t),i=n[n.length-1];return function(){for(var e=arguments.length,t=Array(e),a=0;ai(...t))}},parent:function(e,t,n){for(var r=arguments.length,i=Array(r>3?r-3:0),a=3;a=1){let r=l-1,a=O(o,r,()=>s[r](n,...i));return n&&"object"==typeof n&&Y(e,t,n,i),a}let u=A.get(e);for(;u;){let e=k(u,t);if(e&&e.length>0){let r=O(F(u,t),e.length-1,()=>e[e.length-1](n,...i));return n&&"object"==typeof n&&Y(u,t,n,i),r}u=A.get(u)}return""},parentFunc:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;ri[l](...n))},add:function(e,t){return J(e)+J(t)},sub:function(e,t){return J(e)-J(t)},mul:function(e,t){return J(e)*J(t)},div:function(e,t){return J(e)/J(t)},neg:function(e){return-J(e)},lt:function(e,t){return J(e)J(t)},ge:function(e,t){return J(e)>=J(t)},eq:function(e,t){return J(e)===J(t)},ne:function(e,t){return J(e)!==J(t)},mod:function(e,t){let n=0|Number(t);return 0===n?0:(0|Number(e))%n},bitand:function(e,t){return M(e)&M(t)},bitor:function(e,t){return M(e)|M(t)},bitxor:function(e,t){return M(e)^M(t)},shl:function(e,t){return M(M(e)<<(31&M(t)))},shr:function(e,t){return M(e)>>>(31&M(t))},bitnot:function(e){return~M(e)>>>0},concat:function(){for(var e=arguments.length,t=Array(e),n=0;nString(null!=e?e:"")).join("")},streq:function(e,t){return String(null!=e?e:"").toLowerCase()===String(null!=t?t:"").toLowerCase()},switchStr:function(e,t){let n=String(null!=e?e:"").toLowerCase();for(let[e,r]of Object.entries(t))if("default"!==e&&S(e)===n)return void r();t.default&&t.default()},deref:K,nameToId:function(e){let t=Z(e);return t?t._id:-1},isObject:function(e){return null!=e&&("object"==typeof e&&!!e._id||("number"==typeof e?g.has(e):"string"==typeof e&&v.has(e)))},isFunction:function(e){return a.has(e)||e.toLowerCase()in V},isPackage:function(e){return h.has(e)},isActivePackage:function(e){var t;let n=h.get(e);return null!=(t=null==n?void 0:n.active)&&t},getPackageList:function(){return d.join(" ")},locals:Q,onMethodCalled(e,t,n){let r=E.get(e);r||(r=new l,E.set(e,r));let i=r.get(t);i||(i=[],r.set(t,i)),i.push(n)}},et={call(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0)return O(e.toLowerCase(),i.length-1,()=>i[i.length-1](...n));let s=V[e.toLowerCase()];return s?s(...n):(console.warn("Unknown function: ".concat(e,"(").concat(n.map(e=>JSON.stringify(e)).join(", "),")")),"")}},en=$(_),er={methods:i,functions:a,packages:h,activePackages:d,objectsById:g,objectsByName:v,datablocks:y,globals:_,executedScripts:C,failedScripts:R,scripts:L,generatedCode:N,pendingTimeouts:z,startTime:Date.now()};function ei(e){let t=function(e){let t=N.get(e);null==t&&(t=new s(void 0).generate(e),N.set(e,t));return t}(e),n=Q();Function("$","$f","$g","$l",t)(ee,et,en,n)}function ea(e,t){return{execute(){if(t){let e=c(t);er.executedScripts.add(e)}ei(e)}}}async function es(e,t,n){let i=r.loadScript;if(!i){e.length>0&&console.warn("Script has exec() calls but no loadScript provided:",e);return}async function a(e){var a;null==(a=r.signal)||a.throwIfAborted();let s=c(e);if(er.scripts.has(s)||er.failedScripts.has(s))return;if(P&&P(s)){console.warn("Ignoring script: ".concat(e)),er.failedScripts.add(s);return}if(n.has(s))return;let o=t.get(s);if(o)return void await o;let l=(async()=>{let r,a=await i(e);if(null==a){console.warn("Script not found: ".concat(e)),er.failedScripts.add(s);return}try{r=T(a,{filename:e})}catch(t){console.warn("Failed to parse script: ".concat(e),t),er.failedScripts.add(s);return}let o=new Set(n);o.add(s),await es(r.execScriptPaths,t,o),er.scripts.set(s,r)})();t.set(s,l),await l}await Promise.all(e.map(a))}async function eo(e){let t=r.loadScript;if(!t)throw Error("loadFromPath requires loadScript option to be set");let n=c(e);if(er.scripts.has(n))return ea(er.scripts.get(n),e);let i=await t(e);if(null==i)throw Error("Script not found: ".concat(e));return el(i,{path:e})}async function el(e,t){if(null==t?void 0:t.path){let e=c(t.path);if(er.scripts.has(e))return ea(er.scripts.get(e),t.path)}return eu(T(e,{filename:null==t?void 0:t.path}),t)}async function eu(e,t){var n;let i=new Map,a=new Set;if(null==t?void 0:t.path){let n=c(t.path);er.scripts.set(n,e),a.add(n)}let s=[...e.execScriptPaths,...null!=(n=r.preloadScripts)?n:[]];return await es(s,i,a),ea(e,null==t?void 0:t.path)}return H={$:ee,$f:et,$g:en,state:er,destroy:function(){for(let e of er.pendingTimeouts)clearTimeout(e);er.pendingTimeouts.clear()},executeAST:ei,loadFromPath:eo,loadFromSource:el,loadFromAST:eu,call:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rv.get(e)}}function T(e,t){try{return n.default.parse(e)}catch(e){if((null==t?void 0:t.filename)&&e.location)throw Error("".concat(t.filename,":").concat(e.location.start.line,":").concat(e.location.start.column,": ").concat(e.message),{cause:e});throw e}}function A(e){let{missionName:t,missionType:n,runtimeOptions:r,onMissionLoadDone:i}=e,{signal:a,fileSystem:s}=null!=r?r:{},o=E({...r,globals:{...null==r?void 0:r.globals,"$Host::Map":t,"$Host::MissionType":n}}),l="".concat(n,"Game"),u="scripts/".concat(l,".cs"),c=async function(){try{let e=await o.loadFromPath("scripts/server.cs");null==a||a.throwIfAborted(),await o.loadFromPath("scripts/DefaultGame.cs"),null==a||a.throwIfAborted();try{await o.loadFromPath(u)}catch(e){}null==a||a.throwIfAborted(),await o.loadFromPath("missions/".concat(t,".mis")),null==a||a.throwIfAborted(),e.execute(),i&&o.$.onMethodCalled("DefaultGame","missionLoadDone",i);let n=await o.loadFromSource("CreateServer($Host::Map, $Host::MissionType);");null==a||a.throwIfAborted(),n.execute()}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}}();return{runtime:o,ready:c}}let C=/^[ \t]*(DisplayName|MissionTypes|BriefingWAV|Bitmap|PlanetName)[ \t]*=[ \t]*(.+)$/i,R=/^[ \t]*-+[ \t]*([A-Z ]+)[ \t]+BEGIN[ \t]*-+$/i,P=/^[ \t]*-+[ \t]*([A-Z ]+)[ \t]+END[ \t]*-+$/i;function I(e){var t,n,r,i,a,s;let o=T(e),{pragma:l,sections:u}=function(e){let t={},n=[],r={name:null,comments:[]};for(let i of e.body)if("Comment"===i.type){let e=function(e){let t;return(t=e.match(R))?{type:"sectionBegin",name:t[1]}:(t=e.match(P))?{type:"sectionEnd",name:t[1]}:(t=e.match(C))?{type:"definition",identifier:t[1],value:t[2]}:null}(i.value);if(e)switch(e.type){case"definition":null===r.name?t[e.identifier.toLowerCase()]=e.value:r.comments.push(i.value);break;case"sectionBegin":(null!==r.name||r.comments.length>0)&&n.push(r),r={name:e.name.toUpperCase(),comments:[]};break;case"sectionEnd":null!==r.name&&n.push(r),r={name:null,comments:[]}}else r.comments.push(i.value)}return(null!==r.name||r.comments.length>0)&&n.push(r),{pragma:t,sections:n}}(o);function c(e){var t,n;return null!=(n=null==(t=u.find(t=>t.name===e))?void 0:t.comments.map(e=>e.trimStart()).join("\n"))?n:null}return{displayName:null!=(n=l.displayname)?n:null,missionTypes:null!=(r=null==(t=l.missiontypes)?void 0:t.split(/\s+/).filter(Boolean))?r:[],missionBriefing:c("MISSION BRIEFING"),briefingWav:null!=(i=l.briefingwav)?i:null,bitmap:null!=(a=l.bitmap)?a:null,planetName:null!=(s=l.planetname)?s:null,missionBlurb:c("MISSION BLURB"),missionQuote:c("MISSION QUOTE"),missionString:c("MISSION STRING"),execScriptPaths:o.execScriptPaths,hasDynamicExec:o.hasDynamicExec,ast:o}}function L(e,t){if(e)return e[t.toLowerCase()]}function N(e,t){let n=e[t.toLowerCase()];return null==n?n:parseFloat(n)}function D(e,t){let n=e[t.toLowerCase()];return null==n?n:parseInt(n,10)}function U(e){var t;let[n,r,i]=(null!=(t=e.position)?t:"0 0 0").split(" ").map(e=>parseFloat(e));return[r||0,i||0,n||0]}function O(e){var t;let[n,r,i]=(null!=(t=e.scale)?t:"1 1 1").split(" ").map(e=>parseFloat(e));return[r||0,i||0,n||0]}function F(e){var n;let[r,i,a,s]=(null!=(n=e.rotation)?n:"1 0 0 0").split(" ").map(e=>parseFloat(e)),o=new t.Vector3(i,a,r).normalize(),l=-(Math.PI/180*s);return new t.Quaternion().setFromAxisAngle(o,l)}},12979,e=>{"use strict";e.s(["BASE_URL",()=>a,"FALLBACK_TEXTURE_URL",()=>o,"audioToUrl",()=>f,"getUrlForPath",()=>l,"iflTextureToUrl",()=>d,"interiorToUrl",()=>u,"loadDetailMapList",()=>m,"loadImageFrameList",()=>y,"loadMission",()=>g,"loadTerrain",()=>v,"shapeToUrl",()=>c,"terrainTextureToUrl",()=>h,"textureToUrl",()=>p],12979);var t=e.i(98223),n=e.i(91996),r=e.i(62395),i=e.i(71726);let a="/t2-mapper",s="".concat(a,"/base/"),o="".concat(a,"/magenta.png");function l(e,t){let r;try{r=(0,n.getActualResourceKey)(e)}catch(n){if(t)return console.warn('Resource "'.concat(e,'" not found - rendering fallback.')),t;throw n}let[i,a]=(0,n.getSourceAndPath)(r);return i?"".concat(s,"@vl2/").concat(i,"/").concat(a):"".concat(s).concat(a)}function u(e){return l("interiors/".concat(e)).replace(/\.dif$/i,".glb")}function c(e){return l("shapes/".concat(e)).replace(/\.dts$/i,".glb")}function h(e){return e=e.replace(/^terrain\./,""),l((0,n.getStandardTextureResourceKey)("textures/terrain/".concat(e)),o)}function d(e,t){let r=(0,i.normalizePath)(t).split("/"),a=r.length>1?r.slice(0,-1).join("/")+"/":"",s="".concat(a).concat(e);return l((0,n.getStandardTextureResourceKey)(s),o)}function p(e){return l((0,n.getStandardTextureResourceKey)("textures/".concat(e)),o)}function f(e){return l("audio/".concat(e))}async function m(e){let t=l("textures/".concat(e)),n=await fetch(t);return(await n.text()).split(/(?:\r\n|\r|\n)/).map(e=>{if(!(e=e.trim()).startsWith(";"))return e}).filter(Boolean)}async function g(e){let t=(0,n.getMissionInfo)(e),i=await fetch(l(t.resourcePath)),a=await i.text();return(0,r.parseMissionScript)(a)}async function v(e){let t=await fetch(l("terrains/".concat(e)));return function(e){let t=new DataView(e),n=0,r=t.getUint8(n++),i=new Uint16Array(65536),a=[],s=e=>{let r="";for(let i=0;i0&&a.push(i)}let o=[];for(let e of a){let e=new Uint8Array(65536);for(let r=0;r<65536;r++){var l=t.getUint8(n++);e[r]=l}o.push(e)}return{version:r,textureNames:a,heightMap:i,alphaMaps:o}}(await t.arrayBuffer())}async function y(e){let n=l(e),r=await fetch(n),i=await r.text();return(0,t.parseImageFileList)(i)}}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24478,(e,t,n)=>{"use strict";n.ConcurrentRoot=1,n.ContinuousEventPriority=8,n.DefaultEventPriority=32,n.DiscreteEventPriority=2,n.IdleEventPriority=0x10000000,n.LegacyRoot=0,n.NoEventPriority=0},39695,(e,t,n)=>{"use strict";t.exports=e.r(24478)},55838,(e,t,n)=>{"use strict";var r=e.r(71645),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,s=r.useEffect,o=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return o(function(){i.value=n,i.getSnapshot=t,u(i)&&c({inst:i})},[e,n,t]),s(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},2239,(e,t,n)=>{"use strict";t.exports=e.r(55838)},52822,(e,t,n)=>{"use strict";var r=e.r(71645),i=e.r(2239),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,o=r.useRef,l=r.useEffect,u=r.useMemo,c=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var h=o(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;var p=s(e,(h=u(function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return o=t}return o=e}if(t=o,a(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(s=e,t):(s=e,o=n)}var s,o,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,i]))[0],h[1]);return l(function(){d.hasValue=!0,d.value=p},[p]),c(p),p}},30224,(e,t,n)=>{"use strict";t.exports=e.r(52822)},29779,(e,t,n)=>{"use strict";function r(e,t){var n=e.length;for(e.push(t);0>>1,i=e[r];if(0>>1;rs(l,n))us(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[o]=n,r=o);else if(us(c,n))e[r]=c,e[u]=n,r=u;else break}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(n.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();n.unstable_now=function(){return u.now()-c}}var h=[],d=[],p=1,f=null,m=3,g=!1,v=!1,y=!1,_="function"==typeof setTimeout?setTimeout:null,x="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function S(e){for(var t=i(d);null!==t;){if(null===t.callback)a(d);else if(t.startTime<=e)a(d),t.sortIndex=t.expirationTime,r(h,t);else break;t=i(d)}}function M(e){if(y=!1,S(e),!v)if(null!==i(h))v=!0,L();else{var t=i(d);null!==t&&N(M,t.startTime-e)}}var w=!1,E=-1,T=5,A=-1;function C(){return!(n.unstable_now()-Ae&&C());){var s=f.callback;if("function"==typeof s){f.callback=null,m=f.priorityLevel;var l=s(f.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof l){f.callback=l,S(e),t=!0;break t}f===i(h)&&a(h),S(e)}else a(h);f=i(h)}if(null!==f)t=!0;else{var u=i(d);null!==u&&N(M,u.startTime-e),t=!1}}break e}finally{f=null,m=r,g=!1}}}finally{t?o():w=!1}}}if("function"==typeof b)o=function(){b(R)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,I=P.port2;P.port1.onmessage=R,o=function(){I.postMessage(null)}}else o=function(){_(R,0)};function L(){w||(w=!0,o())}function N(e,t){E=_(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_continueExecution=function(){v||g||(v=!0,L())},n.unstable_forceFrameRate=function(e){0>e||125s?(e.sortIndex=a,r(d,e),null===i(h)&&e===i(d)&&(y?(x(E),E=-1):y=!0,N(M,a-s))):(e.sortIndex=o,r(h,e),v||g||(v=!0,L())),e},n.unstable_shouldYield=C,n.unstable_wrapCallback=function(e){var t=m;return function(){var n=m;m=t;try{return e.apply(this,arguments)}finally{m=n}}}},51849,(e,t,n)=>{"use strict";t.exports=e.r(29779)},40336,(e,t,n)=>{"use strict";var r=e.i(47167);t.exports=function(t){function n(e,t,n,r){return new rP(e,t,n,r)}function i(){}function a(e){var t="https://react.dev/errors/"+e;if(1)":-1i||u[r]!==c[i]){var h="\n"+u[r].replace(" at new "," at ");return e.displayName&&h.includes("")&&(h=h.replace("",e.displayName)),h}while(1<=r&&0<=i)break}}}finally{io=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?l(n):""}function c(e){try{var t="";do t+=function(e){switch(e.tag){case 26:case 27:case 5:return l(e.type);case 16:return l("Lazy");case 13:return l("Suspense");case 19:return l("SuspenseList");case 0:case 15:return u(e.type,!1);case 11:return u(e.type.render,!1);case 1:return u(e.type,!0);default:return""}}(e),e=e.return;while(e)return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function h(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do 0!=(4098&(t=e).flags)&&(n=t.return),e=t.return;while(e)}return 3===t.tag?n:null}function d(e){if(h(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(null===(t=h(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return d(i),e;if(s===r)return d(i),t;s=s.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){return{current:e}}function m(e){0>a4||(e.current=a3[a4],a3[a4]=null,a4--)}function g(e,t){a3[++a4]=e.current,e.current=t}function v(e){var t=42&e;if(0!==t)return t;switch(e&-e){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:return 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 4194176&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function y(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=e.warmLanes;e=0!==e.finishedLanes;var o=0x7ffffff&n;return 0!==o?0!=(n=o&~i)?r=v(n):0!=(a&=o)?r=v(a):e||0!=(s=o&~s)&&(r=v(s)):0!=(o=n&~i)?r=v(o):0!==a?r=v(a):e||0!=(s=n&~s)&&(r=v(s)),0===r?0:0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(s=t&-t)||32===i&&0!=(4194176&s))?t:r}function _(e,t){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function x(){var e=a7;return 0==(4194176&(a7<<=1))&&(a7=128),e}function b(){var e=se;return 0==(0x3c00000&(se<<=1))&&(se=4194304),e}function S(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function M(e,t){e.pendingLanes|=t,0x10000000!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function w(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-a6(t);e.entangledLanes|=t,e.entanglements[r]=0x40000000|e.entanglements[r]|4194218&n}function E(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-a6(n),i=1<>=s,i-=s,sb=1<<32-a6(t)+i|n<d?(p=h,h=null):p=h.sibling;var v=m(n,h,s[d],o);if(null===v){null===h&&(h=p);break}e&&h&&null===v.alternate&&t(n,h),a=l(v,a,d),null===c?u=v:c.sibling=v,c=v,h=p}if(d===s.length)return r(n,h),sR&&C(n,d),u;if(null===h){for(;dp?(v=d,d=null):v=d.sibling;var _=m(n,d,y.value,u);if(null===_){null===d&&(d=v);break}e&&d&&null===_.alternate&&t(n,d),s=l(_,s,p),null===h?c=_:h.sibling=_,h=_,d=v}if(y.done)return r(n,d),sR&&C(n,p),c;if(null===d){for(;!y.done;p++,y=o.next())null!==(y=f(n,y.value,u))&&(s=l(y,s,p),null===h?c=y:h.sibling=y,h=y);return sR&&C(n,p),c}for(d=i(d);!y.done;p++,y=o.next())null!==(y=g(d,n,p,y.value,u))&&(e&&null!==y.alternate&&d.delete(null===y.key?p:y.key),s=l(y,s,p),null===h?c=y:h.sibling=y,h=y);return e&&d.forEach(function(e){return t(n,e)}),sR&&C(n,p),c}(c,h,d=v.call(d),p)}if("function"==typeof d.then)return n(c,h,ev(d),p);if(d.$$typeof===r3)return n(c,h,nl(c,d),p);e_(c,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"==typeof d?(d=""+d,null!==h&&6===h.tag?(r(c,h.sibling),(p=o(h,d)).return=c):(r(c,h),(p=rF(d,c.mode,p)).return=c),u(c=p)):r(c,h)}(c,h,d,p);return sQ=null,v}catch(e){if(e===sJ)throw e;var y=n(29,e,null,c.mode);return y.lanes=p,y.return=c,y}finally{}}}function eS(e,t){g(s4,e=o1),g(s3,t),o1=e|t.baseLanes}function eM(){g(s4,o1),g(s3,s3.current)}function ew(){o1=s4.current,m(s3),m(s4)}function eE(e){var t=e.alternate;g(s8,1&s8.current),g(s5,e),null===s6&&(null===t||null!==s3.current?s6=e:null!==t.memoizedState&&(s6=e))}function eT(e){if(22===e.tag){if(g(s8,s8.current),g(s5,e),null===s6){var t=e.alternate;null!==t&&null!==t.memoizedState&&(s6=e)}}else eA(e)}function eA(){g(s8,s8.current),g(s5,s5.current)}function eC(e){m(s5),s6===e&&(s6=null),m(s8)}function eR(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||ap(n)||af(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function eP(){throw Error(a(321))}function eI(e,t){if(null===t)return!1;for(var n=0;na?a:8);var s=is.T,o={};is.T=o,tC(e,!1,t,n);try{var l=i(),u=is.S;if(null!==u&&u(o,l),null!==l&&"object"==typeof l&&"function"==typeof l.then){var c,h,d=(c=[],h={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},l.then(function(){h.status="fulfilled",h.value=r;for(var e=0;e";case oB:return":has("+(n6(e)||"")+")";case oH:return'[role="'+e.value+'"]';case oG:return'"'+e.value+'"';case oV:return'[data-testname="'+e.value+'"]';default:throw Error(a(365))}}function n8(e,t){var n=[];e=[e,0];for(var r=0;rln&&(t.flags|=128,r=!0,nM(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=eR(s))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,nS(t,e),nM(i,!0),null===i.tail&&"hidden"===i.tailMode&&!s.alternate&&!sR)return nw(t),null}else 2*sa()-i.renderingStartTime>ln&&0x20000000!==n&&(t.flags|=128,r=!0,nM(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(null!==(e=i.last)?e.sibling=s:t.child=s,i.last=s)}if(null!==i.tail)return t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=sa(),t.sibling=null,e=s8.current,g(s8,r?1&e|2:1&e),t;return nw(t),null;case 22:case 23:return eC(t),ew(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!=(0x20000000&n)&&0==(128&t.flags)&&(nw(t),6&t.subtreeFlags&&(t.flags|=8192)):nw(t),null!==(n=t.updateQueue)&&nS(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&m(oA),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),nt(oE),nw(t),null;case 25:return null}throw Error(a(156,t.tag))}(t.alternate,t,o1);if(null!==n){oY=n;return}if(null!==(t=t.sibling)){oY=t;return}oY=t=e}while(null!==t)0===o2&&(o2=5)}function r_(e,t){do{var n=function(e,t){switch(I(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return nt(oE),N(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return U(t),null;case 13:if(eC(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));B()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return m(s8),null;case 4:return N(),null;case 10:return nt(t.type),null;case 22:case 23:return eC(t),ew(),null!==e&&m(oA),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return nt(oE),null;default:return null}}(e.alternate,e);if(null!==n){n.flags&=32767,oY=n;return}if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling)){oY=e;return}oY=e=n}while(null!==e)o2=6,oY=null}function rx(e,t,n,r,i,s,o,l,u,c){var h=is.T,d=iN();try{iL(2),is.T=null,function(e,t,n,r,i,s,o,l){do rS();while(null!==ls)if(0!=(6&oX))throw Error(a(327));var u,c,h=e.finishedWork;if(r=e.finishedLanes,null!==h){if(e.finishedWork=null,e.finishedLanes=0,h===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var d=h.lanes|h.childLanes;!function(e,t,n,r,i,a){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(n=s&~n;0n?32:n;n=is.T;var i=iN();try{if(iL(r),is.T=null,null===ls)var s=!1;else{r=lu,lu=null;var o=ls,l=lo;if(ls=null,lo=0,0!=(6&oX))throw Error(a(331));var u=oX;if(oX|=4,n2(o.current),nZ(o,o.current,l,r),oX=u,J(0,!1),sh&&"function"==typeof sh.onPostCommitFiberRoot)try{sh.onPostCommitFiberRoot(sc,o)}catch(e){}s=!0}return s}finally{iL(i),is.T=n,rb(e,t)}}return!1}function rM(e,t,n){t=A(n,t),t=tk(e.stateNode,t,2),null!==(e=ea(e,t,2))&&(M(e,2),Y(e))}function rw(e,t,n){if(3===e.tag)rM(e,e,n);else for(;null!==t;){if(3===t.tag){rM(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===li||!li.has(r))){e=A(n,e),null!==(r=ea(t,n=tz(2),2))&&(tB(n,r,t,e),M(r,2),Y(r));break}}t=t.return}}function rE(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new oj;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(o0=!0,i.add(n),e=rT.bind(null,e,t,n),t.then(e,e))}function rT(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,oq===e&&(oJ&n)===n&&(4===o2||3===o2&&(0x3c00000&oJ)===oJ&&300>sa()-lt?0==(2&oX)&&rl(e,0):o5|=n,o8===oJ&&(o8=0)),Y(e)}function rA(e,t){0===t&&(t=b()),null!==(e=j(e,t))&&(M(e,t),Y(e))}function rC(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),rA(e,n)}function rR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}null!==r&&r.delete(t),rA(e,n)}function rP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rI(e){return!(!(e=e.prototype)||!e.isReactComponent)}function rL(e,t){var r=e.alternate;return null===r?((r=n(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=0x1e00000&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function rN(e,t){e.flags&=0x1e00002;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,e.dependencies=null===(t=n.dependencies)?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function rD(e,t,r,i,s,o){var l=0;if(i=e,"function"==typeof e)rI(e)&&(l=1);else if("string"==typeof e)l=aF&&aK?ak(e,r,sM.current)?26:a2(e)?27:5:aF?ak(e,r,sM.current)?26:5:aK&&a2(e)?27:5;else e:switch(e){case r$:return rU(r.children,s,o,t);case rQ:l=8,s|=24;break;case r0:return(e=n(12,r,t,2|s)).elementType=r0,e.lanes=o,e;case r5:return(e=n(13,r,t,s)).elementType=r5,e.lanes=o,e;case r6:return(e=n(19,r,t,s)).elementType=r6,e.lanes=o,e;case r7:return rO(r,s,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case r1:case r3:l=10;break e;case r2:l=9;break e;case r4:l=11;break e;case r8:l=14;break e;case r9:l=16,i=null;break e}l=29,r=Error(a(130,null===e?"null":typeof e,"")),i=null}return(t=n(l,r,t,s)).elementType=e,t.type=i,t.lanes=o,t}function rU(e,t,r,i){return(e=n(7,e,i,t)).lanes=r,e}function rO(e,t,r,i){(e=n(22,e,i,t)).elementType=r7,e.lanes=r;var s={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=s._current;if(null===e)throw Error(a(456));if(0==(2&s._pendingVisibility)){var t=j(e,2);null!==t&&(s._pendingVisibility|=2,rt(t,e,2))}},attach:function(){var e=s._current;if(null===e)throw Error(a(456));if(0!=(2&s._pendingVisibility)){var t=j(e,2);null!==t&&(s._pendingVisibility&=-3,rt(t,e,2))}}};return e.stateNode=s,e}function rF(e,t,r){return(e=n(6,e,null,t)).lanes=r,e}function rk(e,t,r){return(t=n(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rz(e,t,n,r,i,a,s,o){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=iE,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=S(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=S(0),this.hiddenUpdates=S(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function rB(e,t,r,i,a,s,o,l,u,c,h,d){return e=new rz(e,t,r,o,l,u,c,d),t=1,!0===s&&(t|=24),s=n(3,null,null,t),e.current=s,s.stateNode=e,t=nc(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:i,isDehydrated:r,cache:t},en(s),e}function rH(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,e=Object.keys(e).join(",")))}return null===(e=null!==(e=p(t))?function e(t){var n=t.tag;if(5===n||26===n||27===n||6===n)return t;for(t=t.child;null!==t;){if(null!==(n=e(t)))return n;t=t.sibling}return null}(e):null)?null:id(e.stateNode)}function rV(e,t,n,r,i,a){i=i?a5:a5,null===r.context?r.context=i:r.pendingContext=i,(r=ei(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=ea(e,r,t))&&(rt(n,e,t),es(n,e,t))}function rG(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n>>=0)?32:31-(a8(e)/a9|0)|0},a8=Math.log,a9=Math.LN2,a7=128,se=4194304,st=rq.unstable_scheduleCallback,sn=rq.unstable_cancelCallback,sr=rq.unstable_shouldYield,si=rq.unstable_requestPaint,sa=rq.unstable_now,ss=rq.unstable_ImmediatePriority,so=rq.unstable_UserBlockingPriority,sl=rq.unstable_NormalPriority,su=rq.unstable_IdlePriority,sc=(rq.log,rq.unstable_setDisableYieldValue,null),sh=null,sd="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},sp=new WeakMap,sf=[],sm=0,sg=null,sv=0,sy=[],s_=0,sx=null,sb=1,sS="",sM=f(null),sw=f(null),sE=f(null),sT=f(null),sA=null,sC=null,sR=!1,sP=null,sI=!1,sL=Error(a(519)),sN=[],sD=0,sU=0,sO=null,sF=null,sk=!1,sz=!1,sB=!1,sH=0,sV=null,sG=0,sW=0,sj=null,sX=!1,sq=!1,sY=Object.prototype.hasOwnProperty,sJ=Error(a(460)),sZ=Error(a(474)),sK={then:function(){}},s$=null,sQ=null,s0=0,s1=eb(!0),s2=eb(!1),s3=f(null),s4=f(0),s5=f(null),s6=null,s8=f(0),s9=0,s7=null,oe=null,ot=null,on=!1,or=!1,oi=!1,oa=0,os=0,oo=null,ol=0,ou=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},oc={readContext:no,use:eV,useCallback:eP,useContext:eP,useEffect:eP,useImperativeHandle:eP,useLayoutEffect:eP,useInsertionEffect:eP,useMemo:eP,useReducer:eP,useRef:eP,useState:eP,useDebugValue:eP,useDeferredValue:eP,useTransition:eP,useSyncExternalStore:eP,useId:eP};oc.useCacheRefresh=eP,oc.useMemoCache=eP,oc.useHostTransitionStatus=eP,oc.useFormState=eP,oc.useActionState=eP,oc.useOptimistic=eP;var oh={readContext:no,use:eV,useCallback:function(e,t){return ez().memoizedState=[e,void 0===t?null:t],e},useContext:no,useEffect:tl,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,ts(4194308,4,td.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=ez();t=void 0===t?null:t;var r=e();return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ez();if(void 0!==n)var i=n(t);else i=t;return r.memoizedState=r.baseState=i,r.queue=e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},e=e.dispatch=tE.bind(null,s7,e),[r.memoizedState,e]},useRef:function(e){return ez().memoizedState={current:e}},useState:function(e){var t=(e=e0(e)).queue,n=tT.bind(null,s7,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:tf,useDeferredValue:function(e,t){return tv(ez(),e,t)},useTransition:function(){var e=e0(!1);return e=t_.bind(null,s7,e.queue,!0,!1),ez().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=s7,i=ez();if(sR){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===oq)throw Error(a(349));0!=(60&oJ)||eJ(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,tl(eK.bind(null,r,s,e),[e]),r.flags|=2048,ti(9,eZ.bind(null,r,s,n,t),{destroy:void 0},null),n},useId:function(){var e=ez(),t=oq.identifierPrefix;if(sR){var n=sS,r=sb;t=":"+t+"R"+(n=(r&~(1<<32-a6(r)-1)).toString(32)+n),0<(n=oa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ol++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return ez().memoizedState=tw.bind(null,s7)}};oh.useMemoCache=eG,oh.useHostTransitionStatus=tb,oh.useFormState=e7,oh.useActionState=e7,oh.useOptimistic=function(e){var t=ez();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=tC.bind(null,s7,!0,n),n.dispatch=t,[e,t]};var od={readContext:no,use:eV,useCallback:tm,useContext:no,useEffect:tu,useImperativeHandle:tp,useInsertionEffect:tc,useLayoutEffect:th,useMemo:tg,useReducer:ej,useRef:ta,useState:function(){return ej(eW)},useDebugValue:tf,useDeferredValue:function(e,t){return ty(eB(),oe.memoizedState,e,t)},useTransition:function(){var e=ej(eW)[0],t=eB().memoizedState;return["boolean"==typeof e?e:eH(e),t]},useSyncExternalStore:eY,useId:tS};od.useCacheRefresh=tM,od.useMemoCache=eG,od.useHostTransitionStatus=tb,od.useFormState=te,od.useActionState=te,od.useOptimistic=function(e,t){return e1(eB(),oe,e,t)};var op={readContext:no,use:eV,useCallback:tm,useContext:no,useEffect:tu,useImperativeHandle:tp,useInsertionEffect:tc,useLayoutEffect:th,useMemo:tg,useReducer:eq,useRef:ta,useState:function(){return eq(eW)},useDebugValue:tf,useDeferredValue:function(e,t){var n=eB();return null===oe?tv(n,e,t):ty(n,oe.memoizedState,e,t)},useTransition:function(){var e=eq(eW)[0],t=eB().memoizedState;return["boolean"==typeof e?e:eH(e),t]},useSyncExternalStore:eY,useId:tS};op.useCacheRefresh=tM,op.useMemoCache=eG,op.useHostTransitionStatus=tb,op.useFormState=tr,op.useActionState=tr,op.useOptimistic=function(e,t){var n=eB();return null!==oe?e1(n,oe,e,t):(n.baseState=e,[e,n.queue.dispatch])};var of={isMounted:function(e){return!!(e=e._reactInternals)&&h(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=n7(),i=ei(r);i.payload=t,null!=n&&(i.callback=n),null!==(t=ea(e,i,r))&&(rt(t,e,r),es(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=n7(),i=ei(r);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=ea(e,i,r))&&(rt(t,e,r),es(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=n7(),r=ei(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=ea(e,r,n))&&(rt(t,e,n),es(t,e,n))}},om="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof r.default&&"function"==typeof r.default.emit)return void r.default.emit("uncaughtException",e);console.error(e)},og=Error(a(461)),ov=!1,oy={dehydrated:null,treeContext:null,retryLane:0},o_=f(null),ox=null,ob=null,oS="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},oM=rq.unstable_scheduleCallback,ow=rq.unstable_NormalPriority,oE={$$typeof:r3,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},oT=is.S;is.S=function(e,t){"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===sV){var n=sV=[];sG=0,sW=ee(),sj={status:"pending",value:void 0,then:function(e){n.push(e)}}}sG++,t.then(et,et)}(0,t),null!==oT&&oT(e,t)};var oA=f(null),oC=!1,oR=!1,oP=!1,oI="function"==typeof WeakSet?WeakSet:Set,oL=null,oN=!1,oD=null,oU=!1,oO=null,oF=8192,ok={getCacheForType:function(e){var t=no(oE),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},oz=0,oB=1,oH=2,oV=3,oG=4;if("function"==typeof Symbol&&Symbol.for){var oW=Symbol.for;oz=oW("selector.component"),oB=oW("selector.has_pseudo_class"),oH=oW("selector.role"),oV=oW("selector.test_id"),oG=oW("selector.text")}var oj="function"==typeof WeakMap?WeakMap:Map,oX=0,oq=null,oY=null,oJ=0,oZ=0,oK=null,o$=!1,oQ=!1,o0=!1,o1=0,o2=0,o3=0,o4=0,o5=0,o6=0,o8=0,o9=null,o7=null,le=!1,lt=0,ln=1/0,lr=null,li=null,la=!1,ls=null,lo=0,ll=0,lu=null,lc=0,lh=null;return rj.attemptContinuousHydration=function(e){if(13===e.tag){var t=j(e,0x4000000);null!==t&&rt(t,e,0x4000000),rW(e,0x4000000)}},rj.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=n7(),n=j(e,t);null!==n&&rt(n,e,t),rW(e,t)}},rj.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if((e=e.stateNode).current.memoizedState.isDehydrated){var t=v(e.pendingLanes);if(0!==t){for(e.pendingLanes|=2,e.entangledLanes|=2;t;){var n=1<<31-a6(t);e.entanglements[1]|=n,t&=~n}Y(e),0==(6&oX)&&(ln=sa()+500,J(0,!1))}}break;case 13:null!==(t=j(e,2))&&rt(t,e,2),rs(),rW(e,2)}},rj.batchedUpdates=function(e,t){return e(t)},rj.createComponentSelector=function(e){return{$$typeof:oz,value:e}},rj.createContainer=function(e,t,n,r,i,a,s,o,l,u){return rB(e,t,!1,null,n,r,a,s,o,l,u,null)},rj.createHasPseudoClassSelector=function(e){return{$$typeof:oB,value:e}},rj.createHydrationContainer=function(e,t,n,r,i,a,s,o,l,u,c,h,d){var p;return(e=rB(n,r,!0,e,i,a,o,l,u,c,h,d)).context=(p=null,a5),n=e.current,(i=ei(r=n7())).callback=null!=t?t:null,ea(n,i,r),e.current.lanes=r,M(e,r),Y(e),e},rj.createPortal=function(e,t,n){var r=3=c&&s>=d&&i<=h&&o<=p){e.splice(t,1);break}if(r!==c||n.width!==u.width||po){if(!(s!==d||n.height!==u.height||hi)){c>r&&(u.width+=c-r,u.x=r),hs&&(u.height+=d-s,u.y=s),pn&&(n=l)),l ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},rj.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 27:case 5:return id(e.child.stateNode);default:return e.child.stateNode}},rj.injectIntoDevTools=function(){var e={bundleType:0,version:iu,rendererPackageName:ic,currentDispatcherRef:is,findFiberByHostInstance:iP,reconcilerVersion:"19.0.0"};if(null!==ih&&(e.rendererConfig=ih),"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{sc=t.inject(e),sh=t}catch(e){}e=!!t.checkDCE}}return e},rj.isAlreadyRendering=function(){return!1},rj.observeVisibleRects=function(e,t,n,r){if(!iq)throw Error(a(363));var i=i0(e=n9(e,t),n,r).disconnect;return{disconnect:function(){i()}}},rj.shouldError=function(){return null},rj.shouldSuspend=function(){return!1},rj.startHostTransition=function(e,t,n,r){if(5!==e.tag)throw Error(a(476));var s=tx(e).queue;t_(e,s,t,iV,null===n?i:function(){var t=tx(e).next.queue;return tA(e,t,{},n7()),n(r)})},rj.updateContainer=function(e,t,n,r){var i=t.current,a=n7();return rV(i,a,e,t,n,r),a},rj.updateContainerSync=function(e,t,n,r){return 0===t.tag&&rS(),rV(t.current,2,e,t,n,r),2},rj},t.exports.default=t.exports,Object.defineProperty(t.exports,"__esModule",{value:!0})},98133,(e,t,n)=>{"use strict";t.exports=e.r(40336)},45015,(e,t,n)=>{"use strict";function r(e,t){var n=e.length;for(e.push(t);0>>1,i=e[r];if(0>>1;rs(l,n))us(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[o]=n,r=o);else if(us(c,n))e[r]=c,e[u]=n,r=u;else break}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(n.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();n.unstable_now=function(){return u.now()-c}}var h=[],d=[],p=1,f=null,m=3,g=!1,v=!1,y=!1,_="function"==typeof setTimeout?setTimeout:null,x="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function S(e){for(var t=i(d);null!==t;){if(null===t.callback)a(d);else if(t.startTime<=e)a(d),t.sortIndex=t.expirationTime,r(h,t);else break;t=i(d)}}function M(e){if(y=!1,S(e),!v)if(null!==i(h))v=!0,L();else{var t=i(d);null!==t&&N(M,t.startTime-e)}}var w=!1,E=-1,T=5,A=-1;function C(){return!(n.unstable_now()-Ae&&C());){var s=f.callback;if("function"==typeof s){f.callback=null,m=f.priorityLevel;var l=s(f.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof l){f.callback=l,S(e),t=!0;break t}f===i(h)&&a(h),S(e)}else a(h);f=i(h)}if(null!==f)t=!0;else{var u=i(d);null!==u&&N(M,u.startTime-e),t=!1}}break e}finally{f=null,m=r,g=!1}}}finally{t?o():w=!1}}}if("function"==typeof b)o=function(){b(R)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,I=P.port2;P.port1.onmessage=R,o=function(){I.postMessage(null)}}else o=function(){_(R,0)};function L(){w||(w=!0,o())}function N(e,t){E=_(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_continueExecution=function(){v||g||(v=!0,L())},n.unstable_forceFrameRate=function(e){0>e||125s?(e.sortIndex=a,r(d,e),null===i(h)&&e===i(d)&&(y?(x(E),E=-1):y=!0,N(M,a-s))):(e.sortIndex=o,r(h,e),v||g||(v=!0,L())),e},n.unstable_shouldYield=C,n.unstable_wrapCallback=function(e){var t=m;return function(){var n=m;m=t;try{return e.apply(this,arguments)}finally{m=n}}}},95087,(e,t,n)=>{"use strict";t.exports=e.r(45015)},16096,90072,8560,8155,46791,46712,e=>{"use strict";let t,n,r,i,a,s,o,l,u,c;e.s(["useThree",()=>pj],16096),e.s(["B",()=>pb,"C",()=>pj,"D",()=>pX,"E",()=>pS,"G",()=>pJ,"a",()=>p_,"b",()=>py,"c",()=>fa,"d",()=>fo,"e",()=>p0,"f",()=>fE,"i",()=>pg,"j",()=>ff,"k",()=>fm,"o",()=>fl,"s",()=>pO,"u",()=>px],46712),e.i(47167);var h=e.i(71645),d=e.i(39695);e.s(["ACESFilmicToneMapping",()=>ef,"AddEquation",()=>N,"AddOperation",()=>eu,"AdditiveAnimationBlendMode",()=>tH,"AdditiveBlending",()=>R,"AgXToneMapping",()=>eg,"AlphaFormat",()=>e$,"AlwaysCompare",()=>nm,"AlwaysDepth",()=>ee,"AlwaysStencilFunc",()=>no,"AmbientLight",()=>un,"AnimationAction",()=>uY,"AnimationClip",()=>lU,"AnimationLoader",()=>lG,"AnimationMixer",()=>uZ,"AnimationObjectGroup",()=>uq,"AnimationUtils",()=>lS,"ArcCurve",()=>od,"ArrayCamera",()=>uS,"ArrowHelper",()=>ck,"AttachedBindMode",()=>ey,"Audio",()=>uP,"AudioAnalyser",()=>uO,"AudioContext",()=>ug,"AudioListener",()=>uR,"AudioLoader",()=>uv,"AxesHelper",()=>cz,"BackSide",()=>E,"BasicDepthPacking",()=>tj,"BasicShadowMap",()=>x,"BatchedMesh",()=>sL,"Bone",()=>a1,"BooleanKeyframeTrack",()=>lC,"Box2",()=>cr,"Box3",()=>rf,"Box3Helper",()=>cU,"BoxGeometry",()=>ai,"BoxHelper",()=>cD,"BufferAttribute",()=>iF,"BufferGeometry",()=>i0,"BufferGeometryLoader",()=>uu,"ByteType",()=>eB,"Cache",()=>lO,"Camera",()=>ac,"CameraHelper",()=>cI,"CanvasTexture",()=>s6,"CapsuleGeometry",()=>s7,"CatmullRomCurve3",()=>oy,"CineonToneMapping",()=>ep,"CircleGeometry",()=>oe,"ClampToEdgeWrapping",()=>eA,"Clock",()=>uM,"Color",()=>iE,"ColorKeyframeTrack",()=>lR,"ColorManagement",()=>n8,"CompressedArrayTexture",()=>s4,"CompressedCubeTexture",()=>s5,"CompressedTexture",()=>s3,"CompressedTextureLoader",()=>lW,"ConeGeometry",()=>on,"ConstantAlphaFactor",()=>K,"ConstantColorFactor",()=>J,"Controls",()=>cH,"CubeCamera",()=>am,"CubeReflectionMapping",()=>eb,"CubeRefractionMapping",()=>eS,"CubeTexture",()=>ag,"CubeTextureLoader",()=>lq,"CubeUVReflectionMapping",()=>eE,"CubicBezierCurve",()=>oS,"CubicBezierCurve3",()=>oM,"CubicInterpolant",()=>lw,"CullFaceBack",()=>v,"CullFaceFront",()=>y,"CullFaceFrontBack",()=>_,"CullFaceNone",()=>g,"Curve",()=>oc,"CurvePath",()=>oP,"CustomBlending",()=>L,"CustomToneMapping",()=>em,"CylinderGeometry",()=>ot,"Cylindrical",()=>ce,"Data3DTexture",()=>rd,"DataArrayTexture",()=>rc,"DataTexture",()=>a2,"DataTextureLoader",()=>lY,"DataUtils",()=>iN,"DecrementStencilOp",()=>t6,"DecrementWrapStencilOp",()=>t9,"DefaultLoadingManager",()=>lk,"DepthFormat",()=>e1,"DepthStencilFormat",()=>e2,"DepthTexture",()=>s8,"DetachedBindMode",()=>e_,"DirectionalLight",()=>ut,"DirectionalLightHelper",()=>cC,"DiscreteInterpolant",()=>lT,"DodecahedronGeometry",()=>oi,"DoubleSide",()=>T,"DstAlphaFactor",()=>W,"DstColorFactor",()=>X,"DynamicCopyUsage",()=>nM,"DynamicDrawUsage",()=>nv,"DynamicReadUsage",()=>nx,"EdgesGeometry",()=>ou,"EllipseCurve",()=>oh,"EqualCompare",()=>nc,"EqualDepth",()=>er,"EqualStencilFunc",()=>nn,"EquirectangularReflectionMapping",()=>eM,"EquirectangularRefractionMapping",()=>ew,"Euler",()=>rK,"EventDispatcher",()=>nL,"ExternalTexture",()=>s9,"ExtrudeGeometry",()=>oQ,"FileLoader",()=>lV,"Float16BufferAttribute",()=>ij,"Float32BufferAttribute",()=>iX,"FloatType",()=>ej,"Fog",()=>aS,"FogExp2",()=>ab,"FramebufferTexture",()=>s2,"FrontSide",()=>w,"Frustum",()=>sd,"FrustumArray",()=>sm,"GLBufferAttribute",()=>u2,"GLSL1",()=>nE,"GLSL3",()=>nT,"GreaterCompare",()=>nd,"GreaterDepth",()=>ea,"GreaterEqualCompare",()=>nf,"GreaterEqualDepth",()=>ei,"GreaterEqualStencilFunc",()=>ns,"GreaterStencilFunc",()=>ni,"GridHelper",()=>cM,"Group",()=>ay,"HalfFloatType",()=>eX,"HemisphereLight",()=>lK,"HemisphereLightHelper",()=>cS,"IcosahedronGeometry",()=>o1,"ImageBitmapLoader",()=>um,"ImageLoader",()=>lX,"ImageUtils",()=>re,"IncrementStencilOp",()=>t5,"IncrementWrapStencilOp",()=>t8,"InstancedBufferAttribute",()=>a6,"InstancedBufferGeometry",()=>ul,"InstancedInterleavedBuffer",()=>u1,"InstancedMesh",()=>si,"Int16BufferAttribute",()=>iH,"Int32BufferAttribute",()=>iG,"Int8BufferAttribute",()=>ik,"IntType",()=>eG,"InterleavedBuffer",()=>aw,"InterleavedBufferAttribute",()=>aT,"Interpolant",()=>lM,"InterpolateDiscrete",()=>tD,"InterpolateLinear",()=>tU,"InterpolateSmooth",()=>tO,"InterpolationSamplingMode",()=>nI,"InterpolationSamplingType",()=>nP,"InvertStencilOp",()=>t7,"KeepStencilOp",()=>t3,"KeyframeTrack",()=>lA,"LOD",()=>aW,"LatheGeometry",()=>o2,"Layers",()=>r$,"LessCompare",()=>nu,"LessDepth",()=>et,"LessEqualCompare",()=>nh,"LessEqualDepth",()=>en,"LessEqualStencilFunc",()=>nr,"LessStencilFunc",()=>nt,"Light",()=>lZ,"LightProbe",()=>ua,"Line",()=>sH,"Line3",()=>ch,"LineBasicMaterial",()=>sN,"LineCurve",()=>ow,"LineCurve3",()=>oE,"LineDashedMaterial",()=>lg,"LineLoop",()=>sX,"LineSegments",()=>sj,"LinearFilter",()=>eD,"LinearInterpolant",()=>lE,"LinearMipMapLinearFilter",()=>ek,"LinearMipMapNearestFilter",()=>eO,"LinearMipmapLinearFilter",()=>eF,"LinearMipmapNearestFilter",()=>eU,"LinearSRGBColorSpace",()=>tQ,"LinearToneMapping",()=>eh,"LinearTransfer",()=>t0,"Loader",()=>lz,"LoaderUtils",()=>uo,"LoadingManager",()=>lF,"LoopOnce",()=>tI,"LoopPingPong",()=>tN,"LoopRepeat",()=>tL,"MOUSE",()=>f,"Material",()=>iC,"MaterialLoader",()=>us,"MathUtils",()=>nG,"Matrix2",()=>ct,"Matrix3",()=>nJ,"Matrix4",()=>rH,"MaxEquation",()=>F,"Mesh",()=>an,"MeshBasicMaterial",()=>iR,"MeshDepthMaterial",()=>lp,"MeshDistanceMaterial",()=>lf,"MeshLambertMaterial",()=>ld,"MeshMatcapMaterial",()=>lm,"MeshNormalMaterial",()=>lh,"MeshPhongMaterial",()=>lu,"MeshPhysicalMaterial",()=>ll,"MeshStandardMaterial",()=>lo,"MeshToonMaterial",()=>lc,"MinEquation",()=>O,"MirroredRepeatWrapping",()=>eC,"MixOperation",()=>el,"MultiplyBlending",()=>I,"MultiplyOperation",()=>eo,"NearestFilter",()=>eR,"NearestMipMapLinearFilter",()=>eN,"NearestMipMapNearestFilter",()=>eI,"NearestMipmapLinearFilter",()=>eL,"NearestMipmapNearestFilter",()=>eP,"NeutralToneMapping",()=>ev,"NeverCompare",()=>nl,"NeverDepth",()=>Q,"NeverStencilFunc",()=>ne,"NoBlending",()=>A,"NoColorSpace",()=>tK,"NoToneMapping",()=>ec,"NormalAnimationBlendMode",()=>tB,"NormalBlending",()=>C,"NotEqualCompare",()=>np,"NotEqualDepth",()=>es,"NotEqualStencilFunc",()=>na,"NumberKeyframeTrack",()=>lP,"Object3D",()=>ia,"ObjectLoader",()=>uc,"ObjectSpaceNormalMap",()=>tZ,"OctahedronGeometry",()=>o3,"OneFactor",()=>z,"OneMinusConstantAlphaFactor",()=>$,"OneMinusConstantColorFactor",()=>Z,"OneMinusDstAlphaFactor",()=>j,"OneMinusDstColorFactor",()=>q,"OneMinusSrcAlphaFactor",()=>G,"OneMinusSrcColorFactor",()=>H,"OrthographicCamera",()=>l7,"PCFShadowMap",()=>b,"PCFSoftShadowMap",()=>S,"Path",()=>oI,"PerspectiveCamera",()=>af,"Plane",()=>sl,"PlaneGeometry",()=>o4,"PlaneHelper",()=>cO,"PointLight",()=>l9,"PointLightHelper",()=>cy,"Points",()=>s$,"PointsMaterial",()=>sq,"PolarGridHelper",()=>cw,"PolyhedronGeometry",()=>or,"PositionalAudio",()=>uU,"PropertyBinding",()=>uX,"PropertyMixer",()=>uF,"QuadraticBezierCurve",()=>oT,"QuadraticBezierCurve3",()=>oA,"Quaternion",()=>nj,"QuaternionKeyframeTrack",()=>lL,"QuaternionLinearInterpolant",()=>lI,"RAD2DEG",()=>nO,"RED_GREEN_RGTC2_Format",()=>tR,"RED_RGTC1_Format",()=>tA,"REVISION",()=>p,"RGBADepthPacking",()=>tX,"RGBAFormat",()=>e0,"RGBAIntegerFormat",()=>e9,"RGBA_ASTC_10x10_Format",()=>tb,"RGBA_ASTC_10x5_Format",()=>ty,"RGBA_ASTC_10x6_Format",()=>t_,"RGBA_ASTC_10x8_Format",()=>tx,"RGBA_ASTC_12x10_Format",()=>tS,"RGBA_ASTC_12x12_Format",()=>tM,"RGBA_ASTC_4x4_Format",()=>tc,"RGBA_ASTC_5x4_Format",()=>th,"RGBA_ASTC_5x5_Format",()=>td,"RGBA_ASTC_6x5_Format",()=>tp,"RGBA_ASTC_6x6_Format",()=>tf,"RGBA_ASTC_8x5_Format",()=>tm,"RGBA_ASTC_8x6_Format",()=>tg,"RGBA_ASTC_8x8_Format",()=>tv,"RGBA_BPTC_Format",()=>tw,"RGBA_ETC2_EAC_Format",()=>tu,"RGBA_PVRTC_2BPPV1_Format",()=>ts,"RGBA_PVRTC_4BPPV1_Format",()=>ta,"RGBA_S3TC_DXT1_Format",()=>te,"RGBA_S3TC_DXT3_Format",()=>tt,"RGBA_S3TC_DXT5_Format",()=>tn,"RGBDepthPacking",()=>tq,"RGBFormat",()=>eQ,"RGBIntegerFormat",()=>e8,"RGB_BPTC_SIGNED_Format",()=>tE,"RGB_BPTC_UNSIGNED_Format",()=>tT,"RGB_ETC1_Format",()=>to,"RGB_ETC2_Format",()=>tl,"RGB_PVRTC_2BPPV1_Format",()=>ti,"RGB_PVRTC_4BPPV1_Format",()=>tr,"RGB_S3TC_DXT1_Format",()=>e7,"RGDepthPacking",()=>tY,"RGFormat",()=>e5,"RGIntegerFormat",()=>e6,"RawShaderMaterial",()=>ls,"Ray",()=>rB,"Raycaster",()=>u4,"RectAreaLight",()=>ur,"RedFormat",()=>e3,"RedIntegerFormat",()=>e4,"ReinhardToneMapping",()=>ed,"RenderTarget",()=>rl,"RenderTarget3D",()=>uK,"RepeatWrapping",()=>eT,"ReplaceStencilOp",()=>t4,"ReverseSubtractEquation",()=>U,"RingGeometry",()=>o5,"SIGNED_RED_GREEN_RGTC2_Format",()=>tP,"SIGNED_RED_RGTC1_Format",()=>tC,"SRGBColorSpace",()=>t$,"SRGBTransfer",()=>t1,"Scene",()=>aM,"ShaderMaterial",()=>au,"ShadowMaterial",()=>la,"Shape",()=>oL,"ShapeGeometry",()=>o6,"ShapePath",()=>cB,"ShapeUtils",()=>oZ,"ShortType",()=>eH,"Skeleton",()=>a5,"SkeletonHelper",()=>cv,"SkinnedMesh",()=>a0,"Source",()=>rn,"Sphere",()=>rL,"SphereGeometry",()=>o8,"Spherical",()=>u7,"SphericalHarmonics3",()=>ui,"SplineCurve",()=>oC,"SpotLight",()=>l3,"SpotLightHelper",()=>cp,"Sprite",()=>aB,"SpriteMaterial",()=>aA,"SrcAlphaFactor",()=>V,"SrcAlphaSaturateFactor",()=>Y,"SrcColorFactor",()=>B,"StaticCopyUsage",()=>nS,"StaticDrawUsage",()=>ng,"StaticReadUsage",()=>n_,"StereoCamera",()=>ub,"StreamCopyUsage",()=>nw,"StreamDrawUsage",()=>ny,"StreamReadUsage",()=>nb,"StringKeyframeTrack",()=>lN,"SubtractEquation",()=>D,"SubtractiveBlending",()=>P,"TOUCH",()=>m,"TangentSpaceNormalMap",()=>tJ,"TetrahedronGeometry",()=>o9,"Texture",()=>rs,"TextureLoader",()=>lJ,"TextureUtils",()=>cG,"Timer",()=>u8,"TimestampQuery",()=>nR,"TorusGeometry",()=>o7,"TorusKnotGeometry",()=>le,"Triangle",()=>ix,"TriangleFanDrawMode",()=>tW,"TriangleStripDrawMode",()=>tG,"TrianglesDrawMode",()=>tV,"TubeGeometry",()=>lt,"UVMapping",()=>ex,"Uint16BufferAttribute",()=>iV,"Uint32BufferAttribute",()=>iW,"Uint8BufferAttribute",()=>iz,"Uint8ClampedBufferAttribute",()=>iB,"Uniform",()=>u$,"UniformsGroup",()=>u0,"UniformsUtils",()=>al,"UnsignedByteType",()=>ez,"UnsignedInt101111Type",()=>eK,"UnsignedInt248Type",()=>eJ,"UnsignedInt5999Type",()=>eZ,"UnsignedIntType",()=>eW,"UnsignedShort4444Type",()=>eq,"UnsignedShort5551Type",()=>eY,"UnsignedShortType",()=>eV,"VSMShadowMap",()=>M,"Vector2",()=>nW,"Vector3",()=>nX,"Vector4",()=>ro,"VectorKeyframeTrack",()=>lD,"VideoFrameTexture",()=>s1,"VideoTexture",()=>s0,"WebGL3DRenderTarget",()=>rp,"WebGLArrayRenderTarget",()=>rh,"WebGLCoordinateSystem",()=>nA,"WebGLCubeRenderTarget",()=>av,"WebGLRenderTarget",()=>ru,"WebGPUCoordinateSystem",()=>nC,"WebXRController",()=>ax,"WireframeGeometry",()=>ln,"WrapAroundEnding",()=>tz,"ZeroCurvatureEnding",()=>tF,"ZeroFactor",()=>k,"ZeroSlopeEnding",()=>tk,"ZeroStencilOp",()=>t2,"arrayNeedsUint32",()=>nK,"cloneUniforms",()=>aa,"createCanvasElement",()=>n1,"createElementNS",()=>n0,"getByteLength",()=>cV,"getUnlitUniformColorSpace",()=>ao,"mergeUniforms",()=>as,"probeAsync",()=>n4,"warnOnce",()=>n3],90072);let p="180",f={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},m={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},g=0,v=1,y=2,_=3,x=0,b=1,S=2,M=3,w=0,E=1,T=2,A=0,C=1,R=2,P=3,I=4,L=5,N=100,D=101,U=102,O=103,F=104,k=200,z=201,B=202,H=203,V=204,G=205,W=206,j=207,X=208,q=209,Y=210,J=211,Z=212,K=213,$=214,Q=0,ee=1,et=2,en=3,er=4,ei=5,ea=6,es=7,eo=0,el=1,eu=2,ec=0,eh=1,ed=2,ep=3,ef=4,em=5,eg=6,ev=7,ey="attached",e_="detached",ex=300,eb=301,eS=302,eM=303,ew=304,eE=306,eT=1e3,eA=1001,eC=1002,eR=1003,eP=1004,eI=1004,eL=1005,eN=1005,eD=1006,eU=1007,eO=1007,eF=1008,ek=1008,ez=1009,eB=1010,eH=1011,eV=1012,eG=1013,eW=1014,ej=1015,eX=1016,eq=1017,eY=1018,eJ=1020,eZ=35902,eK=35899,e$=1021,eQ=1022,e0=1023,e1=1026,e2=1027,e3=1028,e4=1029,e5=1030,e6=1031,e8=1032,e9=1033,e7=33776,te=33777,tt=33778,tn=33779,tr=35840,ti=35841,ta=35842,ts=35843,to=36196,tl=37492,tu=37496,tc=37808,th=37809,td=37810,tp=37811,tf=37812,tm=37813,tg=37814,tv=37815,ty=37816,t_=37817,tx=37818,tb=37819,tS=37820,tM=37821,tw=36492,tE=36494,tT=36495,tA=36283,tC=36284,tR=36285,tP=36286,tI=2200,tL=2201,tN=2202,tD=2300,tU=2301,tO=2302,tF=2400,tk=2401,tz=2402,tB=2500,tH=2501,tV=0,tG=1,tW=2,tj=3200,tX=3201,tq=3202,tY=3203,tJ=0,tZ=1,tK="",t$="srgb",tQ="srgb-linear",t0="linear",t1="srgb",t2=0,t3=7680,t4=7681,t5=7682,t6=7683,t8=34055,t9=34056,t7=5386,ne=512,nt=513,nn=514,nr=515,ni=516,na=517,ns=518,no=519,nl=512,nu=513,nc=514,nh=515,nd=516,np=517,nf=518,nm=519,ng=35044,nv=35048,ny=35040,n_=35045,nx=35049,nb=35041,nS=35046,nM=35050,nw=35042,nE="100",nT="300 es",nA=2e3,nC=2001,nR={COMPUTE:"compute",RENDER:"render"},nP={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},nI={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};class nL{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return void 0!==n&&void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){let n=this._listeners;if(void 0===n)return;let r=n[e];if(void 0!==r){let e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(void 0===t)return;let n=t[e.type];if(void 0!==n){e.target=this;let t=n.slice(0);for(let n=0,r=t.length;n>8&255]+nN[e>>16&255]+nN[e>>24&255]+"-"+nN[255&t]+nN[t>>8&255]+"-"+nN[t>>16&15|64]+nN[t>>24&255]+"-"+nN[63&n|128]+nN[n>>8&255]+"-"+nN[n>>16&255]+nN[n>>24&255]+nN[255&r]+nN[r>>8&255]+nN[r>>16&255]+nN[r>>24&255]).toLowerCase()}function nk(e,t,n){return Math.max(t,Math.min(n,e))}function nz(e,t){return(e%t+t)%t}function nB(e,t,n){return(1-n)*e+n*t}function nH(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/0xffffffff;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/0x7fffffff,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error("Invalid component type.")}}function nV(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(0xffffffff*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(0x7fffffff*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw Error("Invalid component type.")}}let nG={DEG2RAD:nU,RAD2DEG:nO,generateUUID:nF,clamp:nk,euclideanModulo:nz,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:nB,damp:function(e,t,n,r){return nB(e,t,1-Math.exp(-n*r))},pingpong:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t-Math.abs(nz(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(nD=e);let t=nD+=0x6d2b79f5;return t=Math.imul(t^t>>>15,1|t),(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/0x100000000},degToRad:function(e){return e*nU},radToDeg:function(e){return e*nO},isPowerOfTwo:function(e){return(e&e-1)==0&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){let a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),u=a((t+r)/2),c=s((t+r)/2),h=a((t-r)/2),d=s((t-r)/2),p=a((r-t)/2),f=s((r-t)/2);switch(i){case"XYX":e.set(o*c,l*h,l*d,o*u);break;case"YZY":e.set(l*d,o*c,l*h,o*u);break;case"ZXZ":e.set(l*h,l*d,o*c,o*u);break;case"XZX":e.set(o*c,l*f,l*p,o*u);break;case"YXY":e.set(l*p,o*c,l*f,o*u);break;case"ZYZ":e.set(l*f,l*p,o*c,o*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:nV,denormalize:nH};class nW{get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=nk(this.x,e.x,t.x),this.y=nk(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=nk(this.x,e,t),this.y=nk(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nk(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(nk(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}constructor(e=0,t=0){nW.prototype.isVector2=!0,this.x=e,this.y=t}}class nj{static slerpFlat(e,t,n,r,i,a,s){let o=n[r+0],l=n[r+1],u=n[r+2],c=n[r+3],h=i[a+0],d=i[a+1],p=i[a+2],f=i[a+3];if(0===s){e[t+0]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c;return}if(1===s){e[t+0]=h,e[t+1]=d,e[t+2]=p,e[t+3]=f;return}if(c!==f||o!==h||l!==d||u!==p){let e=1-s,t=o*h+l*d+u*p+c*f,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){let i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,s=Math.sin(s*a)/i}let i=s*n;if(o=o*e+h*i,l=l*e+d*i,u=u*e+p*i,c=c*e+f*i,e===1-s){let e=1/Math.sqrt(o*o+l*l+u*u+c*c);o*=e,l*=e,u*=e,c*=e}}e[t]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c}static multiplyQuaternionsFlat(e,t,n,r,i,a){let s=n[r],o=n[r+1],l=n[r+2],u=n[r+3],c=i[a],h=i[a+1],d=i[a+2],p=i[a+3];return e[t]=s*p+u*c+o*d-l*h,e[t+1]=o*p+u*h+l*c-s*d,e[t+2]=l*p+u*d+s*h-o*c,e[t+3]=u*p-s*c-o*h-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=e._x,r=e._y,i=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(n/2),u=s(r/2),c=s(i/2),h=o(n/2),d=o(r/2),p=o(i/2);switch(a){case"XYZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"YXZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"ZXY":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"ZYX":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"YZX":this._x=h*u*c+l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c-h*d*p;break;case"XZY":this._x=h*u*c-l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c+h*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],s=t[5],o=t[9],l=t[2],u=t[6],c=t[10],h=n+s+c;if(h>0){let e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(u-o)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>s&&n>c){let e=2*Math.sqrt(1+n-s-c);this._w=(u-o)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(s>c){let e=2*Math.sqrt(1+s-n-c);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(o+u)/e}else{let e=2*Math.sqrt(1+c-n-s);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(o+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x),this._w=n,this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(nk(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(0===n)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,s=t._x,o=t._y,l=t._z,u=t._w;return this._x=n*u+a*s+r*l-i*o,this._y=r*u+a*o+i*s-n*l,this._z=i*u+a*l+n*o-r*s,this._w=a*u-n*s-r*o-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);let n=this._x,r=this._y,i=this._z,a=this._w,s=a*e._w+n*e._x+r*e._y+i*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;let o=1-s*s;if(o<=Number.EPSILON){let e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this}let l=Math.sqrt(o),u=Math.atan2(l,s),c=Math.sin((1-t)*u)/l,h=Math.sin(t*u)/l;return this._w=a*c+this._w*h,this._x=n*c+this._x*h,this._y=r*c+this._y*h,this._z=i*c+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}}class nX{set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(nY.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(nY.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*r-s*n),u=2*(s*t-i*r),c=2*(i*n-a*t);return this.x=t+o*l+a*c-s*u,this.y=n+o*u+s*l-i*c,this.z=r+o*c+i*u-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=nk(this.x,e.x,t.x),this.y=nk(this.y,e.y,t.y),this.z=nk(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=nk(this.x,e,t),this.y=nk(this.y,e,t),this.z=nk(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nk(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,s=t.y,o=t.z;return this.x=r*o-i*s,this.y=i*a-n*o,this.z=n*s-r*a,this}projectOnVector(e){let t=e.lengthSq();if(0===t)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return nq.copy(this).projectOnVector(e),this.sub(nq)}reflect(e){return this.sub(nq.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(nk(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=2*Math.random()-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}constructor(e=0,t=0,n=0){nX.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}}let nq=new nX,nY=new nj;class nJ{set(e,t,n,r,i,a,s,o,l){let u=this.elements;return u[0]=e,u[1]=r,u[2]=s,u[3]=t,u[4]=i,u[5]=o,u[6]=n,u[7]=a,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[3],o=n[6],l=n[1],u=n[4],c=n[7],h=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],v=r[1],y=r[4],_=r[7],x=r[2],b=r[5],S=r[8];return i[0]=a*f+s*v+o*x,i[3]=a*m+s*y+o*b,i[6]=a*g+s*_+o*S,i[1]=l*f+u*v+c*x,i[4]=l*m+u*y+c*b,i[7]=l*g+u*_+c*S,i[2]=h*f+d*v+p*x,i[5]=h*m+d*y+p*b,i[8]=h*g+d*_+p*S,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8];return t*a*u-t*s*l-n*i*u+n*s*o+r*i*l-r*a*o}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=u*a-s*l,h=s*o-u*i,d=l*i-a*o,p=t*c+n*h+r*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);let f=1/p;return e[0]=c*f,e[1]=(r*l-u*n)*f,e[2]=(s*n-r*a)*f,e[3]=h*f,e[4]=(u*t-r*o)*f,e[5]=(r*i-s*t)*f,e[6]=d*f,e[7]=(n*o-l*t)*f,e[8]=(a*t-n*i)*f,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,s){let o=Math.cos(i),l=Math.sin(i);return this.set(n*o,n*l,-n*(o*a+l*s)+a+e,-r*l,r*o,-r*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(nZ.makeScale(e,t)),this}rotate(e){return this.premultiply(nZ.makeRotation(-e)),this}translate(e,t){return this.premultiply(nZ.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}constructor(e,t,n,r,i,a,s,o,l){nJ.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l)}}let nZ=new nJ;function nK(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}let n$={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function nQ(e,t){return new n$[e](t)}function n0(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function n1(){let e=n0("canvas");return e.style.display="block",e}let n2={};function n3(e){e in n2||(n2[e]=!0,console.warn(e))}function n4(e,t,n){return new Promise(function(r,i){setTimeout(function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:i();break;case e.TIMEOUT_EXPIRED:setTimeout(a,n);break;default:r()}},n)})}let n5=new nJ().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),n6=new nJ().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),n8=function(){let e={enabled:!0,workingColorSpace:tQ,spaces:{},convert:function(e,t,n){return!1!==this.enabled&&t!==n&&t&&n&&(this.spaces[t].transfer===t1&&(e.r=n9(e.r),e.g=n9(e.g),e.b=n9(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===t1&&(e.r=n7(e.r),e.g=n7(e.g),e.b=n7(e.b))),e},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===tK?t0:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.workingColorSpace;return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.workingColorSpace;return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return n3("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return n3("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[tQ]:{primaries:t,whitePoint:r,transfer:t0,toXYZ:n5,fromXYZ:n6,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:t$},outputColorSpaceConfig:{drawingBufferColorSpace:t$}},[t$]:{primaries:t,whitePoint:r,transfer:t1,toXYZ:n5,fromXYZ:n6,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:t$}}}),e}();function n9(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function n7(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class re{static getDataURL(e){let n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image/png";if(/^data:/i.test(e.src)||"undefined"==typeof HTMLCanvasElement)return e.src;if(e instanceof HTMLCanvasElement)n=e;else{void 0===t&&(t=n0("canvas")),t.width=e.width,t.height=e.height;let r=t.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=t}return n.toDataURL(r)}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){let t=n0("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==ex)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case eT:e.x=e.x-Math.floor(e.x);break;case eA:e.x=e.x<0?0:1;break;case eC:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case eT:e.y=e.y-Math.floor(e.y);break;case eA:e.y=e.y<0?0:1;break;case eC:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){!0===e&&this.pmremVersion++}constructor(e=rs.DEFAULT_IMAGE,t=rs.DEFAULT_MAPPING,n=eA,r=eA,i=eD,a=eF,s=e0,o=ez,l=rs.DEFAULT_ANISOTROPY,u=tK){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:ri++}),this.uuid=nF(),this.name="",this.source=new rn(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=a,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=o,this.offset=new nW(0,0),this.repeat=new nW(1,1),this.center=new nW(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new nJ,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!e&&!!e.depth&&e.depth>1,this.pmremVersion=0}}rs.DEFAULT_IMAGE=null,rs.DEFAULT_MAPPING=ex,rs.DEFAULT_ANISOTROPY=1;class ro{get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i,a=e.elements,s=a[0],o=a[4],l=a[8],u=a[1],c=a[5],h=a[9],d=a[2],p=a[6],f=a[10];if(.01>Math.abs(o-u)&&.01>Math.abs(l-d)&&.01>Math.abs(h-p)){if(.1>Math.abs(o+u)&&.1>Math.abs(l+d)&&.1>Math.abs(h+p)&&.1>Math.abs(s+c+f-3))return this.set(1,0,0,0),this;t=Math.PI;let e=(s+1)/2,a=(c+1)/2,m=(f+1)/2,g=(o+u)/4,v=(l+d)/4,y=(h+p)/4;return e>a&&e>m?e<.01?(n=0,r=.707106781,i=.707106781):(r=g/(n=Math.sqrt(e)),i=v/n):a>m?a<.01?(n=.707106781,r=0,i=.707106781):(n=g/(r=Math.sqrt(a)),i=y/r):m<.01?(n=.707106781,r=.707106781,i=0):(n=v/(i=Math.sqrt(m)),r=y/i),this.set(n,r,i,t),this}let m=Math.sqrt((p-h)*(p-h)+(l-d)*(l-d)+(u-o)*(u-o));return .001>Math.abs(m)&&(m=1),this.x=(p-h)/m,this.y=(l-d)/m,this.z=(u-o)/m,this.w=Math.acos((s+c+f-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=nk(this.x,e.x,t.x),this.y=nk(this.y,e.y,t.y),this.z=nk(this.z,e.z,t.z),this.w=nk(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=nk(this.x,e,t),this.y=nk(this.y,e,t),this.z=nk(this.z,e,t),this.w=nk(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nk(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}constructor(e=0,t=0,n=0,r=1){ro.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}}class rl extends nL{_setTextureOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={minFilter:eD,generateMipmaps:!1,flipY:!1,internalFormat:null};void 0!==e.mapping&&(t.mapping=e.mapping),void 0!==e.wrapS&&(t.wrapS=e.wrapS),void 0!==e.wrapT&&(t.wrapT=e.wrapT),void 0!==e.wrapR&&(t.wrapR=e.wrapR),void 0!==e.magFilter&&(t.magFilter=e.magFilter),void 0!==e.minFilter&&(t.minFilter=e.minFilter),void 0!==e.format&&(t.format=e.format),void 0!==e.type&&(t.type=e.type),void 0!==e.anisotropy&&(t.anisotropy=e.anisotropy),void 0!==e.colorSpace&&(t.colorSpace=e.colorSpace),void 0!==e.flipY&&(t.flipY=e.flipY),void 0!==e.generateMipmaps&&(t.generateMipmaps=e.generateMipmaps),void 0!==e.internalFormat&&(t.internalFormat=e.internalFormat);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.textures.length;r1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t1&&void 0!==arguments[1]&&arguments[1];return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=Infinity,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x1&&void 0!==arguments[1]&&arguments[1];e.updateWorldMatrix(!1,!1);let n=e.geometry;if(void 0!==n){let r=n.getAttribute("position");if(!0===t&&void 0!==r&&!0!==e.isInstancedMesh)for(let t=0,n=r.count;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,rg),rg.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(rw),rE.subVectors(this.max,rw),ry.subVectors(e.a,rw),r_.subVectors(e.b,rw),rx.subVectors(e.c,rw),rb.subVectors(r_,ry),rS.subVectors(rx,r_),rM.subVectors(ry,rx);let t=[0,-rb.z,rb.y,0,-rS.z,rS.y,0,-rM.z,rM.y,rb.z,0,-rb.x,rS.z,0,-rS.x,rM.z,0,-rM.x,-rb.y,rb.x,0,-rS.y,rS.x,0,-rM.y,rM.x,0];return!!rC(t,ry,r_,rx,rE)&&!!rC(t=[1,0,0,0,1,0,0,0,1],ry,r_,rx,rE)&&(rT.crossVectors(rb,rS),rC(t=[rT.x,rT.y,rT.z],ry,r_,rx,rE))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,rg).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(rg).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(rm[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),rm[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),rm[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),rm[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),rm[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),rm[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),rm[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),rm[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(rm)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}constructor(e=new nX(Infinity,Infinity,Infinity),t=new nX(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}}let rm=[new nX,new nX,new nX,new nX,new nX,new nX,new nX,new nX],rg=new nX,rv=new rf,ry=new nX,r_=new nX,rx=new nX,rb=new nX,rS=new nX,rM=new nX,rw=new nX,rE=new nX,rT=new nX,rA=new nX;function rC(e,t,n,r,i){for(let a=0,s=e.length-3;a<=s;a+=3){rA.fromArray(e,a);let s=i.x*Math.abs(rA.x)+i.y*Math.abs(rA.y)+i.z*Math.abs(rA.z),o=t.dot(rA),l=n.dot(rA),u=r.dot(rA);if(Math.max(-Math.max(o,l,u),Math.min(o,l,u))>s)return!1}return!0}let rR=new rf,rP=new nX,rI=new nX;class rL{set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;void 0!==t?n.copy(t):rR.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?e.makeEmpty():(e.set(this.center,this.center),e.expandByScalar(this.radius)),e}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;rP.subVectors(e,this.center);let t=rP.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(rP,n/e),this.radius+=n}return this}union(e){return e.isEmpty()||(this.isEmpty()?this.copy(e):!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(rI.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(rP.copy(e.center).add(rI)),this.expandByPoint(rP.copy(e.center).sub(rI)))),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}constructor(e=new nX,t=-1){this.isSphere=!0,this.center=e,this.radius=t}}let rN=new nX,rD=new nX,rU=new nX,rO=new nX,rF=new nX,rk=new nX,rz=new nX;class rB{set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,rN)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=rN.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(rN.copy(this.origin).addScaledVector(this.direction,t),rN.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){let i,a,s,o;rD.copy(e).add(t).multiplyScalar(.5),rU.copy(t).sub(e).normalize(),rO.copy(this.origin).sub(rD);let l=.5*e.distanceTo(t),u=-this.direction.dot(rU),c=rO.dot(this.direction),h=-rO.dot(rU),d=rO.lengthSq(),p=Math.abs(1-u*u);if(p>0)if(i=u*h-c,a=u*c-h,o=l*p,i>=0)if(a>=-o)if(a<=o){let e=1/p;i*=e,a*=e,s=i*(i+u*a+2*c)+a*(u*i+a+2*h)+d}else s=-(i=Math.max(0,-(u*(a=l)+c)))*i+a*(a+2*h)+d;else s=-(i=Math.max(0,-(u*(a=-l)+c)))*i+a*(a+2*h)+d;else a<=-o?(a=(i=Math.max(0,-(-u*l+c)))>0?-l:Math.min(Math.max(-l,-h),l),s=-i*i+a*(a+2*h)+d):a<=o?(i=0,s=(a=Math.min(Math.max(-l,-h),l))*(a+2*h)+d):(a=(i=Math.max(0,-(u*l+c)))>0?l:Math.min(Math.max(-l,-h),l),s=-i*i+a*(a+2*h)+d);else a=u>0?-l:l,s=-(i=Math.max(0,-(u*a+c)))*i+a*(a+2*h)+d;return n&&n.copy(this.origin).addScaledVector(this.direction,i),r&&r.copy(rD).addScaledVector(rU,a),s}intersectSphere(e,t){rN.subVectors(e.center,this.origin);let n=rN.dot(this.direction),r=rN.dot(rN)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),s=n-a,o=n+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return!(e.radius<0)&&this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return!!(0===t||e.normal.dot(this.direction)*t<0)}intersectBox(e,t){let n,r,i,a,s,o,l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,h=this.origin;return(l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),u>=0?(i=(e.min.y-h.y)*u,a=(e.max.y-h.y)*u):(i=(e.max.y-h.y)*u,a=(e.min.y-h.y)*u),n>a||i>r||((i>n||isNaN(n))&&(n=i),(a=0?(s=(e.min.z-h.z)*c,o=(e.max.z-h.z)*c):(s=(e.max.z-h.z)*c,o=(e.min.z-h.z)*c),n>o||s>r||((s>n||n!=n)&&(n=s),(o=0?n:r,t)}intersectsBox(e){return null!==this.intersectBox(e,rN)}intersectTriangle(e,t,n,r,i){let a;rF.subVectors(t,e),rk.subVectors(n,e),rz.crossVectors(rF,rk);let s=this.direction.dot(rz);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}rO.subVectors(this.origin,e);let o=a*this.direction.dot(rk.crossVectors(rO,rk));if(o<0)return null;let l=a*this.direction.dot(rF.cross(rO));if(l<0||o+l>s)return null;let u=-a*rO.dot(rz);return u<0?null:this.at(u/s,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}constructor(e=new nX,t=new nX(0,0,-1)){this.origin=e,this.direction=t}}class rH{set(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=u,g[10]=c,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new rH().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,r=1/rV.setFromMatrixColumn(e,0).length(),i=1/rV.setFromMatrixColumn(e,1).length(),a=1/rV.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),s=Math.sin(n),o=Math.cos(r),l=Math.sin(r),u=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){let e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=-o*c,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*o,t[2]=i-e*l,t[6]=r+n*l,t[10]=a*o}else if("YXZ"===e.order){let e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e+i*s,t[4]=r*s-n,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=a*o}else if("ZXY"===e.order){let e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e-i*s,t[4]=-a*c,t[8]=r+n*s,t[1]=n+r*s,t[5]=a*u,t[9]=i-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){let e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*c,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){let e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=i-e*c,t[8]=r*c+n,t[1]=c,t[5]=a*u,t[9]=-s*u,t[2]=-l*u,t[6]=n*c+r,t[10]=e-i*c}else if("XZY"===e.order){let e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=-c,t[8]=l*u,t[1]=e*c+i,t[5]=a*u,t[9]=n*c-r,t[2]=r*c-n,t[6]=s*u,t[10]=i*c+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(rW,e,rj)}lookAt(e,t,n){let r=this.elements;return rY.subVectors(e,t),0===rY.lengthSq()&&(rY.z=1),rY.normalize(),rX.crossVectors(n,rY),0===rX.lengthSq()&&(1===Math.abs(n.z)?rY.x+=1e-4:rY.z+=1e-4,rY.normalize(),rX.crossVectors(n,rY)),rX.normalize(),rq.crossVectors(rY,rX),r[0]=rX.x,r[4]=rq.x,r[8]=rY.x,r[1]=rX.y,r[5]=rq.y,r[9]=rY.y,r[2]=rX.z,r[6]=rq.z,r[10]=rY.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[4],o=n[8],l=n[12],u=n[1],c=n[5],h=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],x=n[15],b=r[0],S=r[4],M=r[8],w=r[12],E=r[1],T=r[5],A=r[9],C=r[13],R=r[2],P=r[6],I=r[10],L=r[14],N=r[3],D=r[7],U=r[11],O=r[15];return i[0]=a*b+s*E+o*R+l*N,i[4]=a*S+s*T+o*P+l*D,i[8]=a*M+s*A+o*I+l*U,i[12]=a*w+s*C+o*L+l*O,i[1]=u*b+c*E+h*R+d*N,i[5]=u*S+c*T+h*P+d*D,i[9]=u*M+c*A+h*I+d*U,i[13]=u*w+c*C+h*L+d*O,i[2]=p*b+f*E+m*R+g*N,i[6]=p*S+f*T+m*P+g*D,i[10]=p*M+f*A+m*I+g*U,i[14]=p*w+f*C+m*L+g*O,i[3]=v*b+y*E+_*R+x*N,i[7]=v*S+y*T+_*P+x*D,i[11]=v*M+y*A+_*I+x*U,i[15]=v*w+y*C+_*L+x*O,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],s=e[5],o=e[9],l=e[13],u=e[2],c=e[6],h=e[10],d=e[14],p=e[3],f=e[7];return p*(i*o*c-r*l*c-i*s*h+n*l*h+r*s*d-n*o*d)+f*(t*o*d-t*l*h+i*a*h-r*a*d+r*l*u-i*o*u)+e[11]*(t*l*c-t*s*d-i*a*c+n*a*d+i*s*u-n*l*u)+e[15]*(-r*s*u-t*o*c+t*s*h+r*a*c-n*a*h+n*o*u)}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],p=e[12],f=e[13],m=e[14],g=e[15],v=c*m*l-f*h*l+f*o*d-s*m*d-c*o*g+s*h*g,y=p*h*l-u*m*l-p*o*d+a*m*d+u*o*g-a*h*g,_=u*f*l-p*c*l+p*s*d-a*f*d-u*s*g+a*c*g,x=p*c*o-u*f*o-p*s*h+a*f*h+u*s*m-a*c*m,b=t*v+n*y+r*_+i*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let S=1/b;return e[0]=v*S,e[1]=(f*h*i-c*m*i-f*r*d+n*m*d+c*r*g-n*h*g)*S,e[2]=(s*m*i-f*o*i+f*r*l-n*m*l-s*r*g+n*o*g)*S,e[3]=(c*o*i-s*h*i-c*r*l+n*h*l+s*r*d-n*o*d)*S,e[4]=y*S,e[5]=(u*m*i-p*h*i+p*r*d-t*m*d-u*r*g+t*h*g)*S,e[6]=(p*o*i-a*m*i-p*r*l+t*m*l+a*r*g-t*o*g)*S,e[7]=(a*h*i-u*o*i+u*r*l-t*h*l-a*r*d+t*o*d)*S,e[8]=_*S,e[9]=(p*c*i-u*f*i-p*n*d+t*f*d+u*n*g-t*c*g)*S,e[10]=(a*f*i-p*s*i+p*n*l-t*f*l-a*n*g+t*s*g)*S,e[11]=(u*s*i-a*c*i-u*n*l+t*c*l+a*n*d-t*s*d)*S,e[12]=x*S,e[13]=(u*f*r-p*c*r+p*n*h-t*f*h-u*n*m+t*c*m)*S,e[14]=(p*s*r-a*f*r-p*n*o+t*f*o+a*n*m-t*s*m)*S,e[15]=(a*c*r-u*s*r+u*n*o-t*c*o-a*n*h+t*s*h)*S,this}scale(e){let t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2];return Math.sqrt(Math.max(t,e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,s=e.y,o=e.z,l=i*a,u=i*s;return this.set(l*a+n,l*s-r*o,l*o+r*s,0,l*s+r*o,u*s+n,u*o-r*a,0,l*o-r*s,u*o+r*a,i*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,i=t._x,a=t._y,s=t._z,o=t._w,l=i+i,u=a+a,c=s+s,h=i*l,d=i*u,p=i*c,f=a*u,m=a*c,g=s*c,v=o*l,y=o*u,_=o*c,x=n.x,b=n.y,S=n.z;return r[0]=(1-(f+g))*x,r[1]=(d+_)*x,r[2]=(p-y)*x,r[3]=0,r[4]=(d-_)*b,r[5]=(1-(h+g))*b,r[6]=(m+v)*b,r[7]=0,r[8]=(p+y)*S,r[9]=(m-v)*S,r[10]=(1-(h+f))*S,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements,i=rV.set(r[0],r[1],r[2]).length(),a=rV.set(r[4],r[5],r[6]).length(),s=rV.set(r[8],r[9],r[10]).length();0>this.determinant()&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],rG.copy(this);let o=1/i,l=1/a,u=1/s;return rG.elements[0]*=o,rG.elements[1]*=o,rG.elements[2]*=o,rG.elements[4]*=l,rG.elements[5]*=l,rG.elements[6]*=l,rG.elements[8]*=u,rG.elements[9]*=u,rG.elements[10]*=u,t.setFromRotationMatrix(rG),n.x=i,n.y=a,n.z=s,this}makePerspective(e,t,n,r,i,a){let s,o,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:nA,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=this.elements;if(u)s=i/(a-i),o=a*i/(a-i);else if(l===nA)s=-(a+i)/(a-i),o=-2*a*i/(a-i);else if(l===nC)s=-a/(a-i),o=-a*i/(a-i);else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+l);return c[0]=2*i/(t-e),c[4]=0,c[8]=(t+e)/(t-e),c[12]=0,c[1]=0,c[5]=2*i/(n-r),c[9]=(n+r)/(n-r),c[13]=0,c[2]=0,c[6]=0,c[10]=s,c[14]=o,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,i,a){let s,o,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:nA,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=this.elements;if(u)s=1/(a-i),o=a/(a-i);else if(l===nA)s=-2/(a-i),o=-(a+i)/(a-i);else if(l===nC)s=-1/(a-i),o=-i/(a-i);else throw Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+l);return c[0]=2/(t-e),c[4]=0,c[8]=0,c[12]=-(t+e)/(t-e),c[1]=0,c[5]=2/(n-r),c[9]=0,c[13]=-(n+r)/(n-r),c[2]=0,c[6]=0,c[10]=s,c[14]=o,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}constructor(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m){rH.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l,u,c,h,d,p,f,m)}}let rV=new nX,rG=new rH,rW=new nX(0,0,0),rj=new nX(1,1,1),rX=new nX,rq=new nX,rY=new nX,rJ=new rH,rZ=new nj;class rK{get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._order;return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=e.elements,i=r[0],a=r[4],s=r[8],o=r[1],l=r[5],u=r[9],c=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(nk(s,-1,1)),.9999999>Math.abs(s)?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-nk(u,-1,1)),.9999999>Math.abs(u)?(this._y=Math.atan2(s,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(nk(h,-1,1)),.9999999>Math.abs(h)?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-nk(c,-1,1)),.9999999>Math.abs(c)?(this._x=Math.atan2(h,d),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(nk(o,-1,1)),.9999999>Math.abs(o)?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-nk(a,-1,1)),.9999999>Math.abs(a)?(this._x=Math.atan2(h,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return rJ.makeRotationFromQuaternion(e),this.setFromRotationMatrix(rJ,t,n)}setFromVector3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order;return this.set(e.x,e.y,e.z,t)}reorder(e){return rZ.setFromEuler(this),this.setFromQuaternion(rZ,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}constructor(e=0,t=0,n=0,r=rK.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}}rK.DEFAULT_ORDER="XYZ";class r${set(e){this.mask=1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:[];this[e]===t&&n.push(this);let r=this.children;for(let i=0,a=r.length;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),null!==this._colorsTexture&&(r.colorsTexture=this._colorsTexture.toJSON(e)),null!==this.boundingSphere&&(r.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(r.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),u.length>0&&(n.animations=u),c.length>0&&(n.nodes=c)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){is.subVectors(r,t),io.subVectors(n,t),il.subVectors(e,t);let a=is.dot(is),s=is.dot(io),o=is.dot(il),l=io.dot(io),u=io.dot(il),c=a*l-s*s;if(0===c)return i.set(0,0,0),null;let h=1/c,d=(l*o-s*u)*h,p=(a*u-s*o)*h;return i.set(1-d-p,p,d)}static containsPoint(e,t,n,r){return null!==this.getBarycoord(e,t,n,r,iu)&&iu.x>=0&&iu.y>=0&&iu.x+iu.y<=1}static getInterpolation(e,t,n,r,i,a,s,o){return null===this.getBarycoord(e,t,n,r,iu)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(i,iu.x),o.addScaledVector(a,iu.y),o.addScaledVector(s,iu.z),o)}static getInterpolatedAttribute(e,t,n,r,i,a){return iv.setScalar(0),iy.setScalar(0),i_.setScalar(0),iv.fromBufferAttribute(e,t),iy.fromBufferAttribute(e,n),i_.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(iv,i.x),a.addScaledVector(iy,i.y),a.addScaledVector(i_,i.z),a}static isFrontFacing(e,t,n,r){return is.subVectors(n,t),io.subVectors(e,t),0>is.cross(io).dot(r)}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return is.subVectors(this.c,this.b),io.subVectors(this.a,this.b),.5*is.cross(io).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ix.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ix.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,i){return ix.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return ix.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ix.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n,r,i=this.a,a=this.b,s=this.c;ic.subVectors(a,i),ih.subVectors(s,i),ip.subVectors(e,i);let o=ic.dot(ip),l=ih.dot(ip);if(o<=0&&l<=0)return t.copy(i);im.subVectors(e,a);let u=ic.dot(im),c=ih.dot(im);if(u>=0&&c<=u)return t.copy(a);let h=o*c-u*l;if(h<=0&&o>=0&&u<=0)return n=o/(o-u),t.copy(i).addScaledVector(ic,n);ig.subVectors(e,s);let d=ic.dot(ig),p=ih.dot(ig);if(p>=0&&d<=p)return t.copy(s);let f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return r=l/(l-p),t.copy(i).addScaledVector(ih,r);let m=u*p-d*c;if(m<=0&&c-u>=0&&d-p>=0)return id.subVectors(s,a),r=(c-u)/(c-u+(d-p)),t.copy(a).addScaledVector(id,r);let g=1/(m+f+h);return n=f*g,r=h*g,t.copy(i).addScaledVector(ic,n).addScaledVector(ih,r)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}constructor(e=new nX,t=new nX,n=new nX){this.a=e,this.b=t,this.c=n}}let ib={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},iS={h:0,s:0,l:0},iM={h:0,s:0,l:0};function iw(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*6*(2/3-n):e}class iE{set(e,t,n){return void 0===t&&void 0===n?e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e):this.setRGB(e,t,n),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t$;return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,n8.colorSpaceToWorking(this,t),this}setRGB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n8.workingColorSpace;return this.r=e,this.g=t,this.b=n,n8.colorSpaceToWorking(this,r),this}setHSL(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n8.workingColorSpace;if(e=nz(e,1),t=nk(t,0,1),n=nk(n,0,1),0===t)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=iw(i,r,e+1/3),this.g=iw(i,r,e),this.b=iw(i,r,e-1/3)}return n8.colorSpaceToWorking(this,r),this}setStyle(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t$;function r(t){void 0!==t&&1>parseFloat(t)&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}if(t=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=t[1],s=t[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,n);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,n);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(t=/^\#([A-Fa-f\d]+)$/.exec(e)){let r=t[1],i=r.length;if(3===i)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(6===i)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t$,n=ib[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=n9(e.r),this.g=n9(e.g),this.b=n9(e.b),this}copyLinearToSRGB(e){return this.r=n7(e.r),this.g=n7(e.g),this.b=n7(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t$;return n8.workingToColorSpace(iT.copy(this),e),65536*Math.round(nk(255*iT.r,0,255))+256*Math.round(nk(255*iT.g,0,255))+Math.round(nk(255*iT.b,0,255))}getHexString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t$;return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e){let t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n8.workingColorSpace;n8.workingToColorSpace(iT.copy(this),r);let i=iT.r,a=iT.g,s=iT.b,o=Math.max(i,a,s),l=Math.min(i,a,s),u=(l+o)/2;if(l===o)t=0,n=0;else{let e=o-l;switch(n=u<=.5?e/(o+l):e/(2-o-l),o){case i:t=(a-s)/e+6*(a1&&void 0!==arguments[1]?arguments[1]:n8.workingColorSpace;return n8.workingToColorSpace(iT.copy(this),t),e.r=iT.r,e.g=iT.g,e.b=iT.b,e}getStyle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t$;n8.workingToColorSpace(iT.copy(this),e);let t=iT.r,n=iT.g,r=iT.b;return e!==t$?"color(".concat(e," ").concat(t.toFixed(3)," ").concat(n.toFixed(3)," ").concat(r.toFixed(3),")"):"rgb(".concat(Math.round(255*t),",").concat(Math.round(255*n),",").concat(Math.round(255*r),")")}offsetHSL(e,t,n){return this.getHSL(iS),this.setHSL(iS.h+e,iS.s+t,iS.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(iS),e.getHSL(iM);let n=nB(iS.h,iM.h,t),r=nB(iS.s,iM.s,t),i=nB(iS.l,iM.l,t);return this.setHSL(n,r,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}}let iT=new iE;iE.NAMES=ib;let iA=0;class iC extends nL{get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(let t in e){let n=e[t];if(void 0===n){console.warn("THREE.Material: parameter '".concat(t,"' has value of undefined."));continue}let r=this[t];if(void 0===r){console.warn("THREE.Material: '".concat(t,"' is not a property of THREE.").concat(this.type,"."));continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),void 0!==this.dispersion&&(n.dispersion=this.dispersion),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==C&&(n.blending=this.blending),this.side!==w&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==V&&(n.blendSrc=this.blendSrc),this.blendDst!==G&&(n.blendDst=this.blendDst),this.blendEquation!==N&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==en&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==no&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==t3&&(n.stencilFail=this.stencilFail),this.stencilZFail!==t3&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==t3&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(null!==t){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:iA++}),this.uuid=nF(),this.name="",this.type="Material",this.blending=C,this.side=w,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=V,this.blendDst=G,this.blendEquation=N,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new iE(0,0,0),this.blendAlpha=0,this.depthFunc=en,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=no,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=t3,this.stencilZFail=t3,this.stencilZPass=t3,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}}class iR extends iC{copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new iE(0xffffff),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rK,this.combine=eo,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}}let iP=function(){let e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-27?(r[e]=0,r[256|e]=32768,i[e]=24,i[256|e]=24):t<-14?(r[e]=1024>>-t-14,r[256|e]=1024>>-t-14|32768,i[e]=-t-1,i[256|e]=-t-1):t<=15?(r[e]=t+15<<10,r[256|e]=t+15<<10|32768,i[e]=13,i[256|e]=13):t<128?(r[e]=31744,r[256|e]=64512,i[e]=24,i[256|e]=24):(r[e]=31744,r[256|e]=64512,i[e]=13,i[256|e]=13)}let a=new Uint32Array(2048),s=new Uint32Array(64),o=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;(8388608&t)==0;)t<<=1,n-=8388608;t&=-8388609,n+=0x38800000,a[e]=t|n}for(let e=1024;e<2048;++e)a[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=0x47800000,s[32]=0x80000000;for(let e=33;e<63;++e)s[e]=0x80000000+(e-32<<23);s[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(o[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:s,offsetTable:o}}();function iI(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=nk(e,-65504,65504),iP.floatView[0]=e;let t=iP.uint32View[0],n=t>>23&511;return iP.baseTable[n]+((8388607&t)>>iP.shiftTable[n])}function iL(e){let t=e>>10;return iP.uint32View[0]=iP.mantissaTable[iP.offsetTable[t]+(1023&e)]+iP.exponentTable[t],iP.floatView[0]}class iN{static toHalfFloat(e){return iI(e)}static fromHalfFloat(e){return iL(e)}}let iD=new nX,iU=new nW,iO=0;class iF{onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=nH(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=nV(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=nH(t,this.array)),t}setX(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=nH(t,this.array)),t}setY(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=nH(t,this.array)),t}setZ(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=nH(t,this.array)),t}setW(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array),r=nV(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array),r=nV(r,this.array),i=nV(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==ng&&(e.usage=this.usage),e}constructor(e,t,n=!1){if(Array.isArray(e))throw TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:iO++}),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=ng,this.updateRanges=[],this.gpuType=ej,this.version=0}}class ik extends iF{constructor(e,t,n){super(new Int8Array(e),t,n)}}class iz extends iF{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class iB extends iF{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class iH extends iF{constructor(e,t,n){super(new Int16Array(e),t,n)}}class iV extends iF{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class iG extends iF{constructor(e,t,n){super(new Int32Array(e),t,n)}}class iW extends iF{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class ij extends iF{getX(e){let t=iL(this.array[e*this.itemSize]);return this.normalized&&(t=nH(t,this.array)),t}setX(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize]=iI(t),this}getY(e){let t=iL(this.array[e*this.itemSize+1]);return this.normalized&&(t=nH(t,this.array)),t}setY(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+1]=iI(t),this}getZ(e){let t=iL(this.array[e*this.itemSize+2]);return this.normalized&&(t=nH(t,this.array)),t}setZ(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+2]=iI(t),this}getW(e){let t=iL(this.array[e*this.itemSize+3]);return this.normalized&&(t=nH(t,this.array)),t}setW(e,t){return this.normalized&&(t=nV(t,this.array)),this.array[e*this.itemSize+3]=iI(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array)),this.array[e+0]=iI(t),this.array[e+1]=iI(n),this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array),r=nV(r,this.array)),this.array[e+0]=iI(t),this.array[e+1]=iI(n),this.array[e+2]=iI(r),this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=nV(t,this.array),n=nV(n,this.array),r=nV(r,this.array),i=nV(i,this.array)),this.array[e+0]=iI(t),this.array[e+1]=iI(n),this.array[e+2]=iI(r),this.array[e+3]=iI(i),this}constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}}class iX extends iF{constructor(e,t,n){super(new Float32Array(e),t,n)}}let iq=0,iY=new rH,iJ=new ia,iZ=new nX,iK=new rf,i$=new rf,iQ=new nX;class i0 extends nL{getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(nK(e)?iW:iV)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(void 0!==n){let t=new nJ().getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}let r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return iY.makeRotationFromQuaternion(e),this.applyMatrix4(iY),this}rotateX(e){return iY.makeRotationX(e),this.applyMatrix4(iY),this}rotateY(e){return iY.makeRotationY(e),this.applyMatrix4(iY),this}rotateZ(e){return iY.makeRotationZ(e),this.applyMatrix4(iY),this}translate(e,t,n){return iY.makeTranslation(e,t,n),this.applyMatrix4(iY),this}scale(e,t,n){return iY.makeScale(e,t,n),this.applyMatrix4(iY),this}lookAt(e){return iJ.lookAt(e),iJ.updateMatrix(),this.applyMatrix4(iJ.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(iZ).negate(),this.translate(iZ.x,iZ.y,iZ.z),this}setFromPoints(e){let t=this.getAttribute("position");if(void 0===t){let t=[];for(let n=0,r=e.length;nt.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new rf);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new nX(-1/0,-1/0,-1/0),new nX(Infinity,Infinity,Infinity));return}if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e0&&(e.userData=this.userData),void 0!==this.parameters){let t=this.parameters;for(let n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return null!==s&&(e.data.boundingSphere=s.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;null!==n&&this.setIndex(n.clone());let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2)||(i1.copy(i).invert(),i2.copy(e.ray).applyMatrix4(i1),(null===n.boundingBox||!1!==i2.intersectsBox(n.boundingBox))&&this._computeIntersections(e,t,i2))}_computeIntersections(e,t,n){let r,i=this.geometry,a=this.material,s=i.index,o=i.attributes.position,l=i.attributes.uv,u=i.attributes.uv1,c=i.attributes.normal,h=i.groups,d=i.drawRange;if(null!==s)if(Array.isArray(a))for(let i=0,o=h.length;in.far?null:{distance:l,point:at.clone(),object:e}}(e,t,n,r,i5,i6,i8,ae);if(c){let e=new nX;ix.getBarycoord(ae,i5,i6,i8,e),i&&(c.uv=ix.getInterpolatedAttribute(i,o,l,u,e,new nW)),a&&(c.uv1=ix.getInterpolatedAttribute(a,o,l,u,e,new nW)),s&&(c.normal=ix.getInterpolatedAttribute(s,o,l,u,e,new nX),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));let t={a:o,b:l,c:u,normal:new nX,materialIndex:0};ix.getNormal(i5,i6,i8,t.normal),c.face=t,c.barycoord=e}return c}class ai extends i0{copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ai(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};let s=this;r=Math.floor(r),i=Math.floor(i);let o=[],l=[],u=[],c=[],h=0,d=0;function p(e,t,n,r,i,a,p,f,m,g,v){let y=a/m,_=p/g,x=a/2,b=p/2,S=f/2,M=m+1,w=g+1,E=0,T=0,A=new nX;for(let a=0;a0?1:-1,u.push(A.x,A.y,A.z),c.push(o/m),c.push(1-a/g),E+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}}class ac extends ia{get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new rH,this.projectionMatrix=new rH,this.projectionMatrixInverse=new rH,this.coordinateSystem=nA,this._reversedDepth=!1}}let ah=new nX,ad=new nW,ap=new nW;class af extends ac{copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=2*nO*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(.5*nU*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*nO*Math.atan(Math.tan(.5*nU*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){ah.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ah.x,ah.y).multiplyScalar(-e/ah.z),ah.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ah.x,ah.y).multiplyScalar(-e/ah.z)}getViewSize(e,t){return this.getViewBounds(e,ad,ap),t.subVectors(ap,ad)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(.5*nU*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(null!==this.view&&this.view.enabled){let e=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/s,r*=a.width/e,n*=a.height/s}let s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}}class am extends ia{updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,s,o]=t;for(let e of t)this.remove(e);if(e===nA)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else if(e===nC)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1);else throw Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,s,o,l,u]=this.children,c=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,a),e.setRenderTarget(n,2,r),e.render(t,s),e.setRenderTarget(n,3,r),e.render(t,o),e.setRenderTarget(n,4,r),e.render(t,l),n.texture.generateMipmaps=f,e.setRenderTarget(n,5,r),e.render(t,u),e.setRenderTarget(c,h,d),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let r=new af(-90,1,e,t);r.layers=this.layers,this.add(r);let i=new af(-90,1,e,t);i.layers=this.layers,this.add(i);let a=new af(-90,1,e,t);a.layers=this.layers,this.add(a);let s=new af(-90,1,e,t);s.layers=this.layers,this.add(s);let o=new af(-90,1,e,t);o.layers=this.layers,this.add(o);let l=new af(-90,1,e,t);l.layers=this.layers,this.add(l)}}class ag extends rs{get images(){return this.image}set images(e){this.image=e}constructor(e=[],t=eb,n,r,i,a,s,o,l,u){super(e,t,n,r,i,a,s,o,l,u),this.isCubeTexture=!0,this.flipY=!1}}class av extends ru{fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n=new ai(5,5,5),r=new au({name:"CubemapFromEquirect",uniforms:aa({tEquirect:{value:null}}),vertexShader:"\n\n varying vec3 vWorldDirection;\n\n vec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n }\n\n void main() {\n\n vWorldDirection = transformDirection( position, modelMatrix );\n\n #include \n #include \n\n }\n ",fragmentShader:"\n\n uniform sampler2D tEquirect;\n\n varying vec3 vWorldDirection;\n\n #include \n\n void main() {\n\n vec3 direction = normalize( vWorldDirection );\n\n vec2 sampleUV = equirectUv( direction );\n\n gl_FragColor = texture2D( tEquirect, sampleUV );\n\n }\n ",side:E,blending:A});r.uniforms.tEquirect.value=t;let i=new an(n,r),a=t.minFilter;return t.minFilter===eF&&(t.minFilter=eD),new am(1,10,this).update(e,i),t.minFilter=a,i.geometry.dispose(),i.material.dispose(),this}clear(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=!(arguments.length>3)||void 0===arguments[3]||arguments[3],i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1};this.texture=new ag([n,n,n,n,n,n]),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}}class ay extends ia{constructor(){super(),this.isGroup=!0,this.type="Group"}}let a_={type:"move"};class ax{getHandSpace(){return null===this._hand&&(this._hand=new ay,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new ay,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new nX,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new nX),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new ay,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new nX,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new nX),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null,s=this._targetRay,o=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){for(let r of(a=!0,e.hand.values())){let e=t.getJointPose(r,n),i=this._getHandJoint(l,r);null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.matrixWorldNeedsUpdate=!0,i.jointRadius=e.radius),i.visible=null!==e}let r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position);l.inputState.pinching&&s>.025?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=.015&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&null!==(i=t.getPose(e.gripSpace,n))&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1);null!==s&&(null===(r=t.getPose(e.targetRaySpace,n))&&null!==i&&(r=i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(a_)))}return null!==s&&(s.visible=null!==r),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){let n=new ay;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}constructor(){this._targetRay=null,this._grip=null,this._hand=null}}class ab{clone(){return new ab(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new iE(e),this.density=t}}class aS{clone(){return new aS(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new iE(e),this.near=t,this.far=n}}class aM extends ia{copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new rK,this.environmentIntensity=1,this.environmentRotation=new rK,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}}class aw{onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=nF()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=nF()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=ng,this.updateRanges=[],this.version=0,this.uuid=nF()}}let aE=new nX;class aT{get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;te.far||t.push({distance:o,point:aC.clone(),uv:ix.getInterpolation(aC,aD,aU,aO,aF,ak,az,new nW),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}constructor(e=new aA){if(super(),this.isSprite=!0,this.type="Sprite",void 0===n){n=new i0;let e=new aw(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);n.setIndex([0,1,2,0,2,3]),n.setAttribute("position",new aT(e,3,0,!1)),n.setAttribute("uv",new aT(e,2,3,!1))}this.geometry=n,this.material=e,this.center=new nW(.5,.5),this.count=1}}function aH(e,t,n,r,i,a){aI.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(aL.x=a*aI.x-i*aI.y,aL.y=i*aI.x+a*aI.y):aL.copy(aI),e.copy(t),e.x+=aL.x,e.y+=aL.y,e.applyMatrix4(aN)}let aV=new nX,aG=new nX;class aW extends ia{copy(e){super.copy(e,!1);let t=e.levels;for(let e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n=Math.abs(n);let i=this.levels;for(t=0;t0){let n,r;for(n=1,r=t.length;n0){aV.setFromMatrixPosition(this.matrixWorld);let n=e.ray.origin.distanceTo(aV);this.getObjectForDistance(n).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){let n,r;aV.setFromMatrixPosition(e.matrixWorld),aG.setFromMatrixPosition(this.matrixWorld);let i=aV.distanceTo(aG)/e.zoom;for(n=1,t[0].object.visible=!0,r=t.length;n=e)t[n-1].object.visible=!1,t[n].object.visible=!0;else break}for(this._currentLevel=n-1;n1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||so.getNormalMatrix(e),r=this.coplanarPoint(sa).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}constructor(e=new nX(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}}let su=new rL,sc=new nW(.5,.5),sh=new nX;class sd{set(e,t,n,r,i,a){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nA,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.planes,i=e.elements,a=i[0],s=i[1],o=i[2],l=i[3],u=i[4],c=i[5],h=i[6],d=i[7],p=i[8],f=i[9],m=i[10],g=i[11],v=i[12],y=i[13],_=i[14],x=i[15];if(r[0].setComponents(l-a,d-u,g-p,x-v).normalize(),r[1].setComponents(l+a,d+u,g+p,x+v).normalize(),r[2].setComponents(l+s,d+c,g+f,x+y).normalize(),r[3].setComponents(l-s,d-c,g-f,x-y).normalize(),n)r[4].setComponents(o,h,m,_).normalize(),r[5].setComponents(l-o,d-h,g-m,x-_).normalize();else if(r[4].setComponents(l-o,d-h,g-m,x-_).normalize(),t===nA)r[5].setComponents(l+o,d+h,g+m,x+_).normalize();else if(t===nC)r[5].setComponents(o,h,m,_).normalize();else throw Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),su.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),su.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(su)}intersectsSprite(e){return su.center.set(0,0,0),su.radius=.7071067811865476+sc.distanceTo(e.center),su.applyMatrix4(e.matrixWorld),this.intersectsSphere(su)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)0?e.max.x:e.min.x,sh.y=r.normal.y>0?e.max.y:e.min.y,sh.z=r.normal.z>0?e.max.z:e.min.z,0>r.distanceToPoint(sh))return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(0>t[n].distanceToPoint(e))return!1;return!0}clone(){return new this.constructor().copy(this)}constructor(e=new sl,t=new sl,n=new sl,r=new sl,i=new sl,a=new sl){this.planes=[e,t,n,r,i,a]}}let sp=new rH,sf=new sd;class sm{intersectsObject(e,t){if(!t.isArrayCamera||0===t.cameras.length)return!1;for(let n=0;n=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});let s=i[this.index];a.push(s),this.index++,s.start=e,s.count=t,s.z=n,s.index=r}reset(){this.list.length=0,this.index=0}constructor(){this.index=0,this.pool=[],this.list=[]}},sR=new an,sP=[];function sI(e,t){if(e.constructor!==t.constructor){let n=Math.min(e.length,t.length);for(let r=0;r65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new iF(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){let t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(let n in t.attributes){if(!e.hasAttribute(n))throw Error('THREE.BatchedMesh: Added geometry missing "'.concat(n,'". All geometries must have consistent attributes.'));let r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.normalized)throw Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){let t=this._instanceInfo;if(e<0||e>=t.length||!1===t[e].active)throw Error("THREE.BatchedMesh: Invalid instanceId ".concat(e,". Instance is either out of range or has been deleted."))}validateGeometryId(e){let t=this._geometryInfo;if(e<0||e>=t.length||!1===t[e].active)throw Error("THREE.BatchedMesh: Invalid geometryId ".concat(e,". Geometry is either out of range or has been deleted."))}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new rf);let e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n=this.maxInstanceCount&&0===this._availableInstanceIds.length)throw Error("THREE.BatchedMesh: Maximum item count reached.");let t={visible:!0,active:!0,geometryIndex:e},n=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(sg),n=this._availableInstanceIds.shift(),this._instanceInfo[n]=t):(n=this._instanceInfo.length,this._instanceInfo.push(t));let r=this._matricesTexture;s_.identity().toArray(r.image.data,16*n),r.needsUpdate=!0;let i=this._colorsTexture;return i&&(sx.toArray(i.image.data,4*n),i.needsUpdate=!0),this._visibilityChanged=!0,n}addGeometry(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this._initializeGeometry(e),this._validateGeometry(e);let i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},a=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=-1===n?e.getAttribute("position").count:n;let s=e.getIndex();if(null!==s&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=-1===r?s.count:r),-1!==i.indexStart&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(sg),a[t=this._availableGeometryIds.shift()]=i):(t=this._geometryCount,this._geometryCount++,a.push(i)),this.setGeometryAt(t,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,t}setGeometryAt(e,t){if(e>=this._geometryCount)throw Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);let n=this.geometry,r=null!==n.getIndex(),i=n.getIndex(),a=t.getIndex(),s=this._geometryInfo[e];if(r&&a.count>s.reservedIndexCount||t.attributes.position.count>s.reservedVertexCount)throw Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");let o=s.vertexStart,l=s.reservedVertexCount;for(let e in s.vertexCount=t.getAttribute("position").count,n.attributes){let r=t.getAttribute(e),i=n.getAttribute(e);!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){let i=e.count;for(let a=0;a=t.length||!1===t[e].active)return this;let n=this._instanceInfo;for(let t=0,r=n.length;tt).sort((e,t)=>n[e].vertexStart-n[t].vertexStart),i=this.geometry;for(let a=0,s=n.length;a=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingBox){let e=new rf,t=n.index,i=n.attributes.position;for(let n=r.start,a=r.start+r.count;n=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(null===r.boundingSphere){let t=new rL;this.getBoundingBoxAt(e,sM),sM.getCenter(t.center);let i=n.index,a=n.attributes.position,s=0;for(let e=r.start,n=r.start+r.count;e1&&void 0!==arguments[1]?arguments[1]:{};this.validateGeometryId(e);let n=this._geometryInfo[e];return t.vertexStart=n.vertexStart,t.vertexCount=n.vertexCount,t.reservedVertexCount=n.reservedVertexCount,t.indexStart=n.indexStart,t.indexCount=n.indexCount,t.reservedIndexCount=n.reservedIndexCount,t.start=n.start,t.count=n.count,t}setInstanceCount(e){let t=this._availableInstanceIds,n=this._instanceInfo;for(t.sort(sg);t[t.length-1]===n.length-1;)n.pop(),t.pop();if(ee.active);if(Math.max(...n.map(e=>e.vertexStart+e.reservedVertexCount))>e)throw Error("BatchedMesh: Geometry vertex values are being used outside the range ".concat(t,". Cannot shrink further."));if(this.geometry.index&&Math.max(...n.map(e=>e.indexStart+e.reservedIndexCount))>t)throw Error("BatchedMesh: Geometry index values are being used outside the range ".concat(t,". Cannot shrink further."));let r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new i0,this._initializeGeometry(r));let i=this.geometry;for(let e in r.index&&sI(r.index.array,i.index.array),r.attributes)sI(r.attributes[e].array,i.attributes[e].array)}raycast(e,t){let n=this._instanceInfo,r=this._geometryInfo,i=this.matrixWorld,a=this.geometry;sR.material=this.material,sR.geometry.index=a.index,sR.geometry.attributes=a.attributes,null===sR.geometry.boundingBox&&(sR.geometry.boundingBox=new rf),null===sR.geometry.boundingSphere&&(sR.geometry.boundingSphere=new rL);for(let a=0,s=n.length;a({...e,boundingBox:null!==e.boundingBox?e.boundingBox.clone():null,boundingSphere:null!==e.boundingSphere?e.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),null!==this._colorsTexture&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,null!==this._colorsTexture&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,r,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let a=r.getIndex(),s=null===a?1:a.array.BYTES_PER_ELEMENT,o=this._instanceInfo,l=this._multiDrawStarts,u=this._multiDrawCounts,c=this._geometryInfo,h=this.perObjectFrustumCulled,d=this._indirectTexture,p=d.image.data,f=n.isArrayCamera?sS:sb;h&&!n.isArrayCamera&&(s_.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),sb.setFromProjectionMatrix(s_,n.coordinateSystem,n.reversedDepth));let m=0;if(this.sortObjects){s_.copy(this.matrixWorld).invert(),sE.setFromMatrixPosition(n.matrixWorld).applyMatrix4(s_),sT.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(s_);for(let e=0,t=o.length;e0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;er)return;sz.applyMatrix4(e.matrixWorld);let l=t.ray.origin.distanceTo(sz);if(!(lt.far))return{distance:l,point:sB.clone().applyMatrix4(e.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:e}}let sG=new nX,sW=new nX;class sj extends sH{computeLineDistances(){let e=this.geometry;if(null===e.index){let t=e.attributes.position,n=[];for(let e=0,r=t.count;e0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;ei.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:s})}}class s0 extends rs{clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){0!==this._requestVideoFrameCallbackId&&this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),super.dispose()}constructor(e,t,n,r,i=eD,a=eD,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;let u=this;"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(function t(){u.needsUpdate=!0,u._requestVideoFrameCallbackId=e.requestVideoFrameCallback(t)}))}}class s1 extends s0{update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}constructor(e,t,n,r,i,a,s,o){super({},e,t,n,r,i,a,s,o),this.isVideoFrameTexture=!0}}class s2 extends rs{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=eR,this.minFilter=eR,this.generateMipmaps=!1,this.needsUpdate=!0}}class s3 extends rs{constructor(e,t,n,r,i,a,s,o,l,u,c,h){super(null,a,s,o,l,u,r,i,c,h),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class s4 extends s3{addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=eA,this.layerUpdates=new Set}}class s5 extends s3{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,eb),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class s6 extends rs{constructor(e,t,n,r,i,a,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class s8 extends rs{copy(e){return super.copy(e),this.source=new rn(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}constructor(e,t,n=eW,r,i,a,s=eR,o=eR,l,u=e1,c=1){if(u!==e1&&u!==e2)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super({width:e,height:t,depth:c},r,i,a,s,o,u,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}}class s9 extends rs{copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}}class s7 extends i0{copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new s7(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}constructor(e=1,t=1,n=4,r=8,i=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:r,heightSegments:i},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),r=Math.max(3,Math.floor(r));let a=[],s=[],o=[],l=[],u=t/2,c=Math.PI/2*e,h=t,d=2*c+h,p=2*n+(i=Math.max(1,Math.floor(i))),f=r+1,m=new nX,g=new nX;for(let v=0;v<=p;v++){let y=0,_=0,x=0,b=0;if(v<=n){let t=v/n,r=t*Math.PI/2;_=-u-e*Math.cos(r),x=e*Math.sin(r),b=-e*Math.cos(r),y=t*c}else if(v<=n+i){let r=(v-n)/i;_=-u+r*t,x=e,b=0,y=c+r*h}else{let t=(v-n-i)/n,r=t*Math.PI/2;_=u+e*Math.sin(r),x=e*Math.cos(r),b=e*Math.sin(r),y=c+h+t*c}let S=Math.max(0,Math.min(1,y/d)),M=0;0===v?M=.5/r:v===p&&(M=-.5/r);for(let e=0;e<=r;e++){let t=e/r,n=t*Math.PI*2,i=Math.sin(n),a=Math.cos(n);g.x=-x*a,g.y=_,g.z=x*i,s.push(g.x,g.y,g.z),m.set(-x*a,b,x*i),m.normalize(),o.push(m.x,m.y,m.z),l.push(t+M,S)}if(v>0){let e=(v-1)*f;for(let t=0;t0||0!==r)&&(u.push(a,s,l),y+=3),(t>0||r!==i-1)&&(u.push(s,o,l),y+=3)}l.addGroup(g,y,0),g+=y})(),!1===a&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(u),this.setAttribute("position",new iX(c,3)),this.setAttribute("normal",new iX(h,3)),this.setAttribute("uv",new iX(d,2))}}class on extends ot{static fromJSON(e){return new on(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}constructor(e=1,t=1,n=32,r=1,i=!1,a=0,s=2*Math.PI){super(0,e,t,n,r,i,a,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:s}}}class or extends i0{copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new or(e.vertices,e.indices,e.radius,e.details)}constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};let i=[],a=[];function s(e){i.push(e.x,e.y,e.z)}function o(t,n){let r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function l(e,t,n,r){r<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=r/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}(function(e){let n=new nX,r=new nX,i=new nX;for(let a=0;a.9&&s<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new iX(i,3)),this.setAttribute("normal",new iX(i.slice(),3)),this.setAttribute("uv",new iX(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}}class oi extends or{static fromJSON(e){return new oi(e.radius,e.detail)}constructor(e=1,t=0){let n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}}let oa=new nX,os=new nX,oo=new nX,ol=new ix;class ou extends i0{copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){let n=Math.cos(nU*t),r=e.getIndex(),i=e.getAttribute("position"),a=r?r.count:i.count,s=[0,0,0],o=["a","b","c"],l=[,,,],u={},c=[];for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:5,t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){let e=this.getLengths();return e[e.length-1]}getLengths(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.arcLengthDivisions;if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let t=[],n,r=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)t.push(i+=(n=this.getPoint(a/e)).distanceTo(r)),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getLengths(),i=0,a=r.length;t=n||e*r[a-1];let s=0,o=a-1,l;for(;s<=o;)if((l=r[i=Math.floor(s+(o-s)/2)]-t)<0)s=i+1;else if(l>0)o=i-1;else{o=i;break}if(r[i=o]===t)return i/(a-1);let u=r[i],c=r[i+1];return(i+(t-u)/(c-u))/(a-1)}getTangent(e,t){let n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);let i=this.getPoint(n),a=this.getPoint(r),s=t||(i.isVector2?new nW:new nX);return s.copy(a).sub(i).normalize(),s}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new nX,r=[],i=[],a=[],s=new nX,o=new rH;for(let t=0;t<=e;t++){let n=t/e;r[t]=this.getTangentAt(n,new nX)}i[0]=new nX,a[0]=new nX;let l=Number.MAX_VALUE,u=Math.abs(r[0].x),c=Math.abs(r[0].y),h=Math.abs(r[0].z);u<=l&&(l=u,n.set(1,0,0)),c<=l&&(l=c,n.set(0,1,0)),h<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),s.crossVectors(r[t-1],r[t]),s.length()>Number.EPSILON){s.normalize();let e=Math.acos(nk(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(o.makeRotationAxis(s,e))}a[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(nk(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(o.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}}class oh extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW,n=2*Math.PI,r=this.aEndAngle-this.aStartAngle,i=Math.abs(r)n;)r-=n;r1&&void 0!==arguments[1]?arguments[1]:new nX,i=this.points,a=i.length,s=(a-!this.closed)*e,o=Math.floor(s),l=s-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/a)+1)*a:0===l&&o===a-1&&(o=a-2,l=1),this.closed||o>0?t=i[(o-1)%a]:(of.subVectors(i[0],i[1]).add(i[0]),t=of);let u=i[o%a],c=i[(o+1)%a];if(this.closed||o+21&&void 0!==arguments[1]?arguments[1]:new nW,n=this.v0,r=this.v1,i=this.v2,a=this.v3;return t.set(ob(e,n.x,r.x,i.x,a.x),ob(e,n.y,r.y,i.y,a.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}constructor(e=new nW,t=new nW,n=new nW,r=new nW){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}}class oM extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nX,n=this.v0,r=this.v1,i=this.v2,a=this.v3;return t.set(ob(e,n.x,r.x,i.x,a.x),ob(e,n.y,r.y,i.y,a.y),ob(e,n.z,r.z,i.z,a.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}constructor(e=new nX,t=new nX,n=new nX,r=new nX){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}}class ow extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW;return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW;return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}constructor(e=new nW,t=new nW){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}}class oE extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nX;return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nX;return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}constructor(e=new nX,t=new nX){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}}class oT extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW,n=this.v0,r=this.v1,i=this.v2;return t.set(ox(e,n.x,r.x,i.x),ox(e,n.y,r.y,i.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}constructor(e=new nW,t=new nW,n=new nW){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}}class oA extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nX,n=this.v0,r=this.v1,i=this.v2;return t.set(ox(e,n.x,r.x,i.x),ox(e,n.y,r.y,i.y),ox(e,n.z,r.z,i.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}constructor(e=new nX,t=new nX,n=new nX){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}}class oC extends oc{getPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nW,n=this.points,r=(n.length-1)*e,i=Math.floor(r),a=r-i,s=n[0===i?i:i-1],o=n[i],l=n[i>n.length-2?n.length-1:i+1],u=n[i>n.length-3?n.length-1:i+2];return t.set(o_(a,s.x,o.x,l.x,u.x),o_(a,s.y,o.y,l.y,u.y)),t}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){let e=r[i]-n,a=this.curves[i],s=a.getLength(),o=0===s?0:1-e/s;return a.getPointAt(o,t)}i++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,r=this.curves.length;n0&&void 0!==arguments[0]?arguments[0]:40,t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,n=[];for(let r=0,i=this.curves;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);let u=l.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}constructor(e){super(),this.type="Path",this.currentPoint=new nW,e&&this.setFromPoints(e)}}class oL extends oI{getPointsHoles(e){let t=[];for(let n=0,r=this.holes.length;n0)for(let i=t;i=t;i-=r)a=oX(i/r|0,e[i],e[i+1],a);return a&&oB(a,a.next)&&(oq(a),a=a.next),a}function oD(e,t){if(!e)return e;t||(t=e);let n=e,r;do if(r=!1,!n.steiner&&(oB(n,n.next)||0===oz(n.prev,n,n.next))){if(oq(n),(n=t=n.prev)===n.next)break;r=!0}else n=n.next;while(r||n!==t)return t}function oU(e,t){let n=e.x-t.x;return 0===n&&0==(n=e.y-t.y)&&(n=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),n}function oO(e,t,n,r,i){return(e=((e=((e=((e=((e=(e-n)*i|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-r)*i|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function oF(e,t,n,r,i,a,s,o){return(i-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(r-o)>=(n-s)*(t-o)&&(n-s)*(a-o)>=(i-s)*(r-o)}function ok(e,t,n,r,i,a,s,o){return(e!==s||t!==o)&&oF(e,t,n,r,i,a,s,o)}function oz(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function oB(e,t){return e.x===t.x&&e.y===t.y}function oH(e,t,n,r){let i=oG(oz(e,t,n)),a=oG(oz(e,t,r)),s=oG(oz(n,r,e)),o=oG(oz(n,r,t));return!!(i!==a&&s!==o||0===i&&oV(e,n,t)||0===a&&oV(e,r,t)||0===s&&oV(n,e,r)||0===o&&oV(n,t,r))}function oV(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function oG(e){return e>0?1:e<0?-1:0}function oW(e,t){return 0>oz(e.prev,e,e.next)?oz(e,t,e.next)>=0&&oz(e,e.prev,t)>=0:0>oz(e,t,e.prev)||0>oz(e,e.next,t)}function oj(e,t){let n=oY(e.i,e.x,e.y),r=oY(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function oX(e,t,n,r){let i=oY(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function oq(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function oY(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class oJ{static triangulate(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return function(e,t){let n,r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,s=t&&t.length,o=s?t[0]*a:e.length,l=oN(e,0,o,a,!0),u=[];if(!l||l.next===l.prev)return u;if(s&&(l=function(e,t,n,r){let i=[];for(let n=0,a=t.length;n=r.next.y&&r.next.y!==r.y){let e=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>s&&(s=e,n=r.x=r.x&&r.x>=l&&i!==r.x&&oF(an.x||r.x===n.x&&(h=n,d=r,0>oz(h.prev,h,d.prev)&&0>oz(d.next,h,h.next))))&&(n=r,c=t)}r=r.next}while(r!==o)return n}(e,t);if(!n)return t;let r=oj(n,e);return oD(r,r.next),oD(n,n.next)}(i[e],n);return n}(e,t,l,a)),e.length>80*a){n=1/0,r=1/0;let t=-1/0,s=-1/0;for(let i=a;it&&(t=a),o>s&&(s=o)}i=0!==(i=Math.max(t-n,s-r))?32767/i:0}return function e(t,n,r,i,a,s,o){if(!t)return;!o&&s&&function(e,t,n,r){let i=e;do 0===i.z&&(i.z=oO(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e)i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n=1;do{let r,i=e;e=null;let a=null;for(t=0;i;){t++;let s=i,o=0;for(let e=0;e0||l>0&&s;)0!==o&&(0===l||!s||i.z<=s.z)?(r=i,i=i.nextZ,o--):(r=s,s=s.nextZ,l--),a?a.nextZ=r:e=r,r.prevZ=a,a=r;i=s}a.nextZ=null,n*=2}while(t>1)}(i)}(t,i,a,s);let l=t;for(;t.prev!==t.next;){let u=t.prev,c=t.next;if(s?function(e,t,n,r){let i=e.prev,a=e.next;if(oz(i,e,a)>=0)return!1;let s=i.x,o=e.x,l=a.x,u=i.y,c=e.y,h=a.y,d=Math.min(s,o,l),p=Math.min(u,c,h),f=Math.max(s,o,l),m=Math.max(u,c,h),g=oO(d,p,t,n,r),v=oO(f,m,t,n,r),y=e.prevZ,_=e.nextZ;for(;y&&y.z>=g&&_&&_.z<=v;){if(y.x>=d&&y.x<=f&&y.y>=p&&y.y<=m&&y!==i&&y!==a&&ok(s,u,o,c,l,h,y.x,y.y)&&oz(y.prev,y,y.next)>=0||(y=y.prevZ,_.x>=d&&_.x<=f&&_.y>=p&&_.y<=m&&_!==i&&_!==a&&ok(s,u,o,c,l,h,_.x,_.y)&&oz(_.prev,_,_.next)>=0))return!1;_=_.nextZ}for(;y&&y.z>=g;){if(y.x>=d&&y.x<=f&&y.y>=p&&y.y<=m&&y!==i&&y!==a&&ok(s,u,o,c,l,h,y.x,y.y)&&oz(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;_&&_.z<=v;){if(_.x>=d&&_.x<=f&&_.y>=p&&_.y<=m&&_!==i&&_!==a&&ok(s,u,o,c,l,h,_.x,_.y)&&oz(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}(t,i,a,s):function(e){let t=e.prev,n=e.next;if(oz(t,e,n)>=0)return!1;let r=t.x,i=e.x,a=n.x,s=t.y,o=e.y,l=n.y,u=Math.min(r,i,a),c=Math.min(s,o,l),h=Math.max(r,i,a),d=Math.max(s,o,l),p=n.next;for(;p!==t;){if(p.x>=u&&p.x<=h&&p.y>=c&&p.y<=d&&ok(r,s,i,o,a,l,p.x,p.y)&&oz(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}(t)){n.push(u.i,t.i,c.i),oq(t),t=c.next,l=c.next;continue}if((t=c)===l){o?1===o?e(t=function(e,t){let n=e;do{let r=n.prev,i=n.next.next;!oB(r,i)&&oH(r,n,n.next,i)&&oW(r,i)&&oW(i,r)&&(t.push(r.i,n.i,i.i),oq(n),oq(n.next),n=e=i),n=n.next}while(n!==e)return oD(n)}(oD(t),n),n,r,i,a,s,2):2===o&&function(t,n,r,i,a,s){let o=t;do{let t=o.next.next;for(;t!==o.prev;){var l,u;if(o.i!==t.i&&(l=o,u=t,l.next.i!==u.i&&l.prev.i!==u.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&oH(n,n.next,e,t))return!0;n=n.next}while(n!==e)return!1}(l,u)&&(oW(l,u)&&oW(u,l)&&function(e,t){let n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e)return r}(l,u)&&(oz(l.prev,l,u.prev)||oz(l,u.prev,u))||oB(l,u)&&oz(l.prev,l,l.next)>0&&oz(u.prev,u,u.next)>0))){let l=oj(o,t);o=oD(o,o.next),l=oD(l,l.next),e(o,n,r,i,a,s,0),e(l,n,r,i,a,s,0);return}t=t.next}o=o.next}while(o!==t)}(t,n,r,i,a,s):e(oD(t),n,r,i,a,s,1);break}}}(l,u,a,n,r,i,0),u}(e,t,n)}}class oZ{static area(e){let t=e.length,n=0;for(let r=t-1,i=0;ioZ.area(e)}static triangulateShape(e,t){let n=[],r=[],i=[];oK(e),o$(n,e);let a=e.length;t.forEach(oK);for(let e=0;e2&&e[t-1].equals(e[0])&&e.pop()}function o$(e,t){for(let n=0;nNumber.EPSILON){let h=Math.sqrt(c),d=Math.sqrt(l*l+u*u),p=t.x-o/h,f=t.y+s/h,m=((n.x-u/d-p)*u-(n.y+l/d-f)*l)/(s*u-o*l),g=(r=p+s*m-e.x)*r+(i=f+o*m-e.y)*i;if(g<=2)return new nW(r,i);a=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(u)&&(e=!0),e?(r=-o,i=s,a=Math.sqrt(c)):(r=s,i=o,a=Math.sqrt(c/2))}return new nW(r/a,i/a)}let L=[];for(let e=0,t=C.length,n=t-1,r=e+1;e=0;e--){let t=e/y,n=m*Math.cos(t*Math.PI/2),r=g*Math.sin(t*Math.PI/2)+v;for(let e=0,t=C.length;e=0;){let a=i,s=i-1;s<0&&(s=e.length-1);for(let e=0,i=d+2*y;e0)&&d.push(t,i,l),(e!==n-1||o0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new nW(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return nk(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new iE(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new iE(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new iE(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}}class lu extends iC{copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new iE(0xffffff),this.specular=new iE(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new iE(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rK,this.combine=eo,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}}class lc extends iC{copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new iE(0xffffff),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new iE(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}}class lh extends iC{copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}}class ld extends iC{copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new iE(0xffffff),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new iE(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new rK,this.combine=eo,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}}class lp extends iC{copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=tj,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}}class lf extends iC{copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}}class lm extends iC{copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new iE(0xffffff),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tJ,this.normalScale=new nW(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}}class lg extends sN{copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}}function lv(e,t){return e&&e.constructor!==t?"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e):e}function ly(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function l_(e){let t=e.length,n=Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort(function(t,n){return e[t]-e[n]}),n}function lx(e,t,n){let r=e.length,i=new e.constructor(r);for(let a=0,s=0;s!==r;++a){let r=n[a]*t;for(let n=0;n!==t;++n)i[s++]=e[r+n]}return i}function lb(e,t,n,r){let i=1,a=e[0];for(;void 0!==a&&void 0===a[r];)a=e[i++];if(void 0===a)return;let s=a[r];if(void 0!==s)if(Array.isArray(s))do void 0!==(s=a[r])&&(t.push(a.time),n.push(...s)),a=e[i++];while(void 0!==a)else if(void 0!==s.toArray)do void 0!==(s=a[r])&&(t.push(a.time),s.toArray(n,n.length)),a=e[i++];while(void 0!==a)else do void 0!==(s=a[r])&&(t.push(a.time),n.push(s)),a=e[i++];while(void 0!==a)}class lS{static convertArray(e,t){return lv(e,t)}static isTypedArray(e){return ly(e)}static getKeyframeOrder(e){return l_(e)}static sortedArray(e,t,n){return lx(e,t,n)}static flattenJSON(e,t,n,r){lb(e,t,n,r)}static subclip(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30;return function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30,a=e.clone();a.name=t;let s=[];for(let e=0;e=r)){l.push(t.times[e]);for(let n=0;na.tracks[e].times[0]&&(o=a.tracks[e].times[0]);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;r<=0&&(r=30);let i=n.tracks.length,a=t/r;for(let t=0;t=i.times[d]){let e=d*u+l,t=e+u-l;r=i.values.slice(e,t)}else{let e=i.createInterpolant(),t=l,n=u-l;e.evaluate(a),r=e.resultBuffer.slice(t,n)}"quaternion"===s&&new nj().fromArray(r).normalize().conjugate().toArray(r);let p=o.times.length;for(let e=0;e=i)){let s=t[1];e=(i=t[--n-1]))break r}a=n,n=0;break i}break n}for(;n>>1;et;)--a;if(++a,0!==i||a!==r){i>=a&&(i=(a=Math.max(a,1))-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==a&&a>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,a),e=!1;break}a=r}if(void 0!==r&&ly(r))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===tO,i=e.length-1,a=1;for(let s=1;s0){e[a]=e[i];for(let e=i*n,r=a*n,s=0;s!==n;++s)t[r+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=new this.constructor(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}constructor(e,t,n,r){if(void 0===e)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=lv(t,this.TimeBufferType),this.values=lv(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}}lA.prototype.ValueTypeName="",lA.prototype.TimeBufferType=Float32Array,lA.prototype.ValueBufferType=Float32Array,lA.prototype.DefaultInterpolation=tU;class lC extends lA{constructor(e,t,n){super(e,t,n)}}lC.prototype.ValueTypeName="bool",lC.prototype.ValueBufferType=Array,lC.prototype.DefaultInterpolation=tD,lC.prototype.InterpolantFactoryMethodLinear=void 0,lC.prototype.InterpolantFactoryMethodSmooth=void 0;class lR extends lA{constructor(e,t,n,r){super(e,t,n,r)}}lR.prototype.ValueTypeName="color";class lP extends lA{constructor(e,t,n,r){super(e,t,n,r)}}lP.prototype.ValueTypeName="number";class lI extends lM{interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(n-t)/(r-t),l=e*s;for(let e=l+s;l!==e;l+=4)nj.slerpFlat(i,0,a,l-s,a,l,o);return i}constructor(e,t,n,r){super(e,t,n,r)}}class lL extends lA{InterpolantFactoryMethodLinear(e){return new lI(this.times,this.values,this.getValueSize(),e)}constructor(e,t,n,r){super(e,t,n,r)}}lL.prototype.ValueTypeName="quaternion",lL.prototype.InterpolantFactoryMethodSmooth=void 0;class lN extends lA{constructor(e,t,n){super(e,t,n)}}lN.prototype.ValueTypeName="string",lN.prototype.ValueBufferType=Array,lN.prototype.DefaultInterpolation=tD,lN.prototype.InterpolantFactoryMethodLinear=void 0,lN.prototype.InterpolantFactoryMethodSmooth=void 0;class lD extends lA{constructor(e,t,n,r){super(e,t,n,r)}}lD.prototype.ValueTypeName="vector";class lU{static parse(e){let t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push((function(e){if(void 0===e.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");let t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return lP;case"vector":case"vector2":case"vector3":case"vector4":return lD;case"color":return lR;case"quaternion":return lL;case"bool":case"boolean":return lC;case"string":return lN}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){let t=[],n=[];lb(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)})(n[e]).scale(r));let i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i.userData=JSON.parse(e.userData||"{}"),i}static toJSON(e){let t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let e=0,r=n.length;e!==r;++e)t.push(lA.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){let i=t.length,a=[];for(let e=0;e1){let e=a[1],t=r[e];t||(r[e]=t=[]),t.push(n)}}let a=[];for(let e in r)a.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return a}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let n=function(e,t,n,r,i){if(0!==n.length){let a=[],s=[];lb(n,a,s,r),0!==a.length&&i.push(new e(t,a,s))}},r=[],i=e.name||"default",a=e.fps||30,s=e.blendMode,o=e.length||-1,l=e.hierarchy||[];for(let e=0;e{t&&t(i),this.manager.itemEnd(e)},0),i;if(void 0!==lB[e])return void lB[e].push({onLoad:t,onProgress:n,onError:r});lB[e]=[],lB[e].push({onLoad:t,onProgress:n,onError:r});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:"function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),s=this.mimeType,o=this.responseType;fetch(a).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;let n=lB[e],r=t.body.getReader(),i=t.headers.get("X-File-Size")||t.headers.get("Content-Length"),a=i?parseInt(i):0,s=0!==a,o=0;return new Response(new ReadableStream({start(e){!function t(){r.read().then(r=>{let{done:i,value:l}=r;if(i)e.close();else{let r=new ProgressEvent("progress",{lengthComputable:s,loaded:o+=l.byteLength,total:a});for(let e=0,t=n.length;e{e.error(t)})}()}}))}throw new lH('fetch for "'.concat(t.url,'" responded with ').concat(t.status,": ").concat(t.statusText),t)}).then(e=>{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>new DOMParser().parseFromString(e,s));case"json":return e.json();default:if(""===s)return e.text();{let t=/charset="?([^;"\s]*)"?/i.exec(s),n=new TextDecoder(t&&t[1]?t[1].toLowerCase():void 0);return e.arrayBuffer().then(e=>n.decode(e))}}}).then(t=>{lO.add("file:".concat(e),t);let n=lB[e];delete lB[e];for(let e=0,r=n.length;e{let n=lB[e];if(void 0===n)throw this.manager.itemError(e),t;delete lB[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}}class lG extends lz{load(e,t,n,r){let i=this,a=new lV(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t=[];for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:0,n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),l5.setFromMatrixPosition(e.matrixWorld),n.position.copy(l5),l6.copy(n.position),l6.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(l6),n.updateMatrixWorld(),r.makeTranslation(-l5.x,-l5.y,-l5.z),l4.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(l4,n.coordinateSystem,n.reversedDepth)}constructor(){super(new af(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new nW(4,2),this._viewportCount=6,this._viewports=[new ro(2,1,1,1),new ro(0,1,1,1),new ro(3,1,1,1),new ro(1,1,1,1),new ro(3,0,1,1),new ro(1,0,1,1)],this._cubeDirections=[new nX(1,0,0),new nX(-1,0,0),new nX(0,0,1),new nX(0,0,-1),new nX(0,1,0),new nX(0,-1,0)],this._cubeUps=[new nX(0,1,0),new nX(0,1,0),new nX(0,1,0),new nX(0,1,0),new nX(0,0,1),new nX(0,0,-1)]}}class l9 extends lZ{get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new l8}}class l7 extends ac{copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,a=n+e,s=r+t,o=r-t;if(null!==this.view&&this.view.enabled){let e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,s,o,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}}class ue extends l1{constructor(){super(new l7(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class ut extends lZ{dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ia.DEFAULT_UP),this.updateMatrix(),this.target=new ia,this.shadow=new ue}}class un extends lZ{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class ur extends lZ{get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){let t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}}class ui{set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){let n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*r),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*r*1.092548),t.addScaledVector(a[5],r*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],n*i*1.092548),t.addScaledVector(a[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){let n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*r),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*r),t.addScaledVector(a[5],.858086*r*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*n*i),t.addScaledVector(a[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){let n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new nX)}}class ua extends lZ{copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){let t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}constructor(e=new ui,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}}class us extends lz{load(e,t,n,r){let i=this,a=new lV(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}let r=this.createMaterialFromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=new iE().setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.dispersion&&(r.dispersion=e.dispersion),void 0!==e.iridescence&&(r.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(r.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.anisotropy&&(r.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(r.anisotropyRotation=e.anisotropyRotation),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.alphaHash&&(r.alphaHash=e.alphaHash),void 0!==e.depthFunc&&(r.depthFunc=e.depthFunc),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.blendSrc&&(r.blendSrc=e.blendSrc),void 0!==e.blendDst&&(r.blendDst=e.blendDst),void 0!==e.blendEquation&&(r.blendEquation=e.blendEquation),void 0!==e.blendSrcAlpha&&(r.blendSrcAlpha=e.blendSrcAlpha),void 0!==e.blendDstAlpha&&(r.blendDstAlpha=e.blendDstAlpha),void 0!==e.blendEquationAlpha&&(r.blendEquationAlpha=e.blendEquationAlpha),void 0!==e.blendColor&&void 0!==r.blendColor&&r.blendColor.setHex(e.blendColor),void 0!==e.blendAlpha&&(r.blendAlpha=e.blendAlpha),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),void 0!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(r.forceSinglePass=e.forceSinglePass),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(let t in e.uniforms){let i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case"t":r.uniforms[t].value=n(i.value);break;case"c":r.uniforms[t].value=new iE().setHex(i.value);break;case"v2":r.uniforms[t].value=new nW().fromArray(i.value);break;case"v3":r.uniforms[t].value=new nX().fromArray(i.value);break;case"v4":r.uniforms[t].value=new ro().fromArray(i.value);break;case"m3":r.uniforms[t].value=new nJ().fromArray(i.value);break;case"m4":r.uniforms[t].value=new rH().fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(let t in e.extensions)r.extensions[t]=e.extensions[t];if(void 0!==e.lights&&(r.lights=e.lights),void 0!==e.clipping&&(r.clipping=e.clipping),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=new nW().fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapRotation&&r.envMapRotation.fromArray(e.envMapRotation),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=new nW().fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.anisotropyMap&&(r.anisotropyMap=n(e.anisotropyMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return us.createMaterialFromType(e)}static createMaterialFromType(e){return new({ShadowMaterial:la,SpriteMaterial:aA,RawShaderMaterial:ls,ShaderMaterial:au,PointsMaterial:sq,MeshPhysicalMaterial:ll,MeshStandardMaterial:lo,MeshPhongMaterial:lu,MeshToonMaterial:lc,MeshNormalMaterial:lh,MeshLambertMaterial:ld,MeshDepthMaterial:lp,MeshDistanceMaterial:lf,MeshBasicMaterial:iR,MeshMatcapMaterial:lm,LineDashedMaterial:lg,LineBasicMaterial:sN,Material:iC})[e]}constructor(e){super(e),this.textures={}}}class uo{static extractUrlBase(e){let t=e.lastIndexOf("/");return -1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e))?e:t+e}}class ul extends i0{copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}}class uu extends lz{load(e,t,n,r){let i=this,a=new lV(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t={},n={};function r(e,r){if(void 0!==t[r])return t[r];let i=e.interleavedBuffers[r],a=function(e,t){if(void 0!==n[t])return n[t];let r=new Uint32Array(e.arrayBuffers[t]).buffer;return n[t]=r,r}(e,i.buffer),s=new aw(nQ(i.type,a),i.stride);return s.uuid=i.uuid,t[r]=s,s}let i=e.isInstancedBufferGeometry?new ul:new i0,a=e.data.index;if(void 0!==a){let e=nQ(a.type,a.array);i.setIndex(new iF(e,1))}let s=e.data.attributes;for(let t in s){let n,a=s[t];if(a.isInterleavedBufferAttribute)n=new aT(r(e.data,a.data),a.itemSize,a.offset,a.normalized);else{let e=nQ(a.type,a.array);n=new(a.isInstancedBufferAttribute?a6:iF)(e,a.itemSize,a.normalized)}void 0!==a.name&&(n.name=a.name),void 0!==a.usage&&n.setUsage(a.usage),i.setAttribute(t,n)}let o=e.data.morphAttributes;if(o)for(let t in o){let n=o[t],a=[];for(let t=0,i=n.length;t0){(n=new lX(new lF(t))).setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t0){(t=new lX(this.manager)).setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t{let t=null,n=null;return void 0!==e.boundingBox&&(t=new rf().fromJSON(e.boundingBox)),void 0!==e.boundingSphere&&(n=new rL().fromJSON(e.boundingSphere)),{...e,boundingBox:t,boundingSphere:n}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=c(e.matricesTexture.uuid),a._indirectTexture=c(e.indirectTexture.uuid),void 0!==e.colorsTexture&&(a._colorsTexture=c(e.colorsTexture.uuid)),void 0!==e.boundingSphere&&(a.boundingSphere=new rL().fromJSON(e.boundingSphere)),void 0!==e.boundingBox&&(a.boundingBox=new rf().fromJSON(e.boundingBox));break;case"LOD":a=new aW;break;case"Line":a=new sH(l(e.geometry),u(e.material));break;case"LineLoop":a=new sX(l(e.geometry),u(e.material));break;case"LineSegments":a=new sj(l(e.geometry),u(e.material));break;case"PointCloud":case"Points":a=new s$(l(e.geometry),u(e.material));break;case"Sprite":a=new aB(u(e.material));break;case"Group":a=new ay;break;case"Bone":a=new a1;break;default:a=new ia}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(a.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.up&&a.up.fromArray(e.up),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.intensity&&(a.shadow.intensity=e.shadow.intensity),void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(a.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.frustumCulled&&(a.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(a.renderOrder=e.renderOrder),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.layers&&(a.layers.mask=e.layers),void 0!==e.children){let s=e.children;for(let e=0;e{if(!0!==uf.has(a))return t&&t(n),i.manager.itemEnd(e),n;r&&r(uf.get(a)),i.manager.itemError(e),i.manager.itemEnd(e)}):(setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0),a);let s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,s.signal="function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;let o=fetch(e,s).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))}).then(function(n){return lO.add("image-bitmap:".concat(e),n),t&&t(n),i.manager.itemEnd(e),n}).catch(function(t){r&&r(t),uf.set(o,t),lO.remove("image-bitmap:".concat(e)),i.manager.itemError(e),i.manager.itemEnd(e)});lO.add("image-bitmap:".concat(e),o),i.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}}class ug{static getContext(){return void 0===r&&(r=new(window.AudioContext||window.webkitAudioContext)),r}static setContext(e){r=e}}class uv extends lz{load(e,t,n,r){let i=this,a=new lV(this.manager);function s(t){r?r(t):console.error(t),i.manager.itemError(e)}a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(e){try{let n=e.slice(0);ug.getContext().decodeAudioData(n,function(e){t(e)}).catch(s)}catch(e){s(e)}},n,r)}constructor(e){super(e)}}let uy=new rH,u_=new rH,ux=new rH;class ub{update(e){let t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){let n,r;t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,ux.copy(e.projectionMatrix);let i=t.eyeSep/2,a=i*t.near/t.focus,s=t.near*Math.tan(nU*t.fov*.5)/t.zoom;u_.elements[12]=-i,uy.elements[12]=i,n=-s*t.aspect+a,r=s*t.aspect+a,ux.elements[0]=2*t.near/(r-n),ux.elements[8]=(r+n)/(r-n),this.cameraL.projectionMatrix.copy(ux),n=-s*t.aspect-a,r=s*t.aspect-a,ux.elements[0]=2*t.near/(r-n),ux.elements[8]=(r+n)/(r-n),this.cameraR.projectionMatrix.copy(ux)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(u_),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(uy)}constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new af,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new af,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}}class uS extends af{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class uM{start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}}let uw=new nX,uE=new nj,uT=new nX,uA=new nX,uC=new nX;class uR extends ia{getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);let t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(uw,uE,uT),uA.set(0,0,-1).applyQuaternion(uE),uC.set(0,1,0).applyQuaternion(uE),t.positionX){let e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(uw.x,e),t.positionY.linearRampToValueAtTime(uw.y,e),t.positionZ.linearRampToValueAtTime(uw.z,e),t.forwardX.linearRampToValueAtTime(uA.x,e),t.forwardY.linearRampToValueAtTime(uA.y,e),t.forwardZ.linearRampToValueAtTime(uA.z,e),t.upX.linearRampToValueAtTime(uC.x,e),t.upY.linearRampToValueAtTime(uC.y,e),t.upZ.linearRampToValueAtTime(uC.z,e)}else t.setPosition(uw.x,uw.y,uw.z),t.setOrientation(uA.x,uA.y,uA.z,uC.x,uC.y,uC.z)}constructor(){super(),this.type="AudioListener",this.context=ug.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new uM}}class uP extends ia{getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this)}stop(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this._progress=0,null!==this.source&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this)}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){s.setValue(n,r);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n;e!==r;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){nj.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){let a=this._workIndex*i;nj.multiplyQuaternionsFlat(e,a,e,t,e,n),nj.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){let a=1-r;for(let s=0;s!==i;++s){let i=t+s;e[i]=e[i]*a+e[n+s]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){let i=t+a;e[i]=e[i]+e[n+a]*r}}constructor(e,t,n){let r,i,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}}let uk="\\[\\]\\.:\\/",uz=RegExp("["+uk+"]","g"),uB="[^"+uk+"]",uH="[^"+uk.replace("\\.","")+"]",uV=/((?:WC+[\/:])*)/.source.replace("WC",uB),uG=/(WCOD+)?/.source.replace("WCOD",uH),uW=RegExp("^"+uV+uG+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uB)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uB)+"$"),uj=["material","materials","bones","map"];class uX{static create(e,t,n){return e&&e.isAnimationObjectGroup?new uX.Composite(e,t,n):new uX(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(uz,"")}static parseTrackName(e){let t=uW.exec(e);if(null===t)throw Error("PropertyBinding: Cannot parse trackName: "+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){let e=n.nodeName.substring(r+1);-1!==uj.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){let n=function(e){for(let r=0;r=i){let a=i++,u=e[a];t[u.uuid]=l,e[l]=u,t[o]=a,e[a]=s;for(let e=0;e!==r;++e){let t=n[e],r=t[a],i=t[l];t[l]=r,t[a]=i}}}this.nCachedObjects_=i}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,a=e.length;for(let s=0,o=arguments.length;s!==o;++s){let o=arguments[s],l=o.uuid,u=t[l];if(void 0!==u)if(delete t[l],u0&&(t[s.uuid]=u),e[u]=s,e.pop();for(let e=0;e!==r;++e){let t=n[e];t[u]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){let n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(void 0!==r)return i[r];let a=this._paths,s=this._parsedPaths,o=this._objects,l=o.length,u=this.nCachedObjects_,c=Array(l);r=i.length,n[e]=r,a.push(e),s.push(t),i.push(c);for(let n=u,r=o.length;n!==r;++n){let r=o[n];c[n]=new uX(r,e,t)}return c}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){let r=this._paths,i=this._parsedPaths,a=this._bindings,s=a.length-1,o=a[s];t[e[s]]=n,a[n]=o,a.pop(),i[n]=i[s],i.pop(),r[n]=r[s],r.pop()}}constructor(){this.isAnimationObjectGroup=!0,this.uuid=nF(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;let e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};let t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}}class uY{play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.fadeOut(t),this.fadeIn(t),!0===n){let n=this._clip.duration,r=e._clip.duration;e.warp(1,r/n,t),this.warp(n/r,1,t)}return this}crossFadeTo(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let r=this._mixer,i=r.time,a=this.timeScale,s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);let o=s.parameterPositions,l=s.sampleValues;return o[0]=i,o[1]=i+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){let e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);let i=this._startTime;if(null!==i){let r=(e-i)*n;r<0||0===n?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);let a=this._updateTime(t),s=this._updateWeight(e);if(s>0){let e=this._interpolants,t=this._propertyBindings;if(this.blendMode===tH)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(s);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(null!==n){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,r=this.time+e,i=this._loopCount,a=n===tN;if(0===e)return -1===i?r:a&&(1&i)==1?t-r:r;if(n===tI){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));s:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break s}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),r>=t||r<0){let n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);let s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){let t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(a&&(1&i)==1)return t-r}return r}_setEndings(e,t,n){let r=this._interpolantSettings;n?(r.endingStart=tk,r.endingEnd=tk):(e?r.endingStart=this.zeroSlopeAtStart?tk:tF:r.endingStart=tz,t?r.endingEnd=this.zeroSlopeAtEnd?tk:tF:r.endingEnd=tz)}_scheduleFading(e,t,n){let r=this._mixer,i=r.time,a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);let s=a.parameterPositions,o=a.sampleValues;return s[0]=i,o[0]=t,s[1]=i+e,o[1]=n,this}constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;let i=t.tracks,a=i.length,s=Array(a),o={endingStart:tF,endingEnd:tF};for(let e=0;e!==a;++e){let t=i[e].createInterpolant(null);s[e]=t,t.settings=o}this._interpolantSettings=o,this._interpolants=s,this._propertyBindings=Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=tL,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}}let uJ=new Float32Array(1);class uZ extends nL{_bindAction(e,t){let n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,s=e._interpolants,o=n.uuid,l=this._bindingsByRootAndName,u=l[o];void 0===u&&(u={},l[o]=u);for(let e=0;e!==i;++e){let i=r[e],l=i.name,c=u[l];if(void 0!==c)++c.referenceCount,a[e]=c;else{if(void 0!==(c=a[e])){null===c._cacheIndex&&(++c.referenceCount,this._addInactiveBinding(c,o,l));continue}let r=t&&t._propertyBindings[e].binding.parsedPath;c=new uF(uX.create(n,l,r),i.ValueTypeName,i.getValueSize()),++c.referenceCount,this._addInactiveBinding(c,o,l),a[e]=c}s[e].resultBuffer=c.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){let t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return null!==t&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1;for(let s=0;s!==n;++s)t[s]._update(r,e,i,a);let s=this._bindings,o=this._nActiveBindings;for(let e=0;e!==o;++e)s[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e1)||void 0===arguments[1]||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return u6(e,this,n,t),n.sort(u5),n}intersectObjects(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let r=0,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,r){let i=this.elements;return i[0]=e,i[2]=t,i[1]=n,i[3]=r,this}constructor(e,t,n,r){ct.prototype.isMatrix2=!0,this.elements=[1,0,0,1],void 0!==e&&this.set(e,t,n,r)}}let cn=new nW;class cr{set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,cn).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}constructor(e=new nW(Infinity,Infinity),t=new nW(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}}let ci=new nX,ca=new nX,cs=new nX,co=new nX,cl=new nX,cu=new nX,cc=new nX;class ch{set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){ci.subVectors(e,this.start),ca.subVectors(this.end,this.start);let n=ca.dot(ca),r=ca.dot(ci)/n;return t&&(r=nk(r,0,1)),r}closestPointToPoint(e,t,n){let r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}distanceSqToLine3(e){let t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cu,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cc,a=1e-8*1e-8,s=this.start,o=e.start,l=this.end,u=e.end;cs.subVectors(l,s),co.subVectors(u,o),cl.subVectors(s,o);let c=cs.dot(cs),h=co.dot(co),d=co.dot(cl);if(c<=a&&h<=a)return r.copy(s),i.copy(o),r.sub(i),r.dot(r);if(c<=a)t=0,n=nk(n=d/h,0,1);else{let e=cs.dot(cl);if(h<=a)n=0,t=nk(-e/c,0,1);else{let r=cs.dot(co),i=c*h-r*r;t=0!==i?nk((r*d-e*h)/i,0,1):0,(n=(r*t+d)/h)<0?(n=0,t=nk(-e/c,0,1)):n>1&&(n=1,t=nk((r-e)/c,0,1))}}return r.copy(s).add(cs.multiplyScalar(t)),i.copy(o).add(co.multiplyScalar(n)),r.sub(i),r.dot(r)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}constructor(e=new nX,t=new nX){this.start=e,this.end=t}}let cd=new nX;class cp extends ia{dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);let e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),cd.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(cd),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";let n=new i0,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1;e<32;e++,t++){let n=e/32*Math.PI*2,i=t/32*Math.PI*2;r.push(Math.cos(n),Math.sin(n),1,Math.cos(i),Math.sin(i),1)}n.setAttribute("position",new iX(r,3));let i=new sN({fog:!1,toneMapped:!1});this.cone=new sj(n,i),this.add(this.cone),this.update()}}let cf=new nX,cm=new rH,cg=new rH;class cv extends sj{updateMatrixWorld(e){let t=this.bones,n=this.geometry,r=n.getAttribute("position");cg.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e1)for(let n=0;n.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{cF.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(cF,t)}}setLength(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.2*e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.2*t;this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}constructor(e=new nX(0,0,1),t=new nX(0,0,0),n=1,r=0xffff00,s=.2*n,o=.2*s){super(),this.type="ArrowHelper",void 0===i&&((i=new i0).setAttribute("position",new iX([0,0,0,0,1,0],3)),(a=new on(.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new sH(i,new sN({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new an(a,new iR({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,s,o)}}class cz extends sj{setColors(e,t,n){let r=new iE,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}constructor(e=1){let t=new i0;t.setAttribute("position",new iX([0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],3)),t.setAttribute("color",new iX([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(t,new sN({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}}class cB{moveTo(e,t){return this.currentPath=new oI,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){let t,n,r,i,a,s=oZ.isClockWise,o=this.subPaths;if(0===o.length)return[];let l=[];if(1===o.length)return n=o[0],(r=new oL).curves=n.curves,l.push(r),l;let u=!s(o[0].getPoints());u=e?!u:u;let c=[],h=[],d=[],p=0;h[0]=void 0,d[p]=[];for(let r=0,a=o.length;r1){let e=!1,t=0;for(let e=0,t=h.length;eNumber.EPSILON){if(l<0&&(n=t[a],o=-o,s=t[i],l=-l),e.ys.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{let t=l*(e.x-n.x)-o*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return r})(a.p,h[r].p)&&(n!==r&&t++,s?(s=!1,c[r].push(a)):e=!0);s&&c[n].push(a)}}t>0&&!1===e&&(d=c)}for(let e=0,t=h.length;et?(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e}static cover(e,t){let n=e.image&&e.image.width?e.image.width/e.image.height:1;return n>t?(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e}static fill(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e}static getByteLength(e,t,n,r){return cV(e,t,n,r)}}function cW(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function cj(e){let t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);let r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))},update:function(n,r){if(n.isInterleavedBufferAttribute&&(n=n.data),n.isGLBufferAttribute){let e=t.get(n);(!e||e.versione.start-t.start);let t=0;for(let e=1;eha,"ShaderChunk",()=>cX,"ShaderLib",()=>cY,"UniformsLib",()=>cq,"WebGLRenderer",()=>d2,"WebGLUtils",()=>dJ],8560);let cX={alphahash_fragment:"#ifdef USE_ALPHAHASH\n if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n const float ALPHA_HASH_SCALE = 0.05;\n float hash2D( vec2 value ) {\n return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n }\n float hash3D( vec3 value ) {\n return hash2D( vec2( hash2D( value.xy ), value.z ) );\n }\n float getAlphaHashThreshold( vec3 position ) {\n float maxDeriv = max(\n length( dFdx( position.xyz ) ),\n length( dFdy( position.xyz ) )\n );\n float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n vec2 pixScales = vec2(\n exp2( floor( log2( pixScale ) ) ),\n exp2( ceil( log2( pixScale ) ) )\n );\n vec2 alpha = vec2(\n hash3D( floor( pixScales.x * position.xyz ) ),\n hash3D( floor( pixScales.y * position.xyz ) )\n );\n float lerpFactor = fract( log2( pixScale ) );\n float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n float a = min( lerpFactor, 1.0 - lerpFactor );\n vec3 cases = vec3(\n x * x / ( 2.0 * a * ( 1.0 - a ) ),\n ( x - 0.5 * a ) / ( 1.0 - a ),\n 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n );\n float threshold = ( x < ( 1.0 - a ) )\n ? ( ( x < a ) ? cases.x : cases.y )\n : cases.z;\n return clamp( threshold , 1.0e-6, 1.0 );\n }\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n #ifdef ALPHA_TO_COVERAGE\n diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n if ( diffuseColor.a < alphaTest ) discard;\n #endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n uniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n #if defined( USE_CLEARCOAT ) \n clearcoatSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_SHEEN ) \n sheenSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n #endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n #if ! defined( GL_ANGLE_multi_draw )\n #define gl_DrawID _gl_DrawID\n uniform int _gl_DrawID;\n #endif\n uniform highp sampler2D batchingTexture;\n uniform highp usampler2D batchingIdTexture;\n mat4 getBatchingMatrix( const in float i ) {\n int size = textureSize( batchingTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n float getIndirectIndex( const in int i ) {\n int size = textureSize( batchingIdTexture, 0 ).x;\n int x = i % size;\n int y = i / size;\n return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n }\n#endif\n#ifdef USE_BATCHING_COLOR\n uniform sampler2D batchingColorTexture;\n vec3 getBatchingColor( const in float i ) {\n int size = textureSize( batchingColorTexture, 0 ).x;\n int j = int( i );\n int x = j % size;\n int y = j / size;\n return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n }\n#endif",batching_vertex:"#ifdef USE_BATCHING\n mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n vPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n return 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( specularColor, 1.0, dotVH );\n float G = G_BlinnPhong_Implicit( );\n float D = D_BlinnPhong( shininess, dotNH );\n return F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n const mat3 XYZ_TO_REC709 = mat3(\n 3.2404542, -0.9692660, 0.0556434,\n -1.5371385, 1.8760108, -0.2040259,\n -0.4985314, 0.0415560, 1.0572252\n );\n vec3 Fresnel0ToIor( vec3 fresnel0 ) {\n vec3 sqrtF0 = sqrt( fresnel0 );\n return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n }\n vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n }\n float IorToFresnel0( float transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n }\n vec3 evalSensitivity( float OPD, vec3 shift ) {\n float phase = 2.0 * PI * OPD * 1.0e-9;\n vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n xyz /= 1.0685e-7;\n vec3 rgb = XYZ_TO_REC709 * xyz;\n return rgb;\n }\n vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n vec3 I;\n float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n float cosTheta2Sq = 1.0 - sinTheta2Sq;\n if ( cosTheta2Sq < 0.0 ) {\n return vec3( 1.0 );\n }\n float cosTheta2 = sqrt( cosTheta2Sq );\n float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n float R12 = F_Schlick( R0, 1.0, cosTheta1 );\n float T121 = 1.0 - R12;\n float phi12 = 0.0;\n if ( iridescenceIOR < outsideIOR ) phi12 = PI;\n float phi21 = PI - phi12;\n vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n vec3 phi23 = vec3( 0.0 );\n if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n vec3 phi = vec3( phi21 ) + phi23;\n vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n vec3 r123 = sqrt( R123 );\n vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n vec3 C0 = R12 + Rs;\n I = C0;\n vec3 Cm = Rs - T121;\n for ( int m = 1; m <= 2; ++ m ) {\n Cm *= r123;\n vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n I += Cm * Sm;\n }\n return max( I, vec3( 0.0 ) );\n }\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n uniform sampler2D bumpMap;\n uniform float bumpScale;\n vec2 dHdxy_fwd() {\n vec2 dSTdx = dFdx( vBumpMapUv );\n vec2 dSTdy = dFdy( vBumpMapUv );\n float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n return vec2( dBx, dBy );\n }\n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n vec3 vN = surf_norm;\n vec3 R1 = cross( vSigmaY, vN );\n vec3 R2 = cross( vN, vSigmaX );\n float fDet = dot( vSigmaX, R1 ) * faceDirection;\n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n return normalize( abs( fDet ) * surf_norm - vGrad );\n }\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n vec4 plane;\n #ifdef ALPHA_TO_COVERAGE\n float distanceToPlane, distanceGradient;\n float clipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n if ( clipOpacity == 0.0 ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n float unionClipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n }\n #pragma unroll_loop_end\n clipOpacity *= 1.0 - unionClipOpacity;\n #endif\n diffuseColor.a *= clipOpacity;\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n #endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#elif defined( USE_COLOR )\n diffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR )\n varying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n varying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n vColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n vColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n vColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n vColor.xyz *= batchingColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n varying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n mat3 tmp;\n tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n return tmp;\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n uv.x += filterInt * 3.0 * cubeUV_minTileSize;\n uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n uv.x *= CUBEUV_TEXEL_WIDTH;\n uv.y *= CUBEUV_TEXEL_HEIGHT;\n #ifdef texture2DGradEXT\n return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n #else\n return texture2D( envMap, uv ).rgb;\n #endif\n }\n #define cubeUV_r0 1.0\n #define cubeUV_m0 - 2.0\n #define cubeUV_r1 0.8\n #define cubeUV_m1 - 1.0\n #define cubeUV_r4 0.4\n #define cubeUV_m4 2.0\n #define cubeUV_r5 0.305\n #define cubeUV_m5 3.0\n #define cubeUV_r6 0.21\n #define cubeUV_m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= cubeUV_r1 ) {\n mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n } else if ( roughness >= cubeUV_r4 ) {\n mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n } else if ( roughness >= cubeUV_r5 ) {\n mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n } else if ( roughness >= cubeUV_r6 ) {\n mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n vec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n mat3 bm = mat3( batchingMatrix );\n transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n transformedNormal = bm * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = bm * transformedTangent;\n #endif\n#endif\n#ifdef USE_INSTANCING\n mat3 im = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n transformedNormal = im * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = im * transformedTangent;\n #endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n #ifdef FLIP_SIDED\n transformedTangent = - transformedTangent;\n #endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n emissiveColor = sRGBTransferEOTF( emissiveColor );\n #endif\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearTransferOETF( in vec4 value ) {\n return value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n #else\n vec4 envColor = vec4( 0.0 );\n #endif\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform float flipEnvMap;\n uniform mat3 envMapRotation;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n \n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n vec3 getIBLIrradiance( const in vec3 normal ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n return PI * envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n return envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n #ifdef USE_ANISOTROPY\n vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 bentNormal = cross( bitangent, viewDir );\n bentNormal = normalize( cross( bentNormal, bitangent ) );\n bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n return getIBLRadiance( viewDir, bentNormal, roughness );\n #else\n return vec3( 0.0 );\n #endif\n }\n #endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif",fog_vertex:"#ifdef USE_FOG\n vFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float vFogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return vec3( texture2D( gradientMap, coord ).r );\n #else\n vec2 fw = fwidth( coord ) * 0.5;\n return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n #endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n vec3 diffuseColor;\n float specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Lambert\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n uniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n return irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if ( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n return smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n light.color = directionalLight.color;\n light.direction = directionalLight.direction;\n light.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = pointLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float lightDistance = length( lVector );\n light.color = pointLight.color;\n light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n }\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = spotLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float angleCos = dot( light.direction, spotLight.direction );\n float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n if ( spotAttenuation > 0.0 ) {\n float lightDistance = length( lVector );\n light.color = spotLight.color * spotAttenuation;\n light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n } else {\n light.color = vec3( 0.0 );\n light.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n float dotNL = dot( normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n }\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n material.ior = ior;\n #ifdef USE_SPECULAR\n float specularIntensityFactor = specularIntensity;\n vec3 specularColorFactor = specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n #endif\n material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n #else\n float specularIntensityFactor = 1.0;\n vec3 specularColorFactor = vec3( 1.0 );\n material.specularF90 = 1.0;\n #endif\n material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n material.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n material.clearcoat = clearcoat;\n material.clearcoatRoughness = clearcoatRoughness;\n material.clearcoatF0 = vec3( 0.04 );\n material.clearcoatF90 = 1.0;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n material.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n material.iridescence = iridescence;\n material.iridescenceIOR = iridescenceIOR;\n #ifdef USE_IRIDESCENCEMAP\n material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n #endif\n #ifdef USE_IRIDESCENCE_THICKNESSMAP\n material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n #else\n material.iridescenceThickness = iridescenceThicknessMaximum;\n #endif\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheenColor;\n #ifdef USE_SHEEN_COLORMAP\n material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n #endif\n material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n #ifdef USE_SHEEN_ROUGHNESSMAP\n material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n #ifdef USE_ANISOTROPYMAP\n mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n #else\n vec2 anisotropyV = anisotropyVector;\n #endif\n material.anisotropy = length( anisotropyV );\n if( material.anisotropy == 0.0 ) {\n anisotropyV = vec2( 1.0, 0.0 );\n } else {\n anisotropyV /= material.anisotropy;\n material.anisotropy = saturate( material.anisotropy );\n }\n material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n vec3 diffuseColor;\n float roughness;\n vec3 specularColor;\n float specularF90;\n float dispersion;\n #ifdef USE_CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n vec3 clearcoatF0;\n float clearcoatF90;\n #endif\n #ifdef USE_IRIDESCENCE\n float iridescence;\n float iridescenceIOR;\n float iridescenceThickness;\n vec3 iridescenceFresnel;\n vec3 iridescenceF0;\n #endif\n #ifdef USE_SHEEN\n vec3 sheenColor;\n float sheenRoughness;\n #endif\n #ifdef IOR\n float ior;\n #endif\n #ifdef USE_TRANSMISSION\n float transmission;\n float transmissionAlpha;\n float thickness;\n float attenuationDistance;\n vec3 attenuationColor;\n #endif\n #ifdef USE_ANISOTROPY\n float anisotropy;\n float alphaT;\n vec3 anisotropyT;\n vec3 anisotropyB;\n #endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n float v = 0.5 / ( gv + gl );\n return saturate(v);\n }\n float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n float a2 = alphaT * alphaB;\n highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n highp float v2 = dot( v, v );\n float w2 = a2 / v2;\n return RECIPROCAL_PI * a2 * pow2 ( w2 );\n }\n#endif\n#ifdef USE_CLEARCOAT\n vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n vec3 f0 = material.clearcoatF0;\n float f90 = material.clearcoatF90;\n float roughness = material.clearcoatRoughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( V * D );\n }\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n vec3 f0 = material.specularColor;\n float f90 = material.specularF90;\n float roughness = material.roughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n #ifdef USE_IRIDESCENCE\n F = mix( F, material.iridescenceFresnel, material.iridescence );\n #endif\n #ifdef USE_ANISOTROPY\n float dotTL = dot( material.anisotropyT, lightDir );\n float dotTV = dot( material.anisotropyT, viewDir );\n float dotTH = dot( material.anisotropyT, halfDir );\n float dotBL = dot( material.anisotropyB, lightDir );\n float dotBV = dot( material.anisotropyB, viewDir );\n float dotBH = dot( material.anisotropyB, halfDir );\n float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n #else\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n #endif\n return F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n float alpha = pow2( roughness );\n float invAlpha = 1.0 / alpha;\n float cos2h = dotNH * dotNH;\n float sin2h = max( 1.0 - cos2h, 0.0078125 );\n return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float D = D_Charlie( sheenRoughness, dotNH );\n float V = V_Neubelt( dotNV, dotNL );\n return sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n float r2 = roughness * roughness;\n float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n return saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n return specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n #ifdef USE_IRIDESCENCE\n vec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n #else\n vec3 Fr = specularColor;\n #endif\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 normal = geometryNormal;\n vec3 viewDir = geometryViewDir;\n vec3 position = geometryPosition;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.roughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n }\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifdef USE_CLEARCOAT\n float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = dotNLcc * directLight.color;\n clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n #endif\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n #ifdef USE_CLEARCOAT\n clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n #endif\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n #ifdef USE_IRIDESCENCE\n computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n #else\n computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n #endif\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n float dotNVi = saturate( dot( normal, geometryViewDir ) );\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n if ( material.iridescence > 0.0 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n #if defined( USE_LIGHT_PROBES )\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n #endif\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n iblIrradiance += getIBLIrradiance( geometryNormal );\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n #ifdef USE_ANISOTROPY\n radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n #else\n radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n #endif\n #ifdef USE_CLEARCOAT\n clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n #endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n vec4 sampledDiffuseColor = texture2D( map, vMapUv );\n #ifdef DECODE_VIDEO_TEXTURE\n sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n #endif\n diffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n uniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n #if defined( USE_POINTS_UV )\n vec2 uv = vUv;\n #else\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n #endif\n#endif\n#ifdef USE_MAP\n diffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n varying vec2 vUv;\n#else\n #if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n #endif\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n metalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n }\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS )\n vColor *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n #if defined( USE_COLOR_ALPHA )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n #elif defined( USE_COLOR )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n #endif\n }\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n #ifndef USE_INSTANCING_MORPH\n uniform float morphTargetBaseInfluence;\n uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n #endif\n uniform sampler2DArray morphTargetsTexture;\n uniform ivec2 morphTargetsTextureSize;\n vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n int y = texelIndex / morphTargetsTextureSize.x;\n int x = texelIndex - y * morphTargetsTextureSize.x;\n ivec3 morphUV = ivec3( x, y, morphTargetIndex );\n return texelFetch( morphTargetsTexture, morphUV, 0 );\n }\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal *= faceDirection;\n #endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n #ifdef USE_TANGENT\n mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn = getTangentFrame( - vViewPosition, normal,\n #if defined( USE_NORMALMAP )\n vNormalMapUv\n #elif defined( USE_CLEARCOAT_NORMALMAP )\n vClearcoatNormalMapUv\n #else\n vUv\n #endif\n );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn[0] *= faceDirection;\n tbn[1] *= faceDirection;\n #endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n #ifdef USE_TANGENT\n mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn2[0] *= faceDirection;\n tbn2[1] *= faceDirection;\n #endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n return mat3( T * scale, B * scale, N );\n }\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n vec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n clearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n uniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n if( v <= 0.0 )\n return vec4( 0., 0., 0., 0. );\n if( v >= 1.0 )\n return vec4( 1., 1., 1., 1. );\n float vuf;\n float af = modf( v * PackFactors.a, vuf );\n float bf = modf( vuf * ShiftRight8, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n if( v <= 0.0 )\n return vec3( 0., 0., 0. );\n if( v >= 1.0 )\n return vec3( 1., 1., 1. );\n float vuf;\n float bf = modf( v * PackFactors.b, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n if( v <= 0.0 )\n return vec2( 0., 0. );\n if( v >= 1.0 )\n return vec2( 1., 1. );\n float vuf;\n float gf = modf( v * 256., vuf );\n return vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n return dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n mvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n roughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n float depth = unpackRGBAToDepth( texture2D( depths, uv ) );\n #ifdef USE_REVERSED_DEPTH_BUFFER\n return step( depth, compare );\n #else\n return step( compare, depth );\n #endif\n }\n vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n return unpackRGBATo2Half( texture2D( shadow, uv ) );\n }\n float VSMShadow( sampler2D shadow, vec2 uv, float compare ) {\n float occlusion = 1.0;\n vec2 distribution = texture2DDistribution( shadow, uv );\n #ifdef USE_REVERSED_DEPTH_BUFFER\n float hard_shadow = step( distribution.x, compare );\n #else\n float hard_shadow = step( compare, distribution.x );\n #endif\n if ( hard_shadow != 1.0 ) {\n float distance = compare - distribution.x;\n float variance = max( 0.00000, distribution.y * distribution.y );\n float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n }\n return occlusion;\n }\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n #if defined( SHADOWMAP_TYPE_PCF )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx0 = - texelSize.x * shadowRadius;\n float dy0 = - texelSize.y * shadowRadius;\n float dx1 = + texelSize.x * shadowRadius;\n float dy1 = + texelSize.y * shadowRadius;\n float dx2 = dx0 / 2.0;\n float dy2 = dy0 / 2.0;\n float dx3 = dx1 / 2.0;\n float dy3 = dy1 / 2.0;\n shadow = (\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n ) * ( 1.0 / 17.0 );\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx = texelSize.x;\n float dy = texelSize.y;\n vec2 uv = shadowCoord.xy;\n vec2 f = fract( uv * shadowMapSize + 0.5 );\n uv -= f * texelSize;\n shadow = (\n texture2DCompare( shadowMap, uv, shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n f.x ),\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n f.x ),\n f.y )\n ) * ( 1.0 / 9.0 );\n #elif defined( SHADOWMAP_TYPE_VSM )\n shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n #else\n shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n vec2 cubeToUV( vec3 v, float texelSizeY ) {\n vec3 absV = abs( v );\n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n absV *= scaleToCube;\n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n vec2 planar = v.xy;\n float almostATexel = 1.5 * texelSizeY;\n float almostOne = 1.0 - almostATexel;\n if ( absV.z >= almostOne ) {\n if ( v.z > 0.0 )\n planar.x = 4.0 - v.x;\n } else if ( absV.x >= almostOne ) {\n float signX = sign( v.x );\n planar.x = v.z * signX + 2.0 * signX;\n } else if ( absV.y >= almostOne ) {\n float signY = sign( v.y );\n planar.x = v.x + 2.0 * signY + 2.0;\n planar.y = v.z * signY - 2.0;\n }\n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n }\n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n float shadow = 1.0;\n vec3 lightToPosition = shadowCoord.xyz;\n \n float lightToPositionLength = length( lightToPosition );\n if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n shadow = (\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n ) * ( 1.0 / 9.0 );\n #else\n shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n vec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n shadowWorldPosition = worldPosition;\n #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n #endif\n vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n uniform highp sampler2D boneTexture;\n mat4 getBoneMatrix( const in float i ) {\n int size = textureSize( boneTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n return saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n vec3( 1.6605, - 0.1246, - 0.0182 ),\n vec3( - 0.5876, 1.1329, - 0.1006 ),\n vec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n vec3( 0.6274, 0.0691, 0.0164 ),\n vec3( 0.3293, 0.9195, 0.0880 ),\n vec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n vec3 x2 = x * x;\n vec3 x4 = x2 * x2;\n return + 15.5 * x4 * x2\n - 40.14 * x4 * x\n + 31.96 * x4\n - 6.868 * x2 * x\n + 0.4298 * x2\n + 0.1191 * x\n - 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n const mat3 AgXInsetMatrix = mat3(\n vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n );\n const mat3 AgXOutsetMatrix = mat3(\n vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n );\n const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;\n color *= toneMappingExposure;\n color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n color = AgXInsetMatrix * color;\n color = max( color, 1e-10 ); color = log2( color );\n color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n color = clamp( color, 0.0, 1.0 );\n color = agxDefaultContrastApprox( color );\n color = AgXOutsetMatrix * color;\n color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n color = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n color = clamp( color, 0.0, 1.0 );\n return color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n const float StartCompression = 0.8 - 0.04;\n const float Desaturation = 0.15;\n color *= toneMappingExposure;\n float x = min( color.r, min( color.g, color.b ) );\n float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n color -= offset;\n float peak = max( color.r, max( color.g, color.b ) );\n if ( peak < StartCompression ) return color;\n float d = 1. - StartCompression;\n float newPeak = 1. - d * d / ( peak + d - StartCompression );\n color *= newPeak / peak;\n float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n return mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n material.transmission = transmission;\n material.transmissionAlpha = 1.0;\n material.thickness = thickness;\n material.attenuationDistance = attenuationDistance;\n material.attenuationColor = attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n #endif\n #ifdef USE_THICKNESSMAP\n material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n #endif\n vec3 pos = vWorldPosition;\n vec3 v = normalize( cameraPosition - pos );\n vec3 n = inverseTransformDirection( normal, viewMatrix );\n vec4 transmitted = getIBLVolumeRefraction(\n n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n material.attenuationColor, material.attenuationDistance );\n material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform float attenuationDistance;\n uniform vec3 attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec3 vWorldPosition;\n float w0( float a ) {\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n }\n float w1( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n }\n float w2( float a ){\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n }\n float w3( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * a );\n }\n float g0( float a ) {\n return w0( a ) + w1( a );\n }\n float g1( float a ) {\n return w2( a ) + w3( a );\n }\n float h0( float a ) {\n return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n }\n float h1( float a ) {\n return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n }\n vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n uv = uv * texelSize.zw + 0.5;\n vec2 iuv = floor( uv );\n vec2 fuv = fract( uv );\n float g0x = g0( fuv.x );\n float g1x = g1( fuv.x );\n float h0x = h0( fuv.x );\n float h1x = h1( fuv.x );\n float h0y = h0( fuv.y );\n float h1y = h1( fuv.y );\n vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n }\n vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n vec2 fLodSizeInv = 1.0 / fLodSize;\n vec2 cLodSizeInv = 1.0 / cLodSize;\n vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n return mix( fSample, cSample, fract( lod ) );\n }\n vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n vec3 modelScale;\n modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n return normalize( refractionVector ) * thickness * modelScale;\n }\n float applyIorToRoughness( const in float roughness, const in float ior ) {\n return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n }\n vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n }\n vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n if ( isinf( attenuationDistance ) ) {\n return vec3( 1.0 );\n } else {\n vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;\n }\n }\n vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n const in vec3 attenuationColor, const in float attenuationDistance ) {\n vec4 transmittedLight;\n vec3 transmittance;\n #ifdef USE_DISPERSION\n float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n for ( int i = 0; i < 3; i ++ ) {\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n transmittedLight[ i ] = transmissionSample[ i ];\n transmittedLight.a += transmissionSample.a;\n transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n }\n transmittedLight.a /= 3.0;\n #else\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n #endif\n vec3 attenuatedColor = transmittance * transmittedLight.rgb;\n vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n }\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n uniform mat3 mapTransform;\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n uniform mat3 alphaMapTransform;\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n uniform mat3 lightMapTransform;\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n uniform mat3 aoMapTransform;\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n uniform mat3 bumpMapTransform;\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n uniform mat3 normalMapTransform;\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n uniform mat3 displacementMapTransform;\n varying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n uniform mat3 emissiveMapTransform;\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n uniform mat3 metalnessMapTransform;\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n uniform mat3 roughnessMapTransform;\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n uniform mat3 anisotropyMapTransform;\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n uniform mat3 clearcoatMapTransform;\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform mat3 clearcoatNormalMapTransform;\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform mat3 clearcoatRoughnessMapTransform;\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n uniform mat3 sheenColorMapTransform;\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n uniform mat3 sheenRoughnessMapTransform;\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n uniform mat3 iridescenceMapTransform;\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform mat3 iridescenceThicknessMapTransform;\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n uniform mat3 specularMapTransform;\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n uniform mat3 specularColorMapTransform;\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n uniform mat3 specularIntensityMapTransform;\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n vUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_BATCHING\n worldPosition = batchingMatrix * worldPosition;\n #endif\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n #ifdef DECODE_VIDEO_TEXTURE\n texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include \n #include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n gl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n uniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n #ifdef ENVMAP_TYPE_CUBE\n vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n #else\n vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include \n #include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n gl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n gl_FragColor = texColor;\n gl_FragColor.a *= opacity;\n #include \n #include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include \n #include \n #include \n #include \n #ifdef USE_DISPLACEMENTMAP\n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n vec4 diffuseColor = vec4( 1.0 );\n #include \n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include \n #include \n #include \n #include \n #include \n #ifdef USE_REVERSED_DEPTH_BUFFER\n float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n #else\n float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n #endif\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #elif DEPTH_PACKING == 3202\n gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n #elif DEPTH_PACKING == 3203\n gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n #endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #ifdef USE_DISPLACEMENTMAP\n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n vec4 diffuseColor = vec4( 1.0 );\n #include \n #include \n #include \n #include \n #include \n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n #include \n #include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vLineDistance = scale * lineDistance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n #include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n #include \n #include \n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include \n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n #include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n #else\n vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n #include \n #include \n #include \n #include \n #include \n #include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n vViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n #include \n #include \n #include \n #include \n gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n #ifdef OPAQUE\n gl_FragColor.a = 1.0;\n #endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n #include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n varying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n #define IOR\n #define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n uniform float specularIntensity;\n uniform vec3 specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n uniform sampler2D specularColorMap;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n uniform sampler2D specularIntensityMap;\n #endif\n#endif\n#ifdef USE_CLEARCOAT\n uniform float clearcoat;\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n uniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n uniform float iridescence;\n uniform float iridescenceIOR;\n uniform float iridescenceThicknessMinimum;\n uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheenColor;\n uniform float sheenRoughness;\n #ifdef USE_SHEEN_COLORMAP\n uniform sampler2D sheenColorMap;\n #endif\n #ifdef USE_SHEEN_ROUGHNESSMAP\n uniform sampler2D sheenRoughnessMap;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n uniform vec2 anisotropyVector;\n #ifdef USE_ANISOTROPYMAP\n uniform sampler2D anisotropyMap;\n #endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include \n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n #ifdef USE_SHEEN\n float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n #endif\n #ifdef USE_CLEARCOAT\n float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n varying vec2 vUv;\n uniform mat3 uvTransform;\n#endif\nvoid main() {\n #ifdef USE_POINTS_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include \n #include \n #include \n #include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n vec3 outgoingLight = vec3( 0.0 );\n #include \n #include \n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n #include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include \n #include \n #include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 mvPosition = modelViewMatrix[ 3 ];\n vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include \n #include \n #include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n vec3 outgoingLight = vec3( 0.0 );\n #include \n #include \n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n}"},cq={common:{diffuse:{value:new iE(0xffffff)},opacity:{value:1},map:{value:null},mapTransform:{value:new nJ},alphaMap:{value:null},alphaMapTransform:{value:new nJ},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new nJ}},envmap:{envMap:{value:null},envMapRotation:{value:new nJ},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new nJ}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new nJ}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new nJ},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new nJ},normalScale:{value:new nW(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new nJ},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new nJ}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new nJ}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new nJ}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new iE(0xffffff)}},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 iE(0xffffff)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new nJ},alphaTest:{value:0},uvTransform:{value:new nJ}},sprite:{diffuse:{value:new iE(0xffffff)},opacity:{value:1},center:{value:new nW(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new nJ},alphaMap:{value:null},alphaMapTransform:{value:new nJ},alphaTest:{value:0}}},cY={basic:{uniforms:as([cq.common,cq.specularmap,cq.envmap,cq.aomap,cq.lightmap,cq.fog]),vertexShader:cX.meshbasic_vert,fragmentShader:cX.meshbasic_frag},lambert:{uniforms:as([cq.common,cq.specularmap,cq.envmap,cq.aomap,cq.lightmap,cq.emissivemap,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.fog,cq.lights,{emissive:{value:new iE(0)}}]),vertexShader:cX.meshlambert_vert,fragmentShader:cX.meshlambert_frag},phong:{uniforms:as([cq.common,cq.specularmap,cq.envmap,cq.aomap,cq.lightmap,cq.emissivemap,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.fog,cq.lights,{emissive:{value:new iE(0)},specular:{value:new iE(1118481)},shininess:{value:30}}]),vertexShader:cX.meshphong_vert,fragmentShader:cX.meshphong_frag},standard:{uniforms:as([cq.common,cq.envmap,cq.aomap,cq.lightmap,cq.emissivemap,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.roughnessmap,cq.metalnessmap,cq.fog,cq.lights,{emissive:{value:new iE(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:cX.meshphysical_vert,fragmentShader:cX.meshphysical_frag},toon:{uniforms:as([cq.common,cq.aomap,cq.lightmap,cq.emissivemap,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.gradientmap,cq.fog,cq.lights,{emissive:{value:new iE(0)}}]),vertexShader:cX.meshtoon_vert,fragmentShader:cX.meshtoon_frag},matcap:{uniforms:as([cq.common,cq.bumpmap,cq.normalmap,cq.displacementmap,cq.fog,{matcap:{value:null}}]),vertexShader:cX.meshmatcap_vert,fragmentShader:cX.meshmatcap_frag},points:{uniforms:as([cq.points,cq.fog]),vertexShader:cX.points_vert,fragmentShader:cX.points_frag},dashed:{uniforms:as([cq.common,cq.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:cX.linedashed_vert,fragmentShader:cX.linedashed_frag},depth:{uniforms:as([cq.common,cq.displacementmap]),vertexShader:cX.depth_vert,fragmentShader:cX.depth_frag},normal:{uniforms:as([cq.common,cq.bumpmap,cq.normalmap,cq.displacementmap,{opacity:{value:1}}]),vertexShader:cX.meshnormal_vert,fragmentShader:cX.meshnormal_frag},sprite:{uniforms:as([cq.sprite,cq.fog]),vertexShader:cX.sprite_vert,fragmentShader:cX.sprite_frag},background:{uniforms:{uvTransform:{value:new nJ},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:cX.background_vert,fragmentShader:cX.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new nJ}},vertexShader:cX.backgroundCube_vert,fragmentShader:cX.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:cX.cube_vert,fragmentShader:cX.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:cX.equirect_vert,fragmentShader:cX.equirect_frag},distanceRGBA:{uniforms:as([cq.common,cq.displacementmap,{referencePosition:{value:new nX},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:cX.distanceRGBA_vert,fragmentShader:cX.distanceRGBA_frag},shadow:{uniforms:as([cq.lights,cq.fog,{color:{value:new iE(0)},opacity:{value:1}}]),vertexShader:cX.shadow_vert,fragmentShader:cX.shadow_frag}};cY.physical={uniforms:as([cY.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new nJ},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new nJ},clearcoatNormalScale:{value:new nW(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new nJ},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new nJ},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new nJ},sheen:{value:0},sheenColor:{value:new iE(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new nJ},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new nJ},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new nJ},transmissionSamplerSize:{value:new nW},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new nJ},attenuationDistance:{value:0},attenuationColor:{value:new iE(0)},specularColor:{value:new iE(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new nJ},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new nJ},anisotropyVector:{value:new nW},anisotropyMap:{value:null},anisotropyMapTransform:{value:new nJ}}]),vertexShader:cX.meshphysical_vert,fragmentShader:cX.meshphysical_frag};let cJ={r:0,b:0,g:0},cZ=new rK,cK=new rH;function c$(e,t,n,r,i,a,s){let o,l,u=new iE(0),c=+(!0!==a),h=null,d=0,p=null;function f(e){let r=!0===e.isScene?e.background:null;return r&&r.isTexture&&(r=(e.backgroundBlurriness>0?n:t).get(r)),r}function m(t,n){t.getRGB(cJ,ao(e)),r.buffers.color.setClear(cJ.r,cJ.g,cJ.b,n,s)}return{getClearColor:function(){return u},setClearColor:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;u.set(e),m(u,c=t)},getClearAlpha:function(){return c},setClearAlpha:function(e){m(u,c=e)},render:function(t){let n=!1,i=f(t);null===i?m(u,c):i&&i.isColor&&(m(i,1),n=!0);let a=e.xr.getEnvironmentBlendMode();"additive"===a?r.buffers.color.setClear(0,0,0,1,s):"alpha-blend"===a&&r.buffers.color.setClear(0,0,0,0,s),(e.autoClear||n)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))},addToRenderList:function(t,n){let r=f(n);r&&(r.isCubeTexture||r.mapping===eE)?(void 0===l&&((l=new an(new ai(1,1,1),new au({name:"BackgroundCubeMaterial",uniforms:aa(cY.backgroundCube.uniforms),vertexShader:cY.backgroundCube.vertexShader,fragmentShader:cY.backgroundCube.fragmentShader,side:E,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),cZ.copy(n.backgroundRotation),cZ.x*=-1,cZ.y*=-1,cZ.z*=-1,r.isCubeTexture&&!1===r.isRenderTargetTexture&&(cZ.y*=-1,cZ.z*=-1),l.material.uniforms.envMap.value=r,l.material.uniforms.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,l.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(cK.makeRotationFromEuler(cZ)),l.material.toneMapped=n8.getTransfer(r.colorSpace)!==t1,(h!==r||d!==r.version||p!==e.toneMapping)&&(l.material.needsUpdate=!0,h=r,d=r.version,p=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null)):r&&r.isTexture&&(void 0===o&&((o=new an(new o4(2,2),new au({name:"BackgroundMaterial",uniforms:aa(cY.background.uniforms),vertexShader:cY.background.vertexShader,fragmentShader:cY.background.fragmentShader,side:w,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(o)),o.material.uniforms.t2D.value=r,o.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,o.material.toneMapped=n8.getTransfer(r.colorSpace)!==t1,!0===r.matrixAutoUpdate&&r.updateMatrix(),o.material.uniforms.uvTransform.value.copy(r.matrix),(h!==r||d!==r.version||p!==e.toneMapping)&&(o.material.needsUpdate=!0,h=r,d=r.version,p=e.toneMapping),o.layers.enableAll(),t.unshift(o,o.geometry,o.material,0,0,null))},dispose:function(){void 0!==l&&(l.geometry.dispose(),l.material.dispose(),l=void 0),void 0!==o&&(o.geometry.dispose(),o.material.dispose(),o=void 0)}}}function cQ(e,t){let n=e.getParameter(e.MAX_VERTEX_ATTRIBS),r={},i=u(null),a=i,s=!1;function o(t){return e.bindVertexArray(t)}function l(t){return e.deleteVertexArray(t)}function u(e){let t=[],r=[],i=[];for(let e=0;e=0){let n=i[t],r=s[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n||n.attribute!==r||r&&n.data!==r.data)return!0;o++}return a.attributesNum!==o||a.index!==r}(n,m,l,g))&&function(e,t,n,r){let i={},s=t.attributes,o=0,l=n.getAttributes();for(let t in l)if(l[t].location>=0){let n=s[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));let r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,o++}a.attributes=i,a.attributesNum=o,a.index=r}(n,m,l,g),null!==g&&t.update(g,e.ELEMENT_ARRAY_BUFFER),(v||s)&&(s=!1,function(n,r,i,a){c();let s=a.attributes,o=i.getAttributes(),l=r.defaultAttributeValues;for(let r in o){let i=o[r];if(i.location>=0){let o=s[r];if(void 0===o&&("instanceMatrix"===r&&n.instanceMatrix&&(o=n.instanceMatrix),"instanceColor"===r&&n.instanceColor&&(o=n.instanceColor)),void 0!==o){let r=o.normalized,s=o.itemSize,l=t.get(o);if(void 0===l)continue;let u=l.buffer,c=l.type,p=l.bytesPerElement,m=c===e.INT||c===e.UNSIGNED_INT||o.gpuType===eG;if(o.isInterleavedBufferAttribute){let t=o.data,l=t.stride,g=o.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let s=void 0!==n.precision?n.precision:"highp",o=a(s);o!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",o,"instead."),s=o);let l=!0===n.logarithmicDepthBuffer,u=!0===n.reversedDepthBuffer&&t.has("EXT_clip_control"),c=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS);return{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has("EXT_texture_filter_anisotropic")){let n=t.get("EXT_texture_filter_anisotropic");i=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:a,textureFormatReadable:function(t){return t===e0||r.convert(t)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(n){let i=n===eX&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return n===ez||r.convert(n)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)||n===ej||!!i},precision:s,logarithmicDepthBuffer:l,reversedDepthBuffer:u,maxTextures:c,maxVertexTextures:h,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:h>0,maxSamples:e.getParameter(e.MAX_SAMPLES)}}function c2(e){let t=this,n=null,r=0,i=!1,a=!1,s=new sl,o=new nJ,l={value:null,needsUpdate:!1};function u(e,n,r,i){let a=null!==e?e.length:0,u=null;if(0!==a){if(u=l.value,!0!==i||null===u){let t=r+4*a,i=n.matrixWorldInverse;o.getNormalMatrix(i),(null===u||u.length0),t.numPlanes=r,t.numIntersection=0)}}function c3(e){let t=new WeakMap;function n(e,t){return t===eM?e.mapping=eb:t===ew&&(e.mapping=eS),e}function r(e){let n=e.target;n.removeEventListener("dispose",r);let i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){let a=i.mapping;if(a===eM||a===ew)if(t.has(i))return n(t.get(i).texture,i.mapping);else{let a=i.image;if(!a||!(a.height>0))return null;{let s=new av(a.height);return s.fromEquirectangularTexture(e,i),t.set(i,s),i.addEventListener("dispose",r),n(s.texture,i.mapping)}}}return i},dispose:function(){t=new WeakMap}}}let c4=[.125,.215,.35,.446,.526,.582],c5=new l7,c6=new iE,c8=null,c9=0,c7=0,he=!1,ht=(1+Math.sqrt(5))/2,hn=1/ht,hr=[new nX(-ht,hn,0),new nX(ht,hn,0),new nX(-hn,0,ht),new nX(hn,0,ht),new nX(0,ht,-hn),new nX(0,ht,hn),new nX(-1,1,-1),new nX(1,1,-1),new nX(-1,1,1),new nX(1,1,1)],hi=new nX;class ha{fromScene(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},{size:a=256,position:s=hi}=i;c8=this._renderer.getRenderTarget(),c9=this._renderer.getActiveCubeFace(),c7=this._renderer.getActiveMipmapLevel(),he=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,n,r,o,s),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this._fromTexture(e,t)}fromCubemap(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=hu(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=hl(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?o=c4[s-e+4-1]:0===s&&(o=0),r.push(o);let l=1/(a-2),u=-l,c=1+l,h=[u,u,c,u,c,c,u,u,c,c,u,c],d=new Float32Array(108),p=new Float32Array(72),f=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];d.set(r,18*e),p.set(h,12*e);let i=[e,e,e,e,e,e];f.set(i,6*e)}let m=new i0;m.setAttribute("position",new iF(d,3)),m.setAttribute("uv",new iF(p,2)),m.setAttribute("faceIndex",new iF(f,1)),t.push(m),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){let r=new Float32Array(20),i=new nX(0,1,0);return new au({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:"".concat(e,".0")},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:hc(),fragmentShader:"\n\n precision mediump float;\n precision mediump int;\n\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n uniform int samples;\n uniform float weights[ n ];\n uniform bool latitudinal;\n uniform float dTheta;\n uniform float mipInt;\n uniform vec3 poleAxis;\n\n #define ENVMAP_TYPE_CUBE_UV\n #include \n\n vec3 getSample( float theta, vec3 axis ) {\n\n float cosTheta = cos( theta );\n // Rodrigues' axis-angle rotation\n vec3 sampleDirection = vOutputDirection * cosTheta\n + cross( axis, vOutputDirection ) * sin( theta )\n + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n return bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n }\n\n void main() {\n\n vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n if ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n }\n\n axis = normalize( axis );\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n for ( int i = 1; i < n; i++ ) {\n\n if ( i >= samples ) {\n\n break;\n\n }\n\n float theta = dTheta * float( i );\n gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n }\n\n }\n ",blending:A,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){let t=new an(this._lodPlanes[0],e);this._renderer.compile(t,c5)}_sceneToCubeUV(e,t,n,r,i){let a=new af(90,1,t,n),s=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],l=this._renderer,u=l.autoClear,c=l.toneMapping;l.getClearColor(c6),l.toneMapping=ec,l.autoClear=!1,l.state.buffers.depth.getReversed()&&(l.setRenderTarget(r),l.clearDepth(),l.setRenderTarget(null));let h=new iR({name:"PMREM.Background",side:E,depthWrite:!1,depthTest:!1}),d=new an(new ai,h),p=!1,f=e.background;f?f.isColor&&(h.color.copy(f),e.background=null,p=!0):(h.color.copy(c6),p=!0);for(let t=0;t<6;t++){let n=t%3;0===n?(a.up.set(0,s[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x+o[t],i.y,i.z)):1===n?(a.up.set(0,0,s[t]),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y+o[t],i.z)):(a.up.set(0,s[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y,i.z+o[t]));let u=this._cubeSize;ho(r,n*u,t>2?u:0,u,u),l.setRenderTarget(r),p&&l.render(d,a),l.render(e,a)}d.geometry.dispose(),d.material.dispose(),l.toneMapping=c,l.autoClear=u,e.background=f}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===eb||e.mapping===eS;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=hu()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=hl());let i=r?this._cubemapMaterial:this._equirectMaterial,a=new an(this._lodPlanes[0],i);i.uniforms.envMap.value=e;let s=this._cubeSize;ho(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,c5)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let r=this._lodPlanes.length;for(let t=1;t20&&console.warn("sigmaRadians, ".concat(i,", is too large and will clip, as it requested ").concat(f," samples when the maximum is set to ").concat(20));let m=[],g=0;for(let e=0;e<20;++e){let t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:ev-4?r-v+4:0),_,3*y,2*y),o.setRenderTarget(t),o.render(u,c5)}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)}}function hs(e,t,n){let r=new ru(e,t,n);return r.texture.mapping=eE,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function ho(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function hl(){return new au({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:hc(),fragmentShader:"\n\n precision mediump float;\n precision mediump int;\n\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n\n #include \n\n void main() {\n\n vec3 outputDirection = normalize( vOutputDirection );\n vec2 uv = equirectUv( outputDirection );\n\n gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n }\n ",blending:A,depthTest:!1,depthWrite:!1})}function hu(){return new au({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:hc(),fragmentShader:"\n\n precision mediump float;\n precision mediump int;\n\n uniform float flipEnvMap;\n\n varying vec3 vOutputDirection;\n\n uniform samplerCube envMap;\n\n void main() {\n\n gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n }\n ",blending:A,depthTest:!1,depthWrite:!1})}function hc(){return"\n\n precision mediump float;\n precision mediump int;\n\n attribute float faceIndex;\n\n varying vec3 vOutputDirection;\n\n // RH coordinate system; PMREM face-indexing convention\n vec3 getDirection( vec2 uv, float face ) {\n\n uv = 2.0 * uv - 1.0;\n\n vec3 direction = vec3( uv, 1.0 );\n\n if ( face == 0.0 ) {\n\n direction = direction.zyx; // ( 1, v, u ) pos x\n\n } else if ( face == 1.0 ) {\n\n direction = direction.xzy;\n direction.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n } else if ( face == 2.0 ) {\n\n direction.x *= -1.0; // ( -u, v, 1 ) pos z\n\n } else if ( face == 3.0 ) {\n\n direction = direction.zyx;\n direction.xz *= -1.0; // ( -1, v, -u ) neg x\n\n } else if ( face == 4.0 ) {\n\n direction = direction.xzy;\n direction.xy *= -1.0; // ( -u, -1, v ) neg y\n\n } else if ( face == 5.0 ) {\n\n direction.z *= -1.0; // ( u, v, -1 ) neg z\n\n }\n\n return direction;\n\n }\n\n void main() {\n\n vOutputDirection = getDirection( uv, faceIndex );\n gl_Position = vec4( position, 1.0 );\n\n }\n "}function hh(e){let t=new WeakMap,n=null;function r(e){let n=e.target;n.removeEventListener("dispose",r);let i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){let a=i.mapping,s=a===eM||a===ew,o=a===eb||a===eS;if(s||o){let a=t.get(i),l=void 0!==a?a.texture.pmremVersion:0;if(i.isRenderTargetTexture&&i.pmremVersion!==l)return null===n&&(n=new ha(e)),(a=s?n.fromEquirectangular(i,a):n.fromCubemap(i,a)).texture.pmremVersion=i.pmremVersion,t.set(i,a),a.texture;{if(void 0!==a)return a.texture;let l=i.image;return s&&l&&l.height>0||o&&l&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(l)?(null===n&&(n=new ha(e)),(a=s?n.fromEquirectangular(i):n.fromCubemap(i)).texture.pmremVersion=i.pmremVersion,t.set(i,a),i.addEventListener("dispose",r),a.texture):null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function hd(e){let t={};function n(n){let r;if(void 0!==t[n])return t[n];switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(e){let t=n(e);return null===t&&n3("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function hp(e,t,n,r){let i={},a=new WeakMap;function s(e){let o=e.target;for(let e in null!==o.index&&t.remove(o.index),o.attributes)t.remove(o.attributes[e]);o.removeEventListener("dispose",s),delete i[o.id];let l=a.get(o);l&&(t.remove(l),a.delete(o)),r.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,n.memory.geometries--}function o(e){let n=[],r=e.index,i=e.attributes.position,s=0;if(null!==r){let e=r.array;s=r.version;for(let t=0,r=e.length;tt.maxTextureSize&&(f=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let m=new Float32Array(p*f*4*c),g=new rc(m,p,f,c);g.type=ej,g.needsUpdate=!0;let v=4*d;for(let t=0;t0)return e;let i=t*n,a=hM[i];if(void 0===a&&(a=new Float32Array(i),hM[i]=a),0!==t){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function hR(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n":" "," ").concat(i,": ").concat(n[e]))}return r.join("\n")}(e.getShaderSource(t),r)}}let dv=new nX;function dy(e){return""!==e}function d_(e,t){let n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function dx(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}let db=/^[ \t]*#include +<([\w\d./]+)>/gm;function dS(e){return e.replace(db,dw)}let dM=new Map;function dw(e,t){let n=cX[t];if(void 0===n){let e=dM.get(t);if(void 0!==e)n=cX[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e);else throw Error("Can not resolve #include <"+t+">")}return dS(n)}let dE=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function dT(e){return e.replace(dE,dA)}function dA(e,t,n,r){let i="";for(let e=parseInt(t);e0&&(i+="\n"),(a=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x].filter(dy).join("\n")).length>0&&(a+="\n")):(i=[dC(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+g:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+f:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif","\n"].filter(dy).join("\n"),a=[dC(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,x,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+m:"",n.envMap?"#define "+g:"",n.envMap?"#define "+v:"",y?"#define CUBEUV_TEXEL_WIDTH "+y.texelWidth:"",y?"#define CUBEUV_TEXEL_HEIGHT "+y.texelHeight:"",y?"#define CUBEUV_MAX_MIP "+y.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+f:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ec?"#define TONE_MAPPING":"",n.toneMapping!==ec?cX.tonemapping_pars_fragment:"",n.toneMapping!==ec?function(e,t){let n;switch(t){case eh:n="Linear";break;case ed:n="Reinhard";break;case ep:n="Cineon";break;case ef:n="ACESFilmic";break;case eg:n="AgX";break;case ev:n="Neutral";break;case em:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",cX.colorspace_pars_fragment,function(e,t){let n=function(e){n8._getMatrix(dm,n8.workingColorSpace,e);let t="mat3( ".concat(dm.elements.map(e=>e.toFixed(4))," )");switch(n8.getTransfer(e)){case t0:return[t,"LinearTransferOETF"];case t1:return[t,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",e),[t,"LinearTransferOETF"]}}(t);return["vec4 ".concat(e,"( vec4 value ) {")," return ".concat(n[1],"( vec4( value.rgb * ").concat(n[0],", value.a ) );"),"}"].join("\n")}("linearToOutputTexel",n.outputColorSpace),function(){n8.getLuminanceCoefficients(dv);let e=dv.x.toFixed(4),t=dv.y.toFixed(4),n=dv.z.toFixed(4);return["float luminance( const in vec3 rgb ) {"," const vec3 weights = vec3( ".concat(e,", ").concat(t,", ").concat(n," );")," return dot( weights, rgb );\n}"].join("\n")}(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(dy).join("\n")),d=dx(d=d_(d=dS(d),n),n),p=dx(p=d_(p=dS(p),n),n),d=dT(d),p=dT(p),!0!==n.isRawShaderMaterial&&(E="#version 300 es\n",i=[_,"#define attribute in\n#define varying out\n#define texture2D texture"].join("\n")+"\n"+i,a=["#define varying in",n.glslVersion===nT?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===nT?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+a);let T=E+i+d,A=E+a+p,C=dp(c,c.VERTEX_SHADER,T),R=dp(c,c.FRAGMENT_SHADER,A);function P(t){if(e.debug.checkShaderErrors){let n=c.getProgramInfoLog(w)||"",r=c.getShaderInfoLog(C)||"",s=c.getShaderInfoLog(R)||"",o=n.trim(),l=r.trim(),u=s.trim(),h=!0,d=!0;if(!1===c.getProgramParameter(w,c.LINK_STATUS))if(h=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(c,w,C,R);else{let e=dg(c,C,"vertex"),n=dg(c,R,"fragment");console.error("THREE.WebGLProgram: Shader Error "+c.getError()+" - VALIDATE_STATUS "+c.getProgramParameter(w,c.VALIDATE_STATUS)+"\n\nMaterial Name: "+t.name+"\nMaterial Type: "+t.type+"\n\nProgram Info Log: "+o+"\n"+e+"\n"+n)}else""!==o?console.warn("THREE.WebGLProgram: Program Info Log:",o):(""===l||""===u)&&(d=!1);d&&(t.diagnostics={runnable:h,programLog:o,vertexShader:{log:l,prefix:i},fragmentShader:{log:u,prefix:a}})}c.deleteShader(C),c.deleteShader(R),s=new dd(c,w),o=function(e,t){let n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i0,Z=a.clearcoat>0,K=a.dispersion>0,$=a.iridescence>0,Q=a.sheen>0,ee=a.transmission>0,et=J&&!!a.anisotropyMap,en=Z&&!!a.clearcoatMap,er=Z&&!!a.clearcoatNormalMap,ei=Z&&!!a.clearcoatRoughnessMap,ea=$&&!!a.iridescenceMap,es=$&&!!a.iridescenceThicknessMap,eo=Q&&!!a.sheenColorMap,el=Q&&!!a.sheenRoughnessMap,eu=!!a.specularMap,eh=!!a.specularColorMap,ed=!!a.specularIntensityMap,ep=ee&&!!a.transmissionMap,ef=ee&&!!a.thicknessMap,em=!!a.gradientMap,eg=!!a.alphaMap,ev=a.alphaTest>0,ey=!!a.alphaHash,e_=!!a.extensions,ex=ec;a.toneMapped&&(null===D||!0===D.isXRRenderTarget)&&(ex=e.toneMapping);let eb={shaderID:P,shaderType:a.type,shaderName:a.name,vertexShader:y,fragmentShader:_,defines:a.defines,customVertexShaderID:x,customFragmentShaderID:b,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:p,batching:F,batchingColor:F&&null!==v._colorsTexture,instancing:O,instancingColor:O&&null!==v.instanceColor,instancingMorph:O&&null!==v.morphTexture,supportsVertexTextures:d,outputColorSpace:null===D?e.outputColorSpace:!0===D.isXRRenderTarget?D.texture.colorSpace:tQ,alphaToCoverage:!!a.alphaToCoverage,map:k,matcap:z,envMap:B,envMapMode:B&&A.mapping,envMapCubeUVHeight:R,aoMap:H,lightMap:V,bumpMap:G,normalMap:W,displacementMap:d&&j,emissiveMap:X,normalMapObjectSpace:W&&a.normalMapType===tZ,normalMapTangentSpace:W&&a.normalMapType===tJ,metalnessMap:q,roughnessMap:Y,anisotropy:J,anisotropyMap:et,clearcoat:Z,clearcoatMap:en,clearcoatNormalMap:er,clearcoatRoughnessMap:ei,dispersion:K,iridescence:$,iridescenceMap:ea,iridescenceThicknessMap:es,sheen:Q,sheenColorMap:eo,sheenRoughnessMap:el,specularMap:eu,specularColorMap:eh,specularIntensityMap:ed,transmission:ee,transmissionMap:ep,thicknessMap:ef,gradientMap:em,opaque:!1===a.transparent&&a.blending===C&&!1===a.alphaToCoverage,alphaMap:eg,alphaTest:ev,alphaHash:ey,combine:a.combine,mapUv:k&&m(a.map.channel),aoMapUv:H&&m(a.aoMap.channel),lightMapUv:V&&m(a.lightMap.channel),bumpMapUv:G&&m(a.bumpMap.channel),normalMapUv:W&&m(a.normalMap.channel),displacementMapUv:j&&m(a.displacementMap.channel),emissiveMapUv:X&&m(a.emissiveMap.channel),metalnessMapUv:q&&m(a.metalnessMap.channel),roughnessMapUv:Y&&m(a.roughnessMap.channel),anisotropyMapUv:et&&m(a.anisotropyMap.channel),clearcoatMapUv:en&&m(a.clearcoatMap.channel),clearcoatNormalMapUv:er&&m(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ei&&m(a.clearcoatRoughnessMap.channel),iridescenceMapUv:ea&&m(a.iridescenceMap.channel),iridescenceThicknessMapUv:es&&m(a.iridescenceThicknessMap.channel),sheenColorMapUv:eo&&m(a.sheenColorMap.channel),sheenRoughnessMapUv:el&&m(a.sheenRoughnessMap.channel),specularMapUv:eu&&m(a.specularMap.channel),specularColorMapUv:eh&&m(a.specularColorMap.channel),specularIntensityMapUv:ed&&m(a.specularIntensityMap.channel),transmissionMapUv:ep&&m(a.transmissionMap.channel),thicknessMapUv:ef&&m(a.thicknessMap.channel),alphaMapUv:eg&&m(a.alphaMap.channel),vertexTangents:!!M.attributes.tangent&&(W||J),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!M.attributes.color&&4===M.attributes.color.itemSize,pointsUvs:!0===v.isPoints&&!!M.attributes.uv&&(k||eg),fog:!!S,useFog:!0===a.fog,fogExp2:!!S&&S.isFogExp2,flatShading:!0===a.flatShading&&!1===a.wireframe,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:h,reversedDepthBuffer:U,skinning:!0===v.isSkinnedMesh,morphTargets:void 0!==M.morphAttributes.position,morphNormals:void 0!==M.morphAttributes.normal,morphColors:void 0!==M.morphAttributes.color,morphTargetsCount:L,morphTextureStride:N,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:ex,decodeVideoTexture:k&&!0===a.map.isVideoTexture&&n8.getTransfer(a.map.colorSpace)===t1,decodeVideoTextureEmissive:X&&!0===a.emissiveMap.isVideoTexture&&n8.getTransfer(a.emissiveMap.colorSpace)===t1,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===T,flipSided:a.side===E,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionClipCullDistance:e_&&!0===a.extensions.clipCullDistance&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(e_&&!0===a.extensions.multiDraw||F)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:a.customProgramCacheKey()};return eb.vertexUv1s=u.has(1),eb.vertexUv2s=u.has(2),eb.vertexUv3s=u.has(3),u.clear(),eb},getProgramCacheKey:function(t){var n,r,i,a;let s=[];if(t.shaderID?s.push(t.shaderID):(s.push(t.customVertexShaderID),s.push(t.customFragmentShaderID)),void 0!==t.defines)for(let e in t.defines)s.push(e),s.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(n=s,r=t,n.push(r.precision),n.push(r.outputColorSpace),n.push(r.envMapMode),n.push(r.envMapCubeUVHeight),n.push(r.mapUv),n.push(r.alphaMapUv),n.push(r.lightMapUv),n.push(r.aoMapUv),n.push(r.bumpMapUv),n.push(r.normalMapUv),n.push(r.displacementMapUv),n.push(r.emissiveMapUv),n.push(r.metalnessMapUv),n.push(r.roughnessMapUv),n.push(r.anisotropyMapUv),n.push(r.clearcoatMapUv),n.push(r.clearcoatNormalMapUv),n.push(r.clearcoatRoughnessMapUv),n.push(r.iridescenceMapUv),n.push(r.iridescenceThicknessMapUv),n.push(r.sheenColorMapUv),n.push(r.sheenRoughnessMapUv),n.push(r.specularMapUv),n.push(r.specularColorMapUv),n.push(r.specularIntensityMapUv),n.push(r.transmissionMapUv),n.push(r.thicknessMapUv),n.push(r.combine),n.push(r.fogExp2),n.push(r.sizeAttenuation),n.push(r.morphTargetsCount),n.push(r.morphAttributeCount),n.push(r.numDirLights),n.push(r.numPointLights),n.push(r.numSpotLights),n.push(r.numSpotLightMaps),n.push(r.numHemiLights),n.push(r.numRectAreaLights),n.push(r.numDirLightShadows),n.push(r.numPointLightShadows),n.push(r.numSpotLightShadows),n.push(r.numSpotLightShadowsWithMaps),n.push(r.numLightProbes),n.push(r.shadowMapType),n.push(r.toneMapping),n.push(r.numClippingPlanes),n.push(r.numClipIntersection),n.push(r.depthPacking),i=s,a=t,o.disableAll(),a.supportsVertexTextures&&o.enable(0),a.instancing&&o.enable(1),a.instancingColor&&o.enable(2),a.instancingMorph&&o.enable(3),a.matcap&&o.enable(4),a.envMap&&o.enable(5),a.normalMapObjectSpace&&o.enable(6),a.normalMapTangentSpace&&o.enable(7),a.clearcoat&&o.enable(8),a.iridescence&&o.enable(9),a.alphaTest&&o.enable(10),a.vertexColors&&o.enable(11),a.vertexAlphas&&o.enable(12),a.vertexUv1s&&o.enable(13),a.vertexUv2s&&o.enable(14),a.vertexUv3s&&o.enable(15),a.vertexTangents&&o.enable(16),a.anisotropy&&o.enable(17),a.alphaHash&&o.enable(18),a.batching&&o.enable(19),a.dispersion&&o.enable(20),a.batchingColor&&o.enable(21),a.gradientMap&&o.enable(22),i.push(o.mask),o.disableAll(),a.fog&&o.enable(0),a.useFog&&o.enable(1),a.flatShading&&o.enable(2),a.logarithmicDepthBuffer&&o.enable(3),a.reversedDepthBuffer&&o.enable(4),a.skinning&&o.enable(5),a.morphTargets&&o.enable(6),a.morphNormals&&o.enable(7),a.morphColors&&o.enable(8),a.premultipliedAlpha&&o.enable(9),a.shadowMapEnabled&&o.enable(10),a.doubleSided&&o.enable(11),a.flipSided&&o.enable(12),a.useDepthPacking&&o.enable(13),a.dithering&&o.enable(14),a.transmission&&o.enable(15),a.sheen&&o.enable(16),a.opaque&&o.enable(17),a.pointsUvs&&o.enable(18),a.decodeVideoTexture&&o.enable(19),a.decodeVideoTextureEmissive&&o.enable(20),a.alphaToCoverage&&o.enable(21),i.push(o.mask),s.push(e.outputColorSpace)),s.push(t.customProgramCacheKey),s.join()},getUniforms:function(e){let t,n=f[e.type];if(n){let e=cY[n];t=al.clone(e.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,n){let r;for(let e=0,t=c.length;e0?r.push(c):!0===s.transparent?i.push(c):n.push(c)},unshift:function(e,t,s,o,l,u){let c=a(e,t,s,o,l,u);s.transmission>0?r.unshift(c):!0===s.transparent?i.unshift(c):n.unshift(c)},finish:function(){for(let n=t,r=e.length;n1&&n.sort(e||dU),r.length>1&&r.sort(t||dO),i.length>1&&i.sort(t||dO)}}}function dk(){let e=new WeakMap;return{get:function(t,n){let r,i=e.get(t);return void 0===i?(r=new dF,e.set(t,[r])):n>=i.length?(r=new dF,i.push(r)):r=i[n],r},dispose:function(){e=new WeakMap}}}function dz(){let e={};return{get:function(t){let n;if(void 0!==e[t.id])return e[t.id];switch(t.type){case"DirectionalLight":n={direction:new nX,color:new iE};break;case"SpotLight":n={position:new nX,direction:new nX,color:new iE,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new nX,color:new iE,distance:0,decay:0};break;case"HemisphereLight":n={direction:new nX,skyColor:new iE,groundColor:new iE};break;case"RectAreaLight":n={color:new iE,position:new nX,halfWidth:new nX,halfHeight:new nX}}return e[t.id]=n,n}}}let dB=0;function dH(e,t){return 2*!!t.castShadow-2*!!e.castShadow+ +!!t.map-!!e.map}function dV(e){let t=new dz,n=function(){let e={};return{get:function(t){let n;if(void 0!==e[t.id])return e[t.id];switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new nW};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new nW,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),r={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 e=0;e<9;e++)r.probe.push(new nX);let i=new nX,a=new rH,s=new rH;return{setup:function(i){let a=0,s=0,o=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let l=0,u=0,c=0,h=0,d=0,p=0,f=0,m=0,g=0,v=0,y=0;i.sort(dH);for(let e=0,_=i.length;e<_;e++){let _=i[e],x=_.color,b=_.intensity,S=_.distance,M=_.shadow&&_.shadow.map?_.shadow.map.texture:null;if(_.isAmbientLight)a+=x.r*b,s+=x.g*b,o+=x.b*b;else if(_.isLightProbe){for(let e=0;e<9;e++)r.probe[e].addScaledVector(_.sh.coefficients[e],b);y++}else if(_.isDirectionalLight){let e=t.get(_);if(e.color.copy(_.color).multiplyScalar(_.intensity),_.castShadow){let e=_.shadow,t=n.get(_);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,r.directionalShadow[l]=t,r.directionalShadowMap[l]=M,r.directionalShadowMatrix[l]=_.shadow.matrix,p++}r.directional[l]=e,l++}else if(_.isSpotLight){let e=t.get(_);e.position.setFromMatrixPosition(_.matrixWorld),e.color.copy(x).multiplyScalar(b),e.distance=S,e.coneCos=Math.cos(_.angle),e.penumbraCos=Math.cos(_.angle*(1-_.penumbra)),e.decay=_.decay,r.spot[c]=e;let i=_.shadow;if(_.map&&(r.spotLightMap[g]=_.map,g++,i.updateMatrices(_),_.castShadow&&v++),r.spotLightMatrix[c]=i.matrix,_.castShadow){let e=n.get(_);e.shadowIntensity=i.intensity,e.shadowBias=i.bias,e.shadowNormalBias=i.normalBias,e.shadowRadius=i.radius,e.shadowMapSize=i.mapSize,r.spotShadow[c]=e,r.spotShadowMap[c]=M,m++}c++}else if(_.isRectAreaLight){let e=t.get(_);e.color.copy(x).multiplyScalar(b),e.halfWidth.set(.5*_.width,0,0),e.halfHeight.set(0,.5*_.height,0),r.rectArea[h]=e,h++}else if(_.isPointLight){let e=t.get(_);if(e.color.copy(_.color).multiplyScalar(_.intensity),e.distance=_.distance,e.decay=_.decay,_.castShadow){let e=_.shadow,t=n.get(_);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,t.shadowCameraNear=e.camera.near,t.shadowCameraFar=e.camera.far,r.pointShadow[u]=t,r.pointShadowMap[u]=M,r.pointShadowMatrix[u]=_.shadow.matrix,f++}r.point[u]=e,u++}else if(_.isHemisphereLight){let e=t.get(_);e.skyColor.copy(_.color).multiplyScalar(b),e.groundColor.copy(_.groundColor).multiplyScalar(b),r.hemi[d]=e,d++}}h>0&&(!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=cq.LTC_FLOAT_1,r.rectAreaLTC2=cq.LTC_FLOAT_2):(r.rectAreaLTC1=cq.LTC_HALF_1,r.rectAreaLTC2=cq.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=s,r.ambient[2]=o;let _=r.hash;(_.directionalLength!==l||_.pointLength!==u||_.spotLength!==c||_.rectAreaLength!==h||_.hemiLength!==d||_.numDirectionalShadows!==p||_.numPointShadows!==f||_.numSpotShadows!==m||_.numSpotMaps!==g||_.numLightProbes!==y)&&(r.directional.length=l,r.spot.length=c,r.rectArea.length=h,r.point.length=u,r.hemi.length=d,r.directionalShadow.length=p,r.directionalShadowMap.length=p,r.pointShadow.length=f,r.pointShadowMap.length=f,r.spotShadow.length=m,r.spotShadowMap.length=m,r.directionalShadowMatrix.length=p,r.pointShadowMatrix.length=f,r.spotLightMatrix.length=m+g-v,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=v,r.numLightProbes=y,_.directionalLength=l,_.pointLength=u,_.spotLength=c,_.rectAreaLength=h,_.hemiLength=d,_.numDirectionalShadows=p,_.numPointShadows=f,_.numSpotShadows=m,_.numSpotMaps=g,_.numLightProbes=y,r.version=dB++)},setupView:function(e,t){let n=0,o=0,l=0,u=0,c=0,h=t.matrixWorldInverse;for(let t=0,d=e.length;t1&&void 0!==arguments[1]?arguments[1]:0,a=t.get(n);return void 0===a?(r=new dG(e),t.set(n,[r])):i>=a.length?(r=new dG(e),a.push(r)):r=a[i],r},dispose:function(){t=new WeakMap}}}function dj(e,t,n){let r=new sd,i=new nW,a=new nW,s=new ro,o=new lp({depthPacking:tX}),l=new lf,u={},c=n.maxTextureSize,h={[w]:E,[E]:w,[T]:T},d=new au({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new nW},radius:{value:4}},vertexShader:"void main() {\n gl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n const float samples = float( VSM_SAMPLES );\n float mean = 0.0;\n float squared_mean = 0.0;\n float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n float uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n for ( float i = 0.0; i < samples; i ++ ) {\n float uvOffset = uvStart + i * uvStride;\n #ifdef HORIZONTAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean / samples;\n squared_mean = squared_mean / samples;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),p=d.clone();p.defines.HORIZONTAL_PASS=1;let f=new i0;f.setAttribute("position",new iF(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new an(f,d),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=b;let v=this.type;function y(t,n,r,i){let a=null,s=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)a=s;else if(a=!0===r.isPointLight?l:o,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0||!0===n.alphaToCoverage){let e=a.uuid,t=n.uuid,r=u[e];void 0===r&&(r={},u[e]=r);let i=r[t];void 0===i&&(i=a.clone(),r[t]=i,n.addEventListener("dispose",_)),a=i}return a.visible=n.visible,a.wireframe=n.wireframe,i===M?a.side=null!==n.shadowSide?n.shadowSide:n.side:a.side=null!==n.shadowSide?n.shadowSide:h[n.side],a.alphaMap=n.alphaMap,a.alphaTest=!0===n.alphaToCoverage?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===r.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=r),a}function _(e){for(let t in e.target.removeEventListener("dispose",_),u){let n=u[t],r=e.target.uuid;r in n&&(n[r].dispose(),delete n[r])}}this.render=function(n,o,l){if(!1===g.enabled||!1===g.autoUpdate&&!1===g.needsUpdate||0===n.length)return;let u=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),_=e.state;_.setBlending(A),!0===_.buffers.depth.getReversed()?_.buffers.color.setClear(0,0,0,0):_.buffers.color.setClear(1,1,1,1),_.buffers.depth.setTest(!0),_.setScissorTest(!1);let x=v!==M&&this.type===M,b=v===M&&this.type!==M;for(let u=0,h=n.length;uc||i.y>c)&&(i.x>c&&(a.x=Math.floor(c/g.x),i.x=a.x*g.x,f.mapSize.x=a.x),i.y>c&&(a.y=Math.floor(c/g.y),i.y=a.y*g.y,f.mapSize.y=a.y)),null===f.map||!0===x||!0===b){let e=this.type!==M?{minFilter:eR,magFilter:eR}:{};null!==f.map&&f.map.dispose(),f.map=new ru(i.x,i.y,e),f.map.texture.name=h.name+".shadowMap",f.camera.updateProjectionMatrix()}e.setRenderTarget(f.map),e.clear();let v=f.getViewportCount();for(let n=0;n=1:-1!==em.indexOf("OpenGL ES")&&(ef=parseFloat(/^OpenGL ES (\d)/.exec(em)[1])>=2);let eg=null,ev={},ey=e.getParameter(e.SCISSOR_BOX),e_=e.getParameter(e.VIEWPORT),ex=new ro().fromArray(ey),eb=new ro().fromArray(e_);function eS(t,n,r,i){let a=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let s=0;sn||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1)if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&e instanceof VideoFrame){let n=Math.floor(r*i.width),a=Math.floor(r*i.height);void 0===o&&(o=f(n,a));let s=t?f(n,a):o;return s.width=n,s.height=a,s.getContext("2d").drawImage(e,0,0,n,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+i.width+"x"+i.height+") to ("+n+"x"+a+")."),s}else"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+i.width+"x"+i.height+").");return e}function g(e){return e.generateMipmaps}function v(t){e.generateMipmap(t)}function y(n,r,i,a){let s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;if(r===e.RED&&(i===e.FLOAT&&(o=e.R32F),i===e.HALF_FLOAT&&(o=e.R16F),i===e.UNSIGNED_BYTE&&(o=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.R8UI),i===e.UNSIGNED_SHORT&&(o=e.R16UI),i===e.UNSIGNED_INT&&(o=e.R32UI),i===e.BYTE&&(o=e.R8I),i===e.SHORT&&(o=e.R16I),i===e.INT&&(o=e.R32I)),r===e.RG&&(i===e.FLOAT&&(o=e.RG32F),i===e.HALF_FLOAT&&(o=e.RG16F),i===e.UNSIGNED_BYTE&&(o=e.RG8)),r===e.RG_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.RG8UI),i===e.UNSIGNED_SHORT&&(o=e.RG16UI),i===e.UNSIGNED_INT&&(o=e.RG32UI),i===e.BYTE&&(o=e.RG8I),i===e.SHORT&&(o=e.RG16I),i===e.INT&&(o=e.RG32I)),r===e.RGB_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.RGB8UI),i===e.UNSIGNED_SHORT&&(o=e.RGB16UI),i===e.UNSIGNED_INT&&(o=e.RGB32UI),i===e.BYTE&&(o=e.RGB8I),i===e.SHORT&&(o=e.RGB16I),i===e.INT&&(o=e.RGB32I)),r===e.RGBA_INTEGER&&(i===e.UNSIGNED_BYTE&&(o=e.RGBA8UI),i===e.UNSIGNED_SHORT&&(o=e.RGBA16UI),i===e.UNSIGNED_INT&&(o=e.RGBA32UI),i===e.BYTE&&(o=e.RGBA8I),i===e.SHORT&&(o=e.RGBA16I),i===e.INT&&(o=e.RGBA32I)),r===e.RGB&&(i===e.UNSIGNED_INT_5_9_9_9_REV&&(o=e.RGB9_E5),i===e.UNSIGNED_INT_10F_11F_11F_REV&&(o=e.R11F_G11F_B10F)),r===e.RGBA){let t=s?t0:n8.getTransfer(a);i===e.FLOAT&&(o=e.RGBA32F),i===e.HALF_FLOAT&&(o=e.RGBA16F),i===e.UNSIGNED_BYTE&&(o=t===t1?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(o=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(o=e.RGB5_A1)}return(o===e.R16F||o===e.R32F||o===e.RG16F||o===e.RG32F||o===e.RGBA16F||o===e.RGBA32F)&&t.get("EXT_color_buffer_float"),o}function _(t,n){let r;return t?null===n||n===eW||n===eJ?r=e.DEPTH24_STENCIL8:n===ej?r=e.DEPTH32F_STENCIL8:n===eV&&(r=e.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===n||n===eW||n===eJ?r=e.DEPTH_COMPONENT24:n===ej?r=e.DEPTH_COMPONENT32F:n===eV&&(r=e.DEPTH_COMPONENT16),r}function x(e,t){return!0===g(e)||e.isFramebufferTexture&&e.minFilter!==eR&&e.minFilter!==eD?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function b(e){let t=e.target;t.removeEventListener("dispose",b),function(e){let t=r.get(e);if(void 0===t.__webglInit)return;let n=e.source,i=d.get(n);if(i){let r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&M(e),0===Object.keys(i).length&&d.delete(n)}r.remove(e)}(t),t.isVideoTexture&&h.delete(t)}function S(t){let n=t.target;n.removeEventListener("dispose",S),function(t){let n=r.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),r.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(n.__webglFramebuffer[t]))for(let r=0;r0&&a.__version!==t.version){let e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void L(a,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}else t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}let T={[eT]:e.REPEAT,[eA]:e.CLAMP_TO_EDGE,[eC]:e.MIRRORED_REPEAT},A={[eR]:e.NEAREST,[eP]:e.NEAREST_MIPMAP_NEAREST,[eL]:e.NEAREST_MIPMAP_LINEAR,[eD]:e.LINEAR,[eU]:e.LINEAR_MIPMAP_NEAREST,[eF]:e.LINEAR_MIPMAP_LINEAR},C={[nl]:e.NEVER,[nm]:e.ALWAYS,[nu]:e.LESS,[nh]:e.LEQUAL,[nc]:e.EQUAL,[nf]:e.GEQUAL,[nd]:e.GREATER,[np]:e.NOTEQUAL};function R(n,a){if((a.type===ej&&!1===t.has("OES_texture_float_linear")&&(a.magFilter===eD||a.magFilter===eU||a.magFilter===eL||a.magFilter===eF||a.minFilter===eD||a.minFilter===eU||a.minFilter===eL||a.minFilter===eF)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(n,e.TEXTURE_WRAP_S,T[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,T[a.wrapT]),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,T[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,A[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,A[a.minFilter]),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,C[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic"))&&a.magFilter!==eR&&(a.minFilter===eL||a.minFilter===eF)&&(a.type!==ej||!1!==t.has("OES_texture_float_linear"))&&(a.anisotropy>1||r.get(a).__currentAnisotropy)){let s=t.get("EXT_texture_filter_anisotropic");e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy}}function P(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",b));let i=n.source,a=d.get(i);void 0===a&&(a={},d.set(i,a));let o=function(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(o!==t.__cacheKey){void 0===a[o]&&(a[o]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,r=!0),a[o].usedTimes++;let i=a[t.__cacheKey];void 0!==i&&(a[t.__cacheKey].usedTimes--,0===i.usedTimes&&M(n)),t.__cacheKey=o,t.__webglTexture=a[o].texture}return r}function I(e,t,n){return Math.floor(Math.floor(e/n)/t)}function L(t,s,o){let l=e.TEXTURE_2D;(s.isDataArrayTexture||s.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),s.isData3DTexture&&(l=e.TEXTURE_3D);let u=P(t,s),c=s.source;n.bindTexture(l,t.__webglTexture,e.TEXTURE0+o);let h=r.get(c);if(c.version!==h.__version||!0===u){let t;n.activeTexture(e.TEXTURE0+o);let r=n8.getPrimaries(n8.workingColorSpace),d=s.colorSpace===tK?null:n8.getPrimaries(s.colorSpace),p=s.colorSpace===tK||r===d?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,p);let f=m(s.image,!1,i.maxTextureSize);f=H(s,f);let b=a.convert(s.format,s.colorSpace),S=a.convert(s.type),M=y(s.internalFormat,b,S,s.colorSpace,s.isVideoTexture);R(l,s);let w=s.mipmaps,E=!0!==s.isVideoTexture,T=void 0===h.__version||!0===u,A=c.dataReady,C=x(s,f);if(s.isDepthTexture)M=_(s.format===e2,s.type),T&&(E?n.texStorage2D(e.TEXTURE_2D,1,M,f.width,f.height):n.texImage2D(e.TEXTURE_2D,0,M,f.width,f.height,0,b,S,null));else if(s.isDataTexture)if(w.length>0){E&&T&&n.texStorage2D(e.TEXTURE_2D,C,M,w[0].width,w[0].height);for(let r=0,i=w.length;re.start-t.start);let o=0;for(let e=1;e0){let i=cV(t.width,t.height,s.format,s.type);for(let a of s.layerUpdates){let s=t.data.subarray(a*i/t.data.BYTES_PER_ELEMENT,(a+1)*i/t.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,r,0,0,a,t.width,t.height,1,b,s)}s.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,r,0,0,0,t.width,t.height,f.depth,b,t.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,r,M,t.width,t.height,f.depth,0,t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else E?A&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,r,0,0,0,t.width,t.height,f.depth,b,S,t.data):n.texImage3D(e.TEXTURE_2D_ARRAY,r,M,t.width,t.height,f.depth,0,b,S,t.data)}else{E&&T&&n.texStorage2D(e.TEXTURE_2D,C,M,w[0].width,w[0].height);for(let r=0,i=w.length;r0){let t=cV(f.width,f.height,s.format,s.type);for(let r of s.layerUpdates){let i=f.data.subarray(r*t/f.data.BYTES_PER_ELEMENT,(r+1)*t/f.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,r,f.width,f.height,1,b,S,i)}s.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,f.width,f.height,f.depth,b,S,f.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,M,f.width,f.height,f.depth,0,b,S,f.data);else if(s.isData3DTexture)E?(T&&n.texStorage3D(e.TEXTURE_3D,C,M,f.width,f.height,f.depth),A&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,f.width,f.height,f.depth,b,S,f.data)):n.texImage3D(e.TEXTURE_3D,0,M,f.width,f.height,f.depth,0,b,S,f.data);else if(s.isFramebufferTexture){if(T)if(E)n.texStorage2D(e.TEXTURE_2D,C,M,f.width,f.height);else{let t=f.width,r=f.height;for(let i=0;i>=1,r>>=1}}else if(w.length>0){if(E&&T){let t=V(w[0]);n.texStorage2D(e.TEXTURE_2D,C,M,t.width,t.height)}for(let r=0,i=w.length;r>c),r=Math.max(1,i.height>>c);u===e.TEXTURE_3D||u===e.TEXTURE_2D_ARRAY?n.texImage3D(u,c,p,t,r,i.depth,0,h,d,null):n.texImage2D(u,c,p,t,r,0,h,d,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),B(i)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,o,u,m.__webglTexture,0,z(i)):(u===e.TEXTURE_2D||u>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&u<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,o,u,m.__webglTexture,c),n.bindFramebuffer(e.FRAMEBUFFER,null)}function D(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){let i=n.depthTexture,a=i&&i.isDepthTexture?i.type:null,s=_(n.stencilBuffer,a),o=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=z(n);B(n)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,u,s,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,u,s,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,s,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,o,e.RENDERBUFFER,t)}else{let t=n.textures;for(let i=0;i{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,e.removeEventListener("dispose",t)};e.addEventListener("dispose",t),i.__depthDisposeCallback=t}i.__boundDepthTexture=e}if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(a)throw Error("target.depthTexture not supported in Cube render targets");let e=t.texture.mipmaps;e&&e.length>0?U(i.__webglFramebuffer[0],t):U(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),void 0===i.__webglDepthbuffer[r])i.__webglDepthbuffer[r]=e.createRenderbuffer(),D(i.__webglDepthbuffer[r],t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=i.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a)}}else{let r=t.texture.mipmaps;if(r&&r.length>0?n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),void 0===i.__webglDepthbuffer)i.__webglDepthbuffer=e.createRenderbuffer(),D(i.__webglDepthbuffer,t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,r)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}let F=[],k=[];function z(e){return Math.min(i.maxSamples,e.samples)}function B(e){let n=r.get(e);return e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function H(e,t){let n=e.colorSpace,r=e.format,i=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||n!==tQ&&n!==tK&&(n8.getTransfer(n)===t1?(r!==e0||i!==ez)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),t}function V(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?(c.width=e.naturalWidth||e.width,c.height=e.naturalHeight||e.height):"undefined"!=typeof VideoFrame&&e instanceof VideoFrame?(c.width=e.displayWidth,c.height=e.displayHeight):(c.width=e.width,c.height=e.height),c}this.allocateTextureUnit=function(){let e=w;return e>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+i.maxTextures),w+=1,e},this.resetTextureUnits=function(){w=0},this.setTexture2D=E,this.setTexture2DArray=function(t,i){let a=r.get(t);if(!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version)return void L(a,t,i);n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function(t,i){let a=r.get(t);if(!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version)return void L(a,t,i);n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,s){let o=r.get(t);if(t.version>0&&o.__version!==t.version)return void function(t,s,o){if(6!==s.image.length)return;let l=P(t,s),u=s.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);let c=r.get(u);if(u.version!==c.__version||!0===l){let t;n.activeTexture(e.TEXTURE0+o);let r=n8.getPrimaries(n8.workingColorSpace),h=s.colorSpace===tK?null:n8.getPrimaries(s.colorSpace),d=s.colorSpace===tK||r===h?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);let p=s.isCompressedTexture||s.image[0].isCompressedTexture,f=s.image[0]&&s.image[0].isDataTexture,_=[];for(let e=0;e<6;e++)p||f?_[e]=f?s.image[e].image:s.image[e]:_[e]=m(s.image[e],!0,i.maxCubemapSize),_[e]=H(s,_[e]);let b=_[0],S=a.convert(s.format,s.colorSpace),M=a.convert(s.type),w=y(s.internalFormat,S,M,s.colorSpace),E=!0!==s.isVideoTexture,T=void 0===c.__version||!0===l,A=u.dataReady,C=x(s,b);if(R(e.TEXTURE_CUBE_MAP,s),p){E&&T&&n.texStorage2D(e.TEXTURE_CUBE_MAP,C,w,b.width,b.height);for(let r=0;r<6;r++){t=_[r].mipmaps;for(let i=0;i0&&C++;let r=V(_[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,C,w,r.width,r.height)}for(let r=0;r<6;r++)if(f){E?A&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,0,0,_[r].width,_[r].height,S,M,_[r].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,w,_[r].width,_[r].height,0,S,M,_[r].data);for(let i=0;i1;if(!h&&(void 0===l.__webglTexture&&(l.__webglTexture=e.createTexture()),l.__version=i.version,s.memory.textures++),c){o.__webglFramebuffer=[];for(let t=0;t<6;t++)if(i.mipmaps&&i.mipmaps.length>0){o.__webglFramebuffer[t]=[];for(let n=0;n0){o.__webglFramebuffer=[];for(let t=0;t0&&!1===B(t)){o.__webglMultisampledFramebuffer=e.createFramebuffer(),o.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,o.__webglMultisampledFramebuffer);for(let n=0;n0)for(let r=0;r0)for(let n=0;n0){if(!1===B(t)){let i=t.textures,a=t.width,s=t.height,o=e.COLOR_BUFFER_BIT,l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,c=r.get(t),h=i.length>1;if(h)for(let t=0;t0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer);for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:tK,a=n8.getTransfer(i);if(n===ez)return e.UNSIGNED_BYTE;if(n===eq)return e.UNSIGNED_SHORT_4_4_4_4;if(n===eY)return e.UNSIGNED_SHORT_5_5_5_1;if(n===eZ)return e.UNSIGNED_INT_5_9_9_9_REV;if(n===eK)return e.UNSIGNED_INT_10F_11F_11F_REV;if(n===eB)return e.BYTE;if(n===eH)return e.SHORT;if(n===eV)return e.UNSIGNED_SHORT;if(n===eG)return e.INT;if(n===eW)return e.UNSIGNED_INT;if(n===ej)return e.FLOAT;if(n===eX)return e.HALF_FLOAT;if(n===e$)return e.ALPHA;if(n===eQ)return e.RGB;if(n===e0)return e.RGBA;if(n===e1)return e.DEPTH_COMPONENT;if(n===e2)return e.DEPTH_STENCIL;if(n===e3)return e.RED;if(n===e4)return e.RED_INTEGER;if(n===e5)return e.RG;if(n===e6)return e.RG_INTEGER;if(n===e9)return e.RGBA_INTEGER;if(n===e7||n===te||n===tt||n===tn)if(a===t1){if(null===(r=t.get("WEBGL_compressed_texture_s3tc_srgb")))return null;if(n===e7)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===tt)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===tn)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(null===(r=t.get("WEBGL_compressed_texture_s3tc")))return null;if(n===e7)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===tt)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===tn)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===tr||n===ti||n===ta||n===ts){if(null===(r=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(n===tr)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ti)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===ta)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ts)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===to||n===tl||n===tu){if(null===(r=t.get("WEBGL_compressed_texture_etc")))return null;if(n===to||n===tl)return a===t1?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===tu)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}if(n===tc||n===th||n===td||n===tp||n===tf||n===tm||n===tg||n===tv||n===ty||n===t_||n===tx||n===tb||n===tS||n===tM){if(null===(r=t.get("WEBGL_compressed_texture_astc")))return null;if(n===tc)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===th)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===td)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===tp)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===tf)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===tm)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===tg)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===tv)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===ty)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===t_)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===tx)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===tb)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===tS)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===tM)return a===t1?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===tw||n===tE||n===tT){if(null===(r=t.get("EXT_texture_compression_bptc")))return null;if(n===tw)return a===t1?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===tE)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===tT)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(n===tA||n===tC||n===tR||n===tP){if(null===(r=t.get("EXT_texture_compression_rgtc")))return null;if(n===tA)return r.COMPRESSED_RED_RGTC1_EXT;if(n===tC)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===tR)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===tP)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return n===eJ?e.UNSIGNED_INT_24_8:void 0!==e[n]?e[n]:null}}}class dZ{init(e,t){if(null===this.texture){let n=new s9(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(null!==this.texture&&null===this.mesh){let t=e.cameras[0].viewport,n=new au({vertexShader:"\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n if ( coord.x >= 1.0 ) {\n\n gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n } else {\n\n gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n }\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new an(new o4(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}}class dK extends nL{constructor(e,t){super();let n=this,r=null,i=1,a=null,s="local-floor",o=1,l=null,u=null,c=null,h=null,d=null,p=null,f="undefined"!=typeof XRWebGLBinding,m=new dZ,g={},v=t.getContextAttributes(),y=null,_=null,x=[],b=[],S=new nW,M=null,w=new af;w.viewport=new ro;let E=new af;E.viewport=new ro;let T=[w,E],A=new uS,C=null,R=null;function P(e){let t=b.indexOf(e.inputSource);if(-1===t)return;let n=x[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function I(){r.removeEventListener("select",P),r.removeEventListener("selectstart",P),r.removeEventListener("selectend",P),r.removeEventListener("squeeze",P),r.removeEventListener("squeezestart",P),r.removeEventListener("squeezeend",P),r.removeEventListener("end",I),r.removeEventListener("inputsourceschange",L);for(let e=0;e=0&&(b[r]=null,x[r].disconnect(n))}for(let t=0;t=b.length){b.push(n),r=e;break}else if(null===b[e]){b[e]=n,r=e;break}if(-1===r)break}let i=x[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=x[e];return void 0===t&&(t=new ax,x[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=x[e];return void 0===t&&(t=new ax,x[e]=t),t.getGripSpace()},this.getHand=function(e){let t=x[e];return void 0===t&&(t=new ax,x[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==h?h:d},this.getBinding=function(){return null===c&&f&&(c=new XRWebGLBinding(r,t)),c},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(u){if(null!==(r=u)){if(y=e.getRenderTarget(),r.addEventListener("select",P),r.addEventListener("selectstart",P),r.addEventListener("selectend",P),r.addEventListener("squeeze",P),r.addEventListener("squeezestart",P),r.addEventListener("squeezeend",P),r.addEventListener("end",I),r.addEventListener("inputsourceschange",L),!0!==v.xrCompatible&&await t.makeXRCompatible(),M=e.getPixelRatio(),e.getSize(S),f&&"createProjectionLayer"in XRWebGLBinding.prototype){let n=null,a=null,s=null;v.depth&&(s=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=v.stencil?e2:e1,a=v.stencil?eJ:eW);let o={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:i};h=(c=this.getBinding()).createProjectionLayer(o),r.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),_=new ru(h.textureWidth,h.textureHeight,{format:e0,type:ez,depthTexture:new s8(h.textureWidth,h.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:4*!!v.antialias,resolveDepthBuffer:!1===h.ignoreDepthValues,resolveStencilBuffer:!1===h.ignoreDepthValues})}else{let n={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:i};d=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:d}),e.setPixelRatio(1),e.setSize(d.framebufferWidth,d.framebufferHeight,!1),_=new ru(d.framebufferWidth,d.framebufferHeight,{format:e0,type:ez,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:!1===d.ignoreDepthValues,resolveStencilBuffer:!1===d.ignoreDepthValues})}_.isXRRenderTarget=!0,this.setFoveation(o),l=null,a=await r.requestReferenceSpace(s),F.setContext(r),F.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};let N=new nX,D=new nX;function U(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){var t,n,i;if(null===r)return;let a=e.near,s=e.far;null!==m.texture&&(m.depthNear>0&&(a=m.depthNear),m.depthFar>0&&(s=m.depthFar)),A.near=E.near=w.near=a,A.far=E.far=w.far=s,(C!==A.near||R!==A.far)&&(r.updateRenderState({depthNear:A.near,depthFar:A.far}),C=A.near,R=A.far),A.layers.mask=6|e.layers.mask,w.layers.mask=3&A.layers.mask,E.layers.mask=5&A.layers.mask;let o=e.parent,l=A.cameras;U(A,o);for(let e=0;e0&&(e.alphaTest.value=r.alphaTest);let i=t.get(r),a=i.envMap,s=i.envMapRotation;a&&(e.envMap.value=a,d$.copy(s),d$.x*=-1,d$.y*=-1,d$.z*=-1,a.isCubeTexture&&!1===a.isRenderTargetTexture&&(d$.y*=-1,d$.z*=-1),e.envMapRotation.value.setFromMatrix4(dQ.makeRotationFromEuler(d$)),e.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,ao(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,a,s,o){var l,u,c,h,d,p,f,m,g,v,y,_,x,b,S,M,w,T,A,C,R;i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),l=e,(u=i).gradientMap&&(l.gradientMap.value=u.gradientMap)):i.isMeshPhongMaterial?(r(e,i),c=e,h=i,c.specular.value.copy(h.specular),c.shininess.value=Math.max(h.shininess,1e-4)):i.isMeshStandardMaterial?(r(e,i),d=e,p=i,d.metalness.value=p.metalness,p.metalnessMap&&(d.metalnessMap.value=p.metalnessMap,n(p.metalnessMap,d.metalnessMapTransform)),d.roughness.value=p.roughness,p.roughnessMap&&(d.roughnessMap.value=p.roughnessMap,n(p.roughnessMap,d.roughnessMapTransform)),p.envMap&&(d.envMapIntensity.value=p.envMapIntensity),i.isMeshPhysicalMaterial&&(f=e,m=i,g=o,f.ior.value=m.ior,m.sheen>0&&(f.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),f.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(f.sheenColorMap.value=m.sheenColorMap,n(m.sheenColorMap,f.sheenColorMapTransform)),m.sheenRoughnessMap&&(f.sheenRoughnessMap.value=m.sheenRoughnessMap,n(m.sheenRoughnessMap,f.sheenRoughnessMapTransform))),m.clearcoat>0&&(f.clearcoat.value=m.clearcoat,f.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(f.clearcoatMap.value=m.clearcoatMap,n(m.clearcoatMap,f.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,n(m.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(f.clearcoatNormalMap.value=m.clearcoatNormalMap,n(m.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===E&&f.clearcoatNormalScale.value.negate())),m.dispersion>0&&(f.dispersion.value=m.dispersion),m.iridescence>0&&(f.iridescence.value=m.iridescence,f.iridescenceIOR.value=m.iridescenceIOR,f.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(f.iridescenceMap.value=m.iridescenceMap,n(m.iridescenceMap,f.iridescenceMapTransform)),m.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=m.iridescenceThicknessMap,n(m.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),m.transmission>0&&(f.transmission.value=m.transmission,f.transmissionSamplerMap.value=g.texture,f.transmissionSamplerSize.value.set(g.width,g.height),m.transmissionMap&&(f.transmissionMap.value=m.transmissionMap,n(m.transmissionMap,f.transmissionMapTransform)),f.thickness.value=m.thickness,m.thicknessMap&&(f.thicknessMap.value=m.thicknessMap,n(m.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=m.attenuationDistance,f.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(f.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(f.anisotropyMap.value=m.anisotropyMap,n(m.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=m.specularIntensity,f.specularColor.value.copy(m.specularColor),m.specularColorMap&&(f.specularColorMap.value=m.specularColorMap,n(m.specularColorMap,f.specularColorMapTransform)),m.specularIntensityMap&&(f.specularIntensityMap.value=m.specularIntensityMap,n(m.specularIntensityMap,f.specularIntensityMapTransform)))):i.isMeshMatcapMaterial?(r(e,i),v=e,(y=i).matcap&&(v.matcap.value=y.matcap)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(_=e,x=i,_.diffuse.value.copy(x.color),_.opacity.value=x.opacity,x.map&&(_.map.value=x.map,n(x.map,_.mapTransform)),i.isLineDashedMaterial&&(b=e,S=i,b.dashSize.value=S.dashSize,b.totalSize.value=S.dashSize+S.gapSize,b.scale.value=S.scale)):i.isPointsMaterial?(M=e,w=i,T=a,A=s,M.diffuse.value.copy(w.color),M.opacity.value=w.opacity,M.size.value=w.size*T,M.scale.value=.5*A,w.map&&(M.map.value=w.map,n(w.map,M.uvTransform)),w.alphaMap&&(M.alphaMap.value=w.alphaMap,n(w.alphaMap,M.alphaMapTransform)),w.alphaTest>0&&(M.alphaTest.value=w.alphaTest)):i.isSpriteMaterial?(C=e,R=i,C.diffuse.value.copy(R.color),C.opacity.value=R.opacity,C.rotation.value=R.rotation,R.map&&(C.map.value=R.map,n(R.map,C.mapTransform)),R.alphaMap&&(C.alphaMap.value=R.alphaMap,n(R.alphaMap,C.alphaMapTransform)),R.alphaTest>0&&(C.alphaTest.value=R.alphaTest)):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function d1(e,t,n,r){let i={},a={},s=[],o=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function l(e){let t={boundary:0,storage:0};return"number"==typeof e||"boolean"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function u(t){let n=t.target;n.removeEventListener("dispose",u);let r=s.indexOf(n.__bindingPointIndex);s.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}return{bind:function(e,t){let n=t.program;r.uniformBlockBinding(e,n)},update:function(n,c){let h=i[n.id];void 0===h&&(function(e){let t=e.uniforms,n=0;for(let e=0,r=t.length;e0&&(n+=16-r),e.__size=n,e.__cache={}}(n),h=function(t){let n=function(){for(let e=0;e2)||void 0===arguments[2]||arguments[2];if(eT.isPresenting)return void console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");ea=e,es=t,P.width=Math.floor(e*eo),P.height=Math.floor(t*eo),!0===n&&(P.style.width=e+"px",P.style.height=t+"px"),this.setViewport(0,0,e,t)},this.getDrawingBufferSize=function(e){return e.set(ea*eo,es*eo).floor()},this.setDrawingBufferSize=function(e,t,n){ea=e,es=t,eo=n,P.width=Math.floor(e*n),P.height=Math.floor(t*n),this.setViewport(0,0,e,t)},this.getCurrentViewport=function(e){return e.copy(ee)},this.getViewport=function(e){return e.copy(eh)},this.setViewport=function(e,t,n,r){e.isVector4?eh.set(e.x,e.y,e.z,e.w):eh.set(e,t,n,r),i.viewport(ee.copy(eh).multiplyScalar(eo).round())},this.getScissor=function(e){return e.copy(ed)},this.setScissor=function(e,t,n,r){e.isVector4?ed.set(e.x,e.y,e.z,e.w):ed.set(e,t,n,r),i.scissor(et.copy(ed).multiplyScalar(eo).round())},this.getScissorTest=function(){return ep},this.setScissorTest=function(e){i.setScissorTest(ep=e)},this.setOpaqueSort=function(e){el=e},this.setTransparentSort=function(e){eu=e},this.getClearColor=function(e){return e.copy(x.getClearColor())},this.setClearColor=function(){x.setClearColor(...arguments)},this.getClearAlpha=function(){return x.getClearAlpha()},this.setClearAlpha=function(){x.setClearAlpha(...arguments)},this.clear=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=0;if(e){let e=!1;if(null!==K){let t=K.texture.format;e=t===e9||t===e6||t===e4}if(e){let e=K.texture.type,t=e===ez||e===eW||e===eV||e===eJ||e===eq||e===eY,n=x.getClearColor(),r=x.getClearAlpha(),i=n.r,a=n.g,s=n.b;t?(H[0]=i,H[1]=a,H[2]=s,H[3]=r,eM.clearBufferuiv(eM.COLOR,0,H)):(V[0]=i,V[1]=a,V[2]=s,V[3]=r,eM.clearBufferiv(eM.COLOR,0,V))}else r|=eM.COLOR_BUFFER_BIT}t&&(r|=eM.DEPTH_BUFFER_BIT),n&&(r|=eM.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(0xffffffff)),eM.clear(r)},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(){P.removeEventListener("webglcontextlost",eA,!1),P.removeEventListener("webglcontextrestored",eC,!1),P.removeEventListener("webglcontextcreationerror",eR,!1),x.dispose(),g.dispose(),v.dispose(),s.dispose(),l.dispose(),u.dispose(),d.dispose(),C.dispose(),R.dispose(),f.dispose(),eT.dispose(),eT.removeEventListener("sessionstart",eN),eT.removeEventListener("sessionend",eD),eU.stop()},this.renderBufferDirect=function(e,t,a,d,p,f){let g;null===t&&(t=ex);let v=p.isMesh&&0>p.matrixWorld.determinant(),_=function(e,t,n,a,c){var h,d;!0!==t.isScene&&(t=ex),o.resetTextureUnits();let p=t.fog,f=a.isMeshStandardMaterial?t.environment:null,g=null===K?q.outputColorSpace:!0===K.isXRRenderTarget?K.texture.colorSpace:tQ,v=(a.isMeshStandardMaterial?u:l).get(a.envMap||f),_=!0===a.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,x=!!n.attributes.tangent&&(!!a.normalMap||a.anisotropy>0),S=!!n.morphAttributes.position,M=!!n.morphAttributes.normal,w=!!n.morphAttributes.color,E=ec;a.toneMapped&&(null===K||!0===K.isXRRenderTarget)&&(E=q.toneMapping);let T=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,A=void 0!==T?T.length:0,C=s.get(a),P=W.state.lights;if(!0===em&&(!0===eg||e!==Q)){let t=e===Q&&a.id===$;y.setState(a,e,t)}let I=!1;a.version===C.__version?C.needsLights&&C.lightsStateVersion!==P.state.version||C.outputColorSpace!==g||c.isBatchedMesh&&!1===C.batching?I=!0:c.isBatchedMesh||!0!==C.batching?c.isBatchedMesh&&!0===C.batchingColor&&null===c.colorTexture||c.isBatchedMesh&&!1===C.batchingColor&&null!==c.colorTexture||c.isInstancedMesh&&!1===C.instancing?I=!0:c.isInstancedMesh||!0!==C.instancing?c.isSkinnedMesh&&!1===C.skinning?I=!0:c.isSkinnedMesh||!0!==C.skinning?c.isInstancedMesh&&!0===C.instancingColor&&null===c.instanceColor||c.isInstancedMesh&&!1===C.instancingColor&&null!==c.instanceColor||c.isInstancedMesh&&!0===C.instancingMorph&&null===c.morphTexture||c.isInstancedMesh&&!1===C.instancingMorph&&null!==c.morphTexture||C.envMap!==v||!0===a.fog&&C.fog!==p||void 0!==C.numClippingPlanes&&(C.numClippingPlanes!==y.numPlanes||C.numIntersection!==y.numIntersection)||C.vertexAlphas!==_||C.vertexTangents!==x||C.morphTargets!==S||C.morphNormals!==M||C.morphColors!==w||C.toneMapping!==E?I=!0:C.morphTargetsCount!==A&&(I=!0):I=!0:I=!0:I=!0:(I=!0,C.__version=a.version);let L=C.currentProgram;!0===I&&(L=ej(a,t,c));let N=!1,D=!1,U=!1,O=L.getUniforms(),F=C.uniforms;if(i.useProgram(L.program)&&(N=!0,D=!0,U=!0),a.id!==$&&($=a.id,D=!0),N||Q!==e){i.buffers.depth.getReversed()&&!0!==e.reversedDepth&&(e._reversedDepth=!0,e.updateProjectionMatrix()),O.setValue(eM,"projectionMatrix",e.projectionMatrix),O.setValue(eM,"viewMatrix",e.matrixWorldInverse);let t=O.map.cameraPosition;void 0!==t&&t.setValue(eM,ey.setFromMatrixPosition(e.matrixWorld)),r.logarithmicDepthBuffer&&O.setValue(eM,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(a.isMeshPhongMaterial||a.isMeshToonMaterial||a.isMeshLambertMaterial||a.isMeshBasicMaterial||a.isMeshStandardMaterial||a.isShaderMaterial)&&O.setValue(eM,"isOrthographic",!0===e.isOrthographicCamera),Q!==e&&(Q=e,D=!0,U=!0)}if(c.isSkinnedMesh){O.setOptional(eM,c,"bindMatrix"),O.setOptional(eM,c,"bindMatrixInverse");let e=c.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),O.setValue(eM,"boneTexture",e.boneTexture,o))}c.isBatchedMesh&&(O.setOptional(eM,c,"batchingTexture"),O.setValue(eM,"batchingTexture",c._matricesTexture,o),O.setOptional(eM,c,"batchingIdTexture"),O.setValue(eM,"batchingIdTexture",c._indirectTexture,o),O.setOptional(eM,c,"batchingColorTexture"),null!==c._colorsTexture&&O.setValue(eM,"batchingColorTexture",c._colorsTexture,o));let k=n.morphAttributes;if((void 0!==k.position||void 0!==k.normal||void 0!==k.color)&&b.update(c,n,L),(D||C.receiveShadow!==c.receiveShadow)&&(C.receiveShadow=c.receiveShadow,O.setValue(eM,"receiveShadow",c.receiveShadow)),a.isMeshGouraudMaterial&&null!==a.envMap&&(F.envMap.value=v,F.flipEnvMap.value=v.isCubeTexture&&!1===v.isRenderTargetTexture?-1:1),a.isMeshStandardMaterial&&null===a.envMap&&null!==t.environment&&(F.envMapIntensity.value=t.environmentIntensity),D&&(O.setValue(eM,"toneMappingExposure",q.toneMappingExposure),C.needsLights&&(h=F,d=U,h.ambientLightColor.needsUpdate=d,h.lightProbe.needsUpdate=d,h.directionalLights.needsUpdate=d,h.directionalLightShadows.needsUpdate=d,h.pointLights.needsUpdate=d,h.pointLightShadows.needsUpdate=d,h.spotLights.needsUpdate=d,h.spotLightShadows.needsUpdate=d,h.rectAreaLights.needsUpdate=d,h.hemisphereLights.needsUpdate=d),p&&!0===a.fog&&m.refreshFogUniforms(F,p),m.refreshMaterialUniforms(F,a,eo,es,W.state.transmissionRenderTarget[e.id]),dd.upload(eM,eZ(C),F,o)),a.isShaderMaterial&&!0===a.uniformsNeedUpdate&&(dd.upload(eM,eZ(C),F,o),a.uniformsNeedUpdate=!1),a.isSpriteMaterial&&O.setValue(eM,"center",c.center),O.setValue(eM,"modelViewMatrix",c.modelViewMatrix),O.setValue(eM,"normalMatrix",c.normalMatrix),O.setValue(eM,"modelMatrix",c.matrixWorld),a.isShaderMaterial||a.isRawShaderMaterial){let e=a.uniformsGroups;for(let t=0,n=e.length;t2&&void 0!==arguments[2]?arguments[2]:null;null===n&&(n=e),(W=v.get(n)).init(t),X.push(W),n.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(W.pushLight(e),e.castShadow&&W.pushShadow(e))}),e!==n&&e.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(W.pushLight(e),e.castShadow&&W.pushShadow(e))}),W.setupLights();let r=new Set;return e.traverse(function(e){if(!(e.isMesh||e.isPoints||e.isLine||e.isSprite))return;let t=e.material;if(t)if(Array.isArray(t))for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:null,i=this.compile(e,t,r);return new Promise(t=>{function r(){if(i.forEach(function(e){s.get(e).currentProgram.isReady()&&i.delete(e)}),0===i.size)return void t(e);setTimeout(r,10)}null!==n.get("KHR_parallel_shader_compile")?r():setTimeout(r,10)})};let eL=null;function eN(){eU.stop()}function eD(){eU.start()}let eU=new cW;function eO(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers)){if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)W.pushLight(e),e.castShadow&&W.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||ef.intersectsSprite(e)){r&&e_.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ev);let t=d.update(e),i=e.material;i.visible&&G.push(e,t,i,n,e_.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||ef.intersectsObject(e))){let t=d.update(e),i=e.material;if(r&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),e_.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),e_.copy(t.boundingSphere.center)),e_.applyMatrix4(e.matrixWorld).applyMatrix4(ev)),Array.isArray(i)){let r=t.groups;for(let a=0,s=r.length;a0&&eH(a,t,n),s.length>0&&eH(s,t,n),o.length>0&&eH(o,t,n),i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),i.setPolygonOffset(!1)}function eB(e,t,r,i){if(null!==(!0===r.isScene?r.overrideMaterial:null))return;void 0===W.state.transmissionRenderTarget[i.id]&&(W.state.transmissionRenderTarget[i.id]=new ru(1,1,{generateMipmaps:!0,type:n.has("EXT_color_buffer_half_float")||n.has("EXT_color_buffer_float")?eX:ez,minFilter:eF,samples:4,stencilBuffer:N,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:n8.workingColorSpace}));let a=W.state.transmissionRenderTarget[i.id],s=i.viewport||ee;a.setSize(s.z*q.transmissionResolutionScale,s.w*q.transmissionResolutionScale);let l=q.getRenderTarget(),u=q.getActiveCubeFace(),c=q.getActiveMipmapLevel();q.setRenderTarget(a),q.getClearColor(er),(ei=q.getClearAlpha())<1&&q.setClearColor(0xffffff,.5),q.clear(),eb&&x.render(r);let h=q.toneMapping;q.toneMapping=ec;let d=i.viewport;if(void 0!==i.viewport&&(i.viewport=void 0),W.setupLightsView(i),!0===em&&y.setGlobalState(q.clippingPlanes,i),eH(e,r,i),o.updateMultisampleRenderTarget(a),o.updateRenderTargetMipmap(a),!1===n.has("WEBGL_multisampled_render_to_texture")){let e=!1;for(let n=0,a=t.length;n0)for(let t=0,a=n.length;t0&&eB(r,i,e,t),eb&&x.render(e),ek(G,e,t);null!==K&&0===Z&&(o.updateMultisampleRenderTarget(K),o.updateRenderTargetMipmap(K)),!0===e.isScene&&e.onAfterRender(q,e,t),C.resetDefaultState(),$=-1,Q=null,X.pop(),X.length>0?(W=X[X.length-1],!0===em&&y.setGlobalState(q.clippingPlanes,W.state.camera)):W=null,j.pop(),G=j.length>0?j[j.length-1]:null},this.getActiveCubeFace=function(){return J},this.getActiveMipmapLevel=function(){return Z},this.getRenderTarget=function(){return K},this.setRenderTargetTextures=function(e,t,n){let r=s.get(e);r.__autoAllocateDepthBuffer=!1===e.resolveDepthBuffer,!1===r.__autoAllocateDepthBuffer&&(r.__useRenderToTexture=!1),s.get(e.texture).__webglTexture=t,s.get(e.depthTexture).__webglTexture=r.__autoAllocateDepthBuffer?void 0:n,r.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(e,t){let n=s.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t};let e$=eM.createFramebuffer();this.setRenderTarget=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;K=e,J=t,Z=n;let r=!0,a=null,l=!1,u=!1;if(e){let c=s.get(e);if(void 0!==c.__useDefaultFramebuffer)i.bindFramebuffer(eM.FRAMEBUFFER,null),r=!1;else if(void 0===c.__webglFramebuffer)o.setupRenderTarget(e);else if(c.__hasExternalTextures)o.rebindTextures(e,s.get(e.texture).__webglTexture,s.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){let t=e.depthTexture;if(c.__boundDepthTexture!==t){if(null!==t&&s.has(t)&&(e.width!==t.image.width||e.height!==t.image.height))throw Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");o.setupDepthRenderbuffer(e)}}let h=e.texture;(h.isData3DTexture||h.isDataArrayTexture||h.isCompressedArrayTexture)&&(u=!0);let d=s.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(a=Array.isArray(d[t])?d[t][n]:d[t],l=!0):a=e.samples>0&&!1===o.useMultisampledRTT(e)?s.get(e).__webglMultisampledFramebuffer:Array.isArray(d)?d[n]:d,ee.copy(e.viewport),et.copy(e.scissor),en=e.scissorTest}else ee.copy(eh).multiplyScalar(eo).floor(),et.copy(ed).multiplyScalar(eo).floor(),en=ep;if(0!==n&&(a=e$),i.bindFramebuffer(eM.FRAMEBUFFER,a)&&r&&i.drawBuffers(e,a),i.viewport(ee),i.scissor(et),i.setScissorTest(en),l){let r=s.get(e.texture);eM.framebufferTexture2D(eM.FRAMEBUFFER,eM.COLOR_ATTACHMENT0,eM.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(u)for(let r=0;r7&&void 0!==arguments[7]?arguments[7]:0;if(!(e&&e.isWebGLRenderTarget))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let h=s.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==u&&(h=h[u]),h){i.bindFramebuffer(eM.FRAMEBUFFER,h);try{let i=e.textures[c],s=i.format,u=i.type;if(!r.textureFormatReadable(s))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!r.textureTypeReadable(u))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-a&&n>=0&&n<=e.height-o&&(e.textures.length>1&&eM.readBuffer(eM.COLOR_ATTACHMENT0+c),eM.readPixels(t,n,a,o,A.convert(s),A.convert(u),l))}finally{let e=null!==K?s.get(K).__webglFramebuffer:null;i.bindFramebuffer(eM.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,a,o,l,u){let c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;if(!(e&&e.isWebGLRenderTarget))throw Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let h=s.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==u&&(h=h[u]),h)if(t>=0&&t<=e.width-a&&n>=0&&n<=e.height-o){i.bindFramebuffer(eM.FRAMEBUFFER,h);let u=e.textures[c],d=u.format,p=u.type;if(!r.textureFormatReadable(d))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!r.textureTypeReadable(p))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");let f=eM.createBuffer();eM.bindBuffer(eM.PIXEL_PACK_BUFFER,f),eM.bufferData(eM.PIXEL_PACK_BUFFER,l.byteLength,eM.STREAM_READ),e.textures.length>1&&eM.readBuffer(eM.COLOR_ATTACHMENT0+c),eM.readPixels(t,n,a,o,A.convert(d),A.convert(p),0);let m=null!==K?s.get(K).__webglFramebuffer:null;i.bindFramebuffer(eM.FRAMEBUFFER,m);let g=eM.fenceSync(eM.SYNC_GPU_COMMANDS_COMPLETE,0);return eM.flush(),await n4(eM,g,4),eM.bindBuffer(eM.PIXEL_PACK_BUFFER,f),eM.getBufferSubData(eM.PIXEL_PACK_BUFFER,0,l),eM.deleteBuffer(f),eM.deleteSync(g),l}else throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Math.pow(2,-n),a=Math.floor(e.image.width*r),s=Math.floor(e.image.height*r),l=null!==t?t.x:0,u=null!==t?t.y:0;o.setTexture2D(e,0),eM.copyTexSubImage2D(eM.TEXTURE_2D,n,0,0,l,u,a,s),i.unbindTexture()};let eQ=eM.createFramebuffer(),e0=eM.createFramebuffer();this.copyTextureToTexture=function(e,t){let n,r,a,l,u,c,h,d,p,f,m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,v=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,y=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;null===y&&(0!==v?(n3("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),y=v,v=0):y=0);let _=e.isCompressedTexture?e.mipmaps[y]:e.image;if(null!==m)n=m.max.x-m.min.x,r=m.max.y-m.min.y,a=m.isBox3?m.max.z-m.min.z:1,l=m.min.x,u=m.min.y,c=m.isBox3?m.min.z:0;else{let t=Math.pow(2,-v);n=Math.floor(_.width*t),r=Math.floor(_.height*t),a=e.isDataArrayTexture?_.depth:e.isData3DTexture?Math.floor(_.depth*t):1,l=0,u=0,c=0}null!==g?(h=g.x,d=g.y,p=g.z):(h=0,d=0,p=0);let x=A.convert(t.format),b=A.convert(t.type);t.isData3DTexture?(o.setTexture3D(t,0),f=eM.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(o.setTexture2DArray(t,0),f=eM.TEXTURE_2D_ARRAY):(o.setTexture2D(t,0),f=eM.TEXTURE_2D),eM.pixelStorei(eM.UNPACK_FLIP_Y_WEBGL,t.flipY),eM.pixelStorei(eM.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),eM.pixelStorei(eM.UNPACK_ALIGNMENT,t.unpackAlignment);let S=eM.getParameter(eM.UNPACK_ROW_LENGTH),M=eM.getParameter(eM.UNPACK_IMAGE_HEIGHT),w=eM.getParameter(eM.UNPACK_SKIP_PIXELS),E=eM.getParameter(eM.UNPACK_SKIP_ROWS),T=eM.getParameter(eM.UNPACK_SKIP_IMAGES);eM.pixelStorei(eM.UNPACK_ROW_LENGTH,_.width),eM.pixelStorei(eM.UNPACK_IMAGE_HEIGHT,_.height),eM.pixelStorei(eM.UNPACK_SKIP_PIXELS,l),eM.pixelStorei(eM.UNPACK_SKIP_ROWS,u),eM.pixelStorei(eM.UNPACK_SKIP_IMAGES,c);let C=e.isDataArrayTexture||e.isData3DTexture,R=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let o=s.get(e),f=s.get(t),m=s.get(o.__renderTarget),g=s.get(f.__renderTarget);i.bindFramebuffer(eM.READ_FRAMEBUFFER,m.__webglFramebuffer),i.bindFramebuffer(eM.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let i=0;id5],8155);let d4=e=>{let t,n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,i,a);return a},d5=e=>e?d4(e):d4,{useSyncExternalStoreWithSelector:d6}=d3.default,d8=e=>e,d9=(e,t)=>{let n=d5(e),r=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d8,n=arguments.length>2?arguments[2]:void 0,r=d6(e.subscribe,e.getState,e.getInitialState,t,n);return h.default.useDebugValue(r),r}(n,e,r)};return Object.assign(r,n),r},d7=(e,t)=>e?d9(e,t):d9,pe=[];function pt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e===t;if(e===t)return!0;if(!e||!t)return!1;let r=e.length;if(t.length!==r)return!1;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};for(let i of(null===t&&(t=[e]),pe))if(pt(t,i.keys,i.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(i,"error"))throw i.error;if(Object.prototype.hasOwnProperty.call(i,"response"))return r.lifespan&&r.lifespan>0&&(i.timeout&&clearTimeout(i.timeout),i.timeout=setTimeout(i.remove,r.lifespan)),i.response;if(!n)throw i.promise}let i={keys:t,equal:r.equal,remove:()=>{let e=pe.indexOf(i);-1!==e&&pe.splice(e,1)},promise:("object"==typeof e&&"function"==typeof e.then?e:e(...t)).then(e=>{i.response=e,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))}).catch(e=>i.error=e)};if(pe.push(i),!n)throw i.promise}var pr=e.i(98133),pi=e.i(95087),pa=e.i(43476);e.s(["FiberProvider",()=>pc,"traverseFiber",()=>po,"useContextBridge",()=>pf,"useFiber",()=>ph],46791);var ps=h;function po(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){let e=po(r,t,n);if(e)return e;r=t?null:r.sibling}}function pl(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}(()=>{var e,t;return"undefined"!=typeof window&&((null==(e=window.document)?void 0:e.createElement)||(null==(t=window.navigator)?void 0:t.product)==="ReactNative")})()?ps.useLayoutEffect:ps.useEffect;let pu=pl(ps.createContext(null));class pc extends ps.Component{render(){return ps.createElement(pu.Provider,{value:this._reactInternals},this.props.children)}}function ph(){let e=ps.useContext(pu);if(null===e)throw Error("its-fine: useFiber must be called within a !");let t=ps.useId();return ps.useMemo(()=>{for(let n of[e,null==e?void 0:e.alternate]){if(!n)continue;let e=po(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}let pd=Symbol.for("react.context"),pp=e=>null!==e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===pd;function pf(){let e=function(){let e=ph(),[t]=ps.useState(()=>new Map);t.clear();let n=e;for(;n;){let e=n.type;pp(e)&&e!==pu&&!t.has(e)&&t.set(e,ps.use(pl(e))),n=n.return}return t}();return ps.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>ps.createElement(t,null,ps.createElement(n.Provider,{...r,value:e.get(n)})),e=>ps.createElement(pc,{...e})),[e])}function pm(e){let t=e.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}h.act;let pg=e=>e&&e.hasOwnProperty("current"),pv=e=>null!=e&&("string"==typeof e||"number"==typeof e||e.isColor),py=((e,t)=>"undefined"!=typeof window&&((null==(e=window.document)?void 0:e.createElement)||(null==(t=window.navigator)?void 0:t.product)==="ReactNative"))()?h.useLayoutEffect:h.useEffect;function p_(e){let t=h.useRef(e);return py(()=>void(t.current=e),[e]),t}function px(){let e=ph(),t=pf();return h.useMemo(()=>n=>{let{children:r}=n,i=po(e,!0,e=>e.type===h.StrictMode)?h.StrictMode:h.Fragment;return(0,pa.jsx)(i,{children:(0,pa.jsx)(t,{children:r})})},[e,t])}function pb(e){let{set:t}=e;return py(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}let pS=(e=>((e=class extends h.Component{componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}constructor(...e){super(...e),this.state={error:!1}}}).getDerivedStateFromError=()=>({error:!0}),e))();function pM(e){var t;let n="undefined"!=typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],n),e[1]):e}function pw(e){var t;return null==(t=e.__r3f)?void 0:t.root.getState()}let pE={obj:e=>e===Object(e)&&!pE.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,nul:e=>null===e,arr:e=>Array.isArray(e),equ(e,t){let n,{arrays:r="shallow",objects:i="reference",strict:a=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(typeof e!=typeof t||!!e!=!!t)return!1;if(pE.str(e)||pE.num(e)||pE.boo(e))return e===t;let s=pE.obj(e);if(s&&"reference"===i)return e===t;let o=pE.arr(e);if(o&&"reference"===r)return e===t;if((o||s)&&e===t)return!0;for(n in e)if(!(n in t))return!1;if(s&&"shallow"===r&&"shallow"===i){for(n in a?t:e)if(!pE.equ(e[n],t[n],{strict:a,objects:"reference"}))return!1}else for(n in a?t:e)if(e[n]!==t[n])return!1;if(pE.und(n)){if(o&&0===e.length&&0===t.length||s&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}},pT=["children","key","ref"];function pA(e,t,n,r){let i=null==e?void 0:e.__r3f;return!i&&(i={root:t,type:n,parent:null,children:[],props:function(e){let t={};for(let n in e)pT.includes(n)||(t[n]=e[n]);return t}(r),object:e,eventCount:0,handlers:{},isHidden:!1},e&&(e.__r3f=i)),i}function pC(e,t){let n=e[t];if(!t.includes("-"))return{root:e,key:t,target:n};for(let i of(n=e,t.split("-"))){var r;t=i,e=n,n=null==(r=n)?void 0:r[t]}return{root:e,key:t,target:n}}let pR=/-\d+$/;function pP(e,t){if(pE.str(t.props.attach)){if(pR.test(t.props.attach)){let n=t.props.attach.replace(pR,""),{root:r,key:i}=pC(e.object,n);Array.isArray(r[i])||(r[i]=[])}let{root:n,key:r}=pC(e.object,t.props.attach);t.previousAttach=n[r],n[r]=t.object}else pE.fun(t.props.attach)&&(t.previousAttach=t.props.attach(e.object,t.object))}function pI(e,t){if(pE.str(t.props.attach)){let{root:n,key:r}=pC(e.object,t.props.attach),i=t.previousAttach;void 0===i?delete n[r]:n[r]=i}else null==t.previousAttach||t.previousAttach(e.object,t.object);delete t.previousAttach}let pL=[...pT,"args","dispose","attach","object","onUpdate","dispose"],pN=new Map,pD=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],pU=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function pO(e,t){var n,r;let i=e.__r3f,a=i&&pm(i).getState(),s=null==i?void 0:i.eventCount;for(let n in t){let s=t[n];if(pL.includes(n))continue;if(i&&pU.test(n)){"function"==typeof s?i.handlers[n]=s:delete i.handlers[n],i.eventCount=Object.keys(i.handlers).length;continue}if(void 0===s)continue;let{root:o,key:l,target:u}=pC(e,n);u instanceof r$&&s instanceof r$?u.mask=s.mask:u instanceof iE&&pv(s)?u.set(s):null!==u&&"object"==typeof u&&"function"==typeof u.set&&"function"==typeof u.copy&&null!=s&&s.constructor&&u.constructor===s.constructor?u.copy(s):null!==u&&"object"==typeof u&&"function"==typeof u.set&&Array.isArray(s)?"function"==typeof u.fromArray?u.fromArray(s):u.set(...s):null!==u&&"object"==typeof u&&"function"==typeof u.set&&"number"==typeof s?"function"==typeof u.setScalar?u.setScalar(s):u.set(s):(o[l]=s,a&&!a.linear&&pD.includes(l)&&null!=(r=o[l])&&r.isTexture&&o[l].format===e0&&o[l].type===ez&&(o[l].colorSpace=t$))}if(null!=i&&i.parent&&null!=a&&a.internal&&null!=(n=i.object)&&n.isObject3D&&s!==i.eventCount){let e=i.object,t=a.internal.interaction.indexOf(e);t>-1&&a.internal.interaction.splice(t,1),i.eventCount&&null!==e.raycast&&a.internal.interaction.push(e)}return i&&void 0===i.props.attach&&(i.object.isBufferGeometry?i.props.attach="geometry":i.object.isMaterial&&(i.props.attach="material")),i&&pF(i),e}function pF(e){var t;if(!e.parent)return;null==e.props.onUpdate||e.props.onUpdate(e.object);let n=null==(t=e.root)||null==t.getState?void 0:t.getState();n&&0===n.internal.frames&&n.invalidate()}function pk(e,t){!e.manual&&(e&&e.isOrthographicCamera?(e.left=-(t.width/2),e.right=t.width/2,e.top=t.height/2,e.bottom=-(t.height/2)):e.aspect=t.width/t.height,e.updateProjectionMatrix())}let pz=e=>null==e?void 0:e.isObject3D;function pB(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function pH(e,t,n,r){let i=n.get(t);i&&(n.delete(t),0===n.size&&(e.delete(r),i.target.releasePointerCapture(r)))}let pV=e=>!!(null!=e&&e.render),pG=h.createContext(null);function pW(){let e=h.useContext(pG);if(!e)throw Error("R3F: Hooks can only be used within the Canvas component!");return e}function pj(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e,t=arguments.length>1?arguments[1]:void 0;return pW()(e,t)}function pX(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=pW(),r=n.getState().internal.subscribe,i=p_(e);return py(()=>r(i,t,n),[t,r,n]),null}let pq=new WeakMap;function pY(e,t){return function(n){let r;for(var i,a=arguments.length,s=Array(a>1?a-1:0),o=1;onew Promise((n,i)=>r.load(e,e=>{pz(null==e?void 0:e.scene)&&Object.assign(e,function(e){let t={nodes:{},materials:{},meshes:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material),e.isMesh&&!t.meshes[e.name]&&(t.meshes[e.name]=e)}),t}(e.scene)),n(e)},t,t=>i(Error("Could not load ".concat(e,": ").concat(null==t?void 0:t.message)))))))}}function pJ(e,t,n,r){let i=Array.isArray(t)?t:[t],a=pn(pY(n,r),[e,...i],!1,{equal:pE.equ});return Array.isArray(t)?a:a[0]}pJ.preload=function(e,t,n){let r,i=Array.isArray(t)?t:[t];pn(pY(n),[e,...i],!0,r)},pJ.clear=function(e,t){var n=[e,...Array.isArray(t)?t:[t]];if(void 0===n||0===n.length)pe.splice(0,pe.length);else{let e=pe.find(e=>pt(n,e.keys,e.equal));e&&e.remove()}};let pZ={},pK=/^three(?=[A-Z])/,p$=e=>"".concat(e[0].toUpperCase()).concat(e.slice(1)),pQ=0;function p0(e){if("function"==typeof e){let t="".concat(pQ++);return pZ[t]=e,t}Object.assign(pZ,e)}function p1(e,t){let n=p$(e),r=pZ[n];if("primitive"!==e&&!r)throw Error("R3F: ".concat(n," is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively"));if("primitive"===e&&!t.object)throw Error("R3F: Primitives without 'object' are invalid!");if(void 0!==t.args&&!Array.isArray(t.args))throw Error("R3F: The args prop must be an array!")}function p2(e){if(e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?pP(e.parent,e):pz(e.object)&&!1!==e.props.visible&&(e.object.visible=!0),e.isHidden=!1,pF(e)}}function p3(e,t,n){let r=t.root.getState();if(e.parent||e.object===r.scene){if(!t.object){var i,a;let e=pZ[p$(t.type)];t.object=null!=(i=t.props.object)?i:new e(...null!=(a=t.props.args)?a:[]),t.object.__r3f=t}if(pO(t.object,t.props),t.props.attach)pP(e,t);else if(pz(t.object)&&pz(e.object)){let r=e.object.children.indexOf(null==n?void 0:n.object);if(n&&-1!==r){let n=e.object.children.indexOf(t.object);-1!==n?(e.object.children.splice(n,1),e.object.children.splice(n{try{e.dispose()}catch(e){}};"undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?t():(0,pi.unstable_scheduleCallback)(pi.unstable_IdlePriority,t)}}function p8(e,t,n){if(!t)return;t.parent=null;let r=e.children.indexOf(t);-1!==r&&e.children.splice(r,1),t.props.attach?pI(e,t):pz(t.object)&&pz(e.object)&&(e.object.remove(t.object),function(e,t){let{internal:n}=e.getState();n.interaction=n.interaction.filter(e=>e!==t),n.initialHits=n.initialHits.filter(e=>e!==t),n.hovered.forEach((e,r)=>{(e.eventObject===t||e.object===t)&&n.hovered.delete(r)}),n.capturedMap.forEach((e,r)=>{pH(n.capturedMap,t,e,r)})}(pm(t),t.object));let i=null!==t.props.dispose&&!1!==n;for(let e=t.children.length-1;e>=0;e--){let n=t.children[e];p8(t,n,i)}t.children.length=0,delete t.object.__r3f,i&&"primitive"!==t.type&&"Scene"!==t.object.type&&p6(t.object),void 0===n&&pF(t)}let p9=[],p7=()=>{},fe={},ft=0,fn=function(e){let t=(0,pr.default)(e);return t.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:h.version}),t}({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:function(e,t,n){var r;return p1(e=p$(e)in pZ?e:e.replace(pK,""),t),"primitive"===e&&null!=(r=t.object)&&r.__r3f&&delete t.object.__r3f,pA(t.object,n,e,t)},removeChild:p8,appendChild:p4,appendInitialChild:p4,insertBefore:p5,appendChildToContainer(e,t){let n=e.getState().scene.__r3f;t&&n&&p4(n,t)},removeChildFromContainer(e,t){let n=e.getState().scene.__r3f;t&&n&&p8(n,t)},insertInContainerBefore(e,t,n){let r=e.getState().scene.__r3f;t&&n&&r&&p5(r,t,n)},getRootHostContext:()=>fe,getChildHostContext:()=>fe,commitUpdate(e,t,n,r,i){var a,s,o;p1(t,r);let l=!1;if("primitive"===e.type&&n.object!==r.object||(null==(a=r.args)?void 0:a.length)!==(null==(s=n.args)?void 0:s.length)?l=!0:null!=(o=r.args)&&o.some((e,t)=>{var r;return e!==(null==(r=n.args)?void 0:r[t])})&&(l=!0),l)p9.push([e,{...r},i]);else{let t=function(e,t){let n={};for(let r in t)if(!pL.includes(r)&&!pE.equ(t[r],e.props[r]))for(let e in n[r]=t[r],t)e.startsWith("".concat(r,"-"))&&(n[e]=t[e]);for(let r in e.props){if(pL.includes(r)||t.hasOwnProperty(r))continue;let{root:i,key:a}=pC(e.object,r);if(i.constructor&&0===i.constructor.length){let e=function(e){let t=pN.get(e.constructor);try{t||(t=new e.constructor,pN.set(e.constructor,t))}catch(e){}return t}(i);pE.und(e)||(n[a]=e[a])}else n[a]=0}return n}(e,r);Object.keys(t).length&&(Object.assign(e.props,t),pO(e.object,t))}(null===i.sibling||(4&i.flags)==0)&&function(){for(let[e]of p9){let t=e.parent;if(t)for(let n of(e.props.attach?pI(t,e):pz(e.object)&&pz(t.object)&&t.object.remove(e.object),e.children))n.props.attach?pI(e,n):pz(n.object)&&pz(e.object)&&e.object.remove(n.object);e.isHidden&&p2(e),e.object.__r3f&&delete e.object.__r3f,"primitive"!==e.type&&p6(e.object)}for(let[r,i,a]of p9){r.props=i;let s=r.parent;if(s){let i=pZ[p$(r.type)];r.object=null!=(e=r.props.object)?e:new i(...null!=(t=r.props.args)?t:[]),r.object.__r3f=r;var e,t,n=r.object;for(let e of[a,a.alternate])if(null!==e)if("function"==typeof e.ref){null==e.refCleanup||e.refCleanup();let t=e.ref(n);"function"==typeof t&&(e.refCleanup=t)}else e.ref&&(e.ref.current=n);for(let e of(pO(r.object,r.props),r.props.attach?pP(s,r):pz(r.object)&&pz(s.object)&&s.object.add(r.object),r.children))e.props.attach?pP(r,e):pz(e.object)&&pz(r.object)&&r.object.add(e.object);pF(r)}}p9.length=0}()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:e=>null==e?void 0:e.object,prepareForCommit:()=>null,preparePortalMount:e=>pA(e.getState().scene,e,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:function(e){if(!e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?pI(e.parent,e):pz(e.object)&&(e.object.visible=!1),e.isHidden=!0,pF(e)}},unhideInstance:p2,createTextInstance:p7,hideTextInstance:p7,unhideTextInstance:p7,scheduleTimeout:"function"==typeof setTimeout?setTimeout:void 0,cancelTimeout:"function"==typeof clearTimeout?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:h.createContext(null),setCurrentUpdatePriority(e){ft=e},getCurrentUpdatePriority:()=>ft,resolveUpdatePriority(){var e;if(0!==ft)return ft;switch("undefined"!=typeof window&&(null==(e=window.event)?void 0:e.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return d.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return d.ContinuousEventPriority;default:return d.DefaultEventPriority}},resetFormInstance(){}}),fr=new Map,fi={objects:"shallow",strict:!1};function fa(e){let t,n,r=fr.get(e),i=null==r?void 0:r.fiber,a=null==r?void 0:r.store;r&&console.warn("R3F.createRoot should only be called once!");let s="function"==typeof reportError?reportError:console.error,o=a||((e,t)=>{let n=d7((n,r)=>{let i,a=new nX,s=new nX,o=new nX;function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r().camera,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r().size,{width:i,height:l,top:u,left:c}=n,h=i/l;t.isVector3?o.copy(t):o.set(...t);let d=e.getWorldPosition(a).distanceTo(o);if(e&&e.isOrthographicCamera)return{width:i/e.zoom,height:l/e.zoom,top:u,left:c,factor:1,distance:d,aspect:h};{let t=2*Math.tan(e.fov*Math.PI/180/2)*d,n=i/l*t;return{width:n,height:t,top:u,left:c,factor:i/n,distance:d,aspect:h}}}let u=e=>n(t=>({performance:{...t.performance,current:e}})),c=new nW;return{set:n,get:r,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return e(r(),t)},advance:(e,n)=>t(e,n,r()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new uM,pointer:c,mouse:c,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{let e=r();i&&clearTimeout(i),e.performance.current!==e.performance.min&&u(e.performance.min),i=setTimeout(()=>u(r().performance.max),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:l},setEvents:e=>n(t=>({...t,events:{...t.events,...e}})),setSize:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=r().camera,u={width:e,height:t,top:i,left:a};n(e=>({size:u,viewport:{...e.viewport,...l(o,s,u)}}))},setDpr:e=>n(t=>{let n=pM(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}}),setFrameloop:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"always",t=r().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),n(()=>({frameloop:e}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:h.createRef(),active:!1,frames:0,priority:0,subscribe:(e,t,n)=>{let i=r().internal;return i.priority=i.priority+ +(t>0),i.subscribers.push({ref:e,priority:t,store:n}),i.subscribers=i.subscribers.sort((e,t)=>e.priority-t.priority),()=>{let n=r().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(t>0),n.subscribers=n.subscribers.filter(t=>t.ref!==e))}}}}}),r=n.getState(),i=r.size,a=r.viewport.dpr,s=r.camera;return n.subscribe(()=>{let{camera:e,size:t,viewport:r,gl:o,set:l}=n.getState();if(t.width!==i.width||t.height!==i.height||r.dpr!==a){i=t,a=r.dpr,pk(e,t),r.dpr>0&&o.setPixelRatio(r.dpr);let n="undefined"!=typeof HTMLCanvasElement&&o.domElement instanceof HTMLCanvasElement;o.setSize(t.width,t.height,n)}e!==s&&(s=e,l(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),n.subscribe(t=>e(t)),n})(fS,fM),l=i||fn.createContainer(o,d.ConcurrentRoot,null,!1,null,"",s,s,s,null);r||fr.set(e,{fiber:l,store:o});let u=!1,c=null;return{async configure(){var r,i;let a,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c=new Promise(e=>a=e);let{gl:l,size:h,scene:d,events:p,onCreated:f,shadows:m=!1,linear:g=!1,flat:v=!1,legacy:y=!1,orthographic:_=!1,frameloop:w="always",dpr:E=[1,2],performance:T,raycaster:A,camera:C,onPointerMissed:R}=s,P=o.getState(),I=P.gl;if(!P.gl){let t={canvas:e,powerPreference:"high-performance",antialias:!0,alpha:!0},n="function"==typeof l?await l(t):l;I=pV(n)?n:new d2({...t,...l}),P.set({gl:I})}let L=P.raycaster;L||P.set({raycaster:L=new u4});let{params:N,...D}=A||{};if(pE.equ(D,L,fi)||pO(L,{...D}),pE.equ(N,L.params,fi)||pO(L,{params:{...L.params,...N}}),!P.camera||P.camera===n&&!pE.equ(n,C,fi)){n=C;let e=null==C?void 0:C.isCamera,t=e?C:_?new l7(0,0,0,0,.1,1e3):new af(75,0,.1,1e3);!e&&(t.position.z=5,C&&(pO(t,C),!t.manual&&("aspect"in C||"left"in C||"right"in C||"bottom"in C||"top"in C)&&(t.manual=!0,t.updateProjectionMatrix())),P.camera||null!=C&&C.rotation||t.lookAt(0,0,0)),P.set({camera:t}),L.camera=t}if(!P.scene){let e;null!=d&&d.isScene?pA(e=d,o,"",{}):(pA(e=new aM,o,"",{}),d&&pO(e,d)),P.set({scene:e})}p&&!P.events.handlers&&P.set({events:p(o)});let U=function(e,t){if(!t&&"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){let{width:t,height:n,top:r,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:n,top:r,left:i}}return!t&&"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0}:{width:0,height:0,top:0,left:0,...t}}(e,h);if(pE.equ(U,P.size,fi)||P.setSize(U.width,U.height,U.top,U.left),E&&P.viewport.dpr!==pM(E)&&P.setDpr(E),P.frameloop!==w&&P.setFrameloop(w),P.onPointerMissed||P.set({onPointerMissed:R}),T&&!pE.equ(T,P.performance,fi)&&P.set(e=>({performance:{...e.performance,...T}})),!P.xr){let e=(e,t)=>{let n=o.getState();"never"!==n.frameloop&&fM(e,!0,n,t)},t=()=>{let t=o.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||fS(t)},n={connect(){let e=o.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){let e=o.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};"function"==typeof(null==(r=I.xr)?void 0:r.addEventListener)&&n.connect(),P.set({xr:n})}if(I.shadowMap){let e=I.shadowMap.enabled,t=I.shadowMap.type;I.shadowMap.enabled=!!m,pE.boo(m)?I.shadowMap.type=S:pE.str(m)?I.shadowMap.type=null!=(i=({basic:x,percentage:b,soft:S,variance:M})[m])?i:S:pE.obj(m)&&Object.assign(I.shadowMap,m),(e!==I.shadowMap.enabled||t!==I.shadowMap.type)&&(I.shadowMap.needsUpdate=!0)}return n8.enabled=!y,u||(I.outputColorSpace=g?tQ:t$,I.toneMapping=v?ec:ef),P.legacy!==y&&P.set(()=>({legacy:y})),P.linear!==g&&P.set(()=>({linear:g})),P.flat!==v&&P.set(()=>({flat:v})),!l||pE.fun(l)||pV(l)||pE.equ(l,I,fi)||pO(I,l),t=f,u=!0,a(),this},render(n){return u||c||this.configure(),c.then(()=>{fn.updateContainer((0,pa.jsx)(fs,{store:o,children:n,onCreated:t,rootElement:e}),l,null,()=>void 0)}),o},unmount(){fo(e)}}}function fs(e){let{store:t,children:n,onCreated:r,rootElement:i}=e;return py(()=>{let e=t.getState();e.set(e=>({internal:{...e.internal,active:!0}})),r&&r(e),t.getState().events.connected||null==e.events.connect||e.events.connect(i)},[]),(0,pa.jsx)(pG.Provider,{value:t,children:n})}function fo(e,t){let n=fr.get(e),r=null==n?void 0:n.fiber;if(r){let i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),fn.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(a=i.gl)||null==a.forceContextLoss||a.forceContextLoss(),null!=(s=i.gl)&&s.xr&&i.xr.disconnect();var n,r,a,s,o=i.scene;for(let e in"Scene"!==o.type&&(null==o.dispose||o.dispose()),o){let t=o[e];(null==t?void 0:t.type)!=="Scene"&&(null==t||null==t.dispose||t.dispose())}fr.delete(e),t&&t(e)}catch(e){}},500)})}}function fl(e,t,n){return(0,pa.jsx)(fu,{children:e,container:t,state:n})}function fu(e){let{state:t={},children:n,container:r}=e,{events:i,size:a,...s}=t,o=pW(),[l]=h.useState(()=>new u4),[u]=h.useState(()=>new nW),c=p_((e,t)=>{let n;if(t.camera&&a){let r=t.camera;n=e.viewport.getCurrentViewport(r,new nX,a),r!==e.camera&&pk(r,a)}return{...e,...t,scene:r,raycaster:l,pointer:u,mouse:u,previousRoot:o,events:{...e.events,...t.events,...i},size:{...e.size,...a},viewport:{...e.viewport,...n},setEvents:e=>t.set(t=>({...t,events:{...t.events,...e}}))}}),d=h.useMemo(()=>{let e=d7((e,t)=>({...s,set:e,get:t})),t=t=>e.setState(e=>c.current(t,e));return t(o.getState()),o.subscribe(t),e},[o,r]);return(0,pa.jsx)(pa.Fragment,{children:fn.createPortal((0,pa.jsx)(pG.Provider,{value:d,children:n}),d,null)})}function fc(e,t){let n={callback:e};return t.add(n),()=>void t.delete(n)}let fh=new Set,fd=new Set,fp=new Set,ff=e=>fc(e,fh),fm=e=>fc(e,fd);function fg(e,t){if(e.size)for(let{callback:n}of e.values())n(t)}function fv(e,t){switch(e){case"before":return fg(fh,t);case"after":return fg(fd,t);case"tail":return fg(fp,t)}}function fy(e,t,n){let r=t.clock.getDelta();"never"===t.frameloop&&"number"==typeof e&&(r=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),s=t.internal.subscribers;for(let e=0;e0)&&!(null!=(t=c.gl.xr)&&t.isPresenting)&&(l+=fy(e,c))}if(fx=!1,fv("after",e),0===l)return fv("tail",e),f_=!1,cancelAnimationFrame(u)}function fS(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!e)return fr.forEach(e=>fS(e.store.getState(),n));(null==(t=e.gl.xr)||!t.isPresenting)&&e.internal.active&&"never"!==e.frameloop&&(n>1?e.internal.frames=Math.min(60,e.internal.frames+n):fx?e.internal.frames=2:e.internal.frames=1,f_||(f_=!0,requestAnimationFrame(fb)))}function fM(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(t&&fv("before",e),n)fy(e,n,r);else for(let t of fr.values())fy(e,t.store.getState());t&&fv("after",e)}let fw={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function fE(e){let{handlePointer:t}=function(e){function t(e){return e.filter(e=>["Move","Over","Enter","Out","Leave"].some(t=>{var n;return null==(n=e.__r3f)?void 0:n.handlers["onPointer"+t]}))}function n(t){let{internal:n}=e.getState();for(let e of n.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){let r=e.eventObject.__r3f;if(n.hovered.delete(pB(e)),null!=r&&r.eventCount){let n=r.handlers,i={...e,intersections:t};null==n.onPointerOut||n.onPointerOut(i),null==n.onPointerLeave||n.onPointerLeave(i)}}}function r(e,t){for(let n=0;nn([]);case"onLostPointerCapture":return t=>{let{internal:r}=e.getState();"pointerId"in t&&r.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{r.capturedMap.has(t.pointerId)&&(r.capturedMap.delete(t.pointerId),n([]))})}}return function(a){let{onPointerMissed:s,internal:o}=e.getState();o.lastEvent.current=a;let l="onPointerMove"===i,u="onClick"===i||"onContextMenu"===i||"onDoubleClick"===i,c=function(t,n){let r=e.getState(),i=new Set,a=[],s=n?n(r.internal.interaction):r.internal.interaction;for(let e=0;e{let n=pw(e.object),r=pw(t.object);return n&&r&&r.events.priority-n.events.priority||e.distance-t.distance}).filter(e=>{let t=pB(e);return!i.has(t)&&(i.add(t),!0)});for(let e of(r.events.filter&&(o=r.events.filter(o,r)),o)){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&r.internal.capturedMap.has(t.pointerId))for(let e of r.internal.capturedMap.get(t.pointerId).values())i.has(pB(e.intersection))||a.push(e.intersection);return a}(a,l?t:void 0),h=u?function(t){let{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}(a):0;"onPointerDown"===i&&(o.initialClick=[a.offsetX,a.offsetY],o.initialHits=c.map(e=>e.eventObject)),u&&!c.length&&h<=2&&(r(a,o.interaction),s&&s(a)),l&&n(c),!function(e,t,r,i){if(e.length){let a={stopped:!1};for(let s of e){let o=pw(s.object);if(o||s.object.traverseAncestors(e=>{let t=pw(e);if(t)return o=t,!1}),o){let{raycaster:l,pointer:u,camera:c,internal:h}=o,d=new nX(u.x,u.y,0).unproject(c),p=e=>{var t,n;return null!=(t=null==(n=h.capturedMap.get(e))?void 0:n.has(s.eventObject))&&t},f=e=>{let n={intersection:s,target:t.target};h.capturedMap.has(e)?h.capturedMap.get(e).set(s.eventObject,n):h.capturedMap.set(e,new Map([[s.eventObject,n]])),t.target.setPointerCapture(e)},m=e=>{let t=h.capturedMap.get(e);t&&pH(h.capturedMap,s.eventObject,t,e)},g={};for(let e in t){let n=t[e];"function"!=typeof n&&(g[e]=n)}let v={...s,...g,pointer:u,intersections:e,stopped:a.stopped,delta:r,unprojectedPoint:d,ray:l.ray,camera:c,stopPropagation(){let r="pointerId"in t&&h.capturedMap.get(t.pointerId);(!r||r.has(s.eventObject))&&(v.stopped=a.stopped=!0,h.hovered.size&&Array.from(h.hovered.values()).find(e=>e.eventObject===s.eventObject)&&n([...e.slice(0,e.indexOf(s)),s]))},target:{hasPointerCapture:p,setPointerCapture:f,releasePointerCapture:m},currentTarget:{hasPointerCapture:p,setPointerCapture:f,releasePointerCapture:m},nativeEvent:t};if(i(v),!0===a.stopped)break}}}}(c,a,h,function(e){let t=e.eventObject,n=t.__r3f;if(!(null!=n&&n.eventCount))return;let s=n.handlers;if(l){if(s.onPointerOver||s.onPointerEnter||s.onPointerOut||s.onPointerLeave){let t=pB(e),n=o.hovered.get(t);n?n.stopped&&e.stopPropagation():(o.hovered.set(t,e),null==s.onPointerOver||s.onPointerOver(e),null==s.onPointerEnter||s.onPointerEnter(e))}null==s.onPointerMove||s.onPointerMove(e)}else{let n=s[i];n?(!u||o.initialHits.includes(t))&&(r(a,o.interaction.filter(e=>!o.initialHits.includes(e))),n(e)):u&&o.initialHits.includes(t)&&r(a,o.interaction.filter(e=>!o.initialHits.includes(e)))}})}}}}(e);return{priority:1,enabled:!0,compute(e,t,n){t.pointer.set(e.offsetX/t.size.width*2-1,-(2*(e.offsetY/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(fw).reduce((e,n)=>({...e,[n]:t(n)}),{}),update:()=>{var t;let{events:n,internal:r}=e.getState();null!=(t=r.lastEvent)&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{let{set:n,events:r}=e.getState();if(null==r.disconnect||r.disconnect(),n(e=>({events:{...e.events,connected:t}})),r.handlers)for(let e in r.handlers){let n=r.handlers[e],[i,a]=fw[e];t.addEventListener(i,n,{passive:a})}},disconnect:()=>{let{set:t,events:n}=e.getState();if(n.connected){if(n.handlers)for(let e in n.handlers){let t=n.handlers[e],[r]=fw[e];n.connected.removeEventListener(r,t)}t(e=>({events:{...e.events,connected:void 0}}))}}}}},99749,e=>{"use strict";function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.s(["_",()=>t])},53487,(e,t,n)=>{"use strict";let r="[^".concat("\\\\/","]"),i="[^/]",a="(?:".concat("\\/","|$)"),s="(?:^|".concat("\\/",")"),o="".concat("\\.","{1,2}").concat(a),l="(?!".concat(s).concat(o,")"),u="(?!".concat("\\.","{0,1}").concat(a,")"),c="(?!".concat(o,")"),h={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:a,DOTS_SLASH:o,NO_DOT:"(?!".concat("\\.",")"),NO_DOTS:l,NO_DOT_SLASH:u,NO_DOTS_SLASH:c,QMARK_NO_DOT:"[^.".concat("\\/","]"),STAR:"".concat(i,"*?"),START_ANCHOR:s,SEP:"/"},d={...h,SLASH_LITERAL:"[".concat("\\\\/","]"),QMARK:r,STAR:"".concat(r,"*?"),DOTS_SLASH:"".concat("\\.","{1,2}(?:[").concat("\\\\/","]|$)"),NO_DOT:"(?!".concat("\\.",")"),NO_DOTS:"(?!(?:^|[".concat("\\\\/","])").concat("\\.","{1,2}(?:[").concat("\\\\/","]|$))"),NO_DOT_SLASH:"(?!".concat("\\.","{0,1}(?:[").concat("\\\\/","]|$))"),NO_DOTS_SLASH:"(?!".concat("\\.","{1,2}(?:[").concat("\\\\/","]|$))"),QMARK_NO_DOT:"[^.".concat("\\\\/","]"),START_ANCHOR:"(?:^|[".concat("\\\\/","])"),END_ANCHOR:"(?:[".concat("\\\\/","]|$)"),SEP:"\\"};t.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:"))".concat(e.STAR,")")},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?d:h}},19241,(e,t,n)=>{"use strict";var r=e.i(47167);let{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:a,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:o}=e.r(53487);n.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),n.hasRegexChars=e=>s.test(e),n.isRegexChar=e=>1===e.length&&n.hasRegexChars(e),n.escapeRegex=e=>e.replace(o,"\\$1"),n.toPosixSlashes=e=>e.replace(i,"/"),n.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){let e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return void 0!==r.default&&!!r.default.platform&&"win32"===r.default.platform},n.removeBackslashes=e=>e.replace(a,e=>"\\"===e?"":e),n.escapeLast=(e,t,r)=>{let i=e.lastIndexOf(t,r);return -1===i?e:"\\"===e[i-1]?n.escapeLast(e,t,i-1):"".concat(e.slice(0,i),"\\").concat(e.slice(i))},n.removePrefix=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},n.wrapOutput=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains?"":"^",i=n.contains?"":"$",a="".concat(r,"(?:").concat(e,")").concat(i);return!0===t.negated&&(a="(?:^(?!".concat(a,").*$)")),a},n.basename=function(e){let{windows:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}},26094,(e,t,n)=>{"use strict";let r=e.r(19241),{CHAR_ASTERISK:i,CHAR_AT:a,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:o,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:f,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:v,CHAR_RIGHT_SQUARE_BRACKET:y}=e.r(53487),_=e=>e===c||e===s,x=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let n,b,S=t||{},M=e.length-1,w=!0===S.parts||!0===S.scanToEnd,E=[],T=[],A=[],C=e,R=-1,P=0,I=0,L=!1,N=!1,D=!1,U=!1,O=!1,F=!1,k=!1,z=!1,B=!1,H=!1,V=0,G={value:"",depth:0,isGlob:!1},W=()=>R>=M,j=()=>C.charCodeAt(R+1),X=()=>(n=b,C.charCodeAt(++R));for(;R0&&(Y=C.slice(0,P),C=C.slice(P),I-=P),q&&!0===D&&I>0?(q=C.slice(0,I),J=C.slice(I)):!0===D?(q="",J=C):q=C,q&&""!==q&&"/"!==q&&q!==C&&_(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===S.unescape&&(J&&(J=r.removeBackslashes(J)),q&&!0===k&&(q=r.removeBackslashes(q)));let Z={prefix:Y,input:e,start:P,base:q,glob:J,isBrace:L,isBracket:N,isGlob:D,isExtglob:U,isGlobstar:O,negated:z,negatedExtglob:B};if(!0===S.tokens&&(Z.maxDepth=0,_(b)||T.push(G),Z.tokens=T),!0===S.parts||!0===S.tokens){let t;for(let n=0;n{"use strict";let r=e.r(53487),i=e.r(19241),{MAX_LENGTH:a,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:u}=r,c=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();let n="[".concat(e.join("-"),"]");try{new RegExp(n)}catch(t){return e.map(e=>i.escapeRegex(e)).join("..")}return n},h=(e,t)=>"Missing ".concat(e,': "').concat(t,'" - use "\\\\').concat(t,'" to match literal characters'),d=(e,t)=>{let n;if("string"!=typeof e)throw TypeError("Expected a string");e=u[e]||e;let p={...t},f="number"==typeof p.maxLength?Math.min(a,p.maxLength):a,m=e.length;if(m>f)throw SyntaxError("Input length: ".concat(m,", exceeds maximum allowed length: ").concat(f));let g={type:"bos",value:"",output:p.prepend||""},v=[g],y=p.capture?"":"?:",_=r.globChars(p.windows),x=r.extglobChars(_),{DOT_LITERAL:b,PLUS_LITERAL:S,SLASH_LITERAL:M,ONE_CHAR:w,DOTS_SLASH:E,NO_DOT:T,NO_DOT_SLASH:A,NO_DOTS_SLASH:C,QMARK:R,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:L}=_,N=e=>"(".concat(y,"(?:(?!").concat(L).concat(e.dot?E:b,").)*?)"),D=p.dot?"":T,U=p.dot?R:P,O=!0===p.bash?N(p):I;p.capture&&(O="(".concat(O,")")),"boolean"==typeof p.noext&&(p.noextglob=p.noext);let F={input:e,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};m=(e=i.removePrefix(e,F)).length;let k=[],z=[],B=[],H=g,V=()=>F.index===m-1,G=F.peek=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return e[F.index+t]},W=F.advance=()=>e[++F.index]||"",j=()=>e.slice(F.index+1),X=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;F.consumed+=e,F.index+=t},q=e=>{F.output+=null!=e.output?e.output:e.value,X(e.value)},Y=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)W(),F.start++,e++;return e%2!=0&&(F.negated=!0,F.start++,!0)},J=e=>{F[e]++,B.push(e)},Z=e=>{F[e]--,B.pop()},K=e=>{if("globstar"===H.type){let t=F.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||k.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(F.output=F.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=O,F.output+=H.output)}if(k.length&&"paren"!==e.type&&(k[k.length-1].inner+=e.value),(e.value||e.output)&&q(e),H&&"text"===H.type&&"text"===e.type){H.output=(H.output||H.value)+e.value,H.value+=e.value;return}e.prev=H,v.push(e),H=e},$=(e,t)=>{let n={...x[t],conditions:1,inner:""};n.prev=H,n.parens=F.parens,n.output=F.output;let r=(p.capture?"(":"")+n.open;J("parens"),K({type:e,value:t,output:F.output?"":w}),K({type:"paren",extglob:!0,value:W(),output:r}),k.push(n)},Q=e=>{let r,i=e.close+(p.capture?")":"");if("negate"===e.type){let n=O;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(n=N(p)),(n!==O||V()||/^\)+$/.test(j()))&&(i=e.close=")$))".concat(n)),e.inner.includes("*")&&(r=j())&&/^\.[^\\/.]+$/.test(r)){let a=d(r,{...t,fastpaths:!1}).output;i=e.close=")".concat(a,")").concat(n,")")}"bos"===e.prev.type&&(F.negatedExtglob=!0)}K({type:"paren",extglob:!0,value:n,output:i}),Z("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,r=e.replace(l,(e,t,r,i,a,s)=>"\\"===i?(n=!0,e):"?"===i?t?t+i+(a?R.repeat(a.length):""):0===s?U+(a?R.repeat(a.length):""):R.repeat(r.length):"."===i?b.repeat(r.length):"*"===i?t?t+i+(a?O:""):O:t?e:"\\".concat(e));return(!0===n&&(r=!0===p.unescape?r.replace(/\\/g,""):r.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),r===e&&!0===p.contains)?F.output=e:F.output=i.wrapOutput(r,F,t),F}for(;!V();){if("\0"===(n=W()))continue;if("\\"===n){let e=G();if("/"===e&&!0!==p.bash||"."===e||";"===e)continue;if(!e){K({type:"text",value:n+="\\"});continue}let t=/^\\+/.exec(j()),r=0;if(t&&t[0].length>2&&(r=t[0].length,F.index+=r,r%2!=0&&(n+="\\")),!0===p.unescape?n=W():n+=W(),0===F.brackets){K({type:"text",value:n});continue}}if(F.brackets>0&&("]"!==n||"["===H.value||"[^"===H.value)){if(!1!==p.posix&&":"===n){let e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){let e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=s[H.value.slice(e+2)];if(n){H.value=t+n,F.backtrack=!0,W(),g.output||1!==v.indexOf(H)||(g.output=w);continue}}}("["===n&&":"!==G()||"-"===n&&"]"===G())&&(n="\\".concat(n)),"]"===n&&("["===H.value||"[^"===H.value)&&(n="\\".concat(n)),!0===p.posix&&"!"===n&&"["===H.value&&(n="^"),H.value+=n,q({value:n});continue}if(1===F.quotes&&'"'!==n){n=i.escapeRegex(n),H.value+=n,q({value:n});continue}if('"'===n){F.quotes=+(1!==F.quotes),!0===p.keepQuotes&&K({type:"text",value:n});continue}if("("===n){J("parens"),K({type:"paren",value:n});continue}if(")"===n){if(0===F.parens&&!0===p.strictBrackets)throw SyntaxError(h("opening","("));let e=k[k.length-1];if(e&&F.parens===e.parens+1){Q(k.pop());continue}K({type:"paren",value:n,output:F.parens?")":"\\)"}),Z("parens");continue}if("["===n){if(!0!==p.nobracket&&j().includes("]"))J("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw SyntaxError(h("closing","]"));n="\\".concat(n)}K({type:"bracket",value:n});continue}if("]"===n){if(!0===p.nobracket||H&&"bracket"===H.type&&1===H.value.length){K({type:"text",value:n,output:"\\".concat(n)});continue}if(0===F.brackets){if(!0===p.strictBrackets)throw SyntaxError(h("opening","["));K({type:"text",value:n,output:"\\".concat(n)});continue}Z("brackets");let e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(n="/".concat(n)),H.value+=n,q({value:n}),!1===p.literalBrackets||i.hasRegexChars(e))continue;let t=i.escapeRegex(H.value);if(F.output=F.output.slice(0,-H.value.length),!0===p.literalBrackets){F.output+=t,H.value=t;continue}H.value="(".concat(y).concat(t,"|").concat(H.value,")"),F.output+=H.value;continue}if("{"===n&&!0!==p.nobrace){J("braces");let e={type:"brace",value:n,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};z.push(e),K(e);continue}if("}"===n){let e=z[z.length-1];if(!0===p.nobrace||!e){K({type:"text",value:n,output:n});continue}let t=")";if(!0===e.dots){let e=v.slice(),n=[];for(let t=e.length-1;t>=0&&(v.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=c(n,p),F.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){let r=F.output.slice(0,e.outputIndex),i=F.tokens.slice(e.tokensIndex);for(let a of(e.value=e.output="\\{",n=t="\\}",F.output=r,i))F.output+=a.output||a.value}K({type:"brace",value:n,output:t}),Z("braces"),z.pop();continue}if("|"===n){k.length>0&&k[k.length-1].conditions++,K({type:"text",value:n});continue}if(","===n){let e=n,t=z[z.length-1];t&&"braces"===B[B.length-1]&&(t.comma=!0,e="|"),K({type:"comma",value:n,output:e});continue}if("/"===n){if("dot"===H.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",v.pop(),H=g;continue}K({type:"slash",value:n,output:M});continue}if("."===n){if(F.braces>0&&"dot"===H.type){"."===H.value&&(H.output=b);let e=z[z.length-1];H.type="dots",H.output+=n,H.value+=n,e.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==H.type&&"slash"!==H.type){K({type:"text",value:n,output:b});continue}K({type:"dot",value:n,output:b});continue}if("?"===n){if(!(H&&"("===H.value)&&!0!==p.noextglob&&"("===G()&&"?"!==G(2)){$("qmark",n);continue}if(H&&"paren"===H.type){let e=G(),t=n;("("!==H.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(j()))||(t="\\".concat(n)),K({type:"text",value:n,output:t});continue}if(!0!==p.dot&&("slash"===H.type||"bos"===H.type)){K({type:"qmark",value:n,output:P});continue}K({type:"qmark",value:n,output:R});continue}if("!"===n){if(!0!==p.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){$("negate",n);continue}if(!0!==p.nonegate&&0===F.index){Y();continue}}if("+"===n){if(!0!==p.noextglob&&"("===G()&&"?"!==G(2)){$("plus",n);continue}if(H&&"("===H.value||!1===p.regex){K({type:"plus",value:n,output:S});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||F.parens>0){K({type:"plus",value:n});continue}K({type:"plus",value:S});continue}if("@"===n){if(!0!==p.noextglob&&"("===G()&&"?"!==G(2)){K({type:"at",extglob:!0,value:n,output:""});continue}K({type:"text",value:n});continue}if("*"!==n){("$"===n||"^"===n)&&(n="\\".concat(n));let e=o.exec(j());e&&(n+=e[0],F.index+=e[0].length),K({type:"text",value:n});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=n,H.output=O,F.backtrack=!0,F.globstar=!0,X(n);continue}let t=j();if(!0!==p.noextglob&&/^\([^?]/.test(t)){$("star",n);continue}if("star"===H.type){if(!0===p.noglobstar){X(n);continue}let r=H.prev,i=r.prev,a="slash"===r.type||"bos"===r.type,s=i&&("star"===i.type||"globstar"===i.type);if(!0===p.bash&&(!a||t[0]&&"/"!==t[0])){K({type:"star",value:n,output:""});continue}let o=F.braces>0&&("comma"===r.type||"brace"===r.type),l=k.length&&("pipe"===r.type||"paren"===r.type);if(!a&&"paren"!==r.type&&!o&&!l){K({type:"star",value:n,output:""});continue}for(;"/**"===t.slice(0,3);){let n=e[F.index+4];if(n&&"/"!==n)break;t=t.slice(3),X("/**",3)}if("bos"===r.type&&V()){H.type="globstar",H.value+=n,H.output=N(p),F.output=H.output,F.globstar=!0,X(n);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!s&&V()){F.output=F.output.slice(0,-(r.output+H.output).length),r.output="(?:".concat(r.output),H.type="globstar",H.output=N(p)+(p.strictSlashes?")":"|$)"),H.value+=n,F.globstar=!0,F.output+=r.output+H.output,X(n);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===t[0]){let e=void 0!==t[1]?"|$":"";F.output=F.output.slice(0,-(r.output+H.output).length),r.output="(?:".concat(r.output),H.type="globstar",H.output="".concat(N(p)).concat(M,"|").concat(M).concat(e,")"),H.value+=n,F.output+=r.output+H.output,F.globstar=!0,X(n+W()),K({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===t[0]){H.type="globstar",H.value+=n,H.output="(?:^|".concat(M,"|").concat(N(p)).concat(M,")"),F.output=H.output,F.globstar=!0,X(n+W()),K({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-H.output.length),H.type="globstar",H.output=N(p),H.value+=n,F.output+=H.output,F.globstar=!0,X(n);continue}let r={type:"star",value:n,output:O};if(!0===p.bash){r.output=".*?",("bos"===H.type||"slash"===H.type)&&(r.output=D+r.output),K(r);continue}if(H&&("bracket"===H.type||"paren"===H.type)&&!0===p.regex){r.output=n,K(r);continue}(F.index===F.start||"slash"===H.type||"dot"===H.type)&&("dot"===H.type?(F.output+=A,H.output+=A):!0===p.dot?(F.output+=C,H.output+=C):(F.output+=D,H.output+=D),"*"!==G()&&(F.output+=w,H.output+=w)),K(r)}for(;F.brackets>0;){if(!0===p.strictBrackets)throw SyntaxError(h("closing","]"));F.output=i.escapeLast(F.output,"["),Z("brackets")}for(;F.parens>0;){if(!0===p.strictBrackets)throw SyntaxError(h("closing",")"));F.output=i.escapeLast(F.output,"("),Z("parens")}for(;F.braces>0;){if(!0===p.strictBrackets)throw SyntaxError(h("closing","}"));F.output=i.escapeLast(F.output,"{"),Z("braces")}if(!0!==p.strictSlashes&&("star"===H.type||"bracket"===H.type)&&K({type:"maybe_slash",value:"",output:"".concat(M,"?")}),!0===F.backtrack)for(let e of(F.output="",F.tokens))F.output+=null!=e.output?e.output:e.value,e.suffix&&(F.output+=e.suffix);return F};d.fastpaths=(e,t)=>{let n={...t},s="number"==typeof n.maxLength?Math.min(a,n.maxLength):a,o=e.length;if(o>s)throw SyntaxError("Input length: ".concat(o,", exceeds maximum allowed length: ").concat(s));e=u[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:c,ONE_CHAR:h,DOTS_SLASH:d,NO_DOT:p,NO_DOTS:f,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:v}=r.globChars(n.windows),y=n.dot?f:p,_=n.dot?m:p,x=n.capture?"":"?:",b=!0===n.bash?".*?":g;n.capture&&(b="(".concat(b,")"));let S=e=>!0===e.noglobstar?b:"(".concat(x,"(?:(?!").concat(v).concat(e.dot?d:l,").)*?)"),M=e=>{switch(e){case"*":return"".concat(y).concat(h).concat(b);case".*":return"".concat(l).concat(h).concat(b);case"*.*":return"".concat(y).concat(b).concat(l).concat(h).concat(b);case"*/*":return"".concat(y).concat(b).concat(c).concat(h).concat(_).concat(b);case"**":return y+S(n);case"**/*":return"(?:".concat(y).concat(S(n)).concat(c,")?").concat(_).concat(h).concat(b);case"**/*.*":return"(?:".concat(y).concat(S(n)).concat(c,")?").concat(_).concat(b).concat(l).concat(h).concat(b);case"**/.*":return"(?:".concat(y).concat(S(n)).concat(c,")?").concat(l).concat(h).concat(b);default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=M(t[1]);if(!n)return;return n+l+t[2]}}},w=M(i.removePrefix(e,{negated:!1,prefix:""}));return w&&!0!==n.strictSlashes&&(w+="".concat(c,"?")),w},t.exports=d},53174,(e,t,n)=>{"use strict";let r=e.r(26094),i=e.r(17932),a=e.r(19241),s=e.r(53487),o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Array.isArray(e)){let r=e.map(e=>o(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=e&&"object"==typeof e&&!Array.isArray(e)&&e.tokens&&e.input;if(""===e||"string"!=typeof e&&!r)throw TypeError("Expected pattern to be a non-empty string");let i=t||{},a=i.windows,s=r?o.compileRe(e,t):o.makeRe(e,t,!1,!0),l=s.state;delete s.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=o(i.ignore,e,n)}let c=function(n){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{isMatch:c,match:h,output:d}=o.test(n,s,t,{glob:e,posix:a}),p={glob:e,state:l,regex:s,posix:a,input:n,output:d,match:h,isMatch:c};return("function"==typeof i.onResult&&i.onResult(p),!1===c)?(p.isMatch=!1,!!r&&p):u(n)?("function"==typeof i.onIgnore&&i.onIgnore(p),p.isMatch=!1,!!r&&p):("function"==typeof i.onMatch&&i.onMatch(p),!r||p)};return n&&(c.state=l),c};o.test=function(e,t,n){let{glob:r,posix:i}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("string"!=typeof e)throw TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};let s=n||{},l=s.format||(i?a.toPosixSlashes:null),u=e===r,c=u&&l?l(e):e;return!1===u&&(u=(c=l?l(e):e)===r),(!1===u||!0===s.capture)&&(u=!0===s.matchBase||!0===s.basename?o.matchBase(e,t,n,i):t.exec(c)),{isMatch:!!u,match:u,output:c}},o.matchBase=(e,t,n)=>(t instanceof RegExp?t:o.makeRe(t,n)).test(a.basename(e)),o.isMatch=(e,t,n)=>o(t,n)(e),o.parse=(e,t)=>Array.isArray(e)?e.map(e=>o.parse(e,t)):i(e,{...t,fastpaths:!1}),o.scan=(e,t)=>r(e,t),o.compileRe=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!0===n)return e.output;let i=t||{},a=i.contains?"":"^",s=i.contains?"":"$",l="".concat(a,"(?:").concat(e.output,")").concat(s);e&&!0===e.negated&&(l="^(?!".concat(l,").*$"));let u=o.toRegex(l,t);return!0===r&&(u.state=e),u},o.makeRe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e||"string"!=typeof e)throw TypeError("Expected a non-empty string");let a={negated:!1,fastpaths:!0};return!1!==t.fastpaths&&("."===e[0]||"*"===e[0])&&(a.output=i.fastpaths(e,t)),a.output||(a=i(e,t)),o.compileRe(a,t,n,r)},o.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},o.constants=s,t.exports=o},54970,(e,t,n)=>{"use strict";let r=e.r(53174),i=e.r(19241);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t&&(null===t.windows||void 0===t.windows)&&(t={...t,windows:i.isWindows()}),r(e,t,n)}Object.assign(a,r),t.exports=a},98223,71726,91996,e=>{"use strict";function t(e){return e.split(/(?:\r\n|\r|\n)/g).map(e=>e.trim()).filter(Boolean).filter(e=>!e.startsWith(";")).map(e=>{let t=e.match(/^(.+)\s(\d+)$/);if(!t)return{name:e,frameCount:1};{let e=parseInt(t[2],10);return{name:t[1],frameCount:e}}})}e.s(["parseImageFileList",()=>t],98223),e.s(["getActualResourceKey",()=>l,"getMissionInfo",()=>d,"getMissionList",()=>p,"getResourceKey",()=>a,"getResourceList",()=>u,"getResourceMap",()=>s,"getSourceAndPath",()=>o,"getStandardTextureResourceKey",()=>h],91996);var n=e.i(63738);function r(e){return e.replace(/\\/g,"/").replace(/\/+/g,"/")}e.s(["normalizePath",()=>r],71726);let i=n.default;function a(e){return r(e).toLowerCase()}function s(){return i.resources}function o(e){let[t,...n]=i.resources[e],[r,a]=n[n.length-1];return[r,null!=a?a:t]}function l(e){let t=a(e);if(i.resources[t])return t;let n=t.replace(/\d+(\.(png))$/i,"$1");if(i.resources[n])return n;throw Error("Resource not found in manifest: ".concat(e))}function u(){return Object.keys(i.resources)}let c=["",".jpg",".png",".gif",".bmp"];function h(e){let t=a(e);for(let e of c){let n="".concat(t).concat(e);if(i.resources[n])return n}return t}function d(e){let t=i.missions[e];if(!t)throw Error("Mission not found: ".concat(e));return t}function p(){return Object.keys(i.missions)}},92552,(e,t,n)=>{"use strict";let r,i;function a(e,t){return t.reduce((e,t)=>{let[n,r]=t;return{type:"BinaryExpression",operator:n,left:e,right:r}},e)}function s(e,t){return{type:"UnaryExpression",operator:e,argument:t}}class o extends SyntaxError{format(e){let t="Error: "+this.message;if(this.location){let n=null,r=e.find(e=>e.source===this.location.source);r&&(n=r.text.split(/\r\n|\n|\r/g));let i=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,s=this.location.source+":"+a.line+":"+a.column;if(n){let e=this.location.end,r="".padEnd(a.line.toString().length," "),o=n[i.line-1],l=(i.line===e.line?e.column:o.length+1)-i.column||1;t+="\n --> "+s+"\n"+r+" |\n"+a.line+" | "+o+"\n"+r+" | "+"".padEnd(i.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function n(e){return e.codePointAt(0).toString(16).toUpperCase()}let r=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function i(e){return r?e.replace(r,e=>"\\u{"+n(e)+"}"):e}function a(e){return i(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+n(e)))}function s(e){return i(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+n(e)))}let o={literal:e=>'"'+a(e.text)+'"',class(e){let t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return o[e.type](e)}return"Expected "+function(e){let t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let n=1;n]/,C=/^[+\-]/,R=/^[%*\/]/,P=/^[!\-~]/,I=/^[a-zA-Z_]/,L=/^[a-zA-Z0-9_]/,N=/^[ \t]/,D=/^[^"\\\n\r]/,U=/^[^'\\\n\r]/,O=/^[0-9a-fA-F]/,F=/^[0-9]/,k=/^[xX]/,z=/^[^\n\r]/,B=/^[\n\r]/,H=/^[ \t\n\r]/,V=tT(";",!1),G=tT("package",!1),W=tT("{",!1),j=tT("}",!1),X=tT("function",!1),q=tT("(",!1),Y=tT(")",!1),J=tT("::",!1),Z=tT(",",!1),K=tT("datablock",!1),$=tT(":",!1),Q=tT("new",!1),ee=tT("[",!1),et=tT("]",!1),en=tT("=",!1),er=tT(".",!1),ei=tT("if",!1),ea=tT("else",!1),es=tT("for",!1),eo=tT("while",!1),el=tT("do",!1),eu=tT("switch$",!1),ec=tT("switch",!1),eh=tT("case",!1),ed=tT("default",!1),ep=tT("or",!1),ef=tT("return",!1),em=tT("break",!1),eg=tT("continue",!1),ev=tT("+=",!1),ey=tT("-=",!1),e_=tT("*=",!1),ex=tT("/=",!1),eb=tT("%=",!1),eS=tT("<<=",!1),eM=tT(">>=",!1),ew=tT("&=",!1),eE=tT("|=",!1),eT=tT("^=",!1),eA=tT("?",!1),eC=tT("||",!1),eR=tT("&&",!1),eP=tT("|",!1),eI=tT("^",!1),eL=tT("&",!1),eN=tT("==",!1),eD=tT("!=",!1),eU=tT("<=",!1),eO=tT(">=",!1),eF=tA(["<",">"],!1,!1,!1),ek=tT("$=",!1),ez=tT("!$=",!1),eB=tT("@",!1),eH=tT("NL",!1),eV=tT("TAB",!1),eG=tT("SPC",!1),eW=tT("<<",!1),ej=tT(">>",!1),eX=tA(["+","-"],!1,!1,!1),eq=tA(["%","*","/"],!1,!1,!1),eY=tA(["!","-","~"],!1,!1,!1),eJ=tT("++",!1),eZ=tT("--",!1),eK=tT("*",!1),e$=tT("%",!1),eQ=tA([["a","z"],["A","Z"],"_"],!1,!1,!1),e0=tA([["a","z"],["A","Z"],["0","9"],"_"],!1,!1,!1),e1=tT("$",!1),e2=tT("parent",!1),e3=tA([" "," "],!1,!1,!1),e4=tT('"',!1),e5=tT("'",!1),e6=tT("\\",!1),e8=tA(['"',"\\","\n","\r"],!0,!1,!1),e9=tA(["'","\\","\n","\r"],!0,!1,!1),e7=tT("n",!1),te=tT("r",!1),tt=tT("t",!1),tn=tT("x",!1),tr=tA([["0","9"],["a","f"],["A","F"]],!1,!1,!1),ti=tT("cr",!1),ta=tT("cp",!1),ts=tT("co",!1),to=tT("c",!1),tl=tA([["0","9"]],!1,!1,!1),tu={type:"any"},tc=tT("0",!1),th=tA(["x","X"],!1,!1,!1),td=tT("-",!1),tp=tT("true",!1),tf=tT("false",!1),tm=tT("//",!1),tg=tA(["\n","\r"],!0,!1,!1),tv=tA(["\n","\r"],!1,!1,!1),ty=tT("/*",!1),t_=tT("*/",!1),tx=tA([" "," ","\n","\r"],!1,!1,!1),tb=0|t.peg$currPos,tS=[{line:1,column:1}],tM=tb,tw=t.peg$maxFailExpected||[],tE=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in c))throw Error("Can't start parsing from rule \""+t.startRule+'".');h=c[t.startRule]}function tT(e,t){return{type:"literal",text:e,ignoreCase:t}}function tA(e,t,n,r){return{type:"class",parts:e,inverted:t,ignoreCase:n,unicode:r}}function tC(t){let n,r=tS[t];if(r)return r;if(t>=tS.length)n=tS.length-1;else for(n=t;!tS[--n];);for(r={line:(r=tS[n]).line,column:r.column};ntM&&(tM=tb,tw=[]),tw.push(e))}function tI(){let e,t,n;for(nh(),e=[],t=tb,(n=nl())===l&&(n=tL()),n!==l?t=n=[n,nh()]:(tb=t,t=l);t!==l;)e.push(t),t=tb,(n=nl())===l&&(n=tL()),n!==l?t=n=[n,nh()]:(tb=t,t=l);return{type:"Program",body:e.map(e=>{let[t]=e;return t}).filter(Boolean),execScriptPaths:Array.from(r),hasDynamicExec:i}}function tL(){let t,n,r,i,a,s,o,u,c,h,f,_,x,w,E,T,A;return(t=function(){let t,n,r,i,a,s,o,u;if(t=tb,e.substr(tb,7)===d?(n=d,tb+=7):(n=l,0===tE&&tP(G)),n!==l)if(nc()!==l)if((r=nr())!==l)if(nu(),123===e.charCodeAt(tb)?(i="{",tb++):(i=l,0===tE&&tP(W)),i!==l){for(nh(),a=[],s=tb,(o=nl())===l&&(o=tL()),o!==l?s=o=[o,u=nh()]:(tb=s,s=l);s!==l;)a.push(s),s=tb,(o=nl())===l&&(o=tL()),o!==l?s=o=[o,u=nh()]:(tb=s,s=l);(125===e.charCodeAt(tb)?(s="}",tb++):(s=l,0===tE&&tP(j)),s!==l)?(o=nu(),59===e.charCodeAt(tb)?(u=";",tb++):(u=l,0===tE&&tP(V)),u===l&&(u=null),t={type:"PackageDeclaration",name:r,body:a.map(e=>{let[t]=e;return t}).filter(Boolean)}):(tb=t,t=l)}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o;if(t=tb,e.substr(tb,8)===p?(n=p,tb+=8):(n=l,0===tE&&tP(X)),n!==l)if(nc()!==l)if((r=function(){let t,n,r,i;if(t=tb,(n=nr())!==l)if("::"===e.substr(tb,2)?(r="::",tb+=2):(r=l,0===tE&&tP(J)),r!==l)if((i=nr())!==l)t={type:"MethodName",namespace:n,method:i};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t===l&&(t=nr()),t}())!==l)if(nu(),40===e.charCodeAt(tb)?(i="(",tb++):(i=l,0===tE&&tP(q)),i!==l)if(nu(),(a=function(){let t,n,r,i,a,s,o,u;if(t=tb,(n=nr())!==l){for(r=[],i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=nr())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=nr())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);t=[n,...r.map(e=>{let[,,,t]=e;return t})]}else tb=t,t=l;return t}())===l&&(a=null),nu(),41===e.charCodeAt(tb)?(s=")",tb++):(s=l,0===tE&&tP(Y)),s!==l)if(nu(),(o=tH())!==l)t={type:"FunctionDeclaration",name:r,params:a||[],body:o};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&((r=tb,(i=tN())!==l)?(nu(),59===e.charCodeAt(tb)?(a=";",tb++):(a=l,0===tE&&tP(V)),a===l&&(a=null),nu(),r=i):(tb=r,r=l),(t=r)===l&&((s=tb,(o=tD())!==l)?(nu(),59===e.charCodeAt(tb)?(u=";",tb++):(u=l,0===tE&&tP(V)),u===l&&(u=null),nu(),s=o):(tb=s,s=l),(t=s)===l&&(t=function(){let t,n,r,i,a,s,o,u,c,h,d;if(t=tb,"if"===e.substr(tb,2)?(n="if",tb+=2):(n=l,0===tE&&tP(ei)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(a=")",tb++):(a=l,0===tE&&tP(Y)),a!==l)if(nu(),(s=tL())!==l){var p;o=tb,u=nu(),e.substr(tb,4)===m?(c=m,tb+=4):(c=l,0===tE&&tP(ea)),c!==l?(h=nu(),(d=tL())!==l?o=u=[u,c,h,d]:(tb=o,o=l)):(tb=o,o=l),o===l&&(o=null),t={type:"IfStatement",test:i,consequent:s,alternate:(p=o)?p[3]:null}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o,u,c,h;if(t=tb,"for"===e.substr(tb,3)?(n="for",tb+=3):(n=l,0===tE&&tP(es)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())===l&&(i=null),nu(),59===e.charCodeAt(tb)?(a=";",tb++):(a=l,0===tE&&tP(V)),a!==l)if(nu(),(s=tV())===l&&(s=null),nu(),59===e.charCodeAt(tb)?(o=";",tb++):(o=l,0===tE&&tP(V)),o!==l)if(nu(),(u=tV())===l&&(u=null),nu(),41===e.charCodeAt(tb)?(c=")",tb++):(c=l,0===tE&&tP(Y)),c!==l)if(nu(),(h=tL())!==l){var d,p;d=i,p=s,t={type:"ForStatement",init:d,test:p,update:u,body:h}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o,u;if(t=tb,"do"===e.substr(tb,2)?(n="do",tb+=2):(n=l,0===tE&&tP(el)),n!==l)if(nu(),(r=tL())!==l)if(nu(),e.substr(tb,5)===g?(i=g,tb+=5):(i=l,0===tE&&tP(eo)),i!==l)if(nu(),40===e.charCodeAt(tb)?(a="(",tb++):(a=l,0===tE&&tP(q)),a!==l)if(nu(),(s=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(o=")",tb++):(o=l,0===tE&&tP(Y)),o!==l)nu(),59===e.charCodeAt(tb)?(u=";",tb++):(u=l,0===tE&&tP(V)),u===l&&(u=null),t={type:"DoWhileStatement",test:s,body:r};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s;if(t=tb,e.substr(tb,5)===g?(n=g,tb+=5):(n=l,0===tE&&tP(eo)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(a=")",tb++):(a=l,0===tE&&tP(Y)),a!==l)if(nu(),(s=tL())!==l)t={type:"WhileStatement",test:i,body:s};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o,u,c,h;if(t=tb,e.substr(tb,7)===v?(n=v,tb+=7):(n=l,0===tE&&tP(eu)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(a=")",tb++):(a=l,0===tE&&tP(Y)),a!==l)if(nu(),123===e.charCodeAt(tb)?(s="{",tb++):(s=l,0===tE&&tP(W)),s!==l){for(nh(),o=[],u=tb,(c=nl())===l&&(c=tB()),c!==l?u=c=[c,h=nh()]:(tb=u,u=l);u!==l;)o.push(u),u=tb,(c=nl())===l&&(c=tB()),c!==l?u=c=[c,h=nh()]:(tb=u,u=l);(125===e.charCodeAt(tb)?(u="}",tb++):(u=l,0===tE&&tP(j)),u!==l)?t={type:"SwitchStatement",stringMode:!0,discriminant:i,cases:o.map(e=>{let[t]=e;return t}).filter(e=>e&&"SwitchCase"===e.type)}:(tb=t,t=l)}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;if(t===l)if(t=tb,e.substr(tb,6)===y?(n=y,tb+=6):(n=l,0===tE&&tP(ec)),n!==l)if(nu(),40===e.charCodeAt(tb)?(r="(",tb++):(r=l,0===tE&&tP(q)),r!==l)if(nu(),(i=tV())!==l)if(nu(),41===e.charCodeAt(tb)?(a=")",tb++):(a=l,0===tE&&tP(Y)),a!==l)if(nu(),123===e.charCodeAt(tb)?(s="{",tb++):(s=l,0===tE&&tP(W)),s!==l){for(nh(),o=[],u=tb,(c=nl())===l&&(c=tB()),c!==l?u=c=[c,h=nh()]:(tb=u,u=l);u!==l;)o.push(u),u=tb,(c=nl())===l&&(c=tB()),c!==l?u=c=[c,h=nh()]:(tb=u,u=l);(125===e.charCodeAt(tb)?(u="}",tb++):(u=l,0===tE&&tP(j)),u!==l)?t={type:"SwitchStatement",stringMode:!1,discriminant:i,cases:o.map(e=>{let[t]=e;return t}).filter(e=>e&&"SwitchCase"===e.type)}:(tb=t,t=l)}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a;if(t=tb,e.substr(tb,6)===b?(n=b,tb+=6):(n=l,0===tE&&tP(ef)),n!==l)if(r=tb,(i=nc())!==l&&(a=tV())!==l?r=i=[i,a]:(tb=r,r=l),r===l&&(r=null),i=nu(),59===e.charCodeAt(tb)?(a=";",tb++):(a=l,0===tE&&tP(V)),a!==l){var s;t={type:"ReturnStatement",value:(s=r)?s[1]:null}}else tb=t,t=l;else tb=t,t=l;return t}())===l&&(c=tb,e.substr(tb,5)===S?(h=S,tb+=5):(h=l,0===tE&&tP(em)),h!==l?(nu(),59===e.charCodeAt(tb)?(f=";",tb++):(f=l,0===tE&&tP(V)),f!==l?c={type:"BreakStatement"}:(tb=c,c=l)):(tb=c,c=l),(t=c)===l&&(_=tb,e.substr(tb,8)===M?(x=M,tb+=8):(x=l,0===tE&&tP(eg)),x!==l?(nu(),59===e.charCodeAt(tb)?(w=";",tb++):(w=l,0===tE&&tP(V)),w!==l?_={type:"ContinueStatement"}:(tb=_,_=l)):(tb=_,_=l),(t=_)===l&&((E=tb,(T=tV())!==l&&(nu(),59===e.charCodeAt(tb)?(A=";",tb++):(A=l,0===tE&&tP(V)),A!==l))?E={type:"ExpressionStatement",expression:T}:(tb=E,E=l),(t=E)===l&&(t=tH())===l&&(t=nl())===l)))))&&(t=tb,nu(),59===e.charCodeAt(tb)?(n=";",tb++):(n=l,0===tE&&tP(V)),n!==l?(nu(),t=null):(tb=t,t=l)),t}function tN(){let t,n,r,i,a,s,o,u,c,h,d,p,m,g;if(t=tb,e.substr(tb,9)===f?(n=f,tb+=9):(n=l,0===tE&&tP(K)),n!==l)if(nc()!==l)if((r=nr())!==l)if(nu(),40===e.charCodeAt(tb)?(i="(",tb++):(i=l,0===tE&&tP(q)),i!==l)if(nu(),(a=tO())===l&&(a=null),nu(),41===e.charCodeAt(tb)?(s=")",tb++):(s=l,0===tE&&tP(Y)),s!==l){var v,y,_;if(nu(),o=tb,58===e.charCodeAt(tb)?(u=":",tb++):(u=l,0===tE&&tP($)),u!==l?(c=nu(),(h=nr())!==l?o=u=[u,c,h]:(tb=o,o=l)):(tb=o,o=l),o===l&&(o=null),u=nu(),c=tb,123===e.charCodeAt(tb)?(h="{",tb++):(h=l,0===tE&&tP(W)),h!==l){for(d=nu(),p=[],m=tU();m!==l;)p.push(m),m=tU();m=nu(),125===e.charCodeAt(tb)?(g="}",tb++):(g=l,0===tE&&tP(j)),g!==l?c=h=[h,d,p,m,g,nu()]:(tb=c,c=l)}else tb=c,c=l;c===l&&(c=null),v=a,y=o,_=c,t={type:"DatablockDeclaration",className:r,instanceName:v,parent:y?y[2]:null,body:_?_[2].filter(Boolean):[]}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}function tD(){let t,n,r,i,a,s,o,u,c,h,d,p;if(t=tb,"new"===e.substr(tb,3)?(n="new",tb+=3):(n=l,0===tE&&tP(Q)),n!==l)if(nc()!==l)if((r=function(){let t,n,r,i,a,s,o,u,c,h;if((t=tb,40===e.charCodeAt(tb)?(n="(",tb++):(n=l,0===tE&&tP(q)),n!==l&&(r=nu(),(i=tV())!==l&&(a=nu(),41===e.charCodeAt(tb)?(s=")",tb++):(s=l,0===tE&&tP(Y)),s!==l)))?t=i:(tb=t,t=l),t===l)if(t=tb,(n=nr())!==l){var d;for(r=[],i=tb,a=nu(),91===e.charCodeAt(tb)?(s="[",tb++):(s=l,0===tE&&tP(ee)),s!==l?(o=nu(),(u=tz())!==l?(c=nu(),93===e.charCodeAt(tb)?(h="]",tb++):(h=l,0===tE&&tP(et)),h!==l?i=a=[a,s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),91===e.charCodeAt(tb)?(s="[",tb++):(s=l,0===tE&&tP(ee)),s!==l?(o=nu(),(u=tz())!==l?(c=nu(),93===e.charCodeAt(tb)?(h="]",tb++):(h=l,0===tE&&tP(et)),h!==l?i=a=[a,s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);d=n,t=r.reduce((e,t)=>{let[,,,n]=t;return{type:"IndexExpression",object:e,index:n}},d)}else tb=t,t=l;return t}())!==l)if(nu(),40===e.charCodeAt(tb)?(i="(",tb++):(i=l,0===tE&&tP(q)),i!==l)if(nu(),(a=tO())===l&&(a=null),nu(),41===e.charCodeAt(tb)?(s=")",tb++):(s=l,0===tE&&tP(Y)),s!==l){var f;if(nu(),o=tb,123===e.charCodeAt(tb)?(u="{",tb++):(u=l,0===tE&&tP(W)),u!==l){for(c=nu(),h=[],d=tU();d!==l;)h.push(d),d=tU();d=nu(),125===e.charCodeAt(tb)?(p="}",tb++):(p=l,0===tE&&tP(j)),p!==l?o=u=[u,c,h,d,p,nu()]:(tb=o,o=l)}else tb=o,o=l;o===l&&(o=null),t={type:"ObjectDeclaration",className:r,instanceName:a,body:(f=o)?f[2].filter(Boolean):[]}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}function tU(){let t,n,r;return(t=tb,(n=tD())!==l)?(nu(),59===e.charCodeAt(tb)?(r=";",tb++):(r=l,0===tE&&tP(V)),r===l&&(r=null),nu(),t=n):(tb=t,t=l),t===l&&((t=tb,(n=tN())!==l)?(nu(),59===e.charCodeAt(tb)?(r=";",tb++):(r=l,0===tE&&tP(V)),r===l&&(r=null),nu(),t=n):(tb=t,t=l),t===l&&(t=function(){let t,n,r,i,a;if(t=tb,nu(),(n=tF())!==l)if(nu(),61===e.charCodeAt(tb)?(r="=",tb++):(r=l,0===tE&&tP(en)),r!==l)if(nu(),(i=tV())!==l)nu(),59===e.charCodeAt(tb)?(a=";",tb++):(a=l,0===tE&&tP(V)),a===l&&(a=null),nu(),t={type:"Assignment",target:n,value:i};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t}())===l&&(t=nl())===l&&(t=function(){let t,n;if(t=[],n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx)),n!==l)for(;n!==l;)t.push(n),n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx));else t=l;return t!==l&&(t=null),t}())),t}function tO(){let e;return(e=tQ())===l&&(e=nr())===l&&(e=no()),e}function tF(){let e,t,n,r;if(e=tb,(t=t9())!==l){for(n=[],r=tk();r!==l;)n.push(r),r=tk();e=n.reduce((e,t)=>"property"===t.type?{type:"MemberExpression",object:e,property:t.value}:{type:"IndexExpression",object:e,index:t.value},t)}else tb=e,e=l;return e}function tk(){let t,n,r,i;return(t=tb,46===e.charCodeAt(tb)?(n=".",tb++):(n=l,0===tE&&tP(er)),n!==l&&(nu(),(r=nr())!==l))?t={type:"property",value:r}:(tb=t,t=l),t===l&&((t=tb,91===e.charCodeAt(tb)?(n="[",tb++):(n=l,0===tE&&tP(ee)),n!==l&&(nu(),(r=tz())!==l&&(nu(),93===e.charCodeAt(tb)?(i="]",tb++):(i=l,0===tE&&tP(et)),i!==l)))?t={type:"index",value:r}:(tb=t,t=l)),t}function tz(){let t,n,r,i,a,s,o,u;if(t=tb,(n=tV())!==l){for(r=[],i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=tV())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=tV())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);t=r.length>0?[n,...r.map(e=>{let[,,,t]=e;return t})]:n}else tb=t,t=l;return t}function tB(){let t,n,r,i,a,s,o,u,c;if(t=tb,e.substr(tb,4)===_?(n=_,tb+=4):(n=l,0===tE&&tP(eh)),n!==l)if(nc()!==l)if((r=function(){let t,n,r,i,a,s,o,u;if(t=tb,(n=t4())!==l){for(r=[],i=tb,a=nu(),"or"===e.substr(tb,2)?(s="or",tb+=2):(s=l,0===tE&&tP(ep)),s!==l&&(o=nc())!==l&&(u=t4())!==l?i=a=[a,s,o,u]:(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),"or"===e.substr(tb,2)?(s="or",tb+=2):(s=l,0===tE&&tP(ep)),s!==l&&(o=nc())!==l&&(u=t4())!==l?i=a=[a,s,o,u]:(tb=i,i=l);t=r.length>0?[n,...r.map(e=>{let[,,,t]=e;return t})]:n}else tb=t,t=l;return t}())!==l)if(nu(),58===e.charCodeAt(tb)?(i=":",tb++):(i=l,0===tE&&tP($)),i!==l){for(a=nh(),s=[],o=tb,(u=nl())===l&&(u=tL()),u!==l?o=u=[u,c=nh()]:(tb=o,o=l);o!==l;)s.push(o),o=tb,(u=nl())===l&&(u=tL()),u!==l?o=u=[u,c=nh()]:(tb=o,o=l);t={type:"SwitchCase",test:r,consequent:s.map(e=>{let[t]=e;return t}).filter(Boolean)}}else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;if(t===l)if(t=tb,e.substr(tb,7)===x?(n=x,tb+=7):(n=l,0===tE&&tP(ed)),n!==l)if(nu(),58===e.charCodeAt(tb)?(r=":",tb++):(r=l,0===tE&&tP($)),r!==l){for(nh(),i=[],a=tb,(s=nl())===l&&(s=tL()),s!==l?a=s=[s,o=nh()]:(tb=a,a=l);a!==l;)i.push(a),a=tb,(s=nl())===l&&(s=tL()),s!==l?a=s=[s,o=nh()]:(tb=a,a=l);t={type:"SwitchCase",test:null,consequent:i.map(e=>{let[t]=e;return t}).filter(Boolean)}}else tb=t,t=l;else tb=t,t=l;return t}function tH(){let t,n,r,i,a,s;if(t=tb,123===e.charCodeAt(tb)?(n="{",tb++):(n=l,0===tE&&tP(W)),n!==l){for(nh(),r=[],i=tb,(a=nl())===l&&(a=tL()),a!==l?i=a=[a,s=nh()]:(tb=i,i=l);i!==l;)r.push(i),i=tb,(a=nl())===l&&(a=tL()),a!==l?i=a=[a,s=nh()]:(tb=i,i=l);(125===e.charCodeAt(tb)?(i="}",tb++):(i=l,0===tE&&tP(j)),i!==l)?t={type:"BlockStatement",body:r.map(e=>{let[t]=e;return t}).filter(Boolean)}:(tb=t,t=l)}else tb=t,t=l;return t}function tV(){let t,n,r,i;if(t=tb,(n=tF())!==l)if(nu(),(r=tG())!==l)if(nu(),(i=tV())!==l)t={type:"AssignmentExpression",operator:r,target:n,value:i};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t===l&&(t=function(){let t,n,r,i,a,s;if(t=tb,(n=tW())!==l)if(nu(),63===e.charCodeAt(tb)?(r="?",tb++):(r=l,0===tE&&tP(eA)),r!==l)if(nu(),(i=tV())!==l)if(nu(),58===e.charCodeAt(tb)?(a=":",tb++):(a=l,0===tE&&tP($)),a!==l)if(nu(),(s=tV())!==l)t={type:"ConditionalExpression",test:n,consequent:i,alternate:s};else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;else tb=t,t=l;return t===l&&(t=tW()),t}()),t}function tG(){let t;return 61===e.charCodeAt(tb)?(t="=",tb++):(t=l,0===tE&&tP(en)),t===l&&("+="===e.substr(tb,2)?(t="+=",tb+=2):(t=l,0===tE&&tP(ev)),t===l&&("-="===e.substr(tb,2)?(t="-=",tb+=2):(t=l,0===tE&&tP(ey)),t===l&&("*="===e.substr(tb,2)?(t="*=",tb+=2):(t=l,0===tE&&tP(e_)),t===l&&("/="===e.substr(tb,2)?(t="/=",tb+=2):(t=l,0===tE&&tP(ex)),t===l&&("%="===e.substr(tb,2)?(t="%=",tb+=2):(t=l,0===tE&&tP(eb)),t===l&&("<<="===e.substr(tb,3)?(t="<<=",tb+=3):(t=l,0===tE&&tP(eS)),t===l&&(">>="===e.substr(tb,3)?(t=">>=",tb+=3):(t=l,0===tE&&tP(eM)),t===l&&("&="===e.substr(tb,2)?(t="&=",tb+=2):(t=l,0===tE&&tP(ew)),t===l&&("|="===e.substr(tb,2)?(t="|=",tb+=2):(t=l,0===tE&&tP(eE)),t===l&&("^="===e.substr(tb,2)?(t="^=",tb+=2):(t=l,0===tE&&tP(eT)))))))))))),t}function tW(){let t,n,r,i,s,o,u,c;if(t=tb,(n=tj())!==l){for(r=[],i=tb,s=nu(),"||"===e.substr(tb,2)?(o="||",tb+=2):(o=l,0===tE&&tP(eC)),o!==l?(u=nu(),(c=tj())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),"||"===e.substr(tb,2)?(o="||",tb+=2):(o=l,0===tE&&tP(eC)),o!==l?(u=nu(),(c=tj())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tj(){let t,n,r,i,s,o,u,c;if(t=tb,(n=tX())!==l){for(r=[],i=tb,s=nu(),"&&"===e.substr(tb,2)?(o="&&",tb+=2):(o=l,0===tE&&tP(eR)),o!==l?(u=nu(),(c=tX())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),"&&"===e.substr(tb,2)?(o="&&",tb+=2):(o=l,0===tE&&tP(eR)),o!==l?(u=nu(),(c=tX())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tX(){let t,n,r,i,s,o,u,c,h;if(t=tb,(n=tq())!==l){for(r=[],i=tb,s=nu(),124===e.charCodeAt(tb)?(o="|",tb++):(o=l,0===tE&&tP(eP)),o!==l?(u=tb,tE++,124===e.charCodeAt(tb)?(c="|",tb++):(c=l,0===tE&&tP(eP)),tE--,c===l?u=void 0:(tb=u,u=l),u!==l?(c=nu(),(h=tq())!==l?i=s=[s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),124===e.charCodeAt(tb)?(o="|",tb++):(o=l,0===tE&&tP(eP)),o!==l?(u=tb,tE++,124===e.charCodeAt(tb)?(c="|",tb++):(c=l,0===tE&&tP(eP)),tE--,c===l?u=void 0:(tb=u,u=l),u!==l?(c=nu(),(h=tq())!==l?i=s=[s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tq(){let t,n,r,i,s,o,u,c;if(t=tb,(n=tY())!==l){for(r=[],i=tb,s=nu(),94===e.charCodeAt(tb)?(o="^",tb++):(o=l,0===tE&&tP(eI)),o!==l?(u=nu(),(c=tY())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),94===e.charCodeAt(tb)?(o="^",tb++):(o=l,0===tE&&tP(eI)),o!==l?(u=nu(),(c=tY())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tY(){let t,n,r,i,s,o,u,c,h;if(t=tb,(n=tJ())!==l){for(r=[],i=tb,s=nu(),38===e.charCodeAt(tb)?(o="&",tb++):(o=l,0===tE&&tP(eL)),o!==l?(u=tb,tE++,38===e.charCodeAt(tb)?(c="&",tb++):(c=l,0===tE&&tP(eL)),tE--,c===l?u=void 0:(tb=u,u=l),u!==l?(c=nu(),(h=tJ())!==l?i=s=[s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),38===e.charCodeAt(tb)?(o="&",tb++):(o=l,0===tE&&tP(eL)),o!==l?(u=tb,tE++,38===e.charCodeAt(tb)?(c="&",tb++):(c=l,0===tE&&tP(eL)),tE--,c===l?u=void 0:(tb=u,u=l),u!==l?(c=nu(),(h=tJ())!==l?i=s=[s,o,u,c,h]:(tb=i,i=l)):(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function tJ(){let e,t,n,r,i,s,o,u;if(e=tb,(t=tK())!==l){for(n=[],r=tb,i=nu(),(s=tZ())!==l?(o=nu(),(u=tK())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);r!==l;)n.push(r),r=tb,i=nu(),(s=tZ())!==l?(o=nu(),(u=tK())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);e=a(t,n.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=e,e=l;return e}function tZ(){let t;return"=="===e.substr(tb,2)?(t="==",tb+=2):(t=l,0===tE&&tP(eN)),t===l&&("!="===e.substr(tb,2)?(t="!=",tb+=2):(t=l,0===tE&&tP(eD))),t}function tK(){let e,t,n,r,i,s,o,u;if(e=tb,(t=tQ())!==l){for(n=[],r=tb,i=nu(),(s=t$())!==l?(o=nu(),(u=tQ())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);r!==l;)n.push(r),r=tb,i=nu(),(s=t$())!==l?(o=nu(),(u=tQ())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);e=a(t,n.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=e,e=l;return e}function t$(){let t;return"<="===e.substr(tb,2)?(t="<=",tb+=2):(t=l,0===tE&&tP(eU)),t===l&&(">="===e.substr(tb,2)?(t=">=",tb+=2):(t=l,0===tE&&tP(eO)),t===l&&(t=e.charAt(tb),A.test(t)?tb++:(t=l,0===tE&&tP(eF)))),t}function tQ(){let e,t,n,r,i,s,o,u;if(e=tb,(t=t2())!==l){for(n=[],r=tb,i=nu(),(s=t1())!==l?(o=nu(),(u=t0())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);r!==l;)n.push(r),r=tb,i=nu(),(s=t1())!==l?(o=nu(),(u=t0())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);e=a(t,n.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=e,e=l;return e}function t0(){let e,t,n,r;if(e=tb,(t=tF())!==l)if(nu(),(n=tG())!==l)if(nu(),(r=tV())!==l)e={type:"AssignmentExpression",operator:n,target:t,value:r};else tb=e,e=l;else tb=e,e=l;else tb=e,e=l;return e===l&&(e=t2()),e}function t1(){let t;return"$="===e.substr(tb,2)?(t="$=",tb+=2):(t=l,0===tE&&tP(ek)),t===l&&("!$="===e.substr(tb,3)?(t="!$=",tb+=3):(t=l,0===tE&&tP(ez)),t===l&&(64===e.charCodeAt(tb)?(t="@",tb++):(t=l,0===tE&&tP(eB)),t===l&&("NL"===e.substr(tb,2)?(t="NL",tb+=2):(t=l,0===tE&&tP(eH)),t===l&&("TAB"===e.substr(tb,3)?(t="TAB",tb+=3):(t=l,0===tE&&tP(eV)),t===l&&("SPC"===e.substr(tb,3)?(t="SPC",tb+=3):(t=l,0===tE&&tP(eG))))))),t}function t2(){let e,t,n,r,i,s,o,u;if(e=tb,(t=t4())!==l){for(n=[],r=tb,i=nu(),(s=t3())!==l?(o=nu(),(u=t4())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);r!==l;)n.push(r),r=tb,i=nu(),(s=t3())!==l?(o=nu(),(u=t4())!==l?r=i=[i,s,o,u]:(tb=r,r=l)):(tb=r,r=l);e=a(t,n.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=e,e=l;return e}function t3(){let t;return"<<"===e.substr(tb,2)?(t="<<",tb+=2):(t=l,0===tE&&tP(eW)),t===l&&(">>"===e.substr(tb,2)?(t=">>",tb+=2):(t=l,0===tE&&tP(ej))),t}function t4(){let t,n,r,i,s,o,u,c;if(t=tb,(n=t5())!==l){for(r=[],i=tb,s=nu(),o=e.charAt(tb),C.test(o)?tb++:(o=l,0===tE&&tP(eX)),o!==l?(u=nu(),(c=t5())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),o=e.charAt(tb),C.test(o)?tb++:(o=l,0===tE&&tP(eX)),o!==l?(u=nu(),(c=t5())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function t5(){let t,n,r,i,s,o,u,c;if(t=tb,(n=t6())!==l){for(r=[],i=tb,s=nu(),o=e.charAt(tb),R.test(o)?tb++:(o=l,0===tE&&tP(eq)),o!==l?(u=nu(),(c=t6())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,s=nu(),o=e.charAt(tb),R.test(o)?tb++:(o=l,0===tE&&tP(eq)),o!==l?(u=nu(),(c=t6())!==l?i=s=[s,o,u,c]:(tb=i,i=l)):(tb=i,i=l);t=a(n,r.map(e=>{let[,t,,n]=e;return[t,n]}))}else tb=t,t=l;return t}function t6(){let t,n,r;return(t=tb,n=e.charAt(tb),P.test(n)?tb++:(n=l,0===tE&&tP(eY)),n!==l&&(nu(),(r=t8())!==l))?t=s(n,r):(tb=t,t=l),t===l&&((t=tb,"++"===e.substr(tb,2)?(n="++",tb+=2):(n=l,0===tE&&tP(eJ)),n===l&&("--"===e.substr(tb,2)?(n="--",tb+=2):(n=l,0===tE&&tP(eZ))),n!==l&&(nu(),(r=t8())!==l))?t=s(n,r):(tb=t,t=l),t===l&&((t=tb,42===e.charCodeAt(tb)?(n="*",tb++):(n=l,0===tE&&tP(eK)),n!==l&&(nu(),(r=t8())!==l))?t={type:"TagDereferenceExpression",argument:r}:(tb=t,t=l),t===l&&(t=function(){let t,n,r;if(t=tb,(n=t9())!==l)if(nu(),"++"===e.substr(tb,2)?(r="++",tb+=2):(r=l,0===tE&&tP(eJ)),r===l&&("--"===e.substr(tb,2)?(r="--",tb+=2):(r=l,0===tE&&tP(eZ))),r!==l)t={type:"PostfixExpression",operator:r,argument:n};else tb=t,t=l;else tb=t,t=l;return t===l&&(t=t9()),t}()))),t}function t8(){let e,t,n,r;if(e=tb,(t=tF())!==l)if(nu(),(n=tG())!==l)if(nu(),(r=tV())!==l)e={type:"AssignmentExpression",operator:n,target:t,value:r};else tb=e,e=l;else tb=e,e=l;else tb=e,e=l;return e===l&&(e=t6()),e}function t9(){let t,n,a,s,o,u,c,h,d,p;if(t=tb,(n=function(){let t,n,r,i,a,s,o,u,c,h,d,p,f,m,g,v;if(t=tb,(o=tD())===l&&(o=tN())===l&&(o=function(){let t,n,r,i;if(t=tb,34===e.charCodeAt(tb)?(n='"',tb++):(n=l,0===tE&&tP(e4)),n!==l){for(r=[],i=ni();i!==l;)r.push(i),i=ni();(34===e.charCodeAt(tb)?(i='"',tb++):(i=l,0===tE&&tP(e4)),i!==l)?t={type:"StringLiteral",value:r.join("")}:(tb=t,t=l)}else tb=t,t=l;if(t===l)if(t=tb,39===e.charCodeAt(tb)?(n="'",tb++):(n=l,0===tE&&tP(e5)),n!==l){for(r=[],i=na();i!==l;)r.push(i),i=na();(39===e.charCodeAt(tb)?(i="'",tb++):(i=l,0===tE&&tP(e5)),i!==l)?t={type:"StringLiteral",value:r.join(""),tagged:!0}:(tb=t,t=l)}else tb=t,t=l;return t}())===l&&(o=no())===l&&((u=tb,e.substr(tb,4)===E?(c=E,tb+=4):(c=l,0===tE&&tP(tp)),c===l&&(e.substr(tb,5)===T?(c=T,tb+=5):(c=l,0===tE&&tP(tf))),c!==l&&(h=tb,tE++,d=np(),tE--,d===l?h=void 0:(tb=h,h=l),h!==l))?u={type:"BooleanLiteral",value:"true"===c}:(tb=u,u=l),(o=u)===l&&((p=ne())===l&&(p=nt())===l&&(p=nn()),(o=p)===l))&&((f=tb,40===e.charCodeAt(tb)?(m="(",tb++):(m=l,0===tE&&tP(q)),m!==l&&(nu(),(g=tV())!==l&&(nu(),41===e.charCodeAt(tb)?(v=")",tb++):(v=l,0===tE&&tP(Y)),v!==l)))?f=g:(tb=f,f=l),o=f),(n=o)!==l){for(r=[],i=tb,a=nu(),(s=tk())!==l?i=a=[a,s]:(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),(s=tk())!==l?i=a=[a,s]:(tb=i,i=l);t=r.reduce((e,t)=>{let[,n]=t;return"property"===n.type?{type:"MemberExpression",object:e,property:n.value}:{type:"IndexExpression",object:e,index:n.value}},n)}else tb=t,t=l;return t}())!==l){for(a=[],s=tb,o=nu(),40===e.charCodeAt(tb)?(u="(",tb++):(u=l,0===tE&&tP(q)),u!==l?(c=nu(),(h=t7())===l&&(h=null),d=nu(),41===e.charCodeAt(tb)?(p=")",tb++):(p=l,0===tE&&tP(Y)),p!==l?s=o=[o,u,c,h,d,p]:(tb=s,s=l)):(tb=s,s=l),s===l&&(s=tb,o=nu(),(u=tk())!==l?s=o=[o,u]:(tb=s,s=l));s!==l;)a.push(s),s=tb,o=nu(),40===e.charCodeAt(tb)?(u="(",tb++):(u=l,0===tE&&tP(q)),u!==l?(c=nu(),(h=t7())===l&&(h=null),d=nu(),41===e.charCodeAt(tb)?(p=")",tb++):(p=l,0===tE&&tP(Y)),p!==l?s=o=[o,u,c,h,d,p]:(tb=s,s=l)):(tb=s,s=l),s===l&&(s=tb,o=nu(),(u=tk())!==l?s=o=[o,u]:(tb=s,s=l));t=a.reduce((e,t)=>{if("("===t[1]){var n;let[,,,a]=t;return n=a||[],"Identifier"===e.type&&"exec"===e.name.toLowerCase()&&(n.length>0&&"StringLiteral"===n[0].type?r.add(n[0].value):i=!0),{type:"CallExpression",callee:e,arguments:n}}let a=t[1];return"property"===a.type?{type:"MemberExpression",object:e,property:a.value}:{type:"IndexExpression",object:e,index:a.value}},n)}else tb=t,t=l;return t}function t7(){let t,n,r,i,a,s,o,u;if(t=tb,(n=tV())!==l){for(r=[],i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=tV())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=nu(),44===e.charCodeAt(tb)?(s=",",tb++):(s=l,0===tE&&tP(Z)),s!==l?(o=nu(),(u=tV())!==l?i=a=[a,s,o,u]:(tb=i,i=l)):(tb=i,i=l);t=[n,...r.map(e=>{let[,,,t]=e;return t})]}else tb=t,t=l;return t}function ne(){let t,n,r,i,a,s,o;if(t=tb,37===e.charCodeAt(tb)?(n="%",tb++):(n=l,0===tE&&tP(e$)),n!==l){if(r=tb,i=tb,a=e.charAt(tb),I.test(a)?tb++:(a=l,0===tE&&tP(eQ)),a!==l){for(s=[],o=e.charAt(tb),L.test(o)?tb++:(o=l,0===tE&&tP(e0));o!==l;)s.push(o),o=e.charAt(tb),L.test(o)?tb++:(o=l,0===tE&&tP(e0));i=a=[a,s]}else tb=i,i=l;(r=i!==l?e.substring(r,tb):i)!==l?t={type:"Variable",scope:"local",name:r}:(tb=t,t=l)}else tb=t,t=l;return t}function nt(){let t,n,r,i,a,s,o,u,c,h,d,p,f;if(t=tb,36===e.charCodeAt(tb)?(n="$",tb++):(n=l,0===tE&&tP(e1)),n!==l){if(r=tb,i=tb,"::"===e.substr(tb,2)?(a="::",tb+=2):(a=l,0===tE&&tP(J)),a===l&&(a=null),s=e.charAt(tb),I.test(s)?tb++:(s=l,0===tE&&tP(eQ)),s!==l){for(o=[],u=e.charAt(tb),L.test(u)?tb++:(u=l,0===tE&&tP(e0));u!==l;)o.push(u),u=e.charAt(tb),L.test(u)?tb++:(u=l,0===tE&&tP(e0));if(u=[],c=tb,"::"===e.substr(tb,2)?(h="::",tb+=2):(h=l,0===tE&&tP(J)),h!==l)if(d=e.charAt(tb),I.test(d)?tb++:(d=l,0===tE&&tP(eQ)),d!==l){for(p=[],f=e.charAt(tb),L.test(f)?tb++:(f=l,0===tE&&tP(e0));f!==l;)p.push(f),f=e.charAt(tb),L.test(f)?tb++:(f=l,0===tE&&tP(e0));c=h=[h,d,p]}else tb=c,c=l;else tb=c,c=l;for(;c!==l;)if(u.push(c),c=tb,"::"===e.substr(tb,2)?(h="::",tb+=2):(h=l,0===tE&&tP(J)),h!==l)if(d=e.charAt(tb),I.test(d)?tb++:(d=l,0===tE&&tP(eQ)),d!==l){for(p=[],f=e.charAt(tb),L.test(f)?tb++:(f=l,0===tE&&tP(e0));f!==l;)p.push(f),f=e.charAt(tb),L.test(f)?tb++:(f=l,0===tE&&tP(e0));c=h=[h,d,p]}else tb=c,c=l;else tb=c,c=l;i=a=[a,s,o,u]}else tb=i,i=l;(r=i!==l?e.substring(r,tb):i)!==l?t={type:"Variable",scope:"global",name:r}:(tb=t,t=l)}else tb=t,t=l;return t}function nn(){let t,n,r,i,a,s,o,u,c,h,d;if(t=tb,n=tb,r=tb,e.substr(tb,6)===w?(i=w,tb+=6):(i=l,0===tE&&tP(e2)),i!==l){for(a=[],s=e.charAt(tb),N.test(s)?tb++:(s=l,0===tE&&tP(e3));s!==l;)a.push(s),s=e.charAt(tb),N.test(s)?tb++:(s=l,0===tE&&tP(e3));if("::"===e.substr(tb,2)?(s="::",tb+=2):(s=l,0===tE&&tP(J)),s!==l){for(o=[],u=e.charAt(tb),N.test(u)?tb++:(u=l,0===tE&&tP(e3));u!==l;)o.push(u),u=e.charAt(tb),N.test(u)?tb++:(u=l,0===tE&&tP(e3));if(u=e.charAt(tb),I.test(u)?tb++:(u=l,0===tE&&tP(eQ)),u!==l){for(c=[],h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));h!==l;)c.push(h),h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));r=i=[i,a,s,o,u,c]}else tb=r,r=l}else tb=r,r=l}else tb=r,r=l;if((n=r!==l?e.substring(n,tb):r)!==l&&(n={type:"Identifier",name:n.replace(/\s+/g,"")}),(t=n)===l){if(t=tb,n=tb,r=tb,e.substr(tb,6)===w?(i=w,tb+=6):(i=l,0===tE&&tP(e2)),i!==l){if(a=[],s=tb,"::"===e.substr(tb,2)?(o="::",tb+=2):(o=l,0===tE&&tP(J)),o!==l)if(u=e.charAt(tb),I.test(u)?tb++:(u=l,0===tE&&tP(eQ)),u!==l){for(c=[],h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));h!==l;)c.push(h),h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));s=o=[o,u,c]}else tb=s,s=l;else tb=s,s=l;if(s!==l)for(;s!==l;)if(a.push(s),s=tb,"::"===e.substr(tb,2)?(o="::",tb+=2):(o=l,0===tE&&tP(J)),o!==l)if(u=e.charAt(tb),I.test(u)?tb++:(u=l,0===tE&&tP(eQ)),u!==l){for(c=[],h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));h!==l;)c.push(h),h=e.charAt(tb),L.test(h)?tb++:(h=l,0===tE&&tP(e0));s=o=[o,u,c]}else tb=s,s=l;else tb=s,s=l;else a=l;a!==l?r=i=[i,a]:(tb=r,r=l)}else tb=r,r=l;if((n=r!==l?e.substring(n,tb):r)!==l&&(n={type:"Identifier",name:n}),(t=n)===l){if(t=tb,n=tb,r=tb,i=e.charAt(tb),I.test(i)?tb++:(i=l,0===tE&&tP(eQ)),i!==l){for(a=[],s=e.charAt(tb),L.test(s)?tb++:(s=l,0===tE&&tP(e0));s!==l;)a.push(s),s=e.charAt(tb),L.test(s)?tb++:(s=l,0===tE&&tP(e0));if(s=[],o=tb,"::"===e.substr(tb,2)?(u="::",tb+=2):(u=l,0===tE&&tP(J)),u!==l)if(c=e.charAt(tb),I.test(c)?tb++:(c=l,0===tE&&tP(eQ)),c!==l){for(h=[],d=e.charAt(tb),L.test(d)?tb++:(d=l,0===tE&&tP(e0));d!==l;)h.push(d),d=e.charAt(tb),L.test(d)?tb++:(d=l,0===tE&&tP(e0));o=u=[u,c,h]}else tb=o,o=l;else tb=o,o=l;for(;o!==l;)if(s.push(o),o=tb,"::"===e.substr(tb,2)?(u="::",tb+=2):(u=l,0===tE&&tP(J)),u!==l)if(c=e.charAt(tb),I.test(c)?tb++:(c=l,0===tE&&tP(eQ)),c!==l){for(h=[],d=e.charAt(tb),L.test(d)?tb++:(d=l,0===tE&&tP(e0));d!==l;)h.push(d),d=e.charAt(tb),L.test(d)?tb++:(d=l,0===tE&&tP(e0));o=u=[u,c,h]}else tb=o,o=l;else tb=o,o=l;r=i=[i,a,s]}else tb=r,r=l;(n=r!==l?e.substring(n,tb):r)!==l&&(n={type:"Identifier",name:n}),t=n}}return t}function nr(){let e;return(e=ne())===l&&(e=nt())===l&&(e=nn()),e}function ni(){let t,n,r;return(t=tb,92===e.charCodeAt(tb)?(n="\\",tb++):(n=l,0===tE&&tP(e6)),n!==l&&(r=ns())!==l)?t=r:(tb=t,t=l),t===l&&(t=e.charAt(tb),D.test(t)?tb++:(t=l,0===tE&&tP(e8))),t}function na(){let t,n,r;return(t=tb,92===e.charCodeAt(tb)?(n="\\",tb++):(n=l,0===tE&&tP(e6)),n!==l&&(r=ns())!==l)?t=r:(tb=t,t=l),t===l&&(t=e.charAt(tb),U.test(t)?tb++:(t=l,0===tE&&tP(e9))),t}function ns(){let t,n,r,i,a,s;return t=tb,110===e.charCodeAt(tb)?(n="n",tb++):(n=l,0===tE&&tP(e7)),n!==l&&(n="\n"),(t=n)===l&&(t=tb,114===e.charCodeAt(tb)?(n="r",tb++):(n=l,0===tE&&tP(te)),n!==l&&(n="\r"),(t=n)===l)&&(t=tb,116===e.charCodeAt(tb)?(n="t",tb++):(n=l,0===tE&&tP(tt)),n!==l&&(n=" "),(t=n)===l)&&((t=tb,120===e.charCodeAt(tb)?(n="x",tb++):(n=l,0===tE&&tP(tn)),n!==l&&(r=tb,i=tb,a=e.charAt(tb),O.test(a)?tb++:(a=l,0===tE&&tP(tr)),a!==l?(s=e.charAt(tb),O.test(s)?tb++:(s=l,0===tE&&tP(tr)),s!==l?i=a=[a,s]:(tb=i,i=l)):(tb=i,i=l),(r=i!==l?e.substring(r,tb):i)!==l))?t=String.fromCharCode(parseInt(r,16)):(tb=t,t=l),t===l&&(t=tb,"cr"===e.substr(tb,2)?(n="cr",tb+=2):(n=l,0===tE&&tP(ti)),n!==l&&(n="\x0f"),(t=n)===l&&(t=tb,"cp"===e.substr(tb,2)?(n="cp",tb+=2):(n=l,0===tE&&tP(ta)),n!==l&&(n="\x10"),(t=n)===l))&&(t=tb,"co"===e.substr(tb,2)?(n="co",tb+=2):(n=l,0===tE&&tP(ts)),n!==l&&(n="\x11"),(t=n)===l)&&((t=tb,99===e.charCodeAt(tb)?(n="c",tb++):(n=l,0===tE&&tP(to)),n!==l&&(r=e.charAt(tb),F.test(r)?tb++:(r=l,0===tE&&tP(tl)),r!==l))?t=String.fromCharCode([2,3,4,5,6,7,8,11,12,14][parseInt(r,10)]):(tb=t,t=l),t===l&&(t=tb,e.length>tb?(n=e.charAt(tb),tb++):(n=l,0===tE&&tP(tu)),t=n))),t}function no(){let t,n,r,i,a,s,o,u,c;if(t=tb,n=tb,r=tb,48===e.charCodeAt(tb)?(i="0",tb++):(i=l,0===tE&&tP(tc)),i!==l)if(a=e.charAt(tb),k.test(a)?tb++:(a=l,0===tE&&tP(th)),a!==l){if(s=[],o=e.charAt(tb),O.test(o)?tb++:(o=l,0===tE&&tP(tr)),o!==l)for(;o!==l;)s.push(o),o=e.charAt(tb),O.test(o)?tb++:(o=l,0===tE&&tP(tr));else s=l;s!==l?r=i=[i,a,s]:(tb=r,r=l)}else tb=r,r=l;else tb=r,r=l;if((n=r!==l?e.substring(n,tb):r)!==l&&(r=tb,tE++,i=np(),tE--,i===l?r=void 0:(tb=r,r=l),r!==l)?t={type:"NumberLiteral",value:parseInt(n,16)}:(tb=t,t=l),t===l){if(t=tb,n=tb,r=tb,45===e.charCodeAt(tb)?(i="-",tb++):(i=l,0===tE&&tP(td)),i===l&&(i=null),a=[],s=e.charAt(tb),F.test(s)?tb++:(s=l,0===tE&&tP(tl)),s!==l)for(;s!==l;)a.push(s),s=e.charAt(tb),F.test(s)?tb++:(s=l,0===tE&&tP(tl));else a=l;if(a!==l){if(s=tb,46===e.charCodeAt(tb)?(o=".",tb++):(o=l,0===tE&&tP(er)),o!==l){if(u=[],c=e.charAt(tb),F.test(c)?tb++:(c=l,0===tE&&tP(tl)),c!==l)for(;c!==l;)u.push(c),c=e.charAt(tb),F.test(c)?tb++:(c=l,0===tE&&tP(tl));else u=l;u!==l?s=o=[o,u]:(tb=s,s=l)}else tb=s,s=l;s===l&&(s=null),r=i=[i,a,s]}else tb=r,r=l;if(r===l)if(r=tb,45===e.charCodeAt(tb)?(i="-",tb++):(i=l,0===tE&&tP(td)),i===l&&(i=null),46===e.charCodeAt(tb)?(a=".",tb++):(a=l,0===tE&&tP(er)),a!==l){if(s=[],o=e.charAt(tb),F.test(o)?tb++:(o=l,0===tE&&tP(tl)),o!==l)for(;o!==l;)s.push(o),o=e.charAt(tb),F.test(o)?tb++:(o=l,0===tE&&tP(tl));else s=l;s!==l?r=i=[i,a,s]:(tb=r,r=l)}else tb=r,r=l;(n=r!==l?e.substring(n,tb):r)!==l&&(r=tb,tE++,i=np(),tE--,i===l?r=void 0:(tb=r,r=l),r!==l)?t={type:"NumberLiteral",value:parseFloat(n)}:(tb=t,t=l)}return t}function nl(){let t;return(t=function(){let t,n,r,i,a;if(t=tb,"//"===e.substr(tb,2)?(n="//",tb+=2):(n=l,0===tE&&tP(tm)),n!==l){for(r=tb,i=[],a=e.charAt(tb),z.test(a)?tb++:(a=l,0===tE&&tP(tg));a!==l;)i.push(a),a=e.charAt(tb),z.test(a)?tb++:(a=l,0===tE&&tP(tg));r=e.substring(r,tb),i=e.charAt(tb),B.test(i)?tb++:(i=l,0===tE&&tP(tv)),i===l&&(i=null),t={type:"Comment",value:r}}else tb=t,t=l;return t}())===l&&(t=function(){let t,n,r,i,a,s,o;if(t=tb,"/*"===e.substr(tb,2)?(n="/*",tb+=2):(n=l,0===tE&&tP(ty)),n!==l){for(r=tb,i=[],a=tb,s=tb,tE++,"*/"===e.substr(tb,2)?(o="*/",tb+=2):(o=l,0===tE&&tP(t_)),tE--,o===l?s=void 0:(tb=s,s=l),s!==l?(e.length>tb?(o=e.charAt(tb),tb++):(o=l,0===tE&&tP(tu)),o!==l?a=s=[s,o]:(tb=a,a=l)):(tb=a,a=l);a!==l;)i.push(a),a=tb,s=tb,tE++,"*/"===e.substr(tb,2)?(o="*/",tb+=2):(o=l,0===tE&&tP(t_)),tE--,o===l?s=void 0:(tb=s,s=l),s!==l?(e.length>tb?(o=e.charAt(tb),tb++):(o=l,0===tE&&tP(tu)),o!==l?a=s=[s,o]:(tb=a,a=l)):(tb=a,a=l);(r=e.substring(r,tb),"*/"===e.substr(tb,2)?(i="*/",tb+=2):(i=l,0===tE&&tP(t_)),i!==l)?t={type:"Comment",value:r}:(tb=t,t=l)}else tb=t,t=l;return t}()),t}function nu(){let t,n;for(t=[],n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx)),n===l&&(n=nd());n!==l;)t.push(n),n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx)),n===l&&(n=nd());return t}function nc(){let t,n,r,i;if(t=tb,n=[],r=e.charAt(tb),H.test(r)?tb++:(r=l,0===tE&&tP(tx)),r!==l)for(;r!==l;)n.push(r),r=e.charAt(tb),H.test(r)?tb++:(r=l,0===tE&&tP(tx));else n=l;if(n!==l){for(r=[],i=e.charAt(tb),H.test(i)?tb++:(i=l,0===tE&&tP(tx)),i===l&&(i=nd());i!==l;)r.push(i),i=e.charAt(tb),H.test(i)?tb++:(i=l,0===tE&&tP(tx)),i===l&&(i=nd());t=n=[n,r]}else tb=t,t=l;return t}function nh(){let t,n;for(t=[],n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx));n!==l;)t.push(n),n=e.charAt(tb),H.test(n)?tb++:(n=l,0===tE&&tP(tx));return t}function nd(){let t,n,r,i,a,s;if(t=tb,"//"===e.substr(tb,2)?(n="//",tb+=2):(n=l,0===tE&&tP(tm)),n!==l){for(r=[],i=e.charAt(tb),z.test(i)?tb++:(i=l,0===tE&&tP(tg));i!==l;)r.push(i),i=e.charAt(tb),z.test(i)?tb++:(i=l,0===tE&&tP(tg));i=e.charAt(tb),B.test(i)?tb++:(i=l,0===tE&&tP(tv)),i===l&&(i=null),t=n=[n,r,i]}else tb=t,t=l;if(t===l)if(t=tb,"/*"===e.substr(tb,2)?(n="/*",tb+=2):(n=l,0===tE&&tP(ty)),n!==l){for(r=[],i=tb,a=tb,tE++,"*/"===e.substr(tb,2)?(s="*/",tb+=2):(s=l,0===tE&&tP(t_)),tE--,s===l?a=void 0:(tb=a,a=l),a!==l?(e.length>tb?(s=e.charAt(tb),tb++):(s=l,0===tE&&tP(tu)),s!==l?i=a=[a,s]:(tb=i,i=l)):(tb=i,i=l);i!==l;)r.push(i),i=tb,a=tb,tE++,"*/"===e.substr(tb,2)?(s="*/",tb+=2):(s=l,0===tE&&tP(t_)),tE--,s===l?a=void 0:(tb=a,a=l),a!==l?(e.length>tb?(s=e.charAt(tb),tb++):(s=l,0===tE&&tP(tu)),s!==l?i=a=[a,s]:(tb=i,i=l)):(tb=i,i=l);"*/"===e.substr(tb,2)?(i="*/",tb+=2):(i=l,0===tE&&tP(t_)),i!==l?t=n=[n,r,i]:(tb=t,t=l)}else tb=t,t=l;return t}function np(){let t;return t=e.charAt(tb),L.test(t)?tb++:(t=l,0===tE&&tP(e0)),t}r=new Set,i=!1;let nf=(n=h())!==l&&tb===e.length;function nm(){var t,r,i;throw n!==l&&tb0&&void 0!==arguments[0]?arguments[0]:tb,n=e.codePointAt(t);return void 0===n?"":String.fromCodePoint(n)}(tM):null,i=tM{"use strict";e.s(["getFloat",()=>D,"getInt",()=>U,"getPosition",()=>O,"getProperty",()=>N,"getRotation",()=>k,"getScale",()=>F,"parseMissionScript",()=>L],62395);var t=e.i(90072);e.s(["parse",()=>A,"runServer",()=>C],86608);var n=e.i(92552),r=e.i(99749);function i(e){let t=e.indexOf("::");return -1===t?null:{namespace:e.slice(0,t),method:e.slice(t+2)}}let a={"+":"$.add","-":"$.sub","*":"$.mul","/":"$.div","<":"$.lt","<=":"$.le",">":"$.gt",">=":"$.ge","==":"$.eq","!=":"$.ne","%":"$.mod","&":"$.bitand","|":"$.bitor","^":"$.bitxor","<<":"$.shl",">>":"$.shr"};class s{getAccessInfo(e){if("Variable"===e.type){let t=JSON.stringify(e.name),n="global"===e.scope?this.globals:this.locals;return{getter:"".concat(n,".get(").concat(t,")"),setter:e=>"".concat(n,".set(").concat(t,", ").concat(e,")"),postIncHelper:"".concat(n,".postInc(").concat(t,")"),postDecHelper:"".concat(n,".postDec(").concat(t,")")}}if("MemberExpression"===e.type){let t=this.expression(e.object),n="Identifier"===e.property.type?JSON.stringify(e.property.name):this.expression(e.property);return{getter:"".concat(this.runtime,".prop(").concat(t,", ").concat(n,")"),setter:e=>"".concat(this.runtime,".setProp(").concat(t,", ").concat(n,", ").concat(e,")"),postIncHelper:"".concat(this.runtime,".propPostInc(").concat(t,", ").concat(n,")"),postDecHelper:"".concat(this.runtime,".propPostDec(").concat(t,", ").concat(n,")")}}if("IndexExpression"===e.type){let t=Array.isArray(e.index)?e.index.map(e=>this.expression(e)):[this.expression(e.index)];if("Variable"===e.object.type){let n=JSON.stringify(e.object.name),r="global"===e.object.scope?this.globals:this.locals,i=t.join(", ");return{getter:"".concat(r,".get(").concat(n,", ").concat(i,")"),setter:e=>"".concat(r,".set(").concat(n,", ").concat(i,", ").concat(e,")"),postIncHelper:"".concat(r,".postInc(").concat(n,", ").concat(i,")"),postDecHelper:"".concat(r,".postDec(").concat(n,", ").concat(i,")")}}if("MemberExpression"===e.object.type){let n=e.object,r=this.expression(n.object),i="Identifier"===n.property.type?JSON.stringify(n.property.name):this.expression(n.property),a="".concat(this.runtime,".key(").concat(i,", ").concat(t.join(", "),")");return{getter:"".concat(this.runtime,".prop(").concat(r,", ").concat(a,")"),setter:e=>"".concat(this.runtime,".setProp(").concat(r,", ").concat(a,", ").concat(e,")"),postIncHelper:"".concat(this.runtime,".propPostInc(").concat(r,", ").concat(a,")"),postDecHelper:"".concat(this.runtime,".propPostDec(").concat(r,", ").concat(a,")")}}let n=this.expression(e.object),r=1===t.length?t[0]:"".concat(this.runtime,".key(").concat(t.join(", "),")");return{getter:"".concat(this.runtime,".getIndex(").concat(n,", ").concat(r,")"),setter:e=>"".concat(this.runtime,".setIndex(").concat(n,", ").concat(r,", ").concat(e,")"),postIncHelper:"".concat(this.runtime,".indexPostInc(").concat(n,", ").concat(r,")"),postDecHelper:"".concat(this.runtime,".indexPostDec(").concat(n,", ").concat(r,")")}}return null}generate(e){let t=[];for(let n of e.body){let e=this.statement(n);e&&t.push(e)}return t.join("\n\n")}statement(e){switch(e.type){case"Comment":return"";case"ExpressionStatement":return this.line("".concat(this.expression(e.expression),";"));case"FunctionDeclaration":return this.functionDeclaration(e);case"PackageDeclaration":return this.packageDeclaration(e);case"DatablockDeclaration":return this.datablockDeclaration(e);case"ObjectDeclaration":return this.line("".concat(this.objectDeclaration(e),";"));case"IfStatement":return this.ifStatement(e);case"ForStatement":return this.forStatement(e);case"WhileStatement":return this.whileStatement(e);case"DoWhileStatement":return this.doWhileStatement(e);case"SwitchStatement":return this.switchStatement(e);case"ReturnStatement":return this.returnStatement(e);case"BreakStatement":return this.line("break;");case"ContinueStatement":return this.line("continue;");case"BlockStatement":return this.blockStatement(e);default:throw Error("Unknown statement type: ".concat(e.type))}}functionDeclaration(e){let t=i(e.name.name);if(t){let n=t.namespace,r=t.method;this.currentClass=n.toLowerCase(),this.currentFunction=r.toLowerCase();let i=this.functionBody(e.body,e.params);return this.currentClass=null,this.currentFunction=null,"".concat(this.line("".concat(this.runtime,".registerMethod(").concat(JSON.stringify(n),", ").concat(JSON.stringify(r),", function() {")),"\n").concat(i,"\n").concat(this.line("});"))}{let t=e.name.name;this.currentFunction=t.toLowerCase();let n=this.functionBody(e.body,e.params);return this.currentFunction=null,"".concat(this.line("".concat(this.runtime,".registerFunction(").concat(JSON.stringify(t),", function() {")),"\n").concat(n,"\n").concat(this.line("});"))}}functionBody(e,t){this.indentLevel++;let n=[];n.push(this.line("const ".concat(this.locals," = ").concat(this.runtime,".locals();")));for(let e=0;ethis.statement(e)).join("\n\n");return this.indentLevel--,"".concat(this.line("".concat(this.runtime,".package(").concat(t,", function() {")),"\n").concat(n,"\n").concat(this.line("});"))}datablockDeclaration(e){let t=JSON.stringify(e.className.name),n=e.instanceName?JSON.stringify(e.instanceName.name):"null",r=e.parent?JSON.stringify(e.parent.name):"null",i=this.objectBody(e.body);return this.line("".concat(this.runtime,".datablock(").concat(t,", ").concat(n,", ").concat(r,", ").concat(i,");"))}objectDeclaration(e){let t="Identifier"===e.className.type?JSON.stringify(e.className.name):this.expression(e.className),n=null===e.instanceName?"null":"Identifier"===e.instanceName.type?JSON.stringify(e.instanceName.name):this.expression(e.instanceName),r=[],i=[];for(let t of e.body)"Assignment"===t.type?r.push(t):i.push(t);let a=this.objectBody(r);if(i.length>0){let e=i.map(e=>this.objectDeclaration(e)).join(",\n");return"".concat(this.runtime,".create(").concat(t,", ").concat(n,", ").concat(a,", [\n").concat(e,"\n])")}return"".concat(this.runtime,".create(").concat(t,", ").concat(n,", ").concat(a,")")}objectBody(e){if(0===e.length)return"{}";let t=[];for(let n of e)if("Assignment"===n.type){let e=this.expression(n.value);if("Identifier"===n.target.type){let r=n.target.name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(r)?t.push("".concat(r,": ").concat(e)):t.push("[".concat(JSON.stringify(r),"]: ").concat(e))}else if("IndexExpression"===n.target.type){let r=this.objectPropertyKey(n.target);t.push("[".concat(r,"]: ").concat(e))}else{let r=this.expression(n.target);t.push("[".concat(r,"]: ").concat(e))}}if(t.length<=1)return"{ ".concat(t.join(", ")," }");let n=this.indent.repeat(this.indentLevel+1),r=this.indent.repeat(this.indentLevel);return"{\n".concat(n).concat(t.join(",\n"+n),"\n").concat(r,"}")}objectPropertyKey(e){let t="Identifier"===e.object.type?JSON.stringify(e.object.name):this.expression(e.object),n=Array.isArray(e.index)?e.index.map(e=>this.expression(e)).join(", "):this.expression(e.index);return"".concat(this.runtime,".key(").concat(t,", ").concat(n,")")}ifStatement(e){let t=this.expression(e.test),n=this.statementAsBlock(e.consequent);if(e.alternate)if("IfStatement"===e.alternate.type){let r=this.ifStatement(e.alternate).replace(/^\s*/,"");return this.line("if (".concat(t,") ").concat(n," else ").concat(r))}else{let r=this.statementAsBlock(e.alternate);return this.line("if (".concat(t,") ").concat(n," else ").concat(r))}return this.line("if (".concat(t,") ").concat(n))}forStatement(e){let t=e.init?this.expression(e.init):"",n=e.test?this.expression(e.test):"",r=e.update?this.expression(e.update):"",i=this.statementAsBlock(e.body);return this.line("for (".concat(t,"; ").concat(n,"; ").concat(r,") ").concat(i))}whileStatement(e){let t=this.expression(e.test),n=this.statementAsBlock(e.body);return this.line("while (".concat(t,") ").concat(n))}doWhileStatement(e){let t=this.statementAsBlock(e.body),n=this.expression(e.test);return this.line("do ".concat(t," while (").concat(n,");"))}switchStatement(e){if(e.stringMode)return this.switchStringStatement(e);let t=this.expression(e.discriminant);this.indentLevel++;let n=[];for(let t of e.cases)n.push(this.switchCase(t));return this.indentLevel--,"".concat(this.line("switch (".concat(t,") {")),"\n").concat(n.join("\n"),"\n").concat(this.line("}"))}switchCase(e){let t=[];if(null===e.test)t.push(this.line("default:"));else if(Array.isArray(e.test))for(let n of e.test)t.push(this.line("case ".concat(this.expression(n),":")));else t.push(this.line("case ".concat(this.expression(e.test),":")));for(let n of(this.indentLevel++,e.consequent))t.push(this.statement(n));return t.push(this.line("break;")),this.indentLevel--,t.join("\n")}switchStringStatement(e){let t=this.expression(e.discriminant),n=[];for(let t of e.cases)if(null===t.test)n.push("default: () => { ".concat(this.blockContent(t.consequent)," }"));else if(Array.isArray(t.test))for(let e of t.test)n.push("".concat(this.expression(e),": () => { ").concat(this.blockContent(t.consequent)," }"));else n.push("".concat(this.expression(t.test),": () => { ").concat(this.blockContent(t.consequent)," }"));return this.line("".concat(this.runtime,".switchStr(").concat(t,", { ").concat(n.join(", ")," });"))}returnStatement(e){return e.value?this.line("return ".concat(this.expression(e.value),";")):this.line("return;")}blockStatement(e){this.indentLevel++;let t=e.body.map(e=>this.statement(e)).join("\n");return this.indentLevel--,"{\n".concat(t,"\n").concat(this.line("}"))}statementAsBlock(e){if("BlockStatement"===e.type)return this.blockStatement(e);this.indentLevel++;let t=this.statement(e);return this.indentLevel--,"{\n".concat(t,"\n").concat(this.line("}"))}blockContent(e){return e.map(e=>this.statement(e).trim()).join(" ")}expression(e){switch(e.type){case"Identifier":return this.identifier(e);case"Variable":return this.variable(e);case"NumberLiteral":case"BooleanLiteral":return String(e.value);case"StringLiteral":return JSON.stringify(e.value);case"BinaryExpression":return this.binaryExpression(e);case"UnaryExpression":return this.unaryExpression(e);case"PostfixExpression":return this.postfixExpression(e);case"AssignmentExpression":return this.assignmentExpression(e);case"ConditionalExpression":return"(".concat(this.expression(e.test)," ? ").concat(this.expression(e.consequent)," : ").concat(this.expression(e.alternate),")");case"CallExpression":return this.callExpression(e);case"MemberExpression":return this.memberExpression(e);case"IndexExpression":return this.indexExpression(e);case"TagDereferenceExpression":return"".concat(this.runtime,".deref(").concat(this.expression(e.argument),")");case"ObjectDeclaration":return this.objectDeclaration(e);case"DatablockDeclaration":return"".concat(this.runtime,".datablock(").concat(JSON.stringify(e.className.name),", ").concat(e.instanceName?JSON.stringify(e.instanceName.name):"null",", ").concat(e.parent?JSON.stringify(e.parent.name):"null",", ").concat(this.objectBody(e.body),")");default:throw Error("Unknown expression type: ".concat(e.type))}}identifier(e){let t=i(e.name);return t&&"parent"===t.namespace.toLowerCase()?e.name:t?"".concat(this.runtime,".nsRef(").concat(JSON.stringify(t.namespace),", ").concat(JSON.stringify(t.method),")"):JSON.stringify(e.name)}variable(e){return"global"===e.scope?"".concat(this.globals,".get(").concat(JSON.stringify(e.name),")"):"".concat(this.locals,".get(").concat(JSON.stringify(e.name),")")}binaryExpression(e){let t=this.expression(e.left),n=this.expression(e.right),r=e.operator,i=this.concatExpression(t,r,n);if(i)return i;if("$="===r)return"".concat(this.runtime,".streq(").concat(t,", ").concat(n,")");if("!$="===r)return"!".concat(this.runtime,".streq(").concat(t,", ").concat(n,")");if("&&"===r||"||"===r)return"(".concat(t," ").concat(r," ").concat(n,")");let s=a[r];return s?"".concat(s,"(").concat(t,", ").concat(n,")"):"(".concat(t," ").concat(r," ").concat(n,")")}unaryExpression(e){if("++"===e.operator||"--"===e.operator){let t=this.getAccessInfo(e.argument);if(t){let n="++"===e.operator?1:-1;return t.setter("".concat(this.runtime,".add(").concat(t.getter,", ").concat(n,")"))}}let t=this.expression(e.argument);return"~"===e.operator?"".concat(this.runtime,".bitnot(").concat(t,")"):"-"===e.operator?"".concat(this.runtime,".neg(").concat(t,")"):"".concat(e.operator).concat(t)}postfixExpression(e){let t=this.getAccessInfo(e.argument);if(t){let n="++"===e.operator?t.postIncHelper:t.postDecHelper;if(n)return n}return"".concat(this.expression(e.argument)).concat(e.operator)}assignmentExpression(e){let t=this.expression(e.value),n=e.operator,r=this.getAccessInfo(e.target);if(!r)throw Error("Unhandled assignment target type: ".concat(e.target.type));if("="===n)return r.setter(t);{let e=n.slice(0,-1),i=this.compoundAssignmentValue(r.getter,e,t);return r.setter(i)}}callExpression(e){let t=e.arguments.map(e=>this.expression(e)).join(", ");if("Identifier"===e.callee.type){let n=e.callee.name,r=i(n);if(r&&"parent"===r.namespace.toLowerCase())if(this.currentClass)return"".concat(this.runtime,".parent(").concat(JSON.stringify(this.currentClass),", ").concat(JSON.stringify(r.method),", arguments[0]").concat(t?", "+t:"",")");else if(this.currentFunction)return"".concat(this.runtime,".parentFunc(").concat(JSON.stringify(this.currentFunction)).concat(t?", "+t:"",")");else throw Error("Parent:: call outside of function context");return r?"".concat(this.runtime,".nsCall(").concat(JSON.stringify(r.namespace),", ").concat(JSON.stringify(r.method)).concat(t?", "+t:"",")"):"".concat(this.functions,".call(").concat(JSON.stringify(n)).concat(t?", "+t:"",")")}if("MemberExpression"===e.callee.type){let n=this.expression(e.callee.object),r="Identifier"===e.callee.property.type?JSON.stringify(e.callee.property.name):this.expression(e.callee.property);return"".concat(this.runtime,".call(").concat(n,", ").concat(r).concat(t?", "+t:"",")")}let n=this.expression(e.callee);return"".concat(n,"(").concat(t,")")}memberExpression(e){let t=this.expression(e.object);return e.computed||"Identifier"!==e.property.type?"".concat(this.runtime,".prop(").concat(t,", ").concat(this.expression(e.property),")"):"".concat(this.runtime,".prop(").concat(t,", ").concat(JSON.stringify(e.property.name),")")}indexExpression(e){let t=Array.isArray(e.index)?e.index.map(e=>this.expression(e)):[this.expression(e.index)];if("Variable"===e.object.type){let n=JSON.stringify(e.object.name),r="global"===e.object.scope?this.globals:this.locals;return"".concat(r,".get(").concat(n,", ").concat(t.join(", "),")")}if("MemberExpression"===e.object.type){let n=e.object,r=this.expression(n.object),i="Identifier"===n.property.type?JSON.stringify(n.property.name):this.expression(n.property),a="".concat(this.runtime,".key(").concat(i,", ").concat(t.join(", "),")");return"".concat(this.runtime,".prop(").concat(r,", ").concat(a,")")}let n=this.expression(e.object);return 1===t.length?"".concat(this.runtime,".getIndex(").concat(n,", ").concat(t[0],")"):"".concat(this.runtime,".getIndex(").concat(n,", ").concat(this.runtime,".key(").concat(t.join(", "),"))")}line(e){return this.indent.repeat(this.indentLevel)+e}concatExpression(e,t,n){switch(t){case"@":return"".concat(this.runtime,".concat(").concat(e,", ").concat(n,")");case"SPC":return"".concat(this.runtime,".concat(").concat(e,', " ", ').concat(n,")");case"TAB":return"".concat(this.runtime,".concat(").concat(e,', "\\t", ').concat(n,")");case"NL":return"".concat(this.runtime,".concat(").concat(e,', "\\n", ').concat(n,")");default:return null}}compoundAssignmentValue(e,t,n){let r=this.concatExpression(e,t,n);if(r)return r;let i=a[t];return i?"".concat(i,"(").concat(e,", ").concat(n,")"):"(".concat(e," ").concat(t," ").concat(n,")")}constructor(e={}){var t,n,i,a,s;(0,r._)(this,"indent",void 0),(0,r._)(this,"runtime",void 0),(0,r._)(this,"functions",void 0),(0,r._)(this,"globals",void 0),(0,r._)(this,"locals",void 0),(0,r._)(this,"indentLevel",0),(0,r._)(this,"currentClass",null),(0,r._)(this,"currentFunction",null),this.indent=null!=(t=e.indent)?t:" ",this.runtime=null!=(n=e.runtime)?n:"$",this.functions=null!=(i=e.functions)?i:"$f",this.globals=null!=(a=e.globals)?a:"$g",this.locals=null!=(s=e.locals)?s:"$l"}}e.s(["createRuntime",()=>E,"createScriptCache",()=>b],33870);var o=e.i(54970);class l{get size(){return this.map.size}get(e){let t=this.keyLookup.get(e.toLowerCase());return void 0!==t?this.map.get(t):void 0}set(e,t){let n=e.toLowerCase(),r=this.keyLookup.get(n);return void 0!==r?this.map.set(r,t):(this.keyLookup.set(n,e),this.map.set(e,t)),this}has(e){return this.keyLookup.has(e.toLowerCase())}delete(e){let t=e.toLowerCase(),n=this.keyLookup.get(t);return void 0!==n&&(this.keyLookup.delete(t),this.map.delete(n))}clear(){this.map.clear(),this.keyLookup.clear()}keys(){return this.map.keys()}values(){return this.map.values()}entries(){return this.map.entries()}[Symbol.iterator](){return this.map[Symbol.iterator]()}forEach(e){for(let[t,n]of this.map)e(n,t,this)}get[Symbol.toStringTag](){return"CaseInsensitiveMap"}getOriginalKey(e){return this.keyLookup.get(e.toLowerCase())}constructor(e){if((0,r._)(this,"map",new Map),(0,r._)(this,"keyLookup",new Map),e)for(let[t,n]of e)this.set(t,n)}}class u{get size(){return this.set.size}add(e){return this.set.add(e.toLowerCase()),this}has(e){return this.set.has(e.toLowerCase())}delete(e){return this.set.delete(e.toLowerCase())}clear(){this.set.clear()}[Symbol.iterator](){return this.set[Symbol.iterator]()}get[Symbol.toStringTag](){return"CaseInsensitiveSet"}constructor(e){if((0,r._)(this,"set",new Set),e)for(let t of e)this.add(t)}}function c(e){return e.replace(/\\/g,"/").toLowerCase()}function h(e){return String(null!=e?e:"")}function d(e){return Number(e)||0}function p(e){let t=h(e||"0 0 0").split(" ").map(Number);return[t[0]||0,t[1]||0,t[2]||0]}function f(e,t,n){let r=0;for(;t+r0;){if(r>=e.length)return"";let i=f(e,r,n);if(r+i>=e.length)return"";r+=i+1,t--}let i=f(e,r,n);return 0===i?"":e.substring(r,r+i)}function g(e,t,n,r){let i=0,a=t;for(;a>0;){if(i>=e.length)return"";let t=f(e,i,r);if(i+t>=e.length)return"";i+=t+1,a--}let s=i,o=n-t+1;for(;o>0;){let t=f(e,i,r);if((i+=t)>=e.length)break;i++,o--}let l=i;return l>s&&r.includes(e[l-1])&&l--,e.substring(s,l)}function v(e,t){if(""===e)return 0;let n=0;for(let r=0;rt&&s>=e.length)break}return a.join(i)}function _(e,t,n,r){let i=[],a=0,s=0;for(;a1?n-1:0),i=1;ih(e).replace(/\\([ntr\\])/g,(e,t)=>"n"===t?"\n":"t"===t?" ":"r"===t?"\r":"\\"),expandescape:e=>h(e).replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r"),export(e,t,n){console.warn("export(".concat(e,"): not implemented"))},quit(){console.warn("quit(): not implemented in browser")},trace(e){},isobject:e=>t().$.isObject(e),nametoid:e=>t().$.nameToId(e),strlen:e=>h(e).length,strchr(e,t){var n;let r=h(e),i=null!=(n=h(t)[0])?n:"",a=r.indexOf(i);return a>=0?r.substring(a):""},strpos:(e,t,n)=>h(e).indexOf(h(t),d(n)),strcmp(e,t){let n=h(e),r=h(t);return nr)},stricmp(e,t){let n=h(e).toLowerCase(),r=h(t).toLowerCase();return nr)},strstr:(e,t)=>h(e).indexOf(h(t)),getsubstr(e,t,n){let r=h(e),i=d(t);return void 0===n?r.substring(i):r.substring(i,i+d(n))},getword:(e,t)=>m(h(e),d(t)," \n"),getwordcount:e=>v(h(e)," \n"),getfield:(e,t)=>m(h(e),d(t)," \n"),getfieldcount:e=>v(h(e)," \n"),setword:(e,t,n)=>y(h(e),d(t),h(n)," \n"," "),setfield:(e,t,n)=>y(h(e),d(t),h(n)," \n"," "),firstword:e=>m(h(e),0," \n"),restwords:e=>g(h(e),1,1e6," \n"),trim:e=>h(e).trim(),ltrim:e=>h(e).replace(/^\s+/,""),rtrim:e=>h(e).replace(/\s+$/,""),strupr:e=>h(e).toUpperCase(),strlwr:e=>h(e).toLowerCase(),strreplace:(e,t,n)=>h(e).split(h(t)).join(h(n)),filterstring:(e,t)=>h(e),stripchars(e,t){let n=h(e),r=new Set(h(t).split(""));return n.split("").filter(e=>!r.has(e)).join("")},getfields(e,t,n){let r=void 0!==n?Number(n):1e6;return g(h(e),d(t),r," \n")},getwords(e,t,n){let r=void 0!==n?Number(n):1e6;return g(h(e),d(t),r," \n")},removeword:(e,t)=>_(h(e),d(t)," \n"," "),removefield:(e,t)=>_(h(e),d(t)," \n"," "),getrecord:(e,t)=>m(h(e),d(t),"\n"),getrecordcount:e=>v(h(e),"\n"),setrecord:(e,t,n)=>y(h(e),d(t),h(n),"\n","\n"),removerecord:(e,t)=>_(h(e),d(t),"\n","\n"),nexttoken(e,t,n){throw Error("nextToken() is not implemented: it requires variable mutation")},strtoplayername:e=>h(e).replace(/[^\w\s-]/g,"").trim(),mabs:e=>Math.abs(d(e)),mfloor:e=>Math.floor(d(e)),mceil:e=>Math.ceil(d(e)),msqrt:e=>Math.sqrt(d(e)),mpow:(e,t)=>Math.pow(d(e),d(t)),msin:e=>Math.sin(d(e)),mcos:e=>Math.cos(d(e)),mtan:e=>Math.tan(d(e)),masin:e=>Math.asin(d(e)),macos:e=>Math.acos(d(e)),matan:(e,t)=>Math.atan2(d(e),d(t)),mlog:e=>Math.log(d(e)),getrandom(e,t){if(void 0===e)return Math.random();if(void 0===t)return Math.floor(Math.random()*(d(e)+1));let n=d(e);return Math.floor(Math.random()*(d(t)-n+1))+n},mdegtorad:e=>d(e)*(Math.PI/180),mradtodeg:e=>d(e)*(180/Math.PI),mfloatlength:(e,t)=>d(e).toFixed(d(t)),getboxcenter(e){let t=h(e).split(" ").map(Number),n=t[0]||0,r=t[1]||0,i=t[2]||0,a=t[3]||0,s=t[4]||0,o=t[5]||0;return"".concat((n+a)/2," ").concat((r+s)/2," ").concat((i+o)/2)},vectoradd(e,t){let[n,r,i]=p(e),[a,s,o]=p(t);return"".concat(n+a," ").concat(r+s," ").concat(i+o)},vectorsub(e,t){let[n,r,i]=p(e),[a,s,o]=p(t);return"".concat(n-a," ").concat(r-s," ").concat(i-o)},vectorscale(e,t){let[n,r,i]=p(e),a=d(t);return"".concat(n*a," ").concat(r*a," ").concat(i*a)},vectordot(e,t){let[n,r,i]=p(e),[a,s,o]=p(t);return n*a+r*s+i*o},vectorcross(e,t){let[n,r,i]=p(e),[a,s,o]=p(t);return"".concat(r*o-i*s," ").concat(i*a-n*o," ").concat(n*s-r*a)},vectorlen(e){let[t,n,r]=p(e);return Math.sqrt(t*t+n*n+r*r)},vectornormalize(e){let[t,n,r]=p(e),i=Math.sqrt(t*t+n*n+r*r);return 0===i?"0 0 0":"".concat(t/i," ").concat(n/i," ").concat(r/i)},vectordist(e,t){let[n,r,i]=p(e),[a,s,o]=p(t),l=n-a,u=r-s,c=i-o;return Math.sqrt(l*l+u*u+c*c)},matrixcreate(e,t){throw Error("MatrixCreate() not implemented: requires axis-angle rotation math")},matrixcreatefromeuler(e){throw Error("MatrixCreateFromEuler() not implemented: requires Euler→Quaternion→AxisAngle conversion")},matrixmultiply(e,t){throw Error("MatrixMultiply() not implemented: requires full 4x4 matrix multiplication")},matrixmulpoint(e,t){throw Error("MatrixMulPoint() not implemented: requires full transform application")},matrixmulvector(e,t){throw Error("MatrixMulVector() not implemented: requires rotation matrix application")},getsimtime:()=>Date.now()-t().state.startTime,getrealtime:()=>Date.now(),schedule(e,n,r){for(var i=arguments.length,a=Array(i>3?i-3:0),s=3;s{l.state.pendingTimeouts.delete(u);try{l.$f.call(String(r),...a)}catch(e){throw console.error("schedule: error calling ".concat(r,":"),e),e}},o);return l.state.pendingTimeouts.add(u),u},cancel(e){clearTimeout(e),t().state.pendingTimeouts.delete(e)},iseventpending:e=>t().state.pendingTimeouts.has(e),exec(e){let n=String(null!=e?e:"");if(console.debug("exec(".concat(JSON.stringify(n),"): preparing to execute…")),!n.includes("."))return console.error("exec: invalid script file name ".concat(JSON.stringify(n),".")),!1;let r=c(n),i=t(),{executedScripts:a,scripts:s}=i.state;if(a.has(r))return console.debug("exec(".concat(JSON.stringify(n),"): skipping (already executed)")),!0;let o=s.get(r);return null==o?(console.warn("exec(".concat(JSON.stringify(n),"): script not found")),!1):(a.add(r),console.debug("exec(".concat(JSON.stringify(n),"): executing!")),i.executeAST(o),!0)},compile(e){throw Error("compile() not implemented: requires DSO bytecode compiler")},isdemo:()=>!1,isfile:e=>n?n.isFile(h(e)):(console.warn("isFile(): no fileSystem handler configured"),!1),fileext(e){let t=h(e),n=t.lastIndexOf(".");return n>=0?t.substring(n):""},filebase(e){let t=h(e),n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),r=t.lastIndexOf("."),i=n>=0?n+1:0,a=r>i?r:t.length;return t.substring(i,a)},filepath(e){let t=h(e),n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return n>=0?t.substring(0,n):""},expandfilename(e){throw Error("expandFilename() not implemented: requires filesystem path expansion")},findfirstfile(e){var t;return n?(a=h(e),r=n.findFiles(a),i=0,null!=(t=r[i++])?t:""):(console.warn("findFirstFile(): no fileSystem handler configured"),"")},findnextfile(e){var t;let s=h(e);if(s!==a){if(!n)return"";a=s,r=n.findFiles(s)}return null!=(t=r[i++])?t:""},getfilecrc:e=>h(e),iswriteablefilename:e=>!1,activatepackage(e){t().$.activatePackage(h(e))},deactivatepackage(e){t().$.deactivatePackage(h(e))},ispackage:e=>t().$.isPackage(h(e)),isactivepackage:e=>t().$.isActivePackage(h(e)),getpackagelist:()=>t().$.getPackageList(),addmessagecallback(e,t){},alxcreatesource(){for(var e=arguments.length,t=Array(e),n=0;n0,alxlistenerf(e,t){},alxplay(){for(var e=arguments.length,t=Array(e),n=0;n!1,lockmouse(e){},addmaterialmapping(e,t){},flushtexturecache(){},getdesktopresolution:()=>"1920 1080 32",getdisplaydevicelist:()=>"OpenGL",getresolutionlist:e=>"640 480 800 600 1024 768 1280 720 1920 1080",getvideodriverinfo:()=>"WebGL",isdevicefullscreenonly:e=>!1,isfullscreen:()=>!1,screenshot(e){},setdisplaydevice:e=>!0,setfov(e){},setinteriorrendermode(e){},setopenglanisotropy(e){},setopenglmipreduction(e){},setopenglskymipreduction(e){},setopengltexturecompressionhint(e){},setscreenmode(e,t,n,r){},setverticalsync(e){},setzoomspeed(e){},togglefullscreen(){},videosetgammacorrection(e){},snaptoggle(){},addtaggedstring:e=>0,buildtaggedstring(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rh(e),gettag:e=>0,gettaggedstring:e=>"",removetaggedstring(e){},commandtoclient(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r!0,allowconnections(e){},startheartbeat(){},stopheartbeat(){},gotowebpage(e){},deletedatablocks(){},preloaddatablock:e=>!0,containerboxempty(){for(var e=arguments.length,t=Array(e),n=0;n0,containersearchnext:()=>0,initcontainerradiussearch(){for(var e=arguments.length,t=Array(e),n=0;n0,getcontrolobjectspeed:()=>0,getterrainheight:e=>0,lightscene(){for(var e=arguments.length,t=Array(e),n=0;n>>0}function w(e){if(null==e)return null;if("string"==typeof e)return e||null;if("number"==typeof e)return String(e);throw Error("Invalid instance name type: ".concat(typeof e))}function E(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=new l,a=new l,h=new l,d=[],p=new u,f=3,m=1027,g=new Map,v=new l,y=new l,_=new l,E=new l,T=new l;if(r.globals)for(let[e,t]of Object.entries(r.globals)){if(!e.startsWith("$"))throw Error('Global variable "'.concat(e,'" must start with $, e.g. "$').concat(e,'"'));_.set(e.slice(1),t)}let C=new Set,R=new Set,P=r.ignoreScripts&&r.ignoreScripts.length>0?(0,o.default)(r.ignoreScripts,{nocase:!0}):null,I=null!=(e=r.cache)?e:b(),L=I.scripts,N=I.generatedCode,D=new Map;function U(e){let t=D.get(e);return t&&t.length>0?t[t.length-1]:void 0}function O(e,t,n){let r;(r=D.get(e))||(r=[],D.set(e,r)),r.push(t);try{return n()}finally{let t=D.get(e);t&&t.pop()}}function F(e,t){return"".concat(e.toLowerCase(),"::").concat(t.toLowerCase())}function k(e,t){var n,r;return null!=(r=null==(n=i.get(e))?void 0:n.get(t))?r:null}let z=new Set,B=null,H=null,V=(null!=(t=r.builtins)?t:x)({runtime:()=>H,fileSystem:null!=(n=r.fileSystem)?n:null});function G(e){let t=h.get(e);if(!t)return void p.add(e);if(!t.active){for(let[e,n]of(t.active=!0,d.push(t.name),t.methods)){i.has(e)||i.set(e,new l);let t=i.get(e);for(let[e,r]of n)t.has(e)||t.set(e,[]),t.get(e).push(r)}for(let[e,n]of t.functions)a.has(e)||a.set(e,[]),a.get(e).push(n)}}function W(e){var t,n;return null==e||""===e?null:"object"==typeof e&&null!=e._id?e:"string"==typeof e?null!=(t=v.get(e))?t:null:"number"==typeof e&&null!=(n=g.get(e))?n:null}function j(e,t,n){let r=W(e);if(null==r)return 0;let i=J(r[t]);return r[t]=i+n,i}function X(e,t){let n=k(e,t);return n&&n.length>0?n[n.length-1]:null}function q(e,t,n,r){let i=k(e,t);return i&&0!==i.length?{found:!0,result:O(F(e,t),i.length-1,()=>i[i.length-1](n,...r))}:{found:!1}}function Y(e,t,n,r){let i=E.get(e);if(i){let e=i.get(t);if(e)for(let t of e)t(n,...r)}}function J(e){if(null==e||""===e)return 0;let t=Number(e);return isNaN(t)?0:t}function Z(e){if(!e||""===e)return null;e.startsWith("/")&&(e=e.slice(1));let t=e.split("/"),n=null;for(let e=0;e{var n;return(null==(n=t._name)?void 0:n.toLowerCase())===e});n=null!=t?t:null}if(!n)return null}}return n}function K(e){return null==e||""===e?null:Z(String(e))}function $(e){function t(e,t){return e+t.join("_")}return{get(n){for(var r,i=arguments.length,a=Array(i>1?i-1:0),s=1;s1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;at.toLowerCase()===e.toLowerCase());for(let[e,r]of(-1!==n&&d.splice(n,1),t.methods)){let t=i.get(e);if(t)for(let[e,n]of r){let r=t.get(e);if(r){let e=r.indexOf(n);-1!==e&&r.splice(e,1)}}}for(let[e,n]of t.functions){let t=a.get(e);if(t){let e=t.indexOf(n);-1!==e&&t.splice(e,1)}}},create:function(e,t,n,r){let i=S(e),a=m++,s={_class:i,_className:e,_id:a};for(let[e,t]of Object.entries(n))s[S(e)]=t;s.superclass&&(s._superClass=S(String(s.superclass)),s.class&&T.set(S(String(s.class)),s._superClass)),g.set(a,s);let o=w(t);if(o&&(s._name=o,v.set(o,s)),r){for(let e of r)e._parent=s;s._children=r}let l=X(e,"onAdd");return l&&l(s),s},datablock:function(e,t,n,r){let i=S(e),a=f++,s={_class:i,_className:e,_id:a,_isDatablock:!0},o=w(n);if(o){let e=y.get(o);if(e){for(let[t,n]of Object.entries(e))t.startsWith("_")||(s[t]=n);s._parent=e}}for(let[e,t]of Object.entries(r))s[S(e)]=t;g.set(a,s);let l=w(t);return l&&(s._name=l,v.set(l,s),y.set(l,s)),s},deleteObject:function e(t){let n;if(null==t||("number"==typeof t?n=g.get(t):"string"==typeof t?n=v.get(t):"object"==typeof t&&t._id&&(n=t),!n))return!1;let r=X(n._className,"onRemove");if(r&&r(n),g.delete(n._id),n._name&&v.delete(n._name),n._isDatablock&&n._name&&y.delete(n._name),n._parent&&n._parent._children){let e=n._parent._children.indexOf(n);-1!==e&&n._parent._children.splice(e,1)}if(n._children)for(let t of[...n._children])e(t);return!0},prop:function(e,t){var n;let r=W(e);return null==r?"":null!=(n=r[S(t)])?n:""},setProp:function(e,t,n){let r=W(e);return null==r||(r[S(t)]=n),n},getIndex:function(e,t){var n;let r=W(e);return null==r?"":null!=(n=r[String(t)])?n:""},setIndex:function(e,t,n){let r=W(e);return null==r||(r[String(t)]=n),n},propPostInc:function(e,t){return j(e,S(t),1)},propPostDec:function(e,t){return j(e,S(t),-1)},indexPostInc:function(e,t){return j(e,String(t),1)},indexPostDec:function(e,t){return j(e,String(t),-1)},key:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2?n-2:0),i=2;i2?n-2:0),i=2;io(...r)),u=r[0];return u&&"object"==typeof u&&Y(e,t,u,r.slice(1)),l},nsRef:function(e,t){let n=k(e,t);if(!n||0===n.length)return null;let r=F(e,t),i=n[n.length-1];return function(){for(var e=arguments.length,t=Array(e),a=0;ai(...t))}},parent:function(e,t,n){for(var r=arguments.length,i=Array(r>3?r-3:0),a=3;a=1){let r=l-1,a=O(o,r,()=>s[r](n,...i));return n&&"object"==typeof n&&Y(e,t,n,i),a}let u=T.get(e);for(;u;){let e=k(u,t);if(e&&e.length>0){let r=O(F(u,t),e.length-1,()=>e[e.length-1](n,...i));return n&&"object"==typeof n&&Y(u,t,n,i),r}u=T.get(u)}return""},parentFunc:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;ri[l](...n))},add:function(e,t){return J(e)+J(t)},sub:function(e,t){return J(e)-J(t)},mul:function(e,t){return J(e)*J(t)},div:function(e,t){return J(e)/J(t)},neg:function(e){return-J(e)},lt:function(e,t){return J(e)J(t)},ge:function(e,t){return J(e)>=J(t)},eq:function(e,t){return J(e)===J(t)},ne:function(e,t){return J(e)!==J(t)},mod:function(e,t){let n=0|Number(t);return 0===n?0:(0|Number(e))%n},bitand:function(e,t){return M(e)&M(t)},bitor:function(e,t){return M(e)|M(t)},bitxor:function(e,t){return M(e)^M(t)},shl:function(e,t){return M(M(e)<<(31&M(t)))},shr:function(e,t){return M(e)>>>(31&M(t))},bitnot:function(e){return~M(e)>>>0},concat:function(){for(var e=arguments.length,t=Array(e),n=0;nString(null!=e?e:"")).join("")},streq:function(e,t){return String(null!=e?e:"").toLowerCase()===String(null!=t?t:"").toLowerCase()},switchStr:function(e,t){let n=String(null!=e?e:"").toLowerCase();for(let[e,r]of Object.entries(t))if("default"!==e&&S(e)===n)return void r();t.default&&t.default()},deref:K,nameToId:function(e){let t=Z(e);return t?t._id:-1},isObject:function(e){return null!=e&&("object"==typeof e&&!!e._id||("number"==typeof e?g.has(e):"string"==typeof e&&v.has(e)))},isFunction:function(e){return a.has(e)||e.toLowerCase()in V},isPackage:function(e){return h.has(e)},isActivePackage:function(e){var t;let n=h.get(e);return null!=(t=null==n?void 0:n.active)&&t},getPackageList:function(){return d.join(" ")},locals:Q,onMethodCalled(e,t,n){let r=E.get(e);r||(r=new l,E.set(e,r));let i=r.get(t);i||(i=[],r.set(t,i)),i.push(n)}},et={call(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0)return O(e.toLowerCase(),i.length-1,()=>i[i.length-1](...n));let s=V[e.toLowerCase()];return s?s(...n):(console.warn("Unknown function: ".concat(e,"(").concat(n.map(e=>JSON.stringify(e)).join(", "),")")),"")}},en=$(_),er={methods:i,functions:a,packages:h,activePackages:d,objectsById:g,objectsByName:v,datablocks:y,globals:_,executedScripts:C,failedScripts:R,scripts:L,generatedCode:N,pendingTimeouts:z,startTime:Date.now()};function ei(e){let t=function(e){let t=N.get(e);null==t&&(t=new s(void 0).generate(e),N.set(e,t));return t}(e),n=Q();Function("$","$f","$g","$l",t)(ee,et,en,n)}function ea(e,t){return{execute(){if(t){let e=c(t);er.executedScripts.add(e)}ei(e)}}}async function es(e,t,n){let i=r.loadScript;if(!i){e.length>0&&console.warn("Script has exec() calls but no loadScript provided:",e);return}async function a(e){var a,s;null==(a=r.signal)||a.throwIfAborted();let o=c(e);if(er.scripts.has(o)||er.failedScripts.has(o))return;if(P&&P(o)){console.warn("Ignoring script: ".concat(e)),er.failedScripts.add(o);return}if(n.has(o))return;let l=t.get(o);if(l)return void await l;null==(s=r.progress)||s.addItem(e);let u=(async()=>{var a,s,l;let u,c=await i(e);if(null==c){console.warn("Script not found: ".concat(e)),er.failedScripts.add(o),null==(s=r.progress)||s.completeItem();return}try{u=A(c,{filename:e})}catch(t){console.warn("Failed to parse script: ".concat(e),t),er.failedScripts.add(o),null==(l=r.progress)||l.completeItem();return}let h=new Set(n);h.add(o),await es(u.execScriptPaths,t,h),er.scripts.set(o,u),null==(a=r.progress)||a.completeItem()})();t.set(o,u),await u}await Promise.all(e.map(a))}async function eo(e){var t,n,i;let a=r.loadScript;if(!a)throw Error("loadFromPath requires loadScript option to be set");let s=c(e);if(er.scripts.has(s))return ea(er.scripts.get(s),e);null==(t=r.progress)||t.addItem(e);let o=await a(e);if(null==o)throw null==(i=r.progress)||i.completeItem(),Error("Script not found: ".concat(e));let l=await el(o,{path:e});return null==(n=r.progress)||n.completeItem(),l}async function el(e,t){if(null==t?void 0:t.path){let e=c(t.path);if(er.scripts.has(e))return ea(er.scripts.get(e),t.path)}return eu(A(e,{filename:null==t?void 0:t.path}),t)}async function eu(e,t){var n;let i=new Map,a=new Set;if(null==t?void 0:t.path){let n=c(t.path);er.scripts.set(n,e),a.add(n)}let s=[...e.execScriptPaths,...null!=(n=r.preloadScripts)?n:[]];return await es(s,i,a),ea(e,null==t?void 0:t.path)}return H={$:ee,$f:et,$g:en,state:er,destroy:function(){for(let e of er.pendingTimeouts)clearTimeout(e);er.pendingTimeouts.clear()},executeAST:ei,loadFromPath:eo,loadFromSource:el,loadFromAST:eu,call:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rv.get(e)}}function T(){let e=new Set,t=0,n=0,r=null;function i(){for(let t of e)t()}return{get total(){return t},get loaded(){return n},get current(){return r},get progress(){return 0===t?0:n/t},on(t,n){e.add(n)},off(t,n){e.delete(n)},addItem(e){t++,r=e,i()},completeItem(){n++,r=null,i()},setCurrent(e){r=e,i()}}}function A(e,t){try{return n.default.parse(e)}catch(e){if((null==t?void 0:t.filename)&&e.location)throw Error("".concat(t.filename,":").concat(e.location.start.line,":").concat(e.location.start.column,": ").concat(e.message),{cause:e});throw e}}function C(e){let{missionName:t,missionType:n,runtimeOptions:r,onMissionLoadDone:i}=e,{signal:a,fileSystem:s}=null!=r?r:{},o=E({...r,globals:{...null==r?void 0:r.globals,"$Host::Map":t,"$Host::MissionType":n}}),l="".concat(n,"Game"),u="scripts/".concat(l,".cs"),c=async function(){try{let e=await o.loadFromPath("scripts/server.cs");null==a||a.throwIfAborted(),await o.loadFromPath("scripts/DefaultGame.cs"),null==a||a.throwIfAborted();try{await o.loadFromPath(u)}catch(e){}null==a||a.throwIfAborted(),await o.loadFromPath("missions/".concat(t,".mis")),null==a||a.throwIfAborted(),e.execute(),i&&o.$.onMethodCalled("DefaultGame","missionLoadDone",i);let n=await o.loadFromSource("CreateServer($Host::Map, $Host::MissionType);");null==a||a.throwIfAborted(),n.execute()}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}}();return{runtime:o,ready:c}}e.s(["createProgressTracker",()=>T],38433);let R=/^[ \t]*(DisplayName|MissionTypes|BriefingWAV|Bitmap|PlanetName)[ \t]*=[ \t]*(.+)$/i,P=/^[ \t]*-+[ \t]*([A-Z ]+)[ \t]+BEGIN[ \t]*-+$/i,I=/^[ \t]*-+[ \t]*([A-Z ]+)[ \t]+END[ \t]*-+$/i;function L(e){var t,n,r,i,a,s;let o=A(e),{pragma:l,sections:u}=function(e){let t={},n=[],r={name:null,comments:[]};for(let i of e.body)if("Comment"===i.type){let e=function(e){let t;return(t=e.match(P))?{type:"sectionBegin",name:t[1]}:(t=e.match(I))?{type:"sectionEnd",name:t[1]}:(t=e.match(R))?{type:"definition",identifier:t[1],value:t[2]}:null}(i.value);if(e)switch(e.type){case"definition":null===r.name?t[e.identifier.toLowerCase()]=e.value:r.comments.push(i.value);break;case"sectionBegin":(null!==r.name||r.comments.length>0)&&n.push(r),r={name:e.name.toUpperCase(),comments:[]};break;case"sectionEnd":null!==r.name&&n.push(r),r={name:null,comments:[]}}else r.comments.push(i.value)}return(null!==r.name||r.comments.length>0)&&n.push(r),{pragma:t,sections:n}}(o);function c(e){var t,n;return null!=(n=null==(t=u.find(t=>t.name===e))?void 0:t.comments.map(e=>e.trimStart()).join("\n"))?n:null}return{displayName:null!=(n=l.displayname)?n:null,missionTypes:null!=(r=null==(t=l.missiontypes)?void 0:t.split(/\s+/).filter(Boolean))?r:[],missionBriefing:c("MISSION BRIEFING"),briefingWav:null!=(i=l.briefingwav)?i:null,bitmap:null!=(a=l.bitmap)?a:null,planetName:null!=(s=l.planetname)?s:null,missionBlurb:c("MISSION BLURB"),missionQuote:c("MISSION QUOTE"),missionString:c("MISSION STRING"),execScriptPaths:o.execScriptPaths,hasDynamicExec:o.hasDynamicExec,ast:o}}function N(e,t){if(e)return e[t.toLowerCase()]}function D(e,t){let n=e[t.toLowerCase()];return null==n?n:parseFloat(n)}function U(e,t){let n=e[t.toLowerCase()];return null==n?n:parseInt(n,10)}function O(e){var t;let[n,r,i]=(null!=(t=e.position)?t:"0 0 0").split(" ").map(e=>parseFloat(e));return[r||0,i||0,n||0]}function F(e){var t;let[n,r,i]=(null!=(t=e.scale)?t:"1 1 1").split(" ").map(e=>parseFloat(e));return[r||0,i||0,n||0]}function k(e){var n;let[r,i,a,s]=(null!=(n=e.rotation)?n:"1 0 0 0").split(" ").map(e=>parseFloat(e)),o=new t.Vector3(i,a,r).normalize(),l=-(Math.PI/180*s);return new t.Quaternion().setFromAxisAngle(o,l)}},12979,e=>{"use strict";e.s(["BASE_URL",()=>a,"FALLBACK_TEXTURE_URL",()=>o,"audioToUrl",()=>f,"getUrlForPath",()=>l,"iflTextureToUrl",()=>d,"interiorToUrl",()=>u,"loadDetailMapList",()=>m,"loadImageFrameList",()=>y,"loadMission",()=>g,"loadTerrain",()=>v,"shapeToUrl",()=>c,"terrainTextureToUrl",()=>h,"textureToUrl",()=>p],12979);var t=e.i(98223),n=e.i(91996),r=e.i(62395),i=e.i(71726);let a="/t2-mapper",s="".concat(a,"/base/"),o="".concat(a,"/magenta.png");function l(e,t){let r;try{r=(0,n.getActualResourceKey)(e)}catch(n){if(t)return console.warn('Resource "'.concat(e,'" not found - rendering fallback.')),t;throw n}let[i,a]=(0,n.getSourceAndPath)(r);return i?"".concat(s,"@vl2/").concat(i,"/").concat(a):"".concat(s).concat(a)}function u(e){return l("interiors/".concat(e)).replace(/\.dif$/i,".glb")}function c(e){return l("shapes/".concat(e)).replace(/\.dts$/i,".glb")}function h(e){return e=e.replace(/^terrain\./,""),l((0,n.getStandardTextureResourceKey)("textures/terrain/".concat(e)),o)}function d(e,t){let r=(0,i.normalizePath)(t).split("/"),a=r.length>1?r.slice(0,-1).join("/")+"/":"",s="".concat(a).concat(e);return l((0,n.getStandardTextureResourceKey)(s),o)}function p(e){return l((0,n.getStandardTextureResourceKey)("textures/".concat(e)),o)}function f(e){return l("audio/".concat(e))}async function m(e){let t=l("textures/".concat(e)),n=await fetch(t);return(await n.text()).split(/(?:\r\n|\r|\n)/).map(e=>{if(!(e=e.trim()).startsWith(";"))return e}).filter(Boolean)}async function g(e){let t=(0,n.getMissionInfo)(e),i=await fetch(l(t.resourcePath)),a=await i.text();return(0,r.parseMissionScript)(a)}async function v(e){let t=await fetch(l("terrains/".concat(e)));return function(e){let t=new DataView(e),n=0,r=t.getUint8(n++),i=new Uint16Array(65536),a=[],s=e=>{let r="";for(let i=0;i0&&a.push(i)}let o=[];for(let e of a){let e=new Uint8Array(65536);for(let r=0;r<65536;r++){var l=t.getUint8(n++);e[r]=l}o.push(e)}return{version:r,textureNames:a,heightMap:i,alphaMaps:o}}(await t.arrayBuffer())}async function y(e){let n=l(e),r=await fetch(n),i=await r.text();return(0,t.parseImageFileList)(i)}}]); \ No newline at end of file diff --git a/docs/_next/static/chunks/node_modules_db4bb196._.js b/docs/_next/static/chunks/node_modules_db4bb196._.js deleted file mode 100644 index d5214cfc..00000000 --- a/docs/_next/static/chunks/node_modules_db4bb196._.js +++ /dev/null @@ -1,1336 +0,0 @@ -(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -function _interop_require_default(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; -} -exports._ = _interop_require_default; -}), -"[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -function _getRequireWildcardCache(nodeInterop) { - if (typeof WeakMap !== "function") return null; - var cacheBabelInterop = new WeakMap(); - var cacheNodeInterop = new WeakMap(); - return (_getRequireWildcardCache = function(nodeInterop) { - return nodeInterop ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); -} -function _interop_require_wildcard(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) return obj; - if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { - default: obj - }; - var cache = _getRequireWildcardCache(nodeInterop); - if (cache && cache.has(obj)) return cache.get(obj); - var newObj = { - __proto__: null - }; - var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - for(var key in obj){ - if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); - else newObj[key] = obj[key]; - } - } - newObj.default = obj; - if (cache) cache.set(obj, newObj); - return newObj; -} -exports._ = _interop_require_wildcard; -}), -"[project]/node_modules/@swc/helpers/cjs/_define_property.cjs [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -function _define_property(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else obj[key] = value; - return obj; -} -exports._ = _define_property; -}), -"[project]/node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -function _class_private_field_loose_base(receiver, privateKey) { - if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { - throw new TypeError("attempted to use private field on non-instance"); - } - return receiver; -} -exports._ = _class_private_field_loose_base; -}), -"[project]/node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var id = 0; -function _class_private_field_loose_key(name) { - return "__private_" + id++ + "_" + name; -} -exports._ = _class_private_field_loose_key; -}), -"[project]/node_modules/react/cjs/react.development.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -/** - * @license React - * react.development.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -"production" !== ("TURBOPACK compile-time value", "development") && function() { - function defineDeprecationWarning(methodName, info) { - Object.defineProperty(Component.prototype, methodName, { - get: function() { - console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); - } - }); - } - function getIteratorFn(maybeIterable) { - if (null === maybeIterable || "object" !== typeof maybeIterable) return null; - maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; - return "function" === typeof maybeIterable ? maybeIterable : null; - } - function warnNoop(publicInstance, callerName) { - publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass"; - var warningKey = publicInstance + "." + callerName; - didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance), didWarnStateUpdateForUnmountedComponent[warningKey] = !0); - } - function Component(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - function ComponentDummy() {} - function PureComponent(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - function testStringCoercion(value) { - return "" + value; - } - function checkKeyStringCoercion(value) { - try { - testStringCoercion(value); - var JSCompiler_inline_result = !1; - } catch (e) { - JSCompiler_inline_result = !0; - } - if (JSCompiler_inline_result) { - JSCompiler_inline_result = console; - var JSCompiler_temp_const = JSCompiler_inline_result.error; - var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; - JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0); - return testStringCoercion(value); - } - } - function getComponentNameFromType(type) { - if (null == type) return null; - if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; - if ("string" === typeof type) return type; - switch(type){ - case REACT_FRAGMENT_TYPE: - return "Fragment"; - case REACT_PROFILER_TYPE: - return "Profiler"; - case REACT_STRICT_MODE_TYPE: - return "StrictMode"; - case REACT_SUSPENSE_TYPE: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - case REACT_ACTIVITY_TYPE: - return "Activity"; - } - if ("object" === typeof type) switch("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof){ - case REACT_PORTAL_TYPE: - return "Portal"; - case REACT_CONTEXT_TYPE: - return (type.displayName || "Context") + ".Provider"; - case REACT_CONSUMER_TYPE: - return (type._context.displayName || "Context") + ".Consumer"; - case REACT_FORWARD_REF_TYPE: - var innerType = type.render; - type = type.displayName; - type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); - return type; - case REACT_MEMO_TYPE: - return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; - case REACT_LAZY_TYPE: - innerType = type._payload; - type = type._init; - try { - return getComponentNameFromType(type(innerType)); - } catch (x) {} - } - return null; - } - function getTaskName(type) { - if (type === REACT_FRAGMENT_TYPE) return "<>"; - if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>"; - try { - var name = getComponentNameFromType(type); - return name ? "<" + name + ">" : "<...>"; - } catch (x) { - return "<...>"; - } - } - function getOwner() { - var dispatcher = ReactSharedInternals.A; - return null === dispatcher ? null : dispatcher.getOwner(); - } - function UnknownOwner() { - return Error("react-stack-top-frame"); - } - function hasValidKey(config) { - if (hasOwnProperty.call(config, "key")) { - var getter = Object.getOwnPropertyDescriptor(config, "key").get; - if (getter && getter.isReactWarning) return !1; - } - return void 0 !== config.key; - } - function defineKeyPropWarningGetter(props, displayName) { - function warnAboutAccessingKey() { - specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName)); - } - warnAboutAccessingKey.isReactWarning = !0; - Object.defineProperty(props, "key", { - get: warnAboutAccessingKey, - configurable: !0 - }); - } - function elementRefGetterWithDeprecationWarning() { - var componentName = getComponentNameFromType(this.type); - didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")); - componentName = this.props.ref; - return void 0 !== componentName ? componentName : null; - } - function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) { - self = props.ref; - type = { - $$typeof: REACT_ELEMENT_TYPE, - type: type, - key: key, - props: props, - _owner: owner - }; - null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", { - enumerable: !1, - get: elementRefGetterWithDeprecationWarning - }) : Object.defineProperty(type, "ref", { - enumerable: !1, - value: null - }); - type._store = {}; - Object.defineProperty(type._store, "validated", { - configurable: !1, - enumerable: !1, - writable: !0, - value: 0 - }); - Object.defineProperty(type, "_debugInfo", { - configurable: !1, - enumerable: !1, - writable: !0, - value: null - }); - Object.defineProperty(type, "_debugStack", { - configurable: !1, - enumerable: !1, - writable: !0, - value: debugStack - }); - Object.defineProperty(type, "_debugTask", { - configurable: !1, - enumerable: !1, - writable: !0, - value: debugTask - }); - Object.freeze && (Object.freeze(type.props), Object.freeze(type)); - return type; - } - function cloneAndReplaceKey(oldElement, newKey) { - newKey = ReactElement(oldElement.type, newKey, void 0, void 0, oldElement._owner, oldElement.props, oldElement._debugStack, oldElement._debugTask); - oldElement._store && (newKey._store.validated = oldElement._store.validated); - return newKey; - } - function isValidElement(object) { - return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE; - } - function escape(key) { - var escaperLookup = { - "=": "=0", - ":": "=2" - }; - return "$" + key.replace(/[=:]/g, function(match) { - return escaperLookup[match]; - }); - } - function getElementKey(element, index) { - return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36); - } - function noop$1() {} - function resolveThenable(thenable) { - switch(thenable.status){ - case "fulfilled": - return thenable.value; - case "rejected": - throw thenable.reason; - default: - switch("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(function(fulfilledValue) { - "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue); - }, function(error) { - "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error); - })), thenable.status){ - case "fulfilled": - return thenable.value; - case "rejected": - throw thenable.reason; - } - } - throw thenable; - } - function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { - var type = typeof children; - if ("undefined" === type || "boolean" === type) children = null; - var invokeCallback = !1; - if (null === children) invokeCallback = !0; - else switch(type){ - case "bigint": - case "string": - case "number": - invokeCallback = !0; - break; - case "object": - switch(children.$$typeof){ - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - invokeCallback = !0; - break; - case REACT_LAZY_TYPE: - return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback); - } - } - if (invokeCallback) { - invokeCallback = children; - callback = callback(invokeCallback); - var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar; - isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) { - return c; - })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(callback, escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + childKey), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback)); - return 1; - } - invokeCallback = 0; - childKey = "" === nameSoFar ? "." : nameSoFar + ":"; - if (isArrayImpl(children)) for(var i = 0; i < children.length; i++)nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback); - else if (i = getIteratorFn(children), "function" === typeof i) for(i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = !0), children = i.call(children), i = 0; !(nameSoFar = children.next()).done;)nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback); - else if ("object" === type) { - if ("function" === typeof children.then) return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback); - array = String(children); - throw Error("Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."); - } - return invokeCallback; - } - function mapChildren(children, func, context) { - if (null == children) return children; - var result = [], count = 0; - mapIntoArray(children, result, "", "", function(child) { - return func.call(context, child, count++); - }); - return result; - } - function lazyInitializer(payload) { - if (-1 === payload._status) { - var ctor = payload._result; - ctor = ctor(); - ctor.then(function(moduleObject) { - if (0 === payload._status || -1 === payload._status) payload._status = 1, payload._result = moduleObject; - }, function(error) { - if (0 === payload._status || -1 === payload._status) payload._status = 2, payload._result = error; - }); - -1 === payload._status && (payload._status = 0, payload._result = ctor); - } - if (1 === payload._status) return ctor = payload._result, void 0 === ctor && console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", ctor), "default" in ctor || console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", ctor), ctor.default; - throw payload._result; - } - function resolveDispatcher() { - var dispatcher = ReactSharedInternals.H; - null === dispatcher && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."); - return dispatcher; - } - function noop() {} - function enqueueTask(task) { - if (null === enqueueTaskImpl) try { - var requireString = ("require" + Math.random()).slice(0, 7); - enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate; - } catch (_err) { - enqueueTaskImpl = function(callback) { - !1 === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = !0, "undefined" === typeof MessageChannel && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.")); - var channel = new MessageChannel(); - channel.port1.onmessage = callback; - channel.port2.postMessage(void 0); - }; - } - return enqueueTaskImpl(task); - } - function aggregateErrors(errors) { - return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0]; - } - function popActScope(prevActQueue, prevActScopeDepth) { - prevActScopeDepth !== actScopeDepth - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "); - actScopeDepth = prevActScopeDepth; - } - function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { - var queue = ReactSharedInternals.actQueue; - if (null !== queue) if (0 !== queue.length) try { - flushActQueue(queue); - enqueueTask(function() { - return recursivelyFlushAsyncActWork(returnValue, resolve, reject); - }); - return; - } catch (error) { - ReactSharedInternals.thrownErrors.push(error); - } - else ReactSharedInternals.actQueue = null; - 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue); - } - function flushActQueue(queue) { - if (!isFlushing) { - isFlushing = !0; - var i = 0; - try { - for(; i < queue.length; i++){ - var callback = queue[i]; - do { - ReactSharedInternals.didUsePromise = !1; - var continuation = callback(!1); - if (null !== continuation) { - if (ReactSharedInternals.didUsePromise) { - queue[i] = callback; - queue.splice(0, i); - return; - } - callback = continuation; - } else break; - }while (1) - } - queue.length = 0; - } catch (error) { - queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error); - } finally{ - isFlushing = !1; - } - } - } - "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); - var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - Symbol.for("react.provider"); - var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = { - isMounted: function() { - return !1; - }, - enqueueForceUpdate: function(publicInstance) { - warnNoop(publicInstance, "forceUpdate"); - }, - enqueueReplaceState: function(publicInstance) { - warnNoop(publicInstance, "replaceState"); - }, - enqueueSetState: function(publicInstance) { - warnNoop(publicInstance, "setState"); - } - }, assign = Object.assign, emptyObject = {}; - Object.freeze(emptyObject); - Component.prototype.isReactComponent = {}; - Component.prototype.setState = function(partialState, callback) { - if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) throw Error("takes an object of state variables to update or a function which returns an object of state variables."); - this.updater.enqueueSetState(this, partialState, callback, "setState"); - }; - Component.prototype.forceUpdate = function(callback) { - this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); - }; - var deprecatedAPIs = { - isMounted: [ - "isMounted", - "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks." - ], - replaceState: [ - "replaceState", - "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)." - ] - }, fnName; - for(fnName in deprecatedAPIs)deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); - ComponentDummy.prototype = Component.prototype; - deprecatedAPIs = PureComponent.prototype = new ComponentDummy(); - deprecatedAPIs.constructor = PureComponent; - assign(deprecatedAPIs, Component.prototype); - deprecatedAPIs.isPureReactComponent = !0; - var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = { - H: null, - A: null, - T: null, - S: null, - V: null, - actQueue: null, - isBatchingLegacy: !1, - didScheduleLegacyUpdate: !1, - didUsePromise: !1, - thrownErrors: [], - getCurrentStack: null, - recentlyCreatedOwnerStacks: 0 - }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() { - return null; - }; - deprecatedAPIs = { - react_stack_bottom_frame: function(callStackForError) { - return callStackForError(); - } - }; - var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime; - var didWarnAboutElementRef = {}; - var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(deprecatedAPIs, UnknownOwner)(); - var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner)); - var didWarnAboutMaps = !1, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) { - if ("object" === typeof window && "function" === typeof window.ErrorEvent) { - var event = new window.ErrorEvent("error", { - bubbles: !0, - cancelable: !0, - message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error), - error: error - }); - if (!window.dispatchEvent(event)) return; - } else if ("object" === typeof __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__["default"] && "function" === typeof __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__["default"].emit) { - __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__["default"].emit("uncaughtException", error); - return; - } - console.error(error); - }, didWarnAboutMessageChannel = !1, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = !1, isFlushing = !1, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) { - queueMicrotask(function() { - return queueMicrotask(callback); - }); - } : enqueueTask; - deprecatedAPIs = Object.freeze({ - __proto__: null, - c: function(size) { - return resolveDispatcher().useMemoCache(size); - } - }); - exports.Children = { - map: mapChildren, - forEach: function(children, forEachFunc, forEachContext) { - mapChildren(children, function() { - forEachFunc.apply(this, arguments); - }, forEachContext); - }, - count: function(children) { - var n = 0; - mapChildren(children, function() { - n++; - }); - return n; - }, - toArray: function(children) { - return mapChildren(children, function(child) { - return child; - }) || []; - }, - only: function(children) { - if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child."); - return children; - } - }; - exports.Component = Component; - exports.Fragment = REACT_FRAGMENT_TYPE; - exports.Profiler = REACT_PROFILER_TYPE; - exports.PureComponent = PureComponent; - exports.StrictMode = REACT_STRICT_MODE_TYPE; - exports.Suspense = REACT_SUSPENSE_TYPE; - exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; - exports.__COMPILER_RUNTIME = deprecatedAPIs; - exports.act = function(callback) { - var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth; - actScopeDepth++; - var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = !1; - try { - var result = callback(); - } catch (error) { - ReactSharedInternals.thrownErrors.push(error); - } - if (0 < ReactSharedInternals.thrownErrors.length) throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback; - if (null !== result && "object" === typeof result && "function" === typeof result.then) { - var thenable = result; - queueSeveralMicrotasks(function() { - didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);")); - }); - return { - then: function(resolve, reject) { - didAwaitActCall = !0; - thenable.then(function(returnValue) { - popActScope(prevActQueue, prevActScopeDepth); - if (0 === prevActScopeDepth) { - try { - flushActQueue(queue), enqueueTask(function() { - return recursivelyFlushAsyncActWork(returnValue, resolve, reject); - }); - } catch (error$0) { - ReactSharedInternals.thrownErrors.push(error$0); - } - if (0 < ReactSharedInternals.thrownErrors.length) { - var _thrownError = aggregateErrors(ReactSharedInternals.thrownErrors); - ReactSharedInternals.thrownErrors.length = 0; - reject(_thrownError); - } - } else resolve(returnValue); - }, function(error) { - popActScope(prevActQueue, prevActScopeDepth); - 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error); - }); - } - }; - } - var returnValue$jscomp$0 = result; - popActScope(prevActQueue, prevActScopeDepth); - 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() { - didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)")); - }), ReactSharedInternals.actQueue = null); - if (0 < ReactSharedInternals.thrownErrors.length) throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback; - return { - then: function(resolve, reject) { - didAwaitActCall = !0; - 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() { - return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve, reject); - })) : resolve(returnValue$jscomp$0); - } - }; - }; - exports.cache = function(fn) { - return function() { - return fn.apply(null, arguments); - }; - }; - exports.captureOwnerStack = function() { - var getCurrentStack = ReactSharedInternals.getCurrentStack; - return null === getCurrentStack ? null : getCurrentStack(); - }; - exports.cloneElement = function(element, config, children) { - if (null === element || void 0 === element) throw Error("The argument must be a React element, but you passed " + element + "."); - var props = assign({}, element.props), key = element.key, owner = element._owner; - if (null != config) { - var JSCompiler_inline_result; - a: { - if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(config, "ref").get) && JSCompiler_inline_result.isReactWarning) { - JSCompiler_inline_result = !1; - break a; - } - JSCompiler_inline_result = void 0 !== config.ref; - } - JSCompiler_inline_result && (owner = getOwner()); - hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key); - for(propName in config)!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]); - } - var propName = arguments.length - 2; - if (1 === propName) props.children = children; - else if (1 < propName) { - JSCompiler_inline_result = Array(propName); - for(var i = 0; i < propName; i++)JSCompiler_inline_result[i] = arguments[i + 2]; - props.children = JSCompiler_inline_result; - } - props = ReactElement(element.type, key, void 0, void 0, owner, props, element._debugStack, element._debugTask); - for(key = 2; key < arguments.length; key++)owner = arguments[key], isValidElement(owner) && owner._store && (owner._store.validated = 1); - return props; - }; - exports.createContext = function(defaultValue) { - defaultValue = { - $$typeof: REACT_CONTEXT_TYPE, - _currentValue: defaultValue, - _currentValue2: defaultValue, - _threadCount: 0, - Provider: null, - Consumer: null - }; - defaultValue.Provider = defaultValue; - defaultValue.Consumer = { - $$typeof: REACT_CONSUMER_TYPE, - _context: defaultValue - }; - defaultValue._currentRenderer = null; - defaultValue._currentRenderer2 = null; - return defaultValue; - }; - exports.createElement = function(type, config, children) { - for(var i = 2; i < arguments.length; i++){ - var node = arguments[i]; - isValidElement(node) && node._store && (node._store.validated = 1); - } - i = {}; - node = null; - if (null != config) for(propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = !0, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), hasValidKey(config) && (checkKeyStringCoercion(config.key), node = "" + config.key), config)hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]); - var childrenLength = arguments.length - 2; - if (1 === childrenLength) i.children = children; - else if (1 < childrenLength) { - for(var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)childArray[_i] = arguments[_i + 2]; - Object.freeze && Object.freeze(childArray); - i.children = childArray; - } - if (type && type.defaultProps) for(propName in childrenLength = type.defaultProps, childrenLength)void 0 === i[propName] && (i[propName] = childrenLength[propName]); - node && defineKeyPropWarningGetter(i, "function" === typeof type ? type.displayName || type.name || "Unknown" : type); - var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++; - return ReactElement(type, node, void 0, void 0, getOwner(), i, propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack, propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask); - }; - exports.createRef = function() { - var refObject = { - current: null - }; - Object.seal(refObject); - return refObject; - }; - exports.forwardRef = function(render) { - null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : "function" !== typeof render ? console.error("forwardRef requires a render function but was given %s.", null === render ? "null" : typeof render) : 0 !== render.length && 2 !== render.length && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); - null != render && null != render.defaultProps && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"); - var elementType = { - $$typeof: REACT_FORWARD_REF_TYPE, - render: render - }, ownName; - Object.defineProperty(elementType, "displayName", { - enumerable: !1, - configurable: !0, - get: function() { - return ownName; - }, - set: function(name) { - ownName = name; - render.name || render.displayName || (Object.defineProperty(render, "name", { - value: name - }), render.displayName = name); - } - }); - return elementType; - }; - exports.isValidElement = isValidElement; - exports.lazy = function(ctor) { - return { - $$typeof: REACT_LAZY_TYPE, - _payload: { - _status: -1, - _result: ctor - }, - _init: lazyInitializer - }; - }; - exports.memo = function(type, compare) { - null == type && console.error("memo: The first argument must be a component. Instead received: %s", null === type ? "null" : typeof type); - compare = { - $$typeof: REACT_MEMO_TYPE, - type: type, - compare: void 0 === compare ? null : compare - }; - var ownName; - Object.defineProperty(compare, "displayName", { - enumerable: !1, - configurable: !0, - get: function() { - return ownName; - }, - set: function(name) { - ownName = name; - type.name || type.displayName || (Object.defineProperty(type, "name", { - value: name - }), type.displayName = name); - } - }); - return compare; - }; - exports.startTransition = function(scope) { - var prevTransition = ReactSharedInternals.T, currentTransition = {}; - ReactSharedInternals.T = currentTransition; - currentTransition._updatedFibers = new Set(); - try { - var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue); - "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError); - } catch (error) { - reportGlobalError(error); - } finally{ - null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), ReactSharedInternals.T = prevTransition; - } - }; - exports.unstable_useCacheRefresh = function() { - return resolveDispatcher().useCacheRefresh(); - }; - exports.use = function(usable) { - return resolveDispatcher().use(usable); - }; - exports.useActionState = function(action, initialState, permalink) { - return resolveDispatcher().useActionState(action, initialState, permalink); - }; - exports.useCallback = function(callback, deps) { - return resolveDispatcher().useCallback(callback, deps); - }; - exports.useContext = function(Context) { - var dispatcher = resolveDispatcher(); - Context.$$typeof === REACT_CONSUMER_TYPE && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"); - return dispatcher.useContext(Context); - }; - exports.useDebugValue = function(value, formatterFn) { - return resolveDispatcher().useDebugValue(value, formatterFn); - }; - exports.useDeferredValue = function(value, initialValue) { - return resolveDispatcher().useDeferredValue(value, initialValue); - }; - exports.useEffect = function(create, createDeps, update) { - null == create && console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"); - var dispatcher = resolveDispatcher(); - if ("function" === typeof update) throw Error("useEffect CRUD overload is not enabled in this build of React."); - return dispatcher.useEffect(create, createDeps); - }; - exports.useId = function() { - return resolveDispatcher().useId(); - }; - exports.useImperativeHandle = function(ref, create, deps) { - return resolveDispatcher().useImperativeHandle(ref, create, deps); - }; - exports.useInsertionEffect = function(create, deps) { - null == create && console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"); - return resolveDispatcher().useInsertionEffect(create, deps); - }; - exports.useLayoutEffect = function(create, deps) { - null == create && console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"); - return resolveDispatcher().useLayoutEffect(create, deps); - }; - exports.useMemo = function(create, deps) { - return resolveDispatcher().useMemo(create, deps); - }; - exports.useOptimistic = function(passthrough, reducer) { - return resolveDispatcher().useOptimistic(passthrough, reducer); - }; - exports.useReducer = function(reducer, initialArg, init) { - return resolveDispatcher().useReducer(reducer, initialArg, init); - }; - exports.useRef = function(initialValue) { - return resolveDispatcher().useRef(initialValue); - }; - exports.useState = function(initialState) { - return resolveDispatcher().useState(initialState); - }; - exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) { - return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); - }; - exports.useTransition = function() { - return resolveDispatcher().useTransition(); - }; - exports.version = "19.1.1"; - "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); -}(); -}), -"[project]/node_modules/react/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -'use strict'; -if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable -; -else { - module.exports = __turbopack_context__.r("[project]/node_modules/react/cjs/react.development.js [client] (ecmascript)"); -} -}), -"[project]/node_modules/react/cjs/react-jsx-runtime.development.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -/** - * @license React - * react-jsx-runtime.development.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -"production" !== ("TURBOPACK compile-time value", "development") && function() { - function getComponentNameFromType(type) { - if (null == type) return null; - if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; - if ("string" === typeof type) return type; - switch(type){ - case REACT_FRAGMENT_TYPE: - return "Fragment"; - case REACT_PROFILER_TYPE: - return "Profiler"; - case REACT_STRICT_MODE_TYPE: - return "StrictMode"; - case REACT_SUSPENSE_TYPE: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - case REACT_ACTIVITY_TYPE: - return "Activity"; - } - if ("object" === typeof type) switch("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof){ - case REACT_PORTAL_TYPE: - return "Portal"; - case REACT_CONTEXT_TYPE: - return (type.displayName || "Context") + ".Provider"; - case REACT_CONSUMER_TYPE: - return (type._context.displayName || "Context") + ".Consumer"; - case REACT_FORWARD_REF_TYPE: - var innerType = type.render; - type = type.displayName; - type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); - return type; - case REACT_MEMO_TYPE: - return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; - case REACT_LAZY_TYPE: - innerType = type._payload; - type = type._init; - try { - return getComponentNameFromType(type(innerType)); - } catch (x) {} - } - return null; - } - function testStringCoercion(value) { - return "" + value; - } - function checkKeyStringCoercion(value) { - try { - testStringCoercion(value); - var JSCompiler_inline_result = !1; - } catch (e) { - JSCompiler_inline_result = !0; - } - if (JSCompiler_inline_result) { - JSCompiler_inline_result = console; - var JSCompiler_temp_const = JSCompiler_inline_result.error; - var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; - JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0); - return testStringCoercion(value); - } - } - function getTaskName(type) { - if (type === REACT_FRAGMENT_TYPE) return "<>"; - if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>"; - try { - var name = getComponentNameFromType(type); - return name ? "<" + name + ">" : "<...>"; - } catch (x) { - return "<...>"; - } - } - function getOwner() { - var dispatcher = ReactSharedInternals.A; - return null === dispatcher ? null : dispatcher.getOwner(); - } - function UnknownOwner() { - return Error("react-stack-top-frame"); - } - function hasValidKey(config) { - if (hasOwnProperty.call(config, "key")) { - var getter = Object.getOwnPropertyDescriptor(config, "key").get; - if (getter && getter.isReactWarning) return !1; - } - return void 0 !== config.key; - } - function defineKeyPropWarningGetter(props, displayName) { - function warnAboutAccessingKey() { - specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName)); - } - warnAboutAccessingKey.isReactWarning = !0; - Object.defineProperty(props, "key", { - get: warnAboutAccessingKey, - configurable: !0 - }); - } - function elementRefGetterWithDeprecationWarning() { - var componentName = getComponentNameFromType(this.type); - didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")); - componentName = this.props.ref; - return void 0 !== componentName ? componentName : null; - } - function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) { - self = props.ref; - type = { - $$typeof: REACT_ELEMENT_TYPE, - type: type, - key: key, - props: props, - _owner: owner - }; - null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", { - enumerable: !1, - get: elementRefGetterWithDeprecationWarning - }) : Object.defineProperty(type, "ref", { - enumerable: !1, - value: null - }); - type._store = {}; - Object.defineProperty(type._store, "validated", { - configurable: !1, - enumerable: !1, - writable: !0, - value: 0 - }); - Object.defineProperty(type, "_debugInfo", { - configurable: !1, - enumerable: !1, - writable: !0, - value: null - }); - Object.defineProperty(type, "_debugStack", { - configurable: !1, - enumerable: !1, - writable: !0, - value: debugStack - }); - Object.defineProperty(type, "_debugTask", { - configurable: !1, - enumerable: !1, - writable: !0, - value: debugTask - }); - Object.freeze && (Object.freeze(type.props), Object.freeze(type)); - return type; - } - function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self, debugStack, debugTask) { - var children = config.children; - if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) { - for(isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)validateChildKeys(children[isStaticChildren]); - Object.freeze && Object.freeze(children); - } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); - else validateChildKeys(children); - if (hasOwnProperty.call(config, "key")) { - children = getComponentNameFromType(type); - var keys = Object.keys(config).filter(function(k) { - return "key" !== k; - }); - isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; - didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0); - } - children = null; - void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey); - hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key); - if ("key" in config) { - maybeKey = {}; - for(var propName in config)"key" !== propName && (maybeKey[propName] = config[propName]); - } else maybeKey = config; - children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type); - return ReactElement(type, children, self, source, getOwner(), maybeKey, debugStack, debugTask); - } - function validateChildKeys(node) { - "object" === typeof node && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1); - } - var React = __turbopack_context__.r("[project]/node_modules/react/index.js [client] (ecmascript)"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - Symbol.for("react.provider"); - var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() { - return null; - }; - React = { - react_stack_bottom_frame: function(callStackForError) { - return callStackForError(); - } - }; - var specialPropKeyWarningShown; - var didWarnAboutElementRef = {}; - var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)(); - var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner)); - var didWarnAboutKeySpread = {}; - exports.Fragment = REACT_FRAGMENT_TYPE; - exports.jsx = function(type, config, maybeKey, source, self) { - var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++; - return jsxDEVImpl(type, config, maybeKey, !1, source, self, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask); - }; - exports.jsxs = function(type, config, maybeKey, source, self) { - var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++; - return jsxDEVImpl(type, config, maybeKey, !0, source, self, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask); - }; -}(); -}), -"[project]/node_modules/react/jsx-runtime.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -'use strict'; -if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable -; -else { - module.exports = __turbopack_context__.r("[project]/node_modules/react/cjs/react-jsx-runtime.development.js [client] (ecmascript)"); -} -}), -"[project]/node_modules/scheduler/cjs/scheduler.development.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -/** - * @license React - * scheduler.development.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -"production" !== ("TURBOPACK compile-time value", "development") && function() { - function performWorkUntilDeadline() { - needsPaint = !1; - if (isMessageLoopRunning) { - var currentTime = exports.unstable_now(); - startTime = currentTime; - var hasMoreWork = !0; - try { - a: { - isHostCallbackScheduled = !1; - isHostTimeoutScheduled && (isHostTimeoutScheduled = !1, localClearTimeout(taskTimeoutID), taskTimeoutID = -1); - isPerformingWork = !0; - var previousPriorityLevel = currentPriorityLevel; - try { - b: { - advanceTimers(currentTime); - for(currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost());){ - var callback = currentTask.callback; - if ("function" === typeof callback) { - currentTask.callback = null; - currentPriorityLevel = currentTask.priorityLevel; - var continuationCallback = callback(currentTask.expirationTime <= currentTime); - currentTime = exports.unstable_now(); - if ("function" === typeof continuationCallback) { - currentTask.callback = continuationCallback; - advanceTimers(currentTime); - hasMoreWork = !0; - break b; - } - currentTask === peek(taskQueue) && pop(taskQueue); - advanceTimers(currentTime); - } else pop(taskQueue); - currentTask = peek(taskQueue); - } - if (null !== currentTask) hasMoreWork = !0; - else { - var firstTimer = peek(timerQueue); - null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - hasMoreWork = !1; - } - } - break a; - } finally{ - currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = !1; - } - hasMoreWork = void 0; - } - } finally{ - hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = !1; - } - } - } - function push(heap, node) { - var index = heap.length; - heap.push(node); - a: for(; 0 < index;){ - var parentIndex = index - 1 >>> 1, parent = heap[parentIndex]; - if (0 < compare(parent, node)) heap[parentIndex] = node, heap[index] = parent, index = parentIndex; - else break a; - } - } - function peek(heap) { - return 0 === heap.length ? null : heap[0]; - } - function pop(heap) { - if (0 === heap.length) return null; - var first = heap[0], last = heap.pop(); - if (last !== first) { - heap[0] = last; - a: for(var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength;){ - var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex]; - if (0 > compare(left, last)) rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex); - else if (rightIndex < length && 0 > compare(right, last)) heap[index] = right, heap[rightIndex] = last, index = rightIndex; - else break a; - } - } - return first; - } - function compare(a, b) { - var diff = a.sortIndex - b.sortIndex; - return 0 !== diff ? diff : a.id - b.id; - } - function advanceTimers(currentTime) { - for(var timer = peek(timerQueue); null !== timer;){ - if (null === timer.callback) pop(timerQueue); - else if (timer.startTime <= currentTime) pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer); - else break; - timer = peek(timerQueue); - } - } - function handleTimeout(currentTime) { - isHostTimeoutScheduled = !1; - advanceTimers(currentTime); - if (!isHostCallbackScheduled) if (null !== peek(taskQueue)) isHostCallbackScheduled = !0, isMessageLoopRunning || (isMessageLoopRunning = !0, schedulePerformWorkUntilDeadline()); - else { - var firstTimer = peek(timerQueue); - null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - } - function shouldYieldToHost() { - return needsPaint ? !0 : exports.unstable_now() - startTime < frameInterval ? !1 : !0; - } - function requestHostTimeout(callback, ms) { - taskTimeoutID = localSetTimeout(function() { - callback(exports.unstable_now()); - }, ms); - } - "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); - exports.unstable_now = void 0; - if ("object" === typeof performance && "function" === typeof performance.now) { - var localPerformance = performance; - exports.unstable_now = function() { - return localPerformance.now(); - }; - } else { - var localDate = Date, initialTime = localDate.now(); - exports.unstable_now = function() { - return localDate.now() - initialTime; - }; - } - var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, isHostCallbackScheduled = !1, isHostTimeoutScheduled = !1, needsPaint = !1, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, isMessageLoopRunning = !1, taskTimeoutID = -1, frameInterval = 5, startTime = -1; - if ("function" === typeof localSetImmediate) var schedulePerformWorkUntilDeadline = function() { - localSetImmediate(performWorkUntilDeadline); - }; - else if ("undefined" !== typeof MessageChannel) { - var channel = new MessageChannel(), port = channel.port2; - channel.port1.onmessage = performWorkUntilDeadline; - schedulePerformWorkUntilDeadline = function() { - port.postMessage(null); - }; - } else schedulePerformWorkUntilDeadline = function() { - localSetTimeout(performWorkUntilDeadline, 0); - }; - exports.unstable_IdlePriority = 5; - exports.unstable_ImmediatePriority = 1; - exports.unstable_LowPriority = 4; - exports.unstable_NormalPriority = 3; - exports.unstable_Profiling = null; - exports.unstable_UserBlockingPriority = 2; - exports.unstable_cancelCallback = function(task) { - task.callback = null; - }; - exports.unstable_forceFrameRate = function(fps) { - 0 > fps || 125 < fps ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5; - }; - exports.unstable_getCurrentPriorityLevel = function() { - return currentPriorityLevel; - }; - exports.unstable_next = function(eventHandler) { - switch(currentPriorityLevel){ - case 1: - case 2: - case 3: - var priorityLevel = 3; - break; - default: - priorityLevel = currentPriorityLevel; - } - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - try { - return eventHandler(); - } finally{ - currentPriorityLevel = previousPriorityLevel; - } - }; - exports.unstable_requestPaint = function() { - needsPaint = !0; - }; - exports.unstable_runWithPriority = function(priorityLevel, eventHandler) { - switch(priorityLevel){ - case 1: - case 2: - case 3: - case 4: - case 5: - break; - default: - priorityLevel = 3; - } - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - try { - return eventHandler(); - } finally{ - currentPriorityLevel = previousPriorityLevel; - } - }; - exports.unstable_scheduleCallback = function(priorityLevel, callback, options) { - var currentTime = exports.unstable_now(); - "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime; - switch(priorityLevel){ - case 1: - var timeout = -1; - break; - case 2: - timeout = 250; - break; - case 5: - timeout = 1073741823; - break; - case 4: - timeout = 1e4; - break; - default: - timeout = 5e3; - } - timeout = options + timeout; - priorityLevel = { - id: taskIdCounter++, - callback: callback, - priorityLevel: priorityLevel, - startTime: options, - expirationTime: timeout, - sortIndex: -1 - }; - options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = !0, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = !0, isMessageLoopRunning || (isMessageLoopRunning = !0, schedulePerformWorkUntilDeadline()))); - return priorityLevel; - }; - exports.unstable_shouldYield = shouldYieldToHost; - exports.unstable_wrapCallback = function(callback) { - var parentPriorityLevel = currentPriorityLevel; - return function() { - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = parentPriorityLevel; - try { - return callback.apply(this, arguments); - } finally{ - currentPriorityLevel = previousPriorityLevel; - } - }; - }; - "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); -}(); -}), -"[project]/node_modules/scheduler/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -'use strict'; -if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable -; -else { - module.exports = __turbopack_context__.r("[project]/node_modules/scheduler/cjs/scheduler.development.js [client] (ecmascript)"); -} -}), -]); - -//# sourceMappingURL=node_modules_db4bb196._.js.map \ No newline at end of file diff --git a/docs/_next/static/chunks/node_modules_db4bb196._.js.map b/docs/_next/static/chunks/node_modules_db4bb196._.js.map deleted file mode 100644 index 3117bc11..00000000 --- a/docs/_next/static/chunks/node_modules_db4bb196._.js.map +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": 3, - "sources": [], - "sections": [ - {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/%40swc/helpers/cjs/_interop_require_default.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nexports._ = _interop_require_default;\n"],"names":[],"mappings":"AAEA,SAAS,yBAAyB,GAAG;IACjC,OAAO,OAAO,IAAI,UAAU,GAAG,MAAM;QAAE,SAAS;IAAI;AACxD;AACA,QAAQ,CAAC,GAAG","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 14, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/%40swc/helpers/cjs/_interop_require_wildcard.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) return obj;\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") return { default: obj };\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) return cache.get(obj);\n\n var newObj = { __proto__: null };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);\n else newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n\n if (cache) cache.set(obj, newObj);\n\n return newObj;\n}\nexports._ = _interop_require_wildcard;\n"],"names":[],"mappings":"AAEA,SAAS,yBAAyB,WAAW;IACzC,IAAI,OAAO,YAAY,YAAY,OAAO;IAE1C,IAAI,oBAAoB,IAAI;IAC5B,IAAI,mBAAmB,IAAI;IAE3B,OAAO,CAAC,2BAA2B,SAAS,WAAW;QACnD,OAAO,cAAc,mBAAmB;IAC5C,CAAC,EAAE;AACP;AACA,SAAS,0BAA0B,GAAG,EAAE,WAAW;IAC/C,IAAI,CAAC,eAAe,OAAO,IAAI,UAAU,EAAE,OAAO;IAClD,IAAI,QAAQ,QAAQ,OAAO,QAAQ,YAAY,OAAO,QAAQ,YAAY,OAAO;QAAE,SAAS;IAAI;IAEhG,IAAI,QAAQ,yBAAyB;IAErC,IAAI,SAAS,MAAM,GAAG,CAAC,MAAM,OAAO,MAAM,GAAG,CAAC;IAE9C,IAAI,SAAS;QAAE,WAAW;IAAK;IAC/B,IAAI,wBAAwB,OAAO,cAAc,IAAI,OAAO,wBAAwB;IAEpF,IAAK,IAAI,OAAO,IAAK;QACjB,IAAI,QAAQ,aAAa,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,MAAM;YACrE,IAAI,OAAO,wBAAwB,OAAO,wBAAwB,CAAC,KAAK,OAAO;YAC/E,IAAI,QAAQ,CAAC,KAAK,GAAG,IAAI,KAAK,GAAG,GAAG,OAAO,cAAc,CAAC,QAAQ,KAAK;iBAClE,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI;QAC/B;IACJ;IAEA,OAAO,OAAO,GAAG;IAEjB,IAAI,OAAO,MAAM,GAAG,CAAC,KAAK;IAE1B,OAAO;AACX;AACA,QAAQ,CAAC,GAAG","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 49, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/%40swc/helpers/cjs/_define_property.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });\n } else obj[key] = value;\n\n return obj;\n}\nexports._ = _define_property;\n"],"names":[],"mappings":"AAEA,SAAS,iBAAiB,GAAG,EAAE,GAAG,EAAE,KAAK;IACrC,IAAI,OAAO,KAAK;QACZ,OAAO,cAAc,CAAC,KAAK,KAAK;YAAE,OAAO;YAAO,YAAY;YAAM,cAAc;YAAM,UAAU;QAAK;IACzG,OAAO,GAAG,CAAC,IAAI,GAAG;IAElB,OAAO;AACX;AACA,QAAQ,CAAC,GAAG","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 65, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/%40swc/helpers/cjs/_class_private_field_loose_base.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _class_private_field_loose_base(receiver, privateKey) {\n if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {\n throw new TypeError(\"attempted to use private field on non-instance\");\n }\n\n return receiver;\n}\nexports._ = _class_private_field_loose_base;\n"],"names":[],"mappings":"AAEA,SAAS,gCAAgC,QAAQ,EAAE,UAAU;IACzD,IAAI,CAAC,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,aAAa;QAC7D,MAAM,IAAI,UAAU;IACxB;IAEA,OAAO;AACX;AACA,QAAQ,CAAC,GAAG","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 76, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/%40swc/helpers/cjs/_class_private_field_loose_key.cjs"],"sourcesContent":["\"use strict\";\n\nvar id = 0;\n\nfunction _class_private_field_loose_key(name) {\n return \"__private_\" + id++ + \"_\" + name;\n}\nexports._ = _class_private_field_loose_key;\n"],"names":[],"mappings":"AAEA,IAAI,KAAK;AAET,SAAS,+BAA+B,IAAI;IACxC,OAAO,eAAe,OAAO,MAAM;AACvC;AACA,QAAQ,CAAC,GAAG","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 85, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/react/cjs/react.development.js"],"sourcesContent":["/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function defineDeprecationWarning(methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n console.warn(\n \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n info[0],\n info[1]\n );\n }\n });\n }\n function getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n }\n function warnNoop(publicInstance, callerName) {\n publicInstance =\n ((publicInstance = publicInstance.constructor) &&\n (publicInstance.displayName || publicInstance.name)) ||\n \"ReactClass\";\n var warningKey = publicInstance + \".\" + callerName;\n didWarnStateUpdateForUnmountedComponent[warningKey] ||\n (console.error(\n \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n callerName,\n publicInstance\n ),\n (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n }\n function Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function ComponentDummy() {}\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function cloneAndReplaceKey(oldElement, newKey) {\n newKey = ReactElement(\n oldElement.type,\n newKey,\n void 0,\n void 0,\n oldElement._owner,\n oldElement.props,\n oldElement._debugStack,\n oldElement._debugTask\n );\n oldElement._store &&\n (newKey._store.validated = oldElement._store.validated);\n return newKey;\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n }\n function getElementKey(element, index) {\n return \"object\" === typeof element &&\n null !== element &&\n null != element.key\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n : index.toString(36);\n }\n function noop$1() {}\n function resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop$1, noop$1)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"),\n (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n }\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback) {\n invokeCallback = children;\n callback = callback(invokeCallback);\n var childKey =\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != childKey &&\n (escapedPrefix =\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (null != callback.key &&\n ((invokeCallback && invokeCallback.key === callback.key) ||\n checkKeyStringCoercion(callback.key)),\n (escapedPrefix = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (invokeCallback && invokeCallback.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n childKey\n )),\n \"\" !== nameSoFar &&\n null != invokeCallback &&\n isValidElement(invokeCallback) &&\n null == invokeCallback.key &&\n invokeCallback._store &&\n !invokeCallback._store.validated &&\n (escapedPrefix._store.validated = 2),\n (callback = escapedPrefix)),\n array.push(callback));\n return 1;\n }\n invokeCallback = 0;\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = childKey + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n i === children.entries &&\n (didWarnAboutMaps ||\n console.warn(\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n ),\n (didWarnAboutMaps = !0)),\n children = i.call(children),\n i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = childKey + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n }\n function mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n }\n function lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status &&\n ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status)\n return (\n (ctor = payload._result),\n void 0 === ctor &&\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n ctor\n ),\n \"default\" in ctor ||\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\n ctor\n ),\n ctor.default\n );\n throw payload._result;\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n function noop() {}\n function enqueueTask(task) {\n if (null === enqueueTaskImpl)\n try {\n var requireString = (\"require\" + Math.random()).slice(0, 7);\n enqueueTaskImpl = (module && module[requireString]).call(\n module,\n \"timers\"\n ).setImmediate;\n } catch (_err) {\n enqueueTaskImpl = function (callback) {\n !1 === didWarnAboutMessageChannel &&\n ((didWarnAboutMessageChannel = !0),\n \"undefined\" === typeof MessageChannel &&\n console.error(\n \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n ));\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(void 0);\n };\n }\n return enqueueTaskImpl(task);\n }\n function aggregateErrors(errors) {\n return 1 < errors.length && \"function\" === typeof AggregateError\n ? new AggregateError(errors)\n : errors[0];\n }\n function popActScope(prevActQueue, prevActScopeDepth) {\n prevActScopeDepth !== actScopeDepth - 1 &&\n console.error(\n \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n );\n actScopeDepth = prevActScopeDepth;\n }\n function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n var queue = ReactSharedInternals.actQueue;\n if (null !== queue)\n if (0 !== queue.length)\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n return;\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n else ReactSharedInternals.actQueue = null;\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(queue))\n : resolve(returnValue);\n }\n function flushActQueue(queue) {\n if (!isFlushing) {\n isFlushing = !0;\n var i = 0;\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n do {\n ReactSharedInternals.didUsePromise = !1;\n var continuation = callback(!1);\n if (null !== continuation) {\n if (ReactSharedInternals.didUsePromise) {\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n callback = continuation;\n } else break;\n } while (1);\n }\n queue.length = 0;\n } catch (error) {\n queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n } finally {\n isFlushing = !1;\n }\n }\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n didWarnStateUpdateForUnmountedComponent = {},\n ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, \"forceUpdate\");\n },\n enqueueReplaceState: function (publicInstance) {\n warnNoop(publicInstance, \"replaceState\");\n },\n enqueueSetState: function (publicInstance) {\n warnNoop(publicInstance, \"setState\");\n }\n },\n assign = Object.assign,\n emptyObject = {};\n Object.freeze(emptyObject);\n Component.prototype.isReactComponent = {};\n Component.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n };\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n };\n var deprecatedAPIs = {\n isMounted: [\n \"isMounted\",\n \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n ],\n replaceState: [\n \"replaceState\",\n \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n ]\n },\n fnName;\n for (fnName in deprecatedAPIs)\n deprecatedAPIs.hasOwnProperty(fnName) &&\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n ComponentDummy.prototype = Component.prototype;\n deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n deprecatedAPIs.constructor = PureComponent;\n assign(deprecatedAPIs, Component.prototype);\n deprecatedAPIs.isPureReactComponent = !0;\n var isArrayImpl = Array.isArray,\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals = {\n H: null,\n A: null,\n T: null,\n S: null,\n V: null,\n actQueue: null,\n isBatchingLegacy: !1,\n didScheduleLegacyUpdate: !1,\n didUsePromise: !1,\n thrownErrors: [],\n getCurrentStack: null,\n recentlyCreatedOwnerStacks: 0\n },\n hasOwnProperty = Object.prototype.hasOwnProperty,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n deprecatedAPIs = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n deprecatedAPIs,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutMaps = !1,\n userProvidedKeyEscapeRegex = /\\/+/g,\n reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n didWarnAboutMessageChannel = !1,\n enqueueTaskImpl = null,\n actScopeDepth = 0,\n didWarnNoAwaitAct = !1,\n isFlushing = !1,\n queueSeveralMicrotasks =\n \"function\" === typeof queueMicrotask\n ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n }\n : enqueueTask;\n deprecatedAPIs = Object.freeze({\n __proto__: null,\n c: function (size) {\n return resolveDispatcher().useMemoCache(size);\n }\n });\n exports.Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\n exports.Component = Component;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.PureComponent = PureComponent;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\n exports.__COMPILER_RUNTIME = deprecatedAPIs;\n exports.act = function (callback) {\n var prevActQueue = ReactSharedInternals.actQueue,\n prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = (ReactSharedInternals.actQueue =\n null !== prevActQueue ? prevActQueue : []),\n didAwaitActCall = !1;\n try {\n var result = callback();\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n (popActScope(prevActQueue, prevActScopeDepth),\n (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n if (\n null !== result &&\n \"object\" === typeof result &&\n \"function\" === typeof result.then\n ) {\n var thenable = result;\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n ));\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n thenable.then(\n function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n if (0 === prevActScopeDepth) {\n try {\n flushActQueue(queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue,\n resolve,\n reject\n );\n });\n } catch (error$0) {\n ReactSharedInternals.thrownErrors.push(error$0);\n }\n if (0 < ReactSharedInternals.thrownErrors.length) {\n var _thrownError = aggregateErrors(\n ReactSharedInternals.thrownErrors\n );\n ReactSharedInternals.thrownErrors.length = 0;\n reject(_thrownError);\n }\n } else resolve(returnValue);\n },\n function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((error = aggregateErrors(\n ReactSharedInternals.thrownErrors\n )),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(error))\n : reject(error);\n }\n );\n }\n };\n }\n var returnValue$jscomp$0 = result;\n popActScope(prevActQueue, prevActScopeDepth);\n 0 === prevActScopeDepth &&\n (flushActQueue(queue),\n 0 !== queue.length &&\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n ));\n }),\n (ReactSharedInternals.actQueue = null));\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n 0 === prevActScopeDepth\n ? ((ReactSharedInternals.actQueue = queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue$jscomp$0,\n resolve,\n reject\n );\n }))\n : resolve(returnValue$jscomp$0);\n }\n };\n };\n exports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n };\n exports.captureOwnerStack = function () {\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\n return null === getCurrentStack ? null : getCurrentStack();\n };\n exports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" +\n element +\n \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = element._owner;\n if (null != config) {\n var JSCompiler_inline_result;\n a: {\n if (\n hasOwnProperty.call(config, \"ref\") &&\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n config,\n \"ref\"\n ).get) &&\n JSCompiler_inline_result.isReactWarning\n ) {\n JSCompiler_inline_result = !1;\n break a;\n }\n JSCompiler_inline_result = void 0 !== config.ref;\n }\n JSCompiler_inline_result && (owner = getOwner());\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n for (propName in config)\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n }\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n JSCompiler_inline_result = Array(propName);\n for (var i = 0; i < propName; i++)\n JSCompiler_inline_result[i] = arguments[i + 2];\n props.children = JSCompiler_inline_result;\n }\n props = ReactElement(\n element.type,\n key,\n void 0,\n void 0,\n owner,\n props,\n element._debugStack,\n element._debugTask\n );\n for (key = 2; key < arguments.length; key++)\n (owner = arguments[key]),\n isValidElement(owner) && owner._store && (owner._store.validated = 1);\n return props;\n };\n exports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n defaultValue._currentRenderer = null;\n defaultValue._currentRenderer2 = null;\n return defaultValue;\n };\n exports.createElement = function (type, config, children) {\n for (var i = 2; i < arguments.length; i++) {\n var node = arguments[i];\n isValidElement(node) && node._store && (node._store.validated = 1);\n }\n i = {};\n node = null;\n if (null != config)\n for (propName in (didWarnAboutOldJSXRuntime ||\n !(\"__self\" in config) ||\n \"key\" in config ||\n ((didWarnAboutOldJSXRuntime = !0),\n console.warn(\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n )),\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (node = \"\" + config.key)),\n config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (i[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) i.children = children;\n else if (1 < childrenLength) {\n for (\n var childArray = Array(childrenLength), _i = 0;\n _i < childrenLength;\n _i++\n )\n childArray[_i] = arguments[_i + 2];\n Object.freeze && Object.freeze(childArray);\n i.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n node &&\n defineKeyPropWarningGetter(\n i,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return ReactElement(\n type,\n node,\n void 0,\n void 0,\n getOwner(),\n i,\n propName ? Error(\"react-stack-top-frame\") : unknownOwnerDebugStack,\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.createRef = function () {\n var refObject = { current: null };\n Object.seal(refObject);\n return refObject;\n };\n exports.forwardRef = function (render) {\n null != render && render.$$typeof === REACT_MEMO_TYPE\n ? console.error(\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n )\n : \"function\" !== typeof render\n ? console.error(\n \"forwardRef requires a render function but was given %s.\",\n null === render ? \"null\" : typeof render\n )\n : 0 !== render.length &&\n 2 !== render.length &&\n console.error(\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n 1 === render.length\n ? \"Did you forget to use the ref parameter?\"\n : \"Any additional parameter will be undefined.\"\n );\n null != render &&\n null != render.defaultProps &&\n console.error(\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n );\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n ownName;\n Object.defineProperty(elementType, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n render.name ||\n render.displayName ||\n (Object.defineProperty(render, \"name\", { value: name }),\n (render.displayName = name));\n }\n });\n return elementType;\n };\n exports.isValidElement = isValidElement;\n exports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n };\n exports.memo = function (type, compare) {\n null == type &&\n console.error(\n \"memo: The first argument must be a component. Instead received: %s\",\n null === type ? \"null\" : typeof type\n );\n compare = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n var ownName;\n Object.defineProperty(compare, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n type.name ||\n type.displayName ||\n (Object.defineProperty(type, \"name\", { value: name }),\n (type.displayName = name));\n }\n });\n return compare;\n };\n exports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n currentTransition._updatedFibers = new Set();\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n returnValue.then(noop, reportGlobalError);\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null === prevTransition &&\n currentTransition._updatedFibers &&\n ((scope = currentTransition._updatedFibers.size),\n currentTransition._updatedFibers.clear(),\n 10 < scope &&\n console.warn(\n \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n )),\n (ReactSharedInternals.T = prevTransition);\n }\n };\n exports.unstable_useCacheRefresh = function () {\n return resolveDispatcher().useCacheRefresh();\n };\n exports.use = function (usable) {\n return resolveDispatcher().use(usable);\n };\n exports.useActionState = function (action, initialState, permalink) {\n return resolveDispatcher().useActionState(\n action,\n initialState,\n permalink\n );\n };\n exports.useCallback = function (callback, deps) {\n return resolveDispatcher().useCallback(callback, deps);\n };\n exports.useContext = function (Context) {\n var dispatcher = resolveDispatcher();\n Context.$$typeof === REACT_CONSUMER_TYPE &&\n console.error(\n \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n );\n return dispatcher.useContext(Context);\n };\n exports.useDebugValue = function (value, formatterFn) {\n return resolveDispatcher().useDebugValue(value, formatterFn);\n };\n exports.useDeferredValue = function (value, initialValue) {\n return resolveDispatcher().useDeferredValue(value, initialValue);\n };\n exports.useEffect = function (create, createDeps, update) {\n null == create &&\n console.warn(\n \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n var dispatcher = resolveDispatcher();\n if (\"function\" === typeof update)\n throw Error(\n \"useEffect CRUD overload is not enabled in this build of React.\"\n );\n return dispatcher.useEffect(create, createDeps);\n };\n exports.useId = function () {\n return resolveDispatcher().useId();\n };\n exports.useImperativeHandle = function (ref, create, deps) {\n return resolveDispatcher().useImperativeHandle(ref, create, deps);\n };\n exports.useInsertionEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useInsertionEffect(create, deps);\n };\n exports.useLayoutEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useLayoutEffect(create, deps);\n };\n exports.useMemo = function (create, deps) {\n return resolveDispatcher().useMemo(create, deps);\n };\n exports.useOptimistic = function (passthrough, reducer) {\n return resolveDispatcher().useOptimistic(passthrough, reducer);\n };\n exports.useReducer = function (reducer, initialArg, init) {\n return resolveDispatcher().useReducer(reducer, initialArg, init);\n };\n exports.useRef = function (initialValue) {\n return resolveDispatcher().useRef(initialValue);\n };\n exports.useState = function (initialState) {\n return resolveDispatcher().useState(initialState);\n };\n exports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n ) {\n return resolveDispatcher().useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n };\n exports.useTransition = function () {\n return resolveDispatcher().useTransition();\n };\n exports.version = \"19.1.1\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n"],"names":[],"mappings":"AAAA;;;;;;;;CAQC,GAGgB;AADjB;AACA,oEACE,AAAC;IACC,SAAS,yBAAyB,UAAU,EAAE,IAAI;QAChD,OAAO,cAAc,CAAC,UAAU,SAAS,EAAE,YAAY;YACrD,KAAK;gBACH,QAAQ,IAAI,CACV,+DACA,IAAI,CAAC,EAAE,EACP,IAAI,CAAC,EAAE;YAEX;QACF;IACF;IACA,SAAS,cAAc,aAAa;QAClC,IAAI,SAAS,iBAAiB,aAAa,OAAO,eAChD,OAAO;QACT,gBACE,AAAC,yBAAyB,aAAa,CAAC,sBAAsB,IAC9D,aAAa,CAAC,aAAa;QAC7B,OAAO,eAAe,OAAO,gBAAgB,gBAAgB;IAC/D;IACA,SAAS,SAAS,cAAc,EAAE,UAAU;QAC1C,iBACE,AAAC,CAAC,iBAAiB,eAAe,WAAW,KAC3C,CAAC,eAAe,WAAW,IAAI,eAAe,IAAI,KACpD;QACF,IAAI,aAAa,iBAAiB,MAAM;QACxC,uCAAuC,CAAC,WAAW,IACjD,CAAC,QAAQ,KAAK,CACZ,yPACA,YACA,iBAED,uCAAuC,CAAC,WAAW,GAAG,CAAC,CAAE;IAC9D;IACA,SAAS,UAAU,KAAK,EAAE,OAAO,EAAE,OAAO;QACxC,IAAI,CA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oBAAoB,eAAe,CAAC,QAAQ;IACrD;IACA,QAAQ,OAAO,GAAG,SAAU,MAAM,EAAE,IAAI;QACtC,OAAO,oBAAoB,OAAO,CAAC,QAAQ;IAC7C;IACA,QAAQ,aAAa,GAAG,SAAU,WAAW,EAAE,OAAO;QACpD,OAAO,oBAAoB,aAAa,CAAC,aAAa;IACxD;IACA,QAAQ,UAAU,GAAG,SAAU,OAAO,EAAE,UAAU,EAAE,IAAI;QACtD,OAAO,oBAAoB,UAAU,CAAC,SAAS,YAAY;IAC7D;IACA,QAAQ,MAAM,GAAG,SAAU,YAAY;QACrC,OAAO,oBAAoB,MAAM,CAAC;IACpC;IACA,QAAQ,QAAQ,GAAG,SAAU,YAAY;QACvC,OAAO,oBAAoB,QAAQ,CAAC;IACtC;IACA,QAAQ,oBAAoB,GAAG,SAC7B,SAAS,EACT,WAAW,EACX,iBAAiB;QAEjB,OAAO,oBAAoB,oBAAoB,CAC7C,WACA,aACA;IAEJ;IACA,QAAQ,aAAa,GAAG;QACtB,OAAO,oBAAoB,aAAa;IAC1C;IACA,QAAQ,OAAO,GAAG;IAClB,gBAAgB,OAAO,kCACrB,eACE,OAAO,+BAA+B,0BAA0B,IAClE,+BAA+B,0BAA0B,CAAC;AAC9D","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 844, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/react/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n"],"names":[],"mappings":"AAEI;AAFJ;AAEA;;KAEO;IACL,OAAO,OAAO;AAChB","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 855, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/react/cjs/react-jsx-runtime.development.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n self,\n source,\n getOwner(),\n maybeKey,\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_ELEMENT_TYPE &&\n node._store &&\n (node._store.validated = 1);\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n"],"names":[],"mappings":"AAAA;;;;;;;;CAQC,GAGgB;AADjB;AACA,oEACE,AAAC;IACC,SAAS,yBAAyB,IAAI;QACpC,IAAI,QAAQ,MAAM,OAAO;QACzB,IAAI,eAAe,OAAO,MACxB,OAAO,KAAK,QAAQ,KAAK,yBACrB,OACA,KAAK,WAAW,IAAI,KAAK,IAA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ACJ,mBAAmB,WAAW,YAAY,SAAS;IAEvD;AACF","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1066, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/react/jsx-runtime.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],"names":[],"mappings":"AAEI;AAFJ;AAEA;;KAEO;IACL,OAAO,OAAO;AAChB","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1077, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/scheduler/cjs/scheduler.development.js"],"sourcesContent":["/**\n * @license React\n * scheduler.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function performWorkUntilDeadline() {\n needsPaint = !1;\n if (isMessageLoopRunning) {\n var currentTime = exports.unstable_now();\n startTime = currentTime;\n var hasMoreWork = !0;\n try {\n a: {\n isHostCallbackScheduled = !1;\n isHostTimeoutScheduled &&\n ((isHostTimeoutScheduled = !1),\n localClearTimeout(taskTimeoutID),\n (taskTimeoutID = -1));\n isPerformingWork = !0;\n var previousPriorityLevel = currentPriorityLevel;\n try {\n b: {\n advanceTimers(currentTime);\n for (\n currentTask = peek(taskQueue);\n null !== currentTask &&\n !(\n currentTask.expirationTime > currentTime &&\n shouldYieldToHost()\n );\n\n ) {\n var callback = currentTask.callback;\n if (\"function\" === typeof callback) {\n currentTask.callback = null;\n currentPriorityLevel = currentTask.priorityLevel;\n var continuationCallback = callback(\n currentTask.expirationTime <= currentTime\n );\n currentTime = exports.unstable_now();\n if (\"function\" === typeof continuationCallback) {\n currentTask.callback = continuationCallback;\n advanceTimers(currentTime);\n hasMoreWork = !0;\n break b;\n }\n currentTask === peek(taskQueue) && pop(taskQueue);\n advanceTimers(currentTime);\n } else pop(taskQueue);\n currentTask = peek(taskQueue);\n }\n if (null !== currentTask) hasMoreWork = !0;\n else {\n var firstTimer = peek(timerQueue);\n null !== firstTimer &&\n requestHostTimeout(\n handleTimeout,\n firstTimer.startTime - currentTime\n );\n hasMoreWork = !1;\n }\n }\n break a;\n } finally {\n (currentTask = null),\n (currentPriorityLevel = previousPriorityLevel),\n (isPerformingWork = !1);\n }\n hasMoreWork = void 0;\n }\n } finally {\n hasMoreWork\n ? schedulePerformWorkUntilDeadline()\n : (isMessageLoopRunning = !1);\n }\n }\n }\n function push(heap, node) {\n var index = heap.length;\n heap.push(node);\n a: for (; 0 < index; ) {\n var parentIndex = (index - 1) >>> 1,\n parent = heap[parentIndex];\n if (0 < compare(parent, node))\n (heap[parentIndex] = node),\n (heap[index] = parent),\n (index = parentIndex);\n else break a;\n }\n }\n function peek(heap) {\n return 0 === heap.length ? null : heap[0];\n }\n function pop(heap) {\n if (0 === heap.length) return null;\n var first = heap[0],\n last = heap.pop();\n if (last !== first) {\n heap[0] = last;\n a: for (\n var index = 0, length = heap.length, halfLength = length >>> 1;\n index < halfLength;\n\n ) {\n var leftIndex = 2 * (index + 1) - 1,\n left = heap[leftIndex],\n rightIndex = leftIndex + 1,\n right = heap[rightIndex];\n if (0 > compare(left, last))\n rightIndex < length && 0 > compare(right, left)\n ? ((heap[index] = right),\n (heap[rightIndex] = last),\n (index = rightIndex))\n : ((heap[index] = left),\n (heap[leftIndex] = last),\n (index = leftIndex));\n else if (rightIndex < length && 0 > compare(right, last))\n (heap[index] = right),\n (heap[rightIndex] = last),\n (index = rightIndex);\n else break a;\n }\n }\n return first;\n }\n function compare(a, b) {\n var diff = a.sortIndex - b.sortIndex;\n return 0 !== diff ? diff : a.id - b.id;\n }\n function advanceTimers(currentTime) {\n for (var timer = peek(timerQueue); null !== timer; ) {\n if (null === timer.callback) pop(timerQueue);\n else if (timer.startTime <= currentTime)\n pop(timerQueue),\n (timer.sortIndex = timer.expirationTime),\n push(taskQueue, timer);\n else break;\n timer = peek(timerQueue);\n }\n }\n function handleTimeout(currentTime) {\n isHostTimeoutScheduled = !1;\n advanceTimers(currentTime);\n if (!isHostCallbackScheduled)\n if (null !== peek(taskQueue))\n (isHostCallbackScheduled = !0),\n isMessageLoopRunning ||\n ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());\n else {\n var firstTimer = peek(timerQueue);\n null !== firstTimer &&\n requestHostTimeout(\n handleTimeout,\n firstTimer.startTime - currentTime\n );\n }\n }\n function shouldYieldToHost() {\n return needsPaint\n ? !0\n : exports.unstable_now() - startTime < frameInterval\n ? !1\n : !0;\n }\n function requestHostTimeout(callback, ms) {\n taskTimeoutID = localSetTimeout(function () {\n callback(exports.unstable_now());\n }, ms);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n exports.unstable_now = void 0;\n if (\n \"object\" === typeof performance &&\n \"function\" === typeof performance.now\n ) {\n var localPerformance = performance;\n exports.unstable_now = function () {\n return localPerformance.now();\n };\n } else {\n var localDate = Date,\n initialTime = localDate.now();\n exports.unstable_now = function () {\n return localDate.now() - initialTime;\n };\n }\n var taskQueue = [],\n timerQueue = [],\n taskIdCounter = 1,\n currentTask = null,\n currentPriorityLevel = 3,\n isPerformingWork = !1,\n isHostCallbackScheduled = !1,\n isHostTimeoutScheduled = !1,\n needsPaint = !1,\n localSetTimeout = \"function\" === typeof setTimeout ? setTimeout : null,\n localClearTimeout =\n \"function\" === typeof clearTimeout ? clearTimeout : null,\n localSetImmediate =\n \"undefined\" !== typeof setImmediate ? setImmediate : null,\n isMessageLoopRunning = !1,\n taskTimeoutID = -1,\n frameInterval = 5,\n startTime = -1;\n if (\"function\" === typeof localSetImmediate)\n var schedulePerformWorkUntilDeadline = function () {\n localSetImmediate(performWorkUntilDeadline);\n };\n else if (\"undefined\" !== typeof MessageChannel) {\n var channel = new MessageChannel(),\n port = channel.port2;\n channel.port1.onmessage = performWorkUntilDeadline;\n schedulePerformWorkUntilDeadline = function () {\n port.postMessage(null);\n };\n } else\n schedulePerformWorkUntilDeadline = function () {\n localSetTimeout(performWorkUntilDeadline, 0);\n };\n exports.unstable_IdlePriority = 5;\n exports.unstable_ImmediatePriority = 1;\n exports.unstable_LowPriority = 4;\n exports.unstable_NormalPriority = 3;\n exports.unstable_Profiling = null;\n exports.unstable_UserBlockingPriority = 2;\n exports.unstable_cancelCallback = function (task) {\n task.callback = null;\n };\n exports.unstable_forceFrameRate = function (fps) {\n 0 > fps || 125 < fps\n ? console.error(\n \"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"\n )\n : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);\n };\n exports.unstable_getCurrentPriorityLevel = function () {\n return currentPriorityLevel;\n };\n exports.unstable_next = function (eventHandler) {\n switch (currentPriorityLevel) {\n case 1:\n case 2:\n case 3:\n var priorityLevel = 3;\n break;\n default:\n priorityLevel = currentPriorityLevel;\n }\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n exports.unstable_requestPaint = function () {\n needsPaint = !0;\n };\n exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {\n switch (priorityLevel) {\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n break;\n default:\n priorityLevel = 3;\n }\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n exports.unstable_scheduleCallback = function (\n priorityLevel,\n callback,\n options\n ) {\n var currentTime = exports.unstable_now();\n \"object\" === typeof options && null !== options\n ? ((options = options.delay),\n (options =\n \"number\" === typeof options && 0 < options\n ? currentTime + options\n : currentTime))\n : (options = currentTime);\n switch (priorityLevel) {\n case 1:\n var timeout = -1;\n break;\n case 2:\n timeout = 250;\n break;\n case 5:\n timeout = 1073741823;\n break;\n case 4:\n timeout = 1e4;\n break;\n default:\n timeout = 5e3;\n }\n timeout = options + timeout;\n priorityLevel = {\n id: taskIdCounter++,\n callback: callback,\n priorityLevel: priorityLevel,\n startTime: options,\n expirationTime: timeout,\n sortIndex: -1\n };\n options > currentTime\n ? ((priorityLevel.sortIndex = options),\n push(timerQueue, priorityLevel),\n null === peek(taskQueue) &&\n priorityLevel === peek(timerQueue) &&\n (isHostTimeoutScheduled\n ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))\n : (isHostTimeoutScheduled = !0),\n requestHostTimeout(handleTimeout, options - currentTime)))\n : ((priorityLevel.sortIndex = timeout),\n push(taskQueue, priorityLevel),\n isHostCallbackScheduled ||\n isPerformingWork ||\n ((isHostCallbackScheduled = !0),\n isMessageLoopRunning ||\n ((isMessageLoopRunning = !0),\n schedulePerformWorkUntilDeadline())));\n return priorityLevel;\n };\n exports.unstable_shouldYield = shouldYieldToHost;\n exports.unstable_wrapCallback = function (callback) {\n var parentPriorityLevel = currentPriorityLevel;\n return function () {\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = parentPriorityLevel;\n try {\n return callback.apply(this, arguments);\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n"],"names":[],"mappings":"AAAA;;;;;;;;CAQC,GAGgB;AADjB;AACA,oEACE,AAAC;IACC,SAAS;QACP,aAAa,CAAC;QACd,IAAI,sBAAsB;YACxB,IAAI,cAAc,Q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,OAAO,SAAS,KAAK,CAAC,IAAI,EAAE;YAC9B,SAAU;gBACR,uBAAuB;YACzB;QACF;IACF;IACA,gBAAgB,OAAO,kCACrB,eACE,OAAO,+BAA+B,0BAA0B,IAClE,+BAA+B,0BAA0B,CAAC;AAC9D","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1325, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/scheduler/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n"],"names":[],"mappings":"AAEI;AAFJ;AAEA;;KAEO;IACL,OAAO,OAAO;AAChB","ignoreList":[0],"debugId":null}}] -} \ No newline at end of file diff --git a/docs/_next/static/chunks/node_modules_next_app_72f3d36f.js b/docs/_next/static/chunks/node_modules_next_app_72f3d36f.js deleted file mode 100644 index d430ea65..00000000 --- a/docs/_next/static/chunks/node_modules_next_app_72f3d36f.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/node_modules/next/app.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { - -module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/pages/_app.js [client] (ecmascript)"); -}), -]); - -//# sourceMappingURL=node_modules_next_app_72f3d36f.js.map \ No newline at end of file diff --git a/docs/_next/static/chunks/node_modules_next_app_72f3d36f.js.map b/docs/_next/static/chunks/node_modules_next_app_72f3d36f.js.map deleted file mode 100644 index a3e0d8df..00000000 --- a/docs/_next/static/chunks/node_modules_next_app_72f3d36f.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": [], - "sections": [ - {"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/app.js"],"sourcesContent":["module.exports = require('./dist/pages/_app')\n"],"names":[],"mappings":"AAAA,OAAO,OAAO","ignoreList":[0],"debugId":null}}] -} \ No newline at end of file diff --git a/docs/_next/static/chunks/node_modules_next_dist_3b64f844._.js b/docs/_next/static/chunks/node_modules_next_dist_3b64f844._.js deleted file mode 100644 index 9e39ef82..00000000 --- a/docs/_next/static/chunks/node_modules_next_dist_3b64f844._.js +++ /dev/null @@ -1,1965 +0,0 @@ -(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var _global_process, _global_process1; -module.exports = ((_global_process = /*TURBOPACK member replacement*/ __turbopack_context__.g.process) == null ? void 0 : _global_process.env) && typeof ((_global_process1 = /*TURBOPACK member replacement*/ __turbopack_context__.g.process) == null ? void 0 : _global_process1.env) === 'object' ? /*TURBOPACK member replacement*/ __turbopack_context__.g.process : __turbopack_context__.r("[project]/node_modules/next/dist/compiled/process/browser.js [client] (ecmascript)"); //# sourceMappingURL=process.js.map -}), -"[project]/node_modules/next/dist/build/polyfills/polyfill-module.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { - -"trimStart" in String.prototype || (String.prototype.trimStart = String.prototype.trimLeft), "trimEnd" in String.prototype || (String.prototype.trimEnd = String.prototype.trimRight), "description" in Symbol.prototype || Object.defineProperty(Symbol.prototype, "description", { - configurable: !0, - get: function() { - var t = /\((.*)\)/.exec(this.toString()); - return t ? t[1] : void 0; - } -}), Array.prototype.flat || (Array.prototype.flat = function(t, r) { - return r = this.concat.apply([], this), t > 1 && r.some(Array.isArray) ? r.flat(t - 1) : r; -}, Array.prototype.flatMap = function(t, r) { - return this.map(t, r).flat(); -}), Promise.prototype.finally || (Promise.prototype.finally = function(t) { - if ("function" != typeof t) return this.then(t, t); - var r = this.constructor || Promise; - return this.then(function(n) { - return r.resolve(t()).then(function() { - return n; - }); - }, function(n) { - return r.resolve(t()).then(function() { - throw n; - }); - }); -}), Object.fromEntries || (Object.fromEntries = function(t) { - return Array.from(t).reduce(function(t, r) { - return t[r[0]] = r[1], t; - }, {}); -}), Array.prototype.at || (Array.prototype.at = function(t) { - var r = Math.trunc(t) || 0; - if (r < 0 && (r += this.length), !(r < 0 || r >= this.length)) return this[r]; -}), Object.hasOwn || (Object.hasOwn = function(t, r) { - if (null == t) throw new TypeError("Cannot convert undefined or null to object"); - return Object.prototype.hasOwnProperty.call(Object(t), r); -}), "canParse" in URL || (URL.canParse = function(t, r) { - try { - return !!new URL(t, r); - } catch (t) { - return !1; - } -}); -}), -"[project]/node_modules/next/dist/build/deployment-id.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "getDeploymentIdQueryOrEmptyString", { - enumerable: true, - get: function() { - return getDeploymentIdQueryOrEmptyString; - } -}); -function getDeploymentIdQueryOrEmptyString() { - if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable - ; - return ''; -} //# sourceMappingURL=deployment-id.js.map -}), -"[project]/node_modules/next/dist/lib/route-pattern-normalizer.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - hasAdjacentParameterIssues: null, - normalizeAdjacentParameters: null, - normalizeTokensForRegexp: null, - stripParameterSeparators: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - hasAdjacentParameterIssues: function() { - return hasAdjacentParameterIssues; - }, - normalizeAdjacentParameters: function() { - return normalizeAdjacentParameters; - }, - normalizeTokensForRegexp: function() { - return normalizeTokensForRegexp; - }, - stripParameterSeparators: function() { - return stripParameterSeparators; - } -}); -/** - * Route pattern normalization utilities for path-to-regexp compatibility. - * - * path-to-regexp 6.3.0+ introduced stricter validation that rejects certain - * patterns commonly used in Next.js interception routes. This module provides - * normalization functions to make Next.js route patterns compatible with the - * updated library while preserving all functionality. - */ /** - * Internal separator used to normalize adjacent parameter patterns. - * This unique marker is inserted between adjacent parameters and stripped out - * during parameter extraction to avoid conflicts with real URL content. - */ const PARAM_SEPARATOR = '_NEXTSEP_'; -function hasAdjacentParameterIssues(route) { - if (typeof route !== 'string') return false; - // Check for interception route markers followed immediately by parameters - // Pattern: /(.):param, /(..):param, /(...):param, /(.)(.):param etc. - // These patterns cause "Must have text between two parameters" errors - if (/\/\(\.{1,3}\):[^/\s]+/.test(route)) { - return true; - } - // Check for basic adjacent parameters without separators - // Pattern: :param1:param2 (but not :param* or other URL patterns) - if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) { - return true; - } - return false; -} -function normalizeAdjacentParameters(route) { - let normalized = route; - // Handle interception route patterns: (.):param -> (.)_NEXTSEP_:param - normalized = normalized.replace(/(\([^)]*\)):([^/\s]+)/g, "$1".concat(PARAM_SEPARATOR, ":$2")); - // Handle other adjacent parameter patterns: :param1:param2 -> :param1_NEXTSEP_:param2 - normalized = normalized.replace(/:([^:/\s)]+)(?=:)/g, ":$1".concat(PARAM_SEPARATOR)); - return normalized; -} -function normalizeTokensForRegexp(tokens) { - return tokens.map((token)=>{ - // Token union type: Token = string | TokenObject - // Literal path segments are strings, parameters/wildcards are objects - if (typeof token === 'object' && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens) - 'modifier' in token && // Only repeating modifiers (* or +) cause the validation error - // Other modifiers like '?' (optional) are fine - (token.modifier === '*' || token.modifier === '+') && // Token objects can have different shapes depending on route pattern - 'prefix' in token && 'suffix' in token && // Both prefix and suffix must be empty strings - // This is what causes the validation error in path-to-regexp - token.prefix === '' && token.suffix === '') { - // Add minimal prefix to satisfy path-to-regexp validation - // We use '/' as it's the most common path delimiter and won't break route matching - // The prefix gets used in regex generation but doesn't affect parameter extraction - return { - ...token, - prefix: '/' - }; - } - return token; - }); -} -function stripParameterSeparators(params) { - const cleaned = {}; - for (const [key, value] of Object.entries(params)){ - if (typeof value === 'string') { - // Remove the separator if it appears at the start of parameter values - cleaned[key] = value.replace(new RegExp("^".concat(PARAM_SEPARATOR)), ''); - } else if (Array.isArray(value)) { - // Handle array parameters (from repeated route segments) - cleaned[key] = value.map((item)=>typeof item === 'string' ? item.replace(new RegExp("^".concat(PARAM_SEPARATOR)), '') : item); - } else { - cleaned[key] = value; - } - } - return cleaned; -} //# sourceMappingURL=route-pattern-normalizer.js.map -}), -"[project]/node_modules/next/dist/lib/constants.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - ACTION_SUFFIX: null, - APP_DIR_ALIAS: null, - CACHE_ONE_YEAR: null, - DOT_NEXT_ALIAS: null, - ESLINT_DEFAULT_DIRS: null, - GSP_NO_RETURNED_VALUE: null, - GSSP_COMPONENT_MEMBER_ERROR: null, - GSSP_NO_RETURNED_VALUE: null, - HTML_CONTENT_TYPE_HEADER: null, - INFINITE_CACHE: null, - INSTRUMENTATION_HOOK_FILENAME: null, - JSON_CONTENT_TYPE_HEADER: null, - MATCHED_PATH_HEADER: null, - MIDDLEWARE_FILENAME: null, - MIDDLEWARE_LOCATION_REGEXP: null, - NEXT_BODY_SUFFIX: null, - NEXT_CACHE_IMPLICIT_TAG_ID: null, - NEXT_CACHE_REVALIDATED_TAGS_HEADER: null, - NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: null, - NEXT_CACHE_SOFT_TAG_MAX_LENGTH: null, - NEXT_CACHE_TAGS_HEADER: null, - NEXT_CACHE_TAG_MAX_ITEMS: null, - NEXT_CACHE_TAG_MAX_LENGTH: null, - NEXT_DATA_SUFFIX: null, - NEXT_INTERCEPTION_MARKER_PREFIX: null, - NEXT_META_SUFFIX: null, - NEXT_QUERY_PARAM_PREFIX: null, - NEXT_RESUME_HEADER: null, - NON_STANDARD_NODE_ENV: null, - PAGES_DIR_ALIAS: null, - PRERENDER_REVALIDATE_HEADER: null, - PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: null, - PUBLIC_DIR_MIDDLEWARE_CONFLICT: null, - ROOT_DIR_ALIAS: null, - RSC_ACTION_CLIENT_WRAPPER_ALIAS: null, - RSC_ACTION_ENCRYPTION_ALIAS: null, - RSC_ACTION_PROXY_ALIAS: null, - RSC_ACTION_VALIDATE_ALIAS: null, - RSC_CACHE_WRAPPER_ALIAS: null, - RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: null, - RSC_MOD_REF_PROXY_ALIAS: null, - RSC_PREFETCH_SUFFIX: null, - RSC_SEGMENTS_DIR_SUFFIX: null, - RSC_SEGMENT_SUFFIX: null, - RSC_SUFFIX: null, - SERVER_PROPS_EXPORT_ERROR: null, - SERVER_PROPS_GET_INIT_PROPS_CONFLICT: null, - SERVER_PROPS_SSG_CONFLICT: null, - SERVER_RUNTIME: null, - SSG_FALLBACK_EXPORT_ERROR: null, - SSG_GET_INITIAL_PROPS_CONFLICT: null, - STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: null, - TEXT_PLAIN_CONTENT_TYPE_HEADER: null, - UNSTABLE_REVALIDATE_RENAME_ERROR: null, - WEBPACK_LAYERS: null, - WEBPACK_RESOURCE_QUERIES: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - ACTION_SUFFIX: function() { - return ACTION_SUFFIX; - }, - APP_DIR_ALIAS: function() { - return APP_DIR_ALIAS; - }, - CACHE_ONE_YEAR: function() { - return CACHE_ONE_YEAR; - }, - DOT_NEXT_ALIAS: function() { - return DOT_NEXT_ALIAS; - }, - ESLINT_DEFAULT_DIRS: function() { - return ESLINT_DEFAULT_DIRS; - }, - GSP_NO_RETURNED_VALUE: function() { - return GSP_NO_RETURNED_VALUE; - }, - GSSP_COMPONENT_MEMBER_ERROR: function() { - return GSSP_COMPONENT_MEMBER_ERROR; - }, - GSSP_NO_RETURNED_VALUE: function() { - return GSSP_NO_RETURNED_VALUE; - }, - HTML_CONTENT_TYPE_HEADER: function() { - return HTML_CONTENT_TYPE_HEADER; - }, - INFINITE_CACHE: function() { - return INFINITE_CACHE; - }, - INSTRUMENTATION_HOOK_FILENAME: function() { - return INSTRUMENTATION_HOOK_FILENAME; - }, - JSON_CONTENT_TYPE_HEADER: function() { - return JSON_CONTENT_TYPE_HEADER; - }, - MATCHED_PATH_HEADER: function() { - return MATCHED_PATH_HEADER; - }, - MIDDLEWARE_FILENAME: function() { - return MIDDLEWARE_FILENAME; - }, - MIDDLEWARE_LOCATION_REGEXP: function() { - return MIDDLEWARE_LOCATION_REGEXP; - }, - NEXT_BODY_SUFFIX: function() { - return NEXT_BODY_SUFFIX; - }, - NEXT_CACHE_IMPLICIT_TAG_ID: function() { - return NEXT_CACHE_IMPLICIT_TAG_ID; - }, - NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() { - return NEXT_CACHE_REVALIDATED_TAGS_HEADER; - }, - NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() { - return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER; - }, - NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() { - return NEXT_CACHE_SOFT_TAG_MAX_LENGTH; - }, - NEXT_CACHE_TAGS_HEADER: function() { - return NEXT_CACHE_TAGS_HEADER; - }, - NEXT_CACHE_TAG_MAX_ITEMS: function() { - return NEXT_CACHE_TAG_MAX_ITEMS; - }, - NEXT_CACHE_TAG_MAX_LENGTH: function() { - return NEXT_CACHE_TAG_MAX_LENGTH; - }, - NEXT_DATA_SUFFIX: function() { - return NEXT_DATA_SUFFIX; - }, - NEXT_INTERCEPTION_MARKER_PREFIX: function() { - return NEXT_INTERCEPTION_MARKER_PREFIX; - }, - NEXT_META_SUFFIX: function() { - return NEXT_META_SUFFIX; - }, - NEXT_QUERY_PARAM_PREFIX: function() { - return NEXT_QUERY_PARAM_PREFIX; - }, - NEXT_RESUME_HEADER: function() { - return NEXT_RESUME_HEADER; - }, - NON_STANDARD_NODE_ENV: function() { - return NON_STANDARD_NODE_ENV; - }, - PAGES_DIR_ALIAS: function() { - return PAGES_DIR_ALIAS; - }, - PRERENDER_REVALIDATE_HEADER: function() { - return PRERENDER_REVALIDATE_HEADER; - }, - PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() { - return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER; - }, - PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() { - return PUBLIC_DIR_MIDDLEWARE_CONFLICT; - }, - ROOT_DIR_ALIAS: function() { - return ROOT_DIR_ALIAS; - }, - RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() { - return RSC_ACTION_CLIENT_WRAPPER_ALIAS; - }, - RSC_ACTION_ENCRYPTION_ALIAS: function() { - return RSC_ACTION_ENCRYPTION_ALIAS; - }, - RSC_ACTION_PROXY_ALIAS: function() { - return RSC_ACTION_PROXY_ALIAS; - }, - RSC_ACTION_VALIDATE_ALIAS: function() { - return RSC_ACTION_VALIDATE_ALIAS; - }, - RSC_CACHE_WRAPPER_ALIAS: function() { - return RSC_CACHE_WRAPPER_ALIAS; - }, - RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() { - return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS; - }, - RSC_MOD_REF_PROXY_ALIAS: function() { - return RSC_MOD_REF_PROXY_ALIAS; - }, - RSC_PREFETCH_SUFFIX: function() { - return RSC_PREFETCH_SUFFIX; - }, - RSC_SEGMENTS_DIR_SUFFIX: function() { - return RSC_SEGMENTS_DIR_SUFFIX; - }, - RSC_SEGMENT_SUFFIX: function() { - return RSC_SEGMENT_SUFFIX; - }, - RSC_SUFFIX: function() { - return RSC_SUFFIX; - }, - SERVER_PROPS_EXPORT_ERROR: function() { - return SERVER_PROPS_EXPORT_ERROR; - }, - SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() { - return SERVER_PROPS_GET_INIT_PROPS_CONFLICT; - }, - SERVER_PROPS_SSG_CONFLICT: function() { - return SERVER_PROPS_SSG_CONFLICT; - }, - SERVER_RUNTIME: function() { - return SERVER_RUNTIME; - }, - SSG_FALLBACK_EXPORT_ERROR: function() { - return SSG_FALLBACK_EXPORT_ERROR; - }, - SSG_GET_INITIAL_PROPS_CONFLICT: function() { - return SSG_GET_INITIAL_PROPS_CONFLICT; - }, - STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() { - return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR; - }, - TEXT_PLAIN_CONTENT_TYPE_HEADER: function() { - return TEXT_PLAIN_CONTENT_TYPE_HEADER; - }, - UNSTABLE_REVALIDATE_RENAME_ERROR: function() { - return UNSTABLE_REVALIDATE_RENAME_ERROR; - }, - WEBPACK_LAYERS: function() { - return WEBPACK_LAYERS; - }, - WEBPACK_RESOURCE_QUERIES: function() { - return WEBPACK_RESOURCE_QUERIES; - } -}); -const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'; -const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'; -const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'; -const NEXT_QUERY_PARAM_PREFIX = 'nxtP'; -const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'; -const MATCHED_PATH_HEADER = 'x-matched-path'; -const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'; -const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated'; -const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'; -const RSC_SEGMENTS_DIR_SUFFIX = '.segments'; -const RSC_SEGMENT_SUFFIX = '.segment.rsc'; -const RSC_SUFFIX = '.rsc'; -const ACTION_SUFFIX = '.action'; -const NEXT_DATA_SUFFIX = '.json'; -const NEXT_META_SUFFIX = '.meta'; -const NEXT_BODY_SUFFIX = '.body'; -const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'; -const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'; -const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token'; -const NEXT_RESUME_HEADER = 'next-resume'; -const NEXT_CACHE_TAG_MAX_ITEMS = 128; -const NEXT_CACHE_TAG_MAX_LENGTH = 256; -const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024; -const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'; -const CACHE_ONE_YEAR = 31536000; -const INFINITE_CACHE = 0xfffffffe; -const MIDDLEWARE_FILENAME = 'middleware'; -const MIDDLEWARE_LOCATION_REGEXP = "(?:src/)?".concat(MIDDLEWARE_FILENAME); -const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'; -const PAGES_DIR_ALIAS = 'private-next-pages'; -const DOT_NEXT_ALIAS = 'private-dot-next'; -const ROOT_DIR_ALIAS = 'private-next-root-dir'; -const APP_DIR_ALIAS = 'private-next-app-dir'; -const RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy'; -const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'; -const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'; -const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'; -const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import'; -const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'; -const RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper'; -const PUBLIC_DIR_MIDDLEWARE_CONFLICT = "You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict"; -const SSG_GET_INITIAL_PROPS_CONFLICT = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps"; -const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps."; -const SERVER_PROPS_SSG_CONFLICT = "You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps"; -const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = "can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props"; -const SERVER_PROPS_EXPORT_ERROR = "pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export"; -const GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'; -const GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'; -const UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\n' + 'Please use `revalidate` instead.'; -const GSSP_COMPONENT_MEMBER_ERROR = "can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member"; -const NON_STANDARD_NODE_ENV = 'You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env'; -const SSG_FALLBACK_EXPORT_ERROR = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export"; -const ESLINT_DEFAULT_DIRS = [ - 'app', - 'pages', - 'components', - 'lib', - 'src' -]; -const SERVER_RUNTIME = { - edge: 'edge', - experimentalEdge: 'experimental-edge', - nodejs: 'nodejs' -}; -/** - * The names of the webpack layers. These layers are the primitives for the - * webpack chunks. - */ const WEBPACK_LAYERS_NAMES = { - /** - * The layer for the shared code between the client and server bundles. - */ shared: 'shared', - /** - * The layer for server-only runtime and picking up `react-server` export conditions. - * Including app router RSC pages and app router custom routes and metadata routes. - */ reactServerComponents: 'rsc', - /** - * Server Side Rendering layer for app (ssr). - */ serverSideRendering: 'ssr', - /** - * The browser client bundle layer for actions. - */ actionBrowser: 'action-browser', - /** - * The Node.js bundle layer for the API routes. - */ apiNode: 'api-node', - /** - * The Edge Lite bundle layer for the API routes. - */ apiEdge: 'api-edge', - /** - * The layer for the middleware code. - */ middleware: 'middleware', - /** - * The layer for the instrumentation hooks. - */ instrument: 'instrument', - /** - * The layer for assets on the edge. - */ edgeAsset: 'edge-asset', - /** - * The browser client bundle layer for App directory. - */ appPagesBrowser: 'app-pages-browser', - /** - * The browser client bundle layer for Pages directory. - */ pagesDirBrowser: 'pages-dir-browser', - /** - * The Edge Lite bundle layer for Pages directory. - */ pagesDirEdge: 'pages-dir-edge', - /** - * The Node.js bundle layer for Pages directory. - */ pagesDirNode: 'pages-dir-node' -}; -const WEBPACK_LAYERS = { - ...WEBPACK_LAYERS_NAMES, - GROUP: { - builtinReact: [ - WEBPACK_LAYERS_NAMES.reactServerComponents, - WEBPACK_LAYERS_NAMES.actionBrowser - ], - serverOnly: [ - WEBPACK_LAYERS_NAMES.reactServerComponents, - WEBPACK_LAYERS_NAMES.actionBrowser, - WEBPACK_LAYERS_NAMES.instrument, - WEBPACK_LAYERS_NAMES.middleware - ], - neutralTarget: [ - // pages api - WEBPACK_LAYERS_NAMES.apiNode, - WEBPACK_LAYERS_NAMES.apiEdge - ], - clientOnly: [ - WEBPACK_LAYERS_NAMES.serverSideRendering, - WEBPACK_LAYERS_NAMES.appPagesBrowser - ], - bundled: [ - WEBPACK_LAYERS_NAMES.reactServerComponents, - WEBPACK_LAYERS_NAMES.actionBrowser, - WEBPACK_LAYERS_NAMES.serverSideRendering, - WEBPACK_LAYERS_NAMES.appPagesBrowser, - WEBPACK_LAYERS_NAMES.shared, - WEBPACK_LAYERS_NAMES.instrument, - WEBPACK_LAYERS_NAMES.middleware - ], - appPages: [ - // app router pages and layouts - WEBPACK_LAYERS_NAMES.reactServerComponents, - WEBPACK_LAYERS_NAMES.serverSideRendering, - WEBPACK_LAYERS_NAMES.appPagesBrowser, - WEBPACK_LAYERS_NAMES.actionBrowser - ] - } -}; -const WEBPACK_RESOURCE_QUERIES = { - edgeSSREntry: '__next_edge_ssr_entry__', - metadata: '__next_metadata__', - metadataRoute: '__next_metadata_route__', - metadataImageMeta: '__next_metadata_image_meta__' -}; //# sourceMappingURL=constants.js.map -}), -"[project]/node_modules/next/dist/lib/is-error.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - default: null, - getProperError: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - /** - * Checks whether the given value is a NextError. - * This can be used to print a more detailed error message with properties like `code` & `digest`. - */ default: function() { - return isError; - }, - getProperError: function() { - return getProperError; - } -}); -const _isplainobject = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/is-plain-object.js [client] (ecmascript)"); -function isError(err) { - return typeof err === 'object' && err !== null && 'name' in err && 'message' in err; -} -function safeStringify(obj) { - const seen = new WeakSet(); - return JSON.stringify(obj, (_key, value)=>{ - // If value is an object and already seen, replace with "[Circular]" - if (typeof value === 'object' && value !== null) { - if (seen.has(value)) { - return '[Circular]'; - } - seen.add(value); - } - return value; - }); -} -function getProperError(err) { - if (isError(err)) { - return err; - } - if ("TURBOPACK compile-time truthy", 1) { - // provide better error for case where `throw undefined` - // is called in development - if (typeof err === 'undefined') { - return Object.defineProperty(new Error('An undefined error was thrown, ' + 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'), "__NEXT_ERROR_CODE", { - value: "E98", - enumerable: false, - configurable: true - }); - } - if (err === null) { - return Object.defineProperty(new Error('A null error was thrown, ' + 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'), "__NEXT_ERROR_CODE", { - value: "E336", - enumerable: false, - configurable: true - }); - } - } - return Object.defineProperty(new Error((0, _isplainobject.isPlainObject)(err) ? safeStringify(err) : err + ''), "__NEXT_ERROR_CODE", { - value: "E394", - enumerable: false, - configurable: true - }); -} //# sourceMappingURL=is-error.js.map -}), -"[project]/node_modules/next/dist/lib/is-api-route.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "isAPIRoute", { - enumerable: true, - get: function() { - return isAPIRoute; - } -}); -function isAPIRoute(value) { - return value === '/api' || Boolean(value == null ? void 0 : value.startsWith('/api/')); -} //# sourceMappingURL=is-api-route.js.map -}), -"[project]/node_modules/next/dist/lib/require-instrumentation-client.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -/** - * This module imports the client instrumentation hook from the project root. - * - * The `private-next-instrumentation-client` module is automatically aliased to - * the `instrumentation-client.ts` file in the project root by webpack or turbopack. - */ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -if ("TURBOPACK compile-time truthy", 1) { - const measureName = 'Client Instrumentation Hook'; - const startTime = performance.now(); - // eslint-disable-next-line @next/internal/typechecked-require -- Not a module. - module.exports = {}; - const endTime = performance.now(); - const duration = endTime - startTime; - // Using 16ms threshold as it represents one frame (1000ms/60fps) - // This helps identify if the instrumentation hook initialization - // could potentially cause frame drops during development. - const THRESHOLD = 16; - if (duration > THRESHOLD) { - console.log("[".concat(measureName, "] Slow execution detected: ").concat(duration.toFixed(0), "ms (Note: Code download overhead is not included in this measurement)")); - } -} else //TURBOPACK unreachable -; - //# sourceMappingURL=require-instrumentation-client.js.map -}), -"[project]/node_modules/next/dist/server/api-utils/get-cookie-parser.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "getCookieParser", { - enumerable: true, - get: function() { - return getCookieParser; - } -}); -function getCookieParser(headers) { - return function parseCookie() { - const { cookie } = headers; - if (!cookie) { - return {}; - } - const { parse: parseCookieFn } = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/cookie/index.js [client] (ecmascript)"); - return parseCookieFn(Array.isArray(cookie) ? cookie.join('; ') : cookie); - }; -} //# sourceMappingURL=get-cookie-parser.js.map -}), -"[project]/node_modules/next/dist/server/dev/hot-reloader-types.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "HMR_ACTIONS_SENT_TO_BROWSER", { - enumerable: true, - get: function() { - return HMR_ACTIONS_SENT_TO_BROWSER; - } -}); -var HMR_ACTIONS_SENT_TO_BROWSER = /*#__PURE__*/ function(HMR_ACTIONS_SENT_TO_BROWSER) { - HMR_ACTIONS_SENT_TO_BROWSER["ADDED_PAGE"] = "addedPage"; - HMR_ACTIONS_SENT_TO_BROWSER["REMOVED_PAGE"] = "removedPage"; - HMR_ACTIONS_SENT_TO_BROWSER["RELOAD_PAGE"] = "reloadPage"; - HMR_ACTIONS_SENT_TO_BROWSER["SERVER_COMPONENT_CHANGES"] = "serverComponentChanges"; - HMR_ACTIONS_SENT_TO_BROWSER["MIDDLEWARE_CHANGES"] = "middlewareChanges"; - HMR_ACTIONS_SENT_TO_BROWSER["CLIENT_CHANGES"] = "clientChanges"; - HMR_ACTIONS_SENT_TO_BROWSER["SERVER_ONLY_CHANGES"] = "serverOnlyChanges"; - HMR_ACTIONS_SENT_TO_BROWSER["SYNC"] = "sync"; - HMR_ACTIONS_SENT_TO_BROWSER["BUILT"] = "built"; - HMR_ACTIONS_SENT_TO_BROWSER["BUILDING"] = "building"; - HMR_ACTIONS_SENT_TO_BROWSER["DEV_PAGES_MANIFEST_UPDATE"] = "devPagesManifestUpdate"; - HMR_ACTIONS_SENT_TO_BROWSER["TURBOPACK_MESSAGE"] = "turbopack-message"; - HMR_ACTIONS_SENT_TO_BROWSER["SERVER_ERROR"] = "serverError"; - HMR_ACTIONS_SENT_TO_BROWSER["TURBOPACK_CONNECTED"] = "turbopack-connected"; - HMR_ACTIONS_SENT_TO_BROWSER["ISR_MANIFEST"] = "isrManifest"; - HMR_ACTIONS_SENT_TO_BROWSER["DEV_INDICATOR"] = "devIndicator"; - HMR_ACTIONS_SENT_TO_BROWSER["DEVTOOLS_CONFIG"] = "devtoolsConfig"; - return HMR_ACTIONS_SENT_TO_BROWSER; -}({}); //# sourceMappingURL=hot-reloader-types.js.map -}), -"[project]/node_modules/next/dist/server/dev/node-stack-frames.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "getServerError", { - enumerable: true, - get: function() { - return getServerError; - } -}); -const _stacktraceparser = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js [client] (ecmascript)"); -const _errorsource = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/error-source.js [client] (ecmascript)"); -function getFilesystemFrame(frame) { - const f = { - ...frame - }; - if (typeof f.file === 'string') { - if (f.file.startsWith('/') || // Win32: - /^[a-z]:\\/i.test(f.file) || // Win32 UNC: - f.file.startsWith('\\\\')) { - f.file = "file://".concat(f.file); - } - } - return f; -} -function getServerError(error, type) { - if (error.name === 'TurbopackInternalError') { - // If this is an internal Turbopack error we shouldn't show internal details - // to the user. These are written to a log file instead. - const turbopackInternalError = Object.defineProperty(new Error('An unexpected Turbopack error occurred. Please see the output of `next dev` for more details.'), "__NEXT_ERROR_CODE", { - value: "E167", - enumerable: false, - configurable: true - }); - (0, _errorsource.decorateServerError)(turbopackInternalError, type); - return turbopackInternalError; - } - let n; - try { - throw Object.defineProperty(new Error(error.message), "__NEXT_ERROR_CODE", { - value: "E394", - enumerable: false, - configurable: true - }); - } catch (e) { - n = e; - } - n.name = error.name; - try { - n.stack = "".concat(n.toString(), "\n").concat((0, _stacktraceparser.parse)(error.stack).map(getFilesystemFrame).map((f)=>{ - let str = " at ".concat(f.methodName); - if (f.file) { - let loc = f.file; - if (f.lineNumber) { - loc += ":".concat(f.lineNumber); - if (f.column) { - loc += ":".concat(f.column); - } - } - str += " (".concat(loc, ")"); - } - return str; - }).join('\n')); - } catch (e) { - n.stack = error.stack; - } - (0, _errorsource.decorateServerError)(n, type); - return n; -} //# sourceMappingURL=node-stack-frames.js.map -}), -"[project]/node_modules/next/dist/next-devtools/userspace/app/errors/stitched-error.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - coerceError: null, - decorateDevError: null, - getOwnerStack: null, - setOwnerStack: null, - setOwnerStackIfAvailable: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - coerceError: function() { - return coerceError; - }, - decorateDevError: function() { - return decorateDevError; - }, - getOwnerStack: function() { - return getOwnerStack; - }, - setOwnerStack: function() { - return setOwnerStack; - }, - setOwnerStackIfAvailable: function() { - return setOwnerStackIfAvailable; - } -}); -const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); -const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/react/index.js [client] (ecmascript)")); -const _iserror = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/lib/is-error.js [client] (ecmascript)")); -const ownerStacks = new WeakMap(); -function getOwnerStack(error) { - return ownerStacks.get(error); -} -function setOwnerStack(error, stack) { - ownerStacks.set(error, stack); -} -function coerceError(value) { - return (0, _iserror.default)(value) ? value : Object.defineProperty(new Error('' + value), "__NEXT_ERROR_CODE", { - value: "E394", - enumerable: false, - configurable: true - }); -} -function setOwnerStackIfAvailable(error) { - // React 18 and prod does not have `captureOwnerStack` - if ('captureOwnerStack' in _react.default) { - setOwnerStack(error, _react.default.captureOwnerStack()); - } -} -function decorateDevError(thrownValue) { - const error = coerceError(thrownValue); - setOwnerStackIfAvailable(error); - return error; -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=stitched-error.js.map -}), -"[project]/node_modules/next/dist/next-devtools/shared/react-18-hydration-error.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - getHydrationWarningType: null, - isHydrationError: null, - isHydrationWarning: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - getHydrationWarningType: function() { - return getHydrationWarningType; - }, - isHydrationError: function() { - return isHydrationError; - }, - isHydrationWarning: function() { - return isHydrationWarning; - } -}); -const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); -const _iserror = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/lib/is-error.js [client] (ecmascript)")); -function isHydrationError(error) { - return (0, _iserror.default)(error) && (error.message === 'Hydration failed because the initial UI does not match what was rendered on the server.' || error.message === 'Text content does not match server-rendered HTML.'); -} -function isHydrationWarning(message) { - return isHtmlTagsWarning(message) || isTextInTagsMismatchWarning(message) || isTextWarning(message); -} -// https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js used as a reference -const htmlTagsWarnings = new Set([ - 'Warning: Expected server HTML to contain a matching <%s> in <%s>.%s', - 'Warning: Did not expect server HTML to contain a <%s> in <%s>.%s' -]); -const textAndTagsMismatchWarnings = new Set([ - 'Warning: Expected server HTML to contain a matching text node for "%s" in <%s>.%s', - 'Warning: Did not expect server HTML to contain the text node "%s" in <%s>.%s' -]); -const textWarnings = new Set([ - 'Warning: Text content did not match. Server: "%s" Client: "%s"%s' -]); -const getHydrationWarningType = (message)=>{ - if (typeof message !== 'string') { - // TODO: Doesn't make sense to treat no message as a hydration error message. - // We should bail out somewhere earlier. - return 'text'; - } - const normalizedMessage = message.startsWith('Warning: ') ? message : "Warning: " + message; - if (isHtmlTagsWarning(normalizedMessage)) return 'tag'; - if (isTextInTagsMismatchWarning(normalizedMessage)) return 'text-in-tag'; - return 'text'; -}; -const isHtmlTagsWarning = (message)=>typeof message === 'string' && htmlTagsWarnings.has(message); -const isTextInTagsMismatchWarning = (msg)=>typeof msg === 'string' && textAndTagsMismatchWarnings.has(msg); -const isTextWarning = (msg)=>typeof msg === 'string' && textWarnings.has(msg); -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=react-18-hydration-error.js.map -}), -"[project]/node_modules/next/dist/next-devtools/shared/react-19-hydration-error.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - NEXTJS_HYDRATION_ERROR_LINK: null, - REACT_HYDRATION_ERROR_LINK: null, - getHydrationErrorStackInfo: null, - isErrorMessageWithComponentStackDiff: null, - isHydrationError: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - NEXTJS_HYDRATION_ERROR_LINK: function() { - return NEXTJS_HYDRATION_ERROR_LINK; - }, - REACT_HYDRATION_ERROR_LINK: function() { - return REACT_HYDRATION_ERROR_LINK; - }, - getHydrationErrorStackInfo: function() { - return getHydrationErrorStackInfo; - }, - isErrorMessageWithComponentStackDiff: function() { - return isErrorMessageWithComponentStackDiff; - }, - isHydrationError: function() { - return isHydrationError; - } -}); -const REACT_HYDRATION_ERROR_LINK = 'https://react.dev/link/hydration-mismatch'; -const NEXTJS_HYDRATION_ERROR_LINK = 'https://nextjs.org/docs/messages/react-hydration-error'; -/** - * Only React 19+ contains component stack diff in the error message - */ const errorMessagesWithComponentStackDiff = [ - /^In HTML, (.+?) cannot be a child of <(.+?)>\.(.*)\nThis will cause a hydration error\.(.*)/, - /^In HTML, (.+?) cannot be a descendant of <(.+?)>\.\nThis will cause a hydration error\.(.*)/, - /^In HTML, text nodes cannot be a child of <(.+?)>\.\nThis will cause a hydration error\./, - /^In HTML, whitespace text nodes cannot be a child of <(.+?)>\. Make sure you don't have any extra whitespace between tags on each line of your source code\.\nThis will cause a hydration error\./ -]; -function isHydrationError(error) { - return isErrorMessageWithComponentStackDiff(error.message) || /Hydration failed because the server rendered (text|HTML) didn't match the client\./.test(error.message) || /A tree hydrated but some attributes of the server rendered HTML didn't match the client properties./.test(error.message); -} -function isErrorMessageWithComponentStackDiff(msg) { - return errorMessagesWithComponentStackDiff.some((regex)=>regex.test(msg)); -} -function getHydrationErrorStackInfo(error) { - const errorMessage = error.message; - if (isErrorMessageWithComponentStackDiff(errorMessage)) { - const [message, diffLog = ''] = errorMessage.split('\n\n'); - const diff = diffLog.trim(); - return { - message: diff === '' ? errorMessage.trim() : message.trim(), - diff, - notes: null - }; - } - const [message, maybeComponentStackDiff] = errorMessage.split("" + REACT_HYDRATION_ERROR_LINK); - const trimmedMessage = message.trim(); - // React built-in hydration diff starts with a newline - if (maybeComponentStackDiff !== undefined && maybeComponentStackDiff.length > 1) { - const diffs = []; - maybeComponentStackDiff.split('\n').forEach((line)=>{ - if (line.trim() === '') return; - if (!line.trim().startsWith('at ')) { - diffs.push(line); - } - }); - const [displayedMessage, ...notes] = trimmedMessage.split('\n\n'); - return { - message: displayedMessage, - diff: diffs.join('\n'), - notes: notes.join('\n\n') || null - }; - } else { - const [displayedMessage, ...notes] = trimmedMessage.split('\n\n'); - return { - message: displayedMessage, - diff: null, - notes: notes.join('\n\n') - }; - } -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=react-19-hydration-error.js.map -}), -"[project]/node_modules/next/dist/next-devtools/userspace/pages/hydration-error-state.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - attachHydrationErrorState: null, - getSquashedHydrationErrorDetails: null, - storeHydrationErrorStateFromConsoleArgs: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - attachHydrationErrorState: function() { - return attachHydrationErrorState; - }, - getSquashedHydrationErrorDetails: function() { - return getSquashedHydrationErrorDetails; - }, - storeHydrationErrorStateFromConsoleArgs: function() { - return storeHydrationErrorStateFromConsoleArgs; - } -}); -const _react18hydrationerror = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/shared/react-18-hydration-error.js [client] (ecmascript)"); -const _react19hydrationerror = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/shared/react-19-hydration-error.js [client] (ecmascript)"); -// We only need this for React 18 or hydration console errors in React 19. -// Once we surface console.error in the dev overlay in pages router, we should only -// use this for React 18. -let hydrationErrorState = {}; -const squashedHydrationErrorDetails = new WeakMap(); -function getSquashedHydrationErrorDetails(error) { - return squashedHydrationErrorDetails.has(error) ? squashedHydrationErrorDetails.get(error) : null; -} -function attachHydrationErrorState(error) { - if (!(0, _react18hydrationerror.isHydrationError)(error) && !(0, _react19hydrationerror.isHydrationError)(error)) { - return; - } - let parsedHydrationErrorState = {}; - // If there's any extra information in the error message to display, - // append it to the error message details property - if (hydrationErrorState.warning) { - // The patched console.error found hydration errors logged by React - // Append the logged warning to the error message - parsedHydrationErrorState = { - // It contains the warning, component stack, server and client tag names - ...hydrationErrorState - }; - // Consume the cached hydration diff. - // This is only required for now when we still squashed the hydration diff log into hydration error. - // Once the all error is logged to dev overlay in order, this will go away. - if (hydrationErrorState.reactOutputComponentDiff) { - parsedHydrationErrorState.reactOutputComponentDiff = hydrationErrorState.reactOutputComponentDiff; - } - squashedHydrationErrorDetails.set(error, parsedHydrationErrorState); - } -} -function storeHydrationErrorStateFromConsoleArgs() { - for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ - args[_key] = arguments[_key]; - } - let [message, firstContent, secondContent, ...rest] = args; - if ((0, _react18hydrationerror.isHydrationWarning)(message)) { - // Some hydration warnings has 4 arguments, some has 3, fallback to the last argument - // when the 3rd argument is not the component stack but an empty string - // For some warnings, there's only 1 argument for template. - // The second argument is the diff or component stack. - if (args.length === 3) { - secondContent = ''; - } - const warning = message.replace(/Warning: /, '').replace('%s', firstContent).replace('%s', secondContent) // remove the last %s from the message - .replace(/%s/g, ''); - const lastArg = (rest[rest.length - 1] || '').trim(); - hydrationErrorState.reactOutputComponentDiff = generateHydrationDiffReact18(message, firstContent, secondContent, lastArg); - hydrationErrorState.warning = warning; - } else if ((0, _react19hydrationerror.isErrorMessageWithComponentStackDiff)(message)) { - // Some hydration warnings has 4 arguments, some has 3, fallback to the last argument - // when the 3rd argument is not the component stack but an empty string - // For some warnings, there's only 1 argument for template. - // The second argument is the diff or component stack. - if (args.length === 3) { - secondContent = ''; - } - const warning = message.replace('%s', firstContent).replace('%s', secondContent) // remove the last %s from the message - .replace(/%s/g, ''); - const lastArg = (args[args.length - 1] || '').trim(); - hydrationErrorState.reactOutputComponentDiff = lastArg; - hydrationErrorState.warning = warning; - } -} -/* - * Some hydration errors in React 18 does not have the diff in the error message. - * Instead it has the error stack trace which is component stack that we can leverage. - * Will parse the diff from the error stack trace - * e.g. - * Warning: Expected server HTML to contain a matching
in

. - * at div - * at p - * at div - * at div - * at Page - * output: - * - *

- *

- * >

- * - */ function generateHydrationDiffReact18(message, firstContent, secondContent, lastArg) { - const componentStack = lastArg; - let firstIndex = -1; - let secondIndex = -1; - const hydrationWarningType = (0, _react18hydrationerror.getHydrationWarningType)(message); - // at div\n at Foo\n at Bar (....)\n -> [div, Foo] - const components = componentStack.split('\n') // .reverse() - .map((line, index)=>{ - // `at ()` -> `at ()` - line = line.trim(); - // extract `at ` to `<>` - // e.g. ` at Foo` -> `` - const [, component, location] = /at (\w+)( \((.*)\))?/.exec(line) || []; - // If there's no location then it's user-land stack frame - if (!location) { - if (component === firstContent && firstIndex === -1) { - firstIndex = index; - } else if (component === secondContent && secondIndex === -1) { - secondIndex = index; - } - } - return location ? '' : component; - }).filter(Boolean).reverse(); - let diff = ''; - for(let i = 0; i < components.length; i++){ - const component = components[i]; - const matchFirstContent = hydrationWarningType === 'tag' && i === components.length - firstIndex - 1; - const matchSecondContent = hydrationWarningType === 'tag' && i === components.length - secondIndex - 1; - if (matchFirstContent || matchSecondContent) { - const spaces = ' '.repeat(Math.max(i * 2 - 2, 0) + 2); - diff += "> " + spaces + "<" + component + ">\n"; - } else { - const spaces = ' '.repeat(i * 2 + 2); - diff += spaces + "<" + component + ">\n"; - } - } - if (hydrationWarningType === 'text') { - const spaces = ' '.repeat(components.length * 2); - diff += "+ " + spaces + '"' + firstContent + '"\n'; - diff += "- " + spaces + '"' + secondContent + '"\n'; - } else if (hydrationWarningType === 'text-in-tag') { - const spaces = ' '.repeat(components.length * 2); - diff += "> " + spaces + "<" + secondContent + ">\n"; - diff += "> " + spaces + '"' + firstContent + '"\n'; - } - return diff; -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=hydration-error-state.js.map -}), -"[project]/node_modules/next/dist/next-devtools/userspace/pages/pages-dev-overlay-error-boundary.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "PagesDevOverlayErrorBoundary", { - enumerable: true, - get: function() { - return PagesDevOverlayErrorBoundary; - } -}); -const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); -const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/react/index.js [client] (ecmascript)")); -class PagesDevOverlayErrorBoundary extends _react.default.PureComponent { - static getDerivedStateFromError(error) { - return { - error - }; - } - // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version. - render() { - // The component has to be unmounted or else it would continue to error - return this.state.error ? null : this.props.children; - } - constructor(...args){ - super(...args), this.state = { - error: null - }; - } -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=pages-dev-overlay-error-boundary.js.map -}), -"[project]/node_modules/next/dist/next-devtools/userspace/app/terminal-logging-config.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - getIsTerminalLoggingEnabled: null, - getTerminalLoggingConfig: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - getIsTerminalLoggingEnabled: function() { - return getIsTerminalLoggingEnabled; - }, - getTerminalLoggingConfig: function() { - return getTerminalLoggingConfig; - } -}); -function getTerminalLoggingConfig() { - try { - return JSON.parse(("TURBOPACK compile-time value", "false") || 'false'); - } catch (e) { - return false; - } -} -function getIsTerminalLoggingEnabled() { - const config = getTerminalLoggingConfig(); - return Boolean(config); -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=terminal-logging-config.js.map -}), -"[project]/node_modules/next/dist/next-devtools/shared/forward-logs-shared.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - UNDEFINED_MARKER: null, - patchConsoleMethod: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - UNDEFINED_MARKER: function() { - return UNDEFINED_MARKER; - }, - patchConsoleMethod: function() { - return patchConsoleMethod; - } -}); -const UNDEFINED_MARKER = '__next_tagged_undefined'; -function patchConsoleMethod(methodName, wrapper) { - const descriptor = Object.getOwnPropertyDescriptor(console, methodName); - if (descriptor && (descriptor.configurable || descriptor.writable) && typeof descriptor.value === 'function') { - const originalMethod = descriptor.value; - const originalName = Object.getOwnPropertyDescriptor(originalMethod, 'name'); - const wrapperMethod = function() { - for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ - args[_key] = arguments[_key]; - } - wrapper(methodName, ...args); - originalMethod.apply(this, args); - }; - if (originalName) { - Object.defineProperty(wrapperMethod, 'name', originalName); - } - Object.defineProperty(console, methodName, { - value: wrapperMethod - }); - return ()=>{ - Object.defineProperty(console, methodName, { - value: originalMethod, - writable: descriptor.writable, - configurable: descriptor.configurable - }); - }; - } - return ()=>{}; -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=forward-logs-shared.js.map -}), -"[project]/node_modules/next/dist/next-devtools/userspace/app/forward-logs.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - PROMISE_MARKER: null, - UNAVAILABLE_MARKER: null, - forwardErrorLog: null, - forwardUnhandledError: null, - initializeDebugLogForwarding: null, - isTerminalLoggingEnabled: null, - logQueue: null, - logStringify: null, - logUnhandledRejection: null, - preLogSerializationClone: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - PROMISE_MARKER: function() { - return PROMISE_MARKER; - }, - UNAVAILABLE_MARKER: function() { - return UNAVAILABLE_MARKER; - }, - forwardErrorLog: function() { - return forwardErrorLog; - }, - forwardUnhandledError: function() { - return forwardUnhandledError; - }, - initializeDebugLogForwarding: function() { - return initializeDebugLogForwarding; - }, - isTerminalLoggingEnabled: function() { - return isTerminalLoggingEnabled; - }, - logQueue: function() { - return logQueue; - }, - logStringify: function() { - return logStringify; - }, - logUnhandledRejection: function() { - return logUnhandledRejection; - }, - preLogSerializationClone: function() { - return preLogSerializationClone; - } -}); -const _safestablestringify = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/safe-stable-stringify/index.js [client] (ecmascript)"); -const _stitchederror = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/userspace/app/errors/stitched-error.js [client] (ecmascript)"); -const _errorsource = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/error-source.js [client] (ecmascript)"); -const _terminalloggingconfig = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/userspace/app/terminal-logging-config.js [client] (ecmascript)"); -const _forwardlogsshared = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/shared/forward-logs-shared.js [client] (ecmascript)"); -const terminalLoggingConfig = (0, _terminalloggingconfig.getTerminalLoggingConfig)(); -const PROMISE_MARKER = 'Promise {}'; -const UNAVAILABLE_MARKER = '[Unable to view]'; -const maximumDepth = typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.depthLimit ? terminalLoggingConfig.depthLimit : 5; -const maximumBreadth = typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.edgeLimit ? terminalLoggingConfig.edgeLimit : 100; -const stringify = (0, _safestablestringify.configure)({ - maximumDepth, - maximumBreadth -}); -const isTerminalLoggingEnabled = (0, _terminalloggingconfig.getIsTerminalLoggingEnabled)(); -const methods = [ - 'log', - 'info', - 'warn', - 'debug', - 'table', - 'assert', - 'dir', - 'dirxml', - 'group', - 'groupCollapsed', - 'groupEnd', - 'trace' -]; -function preLogSerializationClone(value, seen) { - if (seen === void 0) seen = new WeakMap(); - if (value === undefined) return _forwardlogsshared.UNDEFINED_MARKER; - if (value === null || typeof value !== 'object') return value; - if (seen.has(value)) return seen.get(value); - try { - Object.keys(value); - } catch (e) { - return UNAVAILABLE_MARKER; - } - try { - if (typeof value.then === 'function') return PROMISE_MARKER; - } catch (e) { - return UNAVAILABLE_MARKER; - } - if (Array.isArray(value)) { - const out = []; - seen.set(value, out); - for (const item of value){ - try { - out.push(preLogSerializationClone(item, seen)); - } catch (e) { - out.push(UNAVAILABLE_MARKER); - } - } - return out; - } - const proto = Object.getPrototypeOf(value); - if (proto === Object.prototype || proto === null) { - const out = {}; - seen.set(value, out); - for (const key of Object.keys(value)){ - try { - out[key] = preLogSerializationClone(value[key], seen); - } catch (e) { - out[key] = UNAVAILABLE_MARKER; - } - } - return out; - } - return Object.prototype.toString.call(value); -} -const logStringify = (data)=>{ - try { - const result = stringify(data); - return result != null ? result : '"' + UNAVAILABLE_MARKER + '"'; - } catch (e) { - return '"' + UNAVAILABLE_MARKER + '"'; - } -}; -const afterThisFrame = (cb)=>{ - let timeout; - const rafId = requestAnimationFrame(()=>{ - timeout = setTimeout(()=>{ - cb(); - }); - }); - return ()=>{ - cancelAnimationFrame(rafId); - clearTimeout(timeout); - }; -}; -let isPatched = false; -const serializeEntries = (entries)=>entries.map((clientEntry)=>{ - switch(clientEntry.kind){ - case 'any-logged-error': - case 'console': - { - return { - ...clientEntry, - args: clientEntry.args.map(stringifyUserArg) - }; - } - case 'formatted-error': - { - return clientEntry; - } - default: - { - return null; - } - } - }); -const logQueue = { - entries: [], - flushScheduled: false, - cancelFlush: null, - socket: null, - sourceType: undefined, - router: null, - scheduleLogSend: (entry)=>{ - logQueue.entries.push(entry); - if (logQueue.flushScheduled) { - return; - } - // safe to deref and use in setTimeout closure since we cancel on new socket - const socket = logQueue.socket; - if (!socket) { - return; - } - // we probably dont need this - logQueue.flushScheduled = true; - // non blocking log flush, runs at most once per frame - logQueue.cancelFlush = afterThisFrame(()=>{ - logQueue.flushScheduled = false; - // just incase - try { - const payload = JSON.stringify({ - event: 'browser-logs', - entries: serializeEntries(logQueue.entries), - router: logQueue.router, - // needed for source mapping, we just assign the sourceType from the last error for the whole batch - sourceType: logQueue.sourceType - }); - socket.send(payload); - logQueue.entries = []; - logQueue.sourceType = undefined; - } catch (e) { - // error (make sure u don't infinite loop) - /* noop */ } - }); - }, - onSocketReady: (socket)=>{ - if (socket.readyState !== WebSocket.OPEN) { - // invariant - return; - } - // incase an existing timeout was going to run with a stale socket - logQueue.cancelFlush == null ? void 0 : logQueue.cancelFlush.call(logQueue); - logQueue.socket = socket; - try { - const payload = JSON.stringify({ - event: 'browser-logs', - entries: serializeEntries(logQueue.entries), - router: logQueue.router, - sourceType: logQueue.sourceType - }); - socket.send(payload); - logQueue.entries = []; - logQueue.sourceType = undefined; - } catch (e) { - /** noop just incase */ } - } -}; -const stringifyUserArg = (arg)=>{ - if (arg.kind !== 'arg') { - return arg; - } - return { - ...arg, - data: logStringify(arg.data) - }; -}; -const createErrorArg = (error)=>{ - const stack = stackWithOwners(error); - return { - kind: 'formatted-error-arg', - prefix: error.message ? error.name + ": " + error.message : "" + error.name, - stack - }; -}; -const createLogEntry = (level, args)=>{ - // do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers - // error capture stack trace maybe - const stack = stackWithOwners(new Error()); - const stackLines = stack == null ? void 0 : stack.split('\n'); - const cleanStack = stackLines == null ? void 0 : stackLines.slice(3).join('\n') // this is probably ignored anyways - ; - const entry = { - kind: 'console', - consoleMethodStack: cleanStack != null ? cleanStack : null, - method: level, - args: args.map((arg)=>{ - if (arg instanceof Error) { - return createErrorArg(arg); - } - return { - kind: 'arg', - data: preLogSerializationClone(arg) - }; - }) - }; - logQueue.scheduleLogSend(entry); -}; -const forwardErrorLog = (args)=>{ - const errorObjects = args.filter((arg)=>arg instanceof Error); - const first = errorObjects.at(0); - if (first) { - const source = (0, _errorsource.getErrorSource)(first); - if (source) { - logQueue.sourceType = source; - } - } - /** - * browser shows stack regardless of type of data passed to console.error, so we should do the same - * - * do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers - */ const stack = stackWithOwners(new Error()); - const stackLines = stack == null ? void 0 : stack.split('\n'); - const cleanStack = stackLines == null ? void 0 : stackLines.slice(3).join('\n'); - const entry = { - kind: 'any-logged-error', - method: 'error', - consoleErrorStack: cleanStack != null ? cleanStack : '', - args: args.map((arg)=>{ - if (arg instanceof Error) { - return createErrorArg(arg); - } - return { - kind: 'arg', - data: preLogSerializationClone(arg) - }; - }) - }; - logQueue.scheduleLogSend(entry); -}; -const createUncaughtErrorEntry = (errorName, errorMessage, fullStack)=>{ - const entry = { - kind: 'formatted-error', - prefix: "Uncaught " + errorName + ": " + errorMessage, - stack: fullStack, - method: 'error' - }; - logQueue.scheduleLogSend(entry); -}; -const stackWithOwners = (error)=>{ - let ownerStack = ''; - (0, _stitchederror.setOwnerStackIfAvailable)(error); - ownerStack = (0, _stitchederror.getOwnerStack)(error) || ''; - const stack = (error.stack || '') + ownerStack; - return stack; -}; -function logUnhandledRejection(reason) { - if (reason instanceof Error) { - createUnhandledRejectionErrorEntry(reason, stackWithOwners(reason)); - return; - } - createUnhandledRejectionNonErrorEntry(reason); -} -const createUnhandledRejectionErrorEntry = (error, fullStack)=>{ - const source = (0, _errorsource.getErrorSource)(error); - if (source) { - logQueue.sourceType = source; - } - const entry = { - kind: 'formatted-error', - prefix: "⨯ unhandledRejection: " + error.name + ": " + error.message, - stack: fullStack, - method: 'error' - }; - logQueue.scheduleLogSend(entry); -}; -const createUnhandledRejectionNonErrorEntry = (reason)=>{ - const entry = { - kind: 'any-logged-error', - // we can't access the stack since the event is dispatched async and creating an inline error would be meaningless - consoleErrorStack: '', - method: 'error', - args: [ - { - kind: 'arg', - data: "⨯ unhandledRejection:", - isRejectionMessage: true - }, - { - kind: 'arg', - data: preLogSerializationClone(reason) - } - ] - }; - logQueue.scheduleLogSend(entry); -}; -const isHMR = (args)=>{ - const firstArg = args[0]; - if (typeof firstArg !== 'string') { - return false; - } - if (firstArg.startsWith('[Fast Refresh]')) { - return true; - } - if (firstArg.startsWith('[HMR]')) { - return true; - } - return false; -}; -const isIgnoredLog = (args)=>{ - if (args.length < 3) { - return false; - } - const [format, styles, label] = args; - if (typeof format !== 'string' || typeof styles !== 'string' || typeof label !== 'string') { - return false; - } - // kinda hacky, we should define a common format for these strings so we can safely ignore - return format.startsWith('%c%s%c') && styles.includes('background:'); -}; -function forwardUnhandledError(error) { - createUncaughtErrorEntry(error.name, error.message, stackWithOwners(error)); -} -const initializeDebugLogForwarding = (router)=>{ - // probably don't need this - if (isPatched) { - return; - } - // TODO(rob): why does this break rendering on server, important to know incase the same bug appears in browser - if (typeof window === 'undefined') { - return; - } - // better to be safe than sorry - try { - methods.forEach((method)=>(0, _forwardlogsshared.patchConsoleMethod)(method, function(_) { - for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ - args[_key - 1] = arguments[_key]; - } - if (isHMR(args)) { - return; - } - if (isIgnoredLog(args)) { - return; - } - createLogEntry(method, args); - })); - } catch (e) {} - logQueue.router = router; - isPatched = true; -}; -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=forward-logs.js.map -}), -"[project]/node_modules/next/dist/next-devtools/userspace/pages/pages-dev-overlay-setup.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - PagesDevOverlayBridge: null, - register: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - PagesDevOverlayBridge: function() { - return PagesDevOverlayBridge; - }, - register: function() { - return register; - } -}); -const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); -const _jsxruntime = __turbopack_context__.r("[project]/node_modules/react/jsx-runtime.js [client] (ecmascript)"); -const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/react/index.js [client] (ecmascript)")); -const _nextdevtools = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/next-devtools/index.js [client] (ecmascript)"); -const _hydrationerrorstate = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/userspace/pages/hydration-error-state.js [client] (ecmascript)"); -const _router = __turbopack_context__.r("[project]/node_modules/next/dist/client/router.js [client] (ecmascript)"); -const _stitchederror = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/userspace/app/errors/stitched-error.js [client] (ecmascript)"); -const _onrecoverableerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/react-client-callbacks/on-recoverable-error.js [client] (ecmascript)"); -const _pagesdevoverlayerrorboundary = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/userspace/pages/pages-dev-overlay-error-boundary.js [client] (ecmascript)"); -const _forwardlogs = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/userspace/app/forward-logs.js [client] (ecmascript)"); -const usePagesDevOverlayBridge = ()=>{ - _react.default.useInsertionEffect({ - "usePagesDevOverlayBridge.useInsertionEffect": ()=>{ - // NDT uses a different React instance so it's not technically a state update - // scheduled from useInsertionEffect. - (0, _nextdevtools.renderPagesDevOverlay)(_stitchederror.getOwnerStack, _hydrationerrorstate.getSquashedHydrationErrorDetails, _onrecoverableerror.isRecoverableError); - } - }["usePagesDevOverlayBridge.useInsertionEffect"], []); - _react.default.useEffect({ - "usePagesDevOverlayBridge.useEffect": ()=>{ - const { handleStaticIndicator } = __turbopack_context__.r("[project]/node_modules/next/dist/client/dev/hot-reloader/pages/hot-reloader-pages.js [client] (ecmascript)"); - _router.Router.events.on('routeChangeComplete', handleStaticIndicator); - return ({ - "usePagesDevOverlayBridge.useEffect": function() { - _router.Router.events.off('routeChangeComplete', handleStaticIndicator); - } - })["usePagesDevOverlayBridge.useEffect"]; - } - }["usePagesDevOverlayBridge.useEffect"], []); -}; -function PagesDevOverlayBridge(param) { - let { children } = param; - usePagesDevOverlayBridge(); - return /*#__PURE__*/ (0, _jsxruntime.jsx)(_pagesdevoverlayerrorboundary.PagesDevOverlayErrorBoundary, { - children: children - }); -} -let isRegistered = false; -function handleError(error) { - if (!error || !(error instanceof Error) || typeof error.stack !== 'string') { - // A non-error was thrown, we don't have anything to show. :-( - return; - } - (0, _hydrationerrorstate.attachHydrationErrorState)(error); - // Skip ModuleBuildError and ModuleNotFoundError, as it will be sent through onBuildError callback. - // This is to avoid same error as different type showing up on client to cause flashing. - if (error.name !== 'ModuleBuildError' && error.name !== 'ModuleNotFoundError') { - _nextdevtools.dispatcher.onUnhandledError(error); - } -} -let origConsoleError = console.error; -function nextJsHandleConsoleError() { - for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ - args[_key] = arguments[_key]; - } - // See https://github.com/facebook/react/blob/d50323eb845c5fde0d720cae888bf35dedd05506/packages/react-reconciler/src/ReactFiberErrorLogger.js#L78 - const maybeError = ("TURBOPACK compile-time truthy", 1) ? args[1] : "TURBOPACK unreachable"; - (0, _hydrationerrorstate.storeHydrationErrorStateFromConsoleArgs)(...args); - // TODO: Surfaces non-errors logged via `console.error`. - handleError(maybeError); - if (_forwardlogs.isTerminalLoggingEnabled) { - (0, _forwardlogs.forwardErrorLog)(args); - } - origConsoleError.apply(window.console, args); -} -function onUnhandledError(event) { - const error = event == null ? void 0 : event.error; - handleError(error); - if (error && _forwardlogs.isTerminalLoggingEnabled) { - (0, _forwardlogs.forwardUnhandledError)(error); - } -} -function onUnhandledRejection(ev) { - const reason = ev == null ? void 0 : ev.reason; - if (!reason || !(reason instanceof Error) || typeof reason.stack !== 'string') { - // A non-error was thrown, we don't have anything to show. :-( - return; - } - _nextdevtools.dispatcher.onUnhandledRejection(reason); - if (_forwardlogs.isTerminalLoggingEnabled) { - (0, _forwardlogs.logUnhandledRejection)(reason); - } -} -function register() { - if (isRegistered) { - return; - } - isRegistered = true; - try { - Error.stackTraceLimit = 50; - } catch (e) {} - if (_forwardlogs.isTerminalLoggingEnabled) { - (0, _forwardlogs.initializeDebugLogForwarding)('pages'); - } - window.addEventListener('error', onUnhandledError); - window.addEventListener('unhandledrejection', onUnhandledRejection); - window.console.error = nextJsHandleConsoleError; -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=pages-dev-overlay-setup.js.map -}), -"[project]/node_modules/next/dist/pages/_app.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "default", { - enumerable: true, - get: function() { - return App; - } -}); -const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); -const _jsxruntime = __turbopack_context__.r("[project]/node_modules/react/jsx-runtime.js [client] (ecmascript)"); -const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/react/index.js [client] (ecmascript)")); -const _utils = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils.js [client] (ecmascript)"); -/** - * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization. - * This allows for keeping state between navigation, custom error handling, injecting additional data. - */ async function appGetInitialProps(param) { - let { Component, ctx } = param; - const pageProps = await (0, _utils.loadGetInitialProps)(Component, ctx); - return { - pageProps - }; -} -class App extends _react.default.Component { - render() { - const { Component, pageProps } = this.props; - return /*#__PURE__*/ (0, _jsxruntime.jsx)(Component, { - ...pageProps - }); - } -} -App.origGetInitialProps = appGetInitialProps; -App.getInitialProps = appGetInitialProps; -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=_app.js.map -}), -]); - -//# sourceMappingURL=node_modules_next_dist_3b64f844._.js.map \ No newline at end of file diff --git a/docs/_next/static/chunks/node_modules_next_dist_3b64f844._.js.map b/docs/_next/static/chunks/node_modules_next_dist_3b64f844._.js.map deleted file mode 100644 index fcafe047..00000000 --- a/docs/_next/static/chunks/node_modules_next_dist_3b64f844._.js.map +++ /dev/null @@ -1,26 +0,0 @@ -{ - "version": 3, - "sources": [], - "sections": [ - {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/build/polyfills/process.ts"],"sourcesContent":["module.exports =\n global.process?.env && typeof global.process?.env === 'object'\n ? global.process\n : (require('next/dist/compiled/process') as typeof import('next/dist/compiled/process'))\n"],"names":["global","module","exports","process","env","require"],"mappings":"IACEA,iBAA8BA;AADhCC,OAAOC,OAAO,GACZF,CAAAA,CAAAA,kBAAAA,yDAAOG,OAAO,KAAA,OAAA,KAAA,IAAdH,gBAAgBI,GAAG,KAAI,OAAA,CAAA,CAAOJ,mBAAAA,yDAAOG,OAAO,KAAA,OAAA,KAAA,IAAdH,iBAAgBI,GAAG,MAAK,WAClDJ,yDAAOG,OAAO,GACbE,QAAQ","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 9, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/dist/build/polyfills/polyfill-module.js"],"sourcesContent":["\"trimStart\"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),\"trimEnd\"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),\"description\"in Symbol.prototype||Object.defineProperty(Symbol.prototype,\"description\",{configurable:!0,get:function(){var t=/\\((.*)\\)/.exec(this.toString());return t?t[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(t,r){return r=this.concat.apply([],this),t>1&&r.some(Array.isArray)?r.flat(t-1):r},Array.prototype.flatMap=function(t,r){return this.map(t,r).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(t){if(\"function\"!=typeof t)return this.then(t,t);var r=this.constructor||Promise;return this.then(function(n){return r.resolve(t()).then(function(){return n})},function(n){return r.resolve(t()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntries=function(t){return Array.from(t).reduce(function(t,r){return t[r[0]]=r[1],t},{})}),Array.prototype.at||(Array.prototype.at=function(t){var r=Math.trunc(t)||0;if(r<0&&(r+=this.length),!(r<0||r>=this.length))return this[r]}),Object.hasOwn||(Object.hasOwn=function(t,r){if(null==t)throw new TypeError(\"Cannot convert undefined or null to object\");return Object.prototype.hasOwnProperty.call(Object(t),r)}),\"canParse\"in URL||(URL.canParse=function(t,r){try{return!!new URL(t,r)}catch(t){return!1}});\n"],"names":[],"mappings":"AAAA,eAAc,OAAO,SAAS,IAAE,CAAC,OAAO,SAAS,CAAC,SAAS,GAAC,OAAO,SAAS,CAAC,QAAQ,GAAE,aAAY,OAAO,SAAS,IAAE,CAAC,OAAO,SAAS,CAAC,OAAO,GAAC,OAAO,SAAS,CAAC,SAAS,GAAE,iBAAgB,OAAO,SAAS,IAAE,OAAO,cAAc,CAAC,OAAO,SAAS,EAAC,eAAc;IAAC,cAAa,CAAC;IAAE,KAAI;QAAW,IAAI,IAAE,WAAW,IAAI,CAAC,IAAI,CAAC,QAAQ;QAAI,OAAO,IAAE,CAAC,CAAC,EAAE,GAAC,KAAK;IAAC;AAAC,IAAG,MAAM,SAAS,CAAC,IAAI,IAAE,CAAC,MAAM,SAAS,CAAC,IAAI,GAAC,SAAS,CAAC,EAAC,CAAC;IAAE,OAAO,IAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAC,IAAI,GAAE,IAAE,KAAG,EAAE,IAAI,CAAC,MAAM,OAAO,IAAE,EAAE,IAAI,CAAC,IAAE,KAAG;AAAC,GAAE,MAAM,SAAS,CAAC,OAAO,GAAC,SAAS,CAAC,EAAC,CAAC;IAAE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAE,GAAG,IAAI;AAAE,CAAC,GAAE,QAAQ,SAAS,CAAC,OAAO,IAAE,CAAC,QAAQ,SAAS,CAAC,OAAO,GAAC,SAAS,CAAC;IAAE,IAAG,cAAY,OAAO,GAAE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAE;IAAG,IAAI,IAAE,IAAI,CAAC,WAAW,IAAE;IAAQ,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;YAAW,OAAO;QAAC;IAAE,GAAE,SAAS,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;YAAW,MAAM;QAAC;IAAE;AAAE,CAAC,GAAE,OAAO,WAAW,IAAE,CAAC,OAAO,WAAW,GAAC,SAAS,CAAC;IAAE,OAAO,MAAM,IAAI,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,EAAC,CAAC;QAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAC,CAAC,CAAC,EAAE,EAAC;IAAC,GAAE,CAAC;AAAE,CAAC,GAAE,MAAM,SAAS,CAAC,EAAE,IAAE,CAAC,MAAM,SAAS,CAAC,EAAE,GAAC,SAAS,CAAC;IAAE,IAAI,IAAE,KAAK,KAAK,CAAC,MAAI;IAAE,IAAG,IAAE,KAAG,CAAC,KAAG,IAAI,CAAC,MAAM,GAAE,CAAC,CAAC,IAAE,KAAG,KAAG,IAAI,CAAC,MAAM,GAAE,OAAO,IAAI,CAAC,EAAE;AAAA,CAAC,GAAE,OAAO,MAAM,IAAE,CAAC,OAAO,MAAM,GAAC,SAAS,CAAC,EAAC,CAAC;IAAE,IAAG,QAAM,GAAE,MAAM,IAAI,UAAU;IAA8C,OAAO,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,IAAG;AAAE,CAAC,GAAE,cAAa,OAAK,CAAC,IAAI,QAAQ,GAAC,SAAS,CAAC,EAAC,CAAC;IAAE,IAAG;QAAC,OAAM,CAAC,CAAC,IAAI,IAAI,GAAE;IAAE,EAAC,OAAM,GAAE;QAAC,OAAM,CAAC;IAAC;AAAC,CAAC","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 52, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/build/deployment-id.ts"],"sourcesContent":["export function getDeploymentIdQueryOrEmptyString(): string {\n if (process.env.NEXT_DEPLOYMENT_ID) {\n return `?dpl=${process.env.NEXT_DEPLOYMENT_ID}`\n }\n return ''\n}\n"],"names":["getDeploymentIdQueryOrEmptyString","process","env","NEXT_DEPLOYMENT_ID"],"mappings":"AACMC,QAAQC,GAAG,CAACC,kBAAkB,EAAE;;;;;+BADtBH,qCAAAA;;;eAAAA;;;AAAT,SAASA;IACd;;IAGA,OAAO;AACT","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 72, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/lib/route-pattern-normalizer.ts"],"sourcesContent":["import type { Token } from 'next/dist/compiled/path-to-regexp'\n\n/**\n * Route pattern normalization utilities for path-to-regexp compatibility.\n *\n * path-to-regexp 6.3.0+ introduced stricter validation that rejects certain\n * patterns commonly used in Next.js interception routes. This module provides\n * normalization functions to make Next.js route patterns compatible with the\n * updated library while preserving all functionality.\n */\n\n/**\n * Internal separator used to normalize adjacent parameter patterns.\n * This unique marker is inserted between adjacent parameters and stripped out\n * during parameter extraction to avoid conflicts with real URL content.\n */\nconst PARAM_SEPARATOR = '_NEXTSEP_'\n\n/**\n * Detects if a route pattern needs normalization for path-to-regexp compatibility.\n */\nexport function hasAdjacentParameterIssues(route: string): boolean {\n if (typeof route !== 'string') return false\n\n // Check for interception route markers followed immediately by parameters\n // Pattern: /(.):param, /(..):param, /(...):param, /(.)(.):param etc.\n // These patterns cause \"Must have text between two parameters\" errors\n if (/\\/\\(\\.{1,3}\\):[^/\\s]+/.test(route)) {\n return true\n }\n\n // Check for basic adjacent parameters without separators\n // Pattern: :param1:param2 (but not :param* or other URL patterns)\n if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {\n return true\n }\n\n return false\n}\n\n/**\n * Normalizes route patterns that have adjacent parameters without text between them.\n * Inserts a unique separator that can be safely stripped out later.\n */\nexport function normalizeAdjacentParameters(route: string): string {\n let normalized = route\n\n // Handle interception route patterns: (.):param -> (.)_NEXTSEP_:param\n normalized = normalized.replace(\n /(\\([^)]*\\)):([^/\\s]+)/g,\n `$1${PARAM_SEPARATOR}:$2`\n )\n\n // Handle other adjacent parameter patterns: :param1:param2 -> :param1_NEXTSEP_:param2\n normalized = normalized.replace(/:([^:/\\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`)\n\n return normalized\n}\n\n/**\n * Normalizes tokens that have repeating modifiers (* or +) but empty prefix and suffix.\n *\n * path-to-regexp 6.3.0+ introduced validation that throws:\n * \"Can not repeat without prefix/suffix\"\n *\n * This occurs when a token has modifier: '*' or '+' with both prefix: '' and suffix: ''\n */\nexport function normalizeTokensForRegexp(tokens: Token[]): Token[] {\n return tokens.map((token) => {\n // Token union type: Token = string | TokenObject\n // Literal path segments are strings, parameters/wildcards are objects\n if (\n typeof token === 'object' &&\n token !== null &&\n // Not all token objects have 'modifier' property (e.g., simple text tokens)\n 'modifier' in token &&\n // Only repeating modifiers (* or +) cause the validation error\n // Other modifiers like '?' (optional) are fine\n (token.modifier === '*' || token.modifier === '+') &&\n // Token objects can have different shapes depending on route pattern\n 'prefix' in token &&\n 'suffix' in token &&\n // Both prefix and suffix must be empty strings\n // This is what causes the validation error in path-to-regexp\n token.prefix === '' &&\n token.suffix === ''\n ) {\n // Add minimal prefix to satisfy path-to-regexp validation\n // We use '/' as it's the most common path delimiter and won't break route matching\n // The prefix gets used in regex generation but doesn't affect parameter extraction\n return {\n ...token,\n prefix: '/',\n }\n }\n return token\n })\n}\n\n/**\n * Strips normalization separators from extracted route parameters.\n * Used by both server and client code to clean up parameters after route matching.\n */\nexport function stripParameterSeparators(\n params: Record\n): Record {\n const cleaned: Record = {}\n\n for (const [key, value] of Object.entries(params)) {\n if (typeof value === 'string') {\n // Remove the separator if it appears at the start of parameter values\n cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), '')\n } else if (Array.isArray(value)) {\n // Handle array parameters (from repeated route segments)\n cleaned[key] = value.map((item) =>\n typeof item === 'string'\n ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), '')\n : item\n )\n } else {\n cleaned[key] = value\n }\n }\n\n return cleaned\n}\n"],"names":["hasAdjacentParameterIssues","normalizeAdjacentParameters","normalizeTokensForRegexp","stripParameterSeparators","PARAM_SEPARATOR","route","test","normalized","replace","tokens","map","token","modifier","prefix","suffix","params","cleaned","key","value","Object","entries","RegExp","Array","isArray","item"],"mappings":";;;;;;;;;;;;;;;;IAqBgBA,0BAA0B,EAAA;eAA1BA;;IAuBAC,2BAA2B,EAAA;eAA3BA;;IAuBAC,wBAAwB,EAAA;eAAxBA;;IAoCAC,wBAAwB,EAAA;eAAxBA;;;AArGhB;;;;;;;CAOC,GAED;;;;CAIC,GACD,MAAMC,kBAAkB;AAKjB,SAASJ,2BAA2BK,KAAa;IACtD,IAAI,OAAOA,UAAU,UAAU,OAAO;IAEtC,0EAA0E;IAC1E,qEAAqE;IACrE,sEAAsE;IACtE,IAAI,wBAAwBC,IAAI,CAACD,QAAQ;QACvC,OAAO;IACT;IAEA,yDAAyD;IACzD,kEAAkE;IAClE,IAAI,iDAAiDC,IAAI,CAACD,QAAQ;QAChE,OAAO;IACT;IAEA,OAAO;AACT;AAMO,SAASJ,4BAA4BI,KAAa;IACvD,IAAIE,aAAaF;IAEjB,sEAAsE;IACtEE,aAAaA,WAAWC,OAAO,CAC7B,0BACA,AAAC,EAAE,UAAEJ,iBAAgB,GAAG,CAAC;IAG3B,sFAAsF;IACtFG,aAAaA,WAAWC,OAAO,CAAC,sBAAsB,AAAC,GAAG,GAAEJ,CAAiB,MAAjBA;IAE5D,OAAOG;AACT;AAUO,SAASL,yBAAyBO,MAAe;IACtD,OAAOA,OAAOC,GAAG,CAAC,CAACC;QACjB,iDAAiD;QACjD,sEAAsE;QACtE,IACE,OAAOA,UAAU,YACjBA,UAAU,QACV,4EAA4E;QAC5E,cAAcA,SACd,+DAA+D;QAC/D,+CAA+C;QAC9CA,CAAAA,MAAMC,QAAQ,KAAK,OAAOD,MAAMC,QAAQ,KAAK,GAAE,KAChD,qEAAqE;QACrE,YAAYD,SACZ,YAAYA,SACZ,+CAA+C;QAC/C,6DAA6D;QAC7DA,MAAME,MAAM,KAAK,MACjBF,MAAMG,MAAM,KAAK,IACjB;YACA,0DAA0D;YAC1D,mFAAmF;YACnF,mFAAmF;YACnF,OAAO;gBACL,GAAGH,KAAK;gBACRE,QAAQ;YACV;QACF;QACA,OAAOF;IACT;AACF;AAMO,SAASR,yBACdY,MAA2B;IAE3B,MAAMC,UAA+B,CAAC;IAEtC,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIC,OAAOC,OAAO,CAACL,QAAS;QACjD,IAAI,OAAOG,UAAU,UAAU;YAC7B,sEAAsE;YACtEF,OAAO,CAACC,IAAI,GAAGC,MAAMV,OAAO,CAAC,IAAIa,OAAO,AAAC,CAAC,GAAEjB,CAAiB,MAAjBA,mBAAoB;QAClE,OAAO,IAAIkB,MAAMC,OAAO,CAACL,QAAQ;YAC/B,yDAAyD;YACzDF,OAAO,CAACC,IAAI,GAAGC,MAAMR,GAAG,CAAC,CAACc,OACxB,OAAOA,SAAS,WACZA,KAAKhB,OAAO,CAAC,IAAIa,OAAO,AAAC,CAAC,GAAEjB,CAAiB,MAAjBA,mBAAoB,MAChDoB;QAER,OAAO;YACLR,OAAO,CAACC,IAAI,GAAGC;QACjB;IACF;IAEA,OAAOF;AACT","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 177, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/lib/constants.ts"],"sourcesContent":["import type { ServerRuntime } from '../types'\n\nexport const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP'\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'\n\nexport const MATCHED_PATH_HEADER = 'x-matched-path'\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER =\n 'x-prerender-revalidate-if-generated'\n\nexport const RSC_PREFETCH_SUFFIX = '.prefetch.rsc'\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments'\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc'\nexport const RSC_SUFFIX = '.rsc'\nexport const ACTION_SUFFIX = '.action'\nexport const NEXT_DATA_SUFFIX = '.json'\nexport const NEXT_META_SUFFIX = '.meta'\nexport const NEXT_BODY_SUFFIX = '.body'\n\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER =\n 'x-next-revalidate-tag-token'\n\nexport const NEXT_RESUME_HEADER = 'next-resume'\n\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'\n\n// in seconds\nexport const CACHE_ONE_YEAR = 31536000\n\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe\n\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware'\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`\n\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'\n\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages'\nexport const DOT_NEXT_ALIAS = 'private-dot-next'\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir'\nexport const APP_DIR_ALIAS = 'private-next-app-dir'\nexport const RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy'\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS =\n 'private-next-rsc-track-dynamic-import'\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS =\n 'private-next-rsc-action-client-wrapper'\n\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`\n\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`\n\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`\n\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`\n\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`\n\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`\n\nexport const GSP_NO_RETURNED_VALUE =\n 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'\nexport const GSSP_NO_RETURNED_VALUE =\n 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'\n\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR =\n 'The `unstable_revalidate` property is available for general use.\\n' +\n 'Please use `revalidate` instead.'\n\nexport const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`\n\nexport const NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`\n\nexport const SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`\n\nexport const ESLINT_DEFAULT_DIRS = ['app', 'pages', 'components', 'lib', 'src']\n\nexport const SERVER_RUNTIME: Record = {\n edge: 'edge',\n experimentalEdge: 'experimental-edge',\n nodejs: 'nodejs',\n}\n\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */\nconst WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */\n shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */\n reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */\n serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */\n actionBrowser: 'action-browser',\n /**\n * The Node.js bundle layer for the API routes.\n */\n apiNode: 'api-node',\n /**\n * The Edge Lite bundle layer for the API routes.\n */\n apiEdge: 'api-edge',\n /**\n * The layer for the middleware code.\n */\n middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */\n instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */\n edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */\n appPagesBrowser: 'app-pages-browser',\n /**\n * The browser client bundle layer for Pages directory.\n */\n pagesDirBrowser: 'pages-dir-browser',\n /**\n * The Edge Lite bundle layer for Pages directory.\n */\n pagesDirEdge: 'pages-dir-edge',\n /**\n * The Node.js bundle layer for Pages directory.\n */\n pagesDirNode: 'pages-dir-node',\n} as const\n\nexport type WebpackLayerName =\n (typeof WEBPACK_LAYERS_NAMES)[keyof typeof WEBPACK_LAYERS_NAMES]\n\nconst WEBPACK_LAYERS = {\n ...WEBPACK_LAYERS_NAMES,\n GROUP: {\n builtinReact: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n ],\n serverOnly: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware,\n ],\n neutralTarget: [\n // pages api\n WEBPACK_LAYERS_NAMES.apiNode,\n WEBPACK_LAYERS_NAMES.apiEdge,\n ],\n clientOnly: [\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n ],\n bundled: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.shared,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware,\n ],\n appPages: [\n // app router pages and layouts\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n ],\n },\n}\n\nconst WEBPACK_RESOURCE_QUERIES = {\n edgeSSREntry: '__next_edge_ssr_entry__',\n metadata: '__next_metadata__',\n metadataRoute: '__next_metadata_route__',\n metadataImageMeta: '__next_metadata_image_meta__',\n}\n\nexport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES }\n"],"names":["ACTION_SUFFIX","APP_DIR_ALIAS","CACHE_ONE_YEAR","DOT_NEXT_ALIAS","ESLINT_DEFAULT_DIRS","GSP_NO_RETURNED_VALUE","GSSP_COMPONENT_MEMBER_ERROR","GSSP_NO_RETURNED_VALUE","HTML_CONTENT_TYPE_HEADER","INFINITE_CACHE","INSTRUMENTATION_HOOK_FILENAME","JSON_CONTENT_TYPE_HEADER","MATCHED_PATH_HEADER","MIDDLEWARE_FILENAME","MIDDLEWARE_LOCATION_REGEXP","NEXT_BODY_SUFFIX","NEXT_CACHE_IMPLICIT_TAG_ID","NEXT_CACHE_REVALIDATED_TAGS_HEADER","NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER","NEXT_CACHE_SOFT_TAG_MAX_LENGTH","NEXT_CACHE_TAGS_HEADER","NEXT_CACHE_TAG_MAX_ITEMS","NEXT_CACHE_TAG_MAX_LENGTH","NEXT_DATA_SUFFIX","NEXT_INTERCEPTION_MARKER_PREFIX","NEXT_META_SUFFIX","NEXT_QUERY_PARAM_PREFIX","NEXT_RESUME_HEADER","NON_STANDARD_NODE_ENV","PAGES_DIR_ALIAS","PRERENDER_REVALIDATE_HEADER","PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER","PUBLIC_DIR_MIDDLEWARE_CONFLICT","ROOT_DIR_ALIAS","RSC_ACTION_CLIENT_WRAPPER_ALIAS","RSC_ACTION_ENCRYPTION_ALIAS","RSC_ACTION_PROXY_ALIAS","RSC_ACTION_VALIDATE_ALIAS","RSC_CACHE_WRAPPER_ALIAS","RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS","RSC_MOD_REF_PROXY_ALIAS","RSC_PREFETCH_SUFFIX","RSC_SEGMENTS_DIR_SUFFIX","RSC_SEGMENT_SUFFIX","RSC_SUFFIX","SERVER_PROPS_EXPORT_ERROR","SERVER_PROPS_GET_INIT_PROPS_CONFLICT","SERVER_PROPS_SSG_CONFLICT","SERVER_RUNTIME","SSG_FALLBACK_EXPORT_ERROR","SSG_GET_INITIAL_PROPS_CONFLICT","STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR","TEXT_PLAIN_CONTENT_TYPE_HEADER","UNSTABLE_REVALIDATE_RENAME_ERROR","WEBPACK_LAYERS","WEBPACK_RESOURCE_QUERIES","edge","experimentalEdge","nodejs","WEBPACK_LAYERS_NAMES","shared","reactServerComponents","serverSideRendering","actionBrowser","apiNode","apiEdge","middleware","instrument","edgeAsset","appPagesBrowser","pagesDirBrowser","pagesDirEdge","pagesDirNode","GROUP","builtinReact","serverOnly","neutralTarget","clientOnly","bundled","appPages","edgeSSREntry","metadata","metadataRoute","metadataImageMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBaA,aAAa,EAAA;eAAbA;;IAuCAC,aAAa,EAAA;eAAbA;;IAnBAC,cAAc,EAAA;eAAdA;;IAiBAC,cAAc,EAAA;eAAdA;;IAwCAC,mBAAmB,EAAA;eAAnBA;;IAfAC,qBAAqB,EAAA;eAArBA;;IASAC,2BAA2B,EAAA;eAA3BA;;IAPAC,sBAAsB,EAAA;eAAtBA;;IA9EAC,wBAAwB,EAAA;eAAxBA;;IAuCAC,cAAc,EAAA;eAAdA;;IAOAC,6BAA6B,EAAA;eAA7BA;;IA7CAC,wBAAwB,EAAA;eAAxBA;;IAIAC,mBAAmB,EAAA;eAAnBA;;IAqCAC,mBAAmB,EAAA;eAAnBA;;IACAC,0BAA0B,EAAA;eAA1BA;;IA1BAC,gBAAgB,EAAA;eAAhBA;;IAcAC,0BAA0B,EAAA;eAA1BA;;IAXAC,kCAAkC,EAAA;eAAlCA;;IACAC,sCAAsC,EAAA;eAAtCA;;IASAC,8BAA8B,EAAA;eAA9BA;;IAXAC,sBAAsB,EAAA;eAAtBA;;IASAC,wBAAwB,EAAA;eAAxBA;;IACAC,yBAAyB,EAAA;eAAzBA;;IAdAC,gBAAgB,EAAA;eAAhBA;;IAZAC,+BAA+B,E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{"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/lib/is-error.ts"],"sourcesContent":["import { isPlainObject } from '../shared/lib/is-plain-object'\n\n// We allow some additional attached properties for Next.js errors\nexport interface NextError extends Error {\n type?: string\n page?: string\n code?: string | number\n cancelled?: boolean\n digest?: number\n}\n\n/**\n * Checks whether the given value is a NextError.\n * This can be used to print a more detailed error message with properties like `code` & `digest`.\n */\nexport default function isError(err: unknown): err is NextError {\n return (\n typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n )\n}\n\nfunction safeStringify(obj: any) {\n const seen = new WeakSet()\n\n return JSON.stringify(obj, (_key, value) => {\n // If value is an object and already seen, replace with \"[Circular]\"\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return '[Circular]'\n }\n seen.add(value)\n }\n return value\n })\n}\n\nexport function getProperError(err: unknown): Error {\n if (isError(err)) {\n return err\n }\n\n if (process.env.NODE_ENV === 'development') {\n // provide better error for case where `throw undefined`\n // is called in development\n if (typeof err === 'undefined') {\n return new Error(\n 'An undefined error was thrown, ' +\n 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n )\n }\n\n if (err === null) {\n return new Error(\n 'A null error was thrown, ' +\n 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n )\n }\n }\n\n return new Error(isPlainObject(err) ? safeStringify(err) : err + '')\n}\n"],"names":["isError","getProperError","err","safeStringify","obj","seen","WeakSet","JSON","stringify","_key","value","has","add","process","env","NODE_ENV","Error","isPlainObject"],"mappings":"AAyCMa,QAAQC,GAAG,CAACC,QAAQ,KAAK;;;;;;;;;;;;;;;;IA9B/B;;;CAGC,GACD,OAIC,EAAA;eAJuBf;;IAqBRC,cAAc,EAAA;eAAdA;;;+BApCc;AAef,SAASD,QAAQE,GAAY;IAC1C,OACE,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,UAAUA,OAAO,aAAaA;AAE7E;AAEA,SAASC,cAAcC,GAAQ;IAC7B,MAAMC,OAAO,IAAIC;IAEjB,OAAOC,KAAKC,SAAS,CAACJ,KAAK,CAACK,MAAMC;QAChC,oEAAoE;QACpE,IAAI,OAAOA,UAAU,YAAYA,UAAU,MAAM;YAC/C,IAAIL,KAAKM,GAAG,CAACD,QAAQ;gBACnB,OAAO;YACT;YACAL,KAAKO,GAAG,CAACF;QACX;QACA,OAAOA;IACT;AACF;AAEO,SAAST,eAAeC,GAAY;IACzC,IAAIF,QAAQE,MAAM;QAChB,OAAOA;IACT;IAEA,wCAA4C;QAC1C,wDAAwD;QACxD,2BAA2B;QAC3B,IAAI,OAAOA,QAAQ,aAAa;YAC9B,OAAO,OAAA,cAGN,CAHM,IAAIc,MACT,oCACE,6EAFG,qBAAA;uBAAA;4BAAA;8BAAA;YAGP;QACF;QAEA,IAAId,QAAQ,MAAM;YAChB,OAAO,OAAA,cAGN,CAHM,IAAIc,MACT,8BACE,6EAFG,qBAAA;uBAAA;4BAAA;8BAAA;YAGP;QACF;IACF;IAEA,OAAO,OAAA,cAA6D,CAA7D,IAAIA,MAAMC,CAAAA,GAAAA,eAAAA,aAAa,EAACf,OAAOC,cAAcD,OAAOA,MAAM,KAA1D,qBAAA;eAAA;oBAAA;sBAAA;IAA4D;AACrE","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 648, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/lib/is-api-route.ts"],"sourcesContent":["export function isAPIRoute(value?: string) {\n return value === '/api' || Boolean(value?.startsWith('/api/'))\n}\n"],"names":["isAPIRoute","value","Boolean","startsWith"],"mappings":";;;+BAAgBA,cAAAA;;;eAAAA;;;AAAT,SAASA,WAAWC,KAAc;IACvC,OAAOA,UAAU,UAAUC,QAAQD,SAAAA,OAAAA,KAAAA,IAAAA,MAAOE,UAAU,CAAC;AACvD","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 664, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/lib/require-instrumentation-client.ts"],"sourcesContent":["/**\n * This module imports the client instrumentation hook from the project root.\n *\n * The `private-next-instrumentation-client` module is automatically aliased to\n * the `instrumentation-client.ts` file in the project root by webpack or turbopack.\n */\nif (process.env.NODE_ENV === 'development') {\n const measureName = 'Client Instrumentation Hook'\n const startTime = performance.now()\n // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.\n module.exports = require('private-next-instrumentation-client')\n const endTime = performance.now()\n const duration = endTime - startTime\n\n // Using 16ms threshold as it represents one frame (1000ms/60fps)\n // This helps identify if the instrumentation hook initialization\n // could potentially cause frame drops during development.\n const THRESHOLD = 16\n if (duration > THRESHOLD) {\n console.log(\n `[${measureName}] Slow execution detected: ${duration.toFixed(0)}ms (Note: Code download overhead is not included in this measurement)`\n )\n }\n} else {\n // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.\n module.exports = require('private-next-instrumentation-client')\n}\n"],"names":["process","env","NODE_ENV","measureName","startTime","performance","now","module","exports","require","endTime","duration","THRESHOLD","console","log","toFixed"],"mappings":"AAAA;;;;;CAKC,GACGA,QAAQC,GAAG,CAACC,QAAQ,KAAK;AAD5B;AACD,wCAA4C;IAC1C,MAAMC,cAAc;IACpB,MAAMC,YAAYC,YAAYC,GAAG;IACjC,+EAA+E;IAC/EC,OAAOC,OAAO,GAAGC,QAAQ;IACzB,MAAMC,UAAUL,YAAYC,GAAG;IAC/B,MAAMK,WAAWD,UAAUN;IAE3B,iEAAiE;IACjE,iEAAiE;IACjE,0DAA0D;IAC1D,MAAMQ,YAAY;IAClB,IAAID,WAAWC,WAAW;QACxBC,QAAQC,GAAG,CACT,AAAC,CAAC,UAAEX,aAAY,2BAA2B,WAAEQ,SAASI,OAAO,CAAC,IAAG,qEAAqE,CAAC;IAE3I;AACF,OAAO","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 692, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/server/api-utils/get-cookie-parser.ts"],"sourcesContent":["import type { NextApiRequestCookies } from '.'\n\n/**\n * Parse cookies from the `headers` of request\n * @param req request object\n */\n\nexport function getCookieParser(headers: {\n [key: string]: string | string[] | null | undefined\n}): () => NextApiRequestCookies {\n return function parseCookie(): NextApiRequestCookies {\n const { cookie } = headers\n\n if (!cookie) {\n return {}\n }\n\n const { parse: parseCookieFn } =\n require('next/dist/compiled/cookie') as typeof import('next/dist/compiled/cookie')\n return parseCookieFn(Array.isArray(cookie) ? cookie.join('; ') : cookie)\n }\n}\n"],"names":["getCookieParser","headers","parseCookie","cookie","parse","parseCookieFn","require","Array","isArray","join"],"mappings":";;;+BAOgBA,mBAAAA;;;eAAAA;;;AAAT,SAASA,gBAAgBC,OAE/B;IACC,OAAO,SAASC;QACd,MAAM,EAAEC,MAAM,EAAE,GAAGF;QAEnB,IAAI,CAACE,QAAQ;YACX,OAAO,CAAC;QACV;QAEA,MAAM,EAAEC,OAAOC,aAAa,EAAE,GAC5BC,QAAQ;QACV,OAAOD,cAAcE,MAAMC,OAAO,CAACL,UAAUA,OAAOM,IAAI,CAAC,QAAQN;IACnE;AACF","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 715, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/server/dev/hot-reloader-types.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'http'\nimport type { UrlObject } from 'url'\nimport type { Duplex } from 'stream'\nimport type { webpack } from 'next/dist/compiled/webpack/webpack'\nimport type getBaseWebpackConfig from '../../build/webpack-config'\nimport type { RouteDefinition } from '../route-definitions/route-definition'\nimport type { Project, Update as TurbopackUpdate } from '../../build/swc/types'\nimport type { VersionInfo } from './parse-version-info'\nimport type { DebugInfo } from '../../next-devtools/shared/types'\nimport type { DevIndicatorServerState } from './dev-indicator-server-state'\nimport type { DevToolsConfig } from '../../next-devtools/dev-overlay/shared'\n\nexport const enum HMR_ACTIONS_SENT_TO_BROWSER {\n ADDED_PAGE = 'addedPage',\n REMOVED_PAGE = 'removedPage',\n RELOAD_PAGE = 'reloadPage',\n SERVER_COMPONENT_CHANGES = 'serverComponentChanges',\n MIDDLEWARE_CHANGES = 'middlewareChanges',\n CLIENT_CHANGES = 'clientChanges',\n SERVER_ONLY_CHANGES = 'serverOnlyChanges',\n SYNC = 'sync',\n BUILT = 'built',\n BUILDING = 'building',\n DEV_PAGES_MANIFEST_UPDATE = 'devPagesManifestUpdate',\n TURBOPACK_MESSAGE = 'turbopack-message',\n SERVER_ERROR = 'serverError',\n TURBOPACK_CONNECTED = 'turbopack-connected',\n ISR_MANIFEST = 'isrManifest',\n DEV_INDICATOR = 'devIndicator',\n DEVTOOLS_CONFIG = 'devtoolsConfig',\n}\n\ninterface ServerErrorAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.SERVER_ERROR\n errorJSON: string\n}\n\nexport interface TurbopackMessageAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_MESSAGE\n data: TurbopackUpdate | TurbopackUpdate[]\n}\n\ninterface BuildingAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.BUILDING\n}\n\nexport interface CompilationError {\n moduleName?: string\n message: string\n details?: string\n moduleTrace?: Array<{ moduleName?: string }>\n stack?: string\n}\nexport interface SyncAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.SYNC\n hash: string\n errors: ReadonlyArray\n warnings: ReadonlyArray\n versionInfo: VersionInfo\n updatedModules?: ReadonlyArray\n debug?: DebugInfo\n devIndicator: DevIndicatorServerState\n devToolsConfig?: DevToolsConfig\n}\ninterface BuiltAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.BUILT\n hash: string\n errors: ReadonlyArray\n warnings: ReadonlyArray\n updatedModules?: ReadonlyArray\n}\n\ninterface AddedPageAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.ADDED_PAGE\n data: [page: string | null]\n}\n\ninterface RemovedPageAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.REMOVED_PAGE\n data: [page: string | null]\n}\n\nexport interface ReloadPageAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.RELOAD_PAGE\n data: string\n}\n\ninterface ServerComponentChangesAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.SERVER_COMPONENT_CHANGES\n hash: string\n}\n\ninterface MiddlewareChangesAction {\n event: HMR_ACTIONS_SENT_TO_BROWSER.MIDDLEWARE_CHANGES\n}\n\ninterface ClientChangesAction {\n event: HMR_ACTIONS_SENT_TO_BROWSER.CLIENT_CHANGES\n}\n\ninterface ServerOnlyChangesAction {\n event: HMR_ACTIONS_SENT_TO_BROWSER.SERVER_ONLY_CHANGES\n pages: ReadonlyArray\n}\n\ninterface DevPagesManifestUpdateAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE\n data: [\n {\n devPagesManifest: true\n },\n ]\n}\n\nexport interface TurbopackConnectedAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_CONNECTED\n data: { sessionId: number }\n}\n\nexport interface AppIsrManifestAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.ISR_MANIFEST\n data: Record\n}\n\nexport interface DevToolsConfigAction {\n action: HMR_ACTIONS_SENT_TO_BROWSER.DEVTOOLS_CONFIG\n data: DevToolsConfig\n}\n\nexport type HMR_ACTION_TYPES =\n | TurbopackMessageAction\n | TurbopackConnectedAction\n | BuildingAction\n | SyncAction\n | BuiltAction\n | AddedPageAction\n | RemovedPageAction\n | ReloadPageAction\n | ServerComponentChangesAction\n | ClientChangesAction\n | MiddlewareChangesAction\n | ServerOnlyChangesAction\n | DevPagesManifestUpdateAction\n | ServerErrorAction\n | AppIsrManifestAction\n | DevToolsConfigAction\n\nexport type TurbopackMsgToBrowser =\n | { type: HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_MESSAGE; data: any }\n | {\n type: HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_CONNECTED\n data: { sessionId: number }\n }\n\nexport interface NextJsHotReloaderInterface {\n turbopackProject?: Project\n activeWebpackConfigs?: Array>>\n serverStats: webpack.Stats | null\n edgeServerStats: webpack.Stats | null\n run(\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl: UrlObject\n ): Promise<{ finished?: true }>\n\n setHmrServerError(error: Error | null): void\n clearHmrServerError(): void\n start(): Promise\n send(action: HMR_ACTION_TYPES): void\n getCompilationErrors(page: string): Promise\n onHMR(\n req: IncomingMessage,\n _socket: Duplex,\n head: Buffer,\n onUpgrade: (client: { send(data: string): void }) => void\n ): void\n invalidate({\n reloadAfterInvalidation,\n }: {\n reloadAfterInvalidation: boolean\n }): Promise | void\n buildFallbackError(): Promise\n ensurePage({\n page,\n clientOnly,\n appPaths,\n definition,\n isApp,\n url,\n }: {\n page: string\n clientOnly: boolean\n appPaths?: ReadonlyArray | null\n isApp?: boolean\n definition: RouteDefinition | undefined\n url?: string\n }): Promise\n close(): void\n}\n"],"names":["HMR_ACTIONS_SENT_TO_BROWSER"],"mappings":";;;+BAYkBA,+BAAAA;;;eAAAA;;;AAAX,IAAWA,8BAAAA,WAAAA,GAAAA,SAAAA,2BAAAA;;;;;;;;;;;;;;;;;;WAAAA","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 748, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/server/dev/node-stack-frames.ts"],"sourcesContent":["import { parse } from 'next/dist/compiled/stacktrace-parser'\nimport type { StackFrame } from 'next/dist/compiled/stacktrace-parser'\nimport {\n decorateServerError,\n type ErrorSourceType,\n} from '../../shared/lib/error-source'\n\nfunction getFilesystemFrame(frame: StackFrame): StackFrame {\n const f: StackFrame = { ...frame }\n\n if (typeof f.file === 'string') {\n if (\n // Posix:\n f.file.startsWith('/') ||\n // Win32:\n /^[a-z]:\\\\/i.test(f.file) ||\n // Win32 UNC:\n f.file.startsWith('\\\\\\\\')\n ) {\n f.file = `file://${f.file}`\n }\n }\n\n return f\n}\n\nexport function getServerError(error: Error, type: ErrorSourceType): Error {\n if (error.name === 'TurbopackInternalError') {\n // If this is an internal Turbopack error we shouldn't show internal details\n // to the user. These are written to a log file instead.\n const turbopackInternalError = new Error(\n 'An unexpected Turbopack error occurred. Please see the output of `next dev` for more details.'\n )\n decorateServerError(turbopackInternalError, type)\n return turbopackInternalError\n }\n\n let n: Error\n try {\n throw new Error(error.message)\n } catch (e) {\n n = e as Error\n }\n\n n.name = error.name\n try {\n n.stack = `${n.toString()}\\n${parse(error.stack!)\n .map(getFilesystemFrame)\n .map((f) => {\n let str = ` at ${f.methodName}`\n if (f.file) {\n let loc = f.file\n if (f.lineNumber) {\n loc += `:${f.lineNumber}`\n if (f.column) {\n loc += `:${f.column}`\n }\n }\n str += ` (${loc})`\n }\n return str\n })\n .join('\\n')}`\n } catch {\n n.stack = error.stack\n }\n\n decorateServerError(n, type)\n return n\n}\n"],"names":["getServerError","getFilesystemFrame","frame","f","file","startsWith","test","error","type","name","turbopackInternalError","Error","decorateServerError","n","message","e","stack","toString","parse","map","str","methodName","loc","lineNumber","column","join"],"mappings":";;;+BA0BgBA,kBAAAA;;;eAAAA;;;kCA1BM;6BAKf;AAEP,SAASC,mBAAmBC,KAAiB;IAC3C,MAAMC,IAAgB;QAAE,GAAGD,KAAK;IAAC;IAEjC,IAAI,OAAOC,EAAEC,IAAI,KAAK,UAAU;QAC9B,IACE,AACAD,EAAEC,IAAI,CAACC,EADE,QACQ,CAAC,QAClB,SAAS;QACT,aAAaC,IAAI,CAACH,EAAEC,IAAI,KACxB,aAAa;QACbD,EAAEC,IAAI,CAACC,UAAU,CAAC,SAClB;YACAF,EAAEC,IAAI,GAAG,AAAC,OAAO,GAAQ,CAAE,MAARD,EAAEC,IAAI;QAC3B;IACF;IAEA,OAAOD;AACT;AAEO,SAASH,eAAeO,KAAY,EAAEC,IAAqB;IAChE,IAAID,MAAME,IAAI,KAAK,0BAA0B;QAC3C,4EAA4E;QAC5E,wDAAwD;QACxD,MAAMC,yBAAyB,OAAA,cAE9B,CAF8B,IAAIC,MACjC,kGAD6B,qBAAA;mBAAA;wBAAA;0BAAA;QAE/B;QACAC,CAAAA,GAAAA,aAAAA,mBAAmB,EAACF,wBAAwBF;QAC5C,OAAOE;IACT;IAEA,IAAIG;IACJ,IAAI;QACF,MAAM,OAAA,cAAwB,CAAxB,IAAIF,MAAMJ,MAAMO,OAAO,GAAvB,qBAAA;mBAAA;wBAAA;0BAAA;QAAuB;IAC/B,EAAE,OAAOC,GAAG;QACVF,IAAIE;IACN;IAEAF,EAAEJ,IAAI,GAAGF,MAAME,IAAI;IACnB,IAAI;QACFI,EAAEG,KAAK,GAAG,UAAGH,EAAEI,QAAQ,IAAG,EAAE,IAgBpB,CAAO,MAhBeC,CAAAA,GAAAA,kBAAAA,KAAK,EAACX,MAAMS,KAAK,EAC5CG,GAAG,CAAClB,oBACJkB,GAAG,CAAC,CAAChB;YACJ,IAAIiB,MAAM,AAAC,OAAO,GAAc,CAAE,MAAdjB,EAAEkB,UAAU;YAChC,IAAIlB,EAAEC,IAAI,EAAE;gBACV,IAAIkB,MAAMnB,EAAEC,IAAI;gBAChB,IAAID,EAAEoB,UAAU,EAAE;oBAChBD,OAAO,AAAC,CAAC,GAAc,CAAE,MAAdnB,EAAEoB,UAAU;oBACvB,IAAIpB,EAAEqB,MAAM,EAAE;wBACZF,OAAO,AAAC,CAAC,GAAU,CAAE,MAAVnB,EAAEqB,MAAM;oBACrB;gBACF;gBACAJ,OAAO,AAAC,EAAE,UAAEE,KAAI,CAAC,CAAC;YACpB;YACA,OAAOF;QACT,GACCK,IAAI,CAAC;IACV,EAAE,UAAM;QACNZ,EAAEG,KAAK,GAAGT,MAAMS,KAAK;IACvB;IAEAJ,CAAAA,GAAAA,aAAAA,mBAAmB,EAACC,GAAGL;IACvB,OAAOK;AACT","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 820, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/next-devtools/userspace/app/errors/stitched-error.ts"],"sourcesContent":["import React from 'react'\nimport isError from '../../../../lib/is-error'\n\nconst ownerStacks = new WeakMap()\n\nexport function getOwnerStack(error: Error): string | null | undefined {\n return ownerStacks.get(error)\n}\nexport function setOwnerStack(error: Error, stack: string | null) {\n ownerStacks.set(error, stack)\n}\n\nexport function coerceError(value: unknown): Error {\n return isError(value) ? value : new Error('' + value)\n}\n\nexport function setOwnerStackIfAvailable(error: Error): void {\n // React 18 and prod does not have `captureOwnerStack`\n if ('captureOwnerStack' in React) {\n setOwnerStack(error, React.captureOwnerStack())\n }\n}\n\nexport function decorateDevError(thrownValue: unknown) {\n const error = coerceError(thrownValue)\n setOwnerStackIfAvailable(error)\n return error\n}\n"],"names":["coerceError","decorateDevError","getOwnerStack","setOwnerStack","setOwnerStackIfAvailable","ownerStacks","WeakMap","error","get","stack","set","value","isError","Error","React","captureOwnerStack","thrownValue"],"mappings":";;;;;;;;;;;;;;;;;IAYgBA,WAAW,EAAA;eAAXA;;IAWAC,gBAAgB,EAAA;eAAhBA;;IAlBAC,aAAa,EAAA;eAAbA;;IAGAC,aAAa,EAAA;eAAbA;;IAQAC,wBAAwB,EAAA;eAAxBA;;;;gEAhBE;kEACE;AAEpB,MAAMC,cAAc,IAAIC;AAEjB,SAASJ,cAAcK,KAAY;IACxC,OAAOF,YAAYG,GAAG,CAACD;AACzB;AACO,SAASJ,cAAcI,KAAY,EAAEE,KAAoB;IAC9DJ,YAAYK,GAAG,CAACH,OAAOE;AACzB;AAEO,SAAST,YAAYW,KAAc;IACxC,OAAOC,CAAAA,GAAAA,SAAAA,OAAO,EAACD,SAASA,QAAQ,OAAA,cAAqB,CAArB,IAAIE,MAAM,KAAKF,QAAf,qBAAA;eAAA;oBAAA;sBAAA;IAAoB;AACtD;AAEO,SAASP,yBAAyBG,KAAY;IACnD,sDAAsD;IACtD,IAAI,uBAAuBO,OAAAA,OAAK,EAAE;QAChCX,cAAcI,OAAOO,OAAAA,OAAK,CAACC,iBAAiB;IAC9C;AACF;AAEO,SAASd,iBAAiBe,WAAoB;IACnD,MAAMT,QAAQP,YAAYgB;IAC1BZ,yBAAyBG;IACzB,OAAOA;AACT","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 892, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/next-devtools/shared/react-18-hydration-error.ts"],"sourcesContent":["import isError from '../../lib/is-error'\n\nexport function isHydrationError(error: unknown): boolean {\n return (\n isError(error) &&\n (error.message ===\n 'Hydration failed because the initial UI does not match what was rendered on the server.' ||\n error.message === 'Text content does not match server-rendered HTML.')\n )\n}\n\nexport function isHydrationWarning(message: unknown): message is string {\n return (\n isHtmlTagsWarning(message) ||\n isTextInTagsMismatchWarning(message) ||\n isTextWarning(message)\n )\n}\n\ntype NullableText = string | null | undefined\n\n// https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js used as a reference\nconst htmlTagsWarnings = new Set([\n 'Warning: Expected server HTML to contain a matching <%s> in <%s>.%s',\n 'Warning: Did not expect server HTML to contain a <%s> in <%s>.%s',\n])\nconst textAndTagsMismatchWarnings = new Set([\n 'Warning: Expected server HTML to contain a matching text node for \"%s\" in <%s>.%s',\n 'Warning: Did not expect server HTML to contain the text node \"%s\" in <%s>.%s',\n])\nconst textWarnings = new Set([\n 'Warning: Text content did not match. Server: \"%s\" Client: \"%s\"%s',\n])\n\nexport const getHydrationWarningType = (\n message: NullableText\n): 'tag' | 'text' | 'text-in-tag' => {\n if (typeof message !== 'string') {\n // TODO: Doesn't make sense to treat no message as a hydration error message.\n // We should bail out somewhere earlier.\n return 'text'\n }\n\n const normalizedMessage = message.startsWith('Warning: ')\n ? message\n : `Warning: ${message}`\n\n if (isHtmlTagsWarning(normalizedMessage)) return 'tag'\n if (isTextInTagsMismatchWarning(normalizedMessage)) return 'text-in-tag'\n\n return 'text'\n}\n\nconst isHtmlTagsWarning = (message: unknown) =>\n typeof message === 'string' && htmlTagsWarnings.has(message)\n\nconst isTextInTagsMismatchWarning = (msg: unknown) =>\n typeof msg === 'string' && textAndTagsMismatchWarnings.has(msg)\n\nconst isTextWarning = (msg: unknown) =>\n typeof msg === 'string' && textWarnings.has(msg)\n"],"names":["getHydrationWarningType","isHydrationError","isHydrationWarning","error","isError","message","isHtmlTagsWarning","isTextInTagsMismatchWarning","isTextWarning","htmlTagsWarnings","Set","textAndTagsMismatchWarnings","textWarnings","normalizedMessage","startsWith","has","msg"],"mappings":";;;;;;;;;;;;;;;IAkCaA,uBAAuB,EAAA;eAAvBA;;IAhCGC,gBAAgB,EAAA;eAAhBA;;IASAC,kBAAkB,EAAA;eAAlBA;;;;kEAXI;AAEb,SAASD,iBAAiBE,KAAc;IAC7C,OACEC,CAAAA,GAAAA,SAAAA,OAAO,EAACD,UACPA,CAAAA,MAAME,OAAO,KACZ,6FACAF,MAAME,OAAO,KAAK,mDAAkD;AAE1E;AAEO,SAASH,mBAAmBG,OAAgB;IACjD,OACEC,kBAAkBD,YAClBE,4BAA4BF,YAC5BG,cAAcH;AAElB;AAIA,iIAAiI;AACjI,MAAMI,mBAAmB,IAAIC,IAAI;IAC/B;IACA;CACD;AACD,MAAMC,8BAA8B,IAAID,IAAI;IAC1C;IACA;CACD;AACD,MAAME,eAAe,IAAIF,IAAI;IAC3B;CACD;AAEM,MAAMV,0BAA0B,CACrCK;IAEA,IAAI,OAAOA,YAAY,UAAU;QAC/B,6EAA6E;QAC7E,wCAAwC;QACxC,OAAO;IACT;IAEA,MAAMQ,oBAAoBR,QAAQS,UAAU,CAAC,eACzCT,UACC,cAAWA;IAEhB,IAAIC,kBAAkBO,oBAAoB,OAAO;IACjD,IAAIN,4BAA4BM,oBAAoB,OAAO;IAE3D,OAAO;AACT;AAEA,MAAMP,oBAAoB,CAACD,UACzB,OAAOA,YAAY,YAAYI,iBAAiBM,GAAG,CAACV;AAEtD,MAAME,8BAA8B,CAACS,MACnC,OAAOA,QAAQ,YAAYL,4BAA4BI,GAAG,CAACC;AAE7D,MAAMR,gBAAgB,CAACQ,MACrB,OAAOA,QAAQ,YAAYJ,aAAaG,GAAG,CAACC","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 962, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/next-devtools/shared/react-19-hydration-error.ts"],"sourcesContent":["export const REACT_HYDRATION_ERROR_LINK =\n 'https://react.dev/link/hydration-mismatch'\nexport const NEXTJS_HYDRATION_ERROR_LINK =\n 'https://nextjs.org/docs/messages/react-hydration-error'\n\n/**\n * Only React 19+ contains component stack diff in the error message\n */\nconst errorMessagesWithComponentStackDiff = [\n /^In HTML, (.+?) cannot be a child of <(.+?)>\\.(.*)\\nThis will cause a hydration error\\.(.*)/,\n /^In HTML, (.+?) cannot be a descendant of <(.+?)>\\.\\nThis will cause a hydration error\\.(.*)/,\n /^In HTML, text nodes cannot be a child of <(.+?)>\\.\\nThis will cause a hydration error\\./,\n /^In HTML, whitespace text nodes cannot be a child of <(.+?)>\\. Make sure you don't have any extra whitespace between tags on each line of your source code\\.\\nThis will cause a hydration error\\./,\n]\n\nexport function isHydrationError(error: Error): boolean {\n return (\n isErrorMessageWithComponentStackDiff(error.message) ||\n /Hydration failed because the server rendered (text|HTML) didn't match the client\\./.test(\n error.message\n ) ||\n /A tree hydrated but some attributes of the server rendered HTML didn't match the client properties./.test(\n error.message\n )\n )\n}\n\nexport function isErrorMessageWithComponentStackDiff(msg: string): boolean {\n return errorMessagesWithComponentStackDiff.some((regex) => regex.test(msg))\n}\n\nexport function getHydrationErrorStackInfo(error: Error): {\n message: string | null\n notes: string | null\n diff: string | null\n} {\n const errorMessage = error.message\n if (isErrorMessageWithComponentStackDiff(errorMessage)) {\n const [message, diffLog = ''] = errorMessage.split('\\n\\n')\n const diff = diffLog.trim()\n return {\n message: diff === '' ? errorMessage.trim() : message.trim(),\n diff,\n notes: null,\n }\n }\n\n const [message, maybeComponentStackDiff] = errorMessage.split(\n `${REACT_HYDRATION_ERROR_LINK}`\n )\n const trimmedMessage = message.trim()\n // React built-in hydration diff starts with a newline\n if (\n maybeComponentStackDiff !== undefined &&\n maybeComponentStackDiff.length > 1\n ) {\n const diffs: string[] = []\n maybeComponentStackDiff.split('\\n').forEach((line) => {\n if (line.trim() === '') return\n if (!line.trim().startsWith('at ')) {\n diffs.push(line)\n }\n })\n\n const [displayedMessage, ...notes] = trimmedMessage.split('\\n\\n')\n return {\n message: displayedMessage,\n diff: diffs.join('\\n'),\n notes: notes.join('\\n\\n') || null,\n }\n } else {\n const [displayedMessage, ...notes] = trimmedMessage.split('\\n\\n')\n return {\n message: displayedMessage,\n diff: null,\n notes: notes.join('\\n\\n'),\n }\n }\n}\n"],"names":["NEXTJS_HYDRATION_ERROR_LINK","REACT_HYDRATION_ERROR_LINK","getHydrationErrorStackInfo","isErrorMessageWithComponentStackDiff","isHydrationError","errorMessagesWithComponentStackDiff","error","message","test","msg","some","regex","errorMessage","diffLog","split","diff","trim","notes","maybeComponentStackDiff","trimmedMessage","undefined","length","diffs","forEach","line","startsWith","push","displayedMessage","join"],"mappings":";;;;;;;;;;;;;;;;;IAEaA,2BAA2B,EAAA;eAA3BA;;IAFAC,0BAA0B,EAAA;eAA1BA;;IA+BGC,0BAA0B,EAAA;eAA1BA;;IAJAC,oCAAoC,EAAA;eAApCA;;IAZAC,gBAAgB,EAAA;eAAhBA;;;AAfT,MAAMH,6BACX;AACK,MAAMD,8BACX;AAEF;;CAEC,GACD,MAAMK,sCAAsC;IAC1C;IACA;IACA;IACA;CACD;AAEM,SAASD,iBAAiBE,KAAY;IAC3C,OACEH,qCAAqCG,MAAMC,OAAO,KAClD,qFAAqFC,IAAI,CACvFF,MAAMC,OAAO,KAEf,sGAAsGC,IAAI,CACxGF,MAAMC,OAAO;AAGnB;AAEO,SAASJ,qCAAqCM,GAAW;IAC9D,OAAOJ,oCAAoCK,IAAI,CAAC,CAACC,QAAUA,MAAMH,IAAI,CAACC;AACxE;AAEO,SAASP,2BAA2BI,KAAY;IAKrD,MAAMM,eAAeN,MAAMC,OAAO;IAClC,IAAIJ,qCAAqCS,eAAe;QACtD,MAAM,CAACL,SAASM,UAAU,EAAE,CAAC,GAAGD,aAAaE,KAAK,CAAC;QACnD,MAAMC,OAAOF,QAAQG,IAAI;QACzB,OAAO;YACLT,SAASQ,SAAS,KAAKH,aAAaI,IAAI,KAAKT,QAAQS,IAAI;YACzDD;YACAE,OAAO;QACT;IACF;IAEA,MAAM,CAACV,SAASW,wBAAwB,GAAGN,aAAaE,KAAK,CAC1D,KAAEb;IAEL,MAAMkB,iBAAiBZ,QAAQS,IAAI;IACnC,sDAAsD;IACtD,IACEE,4BAA4BE,aAC5BF,wBAAwBG,MAAM,GAAG,GACjC;QACA,MAAMC,QAAkB,EAAE;QAC1BJ,wBAAwBJ,KAAK,CAAC,MAAMS,OAAO,CAAC,CAACC;YAC3C,IAAIA,KAAKR,IAAI,OAAO,IAAI;YACxB,IAAI,CAACQ,KAAKR,IAAI,GAAGS,UAAU,CAAC,QAAQ;gBAClCH,MAAMI,IAAI,CAACF;YACb;QACF;QAEA,MAAM,CAACG,kBAAkB,GAAGV,MAAM,GAAGE,eAAeL,KAAK,CAAC;QAC1D,OAAO;YACLP,SAASoB;YACTZ,MAAMO,MAAMM,IAAI,CAAC;YACjBX,OAAOA,MAAMW,IAAI,CAAC,WAAW;QAC/B;IACF,OAAO;QACL,MAAM,CAACD,kBAAkB,GAAGV,MAAM,GAAGE,eAAeL,KAAK,CAAC;QAC1D,OAAO;YACLP,SAASoB;YACTZ,MAAM;YACNE,OAAOA,MAAMW,IAAI,CAAC;QACpB;IACF;AACF","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1059, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/next-devtools/userspace/pages/hydration-error-state.ts"],"sourcesContent":["import {\n getHydrationWarningType,\n isHydrationError as isReact18HydrationError,\n isHydrationWarning as isReact18HydrationWarning,\n} from '../../shared/react-18-hydration-error'\nimport {\n isHydrationError as isReact19HydrationError,\n isErrorMessageWithComponentStackDiff as isReact19HydrationWarning,\n} from '../../shared/react-19-hydration-error'\nimport type { HydrationErrorState } from '../../shared/hydration-error'\n\n// We only need this for React 18 or hydration console errors in React 19.\n// Once we surface console.error in the dev overlay in pages router, we should only\n// use this for React 18.\nlet hydrationErrorState: HydrationErrorState = {}\n\nconst squashedHydrationErrorDetails = new WeakMap()\n\nexport function getSquashedHydrationErrorDetails(\n error: Error\n): HydrationErrorState | null {\n return squashedHydrationErrorDetails.has(error)\n ? squashedHydrationErrorDetails.get(error)!\n : null\n}\n\nexport function attachHydrationErrorState(error: Error) {\n if (!isReact18HydrationError(error) && !isReact19HydrationError(error)) {\n return\n }\n\n let parsedHydrationErrorState: typeof hydrationErrorState = {}\n\n // If there's any extra information in the error message to display,\n // append it to the error message details property\n if (hydrationErrorState.warning) {\n // The patched console.error found hydration errors logged by React\n // Append the logged warning to the error message\n parsedHydrationErrorState = {\n // It contains the warning, component stack, server and client tag names\n ...hydrationErrorState,\n }\n\n // Consume the cached hydration diff.\n // This is only required for now when we still squashed the hydration diff log into hydration error.\n // Once the all error is logged to dev overlay in order, this will go away.\n if (hydrationErrorState.reactOutputComponentDiff) {\n parsedHydrationErrorState.reactOutputComponentDiff =\n hydrationErrorState.reactOutputComponentDiff\n }\n\n squashedHydrationErrorDetails.set(error, parsedHydrationErrorState)\n }\n}\n\n// TODO: Only handle React 18. Once we surface console.error in the dev overlay in pages router,\n// we can use the same behavior as App Router.\nexport function storeHydrationErrorStateFromConsoleArgs(...args: any[]) {\n let [message, firstContent, secondContent, ...rest] = args\n if (isReact18HydrationWarning(message)) {\n // Some hydration warnings has 4 arguments, some has 3, fallback to the last argument\n // when the 3rd argument is not the component stack but an empty string\n // For some warnings, there's only 1 argument for template.\n // The second argument is the diff or component stack.\n if (args.length === 3) {\n secondContent = ''\n }\n\n const warning = message\n .replace(/Warning: /, '')\n .replace('%s', firstContent)\n .replace('%s', secondContent)\n // remove the last %s from the message\n .replace(/%s/g, '')\n\n const lastArg = (rest[rest.length - 1] || '').trim()\n\n hydrationErrorState.reactOutputComponentDiff = generateHydrationDiffReact18(\n message,\n firstContent,\n secondContent,\n lastArg\n )\n\n hydrationErrorState.warning = warning\n } else if (isReact19HydrationWarning(message)) {\n // Some hydration warnings has 4 arguments, some has 3, fallback to the last argument\n // when the 3rd argument is not the component stack but an empty string\n // For some warnings, there's only 1 argument for template.\n // The second argument is the diff or component stack.\n if (args.length === 3) {\n secondContent = ''\n }\n\n const warning = message\n .replace('%s', firstContent)\n .replace('%s', secondContent)\n // remove the last %s from the message\n .replace(/%s/g, '')\n\n const lastArg = (args[args.length - 1] || '').trim()\n\n hydrationErrorState.reactOutputComponentDiff = lastArg\n hydrationErrorState.warning = warning\n }\n}\n\n/*\n * Some hydration errors in React 18 does not have the diff in the error message.\n * Instead it has the error stack trace which is component stack that we can leverage.\n * Will parse the diff from the error stack trace\n * e.g.\n * Warning: Expected server HTML to contain a matching
in

.\n * at div\n * at p\n * at div\n * at div\n * at Page\n * output:\n * \n *

\n *

\n * >

\n *\n */\nfunction generateHydrationDiffReact18(\n message: string,\n firstContent: string,\n secondContent: string,\n lastArg: string\n) {\n const componentStack = lastArg\n let firstIndex = -1\n let secondIndex = -1\n const hydrationWarningType = getHydrationWarningType(message)\n\n // at div\\n at Foo\\n at Bar (....)\\n -> [div, Foo]\n const components = componentStack\n .split('\\n')\n // .reverse()\n .map((line: string, index: number) => {\n // `at ()` -> `at ()`\n line = line.trim()\n // extract `at ` to `<>`\n // e.g. ` at Foo` -> ``\n const [, component, location] = /at (\\w+)( \\((.*)\\))?/.exec(line) || []\n // If there's no location then it's user-land stack frame\n if (!location) {\n if (component === firstContent && firstIndex === -1) {\n firstIndex = index\n } else if (component === secondContent && secondIndex === -1) {\n secondIndex = index\n }\n }\n return location ? '' : component\n })\n .filter(Boolean)\n .reverse()\n\n let diff = ''\n for (let i = 0; i < components.length; i++) {\n const component = components[i]\n const matchFirstContent =\n hydrationWarningType === 'tag' && i === components.length - firstIndex - 1\n const matchSecondContent =\n hydrationWarningType === 'tag' &&\n i === components.length - secondIndex - 1\n if (matchFirstContent || matchSecondContent) {\n const spaces = ' '.repeat(Math.max(i * 2 - 2, 0) + 2)\n diff += `> ${spaces}<${component}>\\n`\n } else {\n const spaces = ' '.repeat(i * 2 + 2)\n diff += `${spaces}<${component}>\\n`\n }\n }\n if (hydrationWarningType === 'text') {\n const spaces = ' '.repeat(components.length * 2)\n diff += `+ ${spaces}\"${firstContent}\"\\n`\n diff += `- ${spaces}\"${secondContent}\"\\n`\n } else if (hydrationWarningType === 'text-in-tag') {\n const spaces = ' '.repeat(components.length * 2)\n diff += `> ${spaces}<${secondContent}>\\n`\n diff += `> ${spaces}\"${firstContent}\"\\n`\n }\n return diff\n}\n"],"names":["attachHydrationErrorState","getSquashedHydrationErrorDetails","storeHydrationErrorStateFromConsoleArgs","hydrationErrorState","squashedHydrationErrorDetails","WeakMap","error","has","get","isReact18HydrationError","isReact19HydrationError","parsedHydrationErrorState","warning","reactOutputComponentDiff","set","args","message","firstContent","secondContent","rest","isReact18HydrationWarning","length","replace","lastArg","trim","generateHydrationDiffReact18","isReact19HydrationWarning","componentStack","firstIndex","secondIndex","hydrationWarningType","getHydrationWarningType","components","split","map","line","index","component","location","exec","filter","Boolean","reverse","diff","i","matchFirstContent","matchSecondContent","spaces","repeat","Math","max"],"mappings":";;;;;;;;;;;;;;;IA0BgBA,yBAAyB,EAAA;eAAzBA;;IARAC,gCAAgC,EAAA;eAAhCA;;IAuCAC,uCAAuC,EAAA;eAAvCA;;;uCArDT;uCAIA;AAGP,0EAA0E;AAC1E,mFAAmF;AACnF,yBAAyB;AACzB,IAAIC,sBAA2C,CAAC;AAEhD,MAAMC,gCAAgC,IAAIC;AAEnC,SAASJ,iCACdK,KAAY;IAEZ,OAAOF,8BAA8BG,GAAG,CAACD,SACrCF,8BAA8BI,GAAG,CAACF,SAClC;AACN;AAEO,SAASN,0BAA0BM,KAAY;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EuB,IAAK;QAC1C,MAAMP,YAAYL,UAAU,CAACY,EAAE;QAC/B,MAAMC,oBACJf,yBAAyB,SAASc,MAAMZ,WAAWX,MAAM,GAAGO,aAAa;QAC3E,MAAMkB,qBACJhB,yBAAyB,SACzBc,MAAMZ,WAAWX,MAAM,GAAGQ,cAAc;QAC1C,IAAIgB,qBAAqBC,oBAAoB;YAC3C,MAAMC,SAAS,IAAIC,MAAM,CAACC,KAAKC,GAAG,CAACN,IAAI,IAAI,GAAG,KAAK;YACnDD,QAAS,OAAII,SAAO,MAAGV,YAAU;QACnC,OAAO;YACL,MAAMU,SAAS,IAAIC,MAAM,CAACJ,IAAI,IAAI;YAClCD,QAAWI,SAAO,MAAGV,YAAU;QACjC;IACF;IACA,IAAIP,yBAAyB,QAAQ;QACnC,MAAMiB,SAAS,IAAIC,MAAM,CAAChB,WAAWX,MAAM,GAAG;QAC9CsB,QAAS,OAAII,SAAO,MAAG9B,eAAa;QACpC0B,QAAS,OAAII,SAAO,MAAG7B,gBAAc;IACvC,OAAO,IAAIY,yBAAyB,eAAe;QACjD,MAAMiB,SAAS,IAAIC,MAAM,CAAChB,WAAWX,MAAM,GAAG;QAC9CsB,QAAS,OAAII,SAAO,MAAG7B,gBAAc;QACrCyB,QAAS,SAAMI,SAAO,MAAG9B,eAAa;IACxC;IACA,OAAO0B;AACT","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1225, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/next-devtools/userspace/pages/pages-dev-overlay-error-boundary.tsx"],"sourcesContent":["import React from 'react'\n\ntype PagesDevOverlayErrorBoundaryProps = {\n children?: React.ReactNode\n}\ntype PagesDevOverlayErrorBoundaryState = { error: Error | null }\n\nexport class PagesDevOverlayErrorBoundary extends React.PureComponent<\n PagesDevOverlayErrorBoundaryProps,\n PagesDevOverlayErrorBoundaryState\n> {\n state = { error: null }\n\n static getDerivedStateFromError(error: Error) {\n return { error }\n }\n\n // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.\n render(): React.ReactNode {\n // The component has to be unmounted or else it would continue to error\n return this.state.error ? null : this.props.children\n }\n}\n"],"names":["PagesDevOverlayErrorBoundary","React","PureComponent","getDerivedStateFromError","error","render","state","props","children"],"mappings":";;;+BAOaA,gCAAAA;;;eAAAA;;;;gEAPK;AAOX,MAAMA,qCAAqCC,OAAAA,OAAK,CAACC,aAAa;IAMnE,OAAOC,yBAAyBC,KAAY,EAAE;QAC5C,OAAO;YAAEA;QAAM;IACjB;IAEA,yIAAyI;IACzIC,SAA0B;QACxB,uEAAuE;QACvE,OAAO,IAAI,CAACC,KAAK,CAACF,KAAK,GAAG,OAAO,IAAI,CAACG,KAAK,CAACC,QAAQ;IACtD;;QAdK,KAAA,IAAA,OAAA,IAAA,CAILF,KAAAA,GAAQ;YAAEF,OAAO;QAAK;;AAWxB","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1264, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/next-devtools/userspace/app/terminal-logging-config.ts"],"sourcesContent":["export function getTerminalLoggingConfig():\n | false\n | boolean\n | {\n depthLimit?: number\n edgeLimit?: number\n showSourceLocation?: boolean\n } {\n try {\n return JSON.parse(\n process.env.__NEXT_BROWSER_DEBUG_INFO_IN_TERMINAL || 'false'\n )\n } catch {\n return false\n }\n}\n\nexport function getIsTerminalLoggingEnabled(): boolean {\n const config = getTerminalLoggingConfig()\n return Boolean(config)\n}\n"],"names":["getIsTerminalLoggingEnabled","getTerminalLoggingConfig","JSON","parse","process","env","__NEXT_BROWSER_DEBUG_INFO_IN_TERMINAL","config","Boolean"],"mappings":"AAUMI,QAAQC,GAAG,CAACC,qCAAqC;;;;;;;;;;;;;;;;IAOvCN,2BAA2B,EAAA;eAA3BA;;IAjBAC,wBAAwB,EAAA;eAAxBA;;;AAAT,SAASA;IAQd,IAAI;QACF,OAAOC,KAAKC,KAAK,8CACsC;IAEzD,EAAE,OAAA,GAAM;QACN,OAAO;IACT;AACF;AAEO,SAASH;IACd,MAAMO,SAASN;IACf,OAAOO,QAAQD;AACjB","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1309, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/next-devtools/shared/forward-logs-shared.ts"],"sourcesContent":["export type LogMethod =\n | 'log'\n | 'info'\n | 'debug'\n | 'table'\n | 'error'\n | 'assert'\n | 'dir'\n | 'dirxml'\n | 'group'\n | 'groupCollapsed'\n | 'groupEnd'\n | 'trace'\n | 'warn'\n\nexport type ConsoleEntry = {\n kind: 'console'\n method: LogMethod\n consoleMethodStack: string | null\n args: Array<\n | {\n kind: 'arg'\n data: T\n }\n | {\n kind: 'formatted-error-arg'\n prefix: string\n stack: string\n }\n >\n}\n\nexport type ConsoleErrorEntry = {\n kind: 'any-logged-error'\n method: 'error'\n consoleErrorStack: string\n args: Array<\n | {\n kind: 'arg'\n data: T\n isRejectionMessage?: boolean\n }\n | {\n kind: 'formatted-error-arg'\n prefix: string\n stack: string | null\n }\n >\n}\n\nexport type FormattedErrorEntry = {\n kind: 'formatted-error'\n prefix: string\n stack: string\n method: 'error'\n}\n\nexport type ClientLogEntry =\n | ConsoleEntry\n | ConsoleErrorEntry\n | FormattedErrorEntry\nexport type ServerLogEntry =\n | ConsoleEntry\n | ConsoleErrorEntry\n | FormattedErrorEntry\n\nexport const UNDEFINED_MARKER = '__next_tagged_undefined'\n\n// Based on https://github.com/facebook/react/blob/28dc0776be2e1370fe217549d32aee2519f0cf05/packages/react-server/src/ReactFlightServer.js#L248\nexport function patchConsoleMethod(\n methodName: T,\n wrapper: (\n methodName: T,\n ...args: Console[T] extends (...args: infer P) => any ? P : never[]\n ) => void\n): () => void {\n const descriptor = Object.getOwnPropertyDescriptor(console, methodName)\n if (\n descriptor &&\n (descriptor.configurable || descriptor.writable) &&\n typeof descriptor.value === 'function'\n ) {\n const originalMethod = descriptor.value as Console[T] extends (\n ...args: any[]\n ) => any\n ? Console[T]\n : never\n const originalName = Object.getOwnPropertyDescriptor(originalMethod, 'name')\n const wrapperMethod = function (\n this: typeof console,\n ...args: Console[T] extends (...args: infer P) => any ? P : never[]\n ) {\n wrapper(methodName, ...args)\n\n originalMethod.apply(this, args)\n }\n if (originalName) {\n Object.defineProperty(wrapperMethod, 'name', originalName)\n }\n Object.defineProperty(console, methodName, {\n value: wrapperMethod,\n })\n\n return () => {\n Object.defineProperty(console, methodName, {\n value: originalMethod,\n writable: descriptor.writable,\n configurable: descriptor.configurable,\n })\n }\n }\n\n return () => {}\n}\n"],"names":["UNDEFINED_MARKER","patchConsoleMethod","methodName","wrapper","descriptor","Object","getOwnPropertyDescriptor","console","configurable","writable","value","originalMethod","originalName","wrapperMethod","args","apply","defineProperty"],"mappings":";;;;;;;;;;;;;;IAkEaA,gBAAgB,EAAA;eAAhBA;;IAGGC,kBAAkB,EAAA;eAAlBA;;;AAHT,MAAMD,mBAAmB;AAGzB,SAASC,mBACdC,UAAa,EACbC,OAGS;IAET,MAAMC,aAAaC,OAAOC,wBAAwB,CAACC,SAASL;IAC5D,IACEE,cACCA,CAAAA,WAAWI,YAAY,IAAIJ,WAAWK,QAAO,KAC9C,OAAOL,WAAWM,KAAK,KAAK,YAC5B;QACA,MAAMC,iBAAiBP,WAAWM,KAAK;QAKvC,MAAME,eAAeP,OAAOC,wBAAwB,CAACK,gBAAgB;QACrE,MAAME,gBAAgB;YAEpB,IAAA,IAAA,OAAA,UAAA,MAAA,EAAGC,OAAH,IAAA,MAAA,OAAA,OAAA,GAAA,OAAA,MAAA,OAAA;gBAAGA,IAAAA,CAAH,KAAA,GAAA,SAAA,CAAA,KAAmE;;YAEnEX,QAAQD,eAAeY;YAEvBH,eAAeI,KAAK,CAAC,IAAI,EAAED;QAC7B;QACA,IAAIF,cAAc;YAChBP,OAAOW,cAAc,CAACH,eAAe,QAAQD;QAC/C;QACAP,OAAOW,cAAc,CAACT,SAASL,YAAY;YACzCQ,OAAOG;QACT;QAEA,OAAO;YACLR,OAAOW,cAAc,CAACT,SAASL,YAAY;gBACzCQ,OAAOC;gBACPF,UAAUL,WAAWK,QAAQ;gBAC7BD,cAAcJ,WAAWI,YAAY;YACvC;QACF;IACF;IAEA,OAAO,KAAO;AAChB","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1370, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/next-devtools/userspace/app/forward-logs.ts"],"sourcesContent":["import { configure } from 'next/dist/compiled/safe-stable-stringify'\nimport {\n getOwnerStack,\n setOwnerStackIfAvailable,\n} from './errors/stitched-error'\nimport { getErrorSource } from '../../../shared/lib/error-source'\nimport {\n getTerminalLoggingConfig,\n getIsTerminalLoggingEnabled,\n} from './terminal-logging-config'\nimport {\n type ConsoleEntry,\n type ConsoleErrorEntry,\n type FormattedErrorEntry,\n type ClientLogEntry,\n type LogMethod,\n patchConsoleMethod,\n UNDEFINED_MARKER,\n} from '../../shared/forward-logs-shared'\n\nconst terminalLoggingConfig = getTerminalLoggingConfig()\nexport const PROMISE_MARKER = 'Promise {}'\nexport const UNAVAILABLE_MARKER = '[Unable to view]'\n\nconst maximumDepth =\n typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.depthLimit\n ? terminalLoggingConfig.depthLimit\n : 5\nconst maximumBreadth =\n typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.edgeLimit\n ? terminalLoggingConfig.edgeLimit\n : 100\n\nconst stringify = configure({\n maximumDepth,\n maximumBreadth,\n})\n\nexport const isTerminalLoggingEnabled = getIsTerminalLoggingEnabled()\n\nconst methods: Array = [\n 'log',\n 'info',\n 'warn',\n 'debug',\n 'table',\n 'assert',\n 'dir',\n 'dirxml',\n 'group',\n 'groupCollapsed',\n 'groupEnd',\n 'trace',\n]\n/**\n * allows us to:\n * - revive the undefined log in the server as it would look in the browser\n * - not read/attempt to serialize promises (next will console error if you do that, and will cause this program to infinitely recurse)\n * - if we read a proxy that throws (no way to detect if something is a proxy), explain to the user we can't read this data\n */\nexport function preLogSerializationClone(\n value: T,\n seen = new WeakMap()\n): any {\n if (value === undefined) return UNDEFINED_MARKER\n if (value === null || typeof value !== 'object') return value\n if (seen.has(value as object)) return seen.get(value as object)\n\n try {\n Object.keys(value as object)\n } catch {\n return UNAVAILABLE_MARKER\n }\n\n try {\n if (typeof (value as any).then === 'function') return PROMISE_MARKER\n } catch {\n return UNAVAILABLE_MARKER\n }\n\n if (Array.isArray(value)) {\n const out: any[] = []\n seen.set(value, out)\n for (const item of value) {\n try {\n out.push(preLogSerializationClone(item, seen))\n } catch {\n out.push(UNAVAILABLE_MARKER)\n }\n }\n return out\n }\n\n const proto = Object.getPrototypeOf(value)\n if (proto === Object.prototype || proto === null) {\n const out: Record = {}\n seen.set(value as object, out)\n for (const key of Object.keys(value as object)) {\n try {\n out[key] = preLogSerializationClone((value as any)[key], seen)\n } catch {\n out[key] = UNAVAILABLE_MARKER\n }\n }\n return out\n }\n\n return Object.prototype.toString.call(value)\n}\n\n// only safe if passed safeClone data\nexport const logStringify = (data: unknown): string => {\n try {\n const result = stringify(data)\n return result ?? `\"${UNAVAILABLE_MARKER}\"`\n } catch {\n return `\"${UNAVAILABLE_MARKER}\"`\n }\n}\n\nconst afterThisFrame = (cb: () => void) => {\n let timeout: ReturnType | undefined\n\n const rafId = requestAnimationFrame(() => {\n timeout = setTimeout(() => {\n cb()\n })\n })\n\n return () => {\n cancelAnimationFrame(rafId)\n clearTimeout(timeout)\n }\n}\n\nlet isPatched = false\n\nconst serializeEntries = (entries: Array) =>\n entries.map((clientEntry) => {\n switch (clientEntry.kind) {\n case 'any-logged-error':\n case 'console': {\n return {\n ...clientEntry,\n args: clientEntry.args.map(stringifyUserArg),\n }\n }\n case 'formatted-error': {\n return clientEntry\n }\n default: {\n return null!\n }\n }\n })\n\nexport const logQueue: {\n entries: Array\n onSocketReady: (socket: WebSocket) => void\n flushScheduled: boolean\n socket: WebSocket | null\n cancelFlush: (() => void) | null\n sourceType?: 'server' | 'edge-server'\n router: 'app' | 'pages' | null\n scheduleLogSend: (entry: ClientLogEntry) => void\n} = {\n entries: [],\n flushScheduled: false,\n cancelFlush: null,\n socket: null,\n sourceType: undefined,\n router: null,\n scheduleLogSend: (entry: ClientLogEntry) => {\n logQueue.entries.push(entry)\n if (logQueue.flushScheduled) {\n return\n }\n // safe to deref and use in setTimeout closure since we cancel on new socket\n const socket = logQueue.socket\n if (!socket) {\n return\n }\n\n // we probably dont need this\n logQueue.flushScheduled = true\n\n // non blocking log flush, runs at most once per frame\n logQueue.cancelFlush = afterThisFrame(() => {\n logQueue.flushScheduled = false\n\n // just incase\n try {\n const payload = JSON.stringify({\n event: 'browser-logs',\n entries: serializeEntries(logQueue.entries),\n router: logQueue.router,\n // needed for source mapping, we just assign the sourceType from the last error for the whole batch\n sourceType: logQueue.sourceType,\n })\n\n socket.send(payload)\n logQueue.entries = []\n logQueue.sourceType = undefined\n } catch {\n // error (make sure u don't infinite loop)\n /* noop */\n }\n })\n },\n onSocketReady: (socket: WebSocket) => {\n if (socket.readyState !== WebSocket.OPEN) {\n // invariant\n return\n }\n\n // incase an existing timeout was going to run with a stale socket\n logQueue.cancelFlush?.()\n logQueue.socket = socket\n try {\n const payload = JSON.stringify({\n event: 'browser-logs',\n entries: serializeEntries(logQueue.entries),\n router: logQueue.router,\n sourceType: logQueue.sourceType,\n })\n\n socket.send(payload)\n logQueue.entries = []\n logQueue.sourceType = undefined\n } catch {\n /** noop just incase */\n }\n },\n}\n\nconst stringifyUserArg = (\n arg:\n | {\n kind: 'arg'\n data: unknown\n }\n | {\n kind: 'formatted-error-arg'\n }\n) => {\n if (arg.kind !== 'arg') {\n return arg\n }\n return {\n ...arg,\n data: logStringify(arg.data),\n }\n}\n\nconst createErrorArg = (error: Error) => {\n const stack = stackWithOwners(error)\n return {\n kind: 'formatted-error-arg' as const,\n prefix: error.message ? `${error.name}: ${error.message}` : `${error.name}`,\n stack,\n }\n}\n\nconst createLogEntry = (level: LogMethod, args: any[]) => {\n // do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers\n // error capture stack trace maybe\n const stack = stackWithOwners(new Error())\n const stackLines = stack?.split('\\n')\n const cleanStack = stackLines?.slice(3).join('\\n') // this is probably ignored anyways\n const entry: ConsoleEntry = {\n kind: 'console',\n consoleMethodStack: cleanStack ?? null, // depending on browser we might not have stack\n method: level,\n args: args.map((arg) => {\n if (arg instanceof Error) {\n return createErrorArg(arg)\n }\n return {\n kind: 'arg',\n data: preLogSerializationClone(arg),\n }\n }),\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nexport const forwardErrorLog = (args: any[]) => {\n const errorObjects = args.filter((arg) => arg instanceof Error)\n const first = errorObjects.at(0)\n if (first) {\n const source = getErrorSource(first)\n if (source) {\n logQueue.sourceType = source\n }\n }\n /**\n * browser shows stack regardless of type of data passed to console.error, so we should do the same\n *\n * do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers\n */\n const stack = stackWithOwners(new Error())\n const stackLines = stack?.split('\\n')\n const cleanStack = stackLines?.slice(3).join('\\n')\n\n const entry: ConsoleErrorEntry = {\n kind: 'any-logged-error',\n method: 'error',\n consoleErrorStack: cleanStack ?? '',\n args: args.map((arg) => {\n if (arg instanceof Error) {\n return createErrorArg(arg)\n }\n return {\n kind: 'arg',\n data: preLogSerializationClone(arg),\n }\n }),\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nconst createUncaughtErrorEntry = (\n errorName: string,\n errorMessage: string,\n fullStack: string\n) => {\n const entry: FormattedErrorEntry = {\n kind: 'formatted-error',\n prefix: `Uncaught ${errorName}: ${errorMessage}`,\n stack: fullStack,\n method: 'error',\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nconst stackWithOwners = (error: Error) => {\n let ownerStack = ''\n setOwnerStackIfAvailable(error)\n ownerStack = getOwnerStack(error) || ''\n const stack = (error.stack || '') + ownerStack\n return stack\n}\n\nexport function logUnhandledRejection(reason: unknown) {\n if (reason instanceof Error) {\n createUnhandledRejectionErrorEntry(reason, stackWithOwners(reason))\n return\n }\n createUnhandledRejectionNonErrorEntry(reason)\n}\n\nconst createUnhandledRejectionErrorEntry = (\n error: Error,\n fullStack: string\n) => {\n const source = getErrorSource(error)\n if (source) {\n logQueue.sourceType = source\n }\n\n const entry: ClientLogEntry = {\n kind: 'formatted-error',\n prefix: `⨯ unhandledRejection: ${error.name}: ${error.message}`,\n stack: fullStack,\n method: 'error',\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nconst createUnhandledRejectionNonErrorEntry = (reason: unknown) => {\n const entry: ClientLogEntry = {\n kind: 'any-logged-error',\n // we can't access the stack since the event is dispatched async and creating an inline error would be meaningless\n consoleErrorStack: '',\n method: 'error',\n args: [\n {\n kind: 'arg',\n data: `⨯ unhandledRejection:`,\n isRejectionMessage: true,\n },\n {\n kind: 'arg',\n data: preLogSerializationClone(reason),\n },\n ],\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nconst isHMR = (args: any[]) => {\n const firstArg = args[0]\n if (typeof firstArg !== 'string') {\n return false\n }\n if (firstArg.startsWith('[Fast Refresh]')) {\n return true\n }\n\n if (firstArg.startsWith('[HMR]')) {\n return true\n }\n\n return false\n}\n\nconst isIgnoredLog = (args: any[]) => {\n if (args.length < 3) {\n return false\n }\n\n const [format, styles, label] = args\n\n if (\n typeof format !== 'string' ||\n typeof styles !== 'string' ||\n typeof label !== 'string'\n ) {\n return false\n }\n\n // kinda hacky, we should define a common format for these strings so we can safely ignore\n return format.startsWith('%c%s%c') && styles.includes('background:')\n}\n\nexport function forwardUnhandledError(error: Error) {\n createUncaughtErrorEntry(error.name, error.message, stackWithOwners(error))\n}\n\n// TODO: this router check is brittle, we need to update based on the current router the user is using\nexport const initializeDebugLogForwarding = (router: 'app' | 'pages'): void => {\n // probably don't need this\n if (isPatched) {\n return\n }\n // TODO(rob): why does this break rendering on server, important to know incase the same bug appears in browser\n if (typeof window === 'undefined') {\n return\n }\n\n // better to be safe than sorry\n try {\n methods.forEach((method) =>\n patchConsoleMethod(method, (_, ...args) => {\n if (isHMR(args)) {\n return\n }\n if (isIgnoredLog(args)) {\n return\n }\n createLogEntry(method, args)\n })\n )\n } catch {}\n logQueue.router = router\n isPatched = true\n}\n"],"names":["PROMISE_MARKER","UNAVAILABLE_MARKER","forwardErrorLog","forwardUnhandledError","initializeDebugLogForwarding","isTerminalLoggingEnabled","logQueue","logStringify","logUnhandledRejection","preLogSerializationClone","terminalLoggingConfig","getTerminalLoggingConfig","maximumDepth","depthLimit","maximumBreadth","edgeLimit","stringify","configure","getIsTerminalLoggingEnabled","methods","value","seen","WeakMap","undefined","UNDEFINED_MARKER","has","get","Object","keys","then","Array","isArray","out","set","item","push","proto","getPrototypeOf","prototype","key","toString","call","data","result","afterThisFrame","cb","timeout","rafId","requestAnimationFrame","setTimeout","cancelAnimationFrame","clearTimeout","isPatched","serializeEntries","entries","map","clientEntry","kind","args","stringifyUserArg","flushScheduled","cancelFlush","socket","sourceType","router","scheduleLogSend","entry","payload","JSON","event","send","onSocketReady","readyState","WebSocket","OPEN","arg","createErrorArg","error","stack","stackWithOwners","prefix","message","name","createLogEntry","level","Error","stackLines","split","cleanStack","slice","join","consoleMethodStack","method","errorObjects","filter","first","at","source","getErrorSource","consoleErrorStack","createUncaughtErrorEntry","errorName","errorMessage","fullStack","ownerStack","setOwnerStackIfAvailable","getOwnerStack","reason","createUnhandledRejectionErrorEntry","createUnhandledRejectionNonErrorEntry","isRejectionMessage","isHMR","firstArg","startsWith","isIgnoredLog","length","format","styles","label","includes","window","forEach","patchConsoleMethod","_"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAqBaA,cAAc,EAAA;eAAdA;;IACAC,kBAAkB,EAAA;eAAlBA;;IAyQAC,eAAe,EAAA;eAAfA;;IA+IGC,qBAAqB,EAAA;eAArBA;;IAKHC,4BAA4B,EAAA;eAA5BA;;IA7YAC,wBAAwB,EAAA;eAAxB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,aAAa;QACjC;IACF;IAEA,+BAA+B;IAC/B,IAAI;QACFrG,QAAQsG,OAAO,CAAC,CAAC7B,SACf8B,CAAAA,GAAAA,mBAAAA,kBAAkB,EAAC9B,QAAQ,SAAC+B,CAAAA;iDAAMjE,OAAAA,IAAAA,MAAAA,OAAAA,IAAAA,OAAAA,IAAAA,IAAAA,OAAAA,GAAAA,OAAAA,MAAAA,OAAAA;oBAAAA,IAAAA,CAAAA,OAAAA,EAAAA,GAAAA,SAAAA,CAAAA,KAAAA;;gBAChC,IAAIqD,MAAMrD,OAAO;oBACf;gBACF;gBACA,IAAIwD,aAAaxD,OAAO;oBACtB;gBACF;gBACAyB,eAAeS,QAAQlC;YACzB;IAEJ,EAAE,OAAA,GAAM,CAAC;IACTpD,SAAS0D,MAAM,GAAGA;IAClBZ,YAAY;AACd","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1789, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/next-devtools/userspace/pages/pages-dev-overlay-setup.tsx"],"sourcesContent":["import React from 'react'\nimport { renderPagesDevOverlay } from 'next/dist/compiled/next-devtools'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport {\n attachHydrationErrorState,\n storeHydrationErrorStateFromConsoleArgs,\n} from './hydration-error-state'\nimport { Router } from '../../../client/router'\nimport { getOwnerStack } from '../app/errors/stitched-error'\nimport { isRecoverableError } from '../../../client/react-client-callbacks/on-recoverable-error'\nimport { getSquashedHydrationErrorDetails } from './hydration-error-state'\nimport { PagesDevOverlayErrorBoundary } from './pages-dev-overlay-error-boundary'\nimport {\n initializeDebugLogForwarding,\n forwardUnhandledError,\n logUnhandledRejection,\n forwardErrorLog,\n isTerminalLoggingEnabled,\n} from '../app/forward-logs'\n\nconst usePagesDevOverlayBridge = () => {\n React.useInsertionEffect(() => {\n // NDT uses a different React instance so it's not technically a state update\n // scheduled from useInsertionEffect.\n renderPagesDevOverlay(\n getOwnerStack,\n getSquashedHydrationErrorDetails,\n isRecoverableError\n )\n }, [])\n\n React.useEffect(() => {\n const { handleStaticIndicator } =\n require('../../../client/dev/hot-reloader/pages/hot-reloader-pages') as typeof import('../../../client/dev/hot-reloader/pages/hot-reloader-pages')\n\n Router.events.on('routeChangeComplete', handleStaticIndicator)\n\n return function () {\n Router.events.off('routeChangeComplete', handleStaticIndicator)\n }\n }, [])\n}\n\nexport type PagesDevOverlayBridgeType = typeof PagesDevOverlayBridge\n\ninterface PagesDevOverlayBridgeProps {\n children?: React.ReactNode\n}\n\nexport function PagesDevOverlayBridge({\n children,\n}: PagesDevOverlayBridgeProps) {\n usePagesDevOverlayBridge()\n\n return {children}\n}\n\nlet isRegistered = false\n\nfunction handleError(error: unknown) {\n if (!error || !(error instanceof Error) || typeof error.stack !== 'string') {\n // A non-error was thrown, we don't have anything to show. :-(\n return\n }\n\n attachHydrationErrorState(error)\n\n // Skip ModuleBuildError and ModuleNotFoundError, as it will be sent through onBuildError callback.\n // This is to avoid same error as different type showing up on client to cause flashing.\n if (\n error.name !== 'ModuleBuildError' &&\n error.name !== 'ModuleNotFoundError'\n ) {\n dispatcher.onUnhandledError(error)\n }\n}\n\nlet origConsoleError = console.error\nfunction nextJsHandleConsoleError(...args: any[]) {\n // See https://github.com/facebook/react/blob/d50323eb845c5fde0d720cae888bf35dedd05506/packages/react-reconciler/src/ReactFiberErrorLogger.js#L78\n const maybeError = process.env.NODE_ENV !== 'production' ? args[1] : args[0]\n storeHydrationErrorStateFromConsoleArgs(...args)\n // TODO: Surfaces non-errors logged via `console.error`.\n handleError(maybeError)\n if (isTerminalLoggingEnabled) {\n forwardErrorLog(args)\n }\n origConsoleError.apply(window.console, args)\n}\n\nfunction onUnhandledError(event: ErrorEvent) {\n const error = event?.error\n handleError(error)\n\n if (error && isTerminalLoggingEnabled) {\n forwardUnhandledError(error as Error)\n }\n}\n\nfunction onUnhandledRejection(ev: PromiseRejectionEvent) {\n const reason = ev?.reason\n if (\n !reason ||\n !(reason instanceof Error) ||\n typeof reason.stack !== 'string'\n ) {\n // A non-error was thrown, we don't have anything to show. :-(\n return\n }\n\n dispatcher.onUnhandledRejection(reason)\n if (isTerminalLoggingEnabled) {\n logUnhandledRejection(reason)\n }\n}\n\nexport function register() {\n if (isRegistered) {\n return\n }\n isRegistered = true\n\n try {\n Error.stackTraceLimit = 50\n } catch {}\n\n if (isTerminalLoggingEnabled) {\n initializeDebugLogForwarding('pages')\n }\n window.addEventListener('error', onUnhandledError)\n window.addEventListener('unhandledrejection', onUnhandledRejection)\n window.console.error = nextJsHandleConsoleError\n}\n"],"names":["PagesDevOverlayBridge","register","usePagesDevOverlayBridge","React","useInsertionEffect","renderPagesDevOverlay","getOwnerStack","getSquashedHydrationErrorDetails","isRecoverableError","useEffect","handleStaticIndicator","require","Router","events","on","off","children","PagesDevOverlayErrorBoundary","isRegistered","handleError","error","Error","stack","attachHydrationErrorState","name","dispatcher","onUnhandledError","origConsoleError","console","nextJsHandleConsoleError","args","maybeError","process","env","NODE_ENV","storeHydrationErrorStateFromConsoleArgs","isTerminalLoggingEnabled","forwardErrorLog","apply","window","event","forwardUnhandledError","onUnhandledRejection","ev","reason","logUnhandledRejection","stackTraceLimit","initializeDebugLogForwarding","addEventListener"],"mappings":"AAgFqBgC,QAAQC,GAAG,CAACC,QAAQ,KAAK;;;;;;;;;;;;;;;;IA/B9BlC,qBAAqB,EAAA;eAArBA;;IAmEAC,QAAQ,EAAA;eAARA;;;;;gEApHE;8BACoB;qCAK/B;wBACgB;+BACO;oCACK;8CAEU;6BAOtC;AAEP,MAAMC,2BAA2B;IAC/BC,OAAAA,OAAK,CAACC,kBAAkB;uDAAC;YACvB,6EAA6E;YAC7E,qCAAqC;YACrCC,CAAAA,GAAAA,cAAAA,qBAAqB,EACnBC,eAAAA,aAAa,EACbC,qBAAAA,gCAAgC,EAChCC,oBAAAA,kBAAkB;QAEtB;sDAAG,EAAE;IAELL,OAAAA,OAAK,CAACM,SAAS;8CAAC;YACd,MAAM,EAA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iBAAiBc,KAAiB;IACzC,MAAMpB,QAAQoB,SAAAA,OAAAA,KAAAA,IAAAA,MAAOpB,KAAK;IAC1BD,YAAYC;IAEZ,IAAIA,SAASgB,aAAAA,wBAAwB,EAAE;QACrCK,CAAAA,GAAAA,aAAAA,qBAAqB,EAACrB;IACxB;AACF;AAEA,SAASsB,qBAAqBC,EAAyB;IACrD,MAAMC,SAASD,MAAAA,OAAAA,KAAAA,IAAAA,GAAIC,MAAM;IACzB,IACE,CAACA,UACD,CAAEA,CAAAA,kBAAkBvB,KAAI,KACxB,OAAOuB,OAAOtB,KAAK,KAAK,UACxB;QACA,8DAA8D;QAC9D;IACF;IAEAG,cAAAA,UAAU,CAACiB,oBAAoB,CAACE;IAChC,IAAIR,aAAAA,wBAAwB,EAAE;QAC5BS,CAAAA,GAAAA,aAAAA,qBAAqB,EAACD;IACxB;AACF;AAEO,SAAS3C;IACd,IAAIiB,cAAc;QAChB;IACF;IACAA,eAAe;IAEf,IAAI;QACFG,MAAMyB,eAAe,GAAG;IAC1B,EAAE,OAAA,GAAM,CAAC;IAET,IAAIV,aAAAA,wBAAwB,EAAE;QAC5BW,CAAAA,GAAAA,aAAAA,4BAA4B,EAAC;IAC/B;IACAR,OAAOS,gBAAgB,CAAC,SAAStB;IACjCa,OAAOS,gBAAgB,CAAC,sBAAsBN;IAC9CH,OAAOX,OAAO,CAACR,KAAK,GAAGS;AACzB","ignoreList":[0],"debugId":null}}, - {"offset": {"line": 1921, "column": 0}, "map": {"version":3,"sources":["file:///Users/exogen/Projects/t2-mapper/node_modules/next/src/pages/_app.tsx"],"sourcesContent":["import React from 'react'\n\nimport type {\n AppContextType,\n AppInitialProps,\n AppPropsType,\n NextWebVitalsMetric,\n AppType,\n} from '../shared/lib/utils'\nimport type { Router } from '../client/router'\n\nimport { loadGetInitialProps } from '../shared/lib/utils'\n\nexport type { AppInitialProps, AppType }\n\nexport type { NextWebVitalsMetric }\n\nexport type AppContext = AppContextType\n\nexport type AppProps

= AppPropsType\n\n/**\n * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.\n * This allows for keeping state between navigation, custom error handling, injecting additional data.\n */\nasync function appGetInitialProps({\n Component,\n ctx,\n}: AppContext): Promise {\n const pageProps = await loadGetInitialProps(Component, ctx)\n return { pageProps }\n}\n\nexport default class App

extends React.Component<\n P & AppProps,\n S\n> {\n static origGetInitialProps = appGetInitialProps\n static getInitialProps = appGetInitialProps\n\n render() {\n const { Component, pageProps } = this.props as AppProps\n\n return \n }\n}\n"],"names":["App","appGetInitialProps","Component","ctx","pageProps","loadGetInitialProps","React","render","props","origGetInitialProps","getInitialProps"],"mappings":";;;;;;eAiCqBA;;;;;gEAjCH;uBAWkB;AAUpC;;;CAGC,GACD,eAAeC,mBAAmB,KAGrB;IAHqB,IAAA,EAChCC,SAAS,EACTC,GAAG,EACQ,GAHqB;IAIhC,MAAMC,YAAY,MAAMC,CAAAA,GAAAA,OAAAA,mBAAmB,EAACH,WAAWC;IACvD,OAAO;QAAEC;IAAU;AACrB;AAEe,MAAMJ,YAAsCM,OAAAA,OAAK,CAACJ,SAAS;IAOxEK,SAAS;QACP,MAAM,EAAEL,SAAS,EAAEE,SAAS,EAAE,GAAG,IAAI,CAACI,KAAK;QAE3C,OAAA,WAAA,GAAO,CAAA,GAAA,YAAA,GAAA,EAACN,WAAAA;YAAW,GAAGE,SAAS;;IACjC;AACF;AAZqBJ,IAIZS,mBAAAA,GAAsBR;AAJVD,IAKZU,eAAAA,GAAkBT","ignoreList":[0],"debugId":null}}] -} \ No newline at end of file diff --git a/docs/_next/static/chunks/node_modules_next_dist_client_d0aa886c._.js b/docs/_next/static/chunks/node_modules_next_dist_client_d0aa886c._.js deleted file mode 100644 index 1b1577b7..00000000 --- a/docs/_next/static/chunks/node_modules_next_dist_client_d0aa886c._.js +++ /dev/null @@ -1,4038 +0,0 @@ -(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/node_modules/next/dist/client/portal/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "Portal", { - enumerable: true, - get: function() { - return Portal; - } -}); -const _react = __turbopack_context__.r("[project]/node_modules/react/index.js [client] (ecmascript)"); -const _reactdom = __turbopack_context__.r("[project]/node_modules/react-dom/index.js [client] (ecmascript)"); -const Portal = (param)=>{ - let { children, type } = param; - const [portalNode, setPortalNode] = (0, _react.useState)(null); - (0, _react.useEffect)(()=>{ - const element = document.createElement(type); - document.body.appendChild(element); - setPortalNode(element); - return ()=>{ - document.body.removeChild(element); - }; - }, [ - type - ]); - return portalNode ? /*#__PURE__*/ (0, _reactdom.createPortal)(children, portalNode) : null; -}; -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=index.js.map -}), -"[project]/node_modules/next/dist/client/set-attributes-from-props.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "setAttributesFromProps", { - enumerable: true, - get: function() { - return setAttributesFromProps; - } -}); -const DOMAttributeNames = { - acceptCharset: 'accept-charset', - className: 'class', - htmlFor: 'for', - httpEquiv: 'http-equiv', - noModule: 'noModule' -}; -const ignoreProps = [ - 'onLoad', - 'onReady', - 'dangerouslySetInnerHTML', - 'children', - 'onError', - 'strategy', - 'stylesheets' -]; -function isBooleanScriptAttribute(attr) { - return [ - 'async', - 'defer', - 'noModule' - ].includes(attr); -} -function setAttributesFromProps(el, props) { - for (const [p, value] of Object.entries(props)){ - if (!props.hasOwnProperty(p)) continue; - if (ignoreProps.includes(p)) continue; - // we don't render undefined props to the DOM - if (value === undefined) { - continue; - } - const attr = DOMAttributeNames[p] || p.toLowerCase(); - if (el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr)) { - // Correctly assign boolean script attributes - // https://github.com/vercel/next.js/pull/20748 - ; - el[attr] = !!value; - } else { - el.setAttribute(attr, String(value)); - } - // Remove falsy non-zero boolean attributes so they are correctly interpreted - // (e.g. if we set them to false, this coerces to the string "false", which the browser interprets as true) - if (value === false || el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr) && (!value || value === 'false')) { - // Call setAttribute before, as we need to set and unset the attribute to override force async: - // https://html.spec.whatwg.org/multipage/scripting.html#script-force-async - el.setAttribute(attr, ''); - el.removeAttribute(attr); - } - } -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=set-attributes-from-props.js.map -}), -"[project]/node_modules/next/dist/client/head-manager.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - default: null, - isEqualNode: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - default: function() { - return initHeadManager; - }, - isEqualNode: function() { - return isEqualNode; - } -}); -const _setattributesfromprops = __turbopack_context__.r("[project]/node_modules/next/dist/client/set-attributes-from-props.js [client] (ecmascript)"); -function reactElementToDOM(param) { - let { type, props } = param; - const el = document.createElement(type); - (0, _setattributesfromprops.setAttributesFromProps)(el, props); - const { children, dangerouslySetInnerHTML } = props; - if (dangerouslySetInnerHTML) { - el.innerHTML = dangerouslySetInnerHTML.__html || ''; - } else if (children) { - el.textContent = typeof children === 'string' ? children : Array.isArray(children) ? children.join('') : ''; - } - return el; -} -function isEqualNode(oldTag, newTag) { - if (oldTag instanceof HTMLElement && newTag instanceof HTMLElement) { - const nonce = newTag.getAttribute('nonce'); - // Only strip the nonce if `oldTag` has had it stripped. An element's nonce attribute will not - // be stripped if there is no content security policy response header that includes a nonce. - if (nonce && !oldTag.getAttribute('nonce')) { - const cloneTag = newTag.cloneNode(true); - cloneTag.setAttribute('nonce', ''); - cloneTag.nonce = nonce; - return nonce === oldTag.nonce && oldTag.isEqualNode(cloneTag); - } - } - return oldTag.isEqualNode(newTag); -} -function updateElements(type, components) { - const headEl = document.querySelector('head'); - if (!headEl) return; - const oldTags = new Set(headEl.querySelectorAll("" + type + "[data-next-head]")); - if (type === 'meta') { - const metaCharset = headEl.querySelector('meta[charset]'); - if (metaCharset !== null) { - oldTags.add(metaCharset); - } - } - const newTags = []; - for(let i = 0; i < components.length; i++){ - const component = components[i]; - const newTag = reactElementToDOM(component); - newTag.setAttribute('data-next-head', ''); - let isNew = true; - for (const oldTag of oldTags){ - if (isEqualNode(oldTag, newTag)) { - oldTags.delete(oldTag); - isNew = false; - break; - } - } - if (isNew) { - newTags.push(newTag); - } - } - for (const oldTag of oldTags){ - var _oldTag_parentNode; - (_oldTag_parentNode = oldTag.parentNode) == null ? void 0 : _oldTag_parentNode.removeChild(oldTag); - } - for (const newTag of newTags){ - // meta[charset] must be first element so special case - if (newTag.tagName.toLowerCase() === 'meta' && newTag.getAttribute('charset') !== null) { - headEl.prepend(newTag); - } - headEl.appendChild(newTag); - } -} -function initHeadManager() { - return { - mountedInstances: new Set(), - updateHead: (head)=>{ - const tags = {}; - head.forEach((h)=>{ - if (// it won't be inlined. In this case revert to the original behavior - h.type === 'link' && h.props['data-optimized-fonts']) { - if (document.querySelector('style[data-href="' + h.props['data-href'] + '"]')) { - return; - } else { - h.props.href = h.props['data-href']; - h.props['data-href'] = undefined; - } - } - const components = tags[h.type] || []; - components.push(h); - tags[h.type] = components; - }); - const titleComponent = tags.title ? tags.title[0] : null; - let title = ''; - if (titleComponent) { - const { children } = titleComponent.props; - title = typeof children === 'string' ? children : Array.isArray(children) ? children.join('') : ''; - } - if (title !== document.title) document.title = title; - [ - 'meta', - 'base', - 'link', - 'style', - 'script' - ].forEach((type)=>{ - updateElements(type, tags[type] || []); - }); - } - }; -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=head-manager.js.map -}), -"[project]/node_modules/next/dist/client/normalize-trailing-slash.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "normalizePathTrailingSlash", { - enumerable: true, - get: function() { - return normalizePathTrailingSlash; - } -}); -const _removetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js [client] (ecmascript)"); -const _parsepath = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/parse-path.js [client] (ecmascript)"); -const normalizePathTrailingSlash = (path)=>{ - if (!path.startsWith('/') || ("TURBOPACK compile-time value", void 0)) { - return path; - } - const { pathname, query, hash } = (0, _parsepath.parsePath)(path); - if ("TURBOPACK compile-time truthy", 1) { - if (/\.[^/]+\/?$/.test(pathname)) { - return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash; - } else if (pathname.endsWith('/')) { - return "" + pathname + query + hash; - } else { - return pathname + "/" + query + hash; - } - } - //TURBOPACK unreachable - ; -}; -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=normalize-trailing-slash.js.map -}), -"[project]/node_modules/next/dist/client/add-base-path.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "addBasePath", { - enumerable: true, - get: function() { - return addBasePath; - } -}); -const _addpathprefix = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js [client] (ecmascript)"); -const _normalizetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/client/normalize-trailing-slash.js [client] (ecmascript)"); -const basePath = ("TURBOPACK compile-time value", "/t2-mapper") || ''; -function addBasePath(path, required) { - return (0, _normalizetrailingslash.normalizePathTrailingSlash)(("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : (0, _addpathprefix.addPathPrefix)(path, basePath)); -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=add-base-path.js.map -}), -"[project]/node_modules/next/dist/client/add-locale.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "addLocale", { - enumerable: true, - get: function() { - return addLocale; - } -}); -const _normalizetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/client/normalize-trailing-slash.js [client] (ecmascript)"); -const addLocale = function(path) { - for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ - args[_key - 1] = arguments[_key]; - } - if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable - ; - return path; -}; -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=add-locale.js.map -}), -"[project]/node_modules/next/dist/client/trusted-types.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -/** - * Stores the Trusted Types Policy. Starts as undefined and can be set to null - * if Trusted Types is not supported in the browser. - */ Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "__unsafeCreateTrustedScriptURL", { - enumerable: true, - get: function() { - return __unsafeCreateTrustedScriptURL; - } -}); -let policy; -/** - * Getter for the Trusted Types Policy. If it is undefined, it is instantiated - * here or set to null if Trusted Types is not supported in the browser. - */ function getPolicy() { - if (typeof policy === 'undefined' && typeof window !== 'undefined') { - var _window_trustedTypes; - policy = ((_window_trustedTypes = window.trustedTypes) == null ? void 0 : _window_trustedTypes.createPolicy('nextjs', { - createHTML: (input)=>input, - createScript: (input)=>input, - createScriptURL: (input)=>input - })) || null; - } - return policy; -} -function __unsafeCreateTrustedScriptURL(url) { - var _getPolicy; - return ((_getPolicy = getPolicy()) == null ? void 0 : _getPolicy.createScriptURL(url)) || url; -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=trusted-types.js.map -}), -"[project]/node_modules/next/dist/client/request-idle-callback.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - cancelIdleCallback: null, - requestIdleCallback: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - cancelIdleCallback: function() { - return cancelIdleCallback; - }, - requestIdleCallback: function() { - return requestIdleCallback; - } -}); -const requestIdleCallback = typeof self !== 'undefined' && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) { - let start = Date.now(); - return self.setTimeout(function() { - cb({ - didTimeout: false, - timeRemaining: function() { - return Math.max(0, 50 - (Date.now() - start)); - } - }); - }, 1); -}; -const cancelIdleCallback = typeof self !== 'undefined' && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) { - return clearTimeout(id); -}; -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=request-idle-callback.js.map -}), -"[project]/node_modules/next/dist/client/route-loader.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - createRouteLoader: null, - getClientBuildManifest: null, - isAssetError: null, - markAssetError: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - createRouteLoader: function() { - return createRouteLoader; - }, - getClientBuildManifest: function() { - return getClientBuildManifest; - }, - isAssetError: function() { - return isAssetError; - }, - markAssetError: function() { - return markAssetError; - } -}); -const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); -const _getassetpathfromroute = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js [client] (ecmascript)")); -const _trustedtypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/trusted-types.js [client] (ecmascript)"); -const _requestidlecallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/request-idle-callback.js [client] (ecmascript)"); -const _deploymentid = __turbopack_context__.r("[project]/node_modules/next/dist/build/deployment-id.js [client] (ecmascript)"); -const _encodeuripath = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/encode-uri-path.js [client] (ecmascript)"); -// 3.8s was arbitrarily chosen as it's what https://web.dev/interactive -// considers as "Good" time-to-interactive. We must assume something went -// wrong beyond this point, and then fall-back to a full page transition to -// show the user something of value. -const MS_MAX_IDLE_DELAY = 3800; -function withFuture(key, map, generator) { - let entry = map.get(key); - if (entry) { - if ('future' in entry) { - return entry.future; - } - return Promise.resolve(entry); - } - let resolver; - const prom = new Promise((resolve)=>{ - resolver = resolve; - }); - map.set(key, { - resolve: resolver, - future: prom - }); - return generator ? generator().then((value)=>{ - resolver(value); - return value; - }).catch((err)=>{ - map.delete(key); - throw err; - }) : prom; -} -const ASSET_LOAD_ERROR = Symbol('ASSET_LOAD_ERROR'); -function markAssetError(err) { - return Object.defineProperty(err, ASSET_LOAD_ERROR, {}); -} -function isAssetError(err) { - return err && ASSET_LOAD_ERROR in err; -} -function hasPrefetch(link) { - try { - link = document.createElement('link'); - return(// with relList.support - !!window.MSInputMethodContext && !!document.documentMode || link.relList.supports('prefetch')); - } catch (e) { - return false; - } -} -const canPrefetch = hasPrefetch(); -const getAssetQueryString = ()=>{ - return (0, _deploymentid.getDeploymentIdQueryOrEmptyString)(); -}; -function prefetchViaDom(href, as, link) { - return new Promise((resolve, reject)=>{ - const selector = '\n link[rel="prefetch"][href^="' + href + '"],\n link[rel="preload"][href^="' + href + '"],\n script[src^="' + href + '"]'; - if (document.querySelector(selector)) { - return resolve(); - } - link = document.createElement('link'); - // The order of property assignment here is intentional: - if (as) link.as = as; - link.rel = "prefetch"; - link.crossOrigin = ("TURBOPACK compile-time value", void 0); - link.onload = resolve; - link.onerror = ()=>reject(markAssetError(Object.defineProperty(new Error("Failed to prefetch: " + href), "__NEXT_ERROR_CODE", { - value: "E268", - enumerable: false, - configurable: true - }))); - // `href` should always be last: - link.href = href; - document.head.appendChild(link); - }); -} -function appendScript(src, script) { - return new Promise((resolve, reject)=>{ - script = document.createElement('script'); - // The order of property assignment here is intentional. - // 1. Setup success/failure hooks in case the browser synchronously - // executes when `src` is set. - script.onload = resolve; - script.onerror = ()=>reject(markAssetError(Object.defineProperty(new Error("Failed to load script: " + src), "__NEXT_ERROR_CODE", { - value: "E74", - enumerable: false, - configurable: true - }))); - // 2. Configure the cross-origin attribute before setting `src` in case the - // browser begins to fetch. - script.crossOrigin = ("TURBOPACK compile-time value", void 0); - // 3. Finally, set the source and inject into the DOM in case the child - // must be appended for fetching to start. - script.src = src; - document.body.appendChild(script); - }); -} -// We wait for pages to be built in dev before we start the route transition -// timeout to prevent an un-necessary hard navigation in development. -let devBuildPromise; -// Resolve a promise that times out after given amount of milliseconds. -function resolvePromiseWithTimeout(p, ms, err) { - return new Promise((resolve, reject)=>{ - let cancelled = false; - p.then((r)=>{ - // Resolved, cancel the timeout - cancelled = true; - resolve(r); - }).catch(reject); - // We wrap these checks separately for better dead-code elimination in - // production bundles. - if ("TURBOPACK compile-time truthy", 1) { - ; - (devBuildPromise || Promise.resolve()).then(()=>{ - (0, _requestidlecallback.requestIdleCallback)(()=>setTimeout(()=>{ - if (!cancelled) { - reject(err); - } - }, ms)); - }); - } - if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable - ; - }); -} -function getClientBuildManifest() { - if (self.__BUILD_MANIFEST) { - return Promise.resolve(self.__BUILD_MANIFEST); - } - const onBuildManifest = new Promise((resolve)=>{ - // Mandatory because this is not concurrent safe: - const cb = self.__BUILD_MANIFEST_CB; - self.__BUILD_MANIFEST_CB = ()=>{ - resolve(self.__BUILD_MANIFEST); - cb && cb(); - }; - }); - return resolvePromiseWithTimeout(onBuildManifest, MS_MAX_IDLE_DELAY, markAssetError(Object.defineProperty(new Error('Failed to load client build manifest'), "__NEXT_ERROR_CODE", { - value: "E273", - enumerable: false, - configurable: true - }))); -} -function getFilesForRoute(assetPrefix, route) { - if ("TURBOPACK compile-time truthy", 1) { - const scriptUrl = assetPrefix + '/_next/static/chunks/pages' + (0, _encodeuripath.encodeURIPath)((0, _getassetpathfromroute.default)(route, '.js')) + getAssetQueryString(); - return Promise.resolve({ - scripts: [ - (0, _trustedtypes.__unsafeCreateTrustedScriptURL)(scriptUrl) - ], - // Styles are handled by `style-loader` in development: - css: [] - }); - } - //TURBOPACK unreachable - ; -} -function createRouteLoader(assetPrefix) { - const entrypoints = new Map(); - const loadedScripts = new Map(); - const styleSheets = new Map(); - const routes = new Map(); - function maybeExecuteScript(src) { - // With HMR we might need to "reload" scripts when they are - // disposed and readded. Executing scripts twice has no functional - // differences - if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable - ; - else { - return appendScript(src); - } - } - function fetchStyleSheet(href) { - let prom = styleSheets.get(href); - if (prom) { - return prom; - } - styleSheets.set(href, prom = fetch(href, { - credentials: 'same-origin' - }).then((res)=>{ - if (!res.ok) { - throw Object.defineProperty(new Error("Failed to load stylesheet: " + href), "__NEXT_ERROR_CODE", { - value: "E189", - enumerable: false, - configurable: true - }); - } - return res.text().then((text)=>({ - href: href, - content: text - })); - }).catch((err)=>{ - throw markAssetError(err); - })); - return prom; - } - return { - whenEntrypoint (route) { - return withFuture(route, entrypoints); - }, - onEntrypoint (route, execute) { - ; - (execute ? Promise.resolve().then(()=>execute()).then((exports1)=>({ - component: exports1 && exports1.default || exports1, - exports: exports1 - }), (err)=>({ - error: err - })) : Promise.resolve(undefined)).then((input)=>{ - const old = entrypoints.get(route); - if (old && 'resolve' in old) { - if (input) { - entrypoints.set(route, input); - old.resolve(input); - } - } else { - if (input) { - entrypoints.set(route, input); - } else { - entrypoints.delete(route); - } - // when this entrypoint has been resolved before - // the route is outdated and we want to invalidate - // this cache entry - routes.delete(route); - } - }); - }, - loadRoute (route, prefetch) { - return withFuture(route, routes, ()=>{ - let devBuildPromiseResolve; - if ("TURBOPACK compile-time truthy", 1) { - devBuildPromise = new Promise((resolve)=>{ - devBuildPromiseResolve = resolve; - }); - } - return resolvePromiseWithTimeout(getFilesForRoute(assetPrefix, route).then((param)=>{ - let { scripts, css } = param; - return Promise.all([ - entrypoints.has(route) ? [] : Promise.all(scripts.map(maybeExecuteScript)), - Promise.all(css.map(fetchStyleSheet)) - ]); - }).then((res)=>{ - return this.whenEntrypoint(route).then((entrypoint)=>({ - entrypoint, - styles: res[1] - })); - }), MS_MAX_IDLE_DELAY, markAssetError(Object.defineProperty(new Error("Route did not complete loading: " + route), "__NEXT_ERROR_CODE", { - value: "E12", - enumerable: false, - configurable: true - }))).then((param)=>{ - let { entrypoint, styles } = param; - const res = Object.assign({ - styles: styles - }, entrypoint); - return 'error' in entrypoint ? entrypoint : res; - }).catch((err)=>{ - if (prefetch) { - // we don't want to cache errors during prefetch - throw err; - } - return { - error: err - }; - }).finally(()=>devBuildPromiseResolve == null ? void 0 : devBuildPromiseResolve()); - }); - }, - prefetch (route) { - // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118 - // License: Apache 2.0 - let cn; - if (cn = navigator.connection) { - // Don't prefetch if using 2G or if Save-Data is enabled. - if (cn.saveData || /2g/.test(cn.effectiveType)) return Promise.resolve(); - } - return getFilesForRoute(assetPrefix, route).then((output)=>Promise.all(canPrefetch ? output.scripts.map((script)=>prefetchViaDom(script.toString(), 'script')) : [])).then(()=>{ - (0, _requestidlecallback.requestIdleCallback)(()=>this.loadRoute(route, true).catch(()=>{})); - }).catch(()=>{}); - } - }; -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=route-loader.js.map -}), -"[project]/node_modules/next/dist/client/page-loader.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "default", { - enumerable: true, - get: function() { - return PageLoader; - } -}); -const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); -const _addbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/add-base-path.js [client] (ecmascript)"); -const _interpolateas = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js [client] (ecmascript)"); -const _getassetpathfromroute = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js [client] (ecmascript)")); -const _addlocale = __turbopack_context__.r("[project]/node_modules/next/dist/client/add-locale.js [client] (ecmascript)"); -const _isdynamic = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js [client] (ecmascript)"); -const _parserelativeurl = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js [client] (ecmascript)"); -const _removetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js [client] (ecmascript)"); -const _routeloader = __turbopack_context__.r("[project]/node_modules/next/dist/client/route-loader.js [client] (ecmascript)"); -const _constants = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/constants.js [client] (ecmascript)"); -class PageLoader { - getPageList() { - if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable - ; - else { - if (window.__DEV_PAGES_MANIFEST) { - return window.__DEV_PAGES_MANIFEST.pages; - } else { - this.promisedDevPagesManifest || (this.promisedDevPagesManifest = fetch(this.assetPrefix + "/_next/static/development/" + _constants.DEV_CLIENT_PAGES_MANIFEST, { - credentials: 'same-origin' - }).then((res)=>res.json()).then((manifest)=>{ - window.__DEV_PAGES_MANIFEST = manifest; - return manifest.pages; - }).catch((err)=>{ - console.log("Failed to fetch devPagesManifest:", err); - throw Object.defineProperty(new Error("Failed to fetch _devPagesManifest.json. Is something blocking that network request?\n" + 'Read more: https://nextjs.org/docs/messages/failed-to-fetch-devpagesmanifest'), "__NEXT_ERROR_CODE", { - value: "E423", - enumerable: false, - configurable: true - }); - })); - return this.promisedDevPagesManifest; - } - } - } - getMiddleware() { - // Webpack production - if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable - ; - else if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable - ; - else { - if (window.__DEV_MIDDLEWARE_MATCHERS) { - return window.__DEV_MIDDLEWARE_MATCHERS; - } else { - if (!this.promisedMiddlewareMatchers) { - // TODO: Decide what should happen when fetching fails instead of asserting - // @ts-ignore - this.promisedMiddlewareMatchers = fetch(this.assetPrefix + "/_next/static/" + this.buildId + "/" + _constants.DEV_CLIENT_MIDDLEWARE_MANIFEST, { - credentials: 'same-origin' - }).then((res)=>res.json()).then((matchers)=>{ - window.__DEV_MIDDLEWARE_MATCHERS = matchers; - return matchers; - }).catch((err)=>{ - console.log("Failed to fetch _devMiddlewareManifest", err); - }); - } - // TODO Remove this assertion as this could be undefined - return this.promisedMiddlewareMatchers; - } - } - } - getDataHref(params) { - const { asPath, href, locale } = params; - const { pathname: hrefPathname, query, search } = (0, _parserelativeurl.parseRelativeUrl)(href); - const { pathname: asPathname } = (0, _parserelativeurl.parseRelativeUrl)(asPath); - const route = (0, _removetrailingslash.removeTrailingSlash)(hrefPathname); - if (route[0] !== '/') { - throw Object.defineProperty(new Error('Route name should start with a "/", got "' + route + '"'), "__NEXT_ERROR_CODE", { - value: "E303", - enumerable: false, - configurable: true - }); - } - const getHrefForSlug = (path)=>{ - const dataRoute = (0, _getassetpathfromroute.default)((0, _removetrailingslash.removeTrailingSlash)((0, _addlocale.addLocale)(path, locale)), '.json'); - return (0, _addbasepath.addBasePath)("/_next/data/" + this.buildId + dataRoute + search, true); - }; - return getHrefForSlug(params.skipInterpolation ? asPathname : (0, _isdynamic.isDynamicRoute)(route) ? (0, _interpolateas.interpolateAs)(hrefPathname, asPathname, query).result : route); - } - _isSsg(/** the route (file-system path) */ route) { - return this.promisedSsgManifest.then((manifest)=>manifest.has(route)); - } - loadPage(route) { - return this.routeLoader.loadRoute(route).then((res)=>{ - if ('component' in res) { - return { - page: res.component, - mod: res.exports, - styleSheets: res.styles.map((o)=>({ - href: o.href, - text: o.content - })) - }; - } - throw res.error; - }); - } - prefetch(route) { - return this.routeLoader.prefetch(route); - } - constructor(buildId, assetPrefix){ - this.routeLoader = (0, _routeloader.createRouteLoader)(assetPrefix); - this.buildId = buildId; - this.assetPrefix = assetPrefix; - this.promisedSsgManifest = new Promise((resolve)=>{ - if (window.__SSG_MANIFEST) { - resolve(window.__SSG_MANIFEST); - } else { - window.__SSG_MANIFEST_CB = ()=>{ - resolve(window.__SSG_MANIFEST); - }; - } - }); - } -} -if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { - Object.defineProperty(exports.default, '__esModule', { - value: true - }); - Object.assign(exports.default, exports); - module.exports = exports.default; -} //# sourceMappingURL=page-loader.js.map -}), -"[project]/node_modules/next/dist/client/script.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -0 && (module.exports = { - default: null, - handleClientScriptLoad: null, - initScriptLoader: null -}); -function _export(target, all) { - for(var name in all)Object.defineProperty(target, name, { - enumerable: true, - get: all[name] - }); -} -_export(exports, { - default: function() { - return _default; - }, - handleClientScriptLoad: function() { - return handleClientScriptLoad; - }, - initScriptLoader: function() { - return initScriptLoader; - } -}); -const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); -const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [client] (ecmascript)"); -const _jsxruntime = __turbopack_context__.r("[project]/node_modules/react/jsx-runtime.js [client] (ecmascript)"); -const _reactdom = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/react-dom/index.js [client] (ecmascript)")); -const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/react/index.js [client] (ecmascript)")); -const _headmanagercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js [client] (ecmascript)"); -const _setattributesfromprops = __turbopack_context__.r("[project]/node_modules/next/dist/client/set-attributes-from-props.js [client] (ecmascript)"); -const _requestidlecallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/request-idle-callback.js [client] (ecmascript)"); -const ScriptCache = new Map(); -const LoadCache = new Set(); -const insertStylesheets = (stylesheets)=>{ - // Case 1: Styles for afterInteractive/lazyOnload with appDir injected via handleClientScriptLoad - // - // Using ReactDOM.preinit to feature detect appDir and inject styles - // Stylesheets might have already been loaded if initialized with Script component - // Re-inject styles here to handle scripts loaded via handleClientScriptLoad - // ReactDOM.preinit handles dedup and ensures the styles are loaded only once - if (_reactdom.default.preinit) { - stylesheets.forEach((stylesheet)=>{ - _reactdom.default.preinit(stylesheet, { - as: 'style' - }); - }); - return; - } - // Case 2: Styles for afterInteractive/lazyOnload with pages injected via handleClientScriptLoad - // - // We use this function to load styles when appdir is not detected - // TODO: Use React float APIs to load styles once available for pages dir - if (typeof window !== 'undefined') { - let head = document.head; - stylesheets.forEach((stylesheet)=>{ - let link = document.createElement('link'); - link.type = 'text/css'; - link.rel = 'stylesheet'; - link.href = stylesheet; - head.appendChild(link); - }); - } -}; -const loadScript = (props)=>{ - const { src, id, onLoad = ()=>{}, onReady = null, dangerouslySetInnerHTML, children = '', strategy = 'afterInteractive', onError, stylesheets } = props; - const cacheKey = id || src; - // Script has already loaded - if (cacheKey && LoadCache.has(cacheKey)) { - return; - } - // Contents of this script are already loading/loaded - if (ScriptCache.has(src)) { - LoadCache.add(cacheKey); - // It is possible that multiple `next/script` components all have same "src", but has different "onLoad" - // This is to make sure the same remote script will only load once, but "onLoad" are executed in order - ScriptCache.get(src).then(onLoad, onError); - return; - } - /** Execute after the script first loaded */ const afterLoad = ()=>{ - // Run onReady for the first time after load event - if (onReady) { - onReady(); - } - // add cacheKey to LoadCache when load successfully - LoadCache.add(cacheKey); - }; - const el = document.createElement('script'); - const loadPromise = new Promise((resolve, reject)=>{ - el.addEventListener('load', function(e) { - resolve(); - if (onLoad) { - onLoad.call(this, e); - } - afterLoad(); - }); - el.addEventListener('error', function(e) { - reject(e); - }); - }).catch(function(e) { - if (onError) { - onError(e); - } - }); - if (dangerouslySetInnerHTML) { - // Casting since lib.dom.d.ts doesn't have TrustedHTML yet. - el.innerHTML = dangerouslySetInnerHTML.__html || ''; - afterLoad(); - } else if (children) { - el.textContent = typeof children === 'string' ? children : Array.isArray(children) ? children.join('') : ''; - afterLoad(); - } else if (src) { - el.src = src; - // do not add cacheKey into LoadCache for remote script here - // cacheKey will be added to LoadCache when it is actually loaded (see loadPromise above) - ScriptCache.set(src, loadPromise); - } - (0, _setattributesfromprops.setAttributesFromProps)(el, props); - if (strategy === 'worker') { - el.setAttribute('type', 'text/partytown'); - } - el.setAttribute('data-nscript', strategy); - // Load styles associated with this script - if (stylesheets) { - insertStylesheets(stylesheets); - } - document.body.appendChild(el); -}; -function handleClientScriptLoad(props) { - const { strategy = 'afterInteractive' } = props; - if (strategy === 'lazyOnload') { - window.addEventListener('load', ()=>{ - (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props)); - }); - } else { - loadScript(props); - } -} -function loadLazyScript(props) { - if (document.readyState === 'complete') { - (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props)); - } else { - window.addEventListener('load', ()=>{ - (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props)); - }); - } -} -function addBeforeInteractiveToCache() { - const scripts = [ - ...document.querySelectorAll('[data-nscript="beforeInteractive"]'), - ...document.querySelectorAll('[data-nscript="beforePageRender"]') - ]; - scripts.forEach((script)=>{ - const cacheKey = script.id || script.getAttribute('src'); - LoadCache.add(cacheKey); - }); -} -function initScriptLoader(scriptLoaderItems) { - scriptLoaderItems.forEach(handleClientScriptLoad); - addBeforeInteractiveToCache(); -} -/** - * Load a third-party scripts in an optimized way. - * - * Read more: [Next.js Docs: `next/script`](https://nextjs.org/docs/app/api-reference/components/script) - */ function Script(props) { - const { id, src = '', onLoad = ()=>{}, onReady = null, strategy = 'afterInteractive', onError, stylesheets, ...restProps } = props; - // Context is available only during SSR - let { updateScripts, scripts, getIsSsr, appDir, nonce } = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext); - // if a nonce is explicitly passed to the script tag, favor that over the automatic handling - nonce = restProps.nonce || nonce; - /** - * - First mount: - * 1. The useEffect for onReady executes - * 2. hasOnReadyEffectCalled.current is false, but the script hasn't loaded yet (not in LoadCache) - * onReady is skipped, set hasOnReadyEffectCalled.current to true - * 3. The useEffect for loadScript executes - * 4. hasLoadScriptEffectCalled.current is false, loadScript executes - * Once the script is loaded, the onLoad and onReady will be called by then - * [If strict mode is enabled / is wrapped in component] - * 5. The useEffect for onReady executes again - * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped - * 7. The useEffect for loadScript executes again - * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped - * - * - Second mount: - * 1. The useEffect for onReady executes - * 2. hasOnReadyEffectCalled.current is false, but the script has already loaded (found in LoadCache) - * onReady is called, set hasOnReadyEffectCalled.current to true - * 3. The useEffect for loadScript executes - * 4. The script is already loaded, loadScript bails out - * [If strict mode is enabled / is wrapped in component] - * 5. The useEffect for onReady executes again - * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped - * 7. The useEffect for loadScript executes again - * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped - */ const hasOnReadyEffectCalled = (0, _react.useRef)(false); - (0, _react.useEffect)(()=>{ - const cacheKey = id || src; - if (!hasOnReadyEffectCalled.current) { - // Run onReady if script has loaded before but component is re-mounted - if (onReady && cacheKey && LoadCache.has(cacheKey)) { - onReady(); - } - hasOnReadyEffectCalled.current = true; - } - }, [ - onReady, - id, - src - ]); - const hasLoadScriptEffectCalled = (0, _react.useRef)(false); - (0, _react.useEffect)(()=>{ - if (!hasLoadScriptEffectCalled.current) { - if (strategy === 'afterInteractive') { - loadScript(props); - } else if (strategy === 'lazyOnload') { - loadLazyScript(props); - } - hasLoadScriptEffectCalled.current = true; - } - }, [ - props, - strategy - ]); - if (strategy === 'beforeInteractive' || strategy === 'worker') { - if (updateScripts) { - scripts[strategy] = (scripts[strategy] || []).concat([ - { - id, - src, - onLoad, - onReady, - onError, - ...restProps, - nonce - } - ]); - updateScripts(scripts); - } else if (getIsSsr && getIsSsr()) { - // Script has already loaded during SSR - LoadCache.add(id || src); - } else if (getIsSsr && !getIsSsr()) { - loadScript({ - ...props, - nonce - }); - } - } - // For the app directory, we need React Float to preload these scripts. - if (appDir) { - // Injecting stylesheets here handles beforeInteractive and worker scripts correctly - // For other strategies injecting here ensures correct stylesheet order - // ReactDOM.preinit handles loading the styles in the correct order, - // also ensures the stylesheet is loaded only once and in a consistent manner - // - // Case 1: Styles for beforeInteractive/worker with appDir - handled here - // Case 2: Styles for beforeInteractive/worker with pages dir - Not handled yet - // Case 3: Styles for afterInteractive/lazyOnload with appDir - handled here - // Case 4: Styles for afterInteractive/lazyOnload with pages dir - handled in insertStylesheets function - if (stylesheets) { - stylesheets.forEach((styleSrc)=>{ - _reactdom.default.preinit(styleSrc, { - as: 'style' - }); - }); - } - // Before interactive scripts need to be loaded by Next.js' runtime instead - // of native MapGenius – Explore maps for Tribes 2

\ No newline at end of file +MapGenius – Explore maps for Tribes 2 \ No newline at end of file diff --git a/docs/index.txt b/docs/index.txt index c9976d38..3286e830 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -2,15 +2,15 @@ 2:I[39756,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"default"] 3:I[37457,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"default"] 4:I[47257,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"ClientPageRoot"] -5:I[31713,["/t2-mapper/_next/static/chunks/f620a0b974993323.js","/t2-mapper/_next/static/chunks/32ef0c8650712240.js","/t2-mapper/_next/static/chunks/86f923aa0f996fe4.js","/t2-mapper/_next/static/chunks/741e1acf393d55a4.js"],"default"] +5:I[31713,["/t2-mapper/_next/static/chunks/f620a0b974993323.js","/t2-mapper/_next/static/chunks/32ef0c8650712240.js","/t2-mapper/_next/static/chunks/e48d3b25285f3054.js","/t2-mapper/_next/static/chunks/1e4f7733a4dd09be.js"],"default"] 8:I[97367,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"OutletBoundary"] a:I[11533,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"AsyncMetadataOutlet"] c:I[97367,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"ViewportBoundary"] e:I[97367,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"MetadataBoundary"] f:"$Sreact.suspense" 11:I[68027,[],"default"] -:HL["/t2-mapper/_next/static/chunks/be0d253f8c18ec3b.css","style"] -0:{"P":null,"b":"PYi7xunkxIU2JehSYV4Sg","p":"/t2-mapper","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/be0d253f8c18ec3b.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","searchParams":{},"params":{},"promises":["$@6","$@7"]}],[["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/f620a0b974993323.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/32ef0c8650712240.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/86f923aa0f996fe4.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/741e1acf393d55a4.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$L9",["$","$La",null,{"promise":"$@b"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lc",null,{"children":"$Ld"}],null],["$","$Le",null,{"children":["$","div",null,{"hidden":true,"children":["$","$f",null,{"fallback":null,"children":"$L10"}]}]}]]}],false]],"m":"$undefined","G":["$11",[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/be0d253f8c18ec3b.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"s":false,"S":true} +:HL["/t2-mapper/_next/static/chunks/15b04c9d2ba2c4cf.css","style"] +0:{"P":null,"b":"XHGJaNs99HGJmX9H1-TS5","p":"/t2-mapper","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/15b04c9d2ba2c4cf.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","searchParams":{},"params":{},"promises":["$@6","$@7"]}],[["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/f620a0b974993323.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/32ef0c8650712240.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/e48d3b25285f3054.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/1e4f7733a4dd09be.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$L9",["$","$La",null,{"promise":"$@b"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lc",null,{"children":"$Ld"}],null],["$","$Le",null,{"children":["$","div",null,{"hidden":true,"children":["$","$f",null,{"fallback":null,"children":"$L10"}]}]}]]}],false]],"m":"$undefined","G":["$11",[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/15b04c9d2ba2c4cf.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"s":false,"S":true} 6:{} 7:"$0:f:0:1:2:children:1:props:children:0:props:params" d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/src/components/Mission.tsx b/src/components/Mission.tsx index b78d9511..9e913a39 100644 --- a/src/components/Mission.tsx +++ b/src/components/Mission.tsx @@ -7,6 +7,7 @@ import { renderObject } from "./renderObject"; import { memo, useEffect, useState } from "react"; import { RuntimeProvider } from "./RuntimeProvider"; import { + createProgressTracker, createScriptCache, FileSystemHandler, runServer, @@ -50,6 +51,7 @@ function useParsedMission(name: string) { interface ExecutedMissionState { missionGroup: TorqueObject | undefined; runtime: TorqueRuntime | undefined; + progress: number; } function useExecutedMission( @@ -59,6 +61,7 @@ function useExecutedMission( const [state, setState] = useState({ missionGroup: undefined, runtime: undefined, + progress: 0, }); useEffect(() => { @@ -70,6 +73,13 @@ function useExecutedMission( // FIXME: Always just runs as the first game type for now... const missionType = parsedMission.missionTypes[0]; + // Create progress tracker and update state on changes + const progressTracker = createProgressTracker(); + const handleProgress = () => { + setState((prev) => ({ ...prev, progress: progressTracker.progress })); + }; + progressTracker.on("update", handleProgress); + const { runtime } = runServer({ missionName, missionType, @@ -78,10 +88,12 @@ function useExecutedMission( fileSystem, cache: scriptCache, signal: controller.signal, + progress: progressTracker, ignoreScripts: [ "scripts/admin.cs", "scripts/ai.cs", "scripts/aiCTF.cs", + "scripts/aiTDM.cs", "scripts/aiHunters.cs", "scripts/deathMessages.cs", "scripts/graphBuild.cs", @@ -92,11 +104,12 @@ function useExecutedMission( }, onMissionLoadDone: () => { const missionGroup = runtime.getObjectByName("MissionGroup"); - setState({ missionGroup, runtime }); + setState({ missionGroup, runtime, progress: 1 }); }, }); return () => { + progressTracker.off("update", handleProgress); controller.abort(); runtime.destroy(); }; @@ -107,7 +120,7 @@ function useExecutedMission( interface MissionProps { name: string; - onLoadingChange?: (isLoading: boolean) => void; + onLoadingChange?: (isLoading: boolean, progress?: number) => void; } export const Mission = memo(function Mission({ @@ -115,12 +128,15 @@ export const Mission = memo(function Mission({ onLoadingChange, }: MissionProps) { const { data: parsedMission } = useParsedMission(name); - const { missionGroup, runtime } = useExecutedMission(name, parsedMission); + const { missionGroup, runtime, progress } = useExecutedMission( + name, + parsedMission, + ); const isLoading = !missionGroup || !runtime; useEffect(() => { - onLoadingChange?.(isLoading); - }, [isLoading, onLoadingChange]); + onLoadingChange?.(isLoading, progress); + }, [isLoading, progress, onLoadingChange]); if (isLoading) { return null; diff --git a/src/torqueScript/index.ts b/src/torqueScript/index.ts index 5fd16751..d0b152bf 100644 --- a/src/torqueScript/index.ts +++ b/src/torqueScript/index.ts @@ -7,6 +7,7 @@ import { TorqueObject, TorqueRuntime, TorqueRuntimeOptions } from "./types"; export { generate, type GeneratorOptions } from "./codegen"; export type { Program } from "./ast"; export { createBuiltins } from "./builtins"; +export { createProgressTracker, type ProgressTracker } from "./progress"; export { createRuntime, createScriptCache } from "./runtime"; export { normalizePath } from "./utils"; export type { diff --git a/src/torqueScript/progress.ts b/src/torqueScript/progress.ts new file mode 100644 index 00000000..aa3498c2 --- /dev/null +++ b/src/torqueScript/progress.ts @@ -0,0 +1,75 @@ +export type ProgressEventType = "update"; +export type ProgressListener = () => void; + +export interface ProgressTracker { + /** Total items discovered so far (increases as dependencies are found) */ + readonly total: number; + /** Items completed */ + readonly loaded: number; + /** Currently loading item path, if any */ + readonly current: string | null; + /** Progress as a ratio from 0 to 1 (or 0 if total is 0) */ + readonly progress: number; + /** Subscribe to progress updates */ + on(event: ProgressEventType, listener: ProgressListener): void; + /** Unsubscribe from progress updates */ + off(event: ProgressEventType, listener: ProgressListener): void; +} + +export interface ProgressTrackerInternal extends ProgressTracker { + /** Increment total count when a new item is discovered */ + addItem(path: string): void; + /** Mark an item as completed */ + completeItem(): void; + /** Set the currently loading item */ + setCurrent(path: string | null): void; +} + +export function createProgressTracker(): ProgressTrackerInternal { + const listeners = new Set(); + + let total = 0; + let loaded = 0; + let current: string | null = null; + + function notify(): void { + for (const listener of listeners) { + listener(); + } + } + + return { + get total() { + return total; + }, + get loaded() { + return loaded; + }, + get current() { + return current; + }, + get progress() { + return total === 0 ? 0 : loaded / total; + }, + on(_event: ProgressEventType, listener: ProgressListener) { + listeners.add(listener); + }, + off(_event: ProgressEventType, listener: ProgressListener) { + listeners.delete(listener); + }, + addItem(path: string) { + total++; + current = path; + notify(); + }, + completeItem() { + loaded++; + current = null; + notify(); + }, + setCurrent(path: string | null) { + current = path; + notify(); + }, + }; +} diff --git a/src/torqueScript/runtime.ts b/src/torqueScript/runtime.ts index a301eaed..6f560959 100644 --- a/src/torqueScript/runtime.ts +++ b/src/torqueScript/runtime.ts @@ -1121,12 +1121,16 @@ export function createRuntime( return; } + // Track this script in progress + options.progress?.addItem(ref); + const loadPromise = (async () => { // Pass original path to loader - it handles its own normalization const source = await loader(ref); if (source == null) { console.warn(`Script not found: ${ref}`); state.failedScripts.add(normalized); + options.progress?.completeItem(); return; } @@ -1136,6 +1140,7 @@ export function createRuntime( } catch (err) { console.warn(`Failed to parse script: ${ref}`, err); state.failedScripts.add(normalized); + options.progress?.completeItem(); return; } @@ -1152,6 +1157,7 @@ export function createRuntime( // Store the parsed AST state.scripts.set(normalized, depAst); + options.progress?.completeItem(); })(); loadingPromises.set(normalized, loadPromise); @@ -1173,13 +1179,19 @@ export function createRuntime( return createLoadedScript(state.scripts.get(normalized)!, path); } + // Track this script in progress + options.progress?.addItem(path); + // Pass original path to loader - it handles its own normalization const source = await loader(path); if (source == null) { + options.progress?.completeItem(); throw new Error(`Script not found: ${path}`); } - return loadFromSource(source, { path }); + const result = await loadFromSource(source, { path }); + options.progress?.completeItem(); + return result; } async function loadFromSource( diff --git a/src/torqueScript/types.ts b/src/torqueScript/types.ts index 957d4839..4807f7ff 100644 --- a/src/torqueScript/types.ts +++ b/src/torqueScript/types.ts @@ -1,4 +1,5 @@ import type { Program } from "./ast"; +import type { ProgressTrackerInternal } from "./progress"; import type { CaseInsensitiveMap } from "./utils"; export type TorqueFunction = (...args: any[]) => any; @@ -108,6 +109,12 @@ export interface TorqueRuntimeOptions { * Create with `createScriptCache()`. */ cache?: ScriptCache; + /** + * Progress tracker for monitoring script loading. If provided, the runtime + * will report loading progress as scripts are discovered and loaded. + * Create with `createProgressTracker()`. + */ + progress?: ProgressTrackerInternal; } export interface LoadScriptOptions {