bimplus-webcomponents 0.0.159-28783-1 → 0.0.159-28783-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12744,7 +12744,7 @@ void main() {
12744
12744
  }`,QBe=`void main() {
12745
12745
  gl_Position = vec4( position, 1.0 );
12746
12746
  }`;function NMe(p,o,r){let d=new vF,m=new _o,O=new _o,C=new Ob,G=[],x=[],H={},te=r.maxTextureSize,ne={0:Qw,1:$$,2:eee},Te=new X8({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new _o},radius:{value:4}},vertexShader:QBe,fragmentShader:XBe}),Pe=Te.clone();Pe.defines.HORIZONTAL_PASS=1;let Ye=new c3;Ye.setAttribute("position",new IM(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let mt=new Dz(Ye,Te),Nt=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=mMe,this.render=function(en,Ni,Mi){if(Nt.enabled===!1||Nt.autoUpdate===!1&&Nt.needsUpdate===!1||en.length===0)return;let Di=p.getRenderTarget(),Ur=p.getActiveCubeFace(),Er=p.getActiveMipmapLevel(),yr=p.state;yr.setBlending(zX),yr.buffers.color.setClear(1,1,1,1),yr.buffers.depth.setTest(!0),yr.setScissorTest(!1);for(let Gi=0,Ar=en.length;Gi<Ar;Gi++){let ur=en[Gi],Qi=ur.shadow;if(Qi===void 0){console.warn("THREE.WebGLShadowMap:",ur,"has no shadow.");continue}if(Qi.autoUpdate===!1&&Qi.needsUpdate===!1)continue;m.copy(Qi.mapSize);let As=Qi.getFrameExtents();if(m.multiply(As),O.copy(Qi.mapSize),(m.x>te||m.y>te)&&(m.x>te&&(O.x=Math.floor(te/As.x),m.x=O.x*As.x,Qi.mapSize.x=O.x),m.y>te&&(O.y=Math.floor(te/As.y),m.y=O.y*As.y,Qi.mapSize.y=O.y)),Qi.map===null&&!Qi.isPointLightShadow&&this.type===TX){let Qr={minFilter:jz,magFilter:jz,format:sS};Qi.map=new j8(m.x,m.y,Qr),Qi.map.texture.name=ur.name+".shadowMap",Qi.mapPass=new j8(m.x,m.y,Qr),Qi.camera.updateProjectionMatrix()}if(Qi.map===null){let Qr={minFilter:k_,magFilter:k_,format:sS};Qi.map=new j8(m.x,m.y,Qr),Qi.map.texture.name=ur.name+".shadowMap",Qi.camera.updateProjectionMatrix()}p.setRenderTarget(Qi.map),p.clear();let Wr=Qi.getViewportCount();for(let Qr=0;Qr<Wr;Qr++){let Bs=Qi.getViewport(Qr);C.set(O.x*Bs.x,O.y*Bs.y,O.x*Bs.z,O.y*Bs.w),yr.viewport(C),Qi.updateMatrices(ur,Qr),d=Qi.getFrustum(),vi(Ni,Mi,Qi.camera,ur,this.type)}!Qi.isPointLightShadow&&this.type===TX&&Dt(Qi,Mi),Qi.needsUpdate=!1}Nt.needsUpdate=!1,p.setRenderTarget(Di,Ur,Er)};function Dt(en,Ni){let Mi=o.update(mt);Te.uniforms.shadow_pass.value=en.map.texture,Te.uniforms.resolution.value=en.mapSize,Te.uniforms.radius.value=en.radius,p.setRenderTarget(en.mapPass),p.clear(),p.renderBufferDirect(Ni,null,Mi,Te,mt,null),Pe.uniforms.shadow_pass.value=en.mapPass.texture,Pe.uniforms.resolution.value=en.mapSize,Pe.uniforms.radius.value=en.radius,p.setRenderTarget(en.map),p.clear(),p.renderBufferDirect(Ni,null,Mi,Pe,mt,null)}function Ct(en,Ni,Mi){let Di=en<<0|Ni<<1|Mi<<2,Ur=G[Di];return Ur===void 0&&(Ur=new L$({depthPacking:z7e,morphTargets:en,skinning:Ni}),G[Di]=Ur),Ur}function Zn(en,Ni,Mi){let Di=en<<0|Ni<<1|Mi<<2,Ur=x[Di];return Ur===void 0&&(Ur=new x$({morphTargets:en,skinning:Ni}),x[Di]=Ur),Ur}function Hn(en,Ni,Mi,Di,Ur,Er,yr){let Gi=null,Ar=Ct,ur=en.customDepthMaterial;if(Di.isPointLight===!0&&(Ar=Zn,ur=en.customDistanceMaterial),ur===void 0){let Qi=!1;Mi.morphTargets===!0&&(Qi=Ni.morphAttributes&&Ni.morphAttributes.position&&Ni.morphAttributes.position.length>0);let As=!1;en.isSkinnedMesh===!0&&(Mi.skinning===!0?As=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",en));let Wr=en.isInstancedMesh===!0;Gi=Ar(Qi,As,Wr)}else Gi=ur;if(p.localClippingEnabled&&Mi.clipShadows===!0&&Mi.clippingPlanes.length!==0){let Qi=Gi.uuid,As=Mi.uuid,Wr=H[Qi];Wr===void 0&&(Wr={},H[Qi]=Wr);let Qr=Wr[As];Qr===void 0&&(Qr=Gi.clone(),Wr[As]=Qr),Gi=Qr}return Gi.visible=Mi.visible,Gi.wireframe=Mi.wireframe,yr===TX?Gi.side=Mi.shadowSide!==null?Mi.shadowSide:Mi.side:Gi.side=Mi.shadowSide!==null?Mi.shadowSide:ne[Mi.side],Gi.clipShadows=Mi.clipShadows,Gi.clippingPlanes=Mi.clippingPlanes,Gi.clipIntersection=Mi.clipIntersection,Gi.wireframeLinewidth=Mi.wireframeLinewidth,Gi.linewidth=Mi.linewidth,Di.isPointLight===!0&&Gi.isMeshDistanceMaterial===!0&&(Gi.referencePosition.setFromMatrixPosition(Di.matrixWorld),Gi.nearDistance=Ur,Gi.farDistance=Er),Gi}function vi(en,Ni,Mi,Di,Ur){if(en.visible===!1)return;if(en.layers.test(Ni.layers)&&(en.isMesh||en.isLine||en.isPoints)&&(en.castShadow||en.receiveShadow&&Ur===TX)&&(!en.frustumCulled||d.intersectsObject(en))){en.modelViewMatrix.multiplyMatrices(Mi.matrixWorldInverse,en.matrixWorld);let Gi=o.update(en),Ar=en.material;if(Array.isArray(Ar)){let ur=Gi.groups;for(let Qi=0,As=ur.length;Qi<As;Qi++){let Wr=ur[Qi],Qr=Ar[Wr.materialIndex];if(Qr&&Qr.visible){let Bs=Hn(en,Gi,Qr,Di,Mi.near,Mi.far,Ur);p.renderBufferDirect(Mi,null,Gi,Bs,en,Wr)}}}else if(Ar.visible){let ur=Hn(en,Gi,Ar,Di,Mi.near,Mi.far,Ur);p.renderBufferDirect(Mi,null,Gi,ur,en,null)}}let yr=en.children;for(let Gi=0,Ar=yr.length;Gi<Ar;Gi++)vi(yr[Gi],Ni,Mi,Di,Ur)}}function ZBe(p,o,r){let d=r.isWebGL2;function m(){let ar=!1,os=new Ob,Zs=null,Jr=new Ob(0,0,0,0);return{setMask:function(Ds){Zs!==Ds&&!ar&&(p.colorMask(Ds,Ds,Ds,Ds),Zs=Ds)},setLocked:function(Ds){ar=Ds},setClear:function(Ds,ao,wo,Xa,Yl){Yl===!0&&(Ds*=Xa,ao*=Xa,wo*=Xa),os.set(Ds,ao,wo,Xa),Jr.equals(os)===!1&&(p.clearColor(Ds,ao,wo,Xa),Jr.copy(os))},reset:function(){ar=!1,Zs=null,Jr.set(-1,0,0,0)}}}function O(){let ar=!1,os=null,Zs=null,Jr=null;return{setTest:function(Ds){Ds?aa(2929):qi(2929)},setMask:function(Ds){os!==Ds&&!ar&&(p.depthMask(Ds),os=Ds)},setFunc:function(Ds){if(Zs!==Ds){if(Ds)switch(Ds){case bRe:p.depthFunc(512);break;case vRe:p.depthFunc(519);break;case gRe:p.depthFunc(513);break;case upe:p.depthFunc(515);break;case yRe:p.depthFunc(514);break;case MRe:p.depthFunc(518);break;case IRe:p.depthFunc(516);break;case wRe:p.depthFunc(517);break;default:p.depthFunc(515)}else p.depthFunc(515);Zs=Ds}},setLocked:function(Ds){ar=Ds},setClear:function(Ds){Jr!==Ds&&(p.clearDepth(Ds),Jr=Ds)},reset:function(){ar=!1,os=null,Zs=null,Jr=null}}}function C(){let ar=!1,os=null,Zs=null,Jr=null,Ds=null,ao=null,wo=null,Xa=null,Yl=null;return{setTest:function(pl){ar||(pl?aa(2960):qi(2960))},setMask:function(pl){os!==pl&&!ar&&(p.stencilMask(pl),os=pl)},setFunc:function(pl,oo,Wa){(Zs!==pl||Jr!==oo||Ds!==Wa)&&(p.stencilFunc(pl,oo,Wa),Zs=pl,Jr=oo,Ds=Wa)},setOp:function(pl,oo,Wa){(ao!==pl||wo!==oo||Xa!==Wa)&&(p.stencilOp(pl,oo,Wa),ao=pl,wo=oo,Xa=Wa)},setLocked:function(pl){ar=pl},setClear:function(pl){Yl!==pl&&(p.clearStencil(pl),Yl=pl)},reset:function(){ar=!1,os=null,Zs=null,Jr=null,Ds=null,ao=null,wo=null,Xa=null,Yl=null}}}let G=new m,x=new O,H=new C,te={},ne=null,Te={},Pe=null,Ye=!1,mt=null,Nt=null,Dt=null,Ct=null,Zn=null,Hn=null,vi=null,en=!1,Ni=null,Mi=null,Di=null,Ur=null,Er=null,yr=p.getParameter(35661),Gi=!1,Ar=0,ur=p.getParameter(7938);ur.indexOf("WebGL")!==-1?(Ar=parseFloat(/^WebGL (\d)/.exec(ur)[1]),Gi=Ar>=1):ur.indexOf("OpenGL ES")!==-1&&(Ar=parseFloat(/^OpenGL ES (\d)/.exec(ur)[1]),Gi=Ar>=2);let Qi=null,As={},Wr=new Ob(0,0,p.canvas.width,p.canvas.height),Qr=new Ob(0,0,p.canvas.width,p.canvas.height);function Bs(ar,os,Zs){let Jr=new Uint8Array(4),Ds=p.createTexture();p.bindTexture(ar,Ds),p.texParameteri(ar,10241,9728),p.texParameteri(ar,10240,9728);for(let ao=0;ao<Zs;ao++)p.texImage2D(os+ao,0,6408,1,1,0,6408,5121,Jr);return Ds}let Qs={};Qs[3553]=Bs(3553,3553,1),Qs[34067]=Bs(34067,34069,6),G.setClear(0,0,0,1),x.setClear(1),H.setClear(0),aa(2929),x.setFunc(upe),ni(!1),ii(Qge),aa(2884),Cr(zX);function aa(ar){te[ar]!==!0&&(p.enable(ar),te[ar]=!0)}function qi(ar){te[ar]!==!1&&(p.disable(ar),te[ar]=!1)}function mr(ar){ar!==ne&&(p.bindFramebuffer(36160,ar),ne=ar)}function Ti(ar,os){os===null&&ne!==null&&(os=ne),Te[ar]!==os&&(p.bindFramebuffer(ar,os),Te[ar]=os,d&&(ar===36009&&(Te[36160]=os),ar===36160&&(Te[36009]=os)))}function ui(ar){return Pe!==ar?(p.useProgram(ar),Pe=ar,!0):!1}let tr={[cF]:32774,[sRe]:32778,[aRe]:32779};if(d)tr[$ge]=32775,tr[eye]=32776;else{let ar=o.get("EXT_blend_minmax");ar!==null&&(tr[$ge]=ar.MIN_EXT,tr[eye]=ar.MAX_EXT)}let zr={[oRe]:0,[lRe]:1,[cRe]:768,[vMe]:770,[mRe]:776,[hRe]:774,[pRe]:772,[uRe]:769,[gMe]:771,[fRe]:775,[dRe]:773};function Cr(ar,os,Zs,Jr,Ds,ao,wo,Xa){if(ar===zX){Ye===!0&&(qi(3042),Ye=!1);return}if(Ye===!1&&(aa(3042),Ye=!0),ar!==rRe){if(ar!==mt||Xa!==en){if((Nt!==cF||Zn!==cF)&&(p.blendEquation(32774),Nt=cF,Zn=cF),Xa)switch(ar){case CX:p.blendFuncSeparate(1,771,1,771);break;case Zge:p.blendFunc(1,1);break;case Kge:p.blendFuncSeparate(0,0,769,771);break;case Jge:p.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",ar);break}else switch(ar){case CX:p.blendFuncSeparate(770,771,1,771);break;case Zge:p.blendFunc(770,1);break;case Kge:p.blendFunc(0,769);break;case Jge:p.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",ar);break}Dt=null,Ct=null,Hn=null,vi=null,mt=ar,en=Xa}return}Ds=Ds||os,ao=ao||Zs,wo=wo||Jr,(os!==Nt||Ds!==Zn)&&(p.blendEquationSeparate(tr[os],tr[Ds]),Nt=os,Zn=Ds),(Zs!==Dt||Jr!==Ct||ao!==Hn||wo!==vi)&&(p.blendFuncSeparate(zr[Zs],zr[Jr],zr[ao],zr[wo]),Dt=Zs,Ct=Jr,Hn=ao,vi=wo),mt=ar,en=null}function Qt(ar,os){ar.side===eee?qi(2884):aa(2884);let Zs=ar.side===Qw;os&&(Zs=!Zs),ni(Zs),ar.blending===CX&&ar.transparent===!1?Cr(zX):Cr(ar.blending,ar.blendEquation,ar.blendSrc,ar.blendDst,ar.blendEquationAlpha,ar.blendSrcAlpha,ar.blendDstAlpha,ar.premultipliedAlpha),x.setFunc(ar.depthFunc),x.setTest(ar.depthTest),x.setMask(ar.depthWrite),G.setMask(ar.colorWrite);let Jr=ar.stencilWrite;H.setTest(Jr),Jr&&(H.setMask(ar.stencilWriteMask),H.setFunc(ar.stencilFunc,ar.stencilRef,ar.stencilFuncMask),H.setOp(ar.stencilFail,ar.stencilZFail,ar.stencilZPass)),ji(ar.polygonOffset,ar.polygonOffsetFactor,ar.polygonOffsetUnits),ar.alphaToCoverage===!0?aa(32926):qi(32926)}function ni(ar){Ni!==ar&&(ar?p.frontFace(2304):p.frontFace(2305),Ni=ar)}function ii(ar){ar!==tRe?(aa(2884),ar!==Mi&&(ar===Qge?p.cullFace(1029):ar===nRe?p.cullFace(1028):p.cullFace(1032))):qi(2884),Mi=ar}function pi(ar){ar!==Di&&(Gi&&p.lineWidth(ar),Di=ar)}function ji(ar,os,Zs){ar?(aa(32823),(Ur!==os||Er!==Zs)&&(p.polygonOffset(os,Zs),Ur=os,Er=Zs)):qi(32823)}function $r(ar){ar?aa(3089):qi(3089)}function xi(ar){ar===void 0&&(ar=33984+yr-1),Qi!==ar&&(p.activeTexture(ar),Qi=ar)}function ei(ar,os){Qi===null&&xi();let Zs=As[Qi];Zs===void 0&&(Zs={type:void 0,texture:void 0},As[Qi]=Zs),(Zs.type!==ar||Zs.texture!==os)&&(p.bindTexture(ar,os||Qs[ar]),Zs.type=ar,Zs.texture=os)}function si(){let ar=As[Qi];ar!==void 0&&ar.type!==void 0&&(p.bindTexture(ar.type,null),ar.type=void 0,ar.texture=void 0)}function lr(){try{p.compressedTexImage2D.apply(p,arguments)}catch(ar){console.error("THREE.WebGLState:",ar)}}function rs(){try{p.texImage2D.apply(p,arguments)}catch(ar){console.error("THREE.WebGLState:",ar)}}function ga(){try{p.texImage3D.apply(p,arguments)}catch(ar){console.error("THREE.WebGLState:",ar)}}function Rs(ar){Wr.equals(ar)===!1&&(p.scissor(ar.x,ar.y,ar.z,ar.w),Wr.copy(ar))}function jo(ar){Qr.equals(ar)===!1&&(p.viewport(ar.x,ar.y,ar.z,ar.w),Qr.copy(ar))}function ia(){p.disable(3042),p.disable(2884),p.disable(2929),p.disable(32823),p.disable(3089),p.disable(2960),p.disable(32926),p.blendEquation(32774),p.blendFunc(1,0),p.blendFuncSeparate(1,0,1,0),p.colorMask(!0,!0,!0,!0),p.clearColor(0,0,0,0),p.depthMask(!0),p.depthFunc(513),p.clearDepth(1),p.stencilMask(4294967295),p.stencilFunc(519,0,4294967295),p.stencilOp(7680,7680,7680),p.clearStencil(0),p.cullFace(1029),p.frontFace(2305),p.polygonOffset(0,0),p.activeTexture(33984),p.bindFramebuffer(36160,null),d===!0&&(p.bindFramebuffer(36009,null),p.bindFramebuffer(36008,null)),p.useProgram(null),p.lineWidth(1),p.scissor(0,0,p.canvas.width,p.canvas.height),p.viewport(0,0,p.canvas.width,p.canvas.height),te={},Qi=null,As={},ne=null,Te={},Pe=null,Ye=!1,mt=null,Nt=null,Dt=null,Ct=null,Zn=null,Hn=null,vi=null,en=!1,Ni=null,Mi=null,Di=null,Ur=null,Er=null,Wr.set(0,0,p.canvas.width,p.canvas.height),Qr.set(0,0,p.canvas.width,p.canvas.height),G.reset(),x.reset(),H.reset()}return{buffers:{color:G,depth:x,stencil:H},enable:aa,disable:qi,bindFramebuffer:Ti,bindXRFramebuffer:mr,useProgram:ui,setBlending:Cr,setMaterial:Qt,setFlipSided:ni,setCullFace:ii,setLineWidth:pi,setPolygonOffset:ji,setScissorTest:$r,activeTexture:xi,bindTexture:ei,unbindTexture:si,compressedTexImage2D:lr,texImage2D:rs,texImage3D:ga,scissor:Rs,viewport:jo,reset:ia}}function KBe(p,o,r,d,m,O,C){let G=m.isWebGL2,x=m.maxTextures,H=m.maxCubemapSize,te=m.maxTextureSize,ne=m.maxSamples,Te=new WeakMap,Pe,Ye=!1;try{Ye=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function mt(ei,si){return Ye?new OffscreenCanvas(ei,si):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function Nt(ei,si,lr,rs){let ga=1;if((ei.width>rs||ei.height>rs)&&(ga=rs/Math.max(ei.width,ei.height)),ga<1||si===!0)if(typeof HTMLImageElement<"u"&&ei instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&ei instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&ei instanceof ImageBitmap){let Rs=si?x7e:Math.floor,jo=Rs(ga*ei.width),ia=Rs(ga*ei.height);Pe===void 0&&(Pe=mt(jo,ia));let ar=lr?mt(jo,ia):Pe;return ar.width=jo,ar.height=ia,ar.getContext("2d").drawImage(ei,0,0,jo,ia),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ei.width+"x"+ei.height+") to ("+jo+"x"+ia+")."),ar}else return"data"in ei&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ei.width+"x"+ei.height+")."),ei;return ei}function Dt(ei){return bye(ei.width)&&bye(ei.height)}function Ct(ei){return G?!1:ei.wrapS!==rS||ei.wrapT!==rS||ei.minFilter!==k_&&ei.minFilter!==jz}function Zn(ei,si){return ei.generateMipmaps&&si&&ei.minFilter!==k_&&ei.minFilter!==jz}function Hn(ei,si,lr,rs){p.generateMipmap(ei);let ga=d.get(si);ga.__maxMipLevel=Math.log2(Math.max(lr,rs))}function vi(ei,si,lr){if(G===!1)return si;if(ei!==null){if(p[ei]!==void 0)return p[ei];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+ei+"'")}let rs=si;return si===6403&&(lr===5126&&(rs=33326),lr===5131&&(rs=33325),lr===5121&&(rs=33321)),si===6407&&(lr===5126&&(rs=34837),lr===5131&&(rs=34843),lr===5121&&(rs=32849)),si===6408&&(lr===5126&&(rs=34836),lr===5131&&(rs=34842),lr===5121&&(rs=32856)),(rs===33325||rs===33326||rs===34842||rs===34836)&&o.get("EXT_color_buffer_float"),rs}function en(ei){return ei===k_||ei===iye||ei===rye?9728:9729}function Ni(ei){let si=ei.target;si.removeEventListener("dispose",Ni),Di(si),si.isVideoTexture&&Te.delete(si),C.memory.textures--}function Mi(ei){let si=ei.target;si.removeEventListener("dispose",Mi),Ur(si),C.memory.textures--}function Di(ei){let si=d.get(ei);si.__webglInit!==void 0&&(p.deleteTexture(si.__webglTexture),d.remove(ei))}function Ur(ei){let si=ei.texture,lr=d.get(ei),rs=d.get(si);if(ei){if(rs.__webglTexture!==void 0&&p.deleteTexture(rs.__webglTexture),ei.depthTexture&&ei.depthTexture.dispose(),ei.isWebGLCubeRenderTarget)for(let ga=0;ga<6;ga++)p.deleteFramebuffer(lr.__webglFramebuffer[ga]),lr.__webglDepthbuffer&&p.deleteRenderbuffer(lr.__webglDepthbuffer[ga]);else p.deleteFramebuffer(lr.__webglFramebuffer),lr.__webglDepthbuffer&&p.deleteRenderbuffer(lr.__webglDepthbuffer),lr.__webglMultisampledFramebuffer&&p.deleteFramebuffer(lr.__webglMultisampledFramebuffer),lr.__webglColorRenderbuffer&&p.deleteRenderbuffer(lr.__webglColorRenderbuffer),lr.__webglDepthRenderbuffer&&p.deleteRenderbuffer(lr.__webglDepthRenderbuffer);d.remove(si),d.remove(ei)}}let Er=0;function yr(){Er=0}function Gi(){let ei=Er;return ei>=x&&console.warn("THREE.WebGLTextures: Trying to use "+ei+" texture units while this GPU supports only "+x),Er+=1,ei}function Ar(ei,si){let lr=d.get(ei);if(ei.isVideoTexture&&ii(ei),ei.version>0&&lr.__version!==ei.version){let rs=ei.image;if(rs===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(rs.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{aa(lr,ei,si);return}}r.activeTexture(33984+si),r.bindTexture(3553,lr.__webglTexture)}function ur(ei,si){let lr=d.get(ei);if(ei.version>0&&lr.__version!==ei.version){aa(lr,ei,si);return}r.activeTexture(33984+si),r.bindTexture(35866,lr.__webglTexture)}function Qi(ei,si){let lr=d.get(ei);if(ei.version>0&&lr.__version!==ei.version){aa(lr,ei,si);return}r.activeTexture(33984+si),r.bindTexture(32879,lr.__webglTexture)}function As(ei,si){let lr=d.get(ei);if(ei.version>0&&lr.__version!==ei.version){qi(lr,ei,si);return}r.activeTexture(33984+si),r.bindTexture(34067,lr.__webglTexture)}let Wr={[ppe]:10497,[rS]:33071,[dpe]:33648},Qr={[k_]:9728,[iye]:9984,[rye]:9986,[jz]:9729,[DRe]:9985,[xde]:9987};function Bs(ei,si,lr){if(lr?(p.texParameteri(ei,10242,Wr[si.wrapS]),p.texParameteri(ei,10243,Wr[si.wrapT]),(ei===32879||ei===35866)&&p.texParameteri(ei,32882,Wr[si.wrapR]),p.texParameteri(ei,10240,Qr[si.magFilter]),p.texParameteri(ei,10241,Qr[si.minFilter])):(p.texParameteri(ei,10242,33071),p.texParameteri(ei,10243,33071),(ei===32879||ei===35866)&&p.texParameteri(ei,32882,33071),(si.wrapS!==rS||si.wrapT!==rS)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),p.texParameteri(ei,10240,en(si.magFilter)),p.texParameteri(ei,10241,en(si.minFilter)),si.minFilter!==k_&&si.minFilter!==jz&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),o.has("EXT_texture_filter_anisotropic")===!0){let rs=o.get("EXT_texture_filter_anisotropic");if(si.type===FR&&o.has("OES_texture_float_linear")===!1||G===!1&&si.type===I$&&o.has("OES_texture_half_float_linear")===!1)return;(si.anisotropy>1||d.get(si).__currentAnisotropy)&&(p.texParameterf(ei,rs.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(si.anisotropy,m.getMaxAnisotropy())),d.get(si).__currentAnisotropy=si.anisotropy)}}function Qs(ei,si){ei.__webglInit===void 0&&(ei.__webglInit=!0,si.addEventListener("dispose",Ni),ei.__webglTexture=p.createTexture(),C.memory.textures++)}function aa(ei,si,lr){let rs=3553;si.isDataTexture2DArray&&(rs=35866),si.isDataTexture3D&&(rs=32879),Qs(ei,si),r.activeTexture(33984+lr),r.bindTexture(rs,ei.__webglTexture),p.pixelStorei(37440,si.flipY),p.pixelStorei(37441,si.premultiplyAlpha),p.pixelStorei(3317,si.unpackAlignment),p.pixelStorei(37443,0);let ga=Ct(si)&&Dt(si.image)===!1,Rs=Nt(si.image,ga,!1,te),jo=Dt(Rs)||G,ia=O.convert(si.format),ar=O.convert(si.type),os=vi(si.internalFormat,ia,ar);Bs(rs,si,jo);let Zs,Jr=si.mipmaps;if(si.isDepthTexture)os=6402,G?si.type===FR?os=36012:si.type===g$?os=33190:si.type===SX?os=35056:os=33189:si.type===FR&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),si.format===hF&&os===6402&&si.type!==M$&&si.type!==g$&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),si.type=M$,ar=O.convert(si.type)),si.format===PX&&os===6402&&(os=34041,si.type!==SX&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),si.type=SX,ar=O.convert(si.type))),r.texImage2D(3553,0,os,Rs.width,Rs.height,0,ia,ar,null);else if(si.isDataTexture)if(Jr.length>0&&jo){for(let Ds=0,ao=Jr.length;Ds<ao;Ds++)Zs=Jr[Ds],r.texImage2D(3553,Ds,os,Zs.width,Zs.height,0,ia,ar,Zs.data);si.generateMipmaps=!1,ei.__maxMipLevel=Jr.length-1}else r.texImage2D(3553,0,os,Rs.width,Rs.height,0,ia,ar,Rs.data),ei.__maxMipLevel=0;else if(si.isCompressedTexture){for(let Ds=0,ao=Jr.length;Ds<ao;Ds++)Zs=Jr[Ds],si.format!==sS&&si.format!==DB?ia!==null?r.compressedTexImage2D(3553,Ds,os,Zs.width,Zs.height,0,Zs.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):r.texImage2D(3553,Ds,os,Zs.width,Zs.height,0,ia,ar,Zs.data);ei.__maxMipLevel=Jr.length-1}else if(si.isDataTexture2DArray)r.texImage3D(35866,0,os,Rs.width,Rs.height,Rs.depth,0,ia,ar,Rs.data),ei.__maxMipLevel=0;else if(si.isDataTexture3D)r.texImage3D(32879,0,os,Rs.width,Rs.height,Rs.depth,0,ia,ar,Rs.data),ei.__maxMipLevel=0;else if(Jr.length>0&&jo){for(let Ds=0,ao=Jr.length;Ds<ao;Ds++)Zs=Jr[Ds],r.texImage2D(3553,Ds,os,ia,ar,Zs);si.generateMipmaps=!1,ei.__maxMipLevel=Jr.length-1}else r.texImage2D(3553,0,os,ia,ar,Rs),ei.__maxMipLevel=0;Zn(si,jo)&&Hn(rs,si,Rs.width,Rs.height),ei.__version=si.version,si.onUpdate&&si.onUpdate(si)}function qi(ei,si,lr){if(si.image.length!==6)return;Qs(ei,si),r.activeTexture(33984+lr),r.bindTexture(34067,ei.__webglTexture),p.pixelStorei(37440,si.flipY),p.pixelStorei(37441,si.premultiplyAlpha),p.pixelStorei(3317,si.unpackAlignment),p.pixelStorei(37443,0);let rs=si&&(si.isCompressedTexture||si.image[0].isCompressedTexture),ga=si.image[0]&&si.image[0].isDataTexture,Rs=[];for(let Ds=0;Ds<6;Ds++)!rs&&!ga?Rs[Ds]=Nt(si.image[Ds],!1,!0,H):Rs[Ds]=ga?si.image[Ds].image:si.image[Ds];let jo=Rs[0],ia=Dt(jo)||G,ar=O.convert(si.format),os=O.convert(si.type),Zs=vi(si.internalFormat,ar,os);Bs(34067,si,ia);let Jr;if(rs){for(let Ds=0;Ds<6;Ds++){Jr=Rs[Ds].mipmaps;for(let ao=0;ao<Jr.length;ao++){let wo=Jr[ao];si.format!==sS&&si.format!==DB?ar!==null?r.compressedTexImage2D(34069+Ds,ao,Zs,wo.width,wo.height,0,wo.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):r.texImage2D(34069+Ds,ao,Zs,wo.width,wo.height,0,ar,os,wo.data)}}ei.__maxMipLevel=Jr.length-1}else{Jr=si.mipmaps;for(let Ds=0;Ds<6;Ds++)if(ga){r.texImage2D(34069+Ds,0,Zs,Rs[Ds].width,Rs[Ds].height,0,ar,os,Rs[Ds].data);for(let ao=0;ao<Jr.length;ao++){let Xa=Jr[ao].image[Ds].image;r.texImage2D(34069+Ds,ao+1,Zs,Xa.width,Xa.height,0,ar,os,Xa.data)}}else{r.texImage2D(34069+Ds,0,Zs,ar,os,Rs[Ds]);for(let ao=0;ao<Jr.length;ao++){let wo=Jr[ao];r.texImage2D(34069+Ds,ao+1,Zs,ar,os,wo.image[Ds])}}ei.__maxMipLevel=Jr.length}Zn(si,ia)&&Hn(34067,si,jo.width,jo.height),ei.__version=si.version,si.onUpdate&&si.onUpdate(si)}function mr(ei,si,lr,rs){let ga=si.texture,Rs=O.convert(ga.format),jo=O.convert(ga.type),ia=vi(ga.internalFormat,Rs,jo);rs===32879||rs===35866?r.texImage3D(rs,0,ia,si.width,si.height,si.depth,0,Rs,jo,null):r.texImage2D(rs,0,ia,si.width,si.height,0,Rs,jo,null),r.bindFramebuffer(36160,ei),p.framebufferTexture2D(36160,lr,rs,d.get(ga).__webglTexture,0),r.bindFramebuffer(36160,null)}function Ti(ei,si,lr){if(p.bindRenderbuffer(36161,ei),si.depthBuffer&&!si.stencilBuffer){let rs=33189;if(lr){let ga=si.depthTexture;ga&&ga.isDepthTexture&&(ga.type===FR?rs=36012:ga.type===g$&&(rs=33190));let Rs=ni(si);p.renderbufferStorageMultisample(36161,Rs,rs,si.width,si.height)}else p.renderbufferStorage(36161,rs,si.width,si.height);p.framebufferRenderbuffer(36160,36096,36161,ei)}else if(si.depthBuffer&&si.stencilBuffer){if(lr){let rs=ni(si);p.renderbufferStorageMultisample(36161,rs,35056,si.width,si.height)}else p.renderbufferStorage(36161,34041,si.width,si.height);p.framebufferRenderbuffer(36160,33306,36161,ei)}else{let rs=si.texture,ga=O.convert(rs.format),Rs=O.convert(rs.type),jo=vi(rs.internalFormat,ga,Rs);if(lr){let ia=ni(si);p.renderbufferStorageMultisample(36161,ia,jo,si.width,si.height)}else p.renderbufferStorage(36161,jo,si.width,si.height)}p.bindRenderbuffer(36161,null)}function ui(ei,si){if(si&&si.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(r.bindFramebuffer(36160,ei),!(si.depthTexture&&si.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!d.get(si.depthTexture).__webglTexture||si.depthTexture.image.width!==si.width||si.depthTexture.image.height!==si.height)&&(si.depthTexture.image.width=si.width,si.depthTexture.image.height=si.height,si.depthTexture.needsUpdate=!0),Ar(si.depthTexture,0);let rs=d.get(si.depthTexture).__webglTexture;if(si.depthTexture.format===hF)p.framebufferTexture2D(36160,36096,3553,rs,0);else if(si.depthTexture.format===PX)p.framebufferTexture2D(36160,33306,3553,rs,0);else throw new Error("Unknown depthTexture format")}function tr(ei){let si=d.get(ei),lr=ei.isWebGLCubeRenderTarget===!0;if(ei.depthTexture){if(lr)throw new Error("target.depthTexture not supported in Cube render targets");ui(si.__webglFramebuffer,ei)}else if(lr){si.__webglDepthbuffer=[];for(let rs=0;rs<6;rs++)r.bindFramebuffer(36160,si.__webglFramebuffer[rs]),si.__webglDepthbuffer[rs]=p.createRenderbuffer(),Ti(si.__webglDepthbuffer[rs],ei,!1)}else r.bindFramebuffer(36160,si.__webglFramebuffer),si.__webglDepthbuffer=p.createRenderbuffer(),Ti(si.__webglDepthbuffer,ei,!1);r.bindFramebuffer(36160,null)}function zr(ei){let si=ei.texture,lr=d.get(ei),rs=d.get(si);ei.addEventListener("dispose",Mi),rs.__webglTexture=p.createTexture(),rs.__version=si.version,C.memory.textures++;let ga=ei.isWebGLCubeRenderTarget===!0,Rs=ei.isWebGLMultisampleRenderTarget===!0,jo=si.isDataTexture3D||si.isDataTexture2DArray,ia=Dt(ei)||G;if(G&&si.format===DB&&(si.type===FR||si.type===I$)&&(si.format=sS,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),ga){lr.__webglFramebuffer=[];for(let ar=0;ar<6;ar++)lr.__webglFramebuffer[ar]=p.createFramebuffer()}else if(lr.__webglFramebuffer=p.createFramebuffer(),Rs)if(G){lr.__webglMultisampledFramebuffer=p.createFramebuffer(),lr.__webglColorRenderbuffer=p.createRenderbuffer(),p.bindRenderbuffer(36161,lr.__webglColorRenderbuffer);let ar=O.convert(si.format),os=O.convert(si.type),Zs=vi(si.internalFormat,ar,os),Jr=ni(ei);p.renderbufferStorageMultisample(36161,Jr,Zs,ei.width,ei.height),r.bindFramebuffer(36160,lr.__webglMultisampledFramebuffer),p.framebufferRenderbuffer(36160,36064,36161,lr.__webglColorRenderbuffer),p.bindRenderbuffer(36161,null),ei.depthBuffer&&(lr.__webglDepthRenderbuffer=p.createRenderbuffer(),Ti(lr.__webglDepthRenderbuffer,ei,!0)),r.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(ga){r.bindTexture(34067,rs.__webglTexture),Bs(34067,si,ia);for(let ar=0;ar<6;ar++)mr(lr.__webglFramebuffer[ar],ei,36064,34069+ar);Zn(si,ia)&&Hn(34067,si,ei.width,ei.height),r.bindTexture(34067,null)}else{let ar=3553;jo&&(G?ar=si.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),r.bindTexture(ar,rs.__webglTexture),Bs(ar,si,ia),mr(lr.__webglFramebuffer,ei,36064,ar),Zn(si,ia)&&Hn(3553,si,ei.width,ei.height),r.bindTexture(3553,null)}ei.depthBuffer&&tr(ei)}function Cr(ei){let si=ei.texture,lr=Dt(ei)||G;if(Zn(si,lr)){let rs=ei.isWebGLCubeRenderTarget?34067:3553,ga=d.get(si).__webglTexture;r.bindTexture(rs,ga),Hn(rs,si,ei.width,ei.height),r.bindTexture(rs,null)}}function Qt(ei){if(ei.isWebGLMultisampleRenderTarget)if(G){let si=ei.width,lr=ei.height,rs=16384;ei.depthBuffer&&(rs|=256),ei.stencilBuffer&&(rs|=1024);let ga=d.get(ei);r.bindFramebuffer(36008,ga.__webglMultisampledFramebuffer),r.bindFramebuffer(36009,ga.__webglFramebuffer),p.blitFramebuffer(0,0,si,lr,0,0,si,lr,rs,9728),r.bindFramebuffer(36008,null),r.bindFramebuffer(36009,ga.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")}function ni(ei){return G&&ei.isWebGLMultisampleRenderTarget?Math.min(ne,ei.samples):0}function ii(ei){let si=C.render.frame;Te.get(ei)!==si&&(Te.set(ei,si),ei.update())}let pi=!1,ji=!1;function $r(ei,si){ei&&ei.isWebGLRenderTarget&&(pi===!1&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),pi=!0),ei=ei.texture),Ar(ei,si)}function xi(ei,si){ei&&ei.isWebGLCubeRenderTarget&&(ji===!1&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),ji=!0),ei=ei.texture),As(ei,si)}this.allocateTextureUnit=Gi,this.resetTextureUnits=yr,this.setTexture2D=Ar,this.setTexture2DArray=ur,this.setTexture3D=Qi,this.setTextureCube=As,this.setupRenderTarget=zr,this.updateRenderTargetMipmap=Cr,this.updateMultisampleRenderTarget=Qt,this.safeSetTexture2D=$r,this.safeSetTextureCube=xi}function JBe(p,o,r){let d=r.isWebGL2;function m(O){let C;if(O===Rde)return 5121;if(O===RRe)return 32819;if(O===NRe)return 32820;if(O===PRe)return 33635;if(O===SRe)return 5120;if(O===LRe)return 5122;if(O===M$)return 5123;if(O===xRe)return 5124;if(O===g$)return 5125;if(O===FR)return 5126;if(O===I$)return d?5131:(C=o.get("OES_texture_half_float"),C!==null?C.HALF_FLOAT_OES:null);if(O===BRe)return 6406;if(O===DB)return 6407;if(O===sS)return 6408;if(O===HRe)return 6409;if(O===FRe)return 6410;if(O===hF)return 6402;if(O===PX)return 34041;if(O===kRe)return 6403;if(O===qRe)return 36244;if(O===WRe)return 33319;if(O===URe)return 33320;if(O===GRe)return 36248;if(O===jRe)return 36249;if(O===sye||O===aye||O===oye||O===lye)if(C=o.get("WEBGL_compressed_texture_s3tc"),C!==null){if(O===sye)return C.COMPRESSED_RGB_S3TC_DXT1_EXT;if(O===aye)return C.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(O===oye)return C.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(O===lye)return C.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(O===cye||O===uye||O===pye||O===dye)if(C=o.get("WEBGL_compressed_texture_pvrtc"),C!==null){if(O===cye)return C.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(O===uye)return C.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(O===pye)return C.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(O===dye)return C.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(O===VRe)return C=o.get("WEBGL_compressed_texture_etc1"),C!==null?C.COMPRESSED_RGB_ETC1_WEBGL:null;if((O===hye||O===fye)&&(C=o.get("WEBGL_compressed_texture_etc"),C!==null)){if(O===hye)return C.COMPRESSED_RGB8_ETC2;if(O===fye)return C.COMPRESSED_RGBA8_ETC2_EAC}if(O===YRe||O===XRe||O===QRe||O===ZRe||O===KRe||O===JRe||O===$Re||O===e7e||O===t7e||O===n7e||O===i7e||O===r7e||O===s7e||O===a7e||O===l7e||O===c7e||O===u7e||O===p7e||O===d7e||O===h7e||O===f7e||O===m7e||O===b7e||O===v7e||O===g7e||O===y7e||O===M7e||O===I7e)return C=o.get("WEBGL_compressed_texture_astc"),C!==null?O:null;if(O===o7e)return C=o.get("EXT_texture_compression_bptc"),C!==null?O:null;if(O===SX)return d?34042:(C=o.get("WEBGL_depth_texture"),C!==null?C.UNSIGNED_INT_24_8_WEBGL:null)}return{convert:m}}var R$=class extends F_{constructor(o=[]){super(),this.cameras=o}};R$.prototype.isArrayCamera=!0;var CB=class extends mv{constructor(){super(),this.type="Group"}};CB.prototype.isGroup=!0;var $Be={type:"move"},LX=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new CB,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new CB,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new $i,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new $i),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new CB,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new $i,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new $i),this._grip}dispatchEvent(o){return this._targetRay!==null&&this._targetRay.dispatchEvent(o),this._grip!==null&&this._grip.dispatchEvent(o),this._hand!==null&&this._hand.dispatchEvent(o),this}disconnect(o){return this.dispatchEvent({type:"disconnected",data:o}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(o,r,d){let m=null,O=null,C=null,G=this._targetRay,x=this._grip,H=this._hand;if(o&&r.session.visibilityState!=="visible-blurred")if(G!==null&&(m=r.getPose(o.targetRaySpace,d),m!==null&&(G.matrix.fromArray(m.transform.matrix),G.matrix.decompose(G.position,G.rotation,G.scale),m.linearVelocity?(G.hasLinearVelocity=!0,G.linearVelocity.copy(m.linearVelocity)):G.hasLinearVelocity=!1,m.angularVelocity?(G.hasAngularVelocity=!0,G.angularVelocity.copy(m.angularVelocity)):G.hasAngularVelocity=!1,this.dispatchEvent($Be))),H&&o.hand){C=!0;for(let mt of o.hand.values()){let Nt=r.getJointPose(mt,d);if(H.joints[mt.jointName]===void 0){let Ct=new CB;Ct.matrixAutoUpdate=!1,Ct.visible=!1,H.joints[mt.jointName]=Ct,H.add(Ct)}let Dt=H.joints[mt.jointName];Nt!==null&&(Dt.matrix.fromArray(Nt.transform.matrix),Dt.matrix.decompose(Dt.position,Dt.rotation,Dt.scale),Dt.jointRadius=Nt.radius),Dt.visible=Nt!==null}let te=H.joints["index-finger-tip"],ne=H.joints["thumb-tip"],Te=te.position.distanceTo(ne.position),Pe=.02,Ye=.005;H.inputState.pinching&&Te>Pe+Ye?(H.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:o.handedness,target:this})):!H.inputState.pinching&&Te<=Pe-Ye&&(H.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:o.handedness,target:this}))}else x!==null&&o.gripSpace&&(O=r.getPose(o.gripSpace,d),O!==null&&(x.matrix.fromArray(O.transform.matrix),x.matrix.decompose(x.position,x.rotation,x.scale),O.linearVelocity?(x.hasLinearVelocity=!0,x.linearVelocity.copy(O.linearVelocity)):x.hasLinearVelocity=!1,O.angularVelocity?(x.hasAngularVelocity=!0,x.angularVelocity.copy(O.angularVelocity)):x.hasAngularVelocity=!1));return G!==null&&(G.visible=m!==null),x!==null&&(x.visible=O!==null),H!==null&&(H.visible=C!==null),this}},ype=class extends Y8{constructor(o,r){super();let d=this,m=o.state,O=null,C=1,G=null,x="local-floor",H=null,te=[],ne=new Map,Te=new F_;Te.layers.enable(1),Te.viewport=new Ob;let Pe=new F_;Pe.layers.enable(2),Pe.viewport=new Ob;let Ye=[Te,Pe],mt=new R$;mt.layers.enable(1),mt.layers.enable(2);let Nt=null,Dt=null;this.enabled=!1,this.isPresenting=!1,this.getController=function(yr){let Gi=te[yr];return Gi===void 0&&(Gi=new LX,te[yr]=Gi),Gi.getTargetRaySpace()},this.getControllerGrip=function(yr){let Gi=te[yr];return Gi===void 0&&(Gi=new LX,te[yr]=Gi),Gi.getGripSpace()},this.getHand=function(yr){let Gi=te[yr];return Gi===void 0&&(Gi=new LX,te[yr]=Gi),Gi.getHandSpace()};function Ct(yr){let Gi=ne.get(yr.inputSource);Gi&&Gi.dispatchEvent({type:yr.type,data:yr.inputSource})}function Zn(){ne.forEach(function(yr,Gi){yr.disconnect(Gi)}),ne.clear(),Nt=null,Dt=null,m.bindXRFramebuffer(null),o.setRenderTarget(o.getRenderTarget()),Er.stop(),d.isPresenting=!1,d.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(yr){C=yr,d.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(yr){x=yr,d.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return G},this.getSession=function(){return O},this.setSession=function(yr){return JA(this,null,function*(){if(O=yr,O!==null){O.addEventListener("select",Ct),O.addEventListener("selectstart",Ct),O.addEventListener("selectend",Ct),O.addEventListener("squeeze",Ct),O.addEventListener("squeezestart",Ct),O.addEventListener("squeezeend",Ct),O.addEventListener("end",Zn),O.addEventListener("inputsourceschange",Hn);let Gi=r.getContextAttributes();Gi.xrCompatible!==!0&&(yield r.makeXRCompatible());let Ar={antialias:Gi.antialias,alpha:Gi.alpha,depth:Gi.depth,stencil:Gi.stencil,framebufferScaleFactor:C},ur=new XRWebGLLayer(O,r,Ar);O.updateRenderState({baseLayer:ur}),G=yield O.requestReferenceSpace(x),Er.setContext(O),Er.start(),d.isPresenting=!0,d.dispatchEvent({type:"sessionstart"})}})};function Hn(yr){let Gi=O.inputSources;for(let Ar=0;Ar<te.length;Ar++)ne.set(Gi[Ar],te[Ar]);for(let Ar=0;Ar<yr.removed.length;Ar++){let ur=yr.removed[Ar],Qi=ne.get(ur);Qi&&(Qi.dispatchEvent({type:"disconnected",data:ur}),ne.delete(ur))}for(let Ar=0;Ar<yr.added.length;Ar++){let ur=yr.added[Ar],Qi=ne.get(ur);Qi&&Qi.dispatchEvent({type:"connected",data:ur})}}let vi=new $i,en=new $i;function Ni(yr,Gi,Ar){vi.setFromMatrixPosition(Gi.matrixWorld),en.setFromMatrixPosition(Ar.matrixWorld);let ur=vi.distanceTo(en),Qi=Gi.projectionMatrix.elements,As=Ar.projectionMatrix.elements,Wr=Qi[14]/(Qi[10]-1),Qr=Qi[14]/(Qi[10]+1),Bs=(Qi[9]+1)/Qi[5],Qs=(Qi[9]-1)/Qi[5],aa=(Qi[8]-1)/Qi[0],qi=(As[8]+1)/As[0],mr=Wr*aa,Ti=Wr*qi,ui=ur/(-aa+qi),tr=ui*-aa;Gi.matrixWorld.decompose(yr.position,yr.quaternion,yr.scale),yr.translateX(tr),yr.translateZ(ui),yr.matrixWorld.compose(yr.position,yr.quaternion,yr.scale),yr.matrixWorldInverse.copy(yr.matrixWorld).invert();let zr=Wr+ui,Cr=Qr+ui,Qt=mr-tr,ni=Ti+(ur-tr),ii=Bs*Qr/Cr*zr,pi=Qs*Qr/Cr*zr;yr.projectionMatrix.makePerspective(Qt,ni,ii,pi,zr,Cr)}function Mi(yr,Gi){Gi===null?yr.matrixWorld.copy(yr.matrix):yr.matrixWorld.multiplyMatrices(Gi.matrixWorld,yr.matrix),yr.matrixWorldInverse.copy(yr.matrixWorld).invert()}this.getCamera=function(yr){mt.near=Pe.near=Te.near=yr.near,mt.far=Pe.far=Te.far=yr.far,(Nt!==mt.near||Dt!==mt.far)&&(O.updateRenderState({depthNear:mt.near,depthFar:mt.far}),Nt=mt.near,Dt=mt.far);let Gi=yr.parent,Ar=mt.cameras;Mi(mt,Gi);for(let Qi=0;Qi<Ar.length;Qi++)Mi(Ar[Qi],Gi);yr.matrixWorld.copy(mt.matrixWorld),yr.matrix.copy(mt.matrix),yr.matrix.decompose(yr.position,yr.quaternion,yr.scale);let ur=yr.children;for(let Qi=0,As=ur.length;Qi<As;Qi++)ur[Qi].updateMatrixWorld(!0);return Ar.length===2?Ni(mt,Te,Pe):mt.projectionMatrix.copy(Te.projectionMatrix),mt};let Di=null;function Ur(yr,Gi){if(H=Gi.getViewerPose(G),H!==null){let ur=H.views,Qi=O.renderState.baseLayer;m.bindXRFramebuffer(Qi.framebuffer);let As=!1;ur.length!==mt.cameras.length&&(mt.cameras.length=0,As=!0);for(let Wr=0;Wr<ur.length;Wr++){let Qr=ur[Wr],Bs=Qi.getViewport(Qr),Qs=Ye[Wr];Qs.matrix.fromArray(Qr.transform.matrix),Qs.projectionMatrix.fromArray(Qr.projectionMatrix),Qs.viewport.set(Bs.x,Bs.y,Bs.width,Bs.height),Wr===0&&mt.matrix.copy(Qs.matrix),As===!0&&mt.cameras.push(Qs)}}let Ar=O.inputSources;for(let ur=0;ur<te.length;ur++){let Qi=te[ur],As=Ar[ur];Qi.update(As,Gi,G)}Di&&Di(yr,Gi)}let Er=new EMe;Er.setAnimationLoop(Ur),this.setAnimationLoop=function(yr){Di=yr},this.dispose=function(){}}};function eHe(p){function o(Dt,Ct){Dt.fogColor.value.copy(Ct.color),Ct.isFog?(Dt.fogNear.value=Ct.near,Dt.fogFar.value=Ct.far):Ct.isFogExp2&&(Dt.fogDensity.value=Ct.density)}function r(Dt,Ct,Zn,Hn){Ct.isMeshBasicMaterial?d(Dt,Ct):Ct.isMeshLambertMaterial?(d(Dt,Ct),x(Dt,Ct)):Ct.isMeshToonMaterial?(d(Dt,Ct),te(Dt,Ct)):Ct.isMeshPhongMaterial?(d(Dt,Ct),H(Dt,Ct)):Ct.isMeshStandardMaterial?(d(Dt,Ct),Ct.isMeshPhysicalMaterial?Te(Dt,Ct):ne(Dt,Ct)):Ct.isMeshMatcapMaterial?(d(Dt,Ct),Pe(Dt,Ct)):Ct.isMeshDepthMaterial?(d(Dt,Ct),Ye(Dt,Ct)):Ct.isMeshDistanceMaterial?(d(Dt,Ct),mt(Dt,Ct)):Ct.isMeshNormalMaterial?(d(Dt,Ct),Nt(Dt,Ct)):Ct.isLineBasicMaterial?(m(Dt,Ct),Ct.isLineDashedMaterial&&O(Dt,Ct)):Ct.isPointsMaterial?C(Dt,Ct,Zn,Hn):Ct.isSpriteMaterial?G(Dt,Ct):Ct.isShadowMaterial?(Dt.color.value.copy(Ct.color),Dt.opacity.value=Ct.opacity):Ct.isShaderMaterial&&(Ct.uniformsNeedUpdate=!1)}function d(Dt,Ct){Dt.opacity.value=Ct.opacity,Ct.color&&Dt.diffuse.value.copy(Ct.color),Ct.emissive&&Dt.emissive.value.copy(Ct.emissive).multiplyScalar(Ct.emissiveIntensity),Ct.map&&(Dt.map.value=Ct.map),Ct.alphaMap&&(Dt.alphaMap.value=Ct.alphaMap),Ct.specularMap&&(Dt.specularMap.value=Ct.specularMap);let Zn=p.get(Ct).envMap;if(Zn){Dt.envMap.value=Zn,Dt.flipEnvMap.value=Zn.isCubeTexture&&Zn._needsFlipEnvMap?-1:1,Dt.reflectivity.value=Ct.reflectivity,Dt.refractionRatio.value=Ct.refractionRatio;let en=p.get(Zn).__maxMipLevel;en!==void 0&&(Dt.maxMipLevel.value=en)}Ct.lightMap&&(Dt.lightMap.value=Ct.lightMap,Dt.lightMapIntensity.value=Ct.lightMapIntensity),Ct.aoMap&&(Dt.aoMap.value=Ct.aoMap,Dt.aoMapIntensity.value=Ct.aoMapIntensity);let Hn;Ct.map?Hn=Ct.map:Ct.specularMap?Hn=Ct.specularMap:Ct.displacementMap?Hn=Ct.displacementMap:Ct.normalMap?Hn=Ct.normalMap:Ct.bumpMap?Hn=Ct.bumpMap:Ct.roughnessMap?Hn=Ct.roughnessMap:Ct.metalnessMap?Hn=Ct.metalnessMap:Ct.alphaMap?Hn=Ct.alphaMap:Ct.emissiveMap?Hn=Ct.emissiveMap:Ct.clearcoatMap?Hn=Ct.clearcoatMap:Ct.clearcoatNormalMap?Hn=Ct.clearcoatNormalMap:Ct.clearcoatRoughnessMap&&(Hn=Ct.clearcoatRoughnessMap),Hn!==void 0&&(Hn.isWebGLRenderTarget&&(Hn=Hn.texture),Hn.matrixAutoUpdate===!0&&Hn.updateMatrix(),Dt.uvTransform.value.copy(Hn.matrix));let vi;Ct.aoMap?vi=Ct.aoMap:Ct.lightMap&&(vi=Ct.lightMap),vi!==void 0&&(vi.isWebGLRenderTarget&&(vi=vi.texture),vi.matrixAutoUpdate===!0&&vi.updateMatrix(),Dt.uv2Transform.value.copy(vi.matrix))}function m(Dt,Ct){Dt.diffuse.value.copy(Ct.color),Dt.opacity.value=Ct.opacity}function O(Dt,Ct){Dt.dashSize.value=Ct.dashSize,Dt.totalSize.value=Ct.dashSize+Ct.gapSize,Dt.scale.value=Ct.scale}function C(Dt,Ct,Zn,Hn){Dt.diffuse.value.copy(Ct.color),Dt.opacity.value=Ct.opacity,Dt.size.value=Ct.size*Zn,Dt.scale.value=Hn*.5,Ct.map&&(Dt.map.value=Ct.map),Ct.alphaMap&&(Dt.alphaMap.value=Ct.alphaMap);let vi;Ct.map?vi=Ct.map:Ct.alphaMap&&(vi=Ct.alphaMap),vi!==void 0&&(vi.matrixAutoUpdate===!0&&vi.updateMatrix(),Dt.uvTransform.value.copy(vi.matrix))}function G(Dt,Ct){Dt.diffuse.value.copy(Ct.color),Dt.opacity.value=Ct.opacity,Dt.rotation.value=Ct.rotation,Ct.map&&(Dt.map.value=Ct.map),Ct.alphaMap&&(Dt.alphaMap.value=Ct.alphaMap);let Zn;Ct.map?Zn=Ct.map:Ct.alphaMap&&(Zn=Ct.alphaMap),Zn!==void 0&&(Zn.matrixAutoUpdate===!0&&Zn.updateMatrix(),Dt.uvTransform.value.copy(Zn.matrix))}function x(Dt,Ct){Ct.emissiveMap&&(Dt.emissiveMap.value=Ct.emissiveMap)}function H(Dt,Ct){Dt.specular.value.copy(Ct.specular),Dt.shininess.value=Math.max(Ct.shininess,1e-4),Ct.emissiveMap&&(Dt.emissiveMap.value=Ct.emissiveMap),Ct.bumpMap&&(Dt.bumpMap.value=Ct.bumpMap,Dt.bumpScale.value=Ct.bumpScale,Ct.side===Qw&&(Dt.bumpScale.value*=-1)),Ct.normalMap&&(Dt.normalMap.value=Ct.normalMap,Dt.normalScale.value.copy(Ct.normalScale),Ct.side===Qw&&Dt.normalScale.value.negate()),Ct.displacementMap&&(Dt.displacementMap.value=Ct.displacementMap,Dt.displacementScale.value=Ct.displacementScale,Dt.displacementBias.value=Ct.displacementBias)}function te(Dt,Ct){Ct.gradientMap&&(Dt.gradientMap.value=Ct.gradientMap),Ct.emissiveMap&&(Dt.emissiveMap.value=Ct.emissiveMap),Ct.bumpMap&&(Dt.bumpMap.value=Ct.bumpMap,Dt.bumpScale.value=Ct.bumpScale,Ct.side===Qw&&(Dt.bumpScale.value*=-1)),Ct.normalMap&&(Dt.normalMap.value=Ct.normalMap,Dt.normalScale.value.copy(Ct.normalScale),Ct.side===Qw&&Dt.normalScale.value.negate()),Ct.displacementMap&&(Dt.displacementMap.value=Ct.displacementMap,Dt.displacementScale.value=Ct.displacementScale,Dt.displacementBias.value=Ct.displacementBias)}function ne(Dt,Ct){Dt.roughness.value=Ct.roughness,Dt.metalness.value=Ct.metalness,Ct.roughnessMap&&(Dt.roughnessMap.value=Ct.roughnessMap),Ct.metalnessMap&&(Dt.metalnessMap.value=Ct.metalnessMap),Ct.emissiveMap&&(Dt.emissiveMap.value=Ct.emissiveMap),Ct.bumpMap&&(Dt.bumpMap.value=Ct.bumpMap,Dt.bumpScale.value=Ct.bumpScale,Ct.side===Qw&&(Dt.bumpScale.value*=-1)),Ct.normalMap&&(Dt.normalMap.value=Ct.normalMap,Dt.normalScale.value.copy(Ct.normalScale),Ct.side===Qw&&Dt.normalScale.value.negate()),Ct.displacementMap&&(Dt.displacementMap.value=Ct.displacementMap,Dt.displacementScale.value=Ct.displacementScale,Dt.displacementBias.value=Ct.displacementBias),p.get(Ct).envMap&&(Dt.envMapIntensity.value=Ct.envMapIntensity)}function Te(Dt,Ct){ne(Dt,Ct),Dt.reflectivity.value=Ct.reflectivity,Dt.clearcoat.value=Ct.clearcoat,Dt.clearcoatRoughness.value=Ct.clearcoatRoughness,Ct.sheen&&Dt.sheen.value.copy(Ct.sheen),Ct.clearcoatMap&&(Dt.clearcoatMap.value=Ct.clearcoatMap),Ct.clearcoatRoughnessMap&&(Dt.clearcoatRoughnessMap.value=Ct.clearcoatRoughnessMap),Ct.clearcoatNormalMap&&(Dt.clearcoatNormalScale.value.copy(Ct.clearcoatNormalScale),Dt.clearcoatNormalMap.value=Ct.clearcoatNormalMap,Ct.side===Qw&&Dt.clearcoatNormalScale.value.negate()),Dt.transmission.value=Ct.transmission,Ct.transmissionMap&&(Dt.transmissionMap.value=Ct.transmissionMap)}function Pe(Dt,Ct){Ct.matcap&&(Dt.matcap.value=Ct.matcap),Ct.bumpMap&&(Dt.bumpMap.value=Ct.bumpMap,Dt.bumpScale.value=Ct.bumpScale,Ct.side===Qw&&(Dt.bumpScale.value*=-1)),Ct.normalMap&&(Dt.normalMap.value=Ct.normalMap,Dt.normalScale.value.copy(Ct.normalScale),Ct.side===Qw&&Dt.normalScale.value.negate()),Ct.displacementMap&&(Dt.displacementMap.value=Ct.displacementMap,Dt.displacementScale.value=Ct.displacementScale,Dt.displacementBias.value=Ct.displacementBias)}function Ye(Dt,Ct){Ct.displacementMap&&(Dt.displacementMap.value=Ct.displacementMap,Dt.displacementScale.value=Ct.displacementScale,Dt.displacementBias.value=Ct.displacementBias)}function mt(Dt,Ct){Ct.displacementMap&&(Dt.displacementMap.value=Ct.displacementMap,Dt.displacementScale.value=Ct.displacementScale,Dt.displacementBias.value=Ct.displacementBias),Dt.referencePosition.value.copy(Ct.referencePosition),Dt.nearDistance.value=Ct.nearDistance,Dt.farDistance.value=Ct.farDistance}function Nt(Dt,Ct){Ct.bumpMap&&(Dt.bumpMap.value=Ct.bumpMap,Dt.bumpScale.value=Ct.bumpScale,Ct.side===Qw&&(Dt.bumpScale.value*=-1)),Ct.normalMap&&(Dt.normalMap.value=Ct.normalMap,Dt.normalScale.value.copy(Ct.normalScale),Ct.side===Qw&&Dt.normalScale.value.negate()),Ct.displacementMap&&(Dt.displacementMap.value=Ct.displacementMap,Dt.displacementScale.value=Ct.displacementScale,Dt.displacementBias.value=Ct.displacementBias)}return{refreshFogUniforms:o,refreshMaterialUniforms:r}}function tHe(){let p=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return p.style.display="block",p}function r3(p){p=p||{};let o=p.canvas!==void 0?p.canvas:tHe(),r=p.context!==void 0?p.context:null,d=p.alpha!==void 0?p.alpha:!1,m=p.depth!==void 0?p.depth:!0,O=p.stencil!==void 0?p.stencil:!0,C=p.antialias!==void 0?p.antialias:!1,G=p.premultipliedAlpha!==void 0?p.premultipliedAlpha:!0,x=p.preserveDrawingBuffer!==void 0?p.preserveDrawingBuffer:!1,H=p.powerPreference!==void 0?p.powerPreference:"default",te=p.failIfMajorPerformanceCaveat!==void 0?p.failIfMajorPerformanceCaveat:!1,ne=null,Te=null,Pe=[],Ye=[];this.domElement=o,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=_F,this.physicallyCorrectLights=!1,this.toneMapping=DX,this.toneMappingExposure=1;let mt=this,Nt=!1,Dt=0,Ct=0,Zn=null,Hn=-1,vi=null,en=new Ob,Ni=new Ob,Mi=null,Di=o.width,Ur=o.height,Er=1,yr=null,Gi=null,Ar=new Ob(0,0,Di,Ur),ur=new Ob(0,0,Di,Ur),Qi=!1,As=new vF,Wr=!1,Qr=!1,Bs=new vc,Qs=new $i,aa={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function qi(){return Zn===null?Er:1}let mr=r;function Ti(Kn,qn){for(let Or=0;Or<Kn.length;Or++){let Ts=Kn[Or],Ns=o.getContext(Ts,qn);if(Ns!==null)return Ns}return null}try{let Kn={alpha:d,depth:m,stencil:O,antialias:C,premultipliedAlpha:G,preserveDrawingBuffer:x,powerPreference:H,failIfMajorPerformanceCaveat:te};if(o.addEventListener("webglcontextlost",ao,!1),o.addEventListener("webglcontextrestored",wo,!1),mr===null){let qn=["webgl2","webgl","experimental-webgl"];if(mt.isWebGL1Renderer===!0&&qn.shift(),mr=Ti(qn,Kn),mr===null)throw Ti(qn)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}mr.getShaderPrecisionFormat===void 0&&(mr.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Kn){throw console.error("THREE.WebGLRenderer: "+Kn.message),Kn}let ui,tr,zr,Cr,Qt,ni,ii,pi,ji,$r,xi,ei,si,lr,rs,ga,Rs,jo,ia,ar,os,Zs;function Jr(){ui=new A9e(mr),tr=new I9e(mr,ui,p),ui.init(tr),os=new JBe(mr,ui,tr),zr=new ZBe(mr,ui,tr),Cr=new E9e(mr),Qt=new HBe,ni=new KBe(mr,ui,zr,Qt,tr,os,Cr),ii=new O9e(mt),pi=new Z7e(mr,tr),Zs=new y9e(mr,ui,pi,tr),ji=new _9e(mr,pi,Cr,Zs),$r=new S9e(mr,ji,pi,Cr),jo=new D9e(mr),rs=new w9e(Qt),xi=new BBe(mt,ii,ui,tr,Zs,rs),ei=new eHe(Qt),si=new qBe(Qt),lr=new YBe(ui,tr),Rs=new g9e(mt,ii,zr,$r,G),ga=new NMe(mt,$r,tr),ia=new M9e(mr,ui,Cr,tr),ar=new T9e(mr,ui,Cr,tr),Cr.programs=xi.programs,mt.capabilities=tr,mt.extensions=ui,mt.properties=Qt,mt.renderLists=si,mt.shadowMap=ga,mt.state=zr,mt.info=Cr}Jr();let Ds=new ype(mt,mr);this.xr=Ds,this.getContext=function(){return mr},this.getContextAttributes=function(){return mr.getContextAttributes()},this.forceContextLoss=function(){let Kn=ui.get("WEBGL_lose_context");Kn&&Kn.loseContext()},this.forceContextRestore=function(){let Kn=ui.get("WEBGL_lose_context");Kn&&Kn.restoreContext()},this.getPixelRatio=function(){return Er},this.setPixelRatio=function(Kn){Kn!==void 0&&(Er=Kn,this.setSize(Di,Ur,!1))},this.getSize=function(Kn){return Kn===void 0&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),Kn=new _o),Kn.set(Di,Ur)},this.setSize=function(Kn,qn,Or){if(Ds.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}Di=Kn,Ur=qn,o.width=Math.floor(Kn*Er),o.height=Math.floor(qn*Er),Or!==!1&&(o.style.width=Kn+"px",o.style.height=qn+"px"),this.setViewport(0,0,Kn,qn)},this.getDrawingBufferSize=function(Kn){return Kn===void 0&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),Kn=new _o),Kn.set(Di*Er,Ur*Er).floor()},this.setDrawingBufferSize=function(Kn,qn,Or){Di=Kn,Ur=qn,Er=Or,o.width=Math.floor(Kn*Or),o.height=Math.floor(qn*Or),this.setViewport(0,0,Kn,qn)},this.getCurrentViewport=function(Kn){return Kn===void 0&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),Kn=new Ob),Kn.copy(en)},this.getViewport=function(Kn){return Kn.copy(Ar)},this.setViewport=function(Kn,qn,Or,Ts){Kn.isVector4?Ar.set(Kn.x,Kn.y,Kn.z,Kn.w):Ar.set(Kn,qn,Or,Ts),zr.viewport(en.copy(Ar).multiplyScalar(Er).floor())},this.getScissor=function(Kn){return Kn.copy(ur)},this.setScissor=function(Kn,qn,Or,Ts){Kn.isVector4?ur.set(Kn.x,Kn.y,Kn.z,Kn.w):ur.set(Kn,qn,Or,Ts),zr.scissor(Ni.copy(ur).multiplyScalar(Er).floor())},this.getScissorTest=function(){return Qi},this.setScissorTest=function(Kn){zr.setScissorTest(Qi=Kn)},this.setOpaqueSort=function(Kn){yr=Kn},this.setTransparentSort=function(Kn){Gi=Kn},this.getClearColor=function(Kn){return Kn===void 0&&(console.warn("WebGLRenderer: .getClearColor() now requires a Color as an argument"),Kn=new C1),Kn.copy(Rs.getClearColor())},this.setClearColor=function(){Rs.setClearColor.apply(Rs,arguments)},this.getClearAlpha=function(){return Rs.getClearAlpha()},this.setClearAlpha=function(){Rs.setClearAlpha.apply(Rs,arguments)},this.clear=function(Kn,qn,Or){let Ts=0;(Kn===void 0||Kn)&&(Ts|=16384),(qn===void 0||qn)&&(Ts|=256),(Or===void 0||Or)&&(Ts|=1024),mr.clear(Ts)},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(){o.removeEventListener("webglcontextlost",ao,!1),o.removeEventListener("webglcontextrestored",wo,!1),si.dispose(),lr.dispose(),Qt.dispose(),ii.dispose(),$r.dispose(),Zs.dispose(),Ds.dispose(),Ds.removeEventListener("sessionstart",Po),Ds.removeEventListener("sessionend",xo),vo.stop()};function ao(Kn){Kn.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Nt=!0}function wo(){console.log("THREE.WebGLRenderer: Context Restored."),Nt=!1;let Kn=Cr.autoReset,qn=ga.enabled,Or=ga.autoUpdate,Ts=ga.needsUpdate,Ns=ga.type;Jr(),Cr.autoReset=Kn,ga.enabled=qn,ga.autoUpdate=Or,ga.needsUpdate=Ts,ga.type=Ns}function Xa(Kn){let qn=Kn.target;qn.removeEventListener("dispose",Xa),Yl(qn)}function Yl(Kn){pl(Kn),Qt.remove(Kn)}function pl(Kn){let qn=Qt.get(Kn).programs;qn!==void 0&&qn.forEach(function(Or){xi.releaseProgram(Or)})}function oo(Kn,qn){Kn.render(function(Or){mt.renderBufferImmediate(Or,qn)})}this.renderBufferImmediate=function(Kn,qn){Zs.initAttributes();let Or=Qt.get(Kn);Kn.hasPositions&&!Or.position&&(Or.position=mr.createBuffer()),Kn.hasNormals&&!Or.normal&&(Or.normal=mr.createBuffer()),Kn.hasUvs&&!Or.uv&&(Or.uv=mr.createBuffer()),Kn.hasColors&&!Or.color&&(Or.color=mr.createBuffer());let Ts=qn.getAttributes();Kn.hasPositions&&(mr.bindBuffer(34962,Or.position),mr.bufferData(34962,Kn.positionArray,35048),Zs.enableAttribute(Ts.position),mr.vertexAttribPointer(Ts.position,3,5126,!1,0,0)),Kn.hasNormals&&(mr.bindBuffer(34962,Or.normal),mr.bufferData(34962,Kn.normalArray,35048),Zs.enableAttribute(Ts.normal),mr.vertexAttribPointer(Ts.normal,3,5126,!1,0,0)),Kn.hasUvs&&(mr.bindBuffer(34962,Or.uv),mr.bufferData(34962,Kn.uvArray,35048),Zs.enableAttribute(Ts.uv),mr.vertexAttribPointer(Ts.uv,2,5126,!1,0,0)),Kn.hasColors&&(mr.bindBuffer(34962,Or.color),mr.bufferData(34962,Kn.colorArray,35048),Zs.enableAttribute(Ts.color),mr.vertexAttribPointer(Ts.color,3,5126,!1,0,0)),Zs.disableUnusedAttributes(),mr.drawArrays(4,0,Kn.count),Kn.count=0},this.renderBufferDirect=function(Kn,qn,Or,Ts,Ns,Ms){qn===null&&(qn=aa);let Vr=Ns.isMesh&&Ns.matrixWorld.determinant()<0,Ma=oi(Kn,qn,Ts,Ns);zr.setMaterial(Ts,Vr);let Fr=Or.index,Pr=Or.attributes.position;if(Fr===null){if(Pr===void 0||Pr.count===0)return}else if(Fr.count===0)return;let bs=1;Ts.wireframe===!0&&(Fr=ji.getWireframeAttribute(Or),bs=2),(Ts.morphTargets||Ts.morphNormals)&&jo.update(Ns,Or,Ts,Ma),Zs.setup(Ns,Ts,Ma,Or,Fr);let Qa,lo=ia;Fr!==null&&(Qa=pi.get(Fr),lo=ar,lo.setIndex(Qa));let hl=Fr!==null?Fr.count:Pr.count,Vo=Or.drawRange.start*bs,Oo=Or.drawRange.count*bs,Aa=Ms!==null?Ms.start*bs:0,go=Ms!==null?Ms.count*bs:1/0,Ao=Math.max(Vo,Aa),Xl=Math.min(hl,Vo+Oo,Aa+go)-1,v1=Math.max(0,Xl-Ao+1);if(v1!==0){if(Ns.isMesh)Ts.wireframe===!0?(zr.setLineWidth(Ts.wireframeLinewidth*qi()),lo.setMode(1)):lo.setMode(4);else if(Ns.isLine){let ml=Ts.linewidth;ml===void 0&&(ml=1),zr.setLineWidth(ml*qi()),Ns.isLineSegments?lo.setMode(1):Ns.isLineLoop?lo.setMode(2):lo.setMode(3)}else Ns.isPoints?lo.setMode(0):Ns.isSprite&&lo.setMode(4);if(Ns.isInstancedMesh)lo.renderInstances(Ao,v1,Ns.count);else if(Or.isInstancedBufferGeometry){let ml=Math.min(Or.instanceCount,Or._maxInstanceCount);lo.renderInstances(Ao,v1,ml)}else lo.render(Ao,v1)}},this.compile=function(Kn,qn){Te=lr.get(Kn),Te.init(),Kn.traverseVisible(function(Or){Or.isLight&&Or.layers.test(qn.layers)&&(Te.pushLight(Or),Or.castShadow&&Te.pushShadow(Or))}),Te.setupLights(),Kn.traverse(function(Or){let Ts=Or.material;if(Ts)if(Array.isArray(Ts))for(let Ns=0;Ns<Ts.length;Ns++){let Ms=Ts[Ns];j0(Ms,Kn,Or)}else j0(Ts,Kn,Or)})};let Wa=null;function J1(Kn){Wa&&Wa(Kn)}function Po(){vo.stop()}function xo(){vo.start()}let vo=new EMe;vo.setAnimationLoop(J1),typeof window<"u"&&vo.setContext(window),this.setAnimationLoop=function(Kn){Wa=Kn,Ds.setAnimationLoop(Kn),Kn===null?vo.stop():vo.start()},Ds.addEventListener("sessionstart",Po),Ds.addEventListener("sessionend",xo),this.render=function(Kn,qn){let Or,Ts;if(arguments[2]!==void 0&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),Or=arguments[2]),arguments[3]!==void 0&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),Ts=arguments[3]),qn!==void 0&&qn.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(Nt===!0)return;Kn.autoUpdate===!0&&Kn.updateMatrixWorld(),qn.parent===null&&qn.updateMatrixWorld(),Ds.enabled===!0&&Ds.isPresenting===!0&&(qn=Ds.getCamera(qn)),Kn.isScene===!0&&Kn.onBeforeRender(mt,Kn,qn,Or||Zn),Te=lr.get(Kn,Ye.length),Te.init(),Ye.push(Te),Bs.multiplyMatrices(qn.projectionMatrix,qn.matrixWorldInverse),As.setFromProjectionMatrix(Bs),Qr=this.localClippingEnabled,Wr=rs.init(this.clippingPlanes,Qr,qn),ne=si.get(Kn,Pe.length),ne.init(),Pe.push(ne),Oa(Kn,qn,0,mt.sortObjects),ne.finish(),mt.sortObjects===!0&&ne.sort(yr,Gi),Wr===!0&&rs.beginShadows();let Ns=Te.state.shadowsArray;ga.render(Ns,Kn,qn),Te.setupLights(),Te.setupLightsView(qn),Wr===!0&&rs.endShadows(),this.info.autoReset===!0&&this.info.reset(),Or!==void 0&&this.setRenderTarget(Or),Rs.render(ne,Kn,qn,Ts);let Ms=ne.opaque,Vr=ne.transparent;Ms.length>0&&Xr(Ms,Kn,qn),Vr.length>0&&Xr(Vr,Kn,qn),Zn!==null&&(ni.updateRenderTargetMipmap(Zn),ni.updateMultisampleRenderTarget(Zn)),Kn.isScene===!0&&Kn.onAfterRender(mt,Kn,qn),zr.buffers.depth.setTest(!0),zr.buffers.depth.setMask(!0),zr.buffers.color.setMask(!0),zr.setPolygonOffset(!1),Zs.resetDefaultState(),Hn=-1,vi=null,Ye.pop(),Ye.length>0?Te=Ye[Ye.length-1]:Te=null,Pe.pop(),Pe.length>0?ne=Pe[Pe.length-1]:ne=null};function Oa(Kn,qn,Or,Ts){if(Kn.visible===!1)return;if(Kn.layers.test(qn.layers)){if(Kn.isGroup)Or=Kn.renderOrder;else if(Kn.isLOD)Kn.autoUpdate===!0&&Kn.update(qn);else if(Kn.isLight)Te.pushLight(Kn),Kn.castShadow&&Te.pushShadow(Kn);else if(Kn.isSprite){if(!Kn.frustumCulled||As.intersectsSprite(Kn)){Ts&&Qs.setFromMatrixPosition(Kn.matrixWorld).applyMatrix4(Bs);let Vr=$r.update(Kn),Ma=Kn.material;Ma.visible&&ne.push(Kn,Vr,Ma,Or,Qs.z,null)}}else if(Kn.isImmediateRenderObject)Ts&&Qs.setFromMatrixPosition(Kn.matrixWorld).applyMatrix4(Bs),ne.push(Kn,null,Kn.material,Or,Qs.z,null);else if((Kn.isMesh||Kn.isLine||Kn.isPoints)&&(Kn.isSkinnedMesh&&Kn.skeleton.frame!==Cr.render.frame&&(Kn.skeleton.update(),Kn.skeleton.frame=Cr.render.frame),!Kn.frustumCulled||As.intersectsObject(Kn))){Ts&&Qs.setFromMatrixPosition(Kn.matrixWorld).applyMatrix4(Bs);let Vr=$r.update(Kn),Ma=Kn.material;if(Array.isArray(Ma)){let Fr=Vr.groups;for(let Pr=0,bs=Fr.length;Pr<bs;Pr++){let Qa=Fr[Pr],lo=Ma[Qa.materialIndex];lo&&lo.visible&&ne.push(Kn,Vr,lo,Or,Qs.z,Qa)}}else Ma.visible&&ne.push(Kn,Vr,Ma,Or,Qs.z,null)}}let Ms=Kn.children;for(let Vr=0,Ma=Ms.length;Vr<Ma;Vr++)Oa(Ms[Vr],qn,Or,Ts)}function Xr(Kn,qn,Or){let Ts=qn.isScene===!0?qn.overrideMaterial:null;for(let Ns=0,Ms=Kn.length;Ns<Ms;Ns++){let Vr=Kn[Ns],Ma=Vr.object,Fr=Vr.geometry,Pr=Ts===null?Vr.material:Ts,bs=Vr.group;if(Or.isArrayCamera){let Qa=Or.cameras;for(let lo=0,hl=Qa.length;lo<hl;lo++){let Vo=Qa[lo];Ma.layers.test(Vo.layers)&&(zr.viewport(en.copy(Vo.viewport)),Te.setupLightsView(Vo),ir(Ma,qn,Vo,Fr,Pr,bs))}}else ir(Ma,qn,Or,Fr,Pr,bs)}}function ir(Kn,qn,Or,Ts,Ns,Ms){if(Kn.onBeforeRender(mt,qn,Or,Ts,Ns,Ms),Kn.modelViewMatrix.multiplyMatrices(Or.matrixWorldInverse,Kn.matrixWorld),Kn.normalMatrix.getNormalMatrix(Kn.modelViewMatrix),Kn.isImmediateRenderObject){let Vr=oi(Or,qn,Ns,Kn);zr.setMaterial(Ns),Zs.reset(),oo(Kn,Vr)}else mt.renderBufferDirect(Or,qn,Ts,Ns,Kn,Ms);Kn.onAfterRender(mt,qn,Or,Ts,Ns,Ms)}function j0(Kn,qn,Or){qn.isScene!==!0&&(qn=aa);let Ts=Qt.get(Kn),Ns=Te.state.lights,Ms=Te.state.shadowsArray,Vr=Ns.state.version,Ma=xi.getParameters(Kn,Ns.state,Ms,qn,Or),Fr=xi.getProgramCacheKey(Ma),Pr=Ts.programs;Ts.environment=Kn.isMeshStandardMaterial?qn.environment:null,Ts.fog=qn.fog,Ts.envMap=ii.get(Kn.envMap||Ts.environment),Pr===void 0&&(Kn.addEventListener("dispose",Xa),Pr=new Map,Ts.programs=Pr);let bs=Pr.get(Fr);if(bs!==void 0){if(Ts.currentProgram===bs&&Ts.lightsStateVersion===Vr)return Wu(Kn,Ma),bs}else Ma.uniforms=xi.getUniforms(Kn),Kn.onBuild(Ma,mt),Kn.onBeforeCompile(Ma,mt),bs=xi.acquireProgram(Ma,Fr),Pr.set(Fr,bs),Ts.uniforms=Ma.uniforms;let Qa=Ts.uniforms;(!Kn.isShaderMaterial&&!Kn.isRawShaderMaterial||Kn.clipping===!0)&&(Qa.clippingPlanes=rs.uniform),Wu(Kn,Ma),Ts.needsLights=ys(Kn),Ts.lightsStateVersion=Vr,Ts.needsLights&&(Qa.ambientLightColor.value=Ns.state.ambient,Qa.lightProbe.value=Ns.state.probe,Qa.directionalLights.value=Ns.state.directional,Qa.directionalLightShadows.value=Ns.state.directionalShadow,Qa.spotLights.value=Ns.state.spot,Qa.spotLightShadows.value=Ns.state.spotShadow,Qa.rectAreaLights.value=Ns.state.rectArea,Qa.ltc_1.value=Ns.state.rectAreaLTC1,Qa.ltc_2.value=Ns.state.rectAreaLTC2,Qa.pointLights.value=Ns.state.point,Qa.pointLightShadows.value=Ns.state.pointShadow,Qa.hemisphereLights.value=Ns.state.hemi,Qa.directionalShadowMap.value=Ns.state.directionalShadowMap,Qa.directionalShadowMatrix.value=Ns.state.directionalShadowMatrix,Qa.spotShadowMap.value=Ns.state.spotShadowMap,Qa.spotShadowMatrix.value=Ns.state.spotShadowMatrix,Qa.pointShadowMap.value=Ns.state.pointShadowMap,Qa.pointShadowMatrix.value=Ns.state.pointShadowMatrix);let lo=bs.getUniforms(),hl=kR.seqWithValue(lo.seq,Qa);return Ts.currentProgram=bs,Ts.uniformsList=hl,bs}function Wu(Kn,qn){let Or=Qt.get(Kn);Or.outputEncoding=qn.outputEncoding,Or.instancing=qn.instancing,Or.numClippingPlanes=qn.numClippingPlanes,Or.numIntersection=qn.numClipIntersection,Or.vertexAlphas=qn.vertexAlphas}function oi(Kn,qn,Or,Ts){qn.isScene!==!0&&(qn=aa),ni.resetTextureUnits();let Ns=qn.fog,Ms=Or.isMeshStandardMaterial?qn.environment:null,Vr=Zn===null?mt.outputEncoding:Zn.texture.encoding,Ma=ii.get(Or.envMap||Ms),Fr=Or.vertexColors===!0&&Ts.geometry&&Ts.geometry.attributes.color&&Ts.geometry.attributes.color.itemSize===4,Pr=Qt.get(Or),bs=Te.state.lights;if(Wr===!0&&(Qr===!0||Kn!==vi)){let Ao=Kn===vi&&Or.id===Hn;rs.setState(Or,Kn,Ao)}let Qa=!1;Or.version===Pr.__version?(Pr.needsLights&&Pr.lightsStateVersion!==bs.state.version||Pr.outputEncoding!==Vr||Ts.isInstancedMesh&&Pr.instancing===!1||!Ts.isInstancedMesh&&Pr.instancing===!0||Pr.envMap!==Ma||Or.fog&&Pr.fog!==Ns||Pr.numClippingPlanes!==void 0&&(Pr.numClippingPlanes!==rs.numPlanes||Pr.numIntersection!==rs.numIntersection)||Pr.vertexAlphas!==Fr)&&(Qa=!0):(Qa=!0,Pr.__version=Or.version);let lo=Pr.currentProgram;Qa===!0&&(lo=j0(Or,qn,Ts));let hl=!1,Vo=!1,Oo=!1,Aa=lo.getUniforms(),go=Pr.uniforms;if(zr.useProgram(lo.program)&&(hl=!0,Vo=!0,Oo=!0),Or.id!==Hn&&(Hn=Or.id,Vo=!0),hl||vi!==Kn){if(Aa.setValue(mr,"projectionMatrix",Kn.projectionMatrix),tr.logarithmicDepthBuffer&&Aa.setValue(mr,"logDepthBufFC",2/(Math.log(Kn.far+1)/Math.LN2)),vi!==Kn&&(vi=Kn,Vo=!0,Oo=!0),Or.isShaderMaterial||Or.isMeshPhongMaterial||Or.isMeshToonMaterial||Or.isMeshStandardMaterial||Or.envMap){let Ao=Aa.map.cameraPosition;Ao!==void 0&&Ao.setValue(mr,Qs.setFromMatrixPosition(Kn.matrixWorld))}(Or.isMeshPhongMaterial||Or.isMeshToonMaterial||Or.isMeshLambertMaterial||Or.isMeshBasicMaterial||Or.isMeshStandardMaterial||Or.isShaderMaterial)&&Aa.setValue(mr,"isOrthographic",Kn.isOrthographicCamera===!0),(Or.isMeshPhongMaterial||Or.isMeshToonMaterial||Or.isMeshLambertMaterial||Or.isMeshBasicMaterial||Or.isMeshStandardMaterial||Or.isShaderMaterial||Or.isShadowMaterial||Or.skinning)&&Aa.setValue(mr,"viewMatrix",Kn.matrixWorldInverse)}if(Or.skinning){Aa.setOptional(mr,Ts,"bindMatrix"),Aa.setOptional(mr,Ts,"bindMatrixInverse");let Ao=Ts.skeleton;if(Ao){let Xl=Ao.bones;if(tr.floatVertexTextures){if(Ao.boneTexture===null){let v1=Math.sqrt(Xl.length*4);v1=L7e(v1),v1=Math.max(v1,4);let ml=new Float32Array(v1*v1*4);ml.set(Ao.boneMatrices);let Za=new C$(ml,v1,v1,sS,FR);Ao.boneMatrices=ml,Ao.boneTexture=Za,Ao.boneTextureSize=v1}Aa.setValue(mr,"boneTexture",Ao.boneTexture,ni),Aa.setValue(mr,"boneTextureSize",Ao.boneTextureSize)}else Aa.setOptional(mr,Ao,"boneMatrices")}}return(Vo||Pr.receiveShadow!==Ts.receiveShadow)&&(Pr.receiveShadow=Ts.receiveShadow,Aa.setValue(mr,"receiveShadow",Ts.receiveShadow)),Vo&&(Aa.setValue(mr,"toneMappingExposure",mt.toneMappingExposure),Pr.needsLights&&dl(go,Oo),Ns&&Or.fog&&ei.refreshFogUniforms(go,Ns),ei.refreshMaterialUniforms(go,Or,Er,Ur),kR.upload(mr,Pr.uniformsList,go,ni)),Or.isShaderMaterial&&Or.uniformsNeedUpdate===!0&&(kR.upload(mr,Pr.uniformsList,go,ni),Or.uniformsNeedUpdate=!1),Or.isSpriteMaterial&&Aa.setValue(mr,"center",Ts.center),Aa.setValue(mr,"modelViewMatrix",Ts.modelViewMatrix),Aa.setValue(mr,"normalMatrix",Ts.normalMatrix),Aa.setValue(mr,"modelMatrix",Ts.matrixWorld),lo}function dl(Kn,qn){Kn.ambientLightColor.needsUpdate=qn,Kn.lightProbe.needsUpdate=qn,Kn.directionalLights.needsUpdate=qn,Kn.directionalLightShadows.needsUpdate=qn,Kn.pointLights.needsUpdate=qn,Kn.pointLightShadows.needsUpdate=qn,Kn.spotLights.needsUpdate=qn,Kn.spotLightShadows.needsUpdate=qn,Kn.rectAreaLights.needsUpdate=qn,Kn.hemisphereLights.needsUpdate=qn}function ys(Kn){return Kn.isMeshLambertMaterial||Kn.isMeshToonMaterial||Kn.isMeshPhongMaterial||Kn.isMeshStandardMaterial||Kn.isShadowMaterial||Kn.isShaderMaterial&&Kn.lights===!0}this.getActiveCubeFace=function(){return Dt},this.getActiveMipmapLevel=function(){return Ct},this.getRenderTarget=function(){return Zn},this.setRenderTarget=function(Kn,qn=0,Or=0){Zn=Kn,Dt=qn,Ct=Or,Kn&&Qt.get(Kn).__webglFramebuffer===void 0&&ni.setupRenderTarget(Kn);let Ts=null,Ns=!1,Ms=!1;if(Kn){let Vr=Kn.texture;(Vr.isDataTexture3D||Vr.isDataTexture2DArray)&&(Ms=!0);let Ma=Qt.get(Kn).__webglFramebuffer;Kn.isWebGLCubeRenderTarget?(Ts=Ma[qn],Ns=!0):Kn.isWebGLMultisampleRenderTarget?Ts=Qt.get(Kn).__webglMultisampledFramebuffer:Ts=Ma,en.copy(Kn.viewport),Ni.copy(Kn.scissor),Mi=Kn.scissorTest}else en.copy(Ar).multiplyScalar(Er).floor(),Ni.copy(ur).multiplyScalar(Er).floor(),Mi=Qi;if(zr.bindFramebuffer(36160,Ts),zr.viewport(en),zr.scissor(Ni),zr.setScissorTest(Mi),Ns){let Vr=Qt.get(Kn.texture);mr.framebufferTexture2D(36160,36064,34069+qn,Vr.__webglTexture,Or)}else if(Ms){let Vr=Qt.get(Kn.texture),Ma=qn||0;mr.framebufferTextureLayer(36160,36064,Vr.__webglTexture,Or||0,Ma)}},this.readRenderTargetPixels=function(Kn,qn,Or,Ts,Ns,Ms,Vr){if(!(Kn&&Kn.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ma=Qt.get(Kn).__webglFramebuffer;if(Kn.isWebGLCubeRenderTarget&&Vr!==void 0&&(Ma=Ma[Vr]),Ma){zr.bindFramebuffer(36160,Ma);try{let Fr=Kn.texture,Pr=Fr.format,bs=Fr.type;if(Pr!==sS&&os.convert(Pr)!==mr.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Qa=bs===I$&&(ui.has("EXT_color_buffer_half_float")||tr.isWebGL2&&ui.has("EXT_color_buffer_float"));if(bs!==Rde&&os.convert(bs)!==mr.getParameter(35738)&&!(bs===FR&&(tr.isWebGL2||ui.has("OES_texture_float")||ui.has("WEBGL_color_buffer_float")))&&!Qa){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}mr.checkFramebufferStatus(36160)===36053?qn>=0&&qn<=Kn.width-Ts&&Or>=0&&Or<=Kn.height-Ns&&mr.readPixels(qn,Or,Ts,Ns,os.convert(Pr),os.convert(bs),Ms):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let Fr=Zn!==null?Qt.get(Zn).__webglFramebuffer:null;zr.bindFramebuffer(36160,Fr)}}},this.copyFramebufferToTexture=function(Kn,qn,Or=0){let Ts=Math.pow(2,-Or),Ns=Math.floor(qn.image.width*Ts),Ms=Math.floor(qn.image.height*Ts),Vr=os.convert(qn.format);ni.setTexture2D(qn,0),mr.copyTexImage2D(3553,Or,Vr,Kn.x,Kn.y,Ns,Ms,0),zr.unbindTexture()},this.copyTextureToTexture=function(Kn,qn,Or,Ts=0){let Ns=qn.image.width,Ms=qn.image.height,Vr=os.convert(Or.format),Ma=os.convert(Or.type);ni.setTexture2D(Or,0),mr.pixelStorei(37440,Or.flipY),mr.pixelStorei(37441,Or.premultiplyAlpha),mr.pixelStorei(3317,Or.unpackAlignment),qn.isDataTexture?mr.texSubImage2D(3553,Ts,Kn.x,Kn.y,Ns,Ms,Vr,Ma,qn.image.data):qn.isCompressedTexture?mr.compressedTexSubImage2D(3553,Ts,Kn.x,Kn.y,qn.mipmaps[0].width,qn.mipmaps[0].height,Vr,qn.mipmaps[0].data):mr.texSubImage2D(3553,Ts,Kn.x,Kn.y,Vr,Ma,qn.image),Ts===0&&Or.generateMipmaps&&mr.generateMipmap(3553),zr.unbindTexture()},this.copyTextureToTexture3D=function(Kn,qn,Or,Ts,Ns=0){if(mt.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let{width:Ms,height:Vr,data:Ma}=Or.image,Fr=os.convert(Ts.format),Pr=os.convert(Ts.type),bs;if(Ts.isDataTexture3D)ni.setTexture3D(Ts,0),bs=32879;else if(Ts.isDataTexture2DArray)ni.setTexture2DArray(Ts,0),bs=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}mr.pixelStorei(37440,Ts.flipY),mr.pixelStorei(37441,Ts.premultiplyAlpha),mr.pixelStorei(3317,Ts.unpackAlignment);let Qa=mr.getParameter(3314),lo=mr.getParameter(32878),hl=mr.getParameter(3316),Vo=mr.getParameter(3315),Oo=mr.getParameter(32877);mr.pixelStorei(3314,Ms),mr.pixelStorei(32878,Vr),mr.pixelStorei(3316,Kn.min.x),mr.pixelStorei(3315,Kn.min.y),mr.pixelStorei(32877,Kn.min.z),mr.texSubImage3D(bs,Ns,qn.x,qn.y,qn.z,Kn.max.x-Kn.min.x+1,Kn.max.y-Kn.min.y+1,Kn.max.z-Kn.min.z+1,Fr,Pr,Ma),mr.pixelStorei(3314,Qa),mr.pixelStorei(32878,lo),mr.pixelStorei(3316,hl),mr.pixelStorei(3315,Vo),mr.pixelStorei(32877,Oo),Ns===0&&Ts.generateMipmaps&&mr.generateMipmap(bs),zr.unbindTexture()},this.initTexture=function(Kn){ni.setTexture2D(Kn,0),zr.unbindTexture()},this.resetState=function(){Dt=0,Ct=0,Zn=null,zr.reset(),Zs.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}var Mpe=class extends r3{};Mpe.prototype.isWebGL1Renderer=!0;var Ipe=class p{constructor(o,r=25e-5){this.name="",this.color=new C1(o),this.density=r}clone(){return new p(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};Ipe.prototype.isFogExp2=!0;var wpe=class p{constructor(o,r=1,d=1e3){this.name="",this.color=new C1(o),this.near=r,this.far=d}clone(){return new p(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};wpe.prototype.isFog=!0;var N$=class extends mv{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(o,r){return super.copy(o,r),o.background!==null&&(this.background=o.background.clone()),o.environment!==null&&(this.environment=o.environment.clone()),o.fog!==null&&(this.fog=o.fog.clone()),o.overrideMaterial!==null&&(this.overrideMaterial=o.overrideMaterial.clone()),this.autoUpdate=o.autoUpdate,this.matrixAutoUpdate=o.matrixAutoUpdate,this}toJSON(o){let r=super.toJSON(o);return this.background!==null&&(r.object.background=this.background.toJSON(o)),this.environment!==null&&(r.object.environment=this.environment.toJSON(o)),this.fog!==null&&(r.object.fog=this.fog.toJSON()),r}};N$.prototype.isScene=!0;var SB=class p{constructor(o,r){this.array=o,this.stride=r,this.count=o!==void 0?o.length/r:0,this.usage=BX,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=aS(),this.onUploadCallback=function(){}}set needsUpdate(o){o===!0&&this.version++}setUsage(o){return this.usage=o,this}copy(o){return this.array=new o.array.constructor(o.array),this.count=o.count,this.stride=o.stride,this.usage=o.usage,this}copyAt(o,r,d){o*=this.stride,d*=r.stride;for(let m=0,O=this.stride;m<O;m++)this.array[o+m]=r.array[d+m];return this}set(o,r=0){return this.array.set(o,r),this}clone(o){o.arrayBuffers===void 0&&(o.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=aS()),o.arrayBuffers[this.array.buffer._uuid]===void 0&&(o.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let r=new this.array.constructor(o.arrayBuffers[this.array.buffer._uuid]),d=new p(r,this.stride);return d.setUsage(this.usage),d}onUpload(o){return this.onUploadCallback=o,this}toJSON(o){return o.arrayBuffers===void 0&&(o.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=aS()),o.arrayBuffers[this.array.buffer._uuid]===void 0&&(o.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}};SB.prototype.isInterleavedBuffer=!0;var QI=new $i,WX=class p{constructor(o,r,d,m){this.name="",this.data=o,this.itemSize=r,this.offset=d,this.normalized=m===!0}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(o){this.data.needsUpdate=o}applyMatrix4(o){for(let r=0,d=this.data.count;r<d;r++)QI.x=this.getX(r),QI.y=this.getY(r),QI.z=this.getZ(r),QI.applyMatrix4(o),this.setXYZ(r,QI.x,QI.y,QI.z);return this}applyNormalMatrix(o){for(let r=0,d=this.count;r<d;r++)QI.x=this.getX(r),QI.y=this.getY(r),QI.z=this.getZ(r),QI.applyNormalMatrix(o),this.setXYZ(r,QI.x,QI.y,QI.z);return this}transformDirection(o){for(let r=0,d=this.count;r<d;r++)QI.x=this.getX(r),QI.y=this.getY(r),QI.z=this.getZ(r),QI.transformDirection(o),this.setXYZ(r,QI.x,QI.y,QI.z);return this}setX(o,r){return this.data.array[o*this.data.stride+this.offset]=r,this}setY(o,r){return this.data.array[o*this.data.stride+this.offset+1]=r,this}setZ(o,r){return this.data.array[o*this.data.stride+this.offset+2]=r,this}setW(o,r){return this.data.array[o*this.data.stride+this.offset+3]=r,this}getX(o){return this.data.array[o*this.data.stride+this.offset]}getY(o){return this.data.array[o*this.data.stride+this.offset+1]}getZ(o){return this.data.array[o*this.data.stride+this.offset+2]}getW(o){return this.data.array[o*this.data.stride+this.offset+3]}setXY(o,r,d){return o=o*this.data.stride+this.offset,this.data.array[o+0]=r,this.data.array[o+1]=d,this}setXYZ(o,r,d,m){return o=o*this.data.stride+this.offset,this.data.array[o+0]=r,this.data.array[o+1]=d,this.data.array[o+2]=m,this}setXYZW(o,r,d,m,O){return o=o*this.data.stride+this.offset,this.data.array[o+0]=r,this.data.array[o+1]=d,this.data.array[o+2]=m,this.data.array[o+3]=O,this}clone(o){if(o===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");let r=[];for(let d=0;d<this.count;d++){let m=d*this.data.stride+this.offset;for(let O=0;O<this.itemSize;O++)r.push(this.data.array[m+O])}return new IM(new this.array.constructor(r),this.itemSize,this.normalized)}else return o.interleavedBuffers===void 0&&(o.interleavedBuffers={}),o.interleavedBuffers[this.data.uuid]===void 0&&(o.interleavedBuffers[this.data.uuid]=this.data.clone(o)),new p(o.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(o){if(o===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");let r=[];for(let d=0;d<this.count;d++){let m=d*this.data.stride+this.offset;for(let O=0;O<this.itemSize;O++)r.push(this.data.array[m+O])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:r,normalized:this.normalized}}else return o.interleavedBuffers===void 0&&(o.interleavedBuffers={}),o.interleavedBuffers[this.data.uuid]===void 0&&(o.interleavedBuffers[this.data.uuid]=this.data.toJSON(o)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}};WX.prototype.isInterleavedBufferAttribute=!0;var P$=class extends Zw{constructor(o){super(),this.type="SpriteMaterial",this.color=new C1(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(o)}copy(o){return super.copy(o),this.color.copy(o.color),this.map=o.map,this.alphaMap=o.alphaMap,this.rotation=o.rotation,this.sizeAttenuation=o.sizeAttenuation,this}};P$.prototype.isSpriteMaterial=!0;var rF,IX=new $i,sF=new $i,aF=new $i,oF=new _o,wX=new _o,PMe=new vc,s$=new $i,OX=new $i,a$=new $i,Uye=new _o,ipe=new _o,Gye=new _o,Ope=class extends mv{constructor(o){if(super(),this.type="Sprite",rF===void 0){rF=new c3;let r=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),d=new SB(r,5);rF.setIndex([0,1,2,0,2,3]),rF.setAttribute("position",new WX(d,3,0,!1)),rF.setAttribute("uv",new WX(d,2,3,!1))}this.geometry=rF,this.material=o!==void 0?o:new P$,this.center=new _o(.5,.5)}raycast(o,r){o.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),sF.setFromMatrixScale(this.matrixWorld),PMe.copy(o.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(o.camera.matrixWorldInverse,this.matrixWorld),aF.setFromMatrixPosition(this.modelViewMatrix),o.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&sF.multiplyScalar(-aF.z);let d=this.material.rotation,m,O;d!==0&&(O=Math.cos(d),m=Math.sin(d));let C=this.center;o$(s$.set(-.5,-.5,0),aF,C,sF,m,O),o$(OX.set(.5,-.5,0),aF,C,sF,m,O),o$(a$.set(.5,.5,0),aF,C,sF,m,O),Uye.set(0,0),ipe.set(1,0),Gye.set(1,1);let G=o.ray.intersectTriangle(s$,OX,a$,!1,IX);if(G===null&&(o$(OX.set(-.5,.5,0),aF,C,sF,m,O),ipe.set(0,1),G=o.ray.intersectTriangle(s$,a$,OX,!1,IX),G===null))return;let x=o.ray.origin.distanceTo(IX);x<o.near||x>o.far||r.push({distance:x,point:IX.clone(),uv:r5.getUV(IX,s$,OX,a$,Uye,ipe,Gye,new _o),face:null,object:this})}copy(o){return super.copy(o),o.center!==void 0&&this.center.copy(o.center),this.material=o.material,this}};Ope.prototype.isSprite=!0;function o$(p,o,r,d,m,O){oF.subVectors(p,r).addScalar(.5).multiply(d),m!==void 0?(wX.x=O*oF.x-m*oF.y,wX.y=m*oF.x+O*oF.y):wX.copy(oF),p.copy(o),p.x+=wX.x,p.y+=wX.y,p.applyMatrix4(PMe)}var jye=new $i,Vye=new Ob,Yye=new Ob,nHe=new $i,Xye=new vc,B$=class extends Dz{constructor(o,r){super(o,r),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new vc,this.bindMatrixInverse=new vc}copy(o){return super.copy(o),this.bindMode=o.bindMode,this.bindMatrix.copy(o.bindMatrix),this.bindMatrixInverse.copy(o.bindMatrixInverse),this.skeleton=o.skeleton,this}bind(o,r){this.skeleton=o,r===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),r=this.matrixWorld),this.bindMatrix.copy(r),this.bindMatrixInverse.copy(r).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){let o=new Ob,r=this.geometry.attributes.skinWeight;for(let d=0,m=r.count;d<m;d++){o.x=r.getX(d),o.y=r.getY(d),o.z=r.getZ(d),o.w=r.getW(d);let O=1/o.manhattanLength();O!==1/0?o.multiplyScalar(O):o.set(1,0,0,0),r.setXYZW(d,o.x,o.y,o.z,o.w)}}updateMatrixWorld(o){super.updateMatrixWorld(o),this.bindMode==="attached"?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode==="detached"?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(o,r){let d=this.skeleton,m=this.geometry;Vye.fromBufferAttribute(m.attributes.skinIndex,o),Yye.fromBufferAttribute(m.attributes.skinWeight,o),jye.fromBufferAttribute(m.attributes.position,o).applyMatrix4(this.bindMatrix),r.set(0,0,0);for(let O=0;O<4;O++){let C=Yye.getComponent(O);if(C!==0){let G=Vye.getComponent(O);Xye.multiplyMatrices(d.bones[G].matrixWorld,d.boneInverses[G]),r.addScaledVector(nHe.copy(jye).applyMatrix4(Xye),C)}}return r.applyMatrix4(this.bindMatrixInverse)}};B$.prototype.isSkinnedMesh=!0;var Ape=class extends mv{constructor(){super(),this.type="Bone"}};Ape.prototype.isBone=!0;var Qye=new vc,Zye=new vc,l$=[],AX=new Dz,_pe=class extends Dz{constructor(o,r,d){super(o,r),this.instanceMatrix=new IM(new Float32Array(d*16),16),this.instanceColor=null,this.count=d,this.frustumCulled=!1}copy(o){return super.copy(o),this.instanceMatrix.copy(o.instanceMatrix),o.instanceColor!==null&&(this.instanceColor=o.instanceColor.clone()),this.count=o.count,this}getColorAt(o,r){r.fromArray(this.instanceColor.array,o*3)}getMatrixAt(o,r){r.fromArray(this.instanceMatrix.array,o*16)}raycast(o,r){let d=this.matrixWorld,m=this.count;if(AX.geometry=this.geometry,AX.material=this.material,AX.material!==void 0)for(let O=0;O<m;O++){this.getMatrixAt(O,Qye),Zye.multiplyMatrices(d,Qye),AX.matrixWorld=Zye,AX.raycast(o,l$);for(let C=0,G=l$.length;C<G;C++){let x=l$[C];x.instanceId=O,x.object=this,r.push(x)}l$.length=0}}setColorAt(o,r){this.instanceColor===null&&(this.instanceColor=new IM(new Float32Array(this.count*3),3)),r.toArray(this.instanceColor.array,o*3)}setMatrixAt(o,r){r.toArray(this.instanceMatrix.array,o*16)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}};_pe.prototype.isInstancedMesh=!0;var LB=class extends Zw{constructor(o){super(),this.type="LineBasicMaterial",this.color=new C1(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(o)}copy(o){return super.copy(o),this.color.copy(o.color),this.linewidth=o.linewidth,this.linecap=o.linecap,this.linejoin=o.linejoin,this.morphTargets=o.morphTargets,this}};LB.prototype.isLineBasicMaterial=!0;var Kye=new $i,Jye=new $i,$ye=new vc,rpe=new GR,c$=new UR,UX=class extends mv{constructor(o=new c3,r=new LB){super(),this.type="Line",this.geometry=o,this.material=r,this.updateMorphTargets()}copy(o){return super.copy(o),this.material=o.material,this.geometry=o.geometry,this}computeLineDistances(){let o=this.geometry;if(o.isBufferGeometry)if(o.index===null){let r=o.attributes.position,d=[0];for(let m=1,O=r.count;m<O;m++)Kye.fromBufferAttribute(r,m-1),Jye.fromBufferAttribute(r,m),d[m]=d[m-1],d[m]+=Kye.distanceTo(Jye);o.setAttribute("lineDistance",new r4(d,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else o.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(o,r){let d=this.geometry,m=this.matrixWorld,O=o.params.Line.threshold,C=d.drawRange;if(d.boundingSphere===null&&d.computeBoundingSphere(),c$.copy(d.boundingSphere),c$.applyMatrix4(m),c$.radius+=O,o.ray.intersectsSphere(c$)===!1)return;$ye.copy(m).invert(),rpe.copy(o.ray).applyMatrix4($ye);let G=O/((this.scale.x+this.scale.y+this.scale.z)/3),x=G*G,H=new $i,te=new $i,ne=new $i,Te=new $i,Pe=this.isLineSegments?2:1;if(d.isBufferGeometry){let Ye=d.index,Nt=d.attributes.position;if(Ye!==null){let Dt=Math.max(0,C.start),Ct=Math.min(Ye.count,C.start+C.count);for(let Zn=Dt,Hn=Ct-1;Zn<Hn;Zn+=Pe){let vi=Ye.getX(Zn),en=Ye.getX(Zn+1);if(H.fromBufferAttribute(Nt,vi),te.fromBufferAttribute(Nt,en),rpe.distanceSqToSegment(H,te,Te,ne)>x)continue;Te.applyMatrix4(this.matrixWorld);let Mi=o.ray.origin.distanceTo(Te);Mi<o.near||Mi>o.far||r.push({distance:Mi,point:ne.clone().applyMatrix4(this.matrixWorld),index:Zn,face:null,faceIndex:null,object:this})}}else{let Dt=Math.max(0,C.start),Ct=Math.min(Nt.count,C.start+C.count);for(let Zn=Dt,Hn=Ct-1;Zn<Hn;Zn+=Pe){if(H.fromBufferAttribute(Nt,Zn),te.fromBufferAttribute(Nt,Zn+1),rpe.distanceSqToSegment(H,te,Te,ne)>x)continue;Te.applyMatrix4(this.matrixWorld);let en=o.ray.origin.distanceTo(Te);en<o.near||en>o.far||r.push({distance:en,point:ne.clone().applyMatrix4(this.matrixWorld),index:Zn,face:null,faceIndex:null,object:this})}}}else d.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let o=this.geometry;if(o.isBufferGeometry){let r=o.morphAttributes,d=Object.keys(r);if(d.length>0){let m=r[d[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let O=0,C=m.length;O<C;O++){let G=m[O].name||String(O);this.morphTargetInfluences.push(0),this.morphTargetDictionary[G]=O}}}}else{let r=o.morphTargets;r!==void 0&&r.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};UX.prototype.isLine=!0;var eMe=new $i,tMe=new $i,GX=class extends UX{constructor(o,r){super(o,r),this.type="LineSegments"}computeLineDistances(){let o=this.geometry;if(o.isBufferGeometry)if(o.index===null){let r=o.attributes.position,d=[];for(let m=0,O=r.count;m<O;m+=2)eMe.fromBufferAttribute(r,m),tMe.fromBufferAttribute(r,m+1),d[m]=m===0?0:d[m-1],d[m+1]=d[m]+eMe.distanceTo(tMe);o.setAttribute("lineDistance",new r4(d,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else o.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}};GX.prototype.isLineSegments=!0;var Tpe=class extends UX{constructor(o,r){super(o,r),this.type="LineLoop"}};Tpe.prototype.isLineLoop=!0;var H$=class extends Zw{constructor(o){super(),this.type="PointsMaterial",this.color=new C1(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(o)}copy(o){return super.copy(o),this.color.copy(o.color),this.map=o.map,this.alphaMap=o.alphaMap,this.size=o.size,this.sizeAttenuation=o.sizeAttenuation,this.morphTargets=o.morphTargets,this}};H$.prototype.isPointsMaterial=!0;var nMe=new vc,Epe=new GR,u$=new UR,p$=new $i,zpe=class extends mv{constructor(o=new c3,r=new H$){super(),this.type="Points",this.geometry=o,this.material=r,this.updateMorphTargets()}copy(o){return super.copy(o),this.material=o.material,this.geometry=o.geometry,this}raycast(o,r){let d=this.geometry,m=this.matrixWorld,O=o.params.Points.threshold,C=d.drawRange;if(d.boundingSphere===null&&d.computeBoundingSphere(),u$.copy(d.boundingSphere),u$.applyMatrix4(m),u$.radius+=O,o.ray.intersectsSphere(u$)===!1)return;nMe.copy(m).invert(),Epe.copy(o.ray).applyMatrix4(nMe);let G=O/((this.scale.x+this.scale.y+this.scale.z)/3),x=G*G;if(d.isBufferGeometry){let H=d.index,ne=d.attributes.position;if(H!==null){let Te=Math.max(0,C.start),Pe=Math.min(H.count,C.start+C.count);for(let Ye=Te,mt=Pe;Ye<mt;Ye++){let Nt=H.getX(Ye);p$.fromBufferAttribute(ne,Nt),iMe(p$,Nt,x,m,o,r,this)}}else{let Te=Math.max(0,C.start),Pe=Math.min(ne.count,C.start+C.count);for(let Ye=Te,mt=Pe;Ye<mt;Ye++)p$.fromBufferAttribute(ne,Ye),iMe(p$,Ye,x,m,o,r,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let o=this.geometry;if(o.isBufferGeometry){let r=o.morphAttributes,d=Object.keys(r);if(d.length>0){let m=r[d[0]];if(m!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let O=0,C=m.length;O<C;O++){let G=m[O].name||String(O);this.morphTargetInfluences.push(0),this.morphTargetDictionary[G]=O}}}}else{let r=o.morphTargets;r!==void 0&&r.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};zpe.prototype.isPoints=!0;function iMe(p,o,r,d,m,O,C){let G=Epe.distanceSqToPoint(p);if(G<r){let x=new $i;Epe.closestPointToPoint(p,x),x.applyMatrix4(d);let H=m.ray.origin.distanceTo(x);if(H<m.near||H>m.far)return;O.push({distance:H,distanceToRay:Math.sqrt(G),point:x,index:o,face:null,object:C})}}var Cpe=class extends s5{constructor(o,r,d,m,O,C,G,x,H){super(o,r,d,m,O,C,G,x,H),this.format=G!==void 0?G:DB,this.minFilter=C!==void 0?C:jz,this.magFilter=O!==void 0?O:jz,this.generateMipmaps=!1;let te=this;function ne(){te.needsUpdate=!0,o.requestVideoFrameCallback(ne)}"requestVideoFrameCallback"in o&&o.requestVideoFrameCallback(ne)}clone(){return new this.constructor(this.image).copy(this)}update(){let o=this.image;"requestVideoFrameCallback"in o===!1&&o.readyState>=o.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}};Cpe.prototype.isVideoTexture=!0;var Dpe=class extends s5{constructor(o,r,d,m,O,C,G,x,H,te,ne,Te){super(null,C,G,x,H,te,m,O,ne,Te),this.image={width:r,height:d},this.mipmaps=o,this.flipY=!1,this.generateMipmaps=!1}};Dpe.prototype.isCompressedTexture=!0;var Spe=class extends s5{constructor(o,r,d,m,O,C,G,x,H){super(o,r,d,m,O,C,G,x,H),this.needsUpdate=!0}};Spe.prototype.isCanvasTexture=!0;var Lpe=class extends s5{constructor(o,r,d,m,O,C,G,x,H,te){if(te=te!==void 0?te:hF,te!==hF&&te!==PX)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");d===void 0&&te===hF&&(d=M$),d===void 0&&te===PX&&(d=SX),super(null,m,O,C,G,x,te,d,H),this.image={width:o,height:r},this.magFilter=G!==void 0?G:k_,this.minFilter=x!==void 0?x:k_,this.flipY=!1,this.generateMipmaps=!1}};Lpe.prototype.isDepthTexture=!0;var SBt=new $i,LBt=new $i,xBt=new $i,RBt=new r5;var iHe={triangulate:function(p,o,r){r=r||2;let d=o&&o.length,m=d?o[0]*r:p.length,O=BMe(p,0,m,r,!0),C=[];if(!O||O.next===O.prev)return C;let G,x,H,te,ne,Te,Pe;if(d&&(O=lHe(p,o,O,r)),p.length>80*r){G=H=p[0],x=te=p[1];for(let Ye=r;Ye<m;Ye+=r)ne=p[Ye],Te=p[Ye+1],ne<G&&(G=ne),Te<x&&(x=Te),ne>H&&(H=ne),Te>te&&(te=Te);Pe=Math.max(H-G,te-x),Pe=Pe!==0?1/Pe:0}return jX(O,C,r,G,x,Pe),C}};function BMe(p,o,r,d,m){let O,C;if(m===yHe(p,o,r,d)>0)for(O=o;O<r;O+=d)C=rMe(O,p[O],p[O+1],C);else for(O=r-d;O>=o;O-=d)C=rMe(O,p[O],p[O+1],C);return C&&nee(C,C.next)&&(YX(C),C=C.next),C}function jR(p,o){if(!p)return p;o||(o=p);let r=p,d;do if(d=!1,!r.steiner&&(nee(r,r.next)||MM(r.prev,r,r.next)===0)){if(YX(r),r=o=r.prev,r===r.next)break;d=!0}else r=r.next;while(d||r!==o);return o}function jX(p,o,r,d,m,O,C){if(!p)return;!C&&O&&hHe(p,d,m,O);let G=p,x,H;for(;p.prev!==p.next;){if(x=p.prev,H=p.next,O?sHe(p,d,m,O):rHe(p)){o.push(x.i/r),o.push(p.i/r),o.push(H.i/r),YX(p),p=H.next,G=H.next;continue}if(p=H,p===G){C?C===1?(p=aHe(jR(p),o,r),jX(p,o,r,d,m,O,2)):C===2&&oHe(p,o,r,d,m,O):jX(jR(p),o,r,d,m,O,1);break}}}function rHe(p){let o=p.prev,r=p,d=p.next;if(MM(o,r,d)>=0)return!1;let m=p.next.next;for(;m!==p.prev;){if(dF(o.x,o.y,r.x,r.y,d.x,d.y,m.x,m.y)&&MM(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function sHe(p,o,r,d){let m=p.prev,O=p,C=p.next;if(MM(m,O,C)>=0)return!1;let G=m.x<O.x?m.x<C.x?m.x:C.x:O.x<C.x?O.x:C.x,x=m.y<O.y?m.y<C.y?m.y:C.y:O.y<C.y?O.y:C.y,H=m.x>O.x?m.x>C.x?m.x:C.x:O.x>C.x?O.x:C.x,te=m.y>O.y?m.y>C.y?m.y:C.y:O.y>C.y?O.y:C.y,ne=xpe(G,x,o,r,d),Te=xpe(H,te,o,r,d),Pe=p.prevZ,Ye=p.nextZ;for(;Pe&&Pe.z>=ne&&Ye&&Ye.z<=Te;){if(Pe!==p.prev&&Pe!==p.next&&dF(m.x,m.y,O.x,O.y,C.x,C.y,Pe.x,Pe.y)&&MM(Pe.prev,Pe,Pe.next)>=0||(Pe=Pe.prevZ,Ye!==p.prev&&Ye!==p.next&&dF(m.x,m.y,O.x,O.y,C.x,C.y,Ye.x,Ye.y)&&MM(Ye.prev,Ye,Ye.next)>=0))return!1;Ye=Ye.nextZ}for(;Pe&&Pe.z>=ne;){if(Pe!==p.prev&&Pe!==p.next&&dF(m.x,m.y,O.x,O.y,C.x,C.y,Pe.x,Pe.y)&&MM(Pe.prev,Pe,Pe.next)>=0)return!1;Pe=Pe.prevZ}for(;Ye&&Ye.z<=Te;){if(Ye!==p.prev&&Ye!==p.next&&dF(m.x,m.y,O.x,O.y,C.x,C.y,Ye.x,Ye.y)&&MM(Ye.prev,Ye,Ye.next)>=0)return!1;Ye=Ye.nextZ}return!0}function aHe(p,o,r){let d=p;do{let m=d.prev,O=d.next.next;!nee(m,O)&&HMe(m,d,d.next,O)&&VX(m,O)&&VX(O,m)&&(o.push(m.i/r),o.push(d.i/r),o.push(O.i/r),YX(d),YX(d.next),d=p=O),d=d.next}while(d!==p);return jR(d)}function oHe(p,o,r,d,m,O){let C=p;do{let G=C.next.next;for(;G!==C.prev;){if(C.i!==G.i&&bHe(C,G)){let x=FMe(C,G);C=jR(C,C.next),x=jR(x,x.next),jX(C,o,r,d,m,O),jX(x,o,r,d,m,O);return}G=G.next}C=C.next}while(C!==p)}function lHe(p,o,r,d){let m=[],O,C,G,x,H;for(O=0,C=o.length;O<C;O++)G=o[O]*d,x=O<C-1?o[O+1]*d:p.length,H=BMe(p,G,x,d,!1),H===H.next&&(H.steiner=!0),m.push(mHe(H));for(m.sort(cHe),O=0;O<m.length;O++)uHe(m[O],r),r=jR(r,r.next);return r}function cHe(p,o){return p.x-o.x}function uHe(p,o){if(o=pHe(p,o),o){let r=FMe(o,p);jR(o,o.next),jR(r,r.next)}}function pHe(p,o){let r=o,d=p.x,m=p.y,O=-1/0,C;do{if(m<=r.y&&m>=r.next.y&&r.next.y!==r.y){let Te=r.x+(m-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(Te<=d&&Te>O){if(O=Te,Te===d){if(m===r.y)return r;if(m===r.next.y)return r.next}C=r.x<r.next.x?r:r.next}}r=r.next}while(r!==o);if(!C)return null;if(d===O)return C;let G=C,x=C.x,H=C.y,te=1/0,ne;r=C;do d>=r.x&&r.x>=x&&d!==r.x&&dF(m<H?d:O,m,x,H,m<H?O:d,m,r.x,r.y)&&(ne=Math.abs(m-r.y)/(d-r.x),VX(r,p)&&(ne<te||ne===te&&(r.x>C.x||r.x===C.x&&dHe(C,r)))&&(C=r,te=ne)),r=r.next;while(r!==G);return C}function dHe(p,o){return MM(p.prev,p,o.prev)<0&&MM(o.next,p,p.next)<0}function hHe(p,o,r,d){let m=p;do m.z===null&&(m.z=xpe(m.x,m.y,o,r,d)),m.prevZ=m.prev,m.nextZ=m.next,m=m.next;while(m!==p);m.prevZ.nextZ=null,m.prevZ=null,fHe(m)}function fHe(p){let o,r,d,m,O,C,G,x,H=1;do{for(r=p,p=null,O=null,C=0;r;){for(C++,d=r,G=0,o=0;o<H&&(G++,d=d.nextZ,!!d);o++);for(x=H;G>0||x>0&&d;)G!==0&&(x===0||!d||r.z<=d.z)?(m=r,r=r.nextZ,G--):(m=d,d=d.nextZ,x--),O?O.nextZ=m:p=m,m.prevZ=O,O=m;r=d}O.nextZ=null,H*=2}while(C>1);return p}function xpe(p,o,r,d,m){return p=32767*(p-r)*m,o=32767*(o-d)*m,p=(p|p<<8)&16711935,p=(p|p<<4)&252645135,p=(p|p<<2)&858993459,p=(p|p<<1)&1431655765,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,p|o<<1}function mHe(p){let o=p,r=p;do(o.x<r.x||o.x===r.x&&o.y<r.y)&&(r=o),o=o.next;while(o!==p);return r}function dF(p,o,r,d,m,O,C,G){return(m-C)*(o-G)-(p-C)*(O-G)>=0&&(p-C)*(d-G)-(r-C)*(o-G)>=0&&(r-C)*(O-G)-(m-C)*(d-G)>=0}function bHe(p,o){return p.next.i!==o.i&&p.prev.i!==o.i&&!vHe(p,o)&&(VX(p,o)&&VX(o,p)&&gHe(p,o)&&(MM(p.prev,p,o.prev)||MM(p,o.prev,o))||nee(p,o)&&MM(p.prev,p,p.next)>0&&MM(o.prev,o,o.next)>0)}function MM(p,o,r){return(o.y-p.y)*(r.x-o.x)-(o.x-p.x)*(r.y-o.y)}function nee(p,o){return p.x===o.x&&p.y===o.y}function HMe(p,o,r,d){let m=h$(MM(p,o,r)),O=h$(MM(p,o,d)),C=h$(MM(r,d,p)),G=h$(MM(r,d,o));return!!(m!==O&&C!==G||m===0&&d$(p,r,o)||O===0&&d$(p,d,o)||C===0&&d$(r,p,d)||G===0&&d$(r,o,d))}function d$(p,o,r){return o.x<=Math.max(p.x,r.x)&&o.x>=Math.min(p.x,r.x)&&o.y<=Math.max(p.y,r.y)&&o.y>=Math.min(p.y,r.y)}function h$(p){return p>0?1:p<0?-1:0}function vHe(p,o){let r=p;do{if(r.i!==p.i&&r.next.i!==p.i&&r.i!==o.i&&r.next.i!==o.i&&HMe(r,r.next,p,o))return!0;r=r.next}while(r!==p);return!1}function VX(p,o){return MM(p.prev,p,p.next)<0?MM(p,o,p.next)>=0&&MM(p,p.prev,o)>=0:MM(p,o,p.prev)<0||MM(p,p.next,o)<0}function gHe(p,o){let r=p,d=!1,m=(p.x+o.x)/2,O=(p.y+o.y)/2;do r.y>O!=r.next.y>O&&r.next.y!==r.y&&m<(r.next.x-r.x)*(O-r.y)/(r.next.y-r.y)+r.x&&(d=!d),r=r.next;while(r!==p);return d}function FMe(p,o){let r=new Rpe(p.i,p.x,p.y),d=new Rpe(o.i,o.x,o.y),m=p.next,O=o.prev;return p.next=o,o.prev=p,r.next=m,m.prev=r,d.next=r,r.prev=d,O.next=d,d.prev=O,d}function rMe(p,o,r,d){let m=new Rpe(p,o,r);return d?(m.next=d.next,m.prev=d,d.next.prev=m,d.next=m):(m.prev=m,m.next=m),m}function YX(p){p.next.prev=p.prev,p.prev.next=p.next,p.prevZ&&(p.prevZ.nextZ=p.nextZ),p.nextZ&&(p.nextZ.prevZ=p.prevZ)}function Rpe(p,o,r){this.i=p,this.x=o,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function yHe(p,o,r,d){let m=0;for(let O=o,C=r-d;O<r;O+=d)m+=(p[C]-p[O])*(p[O+1]+p[C+1]),C=O;return m}var V8=class p{static area(o){let r=o.length,d=0;for(let m=r-1,O=0;O<r;m=O++)d+=o[m].x*o[O].y-o[O].x*o[m].y;return d*.5}static isClockWise(o){return p.area(o)<0}static triangulateShape(o,r){let d=[],m=[],O=[];sMe(o),aMe(d,o);let C=o.length;r.forEach(sMe);for(let x=0;x<r.length;x++)m.push(C),C+=r[x].length,aMe(d,r[x]);let G=iHe.triangulate(d,m);for(let x=0;x<G.length;x+=3)O.push(G.slice(x,x+3));return O}};function sMe(p){let o=p.length;o>2&&p[o-1].equals(p[0])&&p.pop()}function aMe(p,o){for(let r=0;r<o.length;r++)p.push(o[r].x),p.push(o[r].y)}var gF=class extends c3{constructor(o,r){super(),this.type="ExtrudeGeometry",this.parameters={shapes:o,options:r},o=Array.isArray(o)?o:[o];let d=this,m=[],O=[];for(let G=0,x=o.length;G<x;G++){let H=o[G];C(H)}this.setAttribute("position",new r4(m,3)),this.setAttribute("uv",new r4(O,2)),this.computeVertexNormals();function C(G){let x=[],H=r.curveSegments!==void 0?r.curveSegments:12,te=r.steps!==void 0?r.steps:1,ne=r.depth!==void 0?r.depth:100,Te=r.bevelEnabled!==void 0?r.bevelEnabled:!0,Pe=r.bevelThickness!==void 0?r.bevelThickness:6,Ye=r.bevelSize!==void 0?r.bevelSize:Pe-2,mt=r.bevelOffset!==void 0?r.bevelOffset:0,Nt=r.bevelSegments!==void 0?r.bevelSegments:3,Dt=r.extrudePath,Ct=r.UVGenerator!==void 0?r.UVGenerator:MHe;r.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),ne=r.amount);let Zn,Hn=!1,vi,en,Ni,Mi;Dt&&(Zn=Dt.getSpacedPoints(te),Hn=!0,Te=!1,vi=Dt.computeFrenetFrames(te,!1),en=new $i,Ni=new $i,Mi=new $i),Te||(Nt=0,Pe=0,Ye=0,mt=0);let Di=G.extractPoints(H),Ur=Di.shape,Er=Di.holes;if(!V8.isClockWise(Ur)){Ur=Ur.reverse();for(let ii=0,pi=Er.length;ii<pi;ii++){let ji=Er[ii];V8.isClockWise(ji)&&(Er[ii]=ji.reverse())}}let Gi=V8.triangulateShape(Ur,Er),Ar=Ur;for(let ii=0,pi=Er.length;ii<pi;ii++){let ji=Er[ii];Ur=Ur.concat(ji)}function ur(ii,pi,ji){return pi||console.error("THREE.ExtrudeGeometry: vec does not exist"),pi.clone().multiplyScalar(ji).add(ii)}let Qi=Ur.length,As=Gi.length;function Wr(ii,pi,ji){let $r,xi,ei,si=ii.x-pi.x,lr=ii.y-pi.y,rs=ji.x-ii.x,ga=ji.y-ii.y,Rs=si*si+lr*lr,jo=si*ga-lr*rs;if(Math.abs(jo)>Number.EPSILON){let ia=Math.sqrt(Rs),ar=Math.sqrt(rs*rs+ga*ga),os=pi.x-lr/ia,Zs=pi.y+si/ia,Jr=ji.x-ga/ar,Ds=ji.y+rs/ar,ao=((Jr-os)*ga-(Ds-Zs)*rs)/(si*ga-lr*rs);$r=os+si*ao-ii.x,xi=Zs+lr*ao-ii.y;let wo=$r*$r+xi*xi;if(wo<=2)return new _o($r,xi);ei=Math.sqrt(wo/2)}else{let ia=!1;si>Number.EPSILON?rs>Number.EPSILON&&(ia=!0):si<-Number.EPSILON?rs<-Number.EPSILON&&(ia=!0):Math.sign(lr)===Math.sign(ga)&&(ia=!0),ia?($r=-lr,xi=si,ei=Math.sqrt(Rs)):($r=si,xi=lr,ei=Math.sqrt(Rs/2))}return new _o($r/ei,xi/ei)}let Qr=[];for(let ii=0,pi=Ar.length,ji=pi-1,$r=ii+1;ii<pi;ii++,ji++,$r++)ji===pi&&(ji=0),$r===pi&&($r=0),Qr[ii]=Wr(Ar[ii],Ar[ji],Ar[$r]);let Bs=[],Qs,aa=Qr.concat();for(let ii=0,pi=Er.length;ii<pi;ii++){let ji=Er[ii];Qs=[];for(let $r=0,xi=ji.length,ei=xi-1,si=$r+1;$r<xi;$r++,ei++,si++)ei===xi&&(ei=0),si===xi&&(si=0),Qs[$r]=Wr(ji[$r],ji[ei],ji[si]);Bs.push(Qs),aa=aa.concat(Qs)}for(let ii=0;ii<Nt;ii++){let pi=ii/Nt,ji=Pe*Math.cos(pi*Math.PI/2),$r=Ye*Math.sin(pi*Math.PI/2)+mt;for(let xi=0,ei=Ar.length;xi<ei;xi++){let si=ur(Ar[xi],Qr[xi],$r);tr(si.x,si.y,-ji)}for(let xi=0,ei=Er.length;xi<ei;xi++){let si=Er[xi];Qs=Bs[xi];for(let lr=0,rs=si.length;lr<rs;lr++){let ga=ur(si[lr],Qs[lr],$r);tr(ga.x,ga.y,-ji)}}}let qi=Ye+mt;for(let ii=0;ii<Qi;ii++){let pi=Te?ur(Ur[ii],aa[ii],qi):Ur[ii];Hn?(Ni.copy(vi.normals[0]).multiplyScalar(pi.x),en.copy(vi.binormals[0]).multiplyScalar(pi.y),Mi.copy(Zn[0]).add(Ni).add(en),tr(Mi.x,Mi.y,Mi.z)):tr(pi.x,pi.y,0)}for(let ii=1;ii<=te;ii++)for(let pi=0;pi<Qi;pi++){let ji=Te?ur(Ur[pi],aa[pi],qi):Ur[pi];Hn?(Ni.copy(vi.normals[ii]).multiplyScalar(ji.x),en.copy(vi.binormals[ii]).multiplyScalar(ji.y),Mi.copy(Zn[ii]).add(Ni).add(en),tr(Mi.x,Mi.y,Mi.z)):tr(ji.x,ji.y,ne/te*ii)}for(let ii=Nt-1;ii>=0;ii--){let pi=ii/Nt,ji=Pe*Math.cos(pi*Math.PI/2),$r=Ye*Math.sin(pi*Math.PI/2)+mt;for(let xi=0,ei=Ar.length;xi<ei;xi++){let si=ur(Ar[xi],Qr[xi],$r);tr(si.x,si.y,ne+ji)}for(let xi=0,ei=Er.length;xi<ei;xi++){let si=Er[xi];Qs=Bs[xi];for(let lr=0,rs=si.length;lr<rs;lr++){let ga=ur(si[lr],Qs[lr],$r);Hn?tr(ga.x,ga.y+Zn[te-1].y,Zn[te-1].x+ji):tr(ga.x,ga.y,ne+ji)}}}mr(),Ti();function mr(){let ii=m.length/3;if(Te){let pi=0,ji=Qi*pi;for(let $r=0;$r<As;$r++){let xi=Gi[$r];zr(xi[2]+ji,xi[1]+ji,xi[0]+ji)}pi=te+Nt*2,ji=Qi*pi;for(let $r=0;$r<As;$r++){let xi=Gi[$r];zr(xi[0]+ji,xi[1]+ji,xi[2]+ji)}}else{for(let pi=0;pi<As;pi++){let ji=Gi[pi];zr(ji[2],ji[1],ji[0])}for(let pi=0;pi<As;pi++){let ji=Gi[pi];zr(ji[0]+Qi*te,ji[1]+Qi*te,ji[2]+Qi*te)}}d.addGroup(ii,m.length/3-ii,0)}function Ti(){let ii=m.length/3,pi=0;ui(Ar,pi),pi+=Ar.length;for(let ji=0,$r=Er.length;ji<$r;ji++){let xi=Er[ji];ui(xi,pi),pi+=xi.length}d.addGroup(ii,m.length/3-ii,1)}function ui(ii,pi){let ji=ii.length;for(;--ji>=0;){let $r=ji,xi=ji-1;xi<0&&(xi=ii.length-1);for(let ei=0,si=te+Nt*2;ei<si;ei++){let lr=Qi*ei,rs=Qi*(ei+1),ga=pi+$r+lr,Rs=pi+xi+lr,jo=pi+xi+rs,ia=pi+$r+rs;Cr(ga,Rs,jo,ia)}}}function tr(ii,pi,ji){x.push(ii),x.push(pi),x.push(ji)}function zr(ii,pi,ji){Qt(ii),Qt(pi),Qt(ji);let $r=m.length/3,xi=Ct.generateTopUV(d,m,$r-3,$r-2,$r-1);ni(xi[0]),ni(xi[1]),ni(xi[2])}function Cr(ii,pi,ji,$r){Qt(ii),Qt(pi),Qt($r),Qt(pi),Qt(ji),Qt($r);let xi=m.length/3,ei=Ct.generateSideWallUV(d,m,xi-6,xi-3,xi-2,xi-1);ni(ei[0]),ni(ei[1]),ni(ei[3]),ni(ei[1]),ni(ei[2]),ni(ei[3])}function Qt(ii){m.push(x[ii*3+0]),m.push(x[ii*3+1]),m.push(x[ii*3+2])}function ni(ii){O.push(ii.x),O.push(ii.y)}}}toJSON(){let o=c3.prototype.toJSON.call(this),r=this.parameters.shapes,d=this.parameters.options;return IHe(r,d,o)}},MHe={generateTopUV:function(p,o,r,d,m){let O=o[r*3],C=o[r*3+1],G=o[d*3],x=o[d*3+1],H=o[m*3],te=o[m*3+1];return[new _o(O,C),new _o(G,x),new _o(H,te)]},generateSideWallUV:function(p,o,r,d,m,O){let C=o[r*3],G=o[r*3+1],x=o[r*3+2],H=o[d*3],te=o[d*3+1],ne=o[d*3+2],Te=o[m*3],Pe=o[m*3+1],Ye=o[m*3+2],mt=o[O*3],Nt=o[O*3+1],Dt=o[O*3+2];return Math.abs(G-te)<.01?[new _o(C,1-x),new _o(H,1-ne),new _o(Te,1-Ye),new _o(mt,1-Dt)]:[new _o(G,1-x),new _o(te,1-ne),new _o(Pe,1-Ye),new _o(Nt,1-Dt)]}};function IHe(p,o,r){if(r.shapes=[],Array.isArray(p))for(let d=0,m=p.length;d<m;d++){let O=p[d];r.shapes.push(O.uuid)}else r.shapes.push(p.uuid);return o.extrudePath!==void 0&&(r.options.extrudePath=o.extrudePath.toJSON()),r}var Npe=class extends c3{constructor(o,r=12){super(),this.type="ShapeGeometry",this.parameters={shapes:o,curveSegments:r};let d=[],m=[],O=[],C=[],G=0,x=0;if(Array.isArray(o)===!1)H(o);else for(let te=0;te<o.length;te++)H(o[te]),this.addGroup(G,x,te),G+=x,x=0;this.setIndex(d),this.setAttribute("position",new r4(m,3)),this.setAttribute("normal",new r4(O,3)),this.setAttribute("uv",new r4(C,2));function H(te){let ne=m.length/3,Te=te.extractPoints(r),Pe=Te.shape,Ye=Te.holes;V8.isClockWise(Pe)===!1&&(Pe=Pe.reverse());for(let Nt=0,Dt=Ye.length;Nt<Dt;Nt++){let Ct=Ye[Nt];V8.isClockWise(Ct)===!0&&(Ye[Nt]=Ct.reverse())}let mt=V8.triangulateShape(Pe,Ye);for(let Nt=0,Dt=Ye.length;Nt<Dt;Nt++){let Ct=Ye[Nt];Pe=Pe.concat(Ct)}for(let Nt=0,Dt=Pe.length;Nt<Dt;Nt++){let Ct=Pe[Nt];m.push(Ct.x,Ct.y,0),O.push(0,0,1),C.push(Ct.x,Ct.y)}for(let Nt=0,Dt=mt.length;Nt<Dt;Nt++){let Ct=mt[Nt],Zn=Ct[0]+ne,Hn=Ct[1]+ne,vi=Ct[2]+ne;d.push(Zn,Hn,vi),x+=3}}}toJSON(){let o=c3.prototype.toJSON.call(this),r=this.parameters.shapes;return wHe(r,o)}};function wHe(p,o){if(o.shapes=[],Array.isArray(p))for(let r=0,d=p.length;r<d;r++){let m=p[r];o.shapes.push(m.uuid)}else o.shapes.push(p.uuid);return o}var Ppe=class extends Zw{constructor(o){super(),this.type="ShadowMaterial",this.color=new C1(0),this.transparent=!0,this.setValues(o)}copy(o){return super.copy(o),this.color.copy(o.color),this}};Ppe.prototype.isShadowMaterial=!0;var Bpe=class extends X8{constructor(o){super(o),this.type="RawShaderMaterial"}};Bpe.prototype.isRawShaderMaterial=!0;var F$=class extends Zw{constructor(o){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new C1(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new C1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TF,this.normalScale=new _o(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.vertexTangents=!1,this.setValues(o)}copy(o){return super.copy(o),this.defines={STANDARD:""},this.color.copy(o.color),this.roughness=o.roughness,this.metalness=o.metalness,this.map=o.map,this.lightMap=o.lightMap,this.lightMapIntensity=o.lightMapIntensity,this.aoMap=o.aoMap,this.aoMapIntensity=o.aoMapIntensity,this.emissive.copy(o.emissive),this.emissiveMap=o.emissiveMap,this.emissiveIntensity=o.emissiveIntensity,this.bumpMap=o.bumpMap,this.bumpScale=o.bumpScale,this.normalMap=o.normalMap,this.normalMapType=o.normalMapType,this.normalScale.copy(o.normalScale),this.displacementMap=o.displacementMap,this.displacementScale=o.displacementScale,this.displacementBias=o.displacementBias,this.roughnessMap=o.roughnessMap,this.metalnessMap=o.metalnessMap,this.alphaMap=o.alphaMap,this.envMap=o.envMap,this.envMapIntensity=o.envMapIntensity,this.refractionRatio=o.refractionRatio,this.wireframe=o.wireframe,this.wireframeLinewidth=o.wireframeLinewidth,this.wireframeLinecap=o.wireframeLinecap,this.wireframeLinejoin=o.wireframeLinejoin,this.skinning=o.skinning,this.morphTargets=o.morphTargets,this.morphNormals=o.morphNormals,this.flatShading=o.flatShading,this.vertexTangents=o.vertexTangents,this}};F$.prototype.isMeshStandardMaterial=!0;var Hpe=class extends F${constructor(o){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new _o(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(r){this.reflectivity=eT(2.5*(r-1)/(r+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.setValues(o)}copy(o){return super.copy(o),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=o.clearcoat,this.clearcoatMap=o.clearcoatMap,this.clearcoatRoughness=o.clearcoatRoughness,this.clearcoatRoughnessMap=o.clearcoatRoughnessMap,this.clearcoatNormalMap=o.clearcoatNormalMap,this.clearcoatNormalScale.copy(o.clearcoatNormalScale),this.reflectivity=o.reflectivity,o.sheen?this.sheen=(this.sheen||new C1).copy(o.sheen):this.sheen=null,this.transmission=o.transmission,this.transmissionMap=o.transmissionMap,this}};Hpe.prototype.isMeshPhysicalMaterial=!0;var Fpe=class extends Zw{constructor(o){super(),this.type="MeshPhongMaterial",this.color=new C1(16777215),this.specular=new C1(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new C1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TF,this.normalScale=new _o(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=tee,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(o)}copy(o){return super.copy(o),this.color.copy(o.color),this.specular.copy(o.specular),this.shininess=o.shininess,this.map=o.map,this.lightMap=o.lightMap,this.lightMapIntensity=o.lightMapIntensity,this.aoMap=o.aoMap,this.aoMapIntensity=o.aoMapIntensity,this.emissive.copy(o.emissive),this.emissiveMap=o.emissiveMap,this.emissiveIntensity=o.emissiveIntensity,this.bumpMap=o.bumpMap,this.bumpScale=o.bumpScale,this.normalMap=o.normalMap,this.normalMapType=o.normalMapType,this.normalScale.copy(o.normalScale),this.displacementMap=o.displacementMap,this.displacementScale=o.displacementScale,this.displacementBias=o.displacementBias,this.specularMap=o.specularMap,this.alphaMap=o.alphaMap,this.envMap=o.envMap,this.combine=o.combine,this.reflectivity=o.reflectivity,this.refractionRatio=o.refractionRatio,this.wireframe=o.wireframe,this.wireframeLinewidth=o.wireframeLinewidth,this.wireframeLinecap=o.wireframeLinecap,this.wireframeLinejoin=o.wireframeLinejoin,this.skinning=o.skinning,this.morphTargets=o.morphTargets,this.morphNormals=o.morphNormals,this.flatShading=o.flatShading,this}};Fpe.prototype.isMeshPhongMaterial=!0;var kpe=class extends Zw{constructor(o){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new C1(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new C1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TF,this.normalScale=new _o(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.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(o)}copy(o){return super.copy(o),this.color.copy(o.color),this.map=o.map,this.gradientMap=o.gradientMap,this.lightMap=o.lightMap,this.lightMapIntensity=o.lightMapIntensity,this.aoMap=o.aoMap,this.aoMapIntensity=o.aoMapIntensity,this.emissive.copy(o.emissive),this.emissiveMap=o.emissiveMap,this.emissiveIntensity=o.emissiveIntensity,this.bumpMap=o.bumpMap,this.bumpScale=o.bumpScale,this.normalMap=o.normalMap,this.normalMapType=o.normalMapType,this.normalScale.copy(o.normalScale),this.displacementMap=o.displacementMap,this.displacementScale=o.displacementScale,this.displacementBias=o.displacementBias,this.alphaMap=o.alphaMap,this.wireframe=o.wireframe,this.wireframeLinewidth=o.wireframeLinewidth,this.wireframeLinecap=o.wireframeLinecap,this.wireframeLinejoin=o.wireframeLinejoin,this.skinning=o.skinning,this.morphTargets=o.morphTargets,this.morphNormals=o.morphNormals,this}};kpe.prototype.isMeshToonMaterial=!0;var qpe=class extends Zw{constructor(o){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TF,this.normalScale=new _o(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(o)}copy(o){return super.copy(o),this.bumpMap=o.bumpMap,this.bumpScale=o.bumpScale,this.normalMap=o.normalMap,this.normalMapType=o.normalMapType,this.normalScale.copy(o.normalScale),this.displacementMap=o.displacementMap,this.displacementScale=o.displacementScale,this.displacementBias=o.displacementBias,this.wireframe=o.wireframe,this.wireframeLinewidth=o.wireframeLinewidth,this.skinning=o.skinning,this.morphTargets=o.morphTargets,this.morphNormals=o.morphNormals,this.flatShading=o.flatShading,this}};qpe.prototype.isMeshNormalMaterial=!0;var Wpe=class extends Zw{constructor(o){super(),this.type="MeshLambertMaterial",this.color=new C1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new C1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=tee,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(o)}copy(o){return super.copy(o),this.color.copy(o.color),this.map=o.map,this.lightMap=o.lightMap,this.lightMapIntensity=o.lightMapIntensity,this.aoMap=o.aoMap,this.aoMapIntensity=o.aoMapIntensity,this.emissive.copy(o.emissive),this.emissiveMap=o.emissiveMap,this.emissiveIntensity=o.emissiveIntensity,this.specularMap=o.specularMap,this.alphaMap=o.alphaMap,this.envMap=o.envMap,this.combine=o.combine,this.reflectivity=o.reflectivity,this.refractionRatio=o.refractionRatio,this.wireframe=o.wireframe,this.wireframeLinewidth=o.wireframeLinewidth,this.wireframeLinecap=o.wireframeLinecap,this.wireframeLinejoin=o.wireframeLinejoin,this.skinning=o.skinning,this.morphTargets=o.morphTargets,this.morphNormals=o.morphNormals,this}};Wpe.prototype.isMeshLambertMaterial=!0;var Upe=class extends Zw{constructor(o){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new C1(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TF,this.normalScale=new _o(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(o)}copy(o){return super.copy(o),this.defines={MATCAP:""},this.color.copy(o.color),this.matcap=o.matcap,this.map=o.map,this.bumpMap=o.bumpMap,this.bumpScale=o.bumpScale,this.normalMap=o.normalMap,this.normalMapType=o.normalMapType,this.normalScale.copy(o.normalScale),this.displacementMap=o.displacementMap,this.displacementScale=o.displacementScale,this.displacementBias=o.displacementBias,this.alphaMap=o.alphaMap,this.skinning=o.skinning,this.morphTargets=o.morphTargets,this.morphNormals=o.morphNormals,this.flatShading=o.flatShading,this}};Upe.prototype.isMeshMatcapMaterial=!0;var Gpe=class extends LB{constructor(o){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(o)}copy(o){return super.copy(o),this.scale=o.scale,this.dashSize=o.dashSize,this.gapSize=o.gapSize,this}};Gpe.prototype.isLineDashedMaterial=!0;var oy={arraySlice:function(p,o,r){return oy.isTypedArray(p)?new p.constructor(p.subarray(o,r!==void 0?r:p.length)):p.slice(o,r)},convertArray:function(p,o,r){return!p||!r&&p.constructor===o?p:typeof o.BYTES_PER_ELEMENT=="number"?new o(p):Array.prototype.slice.call(p)},isTypedArray:function(p){return ArrayBuffer.isView(p)&&!(p instanceof DataView)},getKeyframeOrder:function(p){function o(m,O){return p[m]-p[O]}let r=p.length,d=new Array(r);for(let m=0;m!==r;++m)d[m]=m;return d.sort(o),d},sortedArray:function(p,o,r){let d=p.length,m=new p.constructor(d);for(let O=0,C=0;C!==d;++O){let G=r[O]*o;for(let x=0;x!==o;++x)m[C++]=p[G+x]}return m},flattenJSON:function(p,o,r,d){let m=1,O=p[0];for(;O!==void 0&&O[d]===void 0;)O=p[m++];if(O===void 0)return;let C=O[d];if(C!==void 0)if(Array.isArray(C))do C=O[d],C!==void 0&&(o.push(O.time),r.push.apply(r,C)),O=p[m++];while(O!==void 0);else if(C.toArray!==void 0)do C=O[d],C!==void 0&&(o.push(O.time),C.toArray(r,r.length)),O=p[m++];while(O!==void 0);else do C=O[d],C!==void 0&&(o.push(O.time),r.push(C)),O=p[m++];while(O!==void 0)},subclip:function(p,o,r,d,m=30){let O=p.clone();O.name=o;let C=[];for(let x=0;x<O.tracks.length;++x){let H=O.tracks[x],te=H.getValueSize(),ne=[],Te=[];for(let Pe=0;Pe<H.times.length;++Pe){let Ye=H.times[Pe]*m;if(!(Ye<r||Ye>=d)){ne.push(H.times[Pe]);for(let mt=0;mt<te;++mt)Te.push(H.values[Pe*te+mt])}}ne.length!==0&&(H.times=oy.convertArray(ne,H.times.constructor),H.values=oy.convertArray(Te,H.values.constructor),C.push(H))}O.tracks=C;let G=1/0;for(let x=0;x<O.tracks.length;++x)G>O.tracks[x].times[0]&&(G=O.tracks[x].times[0]);for(let x=0;x<O.tracks.length;++x)O.tracks[x].shift(-1*G);return O.resetDuration(),O},makeClipAdditive:function(p,o=0,r=p,d=30){d<=0&&(d=30);let m=r.tracks.length,O=o/d;for(let C=0;C<m;++C){let G=r.tracks[C],x=G.ValueTypeName;if(x==="bool"||x==="string")continue;let H=p.tracks.find(function(Dt){return Dt.name===G.name&&Dt.ValueTypeName===x});if(H===void 0)continue;let te=0,ne=G.getValueSize();G.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(te=ne/3);let Te=0,Pe=H.getValueSize();H.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(Te=Pe/3);let Ye=G.times.length-1,mt;if(O<=G.times[0]){let Dt=te,Ct=ne-te;mt=oy.arraySlice(G.values,Dt,Ct)}else if(O>=G.times[Ye]){let Dt=Ye*ne+te,Ct=Dt+ne-te;mt=oy.arraySlice(G.values,Dt,Ct)}else{let Dt=G.createInterpolant(),Ct=te,Zn=ne-te;Dt.evaluate(O),mt=oy.arraySlice(Dt.resultBuffer,Ct,Zn)}x==="quaternion"&&new QA().fromArray(mt).normalize().conjugate().toArray(mt);let Nt=H.times.length;for(let Dt=0;Dt<Nt;++Dt){let Ct=Dt*Pe+Te;if(x==="quaternion")QA.multiplyQuaternionsFlat(H.values,Ct,mt,0,H.values,Ct);else{let Zn=Pe-Te*2;for(let Hn=0;Hn<Zn;++Hn)H.values[Ct+Hn]-=mt[Hn]}}}return p.blendMode=MMe,p}},CS=class{constructor(o,r,d,m){this.parameterPositions=o,this._cachedIndex=0,this.resultBuffer=m!==void 0?m:new r.constructor(d),this.sampleValues=r,this.valueSize=d,this.settings=null,this.DefaultSettings_={}}evaluate(o){let r=this.parameterPositions,d=this._cachedIndex,m=r[d],O=r[d-1];e:{t:{let C;n:{i:if(!(o<m)){for(let G=d+2;;){if(m===void 0){if(o<O)break i;return d=r.length,this._cachedIndex=d,this.afterEnd_(d-1,o,O)}if(d===G)break;if(O=m,m=r[++d],o<m)break t}C=r.length;break n}if(!(o>=O)){let G=r[1];o<G&&(d=2,O=G);for(let x=d-2;;){if(O===void 0)return this._cachedIndex=0,this.beforeStart_(0,o,m);if(d===x)break;if(m=O,O=r[--d-1],o>=O)break t}C=d,d=0;break n}break e}for(;d<C;){let G=d+C>>>1;o<r[G]?C=G:d=G+1}if(m=r[d],O=r[d-1],O===void 0)return this._cachedIndex=0,this.beforeStart_(0,o,m);if(m===void 0)return d=r.length,this._cachedIndex=d,this.afterEnd_(d-1,O,o)}this._cachedIndex=d,this.intervalChanged_(d,O,m)}return this.interpolate_(d,O,o,m)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(o){let r=this.resultBuffer,d=this.sampleValues,m=this.valueSize,O=o*m;for(let C=0;C!==m;++C)r[C]=d[O+C];return r}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}};CS.prototype.beforeStart_=CS.prototype.copySampleValue_;CS.prototype.afterEnd_=CS.prototype.copySampleValue_;var jpe=class extends CS{constructor(o,r,d,m){super(o,r,d,m),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:uF,endingEnd:uF}}intervalChanged_(o,r,d){let m=this.parameterPositions,O=o-2,C=o+1,G=m[O],x=m[C];if(G===void 0)switch(this.getSettings_().endingStart){case pF:O=o,G=2*r-d;break;case A$:O=m.length-2,G=r+m[O]-m[O+1];break;default:O=o,G=d}if(x===void 0)switch(this.getSettings_().endingEnd){case pF:C=o,x=2*d-r;break;case A$:C=1,x=d+m[1]-m[0];break;default:C=o-1,x=r}let H=(d-r)*.5,te=this.valueSize;this._weightPrev=H/(r-G),this._weightNext=H/(x-d),this._offsetPrev=O*te,this._offsetNext=C*te}interpolate_(o,r,d,m){let O=this.resultBuffer,C=this.sampleValues,G=this.valueSize,x=o*G,H=x-G,te=this._offsetPrev,ne=this._offsetNext,Te=this._weightPrev,Pe=this._weightNext,Ye=(d-r)/(m-r),mt=Ye*Ye,Nt=mt*Ye,Dt=-Te*Nt+2*Te*mt-Te*Ye,Ct=(1+Te)*Nt+(-1.5-2*Te)*mt+(-.5+Te)*Ye+1,Zn=(-1-Pe)*Nt+(1.5+Pe)*mt+.5*Ye,Hn=Pe*Nt-Pe*mt;for(let vi=0;vi!==G;++vi)O[vi]=Dt*C[te+vi]+Ct*C[H+vi]+Zn*C[x+vi]+Hn*C[ne+vi];return O}},k$=class extends CS{constructor(o,r,d,m){super(o,r,d,m)}interpolate_(o,r,d,m){let O=this.resultBuffer,C=this.sampleValues,G=this.valueSize,x=o*G,H=x-G,te=(d-r)/(m-r),ne=1-te;for(let Te=0;Te!==G;++Te)O[Te]=C[H+Te]*ne+C[x+Te]*te;return O}},Vpe=class extends CS{constructor(o,r,d,m){super(o,r,d,m)}interpolate_(o){return this.copySampleValue_(o-1)}},Vz=class{constructor(o,r,d,m){if(o===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(r===void 0||r.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+o);this.name=o,this.times=oy.convertArray(r,this.TimeBufferType),this.values=oy.convertArray(d,this.ValueBufferType),this.setInterpolation(m||this.DefaultInterpolation)}static toJSON(o){let r=o.constructor,d;if(r.toJSON!==this.toJSON)d=r.toJSON(o);else{d={name:o.name,times:oy.convertArray(o.times,Array),values:oy.convertArray(o.values,Array)};let m=o.getInterpolation();m!==o.DefaultInterpolation&&(d.interpolation=m)}return d.type=o.ValueTypeName,d}InterpolantFactoryMethodDiscrete(o){return new Vpe(this.times,this.values,this.getValueSize(),o)}InterpolantFactoryMethodLinear(o){return new k$(this.times,this.values,this.getValueSize(),o)}InterpolantFactoryMethodSmooth(o){return new jpe(this.times,this.values,this.getValueSize(),o)}setInterpolation(o){let r;switch(o){case w$:r=this.InterpolantFactoryMethodDiscrete;break;case O$:r=this.InterpolantFactoryMethodLinear;break;case Cue:r=this.InterpolantFactoryMethodSmooth;break}if(r===void 0){let d="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(o!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(d);return console.warn("THREE.KeyframeTrack:",d),this}return this.createInterpolant=r,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return w$;case this.InterpolantFactoryMethodLinear:return O$;case this.InterpolantFactoryMethodSmooth:return Cue}}getValueSize(){return this.values.length/this.times.length}shift(o){if(o!==0){let r=this.times;for(let d=0,m=r.length;d!==m;++d)r[d]+=o}return this}scale(o){if(o!==1){let r=this.times;for(let d=0,m=r.length;d!==m;++d)r[d]*=o}return this}trim(o,r){let d=this.times,m=d.length,O=0,C=m-1;for(;O!==m&&d[O]<o;)++O;for(;C!==-1&&d[C]>r;)--C;if(++C,O!==0||C!==m){O>=C&&(C=Math.max(C,1),O=C-1);let G=this.getValueSize();this.times=oy.arraySlice(d,O,C),this.values=oy.arraySlice(this.values,O*G,C*G)}return this}validate(){let o=!0,r=this.getValueSize();r-Math.floor(r)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),o=!1);let d=this.times,m=this.values,O=d.length;O===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),o=!1);let C=null;for(let G=0;G!==O;G++){let x=d[G];if(typeof x=="number"&&isNaN(x)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,G,x),o=!1;break}if(C!==null&&C>x){console.error("THREE.KeyframeTrack: Out of order keys.",this,G,x,C),o=!1;break}C=x}if(m!==void 0&&oy.isTypedArray(m))for(let G=0,x=m.length;G!==x;++G){let H=m[G];if(isNaN(H)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,G,H),o=!1;break}}return o}optimize(){let o=oy.arraySlice(this.times),r=oy.arraySlice(this.values),d=this.getValueSize(),m=this.getInterpolation()===Cue,O=o.length-1,C=1;for(let G=1;G<O;++G){let x=!1,H=o[G],te=o[G+1];if(H!==te&&(G!==1||H!==o[0]))if(m)x=!0;else{let ne=G*d,Te=ne-d,Pe=ne+d;for(let Ye=0;Ye!==d;++Ye){let mt=r[ne+Ye];if(mt!==r[Te+Ye]||mt!==r[Pe+Ye]){x=!0;break}}}if(x){if(G!==C){o[C]=o[G];let ne=G*d,Te=C*d;for(let Pe=0;Pe!==d;++Pe)r[Te+Pe]=r[ne+Pe]}++C}}if(O>0){o[C]=o[O];for(let G=O*d,x=C*d,H=0;H!==d;++H)r[x+H]=r[G+H];++C}return C!==o.length?(this.times=oy.arraySlice(o,0,C),this.values=oy.arraySlice(r,0,C*d)):(this.times=o,this.values=r),this}clone(){let o=oy.arraySlice(this.times,0),r=oy.arraySlice(this.values,0),d=this.constructor,m=new d(this.name,o,r);return m.createInterpolant=this.createInterpolant,m}};Vz.prototype.TimeBufferType=Float32Array;Vz.prototype.ValueBufferType=Float32Array;Vz.prototype.DefaultInterpolation=O$;var VR=class extends Vz{};VR.prototype.ValueTypeName="bool";VR.prototype.ValueBufferType=Array;VR.prototype.DefaultInterpolation=w$;VR.prototype.InterpolantFactoryMethodLinear=void 0;VR.prototype.InterpolantFactoryMethodSmooth=void 0;var q$=class extends Vz{};q$.prototype.ValueTypeName="color";var yF=class extends Vz{};yF.prototype.ValueTypeName="number";var Ype=class extends CS{constructor(o,r,d,m){super(o,r,d,m)}interpolate_(o,r,d,m){let O=this.resultBuffer,C=this.sampleValues,G=this.valueSize,x=(d-r)/(m-r),H=o*G;for(let te=H+G;H!==te;H+=4)QA.slerpFlat(O,0,C,H-G,C,H,x);return O}},xB=class extends Vz{InterpolantFactoryMethodLinear(o){return new Ype(this.times,this.values,this.getValueSize(),o)}};xB.prototype.ValueTypeName="quaternion";xB.prototype.DefaultInterpolation=O$;xB.prototype.InterpolantFactoryMethodSmooth=void 0;var YR=class extends Vz{};YR.prototype.ValueTypeName="string";YR.prototype.ValueBufferType=Array;YR.prototype.DefaultInterpolation=w$;YR.prototype.InterpolantFactoryMethodLinear=void 0;YR.prototype.InterpolantFactoryMethodSmooth=void 0;var MF=class extends Vz{};MF.prototype.ValueTypeName="vector";var W$=class{constructor(o,r=-1,d,m=Nde){this.name=o,this.tracks=d,this.duration=r,this.blendMode=m,this.uuid=aS(),this.duration<0&&this.resetDuration()}static parse(o){let r=[],d=o.tracks,m=1/(o.fps||1);for(let C=0,G=d.length;C!==G;++C)r.push(AHe(d[C]).scale(m));let O=new this(o.name,o.duration,r,o.blendMode);return O.uuid=o.uuid,O}static toJSON(o){let r=[],d=o.tracks,m={name:o.name,duration:o.duration,tracks:r,uuid:o.uuid,blendMode:o.blendMode};for(let O=0,C=d.length;O!==C;++O)r.push(Vz.toJSON(d[O]));return m}static CreateFromMorphTargetSequence(o,r,d,m){let O=r.length,C=[];for(let G=0;G<O;G++){let x=[],H=[];x.push((G+O-1)%O,G,(G+1)%O),H.push(0,1,0);let te=oy.getKeyframeOrder(x);x=oy.sortedArray(x,1,te),H=oy.sortedArray(H,1,te),!m&&x[0]===0&&(x.push(O),H.push(H[0])),C.push(new yF(".morphTargetInfluences["+r[G].name+"]",x,H).scale(1/d))}return new this(o,-1,C)}static findByName(o,r){let d=o;if(!Array.isArray(o)){let m=o;d=m.geometry&&m.geometry.animations||m.animations}for(let m=0;m<d.length;m++)if(d[m].name===r)return d[m];return null}static CreateClipsFromMorphTargetSequences(o,r,d){let m={},O=/^([\w-]*?)([\d]+)$/;for(let G=0,x=o.length;G<x;G++){let H=o[G],te=H.name.match(O);if(te&&te.length>1){let ne=te[1],Te=m[ne];Te||(m[ne]=Te=[]),Te.push(H)}}let C=[];for(let G in m)C.push(this.CreateFromMorphTargetSequence(G,m[G],r,d));return C}static parseAnimation(o,r){if(!o)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let d=function(ne,Te,Pe,Ye,mt){if(Pe.length!==0){let Nt=[],Dt=[];oy.flattenJSON(Pe,Nt,Dt,Ye),Nt.length!==0&&mt.push(new ne(Te,Nt,Dt))}},m=[],O=o.name||"default",C=o.fps||30,G=o.blendMode,x=o.length||-1,H=o.hierarchy||[];for(let ne=0;ne<H.length;ne++){let Te=H[ne].keys;if(!(!Te||Te.length===0))if(Te[0].morphTargets){let Pe={},Ye;for(Ye=0;Ye<Te.length;Ye++)if(Te[Ye].morphTargets)for(let mt=0;mt<Te[Ye].morphTargets.length;mt++)Pe[Te[Ye].morphTargets[mt]]=-1;for(let mt in Pe){let Nt=[],Dt=[];for(let Ct=0;Ct!==Te[Ye].morphTargets.length;++Ct){let Zn=Te[Ye];Nt.push(Zn.time),Dt.push(Zn.morphTarget===mt?1:0)}m.push(new yF(".morphTargetInfluence["+mt+"]",Nt,Dt))}x=Pe.length*(C||1)}else{let Pe=".bones["+r[ne].name+"]";d(MF,Pe+".position",Te,"pos",m),d(xB,Pe+".quaternion",Te,"rot",m),d(MF,Pe+".scale",Te,"scl",m)}}return m.length===0?null:new this(O,x,m,G)}resetDuration(){let o=this.tracks,r=0;for(let d=0,m=o.length;d!==m;++d){let O=this.tracks[d];r=Math.max(r,O.times[O.times.length-1])}return this.duration=r,this}trim(){for(let o=0;o<this.tracks.length;o++)this.tracks[o].trim(0,this.duration);return this}validate(){let o=!0;for(let r=0;r<this.tracks.length;r++)o=o&&this.tracks[r].validate();return o}optimize(){for(let o=0;o<this.tracks.length;o++)this.tracks[o].optimize();return this}clone(){let o=[];for(let r=0;r<this.tracks.length;r++)o.push(this.tracks[r].clone());return new this.constructor(this.name,this.duration,o,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}};function OHe(p){switch(p.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return yF;case"vector":case"vector2":case"vector3":case"vector4":return MF;case"color":return q$;case"quaternion":return xB;case"bool":case"boolean":return VR;case"string":return YR}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+p)}function AHe(p){if(p.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");let o=OHe(p.type);if(p.times===void 0){let r=[],d=[];oy.flattenJSON(p.keys,r,d,"value"),p.times=r,p.values=d}return o.parse!==void 0?o.parse(p):new o(p.name,p.times,p.values,p.interpolation)}var IF={enabled:!1,files:{},add:function(p,o){this.enabled!==!1&&(this.files[p]=o)},get:function(p){if(this.enabled!==!1)return this.files[p]},remove:function(p){delete this.files[p]},clear:function(){this.files={}}},Xpe=class{constructor(o,r,d){let m=this,O=!1,C=0,G=0,x,H=[];this.onStart=void 0,this.onLoad=o,this.onProgress=r,this.onError=d,this.itemStart=function(te){G++,O===!1&&m.onStart!==void 0&&m.onStart(te,C,G),O=!0},this.itemEnd=function(te){C++,m.onProgress!==void 0&&m.onProgress(te,C,G),C===G&&(O=!1,m.onLoad!==void 0&&m.onLoad())},this.itemError=function(te){m.onError!==void 0&&m.onError(te)},this.resolveURL=function(te){return x?x(te):te},this.setURLModifier=function(te){return x=te,this},this.addHandler=function(te,ne){return H.push(te,ne),this},this.removeHandler=function(te){let ne=H.indexOf(te);return ne!==-1&&H.splice(ne,2),this},this.getHandler=function(te){for(let ne=0,Te=H.length;ne<Te;ne+=2){let Pe=H[ne],Ye=H[ne+1];if(Pe.global&&(Pe.lastIndex=0),Pe.test(te))return Ye}return null}}},_He=new Xpe,DS=class{constructor(o){this.manager=o!==void 0?o:_He,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(o,r){let d=this;return new Promise(function(m,O){d.load(o,m,r,O)})}parse(){}setCrossOrigin(o){return this.crossOrigin=o,this}setWithCredentials(o){return this.withCredentials=o,this}setPath(o){return this.path=o,this}setResourcePath(o){return this.resourcePath=o,this}setRequestHeader(o){return this.requestHeader=o,this}},iS={},Qpe=class extends DS{constructor(o){super(o)}load(o,r,d,m){o===void 0&&(o=""),this.path!==void 0&&(o=this.path+o),o=this.manager.resolveURL(o);let O=this,C=IF.get(o);if(C!==void 0)return O.manager.itemStart(o),setTimeout(function(){r&&r(C),O.manager.itemEnd(o)},0),C;if(iS[o]!==void 0){iS[o].push({onLoad:r,onProgress:d,onError:m});return}let G=/^data:(.*?)(;base64)?,(.*)$/,x=o.match(G),H;if(x){let te=x[1],ne=!!x[2],Te=x[3];Te=decodeURIComponent(Te),ne&&(Te=atob(Te));try{let Pe,Ye=(this.responseType||"").toLowerCase();switch(Ye){case"arraybuffer":case"blob":let mt=new Uint8Array(Te.length);for(let Dt=0;Dt<Te.length;Dt++)mt[Dt]=Te.charCodeAt(Dt);Ye==="blob"?Pe=new Blob([mt.buffer],{type:te}):Pe=mt.buffer;break;case"document":Pe=new DOMParser().parseFromString(Te,te);break;case"json":Pe=JSON.parse(Te);break;default:Pe=Te;break}setTimeout(function(){r&&r(Pe),O.manager.itemEnd(o)},0)}catch(Pe){setTimeout(function(){m&&m(Pe),O.manager.itemError(o),O.manager.itemEnd(o)},0)}}else{iS[o]=[],iS[o].push({onLoad:r,onProgress:d,onError:m}),H=new XMLHttpRequest,H.open("GET",o,!0),H.addEventListener("load",function(te){let ne=this.response,Te=iS[o];if(delete iS[o],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),IF.add(o,ne);for(let Pe=0,Ye=Te.length;Pe<Ye;Pe++){let mt=Te[Pe];mt.onLoad&&mt.onLoad(ne)}O.manager.itemEnd(o)}else{for(let Pe=0,Ye=Te.length;Pe<Ye;Pe++){let mt=Te[Pe];mt.onError&&mt.onError(te)}O.manager.itemError(o),O.manager.itemEnd(o)}},!1),H.addEventListener("progress",function(te){let ne=iS[o];for(let Te=0,Pe=ne.length;Te<Pe;Te++){let Ye=ne[Te];Ye.onProgress&&Ye.onProgress(te)}},!1),H.addEventListener("error",function(te){let ne=iS[o];delete iS[o];for(let Te=0,Pe=ne.length;Te<Pe;Te++){let Ye=ne[Te];Ye.onError&&Ye.onError(te)}O.manager.itemError(o),O.manager.itemEnd(o)},!1),H.addEventListener("abort",function(te){let ne=iS[o];delete iS[o];for(let Te=0,Pe=ne.length;Te<Pe;Te++){let Ye=ne[Te];Ye.onError&&Ye.onError(te)}O.manager.itemError(o),O.manager.itemEnd(o)},!1),this.responseType!==void 0&&(H.responseType=this.responseType),this.withCredentials!==void 0&&(H.withCredentials=this.withCredentials),H.overrideMimeType&&H.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(let te in this.requestHeader)H.setRequestHeader(te,this.requestHeader[te]);H.send(null)}return O.manager.itemStart(o),H}setResponseType(o){return this.responseType=o,this}setMimeType(o){return this.mimeType=o,this}};var U$=class extends DS{constructor(o){super(o)}load(o,r,d,m){this.path!==void 0&&(o=this.path+o),o=this.manager.resolveURL(o);let O=this,C=IF.get(o);if(C!==void 0)return O.manager.itemStart(o),setTimeout(function(){r&&r(C),O.manager.itemEnd(o)},0),C;let G=document.createElementNS("http://www.w3.org/1999/xhtml","img");function x(){G.removeEventListener("load",x,!1),G.removeEventListener("error",H,!1),IF.add(o,this),r&&r(this),O.manager.itemEnd(o)}function H(te){G.removeEventListener("load",x,!1),G.removeEventListener("error",H,!1),m&&m(te),O.manager.itemError(o),O.manager.itemEnd(o)}return G.addEventListener("load",x,!1),G.addEventListener("error",H,!1),o.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(G.crossOrigin=this.crossOrigin),O.manager.itemStart(o),G.src=o,G}},Zpe=class extends DS{constructor(o){super(o)}load(o,r,d,m){let O=new bF,C=new U$(this.manager);C.setCrossOrigin(this.crossOrigin),C.setPath(this.path);let G=0;function x(H){C.load(o[H],function(te){O.images[H]=te,G++,G===6&&(O.needsUpdate=!0,r&&r(O))},void 0,m)}for(let H=0;H<o.length;++H)x(H);return O}};var Kpe=class extends DS{constructor(o){super(o)}load(o,r,d,m){let O=new s5,C=new U$(this.manager);return C.setCrossOrigin(this.crossOrigin),C.setPath(this.path),C.load(o,function(G){O.image=G;let x=o.search(/\.jpe?g($|\?)/i)>0||o.search(/^data\:image\/jpeg/)===0;O.format=x?DB:sS,O.needsUpdate=!0,r!==void 0&&r(O)},d,m),O}},nT=class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(o,r){let d=this.getUtoTmapping(o);return this.getPoint(d,r)}getPoints(o=5){let r=[];for(let d=0;d<=o;d++)r.push(this.getPoint(d/o));return r}getSpacedPoints(o=5){let r=[];for(let d=0;d<=o;d++)r.push(this.getPointAt(d/o));return r}getLength(){let o=this.getLengths();return o[o.length-1]}getLengths(o=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===o+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let r=[],d,m=this.getPoint(0),O=0;r.push(0);for(let C=1;C<=o;C++)d=this.getPoint(C/o),O+=d.distanceTo(m),r.push(O),m=d;return this.cacheArcLengths=r,r}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(o,r){let d=this.getLengths(),m=0,O=d.length,C;r?C=r:C=o*d[O-1];let G=0,x=O-1,H;for(;G<=x;)if(m=Math.floor(G+(x-G)/2),H=d[m]-C,H<0)G=m+1;else if(H>0)x=m-1;else{x=m;break}if(m=x,d[m]===C)return m/(O-1);let te=d[m],Te=d[m+1]-te,Pe=(C-te)/Te;return(m+Pe)/(O-1)}getTangent(o,r){let m=o-1e-4,O=o+1e-4;m<0&&(m=0),O>1&&(O=1);let C=this.getPoint(m),G=this.getPoint(O),x=r||(C.isVector2?new _o:new $i);return x.copy(G).sub(C).normalize(),x}getTangentAt(o,r){let d=this.getUtoTmapping(o);return this.getTangent(d,r)}computeFrenetFrames(o,r){let d=new $i,m=[],O=[],C=[],G=new $i,x=new vc;for(let Pe=0;Pe<=o;Pe++){let Ye=Pe/o;m[Pe]=this.getTangentAt(Ye,new $i),m[Pe].normalize()}O[0]=new $i,C[0]=new $i;let H=Number.MAX_VALUE,te=Math.abs(m[0].x),ne=Math.abs(m[0].y),Te=Math.abs(m[0].z);te<=H&&(H=te,d.set(1,0,0)),ne<=H&&(H=ne,d.set(0,1,0)),Te<=H&&d.set(0,0,1),G.crossVectors(m[0],d).normalize(),O[0].crossVectors(m[0],G),C[0].crossVectors(m[0],O[0]);for(let Pe=1;Pe<=o;Pe++){if(O[Pe]=O[Pe-1].clone(),C[Pe]=C[Pe-1].clone(),G.crossVectors(m[Pe-1],m[Pe]),G.length()>Number.EPSILON){G.normalize();let Ye=Math.acos(eT(m[Pe-1].dot(m[Pe]),-1,1));O[Pe].applyMatrix4(x.makeRotationAxis(G,Ye))}C[Pe].crossVectors(m[Pe],O[Pe])}if(r===!0){let Pe=Math.acos(eT(O[0].dot(O[o]),-1,1));Pe/=o,m[0].dot(G.crossVectors(O[0],O[o]))>0&&(Pe=-Pe);for(let Ye=1;Ye<=o;Ye++)O[Ye].applyMatrix4(x.makeRotationAxis(m[Ye],Pe*Ye)),C[Ye].crossVectors(m[Ye],O[Ye])}return{tangents:m,normals:O,binormals:C}}clone(){return new this.constructor().copy(this)}copy(o){return this.arcLengthDivisions=o.arcLengthDivisions,this}toJSON(){let o={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return o.arcLengthDivisions=this.arcLengthDivisions,o.type=this.type,o}fromJSON(o){return this.arcLengthDivisions=o.arcLengthDivisions,this}},wF=class extends nT{constructor(o=0,r=0,d=1,m=1,O=0,C=Math.PI*2,G=!1,x=0){super(),this.type="EllipseCurve",this.aX=o,this.aY=r,this.xRadius=d,this.yRadius=m,this.aStartAngle=O,this.aEndAngle=C,this.aClockwise=G,this.aRotation=x}getPoint(o,r){let d=r||new _o,m=Math.PI*2,O=this.aEndAngle-this.aStartAngle,C=Math.abs(O)<Number.EPSILON;for(;O<0;)O+=m;for(;O>m;)O-=m;O<Number.EPSILON&&(C?O=0:O=m),this.aClockwise===!0&&!C&&(O===m?O=-m:O=O-m);let G=this.aStartAngle+o*O,x=this.aX+this.xRadius*Math.cos(G),H=this.aY+this.yRadius*Math.sin(G);if(this.aRotation!==0){let te=Math.cos(this.aRotation),ne=Math.sin(this.aRotation),Te=x-this.aX,Pe=H-this.aY;x=Te*te-Pe*ne+this.aX,H=Te*ne+Pe*te+this.aY}return d.set(x,H)}copy(o){return super.copy(o),this.aX=o.aX,this.aY=o.aY,this.xRadius=o.xRadius,this.yRadius=o.yRadius,this.aStartAngle=o.aStartAngle,this.aEndAngle=o.aEndAngle,this.aClockwise=o.aClockwise,this.aRotation=o.aRotation,this}toJSON(){let o=super.toJSON();return o.aX=this.aX,o.aY=this.aY,o.xRadius=this.xRadius,o.yRadius=this.yRadius,o.aStartAngle=this.aStartAngle,o.aEndAngle=this.aEndAngle,o.aClockwise=this.aClockwise,o.aRotation=this.aRotation,o}fromJSON(o){return super.fromJSON(o),this.aX=o.aX,this.aY=o.aY,this.xRadius=o.xRadius,this.yRadius=o.yRadius,this.aStartAngle=o.aStartAngle,this.aEndAngle=o.aEndAngle,this.aClockwise=o.aClockwise,this.aRotation=o.aRotation,this}};wF.prototype.isEllipseCurve=!0;var G$=class extends wF{constructor(o,r,d,m,O,C){super(o,r,d,d,m,O,C),this.type="ArcCurve"}};G$.prototype.isArcCurve=!0;function Bde(){let p=0,o=0,r=0,d=0;function m(O,C,G,x){p=O,o=G,r=-3*O+3*C-2*G-x,d=2*O-2*C+G+x}return{initCatmullRom:function(O,C,G,x,H){m(C,G,H*(G-O),H*(x-C))},initNonuniformCatmullRom:function(O,C,G,x,H,te,ne){let Te=(C-O)/H-(G-O)/(H+te)+(G-C)/te,Pe=(G-C)/te-(x-C)/(te+ne)+(x-G)/ne;Te*=te,Pe*=te,m(C,G,Te,Pe)},calc:function(O){let C=O*O,G=C*O;return p+o*O+r*C+d*G}}}var f$=new $i,spe=new Bde,ape=new Bde,ope=new Bde,j$=class extends nT{constructor(o=[],r=!1,d="centripetal",m=.5){super(),this.type="CatmullRomCurve3",this.points=o,this.closed=r,this.curveType=d,this.tension=m}getPoint(o,r=new $i){let d=r,m=this.points,O=m.length,C=(O-(this.closed?0:1))*o,G=Math.floor(C),x=C-G;this.closed?G+=G>0?0:(Math.floor(Math.abs(G)/O)+1)*O:x===0&&G===O-1&&(G=O-2,x=1);let H,te;this.closed||G>0?H=m[(G-1)%O]:(f$.subVectors(m[0],m[1]).add(m[0]),H=f$);let ne=m[G%O],Te=m[(G+1)%O];if(this.closed||G+2<O?te=m[(G+2)%O]:(f$.subVectors(m[O-1],m[O-2]).add(m[O-1]),te=f$),this.curveType==="centripetal"||this.curveType==="chordal"){let Pe=this.curveType==="chordal"?.5:.25,Ye=Math.pow(H.distanceToSquared(ne),Pe),mt=Math.pow(ne.distanceToSquared(Te),Pe),Nt=Math.pow(Te.distanceToSquared(te),Pe);mt<1e-4&&(mt=1),Ye<1e-4&&(Ye=mt),Nt<1e-4&&(Nt=mt),spe.initNonuniformCatmullRom(H.x,ne.x,Te.x,te.x,Ye,mt,Nt),ape.initNonuniformCatmullRom(H.y,ne.y,Te.y,te.y,Ye,mt,Nt),ope.initNonuniformCatmullRom(H.z,ne.z,Te.z,te.z,Ye,mt,Nt)}else this.curveType==="catmullrom"&&(spe.initCatmullRom(H.x,ne.x,Te.x,te.x,this.tension),ape.initCatmullRom(H.y,ne.y,Te.y,te.y,this.tension),ope.initCatmullRom(H.z,ne.z,Te.z,te.z,this.tension));return d.set(spe.calc(x),ape.calc(x),ope.calc(x)),d}copy(o){super.copy(o),this.points=[];for(let r=0,d=o.points.length;r<d;r++){let m=o.points[r];this.points.push(m.clone())}return this.closed=o.closed,this.curveType=o.curveType,this.tension=o.tension,this}toJSON(){let o=super.toJSON();o.points=[];for(let r=0,d=this.points.length;r<d;r++){let m=this.points[r];o.points.push(m.toArray())}return o.closed=this.closed,o.curveType=this.curveType,o.tension=this.tension,o}fromJSON(o){super.fromJSON(o),this.points=[];for(let r=0,d=o.points.length;r<d;r++){let m=o.points[r];this.points.push(new $i().fromArray(m))}return this.closed=o.closed,this.curveType=o.curveType,this.tension=o.tension,this}};j$.prototype.isCatmullRomCurve3=!0;function oMe(p,o,r,d,m){let O=(d-o)*.5,C=(m-r)*.5,G=p*p,x=p*G;return(2*r-2*d+O+C)*x+(-3*r+3*d-2*O-C)*G+O*p+r}function THe(p,o){let r=1-p;return r*r*o}function EHe(p,o){return 2*(1-p)*p*o}function zHe(p,o){return p*p*o}function xX(p,o,r,d){return THe(p,o)+EHe(p,r)+zHe(p,d)}function CHe(p,o){let r=1-p;return r*r*r*o}function DHe(p,o){let r=1-p;return 3*r*r*p*o}function SHe(p,o){return 3*(1-p)*p*p*o}function LHe(p,o){return p*p*p*o}function RX(p,o,r,d,m){return CHe(p,o)+DHe(p,r)+SHe(p,d)+LHe(p,m)}var XX=class extends nT{constructor(o=new _o,r=new _o,d=new _o,m=new _o){super(),this.type="CubicBezierCurve",this.v0=o,this.v1=r,this.v2=d,this.v3=m}getPoint(o,r=new _o){let d=r,m=this.v0,O=this.v1,C=this.v2,G=this.v3;return d.set(RX(o,m.x,O.x,C.x,G.x),RX(o,m.y,O.y,C.y,G.y)),d}copy(o){return super.copy(o),this.v0.copy(o.v0),this.v1.copy(o.v1),this.v2.copy(o.v2),this.v3.copy(o.v3),this}toJSON(){let o=super.toJSON();return o.v0=this.v0.toArray(),o.v1=this.v1.toArray(),o.v2=this.v2.toArray(),o.v3=this.v3.toArray(),o}fromJSON(o){return super.fromJSON(o),this.v0.fromArray(o.v0),this.v1.fromArray(o.v1),this.v2.fromArray(o.v2),this.v3.fromArray(o.v3),this}};XX.prototype.isCubicBezierCurve=!0;var V$=class extends nT{constructor(o=new $i,r=new $i,d=new $i,m=new $i){super(),this.type="CubicBezierCurve3",this.v0=o,this.v1=r,this.v2=d,this.v3=m}getPoint(o,r=new $i){let d=r,m=this.v0,O=this.v1,C=this.v2,G=this.v3;return d.set(RX(o,m.x,O.x,C.x,G.x),RX(o,m.y,O.y,C.y,G.y),RX(o,m.z,O.z,C.z,G.z)),d}copy(o){return super.copy(o),this.v0.copy(o.v0),this.v1.copy(o.v1),this.v2.copy(o.v2),this.v3.copy(o.v3),this}toJSON(){let o=super.toJSON();return o.v0=this.v0.toArray(),o.v1=this.v1.toArray(),o.v2=this.v2.toArray(),o.v3=this.v3.toArray(),o}fromJSON(o){return super.fromJSON(o),this.v0.fromArray(o.v0),this.v1.fromArray(o.v1),this.v2.fromArray(o.v2),this.v3.fromArray(o.v3),this}};V$.prototype.isCubicBezierCurve3=!0;var OF=class extends nT{constructor(o=new _o,r=new _o){super(),this.type="LineCurve",this.v1=o,this.v2=r}getPoint(o,r=new _o){let d=r;return o===1?d.copy(this.v2):(d.copy(this.v2).sub(this.v1),d.multiplyScalar(o).add(this.v1)),d}getPointAt(o,r){return this.getPoint(o,r)}getTangent(o,r){let d=r||new _o;return d.copy(this.v2).sub(this.v1).normalize(),d}copy(o){return super.copy(o),this.v1.copy(o.v1),this.v2.copy(o.v2),this}toJSON(){let o=super.toJSON();return o.v1=this.v1.toArray(),o.v2=this.v2.toArray(),o}fromJSON(o){return super.fromJSON(o),this.v1.fromArray(o.v1),this.v2.fromArray(o.v2),this}};OF.prototype.isLineCurve=!0;var Jpe=class extends nT{constructor(o=new $i,r=new $i){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=o,this.v2=r}getPoint(o,r=new $i){let d=r;return o===1?d.copy(this.v2):(d.copy(this.v2).sub(this.v1),d.multiplyScalar(o).add(this.v1)),d}getPointAt(o,r){return this.getPoint(o,r)}copy(o){return super.copy(o),this.v1.copy(o.v1),this.v2.copy(o.v2),this}toJSON(){let o=super.toJSON();return o.v1=this.v1.toArray(),o.v2=this.v2.toArray(),o}fromJSON(o){return super.fromJSON(o),this.v1.fromArray(o.v1),this.v2.fromArray(o.v2),this}},QX=class extends nT{constructor(o=new _o,r=new _o,d=new _o){super(),this.type="QuadraticBezierCurve",this.v0=o,this.v1=r,this.v2=d}getPoint(o,r=new _o){let d=r,m=this.v0,O=this.v1,C=this.v2;return d.set(xX(o,m.x,O.x,C.x),xX(o,m.y,O.y,C.y)),d}copy(o){return super.copy(o),this.v0.copy(o.v0),this.v1.copy(o.v1),this.v2.copy(o.v2),this}toJSON(){let o=super.toJSON();return o.v0=this.v0.toArray(),o.v1=this.v1.toArray(),o.v2=this.v2.toArray(),o}fromJSON(o){return super.fromJSON(o),this.v0.fromArray(o.v0),this.v1.fromArray(o.v1),this.v2.fromArray(o.v2),this}};QX.prototype.isQuadraticBezierCurve=!0;var Y$=class extends nT{constructor(o=new $i,r=new $i,d=new $i){super(),this.type="QuadraticBezierCurve3",this.v0=o,this.v1=r,this.v2=d}getPoint(o,r=new $i){let d=r,m=this.v0,O=this.v1,C=this.v2;return d.set(xX(o,m.x,O.x,C.x),xX(o,m.y,O.y,C.y),xX(o,m.z,O.z,C.z)),d}copy(o){return super.copy(o),this.v0.copy(o.v0),this.v1.copy(o.v1),this.v2.copy(o.v2),this}toJSON(){let o=super.toJSON();return o.v0=this.v0.toArray(),o.v1=this.v1.toArray(),o.v2=this.v2.toArray(),o}fromJSON(o){return super.fromJSON(o),this.v0.fromArray(o.v0),this.v1.fromArray(o.v1),this.v2.fromArray(o.v2),this}};Y$.prototype.isQuadraticBezierCurve3=!0;var ZX=class extends nT{constructor(o=[]){super(),this.type="SplineCurve",this.points=o}getPoint(o,r=new _o){let d=r,m=this.points,O=(m.length-1)*o,C=Math.floor(O),G=O-C,x=m[C===0?C:C-1],H=m[C],te=m[C>m.length-2?m.length-1:C+1],ne=m[C>m.length-3?m.length-1:C+2];return d.set(oMe(G,x.x,H.x,te.x,ne.x),oMe(G,x.y,H.y,te.y,ne.y)),d}copy(o){super.copy(o),this.points=[];for(let r=0,d=o.points.length;r<d;r++){let m=o.points[r];this.points.push(m.clone())}return this}toJSON(){let o=super.toJSON();o.points=[];for(let r=0,d=this.points.length;r<d;r++){let m=this.points[r];o.points.push(m.toArray())}return o}fromJSON(o){super.fromJSON(o),this.points=[];for(let r=0,d=o.points.length;r<d;r++){let m=o.points[r];this.points.push(new _o().fromArray(m))}return this}};ZX.prototype.isSplineCurve=!0;var xHe=Object.freeze({__proto__:null,ArcCurve:G$,CatmullRomCurve3:j$,CubicBezierCurve:XX,CubicBezierCurve3:V$,EllipseCurve:wF,LineCurve:OF,LineCurve3:Jpe,QuadraticBezierCurve:QX,QuadraticBezierCurve3:Y$,SplineCurve:ZX}),$pe=class extends nT{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(o){this.curves.push(o)}closePath(){let o=this.curves[0].getPoint(0),r=this.curves[this.curves.length-1].getPoint(1);o.equals(r)||this.curves.push(new OF(r,o))}getPoint(o){let r=o*this.getLength(),d=this.getCurveLengths(),m=0;for(;m<d.length;){if(d[m]>=r){let O=d[m]-r,C=this.curves[m],G=C.getLength(),x=G===0?0:1-O/G;return C.getPointAt(x)}m++}return null}getLength(){let o=this.getCurveLengths();return o[o.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 o=[],r=0;for(let d=0,m=this.curves.length;d<m;d++)r+=this.curves[d].getLength(),o.push(r);return this.cacheLengths=o,o}getSpacedPoints(o=40){let r=[];for(let d=0;d<=o;d++)r.push(this.getPoint(d/o));return this.autoClose&&r.push(r[0]),r}getPoints(o=12){let r=[],d;for(let m=0,O=this.curves;m<O.length;m++){let C=O[m],G=C&&C.isEllipseCurve?o*2:C&&(C.isLineCurve||C.isLineCurve3)?1:C&&C.isSplineCurve?o*C.points.length:o,x=C.getPoints(G);for(let H=0;H<x.length;H++){let te=x[H];d&&d.equals(te)||(r.push(te),d=te)}}return this.autoClose&&r.length>1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r}copy(o){super.copy(o),this.curves=[];for(let r=0,d=o.curves.length;r<d;r++){let m=o.curves[r];this.curves.push(m.clone())}return this.autoClose=o.autoClose,this}toJSON(){let o=super.toJSON();o.autoClose=this.autoClose,o.curves=[];for(let r=0,d=this.curves.length;r<d;r++){let m=this.curves[r];o.curves.push(m.toJSON())}return o}fromJSON(o){super.fromJSON(o),this.autoClose=o.autoClose,this.curves=[];for(let r=0,d=o.curves.length;r<d;r++){let m=o.curves[r];this.curves.push(new xHe[m.type]().fromJSON(m))}return this}},AF=class extends $pe{constructor(o){super(),this.type="Path",this.currentPoint=new _o,o&&this.setFromPoints(o)}setFromPoints(o){this.moveTo(o[0].x,o[0].y);for(let r=1,d=o.length;r<d;r++)this.lineTo(o[r].x,o[r].y);return this}moveTo(o,r){return this.currentPoint.set(o,r),this}lineTo(o,r){let d=new OF(this.currentPoint.clone(),new _o(o,r));return this.curves.push(d),this.currentPoint.set(o,r),this}quadraticCurveTo(o,r,d,m){let O=new QX(this.currentPoint.clone(),new _o(o,r),new _o(d,m));return this.curves.push(O),this.currentPoint.set(d,m),this}bezierCurveTo(o,r,d,m,O,C){let G=new XX(this.currentPoint.clone(),new _o(o,r),new _o(d,m),new _o(O,C));return this.curves.push(G),this.currentPoint.set(O,C),this}splineThru(o){let r=[this.currentPoint.clone()].concat(o),d=new ZX(r);return this.curves.push(d),this.currentPoint.copy(o[o.length-1]),this}arc(o,r,d,m,O,C){let G=this.currentPoint.x,x=this.currentPoint.y;return this.absarc(o+G,r+x,d,m,O,C),this}absarc(o,r,d,m,O,C){return this.absellipse(o,r,d,d,m,O,C),this}ellipse(o,r,d,m,O,C,G,x){let H=this.currentPoint.x,te=this.currentPoint.y;return this.absellipse(o+H,r+te,d,m,O,C,G,x),this}absellipse(o,r,d,m,O,C,G,x){let H=new wF(o,r,d,m,O,C,G,x);if(this.curves.length>0){let ne=H.getPoint(0);ne.equals(this.currentPoint)||this.lineTo(ne.x,ne.y)}this.curves.push(H);let te=H.getPoint(1);return this.currentPoint.copy(te),this}copy(o){return super.copy(o),this.currentPoint.copy(o.currentPoint),this}toJSON(){let o=super.toJSON();return o.currentPoint=this.currentPoint.toArray(),o}fromJSON(o){return super.fromJSON(o),this.currentPoint.fromArray(o.currentPoint),this}},qR=class extends AF{constructor(o){super(o),this.uuid=aS(),this.type="Shape",this.holes=[]}getPointsHoles(o){let r=[];for(let d=0,m=this.holes.length;d<m;d++)r[d]=this.holes[d].getPoints(o);return r}extractPoints(o){return{shape:this.getPoints(o),holes:this.getPointsHoles(o)}}copy(o){super.copy(o),this.holes=[];for(let r=0,d=o.holes.length;r<d;r++){let m=o.holes[r];this.holes.push(m.clone())}return this}toJSON(){let o=super.toJSON();o.uuid=this.uuid,o.holes=[];for(let r=0,d=this.holes.length;r<d;r++){let m=this.holes[r];o.holes.push(m.toJSON())}return o}fromJSON(o){super.fromJSON(o),this.uuid=o.uuid,this.holes=[];for(let r=0,d=o.holes.length;r<d;r++){let m=o.holes[r];this.holes.push(new AF().fromJSON(m))}return this}},Yz=class extends mv{constructor(o,r=1){super(),this.type="Light",this.color=new C1(o),this.intensity=r}dispose(){}copy(o){return super.copy(o),this.color.copy(o.color),this.intensity=o.intensity,this}toJSON(o){let r=super.toJSON(o);return r.object.color=this.color.getHex(),r.object.intensity=this.intensity,this.groundColor!==void 0&&(r.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(r.object.distance=this.distance),this.angle!==void 0&&(r.object.angle=this.angle),this.decay!==void 0&&(r.object.decay=this.decay),this.penumbra!==void 0&&(r.object.penumbra=this.penumbra),this.shadow!==void 0&&(r.object.shadow=this.shadow.toJSON()),r}};Yz.prototype.isLight=!0;var ede=class extends Yz{constructor(o,r,d){super(o,d),this.type="HemisphereLight",this.position.copy(mv.DefaultUp),this.updateMatrix(),this.groundColor=new C1(r)}copy(o){return Yz.prototype.copy.call(this,o),this.groundColor.copy(o.groundColor),this}};ede.prototype.isHemisphereLight=!0;var lMe=new vc,cMe=new $i,uMe=new $i,KX=class{constructor(o){this.camera=o,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new _o(512,512),this.map=null,this.mapPass=null,this.matrix=new vc,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new vF,this._frameExtents=new _o(1,1),this._viewportCount=1,this._viewports=[new Ob(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(o){let r=this.camera,d=this.matrix;cMe.setFromMatrixPosition(o.matrixWorld),r.position.copy(cMe),uMe.setFromMatrixPosition(o.target.matrixWorld),r.lookAt(uMe),r.updateMatrixWorld(),lMe.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(lMe),d.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),d.multiply(r.projectionMatrix),d.multiply(r.matrixWorldInverse)}getViewport(o){return this._viewports[o]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(o){return this.camera=o.camera.clone(),this.bias=o.bias,this.radius=o.radius,this.mapSize.copy(o.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let o={};return this.bias!==0&&(o.bias=this.bias),this.normalBias!==0&&(o.normalBias=this.normalBias),this.radius!==1&&(o.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(o.mapSize=this.mapSize.toArray()),o.camera=this.camera.toJSON(!1).object,delete o.camera.matrix,o}},X$=class extends KX{constructor(){super(new F_(50,1,.5,500)),this.focus=1}updateMatrices(o){let r=this.camera,d=hpe*2*o.angle*this.focus,m=this.mapSize.width/this.mapSize.height,O=o.distance||r.far;(d!==r.fov||m!==r.aspect||O!==r.far)&&(r.fov=d,r.aspect=m,r.far=O,r.updateProjectionMatrix()),super.updateMatrices(o)}copy(o){return super.copy(o),this.focus=o.focus,this}};X$.prototype.isSpotLightShadow=!0;var tde=class extends Yz{constructor(o,r,d=0,m=Math.PI/3,O=0,C=1){super(o,r),this.type="SpotLight",this.position.copy(mv.DefaultUp),this.updateMatrix(),this.target=new mv,this.distance=d,this.angle=m,this.penumbra=O,this.decay=C,this.shadow=new X$}get power(){return this.intensity*Math.PI}set power(o){this.intensity=o/Math.PI}dispose(){this.shadow.dispose()}copy(o){return super.copy(o),this.distance=o.distance,this.angle=o.angle,this.penumbra=o.penumbra,this.decay=o.decay,this.target=o.target.clone(),this.shadow=o.shadow.clone(),this}};tde.prototype.isSpotLight=!0;var pMe=new vc,_X=new $i,lpe=new $i,Q$=class extends KX{constructor(){super(new F_(90,1,.5,500)),this._frameExtents=new _o(4,2),this._viewportCount=6,this._viewports=[new Ob(2,1,1,1),new Ob(0,1,1,1),new Ob(3,1,1,1),new Ob(1,1,1,1),new Ob(3,0,1,1),new Ob(1,0,1,1)],this._cubeDirections=[new $i(1,0,0),new $i(-1,0,0),new $i(0,0,1),new $i(0,0,-1),new $i(0,1,0),new $i(0,-1,0)],this._cubeUps=[new $i(0,1,0),new $i(0,1,0),new $i(0,1,0),new $i(0,1,0),new $i(0,0,1),new $i(0,0,-1)]}updateMatrices(o,r=0){let d=this.camera,m=this.matrix,O=o.distance||d.far;O!==d.far&&(d.far=O,d.updateProjectionMatrix()),_X.setFromMatrixPosition(o.matrixWorld),d.position.copy(_X),lpe.copy(d.position),lpe.add(this._cubeDirections[r]),d.up.copy(this._cubeUps[r]),d.lookAt(lpe),d.updateMatrixWorld(),m.makeTranslation(-_X.x,-_X.y,-_X.z),pMe.multiplyMatrices(d.projectionMatrix,d.matrixWorldInverse),this._frustum.setFromProjectionMatrix(pMe)}};Q$.prototype.isPointLightShadow=!0;var nde=class extends Yz{constructor(o,r,d=0,m=1){super(o,r),this.type="PointLight",this.distance=d,this.decay=m,this.shadow=new Q$}get power(){return this.intensity*4*Math.PI}set power(o){this.intensity=o/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(o){return super.copy(o),this.distance=o.distance,this.decay=o.decay,this.shadow=o.shadow.clone(),this}};nde.prototype.isPointLight=!0;var Z$=class extends kX{constructor(o=-1,r=1,d=1,m=-1,O=.1,C=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=o,this.right=r,this.top=d,this.bottom=m,this.near=O,this.far=C,this.updateProjectionMatrix()}copy(o,r){return super.copy(o,r),this.left=o.left,this.right=o.right,this.top=o.top,this.bottom=o.bottom,this.near=o.near,this.far=o.far,this.zoom=o.zoom,this.view=o.view===null?null:Object.assign({},o.view),this}setViewOffset(o,r,d,m,O,C){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=o,this.view.fullHeight=r,this.view.offsetX=d,this.view.offsetY=m,this.view.width=O,this.view.height=C,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let o=(this.right-this.left)/(2*this.zoom),r=(this.top-this.bottom)/(2*this.zoom),d=(this.right+this.left)/2,m=(this.top+this.bottom)/2,O=d-o,C=d+o,G=m+r,x=m-r;if(this.view!==null&&this.view.enabled){let H=(this.right-this.left)/this.view.fullWidth/this.zoom,te=(this.top-this.bottom)/this.view.fullHeight/this.zoom;O+=H*this.view.offsetX,C=O+H*this.view.width,G-=te*this.view.offsetY,x=G-te*this.view.height}this.projectionMatrix.makeOrthographic(O,C,G,x,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(o){let r=super.toJSON(o);return r.object.zoom=this.zoom,r.object.left=this.left,r.object.right=this.right,r.object.top=this.top,r.object.bottom=this.bottom,r.object.near=this.near,r.object.far=this.far,this.view!==null&&(r.object.view=Object.assign({},this.view)),r}};Z$.prototype.isOrthographicCamera=!0;var K$=class extends KX{constructor(){super(new Z$(-5,5,5,-5,.5,500))}};K$.prototype.isDirectionalLightShadow=!0;var ide=class extends Yz{constructor(o,r){super(o,r),this.type="DirectionalLight",this.position.copy(mv.DefaultUp),this.updateMatrix(),this.target=new mv,this.shadow=new K$}dispose(){this.shadow.dispose()}copy(o){return super.copy(o),this.target=o.target.clone(),this.shadow=o.shadow.clone(),this}};ide.prototype.isDirectionalLight=!0;var rde=class extends Yz{constructor(o,r){super(o,r),this.type="AmbientLight"}};rde.prototype.isAmbientLight=!0;var sde=class extends Yz{constructor(o,r,d=10,m=10){super(o,r),this.type="RectAreaLight",this.width=d,this.height=m}copy(o){return super.copy(o),this.width=o.width,this.height=o.height,this}toJSON(o){let r=super.toJSON(o);return r.object.width=this.width,r.object.height=this.height,r}};sde.prototype.isRectAreaLight=!0;var J$=class{constructor(){this.coefficients=[];for(let o=0;o<9;o++)this.coefficients.push(new $i)}set(o){for(let r=0;r<9;r++)this.coefficients[r].copy(o[r]);return this}zero(){for(let o=0;o<9;o++)this.coefficients[o].set(0,0,0);return this}getAt(o,r){let d=o.x,m=o.y,O=o.z,C=this.coefficients;return r.copy(C[0]).multiplyScalar(.282095),r.addScaledVector(C[1],.488603*m),r.addScaledVector(C[2],.488603*O),r.addScaledVector(C[3],.488603*d),r.addScaledVector(C[4],1.092548*(d*m)),r.addScaledVector(C[5],1.092548*(m*O)),r.addScaledVector(C[6],.315392*(3*O*O-1)),r.addScaledVector(C[7],1.092548*(d*O)),r.addScaledVector(C[8],.546274*(d*d-m*m)),r}getIrradianceAt(o,r){let d=o.x,m=o.y,O=o.z,C=this.coefficients;return r.copy(C[0]).multiplyScalar(.886227),r.addScaledVector(C[1],2*.511664*m),r.addScaledVector(C[2],2*.511664*O),r.addScaledVector(C[3],2*.511664*d),r.addScaledVector(C[4],2*.429043*d*m),r.addScaledVector(C[5],2*.429043*m*O),r.addScaledVector(C[6],.743125*O*O-.247708),r.addScaledVector(C[7],2*.429043*d*O),r.addScaledVector(C[8],.429043*(d*d-m*m)),r}add(o){for(let r=0;r<9;r++)this.coefficients[r].add(o.coefficients[r]);return this}addScaledSH(o,r){for(let d=0;d<9;d++)this.coefficients[d].addScaledVector(o.coefficients[d],r);return this}scale(o){for(let r=0;r<9;r++)this.coefficients[r].multiplyScalar(o);return this}lerp(o,r){for(let d=0;d<9;d++)this.coefficients[d].lerp(o.coefficients[d],r);return this}equals(o){for(let r=0;r<9;r++)if(!this.coefficients[r].equals(o.coefficients[r]))return!1;return!0}copy(o){return this.set(o.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(o,r=0){let d=this.coefficients;for(let m=0;m<9;m++)d[m].fromArray(o,r+m*3);return this}toArray(o=[],r=0){let d=this.coefficients;for(let m=0;m<9;m++)d[m].toArray(o,r+m*3);return o}static getBasisAt(o,r){let d=o.x,m=o.y,O=o.z;r[0]=.282095,r[1]=.488603*m,r[2]=.488603*O,r[3]=.488603*d,r[4]=1.092548*d*m,r[5]=1.092548*m*O,r[6]=.315392*(3*O*O-1),r[7]=1.092548*d*O,r[8]=.546274*(d*d-m*m)}};J$.prototype.isSphericalHarmonics3=!0;var JX=class extends Yz{constructor(o=new J$,r=1){super(void 0,r),this.sh=o}copy(o){return super.copy(o),this.sh.copy(o.sh),this}fromJSON(o){return this.intensity=o.intensity,this.sh.fromArray(o.sh),this}toJSON(o){let r=super.toJSON(o);return r.object.sh=this.sh.toArray(),r}};JX.prototype.isLightProbe=!0;var ade=class{static decodeText(o){if(typeof TextDecoder<"u")return new TextDecoder().decode(o);let r="";for(let d=0,m=o.length;d<m;d++)r+=String.fromCharCode(o[d]);try{return decodeURIComponent(escape(r))}catch{return r}}static extractUrlBase(o){let r=o.lastIndexOf("/");return r===-1?"./":o.substr(0,r+1)}},ode=class extends c3{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(o){return super.copy(o),this.instanceCount=o.instanceCount,this}clone(){return new this.constructor().copy(this)}toJSON(){let o=super.toJSON(this);return o.instanceCount=this.instanceCount,o.isInstancedBufferGeometry=!0,o}};ode.prototype.isInstancedBufferGeometry=!0;var lde=class extends IM{constructor(o,r,d,m){typeof d=="number"&&(m=d,d=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(o,r,d),this.meshPerAttribute=m||1}copy(o){return super.copy(o),this.meshPerAttribute=o.meshPerAttribute,this}toJSON(){let o=super.toJSON();return o.meshPerAttribute=this.meshPerAttribute,o.isInstancedBufferAttribute=!0,o}};lde.prototype.isInstancedBufferAttribute=!0;var cde=class extends DS{constructor(o){super(o),typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(o){return this.options=o,this}load(o,r,d,m){o===void 0&&(o=""),this.path!==void 0&&(o=this.path+o),o=this.manager.resolveURL(o);let O=this,C=IF.get(o);if(C!==void 0)return O.manager.itemStart(o),setTimeout(function(){r&&r(C),O.manager.itemEnd(o)},0),C;let G={};G.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",G.headers=this.requestHeader,fetch(o,G).then(function(x){return x.blob()}).then(function(x){return createImageBitmap(x,Object.assign(O.options,{colorSpaceConversion:"none"}))}).then(function(x){IF.add(o,x),r&&r(x),O.manager.itemEnd(o)}).catch(function(x){m&&m(x),O.manager.itemError(o),O.manager.itemEnd(o)}),O.manager.itemStart(o)}};cde.prototype.isImageBitmapLoader=!0;var ude=class{constructor(){this.type="ShapePath",this.color=new C1,this.subPaths=[],this.currentPath=null}moveTo(o,r){return this.currentPath=new AF,this.subPaths.push(this.currentPath),this.currentPath.moveTo(o,r),this}lineTo(o,r){return this.currentPath.lineTo(o,r),this}quadraticCurveTo(o,r,d,m){return this.currentPath.quadraticCurveTo(o,r,d,m),this}bezierCurveTo(o,r,d,m,O,C){return this.currentPath.bezierCurveTo(o,r,d,m,O,C),this}splineThru(o){return this.currentPath.splineThru(o),this}toShapes(o,r){function d(Ct){let Zn=[];for(let Hn=0,vi=Ct.length;Hn<vi;Hn++){let en=Ct[Hn],Ni=new qR;Ni.curves=en.curves,Zn.push(Ni)}return Zn}function m(Ct,Zn){let Hn=Zn.length,vi=!1;for(let en=Hn-1,Ni=0;Ni<Hn;en=Ni++){let Mi=Zn[en],Di=Zn[Ni],Ur=Di.x-Mi.x,Er=Di.y-Mi.y;if(Math.abs(Er)>Number.EPSILON){if(Er<0&&(Mi=Zn[Ni],Ur=-Ur,Di=Zn[en],Er=-Er),Ct.y<Mi.y||Ct.y>Di.y)continue;if(Ct.y===Mi.y){if(Ct.x===Mi.x)return!0}else{let yr=Er*(Ct.x-Mi.x)-Ur*(Ct.y-Mi.y);if(yr===0)return!0;if(yr<0)continue;vi=!vi}}else{if(Ct.y!==Mi.y)continue;if(Di.x<=Ct.x&&Ct.x<=Mi.x||Mi.x<=Ct.x&&Ct.x<=Di.x)return!0}}return vi}let O=V8.isClockWise,C=this.subPaths;if(C.length===0)return[];if(r===!0)return d(C);let G,x,H,te=[];if(C.length===1)return x=C[0],H=new qR,H.curves=x.curves,te.push(H),te;let ne=!O(C[0].getPoints());ne=o?!ne:ne;let Te=[],Pe=[],Ye=[],mt=0,Nt;Pe[mt]=void 0,Ye[mt]=[];for(let Ct=0,Zn=C.length;Ct<Zn;Ct++)x=C[Ct],Nt=x.getPoints(),G=O(Nt),G=o?!G:G,G?(!ne&&Pe[mt]&&mt++,Pe[mt]={s:new qR,p:Nt},Pe[mt].s.curves=x.curves,ne&&mt++,Ye[mt]=[]):Ye[mt].push({h:x,p:Nt[0]});if(!Pe[0])return d(C);if(Pe.length>1){let Ct=!1,Zn=[];for(let Hn=0,vi=Pe.length;Hn<vi;Hn++)Te[Hn]=[];for(let Hn=0,vi=Pe.length;Hn<vi;Hn++){let en=Ye[Hn];for(let Ni=0;Ni<en.length;Ni++){let Mi=en[Ni],Di=!0;for(let Ur=0;Ur<Pe.length;Ur++)m(Mi.p,Pe[Ur].p)&&(Hn!==Ur&&Zn.push({froms:Hn,tos:Ur,hole:Ni}),Di?(Di=!1,Te[Ur].push(Mi)):Ct=!0);Di&&Te[Hn].push(Mi)}}Zn.length>0&&(Ct||(Ye=Te))}let Dt;for(let Ct=0,Zn=Pe.length;Ct<Zn;Ct++){H=Pe[Ct].s,te.push(H),Dt=Ye[Ct];for(let Hn=0,vi=Dt.length;Hn<vi;Hn++)H.holes.push(Dt[Hn].h)}return te}},pde=class{constructor(o){this.type="Font",this.data=o}generateShapes(o,r=100){let d=[],m=RHe(o,r,this.data);for(let O=0,C=m.length;O<C;O++)Array.prototype.push.apply(d,m[O].toShapes());return d}};function RHe(p,o,r){let d=Array.from(p),m=o/r.resolution,O=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*m,C=[],G=0,x=0;for(let H=0;H<d.length;H++){let te=d[H];if(te===`
12747
- `)G=0,x-=O;else{let ne=NHe(te,m,G,x,r);G+=ne.offsetX,C.push(ne.path)}}return C}function NHe(p,o,r,d,m){let O=m.glyphs[p]||m.glyphs["?"];if(!O){console.error('THREE.Font: character "'+p+'" does not exists in font family '+m.familyName+".");return}let C=new ude,G,x,H,te,ne,Te,Pe,Ye;if(O.o){let mt=O._cachedOutline||(O._cachedOutline=O.o.split(" "));for(let Nt=0,Dt=mt.length;Nt<Dt;)switch(mt[Nt++]){case"m":G=mt[Nt++]*o+r,x=mt[Nt++]*o+d,C.moveTo(G,x);break;case"l":G=mt[Nt++]*o+r,x=mt[Nt++]*o+d,C.lineTo(G,x);break;case"q":H=mt[Nt++]*o+r,te=mt[Nt++]*o+d,ne=mt[Nt++]*o+r,Te=mt[Nt++]*o+d,C.quadraticCurveTo(ne,Te,H,te);break;case"b":H=mt[Nt++]*o+r,te=mt[Nt++]*o+d,ne=mt[Nt++]*o+r,Te=mt[Nt++]*o+d,Pe=mt[Nt++]*o+r,Ye=mt[Nt++]*o+d,C.bezierCurveTo(ne,Te,Pe,Ye,H,te);break}}return{offsetX:O.ha*o,path:C}}pde.prototype.isFont=!0;var m$,PHe={getContext:function(){return m$===void 0&&(m$=new(window.AudioContext||window.webkitAudioContext)),m$},setContext:function(p){m$=p}},dde=class extends DS{constructor(o){super(o)}load(o,r,d,m){let O=this,C=new Qpe(this.manager);C.setResponseType("arraybuffer"),C.setPath(this.path),C.setRequestHeader(this.requestHeader),C.setWithCredentials(this.withCredentials),C.load(o,function(G){try{let x=G.slice(0);PHe.getContext().decodeAudioData(x,function(te){r(te)})}catch(x){m?m(x):console.error(x),O.manager.itemError(o)}},d,m)}},hde=class extends JX{constructor(o,r,d=1){super(void 0,d);let m=new C1().set(o),O=new C1().set(r),C=new $i(m.r,m.g,m.b),G=new $i(O.r,O.g,O.b),x=Math.sqrt(Math.PI),H=x*Math.sqrt(.75);this.sh.coefficients[0].copy(C).add(G).multiplyScalar(x),this.sh.coefficients[1].copy(C).sub(G).multiplyScalar(H)}};hde.prototype.isHemisphereLightProbe=!0;var fde=class extends JX{constructor(o,r=1){super(void 0,r);let d=new C1().set(o);this.sh.coefficients[0].set(d.r,d.g,d.b).multiplyScalar(2*Math.sqrt(Math.PI))}};fde.prototype.isAmbientLightProbe=!0;var mde=class extends mv{constructor(o){super(),this.type="Audio",this.listener=o,this.context=o.context,this.gain=this.context.createGain(),this.gain.connect(o.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(o){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=o,this.connect(),this}setMediaElementSource(o){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(o),this.connect(),this}setMediaStreamSource(o){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(o),this.connect(),this}setBuffer(o){return this.buffer=o,this.sourceType="buffer",this.autoplay&&this.play(),this}play(o=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+o;let r=this.context.createBufferSource();return r.buffer=this.buffer,r.loop=this.loop,r.loopStart=this.loopStart,r.loopEnd=this.loopEnd,r.onended=this.onEnded.bind(this),r.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=r,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let o=1,r=this.filters.length;o<r;o++)this.filters[o-1].connect(this.filters[o]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let o=1,r=this.filters.length;o<r;o++)this.filters[o-1].disconnect(this.filters[o]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(o){return o||(o=[]),this._connected===!0?(this.disconnect(),this.filters=o.slice(),this.connect()):this.filters=o.slice(),this}setDetune(o){if(this.detune=o,this.source.detune!==void 0)return this.isPlaying===!0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(o){return this.setFilters(o?[o]:[])}setPlaybackRate(o){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.playbackRate=o,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(o){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.loop=o,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(o){return this.loopStart=o,this}setLoopEnd(o){return this.loopEnd=o,this}getVolume(){return this.gain.gain.value}setVolume(o){return this.gain.gain.setTargetAtTime(o,this.context.currentTime,.01),this}};var bde=class{constructor(o,r=2048){this.analyser=o.context.createAnalyser(),this.analyser.fftSize=r,this.data=new Uint8Array(this.analyser.frequencyBinCount),o.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let o=0,r=this.getFrequencyData();for(let d=0;d<r.length;d++)o+=r[d];return o/r.length}},vde=class{constructor(o,r,d){this.binding=o,this.valueSize=d;let m,O,C;switch(r){case"quaternion":m=this._slerp,O=this._slerpAdditive,C=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(d*6),this._workIndex=5;break;case"string":case"bool":m=this._select,O=this._select,C=this._setAdditiveIdentityOther,this.buffer=new Array(d*5);break;default:m=this._lerp,O=this._lerpAdditive,C=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(d*5)}this._mixBufferRegion=m,this._mixBufferRegionAdditive=O,this._setIdentity=C,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(o,r){let d=this.buffer,m=this.valueSize,O=o*m+m,C=this.cumulativeWeight;if(C===0){for(let G=0;G!==m;++G)d[O+G]=d[G];C=r}else{C+=r;let G=r/C;this._mixBufferRegion(d,O,0,G,m)}this.cumulativeWeight=C}accumulateAdditive(o){let r=this.buffer,d=this.valueSize,m=d*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(r,m,0,o,d),this.cumulativeWeightAdditive+=o}apply(o){let r=this.valueSize,d=this.buffer,m=o*r+r,O=this.cumulativeWeight,C=this.cumulativeWeightAdditive,G=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,O<1){let x=r*this._origIndex;this._mixBufferRegion(d,m,x,1-O,r)}C>0&&this._mixBufferRegionAdditive(d,m,this._addIndex*r,1,r);for(let x=r,H=r+r;x!==H;++x)if(d[x]!==d[x+r]){G.setValue(d,m);break}}saveOriginalState(){let o=this.binding,r=this.buffer,d=this.valueSize,m=d*this._origIndex;o.getValue(r,m);for(let O=d,C=m;O!==C;++O)r[O]=r[m+O%d];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let o=this.valueSize*3;this.binding.setValue(this.buffer,o)}_setAdditiveIdentityNumeric(){let o=this._addIndex*this.valueSize,r=o+this.valueSize;for(let d=o;d<r;d++)this.buffer[d]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let o=this._origIndex*this.valueSize,r=this._addIndex*this.valueSize;for(let d=0;d<this.valueSize;d++)this.buffer[r+d]=this.buffer[o+d]}_select(o,r,d,m,O){if(m>=.5)for(let C=0;C!==O;++C)o[r+C]=o[d+C]}_slerp(o,r,d,m){QA.slerpFlat(o,r,o,r,o,d,m)}_slerpAdditive(o,r,d,m,O){let C=this._workIndex*O;QA.multiplyQuaternionsFlat(o,C,o,r,o,d),QA.slerpFlat(o,r,o,r,o,C,m)}_lerp(o,r,d,m,O){let C=1-m;for(let G=0;G!==O;++G){let x=r+G;o[x]=o[x]*C+o[d+G]*m}}_lerpAdditive(o,r,d,m,O){for(let C=0;C!==O;++C){let G=r+C;o[G]=o[G]+o[d+C]*m}}},Hde="\\[\\]\\.:\\/",BHe=new RegExp("["+Hde+"]","g"),Fde="[^"+Hde+"]",HHe="[^"+Hde.replace("\\.","")+"]",FHe=/((?:WC+[\/:])*)/.source.replace("WC",Fde),kHe=/(WCOD+)?/.source.replace("WCOD",HHe),qHe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Fde),WHe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Fde),UHe=new RegExp("^"+FHe+kHe+qHe+WHe+"$"),GHe=["material","materials","bones"],gde=class{constructor(o,r,d){let m=d||ty.parseTrackName(r);this._targetGroup=o,this._bindings=o.subscribe_(r,m)}getValue(o,r){this.bind();let d=this._targetGroup.nCachedObjects_,m=this._bindings[d];m!==void 0&&m.getValue(o,r)}setValue(o,r){let d=this._bindings;for(let m=this._targetGroup.nCachedObjects_,O=d.length;m!==O;++m)d[m].setValue(o,r)}bind(){let o=this._bindings;for(let r=this._targetGroup.nCachedObjects_,d=o.length;r!==d;++r)o[r].bind()}unbind(){let o=this._bindings;for(let r=this._targetGroup.nCachedObjects_,d=o.length;r!==d;++r)o[r].unbind()}},ty=(()=>{class p{constructor(r,d,m){this.path=d,this.parsedPath=m||p.parseTrackName(d),this.node=p.findNode(r,this.parsedPath.nodeName)||r,this.rootNode=r,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(r,d,m){return r&&r.isAnimationObjectGroup?new p.Composite(r,d,m):new p(r,d,m)}static sanitizeNodeName(r){return r.replace(/\s/g,"_").replace(BHe,"")}static parseTrackName(r){let d=UHe.exec(r);if(!d)throw new Error("PropertyBinding: Cannot parse trackName: "+r);let m={nodeName:d[2],objectName:d[3],objectIndex:d[4],propertyName:d[5],propertyIndex:d[6]},O=m.nodeName&&m.nodeName.lastIndexOf(".");if(O!==void 0&&O!==-1){let C=m.nodeName.substring(O+1);GHe.indexOf(C)!==-1&&(m.nodeName=m.nodeName.substring(0,O),m.objectName=C)}if(m.propertyName===null||m.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+r);return m}static findNode(r,d){if(!d||d===""||d==="."||d===-1||d===r.name||d===r.uuid)return r;if(r.skeleton){let m=r.skeleton.getBoneByName(d);if(m!==void 0)return m}if(r.children){let m=function(C){for(let G=0;G<C.length;G++){let x=C[G];if(x.name===d||x.uuid===d)return x;let H=m(x.children);if(H)return H}return null},O=m(r.children);if(O)return O}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(r,d){r[d]=this.node[this.propertyName]}_getValue_array(r,d){let m=this.resolvedProperty;for(let O=0,C=m.length;O!==C;++O)r[d++]=m[O]}_getValue_arrayElement(r,d){r[d]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(r,d){this.resolvedProperty.toArray(r,d)}_setValue_direct(r,d){this.targetObject[this.propertyName]=r[d]}_setValue_direct_setNeedsUpdate(r,d){this.targetObject[this.propertyName]=r[d],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(r,d){this.targetObject[this.propertyName]=r[d],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(r,d){let m=this.resolvedProperty;for(let O=0,C=m.length;O!==C;++O)m[O]=r[d++]}_setValue_array_setNeedsUpdate(r,d){let m=this.resolvedProperty;for(let O=0,C=m.length;O!==C;++O)m[O]=r[d++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(r,d){let m=this.resolvedProperty;for(let O=0,C=m.length;O!==C;++O)m[O]=r[d++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(r,d){this.resolvedProperty[this.propertyIndex]=r[d]}_setValue_arrayElement_setNeedsUpdate(r,d){this.resolvedProperty[this.propertyIndex]=r[d],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(r,d){this.resolvedProperty[this.propertyIndex]=r[d],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(r,d){this.resolvedProperty.fromArray(r,d)}_setValue_fromArray_setNeedsUpdate(r,d){this.resolvedProperty.fromArray(r,d),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(r,d){this.resolvedProperty.fromArray(r,d),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(r,d){this.bind(),this.getValue(r,d)}_setValue_unbound(r,d){this.bind(),this.setValue(r,d)}bind(){let r=this.node,d=this.parsedPath,m=d.objectName,O=d.propertyName,C=d.propertyIndex;if(r||(r=p.findNode(this.rootNode,d.nodeName)||this.rootNode,this.node=r),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!r){console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");return}if(m){let te=d.objectIndex;switch(m){case"materials":if(!r.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!r.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}r=r.material.materials;break;case"bones":if(!r.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}r=r.skeleton.bones;for(let ne=0;ne<r.length;ne++)if(r[ne].name===te){te=ne;break}break;default:if(r[m]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}r=r[m]}if(te!==void 0){if(r[te]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,r);return}r=r[te]}}let G=r[O];if(G===void 0){let te=d.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+te+"."+O+" but it wasn't found.",r);return}let x=this.Versioning.None;this.targetObject=r,r.needsUpdate!==void 0?x=this.Versioning.NeedsUpdate:r.matrixWorldNeedsUpdate!==void 0&&(x=this.Versioning.MatrixWorldNeedsUpdate);let H=this.BindingType.Direct;if(C!==void 0){if(O==="morphTargetInfluences"){if(!r.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(r.geometry.isBufferGeometry){if(!r.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}r.morphTargetDictionary[C]!==void 0&&(C=r.morphTargetDictionary[C])}else{console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);return}}H=this.BindingType.ArrayElement,this.resolvedProperty=G,this.propertyIndex=C}else G.fromArray!==void 0&&G.toArray!==void 0?(H=this.BindingType.HasFromToArray,this.resolvedProperty=G):Array.isArray(G)?(H=this.BindingType.EntireArray,this.resolvedProperty=G):this.propertyName=O;this.getValue=this.GetterByBindingType[H],this.setValue=this.SetterByBindingTypeAndVersioning[H][x]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}return p.Composite=gde,p})();ty.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};ty.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};ty.prototype.GetterByBindingType=[ty.prototype._getValue_direct,ty.prototype._getValue_array,ty.prototype._getValue_arrayElement,ty.prototype._getValue_toArray];ty.prototype.SetterByBindingTypeAndVersioning=[[ty.prototype._setValue_direct,ty.prototype._setValue_direct_setNeedsUpdate,ty.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[ty.prototype._setValue_array,ty.prototype._setValue_array_setNeedsUpdate,ty.prototype._setValue_array_setMatrixWorldNeedsUpdate],[ty.prototype._setValue_arrayElement,ty.prototype._setValue_arrayElement_setNeedsUpdate,ty.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[ty.prototype._setValue_fromArray,ty.prototype._setValue_fromArray_setNeedsUpdate,ty.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var yde=class{constructor(){this.uuid=aS(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;let o={};this._indicesByUUID=o;for(let d=0,m=arguments.length;d!==m;++d)o[arguments[d].uuid]=d;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};let r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}add(){let o=this._objects,r=this._indicesByUUID,d=this._paths,m=this._parsedPaths,O=this._bindings,C=O.length,G,x=o.length,H=this.nCachedObjects_;for(let te=0,ne=arguments.length;te!==ne;++te){let Te=arguments[te],Pe=Te.uuid,Ye=r[Pe];if(Ye===void 0){Ye=x++,r[Pe]=Ye,o.push(Te);for(let mt=0,Nt=C;mt!==Nt;++mt)O[mt].push(new ty(Te,d[mt],m[mt]))}else if(Ye<H){G=o[Ye];let mt=--H,Nt=o[mt];r[Nt.uuid]=Ye,o[Ye]=Nt,r[Pe]=mt,o[mt]=Te;for(let Dt=0,Ct=C;Dt!==Ct;++Dt){let Zn=O[Dt],Hn=Zn[mt],vi=Zn[Ye];Zn[Ye]=Hn,vi===void 0&&(vi=new ty(Te,d[Dt],m[Dt])),Zn[mt]=vi}}else o[Ye]!==G&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=H}remove(){let o=this._objects,r=this._indicesByUUID,d=this._bindings,m=d.length,O=this.nCachedObjects_;for(let C=0,G=arguments.length;C!==G;++C){let x=arguments[C],H=x.uuid,te=r[H];if(te!==void 0&&te>=O){let ne=O++,Te=o[ne];r[Te.uuid]=te,o[te]=Te,r[H]=ne,o[ne]=x;for(let Pe=0,Ye=m;Pe!==Ye;++Pe){let mt=d[Pe],Nt=mt[ne],Dt=mt[te];mt[te]=Nt,mt[ne]=Dt}}}this.nCachedObjects_=O}uncache(){let o=this._objects,r=this._indicesByUUID,d=this._bindings,m=d.length,O=this.nCachedObjects_,C=o.length;for(let G=0,x=arguments.length;G!==x;++G){let H=arguments[G],te=H.uuid,ne=r[te];if(ne!==void 0)if(delete r[te],ne<O){let Te=--O,Pe=o[Te],Ye=--C,mt=o[Ye];r[Pe.uuid]=ne,o[ne]=Pe,r[mt.uuid]=Te,o[Te]=mt,o.pop();for(let Nt=0,Dt=m;Nt!==Dt;++Nt){let Ct=d[Nt],Zn=Ct[Te],Hn=Ct[Ye];Ct[ne]=Zn,Ct[Te]=Hn,Ct.pop()}}else{let Te=--C,Pe=o[Te];Te>0&&(r[Pe.uuid]=ne),o[ne]=Pe,o.pop();for(let Ye=0,mt=m;Ye!==mt;++Ye){let Nt=d[Ye];Nt[ne]=Nt[Te],Nt.pop()}}}this.nCachedObjects_=O}subscribe_(o,r){let d=this._bindingsIndicesByPath,m=d[o],O=this._bindings;if(m!==void 0)return O[m];let C=this._paths,G=this._parsedPaths,x=this._objects,H=x.length,te=this.nCachedObjects_,ne=new Array(H);m=O.length,d[o]=m,C.push(o),G.push(r),O.push(ne);for(let Te=te,Pe=x.length;Te!==Pe;++Te){let Ye=x[Te];ne[Te]=new ty(Ye,o,r)}return ne}unsubscribe_(o){let r=this._bindingsIndicesByPath,d=r[o];if(d!==void 0){let m=this._paths,O=this._parsedPaths,C=this._bindings,G=C.length-1,x=C[G],H=o[G];r[H]=d,C[d]=x,C.pop(),O[d]=O[G],O.pop(),m[d]=m[G],m.pop()}}};yde.prototype.isAnimationObjectGroup=!0;var Mde=class{constructor(o,r,d=null,m=r.blendMode){this._mixer=o,this._clip=r,this._localRoot=d,this.blendMode=m;let O=r.tracks,C=O.length,G=new Array(C),x={endingStart:uF,endingEnd:uF};for(let H=0;H!==C;++H){let te=O[H].createInterpolant(null);G[H]=te,te.settings=x}this._interpolantSettings=x,this._interpolants=G,this._propertyBindings=new Array(C),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=O7e,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(o){return this._startTime=o,this}setLoop(o,r){return this.loop=o,this.repetitions=r,this}setEffectiveWeight(o){return this.weight=o,this._effectiveWeight=this.enabled?o:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(o){return this._scheduleFading(o,0,1)}fadeOut(o){return this._scheduleFading(o,1,0)}crossFadeFrom(o,r,d){if(o.fadeOut(r),this.fadeIn(r),d){let m=this._clip.duration,O=o._clip.duration,C=O/m,G=m/O;o.warp(1,C,r),this.warp(G,1,r)}return this}crossFadeTo(o,r,d){return o.crossFadeFrom(this,r,d)}stopFading(){let o=this._weightInterpolant;return o!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(o)),this}setEffectiveTimeScale(o){return this.timeScale=o,this._effectiveTimeScale=this.paused?0:o,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(o){return this.timeScale=this._clip.duration/o,this.stopWarping()}syncWith(o){return this.time=o.time,this.timeScale=o.timeScale,this.stopWarping()}halt(o){return this.warp(this._effectiveTimeScale,0,o)}warp(o,r,d){let m=this._mixer,O=m.time,C=this.timeScale,G=this._timeScaleInterpolant;G===null&&(G=m._lendControlInterpolant(),this._timeScaleInterpolant=G);let x=G.parameterPositions,H=G.sampleValues;return x[0]=O,x[1]=O+d,H[0]=o/C,H[1]=r/C,this}stopWarping(){let o=this._timeScaleInterpolant;return o!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(o)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(o,r,d,m){if(!this.enabled){this._updateWeight(o);return}let O=this._startTime;if(O!==null){let x=(o-O)*d;if(x<0||d===0)return;this._startTime=null,r=d*x}r*=this._updateTimeScale(o);let C=this._updateTime(r),G=this._updateWeight(o);if(G>0){let x=this._interpolants,H=this._propertyBindings;switch(this.blendMode){case MMe:for(let te=0,ne=x.length;te!==ne;++te)x[te].evaluate(C),H[te].accumulateAdditive(G);break;case Nde:default:for(let te=0,ne=x.length;te!==ne;++te)x[te].evaluate(C),H[te].accumulate(m,G)}}}_updateWeight(o){let r=0;if(this.enabled){r=this.weight;let d=this._weightInterpolant;if(d!==null){let m=d.evaluate(o)[0];r*=m,o>d.parameterPositions[1]&&(this.stopFading(),m===0&&(this.enabled=!1))}}return this._effectiveWeight=r,r}_updateTimeScale(o){let r=0;if(!this.paused){r=this.timeScale;let d=this._timeScaleInterpolant;if(d!==null){let m=d.evaluate(o)[0];r*=m,o>d.parameterPositions[1]&&(this.stopWarping(),r===0?this.paused=!0:this.timeScale=r)}}return this._effectiveTimeScale=r,r}_updateTime(o){let r=this._clip.duration,d=this.loop,m=this.time+o,O=this._loopCount,C=d===A7e;if(o===0)return O===-1?m:C&&(O&1)===1?r-m:m;if(d===w7e){O===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(m>=r)m=r;else if(m<0)m=0;else{this.time=m;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=m,this._mixer.dispatchEvent({type:"finished",action:this,direction:o<0?-1:1})}}else{if(O===-1&&(o>=0?(O=0,this._setEndings(!0,this.repetitions===0,C)):this._setEndings(this.repetitions===0,!0,C)),m>=r||m<0){let G=Math.floor(m/r);m-=r*G,O+=Math.abs(G);let x=this.repetitions-O;if(x<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,m=o>0?r:0,this.time=m,this._mixer.dispatchEvent({type:"finished",action:this,direction:o>0?1:-1});else{if(x===1){let H=o<0;this._setEndings(H,!H,C)}else this._setEndings(!1,!1,C);this._loopCount=O,this.time=m,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:G})}}else this.time=m;if(C&&(O&1)===1)return r-m}return m}_setEndings(o,r,d){let m=this._interpolantSettings;d?(m.endingStart=pF,m.endingEnd=pF):(o?m.endingStart=this.zeroSlopeAtStart?pF:uF:m.endingStart=A$,r?m.endingEnd=this.zeroSlopeAtEnd?pF:uF:m.endingEnd=A$)}_scheduleFading(o,r,d){let m=this._mixer,O=m.time,C=this._weightInterpolant;C===null&&(C=m._lendControlInterpolant(),this._weightInterpolant=C);let G=C.parameterPositions,x=C.sampleValues;return G[0]=O,x[0]=r,G[1]=O+o,x[1]=d,this}},Ide=class extends Y8{constructor(o){super(),this._root=o,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(o,r){let d=o._localRoot||this._root,m=o._clip.tracks,O=m.length,C=o._propertyBindings,G=o._interpolants,x=d.uuid,H=this._bindingsByRootAndName,te=H[x];te===void 0&&(te={},H[x]=te);for(let ne=0;ne!==O;++ne){let Te=m[ne],Pe=Te.name,Ye=te[Pe];if(Ye!==void 0)C[ne]=Ye;else{if(Ye=C[ne],Ye!==void 0){Ye._cacheIndex===null&&(++Ye.referenceCount,this._addInactiveBinding(Ye,x,Pe));continue}let mt=r&&r._propertyBindings[ne].binding.parsedPath;Ye=new vde(ty.create(d,Pe,mt),Te.ValueTypeName,Te.getValueSize()),++Ye.referenceCount,this._addInactiveBinding(Ye,x,Pe),C[ne]=Ye}G[ne].resultBuffer=Ye.buffer}}_activateAction(o){if(!this._isActiveAction(o)){if(o._cacheIndex===null){let d=(o._localRoot||this._root).uuid,m=o._clip.uuid,O=this._actionsByClip[m];this._bindAction(o,O&&O.knownActions[0]),this._addInactiveAction(o,m,d)}let r=o._propertyBindings;for(let d=0,m=r.length;d!==m;++d){let O=r[d];O.useCount++===0&&(this._lendBinding(O),O.saveOriginalState())}this._lendAction(o)}}_deactivateAction(o){if(this._isActiveAction(o)){let r=o._propertyBindings;for(let d=0,m=r.length;d!==m;++d){let O=r[d];--O.useCount===0&&(O.restoreOriginalState(),this._takeBackBinding(O))}this._takeBackAction(o)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let o=this;this.stats={actions:{get total(){return o._actions.length},get inUse(){return o._nActiveActions}},bindings:{get total(){return o._bindings.length},get inUse(){return o._nActiveBindings}},controlInterpolants:{get total(){return o._controlInterpolants.length},get inUse(){return o._nActiveControlInterpolants}}}}_isActiveAction(o){let r=o._cacheIndex;return r!==null&&r<this._nActiveActions}_addInactiveAction(o,r,d){let m=this._actions,O=this._actionsByClip,C=O[r];if(C===void 0)C={knownActions:[o],actionByRoot:{}},o._byClipCacheIndex=0,O[r]=C;else{let G=C.knownActions;o._byClipCacheIndex=G.length,G.push(o)}o._cacheIndex=m.length,m.push(o),C.actionByRoot[d]=o}_removeInactiveAction(o){let r=this._actions,d=r[r.length-1],m=o._cacheIndex;d._cacheIndex=m,r[m]=d,r.pop(),o._cacheIndex=null;let O=o._clip.uuid,C=this._actionsByClip,G=C[O],x=G.knownActions,H=x[x.length-1],te=o._byClipCacheIndex;H._byClipCacheIndex=te,x[te]=H,x.pop(),o._byClipCacheIndex=null;let ne=G.actionByRoot,Te=(o._localRoot||this._root).uuid;delete ne[Te],x.length===0&&delete C[O],this._removeInactiveBindingsForAction(o)}_removeInactiveBindingsForAction(o){let r=o._propertyBindings;for(let d=0,m=r.length;d!==m;++d){let O=r[d];--O.referenceCount===0&&this._removeInactiveBinding(O)}}_lendAction(o){let r=this._actions,d=o._cacheIndex,m=this._nActiveActions++,O=r[m];o._cacheIndex=m,r[m]=o,O._cacheIndex=d,r[d]=O}_takeBackAction(o){let r=this._actions,d=o._cacheIndex,m=--this._nActiveActions,O=r[m];o._cacheIndex=m,r[m]=o,O._cacheIndex=d,r[d]=O}_addInactiveBinding(o,r,d){let m=this._bindingsByRootAndName,O=this._bindings,C=m[r];C===void 0&&(C={},m[r]=C),C[d]=o,o._cacheIndex=O.length,O.push(o)}_removeInactiveBinding(o){let r=this._bindings,d=o.binding,m=d.rootNode.uuid,O=d.path,C=this._bindingsByRootAndName,G=C[m],x=r[r.length-1],H=o._cacheIndex;x._cacheIndex=H,r[H]=x,r.pop(),delete G[O],Object.keys(G).length===0&&delete C[m]}_lendBinding(o){let r=this._bindings,d=o._cacheIndex,m=this._nActiveBindings++,O=r[m];o._cacheIndex=m,r[m]=o,O._cacheIndex=d,r[d]=O}_takeBackBinding(o){let r=this._bindings,d=o._cacheIndex,m=--this._nActiveBindings,O=r[m];o._cacheIndex=m,r[m]=o,O._cacheIndex=d,r[d]=O}_lendControlInterpolant(){let o=this._controlInterpolants,r=this._nActiveControlInterpolants++,d=o[r];return d===void 0&&(d=new k$(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),d.__cacheIndex=r,o[r]=d),d}_takeBackControlInterpolant(o){let r=this._controlInterpolants,d=o.__cacheIndex,m=--this._nActiveControlInterpolants,O=r[m];o.__cacheIndex=m,r[m]=o,O.__cacheIndex=d,r[d]=O}clipAction(o,r,d){let m=r||this._root,O=m.uuid,C=typeof o=="string"?W$.findByName(m,o):o,G=C!==null?C.uuid:o,x=this._actionsByClip[G],H=null;if(d===void 0&&(C!==null?d=C.blendMode:d=Nde),x!==void 0){let ne=x.actionByRoot[O];if(ne!==void 0&&ne.blendMode===d)return ne;H=x.knownActions[0],C===null&&(C=H._clip)}if(C===null)return null;let te=new Mde(this,C,r,d);return this._bindAction(te,H),this._addInactiveAction(te,G,O),te}existingAction(o,r){let d=r||this._root,m=d.uuid,O=typeof o=="string"?W$.findByName(d,o):o,C=O?O.uuid:o,G=this._actionsByClip[C];return G!==void 0&&G.actionByRoot[m]||null}stopAllAction(){let o=this._actions,r=this._nActiveActions;for(let d=r-1;d>=0;--d)o[d].stop();return this}update(o){o*=this.timeScale;let r=this._actions,d=this._nActiveActions,m=this.time+=o,O=Math.sign(o),C=this._accuIndex^=1;for(let H=0;H!==d;++H)r[H]._update(m,o,O,C);let G=this._bindings,x=this._nActiveBindings;for(let H=0;H!==x;++H)G[H].apply(C);return this}setTime(o){this.time=0;for(let r=0;r<this._actions.length;r++)this._actions[r].time=0;return this.update(o)}getRoot(){return this._root}uncacheClip(o){let r=this._actions,d=o.uuid,m=this._actionsByClip,O=m[d];if(O!==void 0){let C=O.knownActions;for(let G=0,x=C.length;G!==x;++G){let H=C[G];this._deactivateAction(H);let te=H._cacheIndex,ne=r[r.length-1];H._cacheIndex=null,H._byClipCacheIndex=null,ne._cacheIndex=te,r[te]=ne,r.pop(),this._removeInactiveBindingsForAction(H)}delete m[d]}}uncacheRoot(o){let r=o.uuid,d=this._actionsByClip;for(let C in d){let G=d[C].actionByRoot,x=G[r];x!==void 0&&(this._deactivateAction(x),this._removeInactiveAction(x))}let m=this._bindingsByRootAndName,O=m[r];if(O!==void 0)for(let C in O){let G=O[C];G.restoreOriginalState(),this._removeInactiveBinding(G)}}uncacheAction(o,r){let d=this.existingAction(o,r);d!==null&&(this._deactivateAction(d),this._removeInactiveAction(d))}};Ide.prototype._controlInterpolantsResultBuffer=new Float32Array(1);var wde=class p{constructor(o){typeof o=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),o=arguments[1]),this.value=o}clone(){return new p(this.value.clone===void 0?this.value:this.value.clone())}},Ode=class extends SB{constructor(o,r,d=1){super(o,r),this.meshPerAttribute=d||1}copy(o){return super.copy(o),this.meshPerAttribute=o.meshPerAttribute,this}clone(o){let r=super.clone(o);return r.meshPerAttribute=this.meshPerAttribute,r}toJSON(o){let r=super.toJSON(o);return r.isInstancedInterleavedBuffer=!0,r.meshPerAttribute=this.meshPerAttribute,r}};Ode.prototype.isInstancedInterleavedBuffer=!0;var Ade=class{constructor(o,r,d,m,O){this.buffer=o,this.type=r,this.itemSize=d,this.elementSize=m,this.count=O,this.version=0}set needsUpdate(o){o===!0&&this.version++}setBuffer(o){return this.buffer=o,this}setType(o,r){return this.type=o,this.elementSize=r,this}setItemSize(o){return this.itemSize=o,this}setCount(o){return this.count=o,this}};Ade.prototype.isGLBufferAttribute=!0;var dMe=new _o,RB=class{constructor(o=new _o(1/0,1/0),r=new _o(-1/0,-1/0)){this.min=o,this.max=r}set(o,r){return this.min.copy(o),this.max.copy(r),this}setFromPoints(o){this.makeEmpty();for(let r=0,d=o.length;r<d;r++)this.expandByPoint(o[r]);return this}setFromCenterAndSize(o,r){let d=dMe.copy(r).multiplyScalar(.5);return this.min.copy(o).sub(d),this.max.copy(o).add(d),this}clone(){return new this.constructor().copy(this)}copy(o){return this.min.copy(o.min),this.max.copy(o.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(o){return o===void 0&&(console.warn("THREE.Box2: .getCenter() target is now required"),o=new _o),this.isEmpty()?o.set(0,0):o.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(o){return o===void 0&&(console.warn("THREE.Box2: .getSize() target is now required"),o=new _o),this.isEmpty()?o.set(0,0):o.subVectors(this.max,this.min)}expandByPoint(o){return this.min.min(o),this.max.max(o),this}expandByVector(o){return this.min.sub(o),this.max.add(o),this}expandByScalar(o){return this.min.addScalar(-o),this.max.addScalar(o),this}containsPoint(o){return!(o.x<this.min.x||o.x>this.max.x||o.y<this.min.y||o.y>this.max.y)}containsBox(o){return this.min.x<=o.min.x&&o.max.x<=this.max.x&&this.min.y<=o.min.y&&o.max.y<=this.max.y}getParameter(o,r){return r===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),r=new _o),r.set((o.x-this.min.x)/(this.max.x-this.min.x),(o.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(o){return!(o.max.x<this.min.x||o.min.x>this.max.x||o.max.y<this.min.y||o.min.y>this.max.y)}clampPoint(o,r){return r===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),r=new _o),r.copy(o).clamp(this.min,this.max)}distanceToPoint(o){return dMe.copy(o).clamp(this.min,this.max).sub(o).length()}intersect(o){return this.min.max(o.min),this.max.min(o.max),this}union(o){return this.min.min(o.min),this.max.max(o.max),this}translate(o){return this.min.add(o),this.max.add(o),this}equals(o){return o.min.equals(this.min)&&o.max.equals(this.max)}};RB.prototype.isBox2=!0;var hMe=new $i,b$=new $i,_de=class{constructor(o=new $i,r=new $i){this.start=o,this.end=r}set(o,r){return this.start.copy(o),this.end.copy(r),this}copy(o){return this.start.copy(o.start),this.end.copy(o.end),this}getCenter(o){return o===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),o=new $i),o.addVectors(this.start,this.end).multiplyScalar(.5)}delta(o){return o===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),o=new $i),o.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(o,r){return r===void 0&&(console.warn("THREE.Line3: .at() target is now required"),r=new $i),this.delta(r).multiplyScalar(o).add(this.start)}closestPointToPointParameter(o,r){hMe.subVectors(o,this.start),b$.subVectors(this.end,this.start);let d=b$.dot(b$),O=b$.dot(hMe)/d;return r&&(O=eT(O,0,1)),O}closestPointToPoint(o,r,d){let m=this.closestPointToPointParameter(o,r);return d===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),d=new $i),this.delta(d).multiplyScalar(m).add(this.start)}applyMatrix4(o){return this.start.applyMatrix4(o),this.end.applyMatrix4(o),this}equals(o){return o.start.equals(this.start)&&o.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},Tde=class extends mv{constructor(o){super(),this.material=o,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}};Tde.prototype.isImmediateRenderObject=!0;var HR=new $i,v$=new vc,cpe=new vc,Ede=class extends GX{constructor(o){let r=kMe(o),d=new c3,m=[],O=[],C=new C1(0,0,1),G=new C1(0,1,0);for(let H=0;H<r.length;H++){let te=r[H];te.parent&&te.parent.isBone&&(m.push(0,0,0),m.push(0,0,0),O.push(C.r,C.g,C.b),O.push(G.r,G.g,G.b))}d.setAttribute("position",new r4(m,3)),d.setAttribute("color",new r4(O,3));let x=new LB({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(d,x),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=o,this.bones=r,this.matrix=o.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(o){let r=this.bones,d=this.geometry,m=d.getAttribute("position");cpe.copy(this.root.matrixWorld).invert();for(let O=0,C=0;O<r.length;O++){let G=r[O];G.parent&&G.parent.isBone&&(v$.multiplyMatrices(cpe,G.matrixWorld),HR.setFromMatrixPosition(v$),m.setXYZ(C,HR.x,HR.y,HR.z),v$.multiplyMatrices(cpe,G.parent.matrixWorld),HR.setFromMatrixPosition(v$),m.setXYZ(C+1,HR.x,HR.y,HR.z),C+=2)}d.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(o)}};function kMe(p){let o=[];p&&p.isBone&&o.push(p);for(let r=0;r<p.children.length;r++)o.push.apply(o,kMe(p.children[r]));return o}var zde=class extends GX{constructor(o=10,r=10,d=4473924,m=8947848){d=new C1(d),m=new C1(m);let O=r/2,C=o/r,G=o/2,x=[],H=[];for(let Te=0,Pe=0,Ye=-G;Te<=r;Te++,Ye+=C){x.push(-G,0,Ye,G,0,Ye),x.push(Ye,0,-G,Ye,0,G);let mt=Te===O?d:m;mt.toArray(H,Pe),Pe+=3,mt.toArray(H,Pe),Pe+=3,mt.toArray(H,Pe),Pe+=3,mt.toArray(H,Pe),Pe+=3}let te=new c3;te.setAttribute("position",new r4(x,3)),te.setAttribute("color",new r4(H,3));let ne=new LB({vertexColors:!0,toneMapped:!1});super(te,ne),this.type="GridHelper"}};var jHe=new Float32Array(1),NBt=new Int32Array(jHe.buffer);var y$=4,NX=8,PBt=Math.pow(2,NX),qMe=[.125,.215,.35,.446,.526,.582],VHe=NX-y$+1+qMe.length;var BBt={[_F]:0,[Pde]:1,[wMe]:2,[OMe]:3,[AMe]:4,[_Me]:5,[IMe]:6},YHe=new HX({side:Qw,depthWrite:!1,depthTest:!1}),HBt=new Dz(new FX,YHe);var{_lodPlanes:FBt,_sizeLods:kBt,_sigmas:qBt}=XHe();var zB=(1+Math.sqrt(5))/2,lF=1/zB,WBt=[new $i(1,1,1),new $i(-1,1,1),new $i(1,1,-1),new $i(-1,1,-1),new $i(0,zB,lF),new $i(0,zB,-lF),new $i(lF,0,zB),new $i(-lF,0,zB),new $i(zB,lF,0),new $i(-zB,lF,0)];function XHe(){let p=[],o=[],r=[],d=NX;for(let m=0;m<VHe;m++){let O=Math.pow(2,d);o.push(O);let C=1/O;m>NX-y$?C=qMe[m-NX+y$-1]:m==0&&(C=0),r.push(C);let G=1/(O-1),x=-G/2,H=1+G/2,te=[x,x,H,x,H,H,x,x,H,H,x,H],ne=6,Te=6,Pe=3,Ye=2,mt=1,Nt=new Float32Array(Pe*Te*ne),Dt=new Float32Array(Ye*Te*ne),Ct=new Float32Array(mt*Te*ne);for(let Hn=0;Hn<ne;Hn++){let vi=Hn%3*2/3-1,en=Hn>2?0:-1,Ni=[vi,en,0,vi+2/3,en,0,vi+2/3,en+1,0,vi,en,0,vi+2/3,en+1,0,vi,en+1,0];Nt.set(Ni,Pe*Te*Hn),Dt.set(te,Ye*Te*Hn);let Mi=[Hn,Hn,Hn,Hn,Hn,Hn];Ct.set(Mi,mt*Te*Hn)}let Zn=new c3;Zn.setAttribute("position",new IM(Nt,Pe)),Zn.setAttribute("uv",new IM(Dt,Ye)),Zn.setAttribute("faceIndex",new IM(Ct,mt)),p.push(Zn),d>y$&&d--}return{_lodPlanes:p,_sizeLods:o,_sigmas:r}}nT.create=function(p,o){return console.log("THREE.Curve.create() has been deprecated"),p.prototype=Object.create(nT.prototype),p.prototype.constructor=p,p.prototype.getPoint=o,p};AF.prototype.fromPoints=function(p){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(p)};zde.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};Ede.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};DS.prototype.extractUrlBase=function(p){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),ade.extractUrlBase(p)};DS.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};RB.prototype.center=function(p){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(p)};RB.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};RB.prototype.isIntersectionBox=function(p){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(p)};RB.prototype.size=function(p){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(p)};tT.prototype.center=function(p){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(p)};tT.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()};tT.prototype.isIntersectionBox=function(p){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(p)};tT.prototype.isIntersectionSphere=function(p){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(p)};tT.prototype.size=function(p){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(p)};UR.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};vF.prototype.setFromMatrix=function(p){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(p)};_de.prototype.center=function(p){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(p)};Gw.prototype.flattenToArrayOffset=function(p,o){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(p,o)};Gw.prototype.multiplyVector3=function(p){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),p.applyMatrix3(this)};Gw.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")};Gw.prototype.applyToBufferAttribute=function(p){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),p.applyMatrix3(this)};Gw.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")};Gw.prototype.getInverse=function(p){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(p).invert()};vc.prototype.extractPosition=function(p){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(p)};vc.prototype.flattenToArrayOffset=function(p,o){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(p,o)};vc.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new $i().setFromMatrixColumn(this,3)};vc.prototype.setRotationFromQuaternion=function(p){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(p)};vc.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")};vc.prototype.multiplyVector3=function(p){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),p.applyMatrix4(this)};vc.prototype.multiplyVector4=function(p){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),p.applyMatrix4(this)};vc.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")};vc.prototype.rotateAxis=function(p){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),p.transformDirection(this)};vc.prototype.crossVector=function(p){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),p.applyMatrix4(this)};vc.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")};vc.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")};vc.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")};vc.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")};vc.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")};vc.prototype.applyToBufferAttribute=function(p){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),p.applyMatrix4(this)};vc.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")};vc.prototype.makeFrustum=function(p,o,r,d,m,O){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(p,o,d,r,m,O)};vc.prototype.getInverse=function(p){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(p).invert()};Gz.prototype.isIntersectionLine=function(p){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(p)};QA.prototype.multiplyVector3=function(p){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),p.applyQuaternion(this)};QA.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};GR.prototype.isIntersectionBox=function(p){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(p)};GR.prototype.isIntersectionPlane=function(p){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(p)};GR.prototype.isIntersectionSphere=function(p){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(p)};r5.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};r5.prototype.barycoordFromPoint=function(p,o){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(p,o)};r5.prototype.midpoint=function(p){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(p)};r5.prototypenormal=function(p){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(p)};r5.prototype.plane=function(p){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(p)};r5.barycoordFromPoint=function(p,o,r,d,m){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),r5.getBarycoord(p,o,r,d,m)};r5.normal=function(p,o,r,d){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),r5.getNormal(p,o,r,d)};qR.prototype.extractAllPoints=function(p){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(p)};qR.prototype.extrude=function(p){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new gF(this,p)};qR.prototype.makeGeometry=function(p){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Npe(this,p)};_o.prototype.fromAttribute=function(p,o,r){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(p,o,r)};_o.prototype.distanceToManhattan=function(p){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(p)};_o.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};$i.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")};$i.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")};$i.prototype.getPositionFromMatrix=function(p){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(p)};$i.prototype.getScaleFromMatrix=function(p){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(p)};$i.prototype.getColumnFromMatrix=function(p,o){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(o,p)};$i.prototype.applyProjection=function(p){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(p)};$i.prototype.fromAttribute=function(p,o,r){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(p,o,r)};$i.prototype.distanceToManhattan=function(p){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(p)};$i.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};Ob.prototype.fromAttribute=function(p,o,r){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(p,o,r)};Ob.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};mv.prototype.getChildByName=function(p){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(p)};mv.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")};mv.prototype.translate=function(p,o){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(o,p)};mv.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")};mv.prototype.applyMatrix=function(p){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(p)};Object.defineProperties(mv.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(p){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=p}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});Dz.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")};Object.defineProperties(Dz.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),_7e},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});B$.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};F_.prototype.setLens=function(p,o){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),o!==void 0&&(this.filmGauge=o),this.setFocalLength(p)};Object.defineProperties(Yz.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(p){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=p}},shadowCameraLeft:{set:function(p){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=p}},shadowCameraRight:{set:function(p){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=p}},shadowCameraTop:{set:function(p){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=p}},shadowCameraBottom:{set:function(p){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=p}},shadowCameraNear:{set:function(p){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=p}},shadowCameraFar:{set:function(p){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=p}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(p){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=p}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(p){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=p}},shadowMapHeight:{set:function(p){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=p}}});Object.defineProperties(IM.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===_$},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(_$)}}});IM.prototype.setDynamic=function(p){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(p===!0?_$:BX),this};IM.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},IM.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};c3.prototype.addIndex=function(p){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(p)};c3.prototype.addAttribute=function(p,o){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),!(o&&o.isBufferAttribute)&&!(o&&o.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(p,new IM(arguments[1],arguments[2]))):p==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(o),this):this.setAttribute(p,o)};c3.prototype.addDrawCall=function(p,o,r){r!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(p,o)};c3.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()};c3.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")};c3.prototype.removeAttribute=function(p){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(p)};c3.prototype.applyMatrix=function(p){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(p)};Object.defineProperties(c3.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}});SB.prototype.setDynamic=function(p){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(p===!0?_$:BX),this};SB.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};gF.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")};gF.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")};gF.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")};N$.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")};wde.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this};Object.defineProperties(Zw.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new C1}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(p){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=p===bMe}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(p){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=p}}});Object.defineProperties(X8.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(p){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=p}}});r3.prototype.clearTarget=function(p,o,r,d){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(p),this.clear(o,r,d)};r3.prototype.animate=function(p){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(p)};r3.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()};r3.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()};r3.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision};r3.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()};r3.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")};r3.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")};r3.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")};r3.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")};r3.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")};r3.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")};r3.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures};r3.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")};r3.prototype.enableScissorTest=function(p){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(p)};r3.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};r3.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};r3.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};r3.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};r3.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")};r3.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")};r3.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")};r3.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")};r3.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")};r3.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()};Object.defineProperties(r3.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(p){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=p}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(p){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=p}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(p){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=p===!0?Pde:_F}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}});Object.defineProperties(NMe.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});Object.defineProperties(j8.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(p){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=p}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(p){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=p}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(p){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=p}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(p){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=p}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(p){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=p}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(p){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=p}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(p){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=p}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(p){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=p}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(p){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=p}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(p){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=p}}});mde.prototype.load=function(p){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let o=this;return new dde().load(p,function(d){o.setBuffer(d)}),this};bde.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};qX.prototype.updateCubeMap=function(p,o){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(p,o)};qX.prototype.clear=function(p,o,r,d){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(p,o,r,d)};WR.crossOrigin=void 0;WR.loadTexture=function(p,o,r,d){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let m=new Kpe;m.setCrossOrigin(this.crossOrigin);let O=m.load(p,r,void 0,d);return o&&(O.mapping=o),O};WR.loadTextureCube=function(p,o,r,d){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let m=new Zpe;m.setCrossOrigin(this.crossOrigin);let O=m.load(p,r,void 0,d);return o&&(O.mapping=o),O};WR.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};WR.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:fMe}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=fMe);var ZHe=["rendererviewport"];function KHe(p,o){p&1&&(cs(0,"div",2),ua(1,"translate")),p&2&&ko("title",pa(1,1,"_LoadingGeometry"))}var WMe=(()=>{class p{set objectId(r){this._objectId=r,this.onObjectIdChanged()}get objectId(){return this._objectId}set visibleNode(r){this.viewport&&this.viewport.toggleObjectNode({id:r.id,visible:r.visible})}set opaqueNode(r){this.viewport&&this.viewport.toggleObjectNodeOpacity({id:r.id,opacity:r.opaque})}constructor(r){this.el=r,this.resizeObserver=null,this.viewport=null,this.isLoading=!0,this.previousWidth=0,this.previousHeight=0,this.api=null,this._objectId=void 0,this.revision=void 0,this.contentLoader=null,this.isRendererInitialized=!1,this.metricUnits={weight:{multiplicator:.001,precision:2,unit:"kg"},length:{multiplicator:.001,precision:2,unit:"m"},width:{multiplicator:.001,precision:2,unit:"m"},height:{multiplicator:.001,precision:2,unit:"m"},area:{multiplicator:1e-6,precision:2,unit:"m\xB2"},volume:{multiplicator:1e-9,precision:2,unit:"m\xB3"}},this.imperialUnits={length:{multiplicator:.00328083989,precision:2,unit:"feet"},width:{multiplicator:.00328083989,precision:2,unit:"feet"},height:{multiplicator:.00328083989,precision:2,unit:"feet"}},this.viewportSettings={defaultOpacity:.5,disciplineOpacity:.1,pinSizeScaleFactor:2,maxWebGLBufferSize:35e13,mixedModelMode:!0,useFrameSelection:!1,pinFlyToDistance:2e4,nearClippingPlane:.01,slideThmbSize:[180,112],units:{mm:this.metricUnits,inch:{}}},this.units={Metric:this.metricUnits,Imperial:this.imperialUnits},hB(()=>{this.visibleNode&&this.processVisibilityNode(this.visibleNode)}),hB(()=>{this.opaqueNode&&this.processOpacityNode(this.opaqueNode)})}processVisibilityNode(r){console.log("Processing visbility of node in lib-object-preview:",r)}processOpacityNode(r){console.log("Processing opacity of node in lib-object-preview:",r)}ngAfterViewInit(){let r=this.el.nativeElement;this.resizeObserver=new ResizeObserver(d=>{for(let m of d){let O=m?.contentRect?.width;O!=this.previousWidth&&(this.previousWidth=O,this.recalculatePreviewSize())}}),this.resizeObserver.observe(r),this.initRenderer(),this.contentLoader=new zF.ContentLoader(this.api,this.viewport),this.isRendererInitialized=!0,this.loadObject()}ngOnDestroy(){this.resizeObserver?.disconnect(),this.viewport?.dispose()}recalculatePreviewSize(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{let r=this.rendererViewportElement?.nativeElement.offsetWidth,d=this.rendererViewportElement?.nativeElement.offsetHeight;r&&d?(this.viewport?.setViewportSize(r,d),this.viewport?.draw()):console.error("Viewport size is zero")},1)}setAmbientOcclusionOptions(){if(!this.viewport)return;let r={usage:!1,usageForInteraction:!1,useShadows:!1,useShadowsForInteraction:!1,lightRotation:Math.PI*35/180,lightElevation:Math.PI*50/180,lightColor:new C1(1,1,1),ambientLightColor:new C1(.6,.6,.6)};this.viewport.setAmbientOcclusionOptions(r)}setBackgroundOptions(){if(!this.viewport)return;let r={name:"day sky",ambientLightColor:8816262,backgroundType:zF.Background.BackgroundType_LinearGradient,backgroundParams:{alpha:1,colorStops:[{offset:0,color:"#87CDE9"},{offset:.5104,color:"#DDEDFE"},{offset:.9635,color:"#D3D3D4"}]}};this.viewport.setBackground(r.backgroundType,r.backgroundParams)}setHoverOption(r=!0){this.viewport&&this.viewport.setUseHoverEffect(r)}initRenderer(){this.viewport=new zF.Viewport3D({settings:this.viewportSettings,units:this.units.Metric,domElementId:"",GPUPick:!0,api:this.api,name:"objectPreviewRendererViewport",lookupTextureSize:32,ssaoSupported:!1,shadowsSupported:!1,panningScaleFactor:4,commandPolicies:{CommandSelect:{noBubble:!0,noTraverse:!0}}}),this.setAmbientOcclusionOptions(),this.setBackgroundOptions(),this.setHoverOption(),this.viewport.draw(),this.viewport?.domElement?(this.el.nativeElement?.shadowRoot||this.el.nativeElement)?.getElementsByClassName?.("rendered-preview")[0]?.appendChild?.(this.viewport.domElement):console.error("no dom element present for renderer!")}onObjectIdChanged(){this.loadObject()}loadObject(){if(!this.isRendererInitialized)return;if(!this.contentLoader){console.error("content loader is not there!");return}console.log("loading object..."),this.isLoading=!0,this.viewport?.resetViewport(),this.contentLoader.loadObject(this.objectId,this.revision,null).then(()=>{this.recalculatePreviewSize(),this.viewport?.draw(),this.viewport?.zoomToObjects([this.objectId]),this.isLoading=!1})}static{this.\u0275fac=function(d){return new(d||p)(rr(I0))}}static{this.\u0275cmp=fs({type:p,selectors:[["lib-object-preview"]],viewQuery:function(d,m){if(d&1&&Mf(ZHe,5),d&2){let O;mc(O=bc())&&(m.rendererViewportElement=O.first)}},inputs:{api:"api",objectId:"objectId",revision:"revision",visibleNode:"visibleNode",opaqueNode:"opaqueNode"},standalone:!0,features:[ms],decls:3,vars:1,consts:[["rendererviewport",""],[1,"rendered-preview"],[1,"loading-spinner-icon",3,"title"]],template:function(d,m){d&1&&(bn(0,"div",1,0),_r(2,KHe,2,3,"div",2),On()),d&2&&(on(2),Is(m.isLoading?2:-1))},dependencies:[E1],styles:[`.rendered-preview{width:100%;height:21rem!important;min-height:21rem;padding:0;white-space:nowrap;cursor:default;margin-bottom:0;position:relative}.rendered-preview canvas{min-height:21rem;min-width:100%;max-width:100%}.loading-spinner-icon{background-image:url("./assets/Refresh_18_gray.svg");position:absolute;top:calc(50% - .6rem);left:calc(50% - .6rem);z-index:10;width:1.8rem;height:1.8rem;background-size:contain;background-repeat:no-repeat;background-position:center;animation:spin .6s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
12747
+ `)G=0,x-=O;else{let ne=NHe(te,m,G,x,r);G+=ne.offsetX,C.push(ne.path)}}return C}function NHe(p,o,r,d,m){let O=m.glyphs[p]||m.glyphs["?"];if(!O){console.error('THREE.Font: character "'+p+'" does not exists in font family '+m.familyName+".");return}let C=new ude,G,x,H,te,ne,Te,Pe,Ye;if(O.o){let mt=O._cachedOutline||(O._cachedOutline=O.o.split(" "));for(let Nt=0,Dt=mt.length;Nt<Dt;)switch(mt[Nt++]){case"m":G=mt[Nt++]*o+r,x=mt[Nt++]*o+d,C.moveTo(G,x);break;case"l":G=mt[Nt++]*o+r,x=mt[Nt++]*o+d,C.lineTo(G,x);break;case"q":H=mt[Nt++]*o+r,te=mt[Nt++]*o+d,ne=mt[Nt++]*o+r,Te=mt[Nt++]*o+d,C.quadraticCurveTo(ne,Te,H,te);break;case"b":H=mt[Nt++]*o+r,te=mt[Nt++]*o+d,ne=mt[Nt++]*o+r,Te=mt[Nt++]*o+d,Pe=mt[Nt++]*o+r,Ye=mt[Nt++]*o+d,C.bezierCurveTo(ne,Te,Pe,Ye,H,te);break}}return{offsetX:O.ha*o,path:C}}pde.prototype.isFont=!0;var m$,PHe={getContext:function(){return m$===void 0&&(m$=new(window.AudioContext||window.webkitAudioContext)),m$},setContext:function(p){m$=p}},dde=class extends DS{constructor(o){super(o)}load(o,r,d,m){let O=this,C=new Qpe(this.manager);C.setResponseType("arraybuffer"),C.setPath(this.path),C.setRequestHeader(this.requestHeader),C.setWithCredentials(this.withCredentials),C.load(o,function(G){try{let x=G.slice(0);PHe.getContext().decodeAudioData(x,function(te){r(te)})}catch(x){m?m(x):console.error(x),O.manager.itemError(o)}},d,m)}},hde=class extends JX{constructor(o,r,d=1){super(void 0,d);let m=new C1().set(o),O=new C1().set(r),C=new $i(m.r,m.g,m.b),G=new $i(O.r,O.g,O.b),x=Math.sqrt(Math.PI),H=x*Math.sqrt(.75);this.sh.coefficients[0].copy(C).add(G).multiplyScalar(x),this.sh.coefficients[1].copy(C).sub(G).multiplyScalar(H)}};hde.prototype.isHemisphereLightProbe=!0;var fde=class extends JX{constructor(o,r=1){super(void 0,r);let d=new C1().set(o);this.sh.coefficients[0].set(d.r,d.g,d.b).multiplyScalar(2*Math.sqrt(Math.PI))}};fde.prototype.isAmbientLightProbe=!0;var mde=class extends mv{constructor(o){super(),this.type="Audio",this.listener=o,this.context=o.context,this.gain=this.context.createGain(),this.gain.connect(o.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(o){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=o,this.connect(),this}setMediaElementSource(o){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(o),this.connect(),this}setMediaStreamSource(o){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(o),this.connect(),this}setBuffer(o){return this.buffer=o,this.sourceType="buffer",this.autoplay&&this.play(),this}play(o=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+o;let r=this.context.createBufferSource();return r.buffer=this.buffer,r.loop=this.loop,r.loopStart=this.loopStart,r.loopEnd=this.loopEnd,r.onended=this.onEnded.bind(this),r.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=r,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let o=1,r=this.filters.length;o<r;o++)this.filters[o-1].connect(this.filters[o]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let o=1,r=this.filters.length;o<r;o++)this.filters[o-1].disconnect(this.filters[o]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(o){return o||(o=[]),this._connected===!0?(this.disconnect(),this.filters=o.slice(),this.connect()):this.filters=o.slice(),this}setDetune(o){if(this.detune=o,this.source.detune!==void 0)return this.isPlaying===!0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(o){return this.setFilters(o?[o]:[])}setPlaybackRate(o){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.playbackRate=o,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(o){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.loop=o,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(o){return this.loopStart=o,this}setLoopEnd(o){return this.loopEnd=o,this}getVolume(){return this.gain.gain.value}setVolume(o){return this.gain.gain.setTargetAtTime(o,this.context.currentTime,.01),this}};var bde=class{constructor(o,r=2048){this.analyser=o.context.createAnalyser(),this.analyser.fftSize=r,this.data=new Uint8Array(this.analyser.frequencyBinCount),o.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let o=0,r=this.getFrequencyData();for(let d=0;d<r.length;d++)o+=r[d];return o/r.length}},vde=class{constructor(o,r,d){this.binding=o,this.valueSize=d;let m,O,C;switch(r){case"quaternion":m=this._slerp,O=this._slerpAdditive,C=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(d*6),this._workIndex=5;break;case"string":case"bool":m=this._select,O=this._select,C=this._setAdditiveIdentityOther,this.buffer=new Array(d*5);break;default:m=this._lerp,O=this._lerpAdditive,C=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(d*5)}this._mixBufferRegion=m,this._mixBufferRegionAdditive=O,this._setIdentity=C,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(o,r){let d=this.buffer,m=this.valueSize,O=o*m+m,C=this.cumulativeWeight;if(C===0){for(let G=0;G!==m;++G)d[O+G]=d[G];C=r}else{C+=r;let G=r/C;this._mixBufferRegion(d,O,0,G,m)}this.cumulativeWeight=C}accumulateAdditive(o){let r=this.buffer,d=this.valueSize,m=d*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(r,m,0,o,d),this.cumulativeWeightAdditive+=o}apply(o){let r=this.valueSize,d=this.buffer,m=o*r+r,O=this.cumulativeWeight,C=this.cumulativeWeightAdditive,G=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,O<1){let x=r*this._origIndex;this._mixBufferRegion(d,m,x,1-O,r)}C>0&&this._mixBufferRegionAdditive(d,m,this._addIndex*r,1,r);for(let x=r,H=r+r;x!==H;++x)if(d[x]!==d[x+r]){G.setValue(d,m);break}}saveOriginalState(){let o=this.binding,r=this.buffer,d=this.valueSize,m=d*this._origIndex;o.getValue(r,m);for(let O=d,C=m;O!==C;++O)r[O]=r[m+O%d];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let o=this.valueSize*3;this.binding.setValue(this.buffer,o)}_setAdditiveIdentityNumeric(){let o=this._addIndex*this.valueSize,r=o+this.valueSize;for(let d=o;d<r;d++)this.buffer[d]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let o=this._origIndex*this.valueSize,r=this._addIndex*this.valueSize;for(let d=0;d<this.valueSize;d++)this.buffer[r+d]=this.buffer[o+d]}_select(o,r,d,m,O){if(m>=.5)for(let C=0;C!==O;++C)o[r+C]=o[d+C]}_slerp(o,r,d,m){QA.slerpFlat(o,r,o,r,o,d,m)}_slerpAdditive(o,r,d,m,O){let C=this._workIndex*O;QA.multiplyQuaternionsFlat(o,C,o,r,o,d),QA.slerpFlat(o,r,o,r,o,C,m)}_lerp(o,r,d,m,O){let C=1-m;for(let G=0;G!==O;++G){let x=r+G;o[x]=o[x]*C+o[d+G]*m}}_lerpAdditive(o,r,d,m,O){for(let C=0;C!==O;++C){let G=r+C;o[G]=o[G]+o[d+C]*m}}},Hde="\\[\\]\\.:\\/",BHe=new RegExp("["+Hde+"]","g"),Fde="[^"+Hde+"]",HHe="[^"+Hde.replace("\\.","")+"]",FHe=/((?:WC+[\/:])*)/.source.replace("WC",Fde),kHe=/(WCOD+)?/.source.replace("WCOD",HHe),qHe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Fde),WHe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Fde),UHe=new RegExp("^"+FHe+kHe+qHe+WHe+"$"),GHe=["material","materials","bones"],gde=class{constructor(o,r,d){let m=d||ty.parseTrackName(r);this._targetGroup=o,this._bindings=o.subscribe_(r,m)}getValue(o,r){this.bind();let d=this._targetGroup.nCachedObjects_,m=this._bindings[d];m!==void 0&&m.getValue(o,r)}setValue(o,r){let d=this._bindings;for(let m=this._targetGroup.nCachedObjects_,O=d.length;m!==O;++m)d[m].setValue(o,r)}bind(){let o=this._bindings;for(let r=this._targetGroup.nCachedObjects_,d=o.length;r!==d;++r)o[r].bind()}unbind(){let o=this._bindings;for(let r=this._targetGroup.nCachedObjects_,d=o.length;r!==d;++r)o[r].unbind()}},ty=(()=>{class p{constructor(r,d,m){this.path=d,this.parsedPath=m||p.parseTrackName(d),this.node=p.findNode(r,this.parsedPath.nodeName)||r,this.rootNode=r,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(r,d,m){return r&&r.isAnimationObjectGroup?new p.Composite(r,d,m):new p(r,d,m)}static sanitizeNodeName(r){return r.replace(/\s/g,"_").replace(BHe,"")}static parseTrackName(r){let d=UHe.exec(r);if(!d)throw new Error("PropertyBinding: Cannot parse trackName: "+r);let m={nodeName:d[2],objectName:d[3],objectIndex:d[4],propertyName:d[5],propertyIndex:d[6]},O=m.nodeName&&m.nodeName.lastIndexOf(".");if(O!==void 0&&O!==-1){let C=m.nodeName.substring(O+1);GHe.indexOf(C)!==-1&&(m.nodeName=m.nodeName.substring(0,O),m.objectName=C)}if(m.propertyName===null||m.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+r);return m}static findNode(r,d){if(!d||d===""||d==="."||d===-1||d===r.name||d===r.uuid)return r;if(r.skeleton){let m=r.skeleton.getBoneByName(d);if(m!==void 0)return m}if(r.children){let m=function(C){for(let G=0;G<C.length;G++){let x=C[G];if(x.name===d||x.uuid===d)return x;let H=m(x.children);if(H)return H}return null},O=m(r.children);if(O)return O}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(r,d){r[d]=this.node[this.propertyName]}_getValue_array(r,d){let m=this.resolvedProperty;for(let O=0,C=m.length;O!==C;++O)r[d++]=m[O]}_getValue_arrayElement(r,d){r[d]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(r,d){this.resolvedProperty.toArray(r,d)}_setValue_direct(r,d){this.targetObject[this.propertyName]=r[d]}_setValue_direct_setNeedsUpdate(r,d){this.targetObject[this.propertyName]=r[d],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(r,d){this.targetObject[this.propertyName]=r[d],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(r,d){let m=this.resolvedProperty;for(let O=0,C=m.length;O!==C;++O)m[O]=r[d++]}_setValue_array_setNeedsUpdate(r,d){let m=this.resolvedProperty;for(let O=0,C=m.length;O!==C;++O)m[O]=r[d++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(r,d){let m=this.resolvedProperty;for(let O=0,C=m.length;O!==C;++O)m[O]=r[d++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(r,d){this.resolvedProperty[this.propertyIndex]=r[d]}_setValue_arrayElement_setNeedsUpdate(r,d){this.resolvedProperty[this.propertyIndex]=r[d],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(r,d){this.resolvedProperty[this.propertyIndex]=r[d],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(r,d){this.resolvedProperty.fromArray(r,d)}_setValue_fromArray_setNeedsUpdate(r,d){this.resolvedProperty.fromArray(r,d),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(r,d){this.resolvedProperty.fromArray(r,d),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(r,d){this.bind(),this.getValue(r,d)}_setValue_unbound(r,d){this.bind(),this.setValue(r,d)}bind(){let r=this.node,d=this.parsedPath,m=d.objectName,O=d.propertyName,C=d.propertyIndex;if(r||(r=p.findNode(this.rootNode,d.nodeName)||this.rootNode,this.node=r),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!r){console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");return}if(m){let te=d.objectIndex;switch(m){case"materials":if(!r.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!r.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}r=r.material.materials;break;case"bones":if(!r.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}r=r.skeleton.bones;for(let ne=0;ne<r.length;ne++)if(r[ne].name===te){te=ne;break}break;default:if(r[m]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}r=r[m]}if(te!==void 0){if(r[te]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,r);return}r=r[te]}}let G=r[O];if(G===void 0){let te=d.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+te+"."+O+" but it wasn't found.",r);return}let x=this.Versioning.None;this.targetObject=r,r.needsUpdate!==void 0?x=this.Versioning.NeedsUpdate:r.matrixWorldNeedsUpdate!==void 0&&(x=this.Versioning.MatrixWorldNeedsUpdate);let H=this.BindingType.Direct;if(C!==void 0){if(O==="morphTargetInfluences"){if(!r.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(r.geometry.isBufferGeometry){if(!r.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}r.morphTargetDictionary[C]!==void 0&&(C=r.morphTargetDictionary[C])}else{console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);return}}H=this.BindingType.ArrayElement,this.resolvedProperty=G,this.propertyIndex=C}else G.fromArray!==void 0&&G.toArray!==void 0?(H=this.BindingType.HasFromToArray,this.resolvedProperty=G):Array.isArray(G)?(H=this.BindingType.EntireArray,this.resolvedProperty=G):this.propertyName=O;this.getValue=this.GetterByBindingType[H],this.setValue=this.SetterByBindingTypeAndVersioning[H][x]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}return p.Composite=gde,p})();ty.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};ty.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};ty.prototype.GetterByBindingType=[ty.prototype._getValue_direct,ty.prototype._getValue_array,ty.prototype._getValue_arrayElement,ty.prototype._getValue_toArray];ty.prototype.SetterByBindingTypeAndVersioning=[[ty.prototype._setValue_direct,ty.prototype._setValue_direct_setNeedsUpdate,ty.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[ty.prototype._setValue_array,ty.prototype._setValue_array_setNeedsUpdate,ty.prototype._setValue_array_setMatrixWorldNeedsUpdate],[ty.prototype._setValue_arrayElement,ty.prototype._setValue_arrayElement_setNeedsUpdate,ty.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[ty.prototype._setValue_fromArray,ty.prototype._setValue_fromArray_setNeedsUpdate,ty.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var yde=class{constructor(){this.uuid=aS(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;let o={};this._indicesByUUID=o;for(let d=0,m=arguments.length;d!==m;++d)o[arguments[d].uuid]=d;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};let r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}add(){let o=this._objects,r=this._indicesByUUID,d=this._paths,m=this._parsedPaths,O=this._bindings,C=O.length,G,x=o.length,H=this.nCachedObjects_;for(let te=0,ne=arguments.length;te!==ne;++te){let Te=arguments[te],Pe=Te.uuid,Ye=r[Pe];if(Ye===void 0){Ye=x++,r[Pe]=Ye,o.push(Te);for(let mt=0,Nt=C;mt!==Nt;++mt)O[mt].push(new ty(Te,d[mt],m[mt]))}else if(Ye<H){G=o[Ye];let mt=--H,Nt=o[mt];r[Nt.uuid]=Ye,o[Ye]=Nt,r[Pe]=mt,o[mt]=Te;for(let Dt=0,Ct=C;Dt!==Ct;++Dt){let Zn=O[Dt],Hn=Zn[mt],vi=Zn[Ye];Zn[Ye]=Hn,vi===void 0&&(vi=new ty(Te,d[Dt],m[Dt])),Zn[mt]=vi}}else o[Ye]!==G&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=H}remove(){let o=this._objects,r=this._indicesByUUID,d=this._bindings,m=d.length,O=this.nCachedObjects_;for(let C=0,G=arguments.length;C!==G;++C){let x=arguments[C],H=x.uuid,te=r[H];if(te!==void 0&&te>=O){let ne=O++,Te=o[ne];r[Te.uuid]=te,o[te]=Te,r[H]=ne,o[ne]=x;for(let Pe=0,Ye=m;Pe!==Ye;++Pe){let mt=d[Pe],Nt=mt[ne],Dt=mt[te];mt[te]=Nt,mt[ne]=Dt}}}this.nCachedObjects_=O}uncache(){let o=this._objects,r=this._indicesByUUID,d=this._bindings,m=d.length,O=this.nCachedObjects_,C=o.length;for(let G=0,x=arguments.length;G!==x;++G){let H=arguments[G],te=H.uuid,ne=r[te];if(ne!==void 0)if(delete r[te],ne<O){let Te=--O,Pe=o[Te],Ye=--C,mt=o[Ye];r[Pe.uuid]=ne,o[ne]=Pe,r[mt.uuid]=Te,o[Te]=mt,o.pop();for(let Nt=0,Dt=m;Nt!==Dt;++Nt){let Ct=d[Nt],Zn=Ct[Te],Hn=Ct[Ye];Ct[ne]=Zn,Ct[Te]=Hn,Ct.pop()}}else{let Te=--C,Pe=o[Te];Te>0&&(r[Pe.uuid]=ne),o[ne]=Pe,o.pop();for(let Ye=0,mt=m;Ye!==mt;++Ye){let Nt=d[Ye];Nt[ne]=Nt[Te],Nt.pop()}}}this.nCachedObjects_=O}subscribe_(o,r){let d=this._bindingsIndicesByPath,m=d[o],O=this._bindings;if(m!==void 0)return O[m];let C=this._paths,G=this._parsedPaths,x=this._objects,H=x.length,te=this.nCachedObjects_,ne=new Array(H);m=O.length,d[o]=m,C.push(o),G.push(r),O.push(ne);for(let Te=te,Pe=x.length;Te!==Pe;++Te){let Ye=x[Te];ne[Te]=new ty(Ye,o,r)}return ne}unsubscribe_(o){let r=this._bindingsIndicesByPath,d=r[o];if(d!==void 0){let m=this._paths,O=this._parsedPaths,C=this._bindings,G=C.length-1,x=C[G],H=o[G];r[H]=d,C[d]=x,C.pop(),O[d]=O[G],O.pop(),m[d]=m[G],m.pop()}}};yde.prototype.isAnimationObjectGroup=!0;var Mde=class{constructor(o,r,d=null,m=r.blendMode){this._mixer=o,this._clip=r,this._localRoot=d,this.blendMode=m;let O=r.tracks,C=O.length,G=new Array(C),x={endingStart:uF,endingEnd:uF};for(let H=0;H!==C;++H){let te=O[H].createInterpolant(null);G[H]=te,te.settings=x}this._interpolantSettings=x,this._interpolants=G,this._propertyBindings=new Array(C),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=O7e,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(o){return this._startTime=o,this}setLoop(o,r){return this.loop=o,this.repetitions=r,this}setEffectiveWeight(o){return this.weight=o,this._effectiveWeight=this.enabled?o:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(o){return this._scheduleFading(o,0,1)}fadeOut(o){return this._scheduleFading(o,1,0)}crossFadeFrom(o,r,d){if(o.fadeOut(r),this.fadeIn(r),d){let m=this._clip.duration,O=o._clip.duration,C=O/m,G=m/O;o.warp(1,C,r),this.warp(G,1,r)}return this}crossFadeTo(o,r,d){return o.crossFadeFrom(this,r,d)}stopFading(){let o=this._weightInterpolant;return o!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(o)),this}setEffectiveTimeScale(o){return this.timeScale=o,this._effectiveTimeScale=this.paused?0:o,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(o){return this.timeScale=this._clip.duration/o,this.stopWarping()}syncWith(o){return this.time=o.time,this.timeScale=o.timeScale,this.stopWarping()}halt(o){return this.warp(this._effectiveTimeScale,0,o)}warp(o,r,d){let m=this._mixer,O=m.time,C=this.timeScale,G=this._timeScaleInterpolant;G===null&&(G=m._lendControlInterpolant(),this._timeScaleInterpolant=G);let x=G.parameterPositions,H=G.sampleValues;return x[0]=O,x[1]=O+d,H[0]=o/C,H[1]=r/C,this}stopWarping(){let o=this._timeScaleInterpolant;return o!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(o)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(o,r,d,m){if(!this.enabled){this._updateWeight(o);return}let O=this._startTime;if(O!==null){let x=(o-O)*d;if(x<0||d===0)return;this._startTime=null,r=d*x}r*=this._updateTimeScale(o);let C=this._updateTime(r),G=this._updateWeight(o);if(G>0){let x=this._interpolants,H=this._propertyBindings;switch(this.blendMode){case MMe:for(let te=0,ne=x.length;te!==ne;++te)x[te].evaluate(C),H[te].accumulateAdditive(G);break;case Nde:default:for(let te=0,ne=x.length;te!==ne;++te)x[te].evaluate(C),H[te].accumulate(m,G)}}}_updateWeight(o){let r=0;if(this.enabled){r=this.weight;let d=this._weightInterpolant;if(d!==null){let m=d.evaluate(o)[0];r*=m,o>d.parameterPositions[1]&&(this.stopFading(),m===0&&(this.enabled=!1))}}return this._effectiveWeight=r,r}_updateTimeScale(o){let r=0;if(!this.paused){r=this.timeScale;let d=this._timeScaleInterpolant;if(d!==null){let m=d.evaluate(o)[0];r*=m,o>d.parameterPositions[1]&&(this.stopWarping(),r===0?this.paused=!0:this.timeScale=r)}}return this._effectiveTimeScale=r,r}_updateTime(o){let r=this._clip.duration,d=this.loop,m=this.time+o,O=this._loopCount,C=d===A7e;if(o===0)return O===-1?m:C&&(O&1)===1?r-m:m;if(d===w7e){O===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(m>=r)m=r;else if(m<0)m=0;else{this.time=m;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=m,this._mixer.dispatchEvent({type:"finished",action:this,direction:o<0?-1:1})}}else{if(O===-1&&(o>=0?(O=0,this._setEndings(!0,this.repetitions===0,C)):this._setEndings(this.repetitions===0,!0,C)),m>=r||m<0){let G=Math.floor(m/r);m-=r*G,O+=Math.abs(G);let x=this.repetitions-O;if(x<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,m=o>0?r:0,this.time=m,this._mixer.dispatchEvent({type:"finished",action:this,direction:o>0?1:-1});else{if(x===1){let H=o<0;this._setEndings(H,!H,C)}else this._setEndings(!1,!1,C);this._loopCount=O,this.time=m,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:G})}}else this.time=m;if(C&&(O&1)===1)return r-m}return m}_setEndings(o,r,d){let m=this._interpolantSettings;d?(m.endingStart=pF,m.endingEnd=pF):(o?m.endingStart=this.zeroSlopeAtStart?pF:uF:m.endingStart=A$,r?m.endingEnd=this.zeroSlopeAtEnd?pF:uF:m.endingEnd=A$)}_scheduleFading(o,r,d){let m=this._mixer,O=m.time,C=this._weightInterpolant;C===null&&(C=m._lendControlInterpolant(),this._weightInterpolant=C);let G=C.parameterPositions,x=C.sampleValues;return G[0]=O,x[0]=r,G[1]=O+o,x[1]=d,this}},Ide=class extends Y8{constructor(o){super(),this._root=o,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(o,r){let d=o._localRoot||this._root,m=o._clip.tracks,O=m.length,C=o._propertyBindings,G=o._interpolants,x=d.uuid,H=this._bindingsByRootAndName,te=H[x];te===void 0&&(te={},H[x]=te);for(let ne=0;ne!==O;++ne){let Te=m[ne],Pe=Te.name,Ye=te[Pe];if(Ye!==void 0)C[ne]=Ye;else{if(Ye=C[ne],Ye!==void 0){Ye._cacheIndex===null&&(++Ye.referenceCount,this._addInactiveBinding(Ye,x,Pe));continue}let mt=r&&r._propertyBindings[ne].binding.parsedPath;Ye=new vde(ty.create(d,Pe,mt),Te.ValueTypeName,Te.getValueSize()),++Ye.referenceCount,this._addInactiveBinding(Ye,x,Pe),C[ne]=Ye}G[ne].resultBuffer=Ye.buffer}}_activateAction(o){if(!this._isActiveAction(o)){if(o._cacheIndex===null){let d=(o._localRoot||this._root).uuid,m=o._clip.uuid,O=this._actionsByClip[m];this._bindAction(o,O&&O.knownActions[0]),this._addInactiveAction(o,m,d)}let r=o._propertyBindings;for(let d=0,m=r.length;d!==m;++d){let O=r[d];O.useCount++===0&&(this._lendBinding(O),O.saveOriginalState())}this._lendAction(o)}}_deactivateAction(o){if(this._isActiveAction(o)){let r=o._propertyBindings;for(let d=0,m=r.length;d!==m;++d){let O=r[d];--O.useCount===0&&(O.restoreOriginalState(),this._takeBackBinding(O))}this._takeBackAction(o)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let o=this;this.stats={actions:{get total(){return o._actions.length},get inUse(){return o._nActiveActions}},bindings:{get total(){return o._bindings.length},get inUse(){return o._nActiveBindings}},controlInterpolants:{get total(){return o._controlInterpolants.length},get inUse(){return o._nActiveControlInterpolants}}}}_isActiveAction(o){let r=o._cacheIndex;return r!==null&&r<this._nActiveActions}_addInactiveAction(o,r,d){let m=this._actions,O=this._actionsByClip,C=O[r];if(C===void 0)C={knownActions:[o],actionByRoot:{}},o._byClipCacheIndex=0,O[r]=C;else{let G=C.knownActions;o._byClipCacheIndex=G.length,G.push(o)}o._cacheIndex=m.length,m.push(o),C.actionByRoot[d]=o}_removeInactiveAction(o){let r=this._actions,d=r[r.length-1],m=o._cacheIndex;d._cacheIndex=m,r[m]=d,r.pop(),o._cacheIndex=null;let O=o._clip.uuid,C=this._actionsByClip,G=C[O],x=G.knownActions,H=x[x.length-1],te=o._byClipCacheIndex;H._byClipCacheIndex=te,x[te]=H,x.pop(),o._byClipCacheIndex=null;let ne=G.actionByRoot,Te=(o._localRoot||this._root).uuid;delete ne[Te],x.length===0&&delete C[O],this._removeInactiveBindingsForAction(o)}_removeInactiveBindingsForAction(o){let r=o._propertyBindings;for(let d=0,m=r.length;d!==m;++d){let O=r[d];--O.referenceCount===0&&this._removeInactiveBinding(O)}}_lendAction(o){let r=this._actions,d=o._cacheIndex,m=this._nActiveActions++,O=r[m];o._cacheIndex=m,r[m]=o,O._cacheIndex=d,r[d]=O}_takeBackAction(o){let r=this._actions,d=o._cacheIndex,m=--this._nActiveActions,O=r[m];o._cacheIndex=m,r[m]=o,O._cacheIndex=d,r[d]=O}_addInactiveBinding(o,r,d){let m=this._bindingsByRootAndName,O=this._bindings,C=m[r];C===void 0&&(C={},m[r]=C),C[d]=o,o._cacheIndex=O.length,O.push(o)}_removeInactiveBinding(o){let r=this._bindings,d=o.binding,m=d.rootNode.uuid,O=d.path,C=this._bindingsByRootAndName,G=C[m],x=r[r.length-1],H=o._cacheIndex;x._cacheIndex=H,r[H]=x,r.pop(),delete G[O],Object.keys(G).length===0&&delete C[m]}_lendBinding(o){let r=this._bindings,d=o._cacheIndex,m=this._nActiveBindings++,O=r[m];o._cacheIndex=m,r[m]=o,O._cacheIndex=d,r[d]=O}_takeBackBinding(o){let r=this._bindings,d=o._cacheIndex,m=--this._nActiveBindings,O=r[m];o._cacheIndex=m,r[m]=o,O._cacheIndex=d,r[d]=O}_lendControlInterpolant(){let o=this._controlInterpolants,r=this._nActiveControlInterpolants++,d=o[r];return d===void 0&&(d=new k$(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),d.__cacheIndex=r,o[r]=d),d}_takeBackControlInterpolant(o){let r=this._controlInterpolants,d=o.__cacheIndex,m=--this._nActiveControlInterpolants,O=r[m];o.__cacheIndex=m,r[m]=o,O.__cacheIndex=d,r[d]=O}clipAction(o,r,d){let m=r||this._root,O=m.uuid,C=typeof o=="string"?W$.findByName(m,o):o,G=C!==null?C.uuid:o,x=this._actionsByClip[G],H=null;if(d===void 0&&(C!==null?d=C.blendMode:d=Nde),x!==void 0){let ne=x.actionByRoot[O];if(ne!==void 0&&ne.blendMode===d)return ne;H=x.knownActions[0],C===null&&(C=H._clip)}if(C===null)return null;let te=new Mde(this,C,r,d);return this._bindAction(te,H),this._addInactiveAction(te,G,O),te}existingAction(o,r){let d=r||this._root,m=d.uuid,O=typeof o=="string"?W$.findByName(d,o):o,C=O?O.uuid:o,G=this._actionsByClip[C];return G!==void 0&&G.actionByRoot[m]||null}stopAllAction(){let o=this._actions,r=this._nActiveActions;for(let d=r-1;d>=0;--d)o[d].stop();return this}update(o){o*=this.timeScale;let r=this._actions,d=this._nActiveActions,m=this.time+=o,O=Math.sign(o),C=this._accuIndex^=1;for(let H=0;H!==d;++H)r[H]._update(m,o,O,C);let G=this._bindings,x=this._nActiveBindings;for(let H=0;H!==x;++H)G[H].apply(C);return this}setTime(o){this.time=0;for(let r=0;r<this._actions.length;r++)this._actions[r].time=0;return this.update(o)}getRoot(){return this._root}uncacheClip(o){let r=this._actions,d=o.uuid,m=this._actionsByClip,O=m[d];if(O!==void 0){let C=O.knownActions;for(let G=0,x=C.length;G!==x;++G){let H=C[G];this._deactivateAction(H);let te=H._cacheIndex,ne=r[r.length-1];H._cacheIndex=null,H._byClipCacheIndex=null,ne._cacheIndex=te,r[te]=ne,r.pop(),this._removeInactiveBindingsForAction(H)}delete m[d]}}uncacheRoot(o){let r=o.uuid,d=this._actionsByClip;for(let C in d){let G=d[C].actionByRoot,x=G[r];x!==void 0&&(this._deactivateAction(x),this._removeInactiveAction(x))}let m=this._bindingsByRootAndName,O=m[r];if(O!==void 0)for(let C in O){let G=O[C];G.restoreOriginalState(),this._removeInactiveBinding(G)}}uncacheAction(o,r){let d=this.existingAction(o,r);d!==null&&(this._deactivateAction(d),this._removeInactiveAction(d))}};Ide.prototype._controlInterpolantsResultBuffer=new Float32Array(1);var wde=class p{constructor(o){typeof o=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),o=arguments[1]),this.value=o}clone(){return new p(this.value.clone===void 0?this.value:this.value.clone())}},Ode=class extends SB{constructor(o,r,d=1){super(o,r),this.meshPerAttribute=d||1}copy(o){return super.copy(o),this.meshPerAttribute=o.meshPerAttribute,this}clone(o){let r=super.clone(o);return r.meshPerAttribute=this.meshPerAttribute,r}toJSON(o){let r=super.toJSON(o);return r.isInstancedInterleavedBuffer=!0,r.meshPerAttribute=this.meshPerAttribute,r}};Ode.prototype.isInstancedInterleavedBuffer=!0;var Ade=class{constructor(o,r,d,m,O){this.buffer=o,this.type=r,this.itemSize=d,this.elementSize=m,this.count=O,this.version=0}set needsUpdate(o){o===!0&&this.version++}setBuffer(o){return this.buffer=o,this}setType(o,r){return this.type=o,this.elementSize=r,this}setItemSize(o){return this.itemSize=o,this}setCount(o){return this.count=o,this}};Ade.prototype.isGLBufferAttribute=!0;var dMe=new _o,RB=class{constructor(o=new _o(1/0,1/0),r=new _o(-1/0,-1/0)){this.min=o,this.max=r}set(o,r){return this.min.copy(o),this.max.copy(r),this}setFromPoints(o){this.makeEmpty();for(let r=0,d=o.length;r<d;r++)this.expandByPoint(o[r]);return this}setFromCenterAndSize(o,r){let d=dMe.copy(r).multiplyScalar(.5);return this.min.copy(o).sub(d),this.max.copy(o).add(d),this}clone(){return new this.constructor().copy(this)}copy(o){return this.min.copy(o.min),this.max.copy(o.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(o){return o===void 0&&(console.warn("THREE.Box2: .getCenter() target is now required"),o=new _o),this.isEmpty()?o.set(0,0):o.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(o){return o===void 0&&(console.warn("THREE.Box2: .getSize() target is now required"),o=new _o),this.isEmpty()?o.set(0,0):o.subVectors(this.max,this.min)}expandByPoint(o){return this.min.min(o),this.max.max(o),this}expandByVector(o){return this.min.sub(o),this.max.add(o),this}expandByScalar(o){return this.min.addScalar(-o),this.max.addScalar(o),this}containsPoint(o){return!(o.x<this.min.x||o.x>this.max.x||o.y<this.min.y||o.y>this.max.y)}containsBox(o){return this.min.x<=o.min.x&&o.max.x<=this.max.x&&this.min.y<=o.min.y&&o.max.y<=this.max.y}getParameter(o,r){return r===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),r=new _o),r.set((o.x-this.min.x)/(this.max.x-this.min.x),(o.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(o){return!(o.max.x<this.min.x||o.min.x>this.max.x||o.max.y<this.min.y||o.min.y>this.max.y)}clampPoint(o,r){return r===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),r=new _o),r.copy(o).clamp(this.min,this.max)}distanceToPoint(o){return dMe.copy(o).clamp(this.min,this.max).sub(o).length()}intersect(o){return this.min.max(o.min),this.max.min(o.max),this}union(o){return this.min.min(o.min),this.max.max(o.max),this}translate(o){return this.min.add(o),this.max.add(o),this}equals(o){return o.min.equals(this.min)&&o.max.equals(this.max)}};RB.prototype.isBox2=!0;var hMe=new $i,b$=new $i,_de=class{constructor(o=new $i,r=new $i){this.start=o,this.end=r}set(o,r){return this.start.copy(o),this.end.copy(r),this}copy(o){return this.start.copy(o.start),this.end.copy(o.end),this}getCenter(o){return o===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),o=new $i),o.addVectors(this.start,this.end).multiplyScalar(.5)}delta(o){return o===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),o=new $i),o.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(o,r){return r===void 0&&(console.warn("THREE.Line3: .at() target is now required"),r=new $i),this.delta(r).multiplyScalar(o).add(this.start)}closestPointToPointParameter(o,r){hMe.subVectors(o,this.start),b$.subVectors(this.end,this.start);let d=b$.dot(b$),O=b$.dot(hMe)/d;return r&&(O=eT(O,0,1)),O}closestPointToPoint(o,r,d){let m=this.closestPointToPointParameter(o,r);return d===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),d=new $i),this.delta(d).multiplyScalar(m).add(this.start)}applyMatrix4(o){return this.start.applyMatrix4(o),this.end.applyMatrix4(o),this}equals(o){return o.start.equals(this.start)&&o.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},Tde=class extends mv{constructor(o){super(),this.material=o,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}};Tde.prototype.isImmediateRenderObject=!0;var HR=new $i,v$=new vc,cpe=new vc,Ede=class extends GX{constructor(o){let r=kMe(o),d=new c3,m=[],O=[],C=new C1(0,0,1),G=new C1(0,1,0);for(let H=0;H<r.length;H++){let te=r[H];te.parent&&te.parent.isBone&&(m.push(0,0,0),m.push(0,0,0),O.push(C.r,C.g,C.b),O.push(G.r,G.g,G.b))}d.setAttribute("position",new r4(m,3)),d.setAttribute("color",new r4(O,3));let x=new LB({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(d,x),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=o,this.bones=r,this.matrix=o.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(o){let r=this.bones,d=this.geometry,m=d.getAttribute("position");cpe.copy(this.root.matrixWorld).invert();for(let O=0,C=0;O<r.length;O++){let G=r[O];G.parent&&G.parent.isBone&&(v$.multiplyMatrices(cpe,G.matrixWorld),HR.setFromMatrixPosition(v$),m.setXYZ(C,HR.x,HR.y,HR.z),v$.multiplyMatrices(cpe,G.parent.matrixWorld),HR.setFromMatrixPosition(v$),m.setXYZ(C+1,HR.x,HR.y,HR.z),C+=2)}d.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(o)}};function kMe(p){let o=[];p&&p.isBone&&o.push(p);for(let r=0;r<p.children.length;r++)o.push.apply(o,kMe(p.children[r]));return o}var zde=class extends GX{constructor(o=10,r=10,d=4473924,m=8947848){d=new C1(d),m=new C1(m);let O=r/2,C=o/r,G=o/2,x=[],H=[];for(let Te=0,Pe=0,Ye=-G;Te<=r;Te++,Ye+=C){x.push(-G,0,Ye,G,0,Ye),x.push(Ye,0,-G,Ye,0,G);let mt=Te===O?d:m;mt.toArray(H,Pe),Pe+=3,mt.toArray(H,Pe),Pe+=3,mt.toArray(H,Pe),Pe+=3,mt.toArray(H,Pe),Pe+=3}let te=new c3;te.setAttribute("position",new r4(x,3)),te.setAttribute("color",new r4(H,3));let ne=new LB({vertexColors:!0,toneMapped:!1});super(te,ne),this.type="GridHelper"}};var jHe=new Float32Array(1),NBt=new Int32Array(jHe.buffer);var y$=4,NX=8,PBt=Math.pow(2,NX),qMe=[.125,.215,.35,.446,.526,.582],VHe=NX-y$+1+qMe.length;var BBt={[_F]:0,[Pde]:1,[wMe]:2,[OMe]:3,[AMe]:4,[_Me]:5,[IMe]:6},YHe=new HX({side:Qw,depthWrite:!1,depthTest:!1}),HBt=new Dz(new FX,YHe);var{_lodPlanes:FBt,_sizeLods:kBt,_sigmas:qBt}=XHe();var zB=(1+Math.sqrt(5))/2,lF=1/zB,WBt=[new $i(1,1,1),new $i(-1,1,1),new $i(1,1,-1),new $i(-1,1,-1),new $i(0,zB,lF),new $i(0,zB,-lF),new $i(lF,0,zB),new $i(-lF,0,zB),new $i(zB,lF,0),new $i(-zB,lF,0)];function XHe(){let p=[],o=[],r=[],d=NX;for(let m=0;m<VHe;m++){let O=Math.pow(2,d);o.push(O);let C=1/O;m>NX-y$?C=qMe[m-NX+y$-1]:m==0&&(C=0),r.push(C);let G=1/(O-1),x=-G/2,H=1+G/2,te=[x,x,H,x,H,H,x,x,H,H,x,H],ne=6,Te=6,Pe=3,Ye=2,mt=1,Nt=new Float32Array(Pe*Te*ne),Dt=new Float32Array(Ye*Te*ne),Ct=new Float32Array(mt*Te*ne);for(let Hn=0;Hn<ne;Hn++){let vi=Hn%3*2/3-1,en=Hn>2?0:-1,Ni=[vi,en,0,vi+2/3,en,0,vi+2/3,en+1,0,vi,en,0,vi+2/3,en+1,0,vi,en+1,0];Nt.set(Ni,Pe*Te*Hn),Dt.set(te,Ye*Te*Hn);let Mi=[Hn,Hn,Hn,Hn,Hn,Hn];Ct.set(Mi,mt*Te*Hn)}let Zn=new c3;Zn.setAttribute("position",new IM(Nt,Pe)),Zn.setAttribute("uv",new IM(Dt,Ye)),Zn.setAttribute("faceIndex",new IM(Ct,mt)),p.push(Zn),d>y$&&d--}return{_lodPlanes:p,_sizeLods:o,_sigmas:r}}nT.create=function(p,o){return console.log("THREE.Curve.create() has been deprecated"),p.prototype=Object.create(nT.prototype),p.prototype.constructor=p,p.prototype.getPoint=o,p};AF.prototype.fromPoints=function(p){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(p)};zde.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};Ede.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};DS.prototype.extractUrlBase=function(p){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),ade.extractUrlBase(p)};DS.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};RB.prototype.center=function(p){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(p)};RB.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};RB.prototype.isIntersectionBox=function(p){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(p)};RB.prototype.size=function(p){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(p)};tT.prototype.center=function(p){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(p)};tT.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()};tT.prototype.isIntersectionBox=function(p){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(p)};tT.prototype.isIntersectionSphere=function(p){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(p)};tT.prototype.size=function(p){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(p)};UR.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};vF.prototype.setFromMatrix=function(p){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(p)};_de.prototype.center=function(p){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(p)};Gw.prototype.flattenToArrayOffset=function(p,o){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(p,o)};Gw.prototype.multiplyVector3=function(p){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),p.applyMatrix3(this)};Gw.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")};Gw.prototype.applyToBufferAttribute=function(p){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),p.applyMatrix3(this)};Gw.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")};Gw.prototype.getInverse=function(p){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(p).invert()};vc.prototype.extractPosition=function(p){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(p)};vc.prototype.flattenToArrayOffset=function(p,o){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(p,o)};vc.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new $i().setFromMatrixColumn(this,3)};vc.prototype.setRotationFromQuaternion=function(p){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(p)};vc.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")};vc.prototype.multiplyVector3=function(p){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),p.applyMatrix4(this)};vc.prototype.multiplyVector4=function(p){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),p.applyMatrix4(this)};vc.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")};vc.prototype.rotateAxis=function(p){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),p.transformDirection(this)};vc.prototype.crossVector=function(p){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),p.applyMatrix4(this)};vc.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")};vc.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")};vc.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")};vc.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")};vc.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")};vc.prototype.applyToBufferAttribute=function(p){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),p.applyMatrix4(this)};vc.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")};vc.prototype.makeFrustum=function(p,o,r,d,m,O){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(p,o,d,r,m,O)};vc.prototype.getInverse=function(p){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(p).invert()};Gz.prototype.isIntersectionLine=function(p){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(p)};QA.prototype.multiplyVector3=function(p){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),p.applyQuaternion(this)};QA.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};GR.prototype.isIntersectionBox=function(p){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(p)};GR.prototype.isIntersectionPlane=function(p){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(p)};GR.prototype.isIntersectionSphere=function(p){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(p)};r5.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};r5.prototype.barycoordFromPoint=function(p,o){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(p,o)};r5.prototype.midpoint=function(p){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(p)};r5.prototypenormal=function(p){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(p)};r5.prototype.plane=function(p){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(p)};r5.barycoordFromPoint=function(p,o,r,d,m){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),r5.getBarycoord(p,o,r,d,m)};r5.normal=function(p,o,r,d){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),r5.getNormal(p,o,r,d)};qR.prototype.extractAllPoints=function(p){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(p)};qR.prototype.extrude=function(p){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new gF(this,p)};qR.prototype.makeGeometry=function(p){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Npe(this,p)};_o.prototype.fromAttribute=function(p,o,r){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(p,o,r)};_o.prototype.distanceToManhattan=function(p){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(p)};_o.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};$i.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")};$i.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")};$i.prototype.getPositionFromMatrix=function(p){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(p)};$i.prototype.getScaleFromMatrix=function(p){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(p)};$i.prototype.getColumnFromMatrix=function(p,o){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(o,p)};$i.prototype.applyProjection=function(p){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(p)};$i.prototype.fromAttribute=function(p,o,r){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(p,o,r)};$i.prototype.distanceToManhattan=function(p){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(p)};$i.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};Ob.prototype.fromAttribute=function(p,o,r){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(p,o,r)};Ob.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};mv.prototype.getChildByName=function(p){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(p)};mv.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")};mv.prototype.translate=function(p,o){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(o,p)};mv.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")};mv.prototype.applyMatrix=function(p){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(p)};Object.defineProperties(mv.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(p){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=p}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});Dz.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")};Object.defineProperties(Dz.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),_7e},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});B$.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};F_.prototype.setLens=function(p,o){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),o!==void 0&&(this.filmGauge=o),this.setFocalLength(p)};Object.defineProperties(Yz.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(p){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=p}},shadowCameraLeft:{set:function(p){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=p}},shadowCameraRight:{set:function(p){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=p}},shadowCameraTop:{set:function(p){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=p}},shadowCameraBottom:{set:function(p){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=p}},shadowCameraNear:{set:function(p){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=p}},shadowCameraFar:{set:function(p){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=p}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(p){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=p}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(p){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=p}},shadowMapHeight:{set:function(p){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=p}}});Object.defineProperties(IM.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===_$},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(_$)}}});IM.prototype.setDynamic=function(p){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(p===!0?_$:BX),this};IM.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},IM.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};c3.prototype.addIndex=function(p){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(p)};c3.prototype.addAttribute=function(p,o){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),!(o&&o.isBufferAttribute)&&!(o&&o.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(p,new IM(arguments[1],arguments[2]))):p==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(o),this):this.setAttribute(p,o)};c3.prototype.addDrawCall=function(p,o,r){r!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(p,o)};c3.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()};c3.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")};c3.prototype.removeAttribute=function(p){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(p)};c3.prototype.applyMatrix=function(p){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(p)};Object.defineProperties(c3.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}});SB.prototype.setDynamic=function(p){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(p===!0?_$:BX),this};SB.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};gF.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")};gF.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")};gF.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")};N$.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")};wde.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this};Object.defineProperties(Zw.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new C1}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(p){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=p===bMe}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(p){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=p}}});Object.defineProperties(X8.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(p){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=p}}});r3.prototype.clearTarget=function(p,o,r,d){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(p),this.clear(o,r,d)};r3.prototype.animate=function(p){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(p)};r3.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()};r3.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()};r3.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision};r3.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()};r3.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")};r3.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")};r3.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")};r3.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")};r3.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")};r3.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")};r3.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures};r3.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")};r3.prototype.enableScissorTest=function(p){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(p)};r3.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};r3.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};r3.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};r3.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};r3.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")};r3.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")};r3.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")};r3.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")};r3.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")};r3.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()};Object.defineProperties(r3.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(p){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=p}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(p){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=p}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(p){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=p===!0?Pde:_F}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}});Object.defineProperties(NMe.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});Object.defineProperties(j8.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(p){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=p}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(p){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=p}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(p){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=p}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(p){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=p}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(p){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=p}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(p){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=p}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(p){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=p}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(p){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=p}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(p){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=p}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(p){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=p}}});mde.prototype.load=function(p){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let o=this;return new dde().load(p,function(d){o.setBuffer(d)}),this};bde.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};qX.prototype.updateCubeMap=function(p,o){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(p,o)};qX.prototype.clear=function(p,o,r,d){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(p,o,r,d)};WR.crossOrigin=void 0;WR.loadTexture=function(p,o,r,d){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let m=new Kpe;m.setCrossOrigin(this.crossOrigin);let O=m.load(p,r,void 0,d);return o&&(O.mapping=o),O};WR.loadTextureCube=function(p,o,r,d){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let m=new Zpe;m.setCrossOrigin(this.crossOrigin);let O=m.load(p,r,void 0,d);return o&&(O.mapping=o),O};WR.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};WR.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:fMe}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=fMe);var ZHe=["rendererviewport"];function KHe(p,o){p&1&&(cs(0,"div",2),ua(1,"translate")),p&2&&ko("title",pa(1,1,"_LoadingGeometry"))}var WMe=(()=>{class p{set objectId(r){this._objectId=r,this.onObjectIdChanged()}get objectId(){return this._objectId}set visibleNode(r){this.viewport&&this.viewport.toggleObjectNode({id:r.id,visible:r.visible})}set opaqueNode(r){this.viewport&&this.viewport.toggleObjectNodeOpacity({id:r.id,opacity:r.opaque})}constructor(r){this.el=r,this.resizeObserver=null,this.viewport=null,this.isLoading=!0,this.previousWidth=0,this.previousHeight=0,this.api=null,this._objectId=void 0,this.revision=void 0,this.contentLoader=null,this.isRendererInitialized=!1,this.metricUnits={weight:{multiplicator:.001,precision:2,unit:"kg"},length:{multiplicator:.001,precision:2,unit:"m"},width:{multiplicator:.001,precision:2,unit:"m"},height:{multiplicator:.001,precision:2,unit:"m"},area:{multiplicator:1e-6,precision:2,unit:"m\xB2"},volume:{multiplicator:1e-9,precision:2,unit:"m\xB3"}},this.imperialUnits={length:{multiplicator:.00328083989,precision:2,unit:"feet"},width:{multiplicator:.00328083989,precision:2,unit:"feet"},height:{multiplicator:.00328083989,precision:2,unit:"feet"}},this.viewportSettings={defaultOpacity:.5,disciplineOpacity:.1,pinSizeScaleFactor:2,maxWebGLBufferSize:35e13,mixedModelMode:!0,useFrameSelection:!1,pinFlyToDistance:2e4,nearClippingPlane:.01,slideThmbSize:[180,112],units:{mm:this.metricUnits,inch:{}}},this.units={Metric:this.metricUnits,Imperial:this.imperialUnits},hB(()=>{this.visibleNode&&this.processVisibilityNode(this.visibleNode)}),hB(()=>{this.opaqueNode&&this.processOpacityNode(this.opaqueNode)})}processVisibilityNode(r){console.log("Processing visbility of node in lib-object-preview:",r)}processOpacityNode(r){console.log("Processing opacity of node in lib-object-preview:",r)}ngAfterViewInit(){let r=this.el.nativeElement;this.resizeObserver=new ResizeObserver(d=>{for(let m of d){let O=m?.contentRect?.width;O!=this.previousWidth&&(this.previousWidth=O,this.recalculatePreviewSize())}}),this.resizeObserver.observe(r),this.initRenderer(),this.contentLoader=new zF.ContentLoader(this.api,this.viewport),this.isRendererInitialized=!0,this.loadObject()}ngOnDestroy(){this.resizeObserver?.disconnect(),this.viewport?.dispose()}recalculatePreviewSize(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{let r=this.rendererViewportElement?.nativeElement.offsetWidth,d=this.rendererViewportElement?.nativeElement.offsetHeight;r&&d?(this.viewport?.setViewportSize(r,d),this.viewport?.draw()):console.error("Viewport size is zero")},1)}setAmbientOcclusionOptions(){if(!this.viewport)return;let r={usage:!1,usageForInteraction:!1,useShadows:!1,useShadowsForInteraction:!1,lightRotation:Math.PI*35/180,lightElevation:Math.PI*50/180,lightColor:new C1(1,1,1),ambientLightColor:new C1(.6,.6,.6)};this.viewport.setAmbientOcclusionOptions(r)}setBackgroundOptions(){if(!this.viewport)return;let r={name:"day sky",ambientLightColor:8816262,backgroundType:zF.Background.BackgroundType_LinearGradient,backgroundParams:{alpha:1,colorStops:[{offset:0,color:"#87CDE9"},{offset:.5104,color:"#DDEDFE"},{offset:.9635,color:"#D3D3D4"}]}};this.viewport.setBackground(r.backgroundType,r.backgroundParams)}setHoverOption(r=!0){this.viewport&&this.viewport.setUseHoverEffect(r)}initRenderer(){this.viewport=new zF.Viewport3D({settings:this.viewportSettings,units:this.units.Metric,domElementId:"",GPUPick:!0,api:this.api,name:"objectPreviewRendererViewport",lookupTextureSize:32,ssaoSupported:!1,shadowsSupported:!1,panningScaleFactor:4,commandPolicies:{CommandSelect:{noBubble:!0,noTraverse:!0}}}),this.setBackgroundOptions(),this.setHoverOption(),this.viewport.draw(),this.viewport?.domElement?(this.el.nativeElement?.shadowRoot||this.el.nativeElement)?.getElementsByClassName?.("rendered-preview")[0]?.appendChild?.(this.viewport.domElement):console.error("no dom element present for renderer!")}onObjectIdChanged(){this.loadObject()}loadObject(){if(!this.isRendererInitialized)return;if(!this.contentLoader){console.error("content loader is not there!");return}console.log("loading object:",this.objectId),this.isLoading=!0,this.viewport?.resetViewport(),this.contentLoader.loadObject(this.objectId,this.revision,null).then(()=>{this.viewport?.setupProjectView(),this.isLoading=!1})}static{this.\u0275fac=function(d){return new(d||p)(rr(I0))}}static{this.\u0275cmp=fs({type:p,selectors:[["lib-object-preview"]],viewQuery:function(d,m){if(d&1&&Mf(ZHe,5),d&2){let O;mc(O=bc())&&(m.rendererViewportElement=O.first)}},inputs:{api:"api",objectId:"objectId",revision:"revision",visibleNode:"visibleNode",opaqueNode:"opaqueNode"},standalone:!0,features:[ms],decls:3,vars:1,consts:[["rendererviewport",""],[1,"rendered-preview"],[1,"loading-spinner-icon",3,"title"]],template:function(d,m){d&1&&(bn(0,"div",1,0),_r(2,KHe,2,3,"div",2),On()),d&2&&(on(2),Is(m.isLoading?2:-1))},dependencies:[E1],styles:[`.rendered-preview{width:100%;height:21rem!important;min-height:21rem;padding:0;white-space:nowrap;cursor:default;margin-bottom:0;position:relative}.rendered-preview canvas{min-height:21rem;min-width:100%;max-width:100%}.loading-spinner-icon{background-image:url("./assets/Refresh_18_gray.svg");position:absolute;top:calc(50% - .6rem);left:calc(50% - .6rem);z-index:10;width:1.8rem;height:1.8rem;background-size:contain;background-repeat:no-repeat;background-position:center;animation:spin .6s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
12748
12748
  `],encapsulation:2})}}return p})();function UMe(p){return o=>{if(!p||Array.isArray(p))return null;let r=o.value;return Object.keys(p).includes(r)?null:{invalidGuid:{value:r,message:`Invalid value: ${r}.`}}}}function GMe(p){return o=>{if(!p||Array.isArray(p))return null;let r=o.value;return Object.keys(p).includes(r)?null:{invalidGuid:{value:r,message:`Invalid value: ${r}.`}}}}function jMe(p){return o=>{if(!p||!Array.isArray(p))return null;let r=o.value;return p.includes(r)?null:{invalidGuid:{value:r,message:`Invalid value: ${r}.`}}}}var VMe=(()=>{class p{constructor(){this._model=new Tu(null)}get modelValue(){return this._model.value}get model$(){return this._model}setModel(r){this._model.next(r)}static{this.\u0275fac=function(d){return new(d||p)}}static{this.\u0275prov=ul({token:p,factory:p.\u0275fac,providedIn:"root"})}}return p})();function $He(p,o){if(p&1){let r=Xs();bn(0,"lib-bimplus-object-structure",7),Xi("nodeSelected",function(m){Ki(r);let O=pn();return Ji(O.handleObjectStructureNodeSelected(m))})("nodeVisible",function(m){Ki(r);let O=pn();return Ji(O.handleObjectStructureNodeVisible(m))})("nodeOpaque",function(m){Ki(r);let O=pn();return Ji(O.handleObjectStructureNodeOpaque(m))}),On()}if(p&2){let r=pn();Vn("objectStructure",r.objectStructure)}}function eFe(p,o){if(p&1){let r=Xs();bn(0,"lib-expansion-panel")(1,"lib-expansion-panel-header")(2,"span",8),ns(3),ua(4,"translate"),On()(),bn(5,"lib-bimplus-object-complex-properties",9),Xi("nodeSelected",function(m){Ki(r);let O=pn();return Ji(O.handleComplexPropertyNodeSelected(m))}),On()()}if(p&2){let r=pn();on(3),Ya(" ",pa(4,2,"_Object multiproperties tree"),""),on(2),Vn("complexProperties",r.complexProperties)}}function tFe(p,o){if(p&1&&(bn(0,"lib-expansion-panel",11)(1,"lib-expansion-panel-header")(2,"span",12),ns(3),On()(),cs(4,"lib-object-properties-group",13),On()),p&2){let r=pn().$implicit,d=pn(2);Vn("expanded",r.expanded),on(3),Ya(" ",r.name,""),on(),Vn("attributesGroup",r)("editMode",d._editMode())("canUpdateObject",d._canUpdateObject())("objectPropertiesForm",d._objectPropertiesGroupForm(r.name))}}function nFe(p,o){if(p&1&&_r(0,tFe,5,6,"lib-expansion-panel",11),p&2){let r=o.$implicit,d=pn(2);Is(d._editMode()||d.hasSetAnyAttribute(r)?0:-1)}}function iFe(p,o){if(p&1&&(bn(0,"lib-expansion-panel")(1,"lib-expansion-panel-header")(2,"span",8),ns(3),ua(4,"translate"),On()(),bn(5,"form",10),Wf(6,nFe,1,1,null,null,gM),On()()),p&2){let r=pn();on(3),G0(pa(4,2,"_Object properties")),on(2),Vn("formGroup",r._objectPropertiesForm),on(),Uf(r.objectAttributeGroups())}}var YMe=(()=>{class p extends z1{_objectPropertiesGroupForm(r){return this._objectPropertiesForm.controls[r]}constructor(r,d,m,O){super(r),this.formBuilder=d,this.cdr=m,this.objectPropertiesService=O,this._objectPropertiesForm=new vR({}),this._editMode=bo(!1),this._objectStructure=null,this._complexProperties=null,this.api=null,this.revision=void 0,this._canUpdateObject=bo(!1),this._rootObjectId="",this.isSaveButtonDisabled$=new Tu(!0),this.visibleNodeSignal=bo({id:"",visible:!1,opaque:!1}),this.opaqueNodeSignal=bo({id:"",visible:!1,opaque:!1}),this._currentObjectId$=new Tu(""),this._currentPropertiesObjectId$=new Tu(""),this.buttonRowItems=[],this.configEditProperties=[],this.configEditedProperties=[],this.updatedObjectProperties=new Nr,this.objectAttributeGroups=bo([]),this.initialFormValues=""}get objectStructure(){return this._objectStructure}get complexProperties(){return this._complexProperties}set canUpdateObject(r){this._canUpdateObject.set(r)}set rootObjectId(r){this._currentObjectId$.next(r),this._createObjectStructure(r,this.revision),this._rootObjectId=r}get rootObjectId(){return this._rootObjectId}_editPropertiesButtonsConfiguration(){this.configEditProperties.push({id:"edit-properties",title:this.translateService.instant("_Edit_properties"),tooltip:this.translateService.instant("_Edit_properties"),disabled:!this._canUpdateObject(),buttonStyle:"primary"})}_editedPropertiesButtonsConfiguration(){this.configEditedProperties.push({id:"save-changed-properties",title:this.translateService.instant("_Save"),tooltip:this.translateService.instant("_Save"),disabled:this.isSaveButtonDisabled$,buttonStyle:"primary"}),this.configEditedProperties.push({id:"cancel-editing-properties",title:this.translateService.instant("_Cancel"),tooltip:this.translateService.instant("_Cancel"),disabled:!1,buttonStyle:"secondary"})}ngOnInit(){this._editPropertiesButtonsConfiguration(),this._editedPropertiesButtonsConfiguration(),this.buttonRowItems=this.configEditProperties,this.subscribeProperties()}subscribeProperties(){this._currentPropertiesObjectId$.subscribe({next:r=>{r&&this._createObjectProperties(r,this.revision)}}),this._currentObjectId$.subscribe({next:r=>{this._currentPropertiesObjectId$.next(r),this._createComplexPropertiestructure(r,this.revision)}})}handleObjectStructureNodeSelected(r){console.log(r),this._currentObjectId$.next(r.id)}handleObjectStructureNodeVisible(r){let d={id:r.id,visible:r.visible,opaque:r.opaque};this.visibleNodeSignal.set(d)}handleObjectStructureNodeOpaque(r){let d={id:r.id,visible:r.visible,opaque:r.opaque};this.opaqueNodeSignal.set(d)}handleComplexPropertyNodeSelected(r){console.log(r),this._currentPropertiesObjectId$.next(r.id)}_loadObjectStructure(r,d){if(this.api&&r)return Zp(this.api.objects.getTopology(r,d,!1,!1,void 0))}_createObjectStructure(r,d){this._loadObjectStructure(r,d)?.subscribe({next:m=>{m&&(this._objectStructure=WH.createFromResponse(m))}})}_loadObjectComplexPropertiesStructure(r,d){if(this.api&&r)return Zp(this.api.objects.getComplexPropertiesTopology(r,d))}_createComplexPropertiestructure(r,d){this._loadObjectComplexPropertiesStructure(r,d)?.subscribe({next:m=>{if(m){let O=UH.createFromResponse(m);O?.children?.length?this._complexProperties=O:this._complexProperties=null}}})}_loadObjectProperties(r,d){if(this.api&&r)return Zp(this.api.objects.get(r,d,"8",void 0,!1,void 0))}_createObjectProperties(r,d){this._loadObjectProperties(r,d)?.subscribe({next:m=>{this.objectPropertiesService.setModel(m),this.objectAttributeGroups.set(this._createAttributeGroupsFromResponse(m))},error:()=>{this.objectAttributeGroups.set([])}})}_tooltip(r){let d=this.translateService.instant("_Name"),m=r.name?r.name:"",O=this.translateService.instant("description"),C=r.description,G=this.translateService.instant("_UUID"),x=r.id;return C==null||C===""?`${d}: ${m}
12749
12749
  ${G}: ${x}`:`${d}: ${m}
12750
12750
  ${O}: ${C}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimplus-webcomponents",
3
- "version": "0.0.159-28783-1",
3
+ "version": "0.0.159-28783-2",
4
4
  "license": "MIT",
5
5
  "author": "",
6
6
  "description": "bim+ webcomponents library",