diff --git a/assets/index-943db166.js b/assets/index-e7af8e1a.js similarity index 97% rename from assets/index-943db166.js rename to assets/index-e7af8e1a.js index 4c0ed2e..45c7ab5 100644 --- a/assets/index-943db166.js +++ b/assets/index-e7af8e1a.js @@ -14,7 +14,7 @@ function bI(n,e){for(var t=0;t #include #include -}`,gt={alphamap_fragment:Hk,alphamap_pars_fragment:Vk,alphatest_fragment:Wk,alphatest_pars_fragment:jk,aomap_fragment:Jk,aomap_pars_fragment:Xk,begin_vertex:Yk,beginnormal_vertex:Kk,bsdfs:Qk,iridescence_fragment:Zk,bumpmap_pars_fragment:qk,clipping_planes_fragment:$k,clipping_planes_pars_fragment:eO,clipping_planes_pars_vertex:tO,clipping_planes_vertex:nO,color_fragment:iO,color_pars_fragment:rO,color_pars_vertex:sO,color_vertex:oO,common:aO,cube_uv_reflection_fragment:lO,defaultnormal_vertex:cO,displacementmap_pars_vertex:uO,displacementmap_vertex:fO,emissivemap_fragment:hO,emissivemap_pars_fragment:dO,encodings_fragment:pO,encodings_pars_fragment:mO,envmap_fragment:gO,envmap_common_pars_fragment:yO,envmap_pars_fragment:vO,envmap_pars_vertex:xO,envmap_physical_pars_fragment:RO,envmap_vertex:AO,fog_vertex:_O,fog_pars_vertex:wO,fog_fragment:MO,fog_pars_fragment:SO,gradientmap_pars_fragment:CO,lightmap_fragment:EO,lightmap_pars_fragment:bO,lights_lambert_fragment:TO,lights_lambert_pars_fragment:PO,lights_pars_begin:BO,lights_toon_fragment:LO,lights_toon_pars_fragment:IO,lights_phong_fragment:DO,lights_phong_pars_fragment:FO,lights_physical_fragment:NO,lights_physical_pars_fragment:kO,lights_fragment_begin:OO,lights_fragment_maps:UO,lights_fragment_end:zO,logdepthbuf_fragment:GO,logdepthbuf_pars_fragment:HO,logdepthbuf_pars_vertex:VO,logdepthbuf_vertex:WO,map_fragment:jO,map_pars_fragment:JO,map_particle_fragment:XO,map_particle_pars_fragment:YO,metalnessmap_fragment:KO,metalnessmap_pars_fragment:QO,morphcolor_vertex:ZO,morphnormal_vertex:qO,morphtarget_pars_vertex:$O,morphtarget_vertex:eU,normal_fragment_begin:tU,normal_fragment_maps:nU,normal_pars_fragment:iU,normal_pars_vertex:rU,normal_vertex:sU,normalmap_pars_fragment:oU,clearcoat_normal_fragment_begin:aU,clearcoat_normal_fragment_maps:lU,clearcoat_pars_fragment:cU,iridescence_pars_fragment:uU,output_fragment:fU,packing:hU,premultiplied_alpha_fragment:dU,project_vertex:pU,dithering_fragment:mU,dithering_pars_fragment:gU,roughnessmap_fragment:yU,roughnessmap_pars_fragment:vU,shadowmap_pars_fragment:xU,shadowmap_pars_vertex:AU,shadowmap_vertex:_U,shadowmask_pars_fragment:wU,skinbase_vertex:MU,skinning_pars_vertex:SU,skinning_vertex:CU,skinnormal_vertex:EU,specularmap_fragment:bU,specularmap_pars_fragment:TU,tonemapping_fragment:PU,tonemapping_pars_fragment:BU,transmission_fragment:RU,transmission_pars_fragment:LU,uv_pars_fragment:IU,uv_pars_vertex:DU,uv_vertex:FU,uv2_pars_fragment:NU,uv2_pars_vertex:kU,uv2_vertex:OU,worldpos_vertex:UU,background_vert:zU,background_frag:GU,backgroundCube_vert:HU,backgroundCube_frag:VU,cube_vert:WU,cube_frag:jU,depth_vert:JU,depth_frag:XU,distanceRGBA_vert:YU,distanceRGBA_frag:KU,equirect_vert:QU,equirect_frag:ZU,linedashed_vert:qU,linedashed_frag:$U,meshbasic_vert:ez,meshbasic_frag:tz,meshlambert_vert:nz,meshlambert_frag:iz,meshmatcap_vert:rz,meshmatcap_frag:sz,meshnormal_vert:oz,meshnormal_frag:az,meshphong_vert:lz,meshphong_frag:cz,meshphysical_vert:uz,meshphysical_frag:fz,meshtoon_vert:hz,meshtoon_frag:dz,points_vert:pz,points_frag:mz,shadow_vert:gz,shadow_frag:yz,sprite_vert:vz,sprite_frag:xz},Pe={common:{diffuse:{value:new Ie(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new hi},uv2Transform:{value:new hi},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new pe(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ie(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ie(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new hi}},sprite:{diffuse:{value:new Ie(16777215)},opacity:{value:1},center:{value:new pe(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new hi}}},Lr={basic:{uniforms:ci([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.fog]),vertexShader:gt.meshbasic_vert,fragmentShader:gt.meshbasic_frag},lambert:{uniforms:ci([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,Pe.lights,{emissive:{value:new Ie(0)}}]),vertexShader:gt.meshlambert_vert,fragmentShader:gt.meshlambert_frag},phong:{uniforms:ci([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,Pe.lights,{emissive:{value:new Ie(0)},specular:{value:new Ie(1118481)},shininess:{value:30}}]),vertexShader:gt.meshphong_vert,fragmentShader:gt.meshphong_frag},standard:{uniforms:ci([Pe.common,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.roughnessmap,Pe.metalnessmap,Pe.fog,Pe.lights,{emissive:{value:new Ie(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:gt.meshphysical_vert,fragmentShader:gt.meshphysical_frag},toon:{uniforms:ci([Pe.common,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.gradientmap,Pe.fog,Pe.lights,{emissive:{value:new Ie(0)}}]),vertexShader:gt.meshtoon_vert,fragmentShader:gt.meshtoon_frag},matcap:{uniforms:ci([Pe.common,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,{matcap:{value:null}}]),vertexShader:gt.meshmatcap_vert,fragmentShader:gt.meshmatcap_frag},points:{uniforms:ci([Pe.points,Pe.fog]),vertexShader:gt.points_vert,fragmentShader:gt.points_frag},dashed:{uniforms:ci([Pe.common,Pe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:gt.linedashed_vert,fragmentShader:gt.linedashed_frag},depth:{uniforms:ci([Pe.common,Pe.displacementmap]),vertexShader:gt.depth_vert,fragmentShader:gt.depth_frag},normal:{uniforms:ci([Pe.common,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,{opacity:{value:1}}]),vertexShader:gt.meshnormal_vert,fragmentShader:gt.meshnormal_frag},sprite:{uniforms:ci([Pe.sprite,Pe.fog]),vertexShader:gt.sprite_vert,fragmentShader:gt.sprite_frag},background:{uniforms:{uvTransform:{value:new hi},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:gt.background_vert,fragmentShader:gt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:gt.backgroundCube_vert,fragmentShader:gt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:gt.cube_vert,fragmentShader:gt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:gt.equirect_vert,fragmentShader:gt.equirect_frag},distanceRGBA:{uniforms:ci([Pe.common,Pe.displacementmap,{referencePosition:{value:new D},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:gt.distanceRGBA_vert,fragmentShader:gt.distanceRGBA_frag},shadow:{uniforms:ci([Pe.lights,Pe.fog,{color:{value:new Ie(0)},opacity:{value:1}}]),vertexShader:gt.shadow_vert,fragmentShader:gt.shadow_frag}};Lr.physical={uniforms:ci([Lr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new pe(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Ie(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new pe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Ie(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Ie(1,1,1)},specularColorMap:{value:null}}]),vertexShader:gt.meshphysical_vert,fragmentShader:gt.meshphysical_frag};const pp={r:0,b:0,g:0};function Az(n,e,t,i,r,s,o){const a=new Ie(0);let l=s===!0?0:1,u,h,d=null,p=0,m=null;function v(x,A){let _=!1,w=A.isScene===!0?A.background:null;w&&w.isTexture&&(w=(A.backgroundBlurriness>0?t:e).get(w));const S=n.xr,E=S.getSession&&S.getSession();E&&E.environmentBlendMode==="additive"&&(w=null),w===null?y(a,l):w&&w.isColor&&(y(w,1),_=!0),(n.autoClear||_)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),w&&(w.isCubeTexture||w.mapping===Xc)?(h===void 0&&(h=new Pn(new Ko(1,1,1),new ls({name:"BackgroundCubeMaterial",uniforms:Fc(Lr.backgroundCube.uniforms),vertexShader:Lr.backgroundCube.vertexShader,fragmentShader:Lr.backgroundCube.fragmentShader,side:Ti,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,R,b){this.matrixWorld.copyPosition(b.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),h.material.uniforms.envMap.value=w,h.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,h.material.toneMapped=w.encoding!==Vt,(d!==w||p!==w.version||m!==n.toneMapping)&&(h.material.needsUpdate=!0,d=w,p=w.version,m=n.toneMapping),h.layers.enableAll(),x.unshift(h,h.geometry,h.material,0,0,null)):w&&w.isTexture&&(u===void 0&&(u=new Pn(new Kc(2,2),new ls({name:"BackgroundMaterial",uniforms:Fc(Lr.background.uniforms),vertexShader:Lr.background.vertexShader,fragmentShader:Lr.background.fragmentShader,side:os,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=w,u.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,u.material.toneMapped=w.encoding!==Vt,w.matrixAutoUpdate===!0&&w.updateMatrix(),u.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||p!==w.version||m!==n.toneMapping)&&(u.material.needsUpdate=!0,d=w,p=w.version,m=n.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null))}function y(x,A){x.getRGB(pp,kB(n)),i.buffers.color.setClear(pp.r,pp.g,pp.b,A,o)}return{getClearColor:function(){return a},setClearColor:function(x,A=1){a.set(x),l=A,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,y(a,l)},render:v}}function _z(n,e,t,i){const r=n.getParameter(34921),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},l=x(null);let u=l,h=!1;function d(H,K,ie,ce,N){let J=!1;if(o){const Y=y(ce,ie,K);u!==Y&&(u=Y,m(u.object)),J=A(H,ce,ie,N),J&&_(H,ce,ie,N)}else{const Y=K.wireframe===!0;(u.geometry!==ce.id||u.program!==ie.id||u.wireframe!==Y)&&(u.geometry=ce.id,u.program=ie.id,u.wireframe=Y,J=!0)}N!==null&&t.update(N,34963),(J||h)&&(h=!1,b(H,K,ie,ce),N!==null&&n.bindBuffer(34963,t.get(N).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function m(H){return i.isWebGL2?n.bindVertexArray(H):s.bindVertexArrayOES(H)}function v(H){return i.isWebGL2?n.deleteVertexArray(H):s.deleteVertexArrayOES(H)}function y(H,K,ie){const ce=ie.wireframe===!0;let N=a[H.id];N===void 0&&(N={},a[H.id]=N);let J=N[K.id];J===void 0&&(J={},N[K.id]=J);let Y=J[ce];return Y===void 0&&(Y=x(p()),J[ce]=Y),Y}function x(H){const K=[],ie=[],ce=[];for(let N=0;N=0){const ve=N[W];let ye=J[W];if(ye===void 0&&(W==="instanceMatrix"&&H.instanceMatrix&&(ye=H.instanceMatrix),W==="instanceColor"&&H.instanceColor&&(ye=H.instanceColor)),ve===void 0||ve.attribute!==ye||ye&&ve.data!==ye.data)return!0;Y++}return u.attributesNum!==Y||u.index!==ce}function _(H,K,ie,ce){const N={},J=K.attributes;let Y=0;const le=ie.getAttributes();for(const W in le)if(le[W].location>=0){let ve=J[W];ve===void 0&&(W==="instanceMatrix"&&H.instanceMatrix&&(ve=H.instanceMatrix),W==="instanceColor"&&H.instanceColor&&(ve=H.instanceColor));const ye={};ye.attribute=ve,ve&&ve.data&&(ye.data=ve.data),N[W]=ye,Y++}u.attributes=N,u.attributesNum=Y,u.index=ce}function w(){const H=u.newAttributes;for(let K=0,ie=H.length;K=0){let ee=N[le];if(ee===void 0&&(le==="instanceMatrix"&&H.instanceMatrix&&(ee=H.instanceMatrix),le==="instanceColor"&&H.instanceColor&&(ee=H.instanceColor)),ee!==void 0){const ve=ee.normalized,ye=ee.itemSize,q=t.get(ee);if(q===void 0)continue;const Fe=q.buffer,ke=q.type,He=q.bytesPerElement;if(ee.isInterleavedBufferAttribute){const _e=ee.data,Be=_e.stride,he=ee.offset;if(_e.isInstancedInterleavedBuffer){for(let oe=0;oe0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";R="mediump"}return R==="mediump"&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n instanceof WebGL2RenderingContext;let a=t.precision!==void 0?t.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const u=o||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,d=n.getParameter(34930),p=n.getParameter(35660),m=n.getParameter(3379),v=n.getParameter(34076),y=n.getParameter(34921),x=n.getParameter(36347),A=n.getParameter(36348),_=n.getParameter(36349),w=p>0,S=o||e.has("OES_texture_float"),E=w&&S,P=o?n.getParameter(36183):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:m,maxCubemapSize:v,maxAttributes:y,maxVertexUniforms:x,maxVaryings:A,maxFragmentUniforms:_,vertexTextures:w,floatFragmentTextures:S,floatVertexTextures:E,maxSamples:P}}function Sz(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Ps,a=new hi,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const m=d.length!==0||p||i!==0||r;return r=p,i=d.length,m},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=h(d,p,0)},this.setState=function(d,p,m){const v=d.clippingPlanes,y=d.clipIntersection,x=d.clipShadows,A=n.get(d);if(!r||v===null||v.length===0||s&&!x)s?h(null):u();else{const _=s?0:i,w=_*4;let S=A.clippingState||null;l.value=S,S=h(v,p,w,m);for(let E=0;E!==w;++E)S[E]=t[E];A.clippingState=S,this.numIntersection=y?this.numPlanes:0,this.numPlanes+=_}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,m,v){const y=d!==null?d.length:0;let x=null;if(y!==0){if(x=l.value,v!==!0||x===null){const A=m+y*4,_=p.matrixWorldInverse;a.getNormalMatrix(_),(x===null||x.length0){const u=new t_(l.height/2);return u.fromEquirectangularTexture(n,o),e.set(o,u),o.addEventListener("dispose",r),t(u.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class pr extends hh{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){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=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=u*this.view.offsetX,o=s+u*this.view.width,a-=h*this.view.offsetY,l=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const ac=4,AC=[.125,.215,.35,.446,.526,.582],Ta=20,Yy=new pr,_C=new Ie;let Ky=null;const Sa=(1+Math.sqrt(5))/2,zl=1/Sa,wC=[new D(1,1,1),new D(-1,1,1),new D(1,1,-1),new D(-1,1,-1),new D(0,Sa,zl),new D(0,Sa,-zl),new D(zl,0,Sa),new D(-zl,0,Sa),new D(Sa,zl,0),new D(-Sa,zl,0)];class lA{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){Ky=this._renderer.getRenderTarget(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=CC(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=SC(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?w:0,w,w),h.setRenderTarget(r),y&&h.render(v,a),h.render(e,a)}v.geometry.dispose(),v.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=x}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Fo||e.mapping===No;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=CC()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=SC());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Pn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;mp(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,Yy)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;rTa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${Ta}`);const A=[];let _=0;for(let R=0;Rw-ac?r-w+ac:0),P=4*(this._cubeSize-S);mp(t,E,P,3*S,2*S),l.setRenderTarget(t),l.render(d,Yy)}}function Ez(n){const e=[],t=[],i=[];let r=n;const s=n-ac+1+AC.length;for(let o=0;on-ac?l=AC[o-n+ac-1]:o===0&&(l=0),i.push(l);const u=1/(a-2),h=-u,d=1+u,p=[h,h,d,h,d,d,h,h,d,d,h,d],m=6,v=6,y=3,x=2,A=1,_=new Float32Array(y*v*m),w=new Float32Array(x*v*m),S=new Float32Array(A*v*m);for(let P=0;P2?0:-1,B=[R,b,0,R+2/3,b,0,R+2/3,b+1,0,R,b,0,R+2/3,b+1,0,R,b+1,0];_.set(B,y*v*P),w.set(p,x*v*P);const L=[P,P,P,P,P,P];S.set(L,A*v*P)}const E=new ft;E.setAttribute("position",new Ft(_,y)),E.setAttribute("uv",new Ft(w,x)),E.setAttribute("faceIndex",new Ft(S,A)),e.push(E),r>ac&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function MC(n,e,t){const i=new Ur(n,e,t);return i.texture.mapping=Xc,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function mp(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function bz(n,e,t){const i=new Float32Array(Ta),r=new D(0,1,0);return new ls({name:"SphericalGaussianBlur",defines:{n:Ta,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:n_(),fragmentShader:` +}`,gt={alphamap_fragment:Hk,alphamap_pars_fragment:Vk,alphatest_fragment:Wk,alphatest_pars_fragment:jk,aomap_fragment:Jk,aomap_pars_fragment:Xk,begin_vertex:Yk,beginnormal_vertex:Kk,bsdfs:Qk,iridescence_fragment:Zk,bumpmap_pars_fragment:qk,clipping_planes_fragment:$k,clipping_planes_pars_fragment:eO,clipping_planes_pars_vertex:tO,clipping_planes_vertex:nO,color_fragment:iO,color_pars_fragment:rO,color_pars_vertex:sO,color_vertex:oO,common:aO,cube_uv_reflection_fragment:lO,defaultnormal_vertex:cO,displacementmap_pars_vertex:uO,displacementmap_vertex:fO,emissivemap_fragment:hO,emissivemap_pars_fragment:dO,encodings_fragment:pO,encodings_pars_fragment:mO,envmap_fragment:gO,envmap_common_pars_fragment:yO,envmap_pars_fragment:vO,envmap_pars_vertex:xO,envmap_physical_pars_fragment:RO,envmap_vertex:AO,fog_vertex:_O,fog_pars_vertex:wO,fog_fragment:MO,fog_pars_fragment:SO,gradientmap_pars_fragment:CO,lightmap_fragment:EO,lightmap_pars_fragment:bO,lights_lambert_fragment:TO,lights_lambert_pars_fragment:PO,lights_pars_begin:BO,lights_toon_fragment:LO,lights_toon_pars_fragment:IO,lights_phong_fragment:DO,lights_phong_pars_fragment:FO,lights_physical_fragment:NO,lights_physical_pars_fragment:kO,lights_fragment_begin:OO,lights_fragment_maps:UO,lights_fragment_end:zO,logdepthbuf_fragment:GO,logdepthbuf_pars_fragment:HO,logdepthbuf_pars_vertex:VO,logdepthbuf_vertex:WO,map_fragment:jO,map_pars_fragment:JO,map_particle_fragment:XO,map_particle_pars_fragment:YO,metalnessmap_fragment:KO,metalnessmap_pars_fragment:QO,morphcolor_vertex:ZO,morphnormal_vertex:qO,morphtarget_pars_vertex:$O,morphtarget_vertex:eU,normal_fragment_begin:tU,normal_fragment_maps:nU,normal_pars_fragment:iU,normal_pars_vertex:rU,normal_vertex:sU,normalmap_pars_fragment:oU,clearcoat_normal_fragment_begin:aU,clearcoat_normal_fragment_maps:lU,clearcoat_pars_fragment:cU,iridescence_pars_fragment:uU,output_fragment:fU,packing:hU,premultiplied_alpha_fragment:dU,project_vertex:pU,dithering_fragment:mU,dithering_pars_fragment:gU,roughnessmap_fragment:yU,roughnessmap_pars_fragment:vU,shadowmap_pars_fragment:xU,shadowmap_pars_vertex:AU,shadowmap_vertex:_U,shadowmask_pars_fragment:wU,skinbase_vertex:MU,skinning_pars_vertex:SU,skinning_vertex:CU,skinnormal_vertex:EU,specularmap_fragment:bU,specularmap_pars_fragment:TU,tonemapping_fragment:PU,tonemapping_pars_fragment:BU,transmission_fragment:RU,transmission_pars_fragment:LU,uv_pars_fragment:IU,uv_pars_vertex:DU,uv_vertex:FU,uv2_pars_fragment:NU,uv2_pars_vertex:kU,uv2_vertex:OU,worldpos_vertex:UU,background_vert:zU,background_frag:GU,backgroundCube_vert:HU,backgroundCube_frag:VU,cube_vert:WU,cube_frag:jU,depth_vert:JU,depth_frag:XU,distanceRGBA_vert:YU,distanceRGBA_frag:KU,equirect_vert:QU,equirect_frag:ZU,linedashed_vert:qU,linedashed_frag:$U,meshbasic_vert:ez,meshbasic_frag:tz,meshlambert_vert:nz,meshlambert_frag:iz,meshmatcap_vert:rz,meshmatcap_frag:sz,meshnormal_vert:oz,meshnormal_frag:az,meshphong_vert:lz,meshphong_frag:cz,meshphysical_vert:uz,meshphysical_frag:fz,meshtoon_vert:hz,meshtoon_frag:dz,points_vert:pz,points_frag:mz,shadow_vert:gz,shadow_frag:yz,sprite_vert:vz,sprite_frag:xz},Pe={common:{diffuse:{value:new Ie(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new hi},uv2Transform:{value:new hi},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new pe(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ie(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ie(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new hi}},sprite:{diffuse:{value:new Ie(16777215)},opacity:{value:1},center:{value:new pe(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new hi}}},Lr={basic:{uniforms:ci([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.fog]),vertexShader:gt.meshbasic_vert,fragmentShader:gt.meshbasic_frag},lambert:{uniforms:ci([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,Pe.lights,{emissive:{value:new Ie(0)}}]),vertexShader:gt.meshlambert_vert,fragmentShader:gt.meshlambert_frag},phong:{uniforms:ci([Pe.common,Pe.specularmap,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,Pe.lights,{emissive:{value:new Ie(0)},specular:{value:new Ie(1118481)},shininess:{value:30}}]),vertexShader:gt.meshphong_vert,fragmentShader:gt.meshphong_frag},standard:{uniforms:ci([Pe.common,Pe.envmap,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.roughnessmap,Pe.metalnessmap,Pe.fog,Pe.lights,{emissive:{value:new Ie(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:gt.meshphysical_vert,fragmentShader:gt.meshphysical_frag},toon:{uniforms:ci([Pe.common,Pe.aomap,Pe.lightmap,Pe.emissivemap,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.gradientmap,Pe.fog,Pe.lights,{emissive:{value:new Ie(0)}}]),vertexShader:gt.meshtoon_vert,fragmentShader:gt.meshtoon_frag},matcap:{uniforms:ci([Pe.common,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,Pe.fog,{matcap:{value:null}}]),vertexShader:gt.meshmatcap_vert,fragmentShader:gt.meshmatcap_frag},points:{uniforms:ci([Pe.points,Pe.fog]),vertexShader:gt.points_vert,fragmentShader:gt.points_frag},dashed:{uniforms:ci([Pe.common,Pe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:gt.linedashed_vert,fragmentShader:gt.linedashed_frag},depth:{uniforms:ci([Pe.common,Pe.displacementmap]),vertexShader:gt.depth_vert,fragmentShader:gt.depth_frag},normal:{uniforms:ci([Pe.common,Pe.bumpmap,Pe.normalmap,Pe.displacementmap,{opacity:{value:1}}]),vertexShader:gt.meshnormal_vert,fragmentShader:gt.meshnormal_frag},sprite:{uniforms:ci([Pe.sprite,Pe.fog]),vertexShader:gt.sprite_vert,fragmentShader:gt.sprite_frag},background:{uniforms:{uvTransform:{value:new hi},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:gt.background_vert,fragmentShader:gt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:gt.backgroundCube_vert,fragmentShader:gt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:gt.cube_vert,fragmentShader:gt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:gt.equirect_vert,fragmentShader:gt.equirect_frag},distanceRGBA:{uniforms:ci([Pe.common,Pe.displacementmap,{referencePosition:{value:new D},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:gt.distanceRGBA_vert,fragmentShader:gt.distanceRGBA_frag},shadow:{uniforms:ci([Pe.lights,Pe.fog,{color:{value:new Ie(0)},opacity:{value:1}}]),vertexShader:gt.shadow_vert,fragmentShader:gt.shadow_frag}};Lr.physical={uniforms:ci([Lr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new pe(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Ie(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new pe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Ie(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Ie(1,1,1)},specularColorMap:{value:null}}]),vertexShader:gt.meshphysical_vert,fragmentShader:gt.meshphysical_frag};const pp={r:0,b:0,g:0};function Az(n,e,t,i,r,s,o){const a=new Ie(0);let l=s===!0?0:1,u,h,d=null,p=0,m=null;function v(x,A){let _=!1,w=A.isScene===!0?A.background:null;w&&w.isTexture&&(w=(A.backgroundBlurriness>0?t:e).get(w));const S=n.xr,E=S.getSession&&S.getSession();E&&E.environmentBlendMode==="additive"&&(w=null),w===null?y(a,l):w&&w.isColor&&(y(w,1),_=!0),(n.autoClear||_)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),w&&(w.isCubeTexture||w.mapping===Xc)?(h===void 0&&(h=new Pn(new Ko(1,1,1),new ls({name:"BackgroundCubeMaterial",uniforms:Fc(Lr.backgroundCube.uniforms),vertexShader:Lr.backgroundCube.vertexShader,fragmentShader:Lr.backgroundCube.fragmentShader,side:Ti,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,R,b){this.matrixWorld.copyPosition(b.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),h.material.uniforms.envMap.value=w,h.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,h.material.toneMapped=w.encoding!==Vt,(d!==w||p!==w.version||m!==n.toneMapping)&&(h.material.needsUpdate=!0,d=w,p=w.version,m=n.toneMapping),h.layers.enableAll(),x.unshift(h,h.geometry,h.material,0,0,null)):w&&w.isTexture&&(u===void 0&&(u=new Pn(new Kc(2,2),new ls({name:"BackgroundMaterial",uniforms:Fc(Lr.background.uniforms),vertexShader:Lr.background.vertexShader,fragmentShader:Lr.background.fragmentShader,side:os,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=w,u.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,u.material.toneMapped=w.encoding!==Vt,w.matrixAutoUpdate===!0&&w.updateMatrix(),u.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||p!==w.version||m!==n.toneMapping)&&(u.material.needsUpdate=!0,d=w,p=w.version,m=n.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null))}function y(x,A){x.getRGB(pp,kB(n)),i.buffers.color.setClear(pp.r,pp.g,pp.b,A,o)}return{getClearColor:function(){return a},setClearColor:function(x,A=1){a.set(x),l=A,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,y(a,l)},render:v}}function _z(n,e,t,i){const r=n.getParameter(34921),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},l=x(null);let u=l,h=!1;function d(H,K,ie,ce,N){let J=!1;if(o){const Y=y(ce,ie,K);u!==Y&&(u=Y,m(u.object)),J=A(H,ce,ie,N),J&&_(H,ce,ie,N)}else{const Y=K.wireframe===!0;(u.geometry!==ce.id||u.program!==ie.id||u.wireframe!==Y)&&(u.geometry=ce.id,u.program=ie.id,u.wireframe=Y,J=!0)}N!==null&&t.update(N,34963),(J||h)&&(h=!1,b(H,K,ie,ce),N!==null&&n.bindBuffer(34963,t.get(N).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function m(H){return i.isWebGL2?n.bindVertexArray(H):s.bindVertexArrayOES(H)}function v(H){return i.isWebGL2?n.deleteVertexArray(H):s.deleteVertexArrayOES(H)}function y(H,K,ie){const ce=ie.wireframe===!0;let N=a[H.id];N===void 0&&(N={},a[H.id]=N);let J=N[K.id];J===void 0&&(J={},N[K.id]=J);let Y=J[ce];return Y===void 0&&(Y=x(p()),J[ce]=Y),Y}function x(H){const K=[],ie=[],ce=[];for(let N=0;N=0){const ve=N[W];let ye=J[W];if(ye===void 0&&(W==="instanceMatrix"&&H.instanceMatrix&&(ye=H.instanceMatrix),W==="instanceColor"&&H.instanceColor&&(ye=H.instanceColor)),ve===void 0||ve.attribute!==ye||ye&&ve.data!==ye.data)return!0;Y++}return u.attributesNum!==Y||u.index!==ce}function _(H,K,ie,ce){const N={},J=K.attributes;let Y=0;const le=ie.getAttributes();for(const W in le)if(le[W].location>=0){let ve=J[W];ve===void 0&&(W==="instanceMatrix"&&H.instanceMatrix&&(ve=H.instanceMatrix),W==="instanceColor"&&H.instanceColor&&(ve=H.instanceColor));const ye={};ye.attribute=ve,ve&&ve.data&&(ye.data=ve.data),N[W]=ye,Y++}u.attributes=N,u.attributesNum=Y,u.index=ce}function w(){const H=u.newAttributes;for(let K=0,ie=H.length;K=0){let ee=N[le];if(ee===void 0&&(le==="instanceMatrix"&&H.instanceMatrix&&(ee=H.instanceMatrix),le==="instanceColor"&&H.instanceColor&&(ee=H.instanceColor)),ee!==void 0){const ve=ee.normalized,ye=ee.itemSize,q=t.get(ee);if(q===void 0)continue;const Fe=q.buffer,ke=q.type,He=q.bytesPerElement;if(ee.isInterleavedBufferAttribute){const _e=ee.data,Be=_e.stride,fe=ee.offset;if(_e.isInstancedInterleavedBuffer){for(let oe=0;oe0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";R="mediump"}return R==="mediump"&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n instanceof WebGL2RenderingContext;let a=t.precision!==void 0?t.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const u=o||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,d=n.getParameter(34930),p=n.getParameter(35660),m=n.getParameter(3379),v=n.getParameter(34076),y=n.getParameter(34921),x=n.getParameter(36347),A=n.getParameter(36348),_=n.getParameter(36349),w=p>0,S=o||e.has("OES_texture_float"),E=w&&S,P=o?n.getParameter(36183):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:m,maxCubemapSize:v,maxAttributes:y,maxVertexUniforms:x,maxVaryings:A,maxFragmentUniforms:_,vertexTextures:w,floatFragmentTextures:S,floatVertexTextures:E,maxSamples:P}}function Sz(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Ps,a=new hi,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const m=d.length!==0||p||i!==0||r;return r=p,i=d.length,m},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=h(d,p,0)},this.setState=function(d,p,m){const v=d.clippingPlanes,y=d.clipIntersection,x=d.clipShadows,A=n.get(d);if(!r||v===null||v.length===0||s&&!x)s?h(null):u();else{const _=s?0:i,w=_*4;let S=A.clippingState||null;l.value=S,S=h(v,p,w,m);for(let E=0;E!==w;++E)S[E]=t[E];A.clippingState=S,this.numIntersection=y?this.numPlanes:0,this.numPlanes+=_}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,m,v){const y=d!==null?d.length:0;let x=null;if(y!==0){if(x=l.value,v!==!0||x===null){const A=m+y*4,_=p.matrixWorldInverse;a.getNormalMatrix(_),(x===null||x.length0){const u=new t_(l.height/2);return u.fromEquirectangularTexture(n,o),e.set(o,u),o.addEventListener("dispose",r),t(u.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class pr extends hh{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){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=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=u*this.view.offsetX,o=s+u*this.view.width,a-=h*this.view.offsetY,l=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const ac=4,AC=[.125,.215,.35,.446,.526,.582],Ta=20,Yy=new pr,_C=new Ie;let Ky=null;const Sa=(1+Math.sqrt(5))/2,zl=1/Sa,wC=[new D(1,1,1),new D(-1,1,1),new D(1,1,-1),new D(-1,1,-1),new D(0,Sa,zl),new D(0,Sa,-zl),new D(zl,0,Sa),new D(-zl,0,Sa),new D(Sa,zl,0),new D(-Sa,zl,0)];class lA{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){Ky=this._renderer.getRenderTarget(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=CC(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=SC(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?w:0,w,w),h.setRenderTarget(r),y&&h.render(v,a),h.render(e,a)}v.geometry.dispose(),v.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=x}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Fo||e.mapping===No;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=CC()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=SC());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Pn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;mp(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,Yy)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;rTa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${Ta}`);const A=[];let _=0;for(let R=0;Rw-ac?r-w+ac:0),P=4*(this._cubeSize-S);mp(t,E,P,3*S,2*S),l.setRenderTarget(t),l.render(d,Yy)}}function Ez(n){const e=[],t=[],i=[];let r=n;const s=n-ac+1+AC.length;for(let o=0;on-ac?l=AC[o-n+ac-1]:o===0&&(l=0),i.push(l);const u=1/(a-2),h=-u,d=1+u,p=[h,h,d,h,d,d,h,h,d,d,h,d],m=6,v=6,y=3,x=2,A=1,_=new Float32Array(y*v*m),w=new Float32Array(x*v*m),S=new Float32Array(A*v*m);for(let P=0;P2?0:-1,B=[R,b,0,R+2/3,b,0,R+2/3,b+1,0,R,b,0,R+2/3,b+1,0,R,b+1,0];_.set(B,y*v*P),w.set(p,x*v*P);const L=[P,P,P,P,P,P];S.set(L,A*v*P)}const E=new ft;E.setAttribute("position",new Ft(_,y)),E.setAttribute("uv",new Ft(w,x)),E.setAttribute("faceIndex",new Ft(S,A)),e.push(E),r>ac&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function MC(n,e,t){const i=new Ur(n,e,t);return i.texture.mapping=Xc,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function mp(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function bz(n,e,t){const i=new Float32Array(Ta),r=new D(0,1,0);return new ls({name:"SphericalGaussianBlur",defines:{n:Ta,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:n_(),fragmentShader:` precision mediump float; precision mediump int; @@ -3205,7 +3205,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function oG(n,e,t){let i=new Tg;const r=new pe,s=new pe,o=new Ot,a=new i_({depthPacking:RB}),l=new r_,u={},h=t.maxTextureSize,d={[os]:Ti,[Ti]:os,[Ir]:Ir},p=new ls({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new pe},radius:{value:4}},vertexShader:rG,fragmentShader:sG}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const v=new ft;v.setAttribute("position",new Ft(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new Pn(v,p),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Mg,this.render=function(S,E,P){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||S.length===0)return;const R=n.getRenderTarget(),b=n.getActiveCubeFace(),B=n.getActiveMipmapLevel(),L=n.state;L.setBlending(Os),L.buffers.color.setClear(1,1,1,1),L.buffers.depth.setTest(!0),L.setScissorTest(!1);for(let U=0,Z=S.length;Uh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/K.x),r.x=s.x*K.x,H.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/K.y),r.y=s.y*K.y,H.mapSize.y=s.y)),H.map===null){const ce=this.type!==Ia?{minFilter:dn,magFilter:dn}:{};H.map=new Ur(r.x,r.y,ce),H.map.texture.name=V.name+".shadowMap",H.camera.updateProjectionMatrix()}n.setRenderTarget(H.map),n.clear();const ie=H.getViewportCount();for(let ce=0;ce0||E.map&&E.alphaTest>0){const Z=L.uuid,V=E.uuid;let H=u[Z];H===void 0&&(H={},u[Z]=H);let K=H[V];K===void 0&&(K=L.clone(),H[V]=K),L=K}return L.visible=E.visible,L.wireframe=E.wireframe,B===Ia?L.side=E.shadowSide!==null?E.shadowSide:E.side:L.side=E.shadowSide!==null?E.shadowSide:d[E.side],L.alphaMap=E.alphaMap,L.alphaTest=E.alphaTest,L.map=E.map,L.clipShadows=E.clipShadows,L.clippingPlanes=E.clippingPlanes,L.clipIntersection=E.clipIntersection,L.displacementMap=E.displacementMap,L.displacementScale=E.displacementScale,L.displacementBias=E.displacementBias,L.wireframeLinewidth=E.wireframeLinewidth,L.linewidth=E.linewidth,P.isPointLight===!0&&L.isMeshDistanceMaterial===!0&&(L.referencePosition.setFromMatrixPosition(P.matrixWorld),L.nearDistance=R,L.farDistance=b),L}function w(S,E,P,R,b){if(S.visible===!1)return;if(S.layers.test(E.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&b===Ia)&&(!S.frustumCulled||i.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,S.matrixWorld);const U=e.update(S),Z=S.material;if(Array.isArray(Z)){const V=U.groups;for(let H=0,K=V.length;H=1):N.indexOf("OpenGL ES")!==-1&&(ce=parseFloat(/^OpenGL ES (\d)/.exec(N)[1]),ie=ce>=2);let J=null,Y={};const le=n.getParameter(3088),W=n.getParameter(2978),ee=new Ot().fromArray(le),ve=new Ot().fromArray(W);function ye(G,re,Ae){const Re=new Uint8Array(4),Xe=n.createTexture();n.bindTexture(G,Xe),n.texParameteri(G,10241,9728),n.texParameteri(G,10240,9728);for(let _t=0;_t"u"?!1:/OculusBrowser/g.test(navigator.userAgent),v=new WeakMap;let y;const x=new WeakMap;let A=!1;try{A=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(O,I){return A?new OffscreenCanvas(O,I):Xf("canvas")}function w(O,I,se,we){let Ce=1;if((O.width>we||O.height>we)&&(Ce=we/Math.max(O.width,O.height)),Ce<1||I===!0)if(typeof HTMLImageElement<"u"&&O instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&O instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&O instanceof ImageBitmap){const be=I?Wm:Math.floor,it=be(Ce*O.width),De=be(Ce*O.height);y===void 0&&(y=_(it,De));const ge=se?_(it,De):y;return ge.width=it,ge.height=De,ge.getContext("2d").drawImage(O,0,0,it,De),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+O.width+"x"+O.height+") to ("+it+"x"+De+")."),ge}else return"data"in O&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+O.width+"x"+O.height+")."),O;return O}function S(O){return aA(O.width)&&aA(O.height)}function E(O){return a?!1:O.wrapS!==Wn||O.wrapT!==Wn||O.minFilter!==dn&&O.minFilter!==nn}function P(O,I){return O.generateMipmaps&&I&&O.minFilter!==dn&&O.minFilter!==nn}function R(O){n.generateMipmap(O)}function b(O,I,se,we,Ce=!1){if(a===!1)return I;if(O!==null){if(n[O]!==void 0)return n[O];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+O+"'")}let be=I;return I===6403&&(se===5126&&(be=33326),se===5131&&(be=33325),se===5121&&(be=33321)),I===33319&&(se===5126&&(be=33328),se===5131&&(be=33327),se===5121&&(be=33323)),I===6408&&(se===5126&&(be=34836),se===5131&&(be=34842),se===5121&&(be=we===Vt&&Ce===!1?35907:32856),se===32819&&(be=32854),se===32820&&(be=32855)),(be===33325||be===33326||be===33327||be===33328||be===34842||be===34836)&&e.get("EXT_color_buffer_float"),be}function B(O,I,se){return P(O,se)===!0||O.isFramebufferTexture&&O.minFilter!==dn&&O.minFilter!==nn?Math.log2(Math.max(I.width,I.height))+1:O.mipmaps!==void 0&&O.mipmaps.length>0?O.mipmaps.length:O.isCompressedTexture&&Array.isArray(O.image)?I.mipmaps.length:1}function L(O){return O===dn||O===Vf||O===Ac?9728:9729}function U(O){const I=O.target;I.removeEventListener("dispose",U),V(I),I.isVideoTexture&&v.delete(I)}function Z(O){const I=O.target;I.removeEventListener("dispose",Z),K(I)}function V(O){const I=i.get(O);if(I.__webglInit===void 0)return;const se=O.source,we=x.get(se);if(we){const Ce=we[I.__cacheKey];Ce.usedTimes--,Ce.usedTimes===0&&H(O),Object.keys(we).length===0&&x.delete(se)}i.remove(O)}function H(O){const I=i.get(O);n.deleteTexture(I.__webglTexture);const se=O.source,we=x.get(se);delete we[I.__cacheKey],o.memory.textures--}function K(O){const I=O.texture,se=i.get(O),we=i.get(I);if(we.__webglTexture!==void 0&&(n.deleteTexture(we.__webglTexture),o.memory.textures--),O.depthTexture&&O.depthTexture.dispose(),O.isWebGLCubeRenderTarget)for(let Ce=0;Ce<6;Ce++)n.deleteFramebuffer(se.__webglFramebuffer[Ce]),se.__webglDepthbuffer&&n.deleteRenderbuffer(se.__webglDepthbuffer[Ce]);else{if(n.deleteFramebuffer(se.__webglFramebuffer),se.__webglDepthbuffer&&n.deleteRenderbuffer(se.__webglDepthbuffer),se.__webglMultisampledFramebuffer&&n.deleteFramebuffer(se.__webglMultisampledFramebuffer),se.__webglColorRenderbuffer)for(let Ce=0;Ce=l&&console.warn("THREE.WebGLTextures: Trying to use "+O+" texture units while this GPU supports only "+l),ie+=1,O}function J(O){const I=[];return I.push(O.wrapS),I.push(O.wrapT),I.push(O.wrapR||0),I.push(O.magFilter),I.push(O.minFilter),I.push(O.anisotropy),I.push(O.internalFormat),I.push(O.format),I.push(O.type),I.push(O.generateMipmaps),I.push(O.premultiplyAlpha),I.push(O.flipY),I.push(O.unpackAlignment),I.push(O.encoding),I.join()}function Y(O,I){const se=i.get(O);if(O.isVideoTexture&&xt(O),O.isRenderTargetTexture===!1&&O.version>0&&se.__version!==O.version){const we=O.image;if(we===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(we.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ke(se,O,I);return}}t.bindTexture(3553,se.__webglTexture,33984+I)}function le(O,I){const se=i.get(O);if(O.version>0&&se.__version!==O.version){ke(se,O,I);return}t.bindTexture(35866,se.__webglTexture,33984+I)}function W(O,I){const se=i.get(O);if(O.version>0&&se.__version!==O.version){ke(se,O,I);return}t.bindTexture(32879,se.__webglTexture,33984+I)}function ee(O,I){const se=i.get(O);if(O.version>0&&se.__version!==O.version){He(se,O,I);return}t.bindTexture(34067,se.__webglTexture,33984+I)}const ve={[ko]:10497,[Wn]:33071,[Rc]:33648},ye={[dn]:9728,[Vf]:9984,[Ac]:9986,[nn]:9729,[Cg]:9985,[as]:9987};function q(O,I,se){if(se?(n.texParameteri(O,10242,ve[I.wrapS]),n.texParameteri(O,10243,ve[I.wrapT]),(O===32879||O===35866)&&n.texParameteri(O,32882,ve[I.wrapR]),n.texParameteri(O,10240,ye[I.magFilter]),n.texParameteri(O,10241,ye[I.minFilter])):(n.texParameteri(O,10242,33071),n.texParameteri(O,10243,33071),(O===32879||O===35866)&&n.texParameteri(O,32882,33071),(I.wrapS!==Wn||I.wrapT!==Wn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(O,10240,L(I.magFilter)),n.texParameteri(O,10241,L(I.minFilter)),I.minFilter!==dn&&I.minFilter!==nn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const we=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===dn||I.minFilter!==Ac&&I.minFilter!==as||I.type===Is&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===Lc&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(n.texParameterf(O,we.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,r.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function Fe(O,I){let se=!1;O.__webglInit===void 0&&(O.__webglInit=!0,I.addEventListener("dispose",U));const we=I.source;let Ce=x.get(we);Ce===void 0&&(Ce={},x.set(we,Ce));const be=J(I);if(be!==O.__cacheKey){Ce[be]===void 0&&(Ce[be]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,se=!0),Ce[be].usedTimes++;const it=Ce[O.__cacheKey];it!==void 0&&(Ce[O.__cacheKey].usedTimes--,it.usedTimes===0&&H(I)),O.__cacheKey=be,O.__webglTexture=Ce[be].texture}return se}function ke(O,I,se){let we=3553;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(we=35866),I.isData3DTexture&&(we=32879);const Ce=Fe(O,I),be=I.source;t.bindTexture(we,O.__webglTexture,33984+se);const it=i.get(be);if(be.version!==it.__version||Ce===!0){t.activeTexture(33984+se),n.pixelStorei(37440,I.flipY),n.pixelStorei(37441,I.premultiplyAlpha),n.pixelStorei(3317,I.unpackAlignment),n.pixelStorei(37443,0);const De=E(I)&&S(I.image)===!1;let ge=w(I.image,De,!1,h);ge=At(I,ge);const Qe=S(ge)||a,rt=s.convert(I.format,I.encoding);let We=s.convert(I.type),$e=b(I.internalFormat,rt,We,I.encoding,I.isVideoTexture);q(we,I,Qe);let Je;const j=I.mipmaps,xe=a&&I.isVideoTexture!==!0,Oe=it.__version===void 0||Ce===!0,G=B(I,ge,Qe);if(I.isDepthTexture)$e=6402,a?I.type===Is?$e=36012:I.type===wo?$e=33190:I.type===Va?$e=35056:$e=33189:I.type===Is&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===Ro&&$e===6402&&I.type!==j1&&I.type!==wo&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=wo,We=s.convert(I.type)),I.format===el&&$e===6402&&($e=34041,I.type!==Va&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=Va,We=s.convert(I.type))),Oe&&(xe?t.texStorage2D(3553,1,$e,ge.width,ge.height):t.texImage2D(3553,0,$e,ge.width,ge.height,0,rt,We,null));else if(I.isDataTexture)if(j.length>0&&Qe){xe&&Oe&&t.texStorage2D(3553,G,$e,j[0].width,j[0].height);for(let re=0,Ae=j.length;re>=1,Ae>>=1}}else if(j.length>0&&Qe){xe&&Oe&&t.texStorage2D(3553,G,$e,j[0].width,j[0].height);for(let re=0,Ae=j.length;re0&&Oe++,t.texStorage2D(34067,Oe,Je,ge[0].width,ge[0].height));for(let re=0;re<6;re++)if(De){j?t.texSubImage2D(34069+re,0,0,0,ge[re].width,ge[re].height,We,$e,ge[re].data):t.texImage2D(34069+re,0,Je,ge[re].width,ge[re].height,0,We,$e,ge[re].data);for(let Ae=0;Ae=34069&&Ce<=34074)&&n.framebufferTexture2D(36160,we,Ce,i.get(se).__webglTexture,0),t.bindFramebuffer(36160,null)}function Be(O,I,se){if(n.bindRenderbuffer(36161,O),I.depthBuffer&&!I.stencilBuffer){let we=33189;if(se||je(I)){const Ce=I.depthTexture;Ce&&Ce.isDepthTexture&&(Ce.type===Is?we=36012:Ce.type===wo&&(we=33190));const be=Ke(I);je(I)?p.renderbufferStorageMultisampleEXT(36161,be,we,I.width,I.height):n.renderbufferStorageMultisample(36161,be,we,I.width,I.height)}else n.renderbufferStorage(36161,we,I.width,I.height);n.framebufferRenderbuffer(36160,36096,36161,O)}else if(I.depthBuffer&&I.stencilBuffer){const we=Ke(I);se&&je(I)===!1?n.renderbufferStorageMultisample(36161,we,35056,I.width,I.height):je(I)?p.renderbufferStorageMultisampleEXT(36161,we,35056,I.width,I.height):n.renderbufferStorage(36161,34041,I.width,I.height),n.framebufferRenderbuffer(36160,33306,36161,O)}else{const we=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let Ce=0;Ce0&&je(O)===!1){const De=be?I:[I];se.__webglMultisampledFramebuffer=n.createFramebuffer(),se.__webglColorRenderbuffer=[],t.bindFramebuffer(36160,se.__webglMultisampledFramebuffer);for(let ge=0;ge0&&je(O)===!1){const I=O.isWebGLMultipleRenderTargets?O.texture:[O.texture],se=O.width,we=O.height;let Ce=16384;const be=[],it=O.stencilBuffer?33306:36096,De=i.get(O),ge=O.isWebGLMultipleRenderTargets===!0;if(ge)for(let Qe=0;Qe0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function xt(O){const I=o.render.frame;v.get(O)!==I&&(v.set(O,I),O.update())}function At(O,I){const se=O.encoding,we=O.format,Ce=O.type;return O.isCompressedTexture===!0||O.isVideoTexture===!0||O.format===Vm||se!==Oo&&(se===Vt?a===!1?e.has("EXT_sRGB")===!0&&we===Mi?(O.format=Vm,O.minFilter=nn,O.generateMipmaps=!1):I=Q1.sRGBToLinear(I):(we!==Mi||Ce!==js)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",se)),I}this.allocateTextureUnit=N,this.resetTextureUnits=ce,this.setTexture2D=Y,this.setTexture2DArray=le,this.setTexture3D=W,this.setTextureCube=ee,this.rebindTextures=Se,this.setupRenderTarget=Ue,this.updateRenderTargetMipmap=Te,this.updateMultisampleRenderTarget=qe,this.setupDepthRenderbuffer=oe,this.setupFrameBufferTexture=_e,this.useMultisampledRTT=je}function WB(n,e,t){const i=t.isWebGL2;function r(s,o=null){let a;if(s===js)return 5121;if(s===pB)return 32819;if(s===mB)return 32820;if(s===fB)return 5120;if(s===hB)return 5122;if(s===j1)return 5123;if(s===dB)return 5124;if(s===wo)return 5125;if(s===Is)return 5126;if(s===Lc)return i?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===gB)return 6406;if(s===Mi)return 6408;if(s===yB)return 6409;if(s===vB)return 6410;if(s===Ro)return 6402;if(s===el)return 34041;if(s===Vm)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===xB)return 6403;if(s===AB)return 36244;if(s===_B)return 33319;if(s===wB)return 33320;if(s===MB)return 36249;if(s===sm||s===om||s===am||s===lm)if(o===Vt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===sm)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===om)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===am)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===lm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===sm)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===om)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===am)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===lm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===kx||s===Ox||s===Ux||s===zx)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===kx)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Ox)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Ux)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===zx)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===SB)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===Gx||s===Hx)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===Gx)return o===Vt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===Hx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Vx||s===Wx||s===jx||s===Jx||s===Xx||s===Yx||s===Kx||s===Qx||s===Zx||s===qx||s===$x||s===eA||s===tA||s===nA)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===Vx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Wx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===jx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===Jx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===Xx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===Yx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Kx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===Qx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===Zx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===qx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===$x)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===eA)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===tA)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===nA)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===cm)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===cm)return o===Vt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===CB||s===iA||s===rA||s===sA)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===cm)return a.COMPRESSED_RED_RGTC1_EXT;if(s===iA)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===rA)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===sA)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Va?i?34042:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[s]!==void 0?n[s]:null}return{convert:r}}class jB extends Xt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Fs extends bt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const cG={type:"move"};class Zy{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Fs,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 Fs,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new D,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new D),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Fs,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new D,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new D),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const y of e.hand.values()){const x=t.getJointPose(y,i),A=this._getHandJoint(u,y);x!==null&&(A.matrix.fromArray(x.transform.matrix),A.matrix.decompose(A.position,A.rotation,A.scale),A.jointRadius=x.radius),A.visible=x!==null}const h=u.joints["index-finger-tip"],d=u.joints["thumb-tip"],p=h.position.distanceTo(d.position),m=.02,v=.005;u.inputState.pinching&&p>m+v?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&p<=m-v&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(cG)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Fs;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class JB extends $t{constructor(e,t,i,r,s,o,a,l,u,h){if(h=h!==void 0?h:Ro,h!==Ro&&h!==el)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&h===Ro&&(i=wo),i===void 0&&h===el&&(i=Va),super(null,r,s,o,a,l,h,i,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:dn,this.minFilter=l!==void 0?l:dn,this.flipY=!1,this.generateMipmaps=!1}}class uG extends cs{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,u=null,h=null,d=null,p=null,m=null,v=null;const y=t.getContextAttributes();let x=null,A=null;const _=[],w=[],S=new Set,E=new Map,P=new Xt;P.layers.enable(1),P.viewport=new Ot;const R=new Xt;R.layers.enable(2),R.viewport=new Ot;const b=[P,R],B=new jB;B.layers.enable(1),B.layers.enable(2);let L=null,U=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(W){let ee=_[W];return ee===void 0&&(ee=new Zy,_[W]=ee),ee.getTargetRaySpace()},this.getControllerGrip=function(W){let ee=_[W];return ee===void 0&&(ee=new Zy,_[W]=ee),ee.getGripSpace()},this.getHand=function(W){let ee=_[W];return ee===void 0&&(ee=new Zy,_[W]=ee),ee.getHandSpace()};function Z(W){const ee=w.indexOf(W.inputSource);if(ee===-1)return;const ve=_[ee];ve!==void 0&&ve.dispatchEvent({type:W.type,data:W.inputSource})}function V(){r.removeEventListener("select",Z),r.removeEventListener("selectstart",Z),r.removeEventListener("selectend",Z),r.removeEventListener("squeeze",Z),r.removeEventListener("squeezestart",Z),r.removeEventListener("squeezeend",Z),r.removeEventListener("end",V),r.removeEventListener("inputsourceschange",H);for(let W=0;W<_.length;W++){const ee=w[W];ee!==null&&(w[W]=null,_[W].disconnect(ee))}L=null,U=null,e.setRenderTarget(x),m=null,p=null,d=null,r=null,A=null,le.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(W){s=W,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(W){a=W,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(W){u=W},this.getBaseLayer=function(){return p!==null?p:m},this.getBinding=function(){return d},this.getFrame=function(){return v},this.getSession=function(){return r},this.setSession=async function(W){if(r=W,r!==null){if(x=e.getRenderTarget(),r.addEventListener("select",Z),r.addEventListener("selectstart",Z),r.addEventListener("selectend",Z),r.addEventListener("squeeze",Z),r.addEventListener("squeezestart",Z),r.addEventListener("squeezeend",Z),r.addEventListener("end",V),r.addEventListener("inputsourceschange",H),y.xrCompatible!==!0&&await t.makeXRCompatible(),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const ee={antialias:r.renderState.layers===void 0?y.antialias:!0,alpha:y.alpha,depth:y.depth,stencil:y.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,t,ee),r.updateRenderState({baseLayer:m}),A=new Ur(m.framebufferWidth,m.framebufferHeight,{format:Mi,type:js,encoding:e.outputEncoding,stencilBuffer:y.stencil})}else{let ee=null,ve=null,ye=null;y.depth&&(ye=y.stencil?35056:33190,ee=y.stencil?el:Ro,ve=y.stencil?Va:wo);const q={colorFormat:32856,depthFormat:ye,scaleFactor:s};d=new XRWebGLBinding(r,t),p=d.createProjectionLayer(q),r.updateRenderState({layers:[p]}),A=new Ur(p.textureWidth,p.textureHeight,{format:Mi,type:js,depthTexture:new JB(p.textureWidth,p.textureHeight,ve,void 0,void 0,void 0,void 0,void 0,void 0,ee),stencilBuffer:y.stencil,encoding:e.outputEncoding,samples:y.antialias?4:0});const Fe=e.properties.get(A);Fe.__ignoreDepthValues=p.ignoreDepthValues}A.isXRRenderTarget=!0,this.setFoveation(l),u=null,o=await r.requestReferenceSpace(a),le.setContext(r),le.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};function H(W){for(let ee=0;ee=0&&(w[ye]=null,_[ye].disconnect(ve))}for(let ee=0;ee=w.length){w.push(ve),ye=Fe;break}else if(w[Fe]===null){w[Fe]=ve,ye=Fe;break}if(ye===-1)break}const q=_[ye];q&&q.connect(ve)}}const K=new D,ie=new D;function ce(W,ee,ve){K.setFromMatrixPosition(ee.matrixWorld),ie.setFromMatrixPosition(ve.matrixWorld);const ye=K.distanceTo(ie),q=ee.projectionMatrix.elements,Fe=ve.projectionMatrix.elements,ke=q[14]/(q[10]-1),He=q[14]/(q[10]+1),_e=(q[9]+1)/q[5],Be=(q[9]-1)/q[5],he=(q[8]-1)/q[0],oe=(Fe[8]+1)/Fe[0],Se=ke*he,Ue=ke*oe,Te=ye/(-he+oe),qe=Te*-he;ee.matrixWorld.decompose(W.position,W.quaternion,W.scale),W.translateX(qe),W.translateZ(Te),W.matrixWorld.compose(W.position,W.quaternion,W.scale),W.matrixWorldInverse.copy(W.matrixWorld).invert();const Ke=ke+Te,je=He+Te,xt=Se-qe,At=Ue+(ye-qe),O=_e*He/je*Ke,I=Be*He/je*Ke;W.projectionMatrix.makePerspective(xt,At,O,I,Ke,je)}function N(W,ee){ee===null?W.matrixWorld.copy(W.matrix):W.matrixWorld.multiplyMatrices(ee.matrixWorld,W.matrix),W.matrixWorldInverse.copy(W.matrixWorld).invert()}this.updateCamera=function(W){if(r===null)return;B.near=R.near=P.near=W.near,B.far=R.far=P.far=W.far,(L!==B.near||U!==B.far)&&(r.updateRenderState({depthNear:B.near,depthFar:B.far}),L=B.near,U=B.far);const ee=W.parent,ve=B.cameras;N(B,ee);for(let q=0;qq&&(E.set(ye,ye.lastChangedTime),i.dispatchEvent({type:"planechanged",data:ye}))}}v=null}const le=new UB;le.setAnimationLoop(Y),this.setAnimationLoop=function(W){J=W},this.dispose=function(){}}}function fG(n,e){function t(y,x){x.color.getRGB(y.fogColor.value,kB(n)),x.isFog?(y.fogNear.value=x.near,y.fogFar.value=x.far):x.isFogExp2&&(y.fogDensity.value=x.density)}function i(y,x,A,_,w){x.isMeshBasicMaterial||x.isMeshLambertMaterial?r(y,x):x.isMeshToonMaterial?(r(y,x),h(y,x)):x.isMeshPhongMaterial?(r(y,x),u(y,x)):x.isMeshStandardMaterial?(r(y,x),d(y,x),x.isMeshPhysicalMaterial&&p(y,x,w)):x.isMeshMatcapMaterial?(r(y,x),m(y,x)):x.isMeshDepthMaterial?r(y,x):x.isMeshDistanceMaterial?(r(y,x),v(y,x)):x.isMeshNormalMaterial?r(y,x):x.isLineBasicMaterial?(s(y,x),x.isLineDashedMaterial&&o(y,x)):x.isPointsMaterial?a(y,x,A,_):x.isSpriteMaterial?l(y,x):x.isShadowMaterial?(y.color.value.copy(x.color),y.opacity.value=x.opacity):x.isShaderMaterial&&(x.uniformsNeedUpdate=!1)}function r(y,x){y.opacity.value=x.opacity,x.color&&y.diffuse.value.copy(x.color),x.emissive&&y.emissive.value.copy(x.emissive).multiplyScalar(x.emissiveIntensity),x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ti&&(y.bumpScale.value*=-1)),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ti&&y.normalScale.value.negate()),x.specularMap&&(y.specularMap.value=x.specularMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);const A=e.get(x).envMap;if(A&&(y.envMap.value=A,y.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=x.reflectivity,y.ior.value=x.ior,y.refractionRatio.value=x.refractionRatio),x.lightMap){y.lightMap.value=x.lightMap;const S=n.physicallyCorrectLights!==!0?Math.PI:1;y.lightMapIntensity.value=x.lightMapIntensity*S}x.aoMap&&(y.aoMap.value=x.aoMap,y.aoMapIntensity.value=x.aoMapIntensity);let _;x.map?_=x.map:x.specularMap?_=x.specularMap:x.displacementMap?_=x.displacementMap:x.normalMap?_=x.normalMap:x.bumpMap?_=x.bumpMap:x.roughnessMap?_=x.roughnessMap:x.metalnessMap?_=x.metalnessMap:x.alphaMap?_=x.alphaMap:x.emissiveMap?_=x.emissiveMap:x.clearcoatMap?_=x.clearcoatMap:x.clearcoatNormalMap?_=x.clearcoatNormalMap:x.clearcoatRoughnessMap?_=x.clearcoatRoughnessMap:x.iridescenceMap?_=x.iridescenceMap:x.iridescenceThicknessMap?_=x.iridescenceThicknessMap:x.specularIntensityMap?_=x.specularIntensityMap:x.specularColorMap?_=x.specularColorMap:x.transmissionMap?_=x.transmissionMap:x.thicknessMap?_=x.thicknessMap:x.sheenColorMap?_=x.sheenColorMap:x.sheenRoughnessMap&&(_=x.sheenRoughnessMap),_!==void 0&&(_.isWebGLRenderTarget&&(_=_.texture),_.matrixAutoUpdate===!0&&_.updateMatrix(),y.uvTransform.value.copy(_.matrix));let w;x.aoMap?w=x.aoMap:x.lightMap&&(w=x.lightMap),w!==void 0&&(w.isWebGLRenderTarget&&(w=w.texture),w.matrixAutoUpdate===!0&&w.updateMatrix(),y.uv2Transform.value.copy(w.matrix))}function s(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity}function o(y,x){y.dashSize.value=x.dashSize,y.totalSize.value=x.dashSize+x.gapSize,y.scale.value=x.scale}function a(y,x,A,_){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.size.value=x.size*A,y.scale.value=_*.5,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let w;x.map?w=x.map:x.alphaMap&&(w=x.alphaMap),w!==void 0&&(w.matrixAutoUpdate===!0&&w.updateMatrix(),y.uvTransform.value.copy(w.matrix))}function l(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.rotation.value=x.rotation,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let A;x.map?A=x.map:x.alphaMap&&(A=x.alphaMap),A!==void 0&&(A.matrixAutoUpdate===!0&&A.updateMatrix(),y.uvTransform.value.copy(A.matrix))}function u(y,x){y.specular.value.copy(x.specular),y.shininess.value=Math.max(x.shininess,1e-4)}function h(y,x){x.gradientMap&&(y.gradientMap.value=x.gradientMap)}function d(y,x){y.roughness.value=x.roughness,y.metalness.value=x.metalness,x.roughnessMap&&(y.roughnessMap.value=x.roughnessMap),x.metalnessMap&&(y.metalnessMap.value=x.metalnessMap),e.get(x).envMap&&(y.envMapIntensity.value=x.envMapIntensity)}function p(y,x,A){y.ior.value=x.ior,x.sheen>0&&(y.sheenColor.value.copy(x.sheenColor).multiplyScalar(x.sheen),y.sheenRoughness.value=x.sheenRoughness,x.sheenColorMap&&(y.sheenColorMap.value=x.sheenColorMap),x.sheenRoughnessMap&&(y.sheenRoughnessMap.value=x.sheenRoughnessMap)),x.clearcoat>0&&(y.clearcoat.value=x.clearcoat,y.clearcoatRoughness.value=x.clearcoatRoughness,x.clearcoatMap&&(y.clearcoatMap.value=x.clearcoatMap),x.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=x.clearcoatRoughnessMap),x.clearcoatNormalMap&&(y.clearcoatNormalScale.value.copy(x.clearcoatNormalScale),y.clearcoatNormalMap.value=x.clearcoatNormalMap,x.side===Ti&&y.clearcoatNormalScale.value.negate())),x.iridescence>0&&(y.iridescence.value=x.iridescence,y.iridescenceIOR.value=x.iridescenceIOR,y.iridescenceThicknessMinimum.value=x.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=x.iridescenceThicknessRange[1],x.iridescenceMap&&(y.iridescenceMap.value=x.iridescenceMap),x.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=x.iridescenceThicknessMap)),x.transmission>0&&(y.transmission.value=x.transmission,y.transmissionSamplerMap.value=A.texture,y.transmissionSamplerSize.value.set(A.width,A.height),x.transmissionMap&&(y.transmissionMap.value=x.transmissionMap),y.thickness.value=x.thickness,x.thicknessMap&&(y.thicknessMap.value=x.thicknessMap),y.attenuationDistance.value=x.attenuationDistance,y.attenuationColor.value.copy(x.attenuationColor)),y.specularIntensity.value=x.specularIntensity,y.specularColor.value.copy(x.specularColor),x.specularIntensityMap&&(y.specularIntensityMap.value=x.specularIntensityMap),x.specularColorMap&&(y.specularColorMap.value=x.specularColorMap)}function m(y,x){x.matcap&&(y.matcap.value=x.matcap)}function v(y,x){y.referencePosition.value.copy(x.referencePosition),y.nearDistance.value=x.nearDistance,y.farDistance.value=x.farDistance}return{refreshFogUniforms:t,refreshMaterialUniforms:i}}function hG(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(35375):0;function l(_,w){const S=w.program;i.uniformBlockBinding(_,S)}function u(_,w){let S=r[_.id];S===void 0&&(v(_),S=h(_),r[_.id]=S,_.addEventListener("dispose",x));const E=w.program;i.updateUBOMapping(_,E);const P=e.render.frame;s[_.id]!==P&&(p(_),s[_.id]=P)}function h(_){const w=d();_.__bindingPointIndex=w;const S=n.createBuffer(),E=_.__size,P=_.usage;return n.bindBuffer(35345,S),n.bufferData(35345,E,P),n.bindBuffer(35345,null),n.bindBufferBase(35345,w,S),S}function d(){for(let _=0;_0){P=S%E;const Z=E-P;P!==0&&Z-L.boundary<0&&(S+=E-P,B.__offset=S)}S+=L.storage}return P=S%E,P>0&&(S+=E-P),_.__size=S,_.__cache={},this}function y(_){const w={boundary:0,storage:0};return typeof _=="number"?(w.boundary=4,w.storage=4):_.isVector2?(w.boundary=8,w.storage=8):_.isVector3||_.isColor?(w.boundary=16,w.storage=12):_.isVector4?(w.boundary=16,w.storage=16):_.isMatrix3?(w.boundary=48,w.storage=48):_.isMatrix4?(w.boundary=64,w.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),w}function x(_){const w=_.target;w.removeEventListener("dispose",x);const S=o.indexOf(w.__bindingPointIndex);o.splice(S,1),n.deleteBuffer(r[w.id]),delete r[w.id],delete s[w.id]}function A(){for(const _ in r)n.deleteBuffer(r[_]);o=[],r={},s={}}return{bind:l,update:u,dispose:A}}function dG(){const n=Xf("canvas");return n.style.display="block",n}function s_(n={}){this.isWebGLRenderer=!0;const e=n.canvas!==void 0?n.canvas:dG(),t=n.context!==void 0?n.context:null,i=n.depth!==void 0?n.depth:!0,r=n.stencil!==void 0?n.stencil:!0,s=n.antialias!==void 0?n.antialias:!1,o=n.premultipliedAlpha!==void 0?n.premultipliedAlpha:!0,a=n.preserveDrawingBuffer!==void 0?n.preserveDrawingBuffer:!1,l=n.powerPreference!==void 0?n.powerPreference:"default",u=n.failIfMajorPerformanceCaveat!==void 0?n.failIfMajorPerformanceCaveat:!1;let h;t!==null?h=t.getContextAttributes().alpha:h=n.alpha!==void 0?n.alpha:!1;let d=null,p=null;const m=[],v=[];this.domElement=e,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.outputEncoding=Oo,this.physicallyCorrectLights=!1,this.toneMapping=kr,this.toneMappingExposure=1;const y=this;let x=!1,A=0,_=0,w=null,S=-1,E=null;const P=new Ot,R=new Ot;let b=null,B=e.width,L=e.height,U=1,Z=null,V=null;const H=new Ot(0,0,B,L),K=new Ot(0,0,B,L);let ie=!1;const ce=new Tg;let N=!1,J=!1,Y=null;const le=new ot,W=new pe,ee=new D,ve={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ye(){return w===null?U:1}let q=t;function Fe(F,te){for(let de=0;de0?p=v[v.length-1]:p=null,m.pop(),m.length>0?d=m[m.length-1]:d=null};function Nt(F,te,de,$){if(F.visible===!1)return;if(F.layers.test(te.layers)){if(F.isGroup)de=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(te);else if(F.isLight)p.pushLight(F),F.castShadow&&p.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||ce.intersectsSprite(F)){$&&ee.setFromMatrixPosition(F.matrixWorld).applyMatrix4(le);const lt=Ke.update(F),dt=F.material;dt.visible&&d.push(F,lt,dt,de,ee.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(F.isSkinnedMesh&&F.skeleton.frame!==Be.render.frame&&(F.skeleton.update(),F.skeleton.frame=Be.render.frame),!F.frustumCulled||ce.intersectsObject(F))){$&&ee.setFromMatrixPosition(F.matrixWorld).applyMatrix4(le);const lt=Ke.update(F),dt=F.material;if(Array.isArray(dt)){const yt=lt.groups;for(let Ct=0,wt=yt.length;Ct0&&Xn(me,te,de),$&&_e.viewport(P.copy($)),me.length>0&&Bt(me,te,de),tt.length>0&&Bt(tt,te,de),lt.length>0&&Bt(lt,te,de),_e.buffers.depth.setTest(!0),_e.buffers.depth.setMask(!0),_e.buffers.color.setMask(!0),_e.setPolygonOffset(!1)}function Xn(F,te,de){const $=He.isWebGL2;Y===null&&(Y=new Ur(1,1,{generateMipmaps:!0,type:ke.has("EXT_color_buffer_half_float")?Lc:js,minFilter:as,samples:$&&s===!0?4:0})),y.getDrawingBufferSize(W),$?Y.setSize(W.x,W.y):Y.setSize(Wm(W.x),Wm(W.y));const me=y.getRenderTarget();y.setRenderTarget(Y),y.clear();const tt=y.toneMapping;y.toneMapping=kr,Bt(F,te,de),y.toneMapping=tt,oe.updateMultisampleRenderTarget(Y),oe.updateRenderTargetMipmap(Y),y.setRenderTarget(me)}function Bt(F,te,de){const $=te.isScene===!0?te.overrideMaterial:null;for(let me=0,tt=F.length;me0&&oe.useMultisampledRTT(F)===!1?me=he.get(F).__webglMultisampledFramebuffer:me=wt,P.copy(F.viewport),R.copy(F.scissor),b=F.scissorTest}else P.copy(H).multiplyScalar(U).floor(),R.copy(K).multiplyScalar(U).floor(),b=ie;if(_e.bindFramebuffer(36160,me)&&He.drawBuffers&&$&&_e.drawBuffers(F,me),_e.viewport(P),_e.scissor(R),_e.setScissorTest(b),tt){const yt=he.get(F.texture);q.framebufferTexture2D(36160,36064,34069+te,yt.__webglTexture,de)}else if(lt){const yt=he.get(F.texture),Ct=te||0;q.framebufferTextureLayer(36160,36064,yt.__webglTexture,de||0,Ct)}S=-1},this.readRenderTargetPixels=function(F,te,de,$,me,tt,lt){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let dt=he.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&<!==void 0&&(dt=dt[lt]),dt){_e.bindFramebuffer(36160,dt);try{const yt=F.texture,Ct=yt.format,wt=yt.type;if(Ct!==Mi&&De.convert(Ct)!==q.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Mt=wt===Lc&&(ke.has("EXT_color_buffer_half_float")||He.isWebGL2&&ke.has("EXT_color_buffer_float"));if(wt!==js&&De.convert(wt)!==q.getParameter(35738)&&!(wt===Is&&(He.isWebGL2||ke.has("OES_texture_float")||ke.has("WEBGL_color_buffer_float")))&&!Mt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}te>=0&&te<=F.width-$&&de>=0&&de<=F.height-me&&q.readPixels(te,de,$,me,De.convert(Ct),De.convert(wt),tt)}finally{const yt=w!==null?he.get(w).__webglFramebuffer:null;_e.bindFramebuffer(36160,yt)}}},this.copyFramebufferToTexture=function(F,te,de=0){const $=Math.pow(2,-de),me=Math.floor(te.image.width*$),tt=Math.floor(te.image.height*$);oe.setTexture2D(te,0),q.copyTexSubImage2D(3553,de,0,0,F.x,F.y,me,tt),_e.unbindTexture()},this.copyTextureToTexture=function(F,te,de,$=0){const me=te.image.width,tt=te.image.height,lt=De.convert(de.format),dt=De.convert(de.type);oe.setTexture2D(de,0),q.pixelStorei(37440,de.flipY),q.pixelStorei(37441,de.premultiplyAlpha),q.pixelStorei(3317,de.unpackAlignment),te.isDataTexture?q.texSubImage2D(3553,$,F.x,F.y,me,tt,lt,dt,te.image.data):te.isCompressedTexture?q.compressedTexSubImage2D(3553,$,F.x,F.y,te.mipmaps[0].width,te.mipmaps[0].height,lt,te.mipmaps[0].data):q.texSubImage2D(3553,$,F.x,F.y,lt,dt,te.image),$===0&&de.generateMipmaps&&q.generateMipmap(3553),_e.unbindTexture()},this.copyTextureToTexture3D=function(F,te,de,$,me=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const tt=F.max.x-F.min.x+1,lt=F.max.y-F.min.y+1,dt=F.max.z-F.min.z+1,yt=De.convert($.format),Ct=De.convert($.type);let wt;if($.isData3DTexture)oe.setTexture3D($,0),wt=32879;else if($.isDataArrayTexture)oe.setTexture2DArray($,0),wt=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}q.pixelStorei(37440,$.flipY),q.pixelStorei(37441,$.premultiplyAlpha),q.pixelStorei(3317,$.unpackAlignment);const Mt=q.getParameter(3314),ln=q.getParameter(32878),si=q.getParameter(3316),Ar=q.getParameter(3315),fs=q.getParameter(32877),Kt=de.isCompressedTexture?de.mipmaps[0]:de.image;q.pixelStorei(3314,Kt.width),q.pixelStorei(32878,Kt.height),q.pixelStorei(3316,F.min.x),q.pixelStorei(3315,F.min.y),q.pixelStorei(32877,F.min.z),de.isDataTexture||de.isData3DTexture?q.texSubImage3D(wt,me,te.x,te.y,te.z,tt,lt,dt,yt,Ct,Kt.data):de.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),q.compressedTexSubImage3D(wt,me,te.x,te.y,te.z,tt,lt,dt,yt,Kt.data)):q.texSubImage3D(wt,me,te.x,te.y,te.z,tt,lt,dt,yt,Ct,Kt),q.pixelStorei(3314,Mt),q.pixelStorei(32878,ln),q.pixelStorei(3316,si),q.pixelStorei(3315,Ar),q.pixelStorei(32877,fs),me===0&&$.generateMipmaps&&q.generateMipmap(wt),_e.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?oe.setTextureCube(F,0):F.isData3DTexture?oe.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?oe.setTexture2DArray(F,0):oe.setTexture2D(F,0),_e.unbindTexture()},this.resetState=function(){A=0,_=0,w=null,_e.reset(),ge.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class XB extends s_{}XB.prototype.isWebGL1Renderer=!0;class Bg{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Ie(e),this.density=t}clone(){return new Bg(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Rg{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Ie(e),this.near=t,this.far=i}clone(){return new Rg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class jm extends bt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class ph{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=jf,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Hi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;re.far||t.push({distance:l,point:Ou.clone(),uv:hr.getUV(Ou,gp,zu,yp,GC,qy,HC,new pe),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function vp(n,e,t,i,r,s){Wl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Uu.x=s*Wl.x-r*Wl.y,Uu.y=r*Wl.x+s*Wl.y):Uu.copy(Wl),n.copy(e),n.x+=Uu.x,n.y+=Uu.y,n.applyMatrix4(YB)}const xp=new D,VC=new D;class QB extends bt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){xp.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(xp);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){xp.setFromMatrixPosition(e.matrixWorld),VC.setFromMatrixPosition(this.matrixWorld);const i=xp.distanceTo(VC)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;rl)continue;p.applyMatrix4(this.matrixWorld);const b=e.ray.origin.distanceTo(p);be.far||t.push({distance:b,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const A=Math.max(0,o.start),_=Math.min(x.count,o.start+o.count);for(let w=A,S=_-1;wl)continue;p.applyMatrix4(this.matrixWorld);const P=e.ray.origin.distanceTo(p);Pe.far||t.push({distance:P,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class yG extends $t{constructor(e,t,i,r,s,o,a,l,u){super(e,t,i,r,s,o,a,l,u),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:nn,this.magFilter=s!==void 0?s:nn,this.generateMipmaps=!1;const h=this;function d(){h.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class vG extends $t{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=dn,this.minFilter=dn,this.generateMipmaps=!1,this.needsUpdate=!0}}class f_ extends $t{constructor(e,t,i,r,s,o,a,l,u,h,d,p){super(null,o,a,l,u,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class xG extends f_{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Wn}}class AG extends $t{constructor(e,t,i,r,s,o,a,l,u){super(e,t,i,r,s,o,a,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Gr{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,l=s-1,u;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),u=i[r]-o,u<0)a=r+1;else if(u>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,m=(o-h)/p;return(r+m)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new pe:new D);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new D,r=[],s=[],o=[],a=new D,l=new ot;for(let m=0;m<=e;m++){const v=m/e;r[m]=this.getTangentAt(v,new D)}s[0]=new D,o[0]=new D;let u=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=u&&(u=h,i.set(1,0,0)),d<=u&&(u=d,i.set(0,1,0)),p<=u&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos(yn(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,v))}o[m].crossVectors(r[m],s[m])}if(t===!0){let m=Math.acos(yn(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let v=1;v<=e;v++)s[v].applyMatrix4(l.makeRotationAxis(r[v],m*v)),o[v].crossVectors(r[v],s[v])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Ig extends Gr{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const i=t||new pe,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let u,h;this.closed||a>0?u=r[(a-1)%s]:(Sp.subVectors(r[0],r[1]).add(r[0]),u=Sp);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(rE(a,l.x,u.x,h.x,d.x),rE(a,l.y,u.y,h.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),u=l===0?0:1-o/l;return a.getPointAt(u,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const d=u.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(u);const h=u.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Zc extends ft{constructor(e=[new pe(0,-.5),new pe(.5,0),new pe(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=yn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],u=[],h=1/t,d=new D,p=new pe,m=new D,v=new D,y=new D;let x=0,A=0;for(let _=0;_<=e.length-1;_++)switch(_){case 0:x=e[_+1].x-e[_].x,A=e[_+1].y-e[_].y,m.x=A*1,m.y=-x,m.z=A*0,y.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(y.x,y.y,y.z);break;default:x=e[_+1].x-e[_].x,A=e[_+1].y-e[_].y,m.x=A*1,m.y=-x,m.z=A*0,v.copy(m),m.x+=y.x,m.y+=y.y,m.z+=y.z,m.normalize(),l.push(m.x,m.y,m.z),y.copy(v)}for(let _=0;_<=t;_++){const w=i+_*h*r,S=Math.sin(w),E=Math.cos(w);for(let P=0;P<=e.length-1;P++){d.x=e[P].x*S,d.y=e[P].y,d.z=e[P].x*E,o.push(d.x,d.y,d.z),p.x=_/t,p.y=P/(e.length-1),a.push(p.x,p.y);const R=l[3*P+0]*S,b=l[3*P+1],B=l[3*P+0]*E;u.push(R,b,B)}}for(let _=0;_0&&w(!0),t>0&&w(!1)),this.setIndex(h),this.setAttribute("position",new Ve(d,3)),this.setAttribute("normal",new Ve(p,3)),this.setAttribute("uv",new Ve(m,2));function _(){const S=new D,E=new D;let P=0;const R=(t-e)/i;for(let b=0;b<=s;b++){const B=[],L=b/s,U=L*(t-e)+e;for(let Z=0;Z<=r;Z++){const V=Z/r,H=V*l+a,K=Math.sin(H),ie=Math.cos(H);E.x=U*K,E.y=-L*i+x,E.z=U*ie,d.push(E.x,E.y,E.z),S.set(K,R,ie).normalize(),p.push(S.x,S.y,S.z),m.push(V,1-L),B.push(v++)}y.push(B)}for(let b=0;b.9&&R<.1&&(w<.2&&(o[_+0]+=1),S<.2&&(o[_+2]+=1),E<.2&&(o[_+4]+=1))}}function p(_){s.push(_.x,_.y,_.z)}function m(_,w){const S=_*3;w.x=e[S+0],w.y=e[S+1],w.z=e[S+2]}function v(){const _=new D,w=new D,S=new D,E=new D,P=new pe,R=new pe,b=new pe;for(let B=0,L=0;B80*t){a=u=n[0],l=h=n[1];for(let v=t;vu&&(u=d),p>h&&(h=p);m=Math.max(u-a,h-l),m=m!==0?32767/m:0}return Kf(s,o,t,a,l,m,0),o}};function i3(n,e,t,i,r){let s,o;if(r===WG(n,e,t,i)>0)for(s=e;s=e;s-=i)o=sE(s,n[s],n[s+1],o);return o&&Fg(o,o.next)&&(Zf(o),o=o.next),o}function nl(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Fg(t,t.next)||rn(t.prev,t,t.next)===0)){if(Zf(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Kf(n,e,t,i,r,s,o){if(!n)return;!o&&s&&OG(n,i,r,s);let a=n,l,u;for(;n.prev!==n.next;){if(l=n.prev,u=n.next,s?BG(n,i,r,s):PG(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(u.i/t|0),Zf(n),n=u.next,a=u.next;continue}if(n=u,n===a){o?o===1?(n=RG(nl(n),e,t),Kf(n,e,t,i,r,s,2)):o===2&&LG(n,e,t,i,r,s):Kf(nl(n),e,t,i,r,s,1);break}}}function PG(n){const e=n.prev,t=n,i=n.next;if(rn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,u=i.y,h=rs?r>o?r:o:s>o?s:o,m=a>l?a>u?a:u:l>u?l:u;let v=i.next;for(;v!==e;){if(v.x>=h&&v.x<=p&&v.y>=d&&v.y<=m&&lc(r,a,s,l,o,u,v.x,v.y)&&rn(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function BG(n,e,t,i){const r=n.prev,s=n,o=n.next;if(rn(r,s,o)>=0)return!1;const a=r.x,l=s.x,u=o.x,h=r.y,d=s.y,p=o.y,m=al?a>u?a:u:l>u?l:u,x=h>d?h>p?h:p:d>p?d:p,A=fA(m,v,e,t,i),_=fA(y,x,e,t,i);let w=n.prevZ,S=n.nextZ;for(;w&&w.z>=A&&S&&S.z<=_;){if(w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==r&&w!==o&&lc(a,h,l,d,u,p,w.x,w.y)&&rn(w.prev,w,w.next)>=0||(w=w.prevZ,S.x>=m&&S.x<=y&&S.y>=v&&S.y<=x&&S!==r&&S!==o&&lc(a,h,l,d,u,p,S.x,S.y)&&rn(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;w&&w.z>=A;){if(w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==r&&w!==o&&lc(a,h,l,d,u,p,w.x,w.y)&&rn(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;S&&S.z<=_;){if(S.x>=m&&S.x<=y&&S.y>=v&&S.y<=x&&S!==r&&S!==o&&lc(a,h,l,d,u,p,S.x,S.y)&&rn(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function RG(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Fg(r,s)&&r3(r,i,i.next,s)&&Qf(r,s)&&Qf(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Zf(i),Zf(i.next),i=n=s),i=i.next}while(i!==n);return nl(i)}function LG(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&GG(o,a)){let l=s3(o,a);o=nl(o,o.next),l=nl(l,l.next),Kf(o,e,t,i,r,s,0),Kf(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function IG(n,e,t,i){const r=[];let s,o,a,l,u;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x=t.x&&t.x>=l&&s!==t.x&&lc(or.x||t.x===r.x&&kG(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function kG(n,e){return rn(n.prev,n,e.prev)<0&&rn(e.next,n,n.next)<0}function OG(n,e,t,i){let r=n;do r.z===0&&(r.z=fA(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,UG(r)}function UG(n){let e,t,i,r,s,o,a,l,u=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,u*=2}while(o>1);return n}function fA(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function zG(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function GG(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!HG(n,e)&&(Qf(n,e)&&Qf(e,n)&&VG(n,e)&&(rn(n.prev,n,e.prev)||rn(n,e.prev,e))||Fg(n,e)&&rn(n.prev,n,n.next)>0&&rn(e.prev,e,e.next)>0)}function rn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Fg(n,e){return n.x===e.x&&n.y===e.y}function r3(n,e,t,i){const r=Pp(rn(n,e,t)),s=Pp(rn(n,e,i)),o=Pp(rn(t,i,n)),a=Pp(rn(t,i,e));return!!(r!==s&&o!==a||r===0&&Tp(n,t,e)||s===0&&Tp(n,i,e)||o===0&&Tp(t,n,i)||a===0&&Tp(t,e,i))}function Tp(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Pp(n){return n>0?1:n<0?-1:0}function HG(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&r3(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Qf(n,e){return rn(n.prev,n,n.next)<0?rn(n,e,n.next)>=0&&rn(n,n.prev,e)>=0:rn(n,e,n.prev)<0||rn(n,n.next,e)<0}function VG(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function s3(n,e){const t=new hA(n.i,n.x,n.y),i=new hA(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function sE(n,e,t,i){const r=new hA(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Zf(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function hA(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function WG(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function aE(n,e){for(let t=0;tNumber.EPSILON){const se=Math.sqrt(O),we=Math.sqrt(xt*xt+At*At),Ce=oe.x-je/se,be=oe.y+Ke/se,it=Se.x-At/we,De=Se.y+xt/we,ge=((it-Ce)*At-(De-be)*xt)/(Ke*At-je*xt);Ue=Ce+Ke*ge-he.x,Te=be+je*ge-he.y;const Qe=Ue*Ue+Te*Te;if(Qe<=2)return new pe(Ue,Te);qe=Math.sqrt(Qe/2)}else{let se=!1;Ke>Number.EPSILON?xt>Number.EPSILON&&(se=!0):Ke<-Number.EPSILON?xt<-Number.EPSILON&&(se=!0):Math.sign(je)===Math.sign(At)&&(se=!0),se?(Ue=-je,Te=Ke,qe=Math.sqrt(O)):(Ue=Ke,Te=je,qe=Math.sqrt(O/2))}return new pe(Ue/qe,Te/qe)}const J=[];for(let he=0,oe=H.length,Se=oe-1,Ue=he+1;he=0;he--){const oe=he/x,Se=m*Math.cos(oe*Math.PI/2),Ue=v*Math.sin(oe*Math.PI/2)+y;for(let Te=0,qe=H.length;Te=0;){const Ue=Se;let Te=Se-1;Te<0&&(Te=he.length-1);for(let qe=0,Ke=h+x*2;qe0)&&m.push(w,S,P),(A!==i-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class c3 extends Mn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Ie(16777215),this.specular=new Ie(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ie(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=fh,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class u3 extends Mn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ie(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ie(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class f3 extends Mn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class h3 extends Mn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Ie(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ie(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=fh,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class d3 extends Mn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ie(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class p3 extends ri{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function cr(n,e,t){return v_(n)?new n.constructor(n.subarray(e,t!==void 0?t:n.length)):n.slice(e,t)}function ka(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function v_(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function m3(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function dA(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function x_(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function YG(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){d.push(u.times[m]);for(let y=0;ys.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[v]){const A=v*d+h,_=A+d-h;y=cr(a.values,A,_)}else{const A=a.createInterpolant(),_=h,w=d-h;A.evaluate(s),y=cr(A.resultBuffer,_,w)}l==="quaternion"&&new Gn().fromArray(y).normalize().conjugate().toArray(y);const x=u.times.length;for(let A=0;A=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=cr(i,s,o),this.values=cr(this.values,s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&v_(r))for(let a=0,l=r.length;a!==l;++a){const u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=cr(this.times),t=cr(this.values),i=this.getValueSize(),r=this.getInterpolation()===um,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,u=0;u!==i;++u)t[l+u]=t[a+u];++o}return o!==e.length?(this.times=cr(e,0,o),this.values=cr(t,0,o*i)):(this.times=e,this.values=t),this}clone(){const e=cr(this.times,0),t=cr(this.values,0),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Hr.prototype.TimeBufferType=Float32Array;Hr.prototype.ValueBufferType=Float32Array;Hr.prototype.DefaultInterpolation=tl;class ll extends Hr{}ll.prototype.ValueTypeName="bool";ll.prototype.ValueBufferType=Array;ll.prototype.DefaultInterpolation=Ic;ll.prototype.InterpolantFactoryMethodLinear=void 0;ll.prototype.InterpolantFactoryMethodSmooth=void 0;class __ extends Hr{}__.prototype.ValueTypeName="color";class kc extends Hr{}kc.prototype.ValueTypeName="number";class v3 extends eu{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let u=e*a;for(let h=u+a;u!==h;u+=4)Gn.slerpFlat(s,0,o,u-a,o,u,l);return s}}class zo extends Hr{InterpolantFactoryMethodLinear(e){return new v3(this.times,this.values,this.getValueSize(),e)}}zo.prototype.ValueTypeName="quaternion";zo.prototype.DefaultInterpolation=tl;zo.prototype.InterpolantFactoryMethodSmooth=void 0;class cl extends Hr{}cl.prototype.ValueTypeName="string";cl.prototype.ValueBufferType=Array;cl.prototype.DefaultInterpolation=Ic;cl.prototype.InterpolantFactoryMethodLinear=void 0;cl.prototype.InterpolantFactoryMethodSmooth=void 0;class Oc extends Hr{}Oc.prototype.ValueTypeName="vector";class Uc{constructor(e,t=-1,i,r=Eg){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Hi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(qG(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Hr.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const d=h[1];let p=r[d];p||(r[d]=p=[]),p.push(u)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,p,m,v,y){if(m.length!==0){const x=[],A=[];x_(m,x,A,v),x.length!==0&&y.push(new d(p,x,A))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(Es[e]!==void 0){Es[e].push({onLoad:t,onProgress:i,onError:r});return}Es[e]=[],Es[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const h=Es[e],d=u.body.getReader(),p=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),m=p?parseInt(p):0,v=m!==0;let y=0;const x=new ReadableStream({start(A){_();function _(){d.read().then(({done:w,value:S})=>{if(w)A.close();else{y+=S.byteLength;const E=new ProgressEvent("progress",{lengthComputable:v,loaded:y,total:m});for(let P=0,R=h.length;P{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return u.json();default:if(a===void 0)return u.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,m=new TextDecoder(p);return u.arrayBuffer().then(v=>m.decode(v))}}}).then(u=>{il.add(e,u);const h=Es[e];delete Es[e];for(let d=0,p=h.length;d{const h=Es[e];if(h===void 0)throw this.manager.itemError(e),u;delete Es[e];for(let d=0,p=h.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class eH extends yi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Wi(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Ie().setHex(o.value);break;case"v2":r.uniforms[s].value=new pe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new D().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Ot().fromArray(o.value);break;case"m3":r.uniforms[s].value=new hi().fromArray(o.value);break;case"m4":r.uniforms[s].value=new ot().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new pe().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new pe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:a3,SpriteMaterial:o_,RawShaderMaterial:l3,ShaderMaterial:ls,PointsMaterial:gh,MeshPhysicalMaterial:us,MeshStandardMaterial:Ph,MeshPhongMaterial:c3,MeshToonMaterial:u3,MeshNormalMaterial:f3,MeshLambertMaterial:h3,MeshDepthMaterial:i_,MeshDistanceMaterial:r_,MeshBasicMaterial:zi,MeshMatcapMaterial:d3,LineDashedMaterial:p3,LineBasicMaterial:ri,Material:Mn};return new t[e]}}class rs{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const l=new w_(t);s=new qf(l),s.setCrossOrigin(this.crossOrigin);for(let u=0,h=e.length;u0){r=new qf(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=il.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(l){il.add(e,l),t&&t(l),s.manager.itemEnd(e)}).catch(function(l){r&&r(l),s.manager.itemError(e),s.manager.itemEnd(e)}),s.manager.itemStart(e)}}let Bp;class b_{static getContext(){return Bp===void 0&&(Bp=new(window.AudioContext||window.webkitAudioContext)),Bp}static setContext(e){Bp=e}}class cH extends yi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Wi(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{const l=a.slice(0);b_.getContext().decodeAudioData(l,function(h){t(h)})}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}}class uH extends Ng{constructor(e,t,i=1){super(void 0,i),this.isHemisphereLightProbe=!0;const r=new Ie().set(e),s=new Ie().set(t),o=new D(r.r,r.g,r.b),a=new D(s.r,s.g,s.b),l=Math.sqrt(Math.PI),u=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(u)}}class fH extends Ng{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const i=new Ie().set(e);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const mE=new ot,gE=new ot,ha=new ot;class hH{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Xt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Xt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,ha.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(ja*t.fov*.5)/t.zoom;let a,l;gE.elements[12]=-r,mE.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,ha.elements[0]=2*t.near/(l-a),ha.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(ha),a=-o*t.aspect-s,l=o*t.aspect-s,ha.elements[0]=2*t.near/(l-a),ha.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(ha)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(gE),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(mE)}}class T_{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=yE(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=yE();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function yE(){return(typeof performance>"u"?Date:performance).now()}const da=new D,vE=new Gn,dH=new D,pa=new D;class pH extends bt{constructor(){super(),this.type="AudioListener",this.context=b_.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new T_}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(da,vE,dH),pa.set(0,0,-1).applyQuaternion(vE),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(da.x,r),t.positionY.linearRampToValueAtTime(da.y,r),t.positionZ.linearRampToValueAtTime(da.z,r),t.forwardX.linearRampToValueAtTime(pa.x,r),t.forwardY.linearRampToValueAtTime(pa.y,r),t.forwardZ.linearRampToValueAtTime(pa.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(da.x,da.y,da.z),t.setOrientation(pa.x,pa.y,pa.z,i.x,i.y,i.z)}}class E3 extends bt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(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+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(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 e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let l=t,u=t+t;l!==u;++l)if(i[l]!==i[l+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){Gn.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;Gn.multiplyQuaternionsFlat(e,o,e,t,e,i),Gn.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const P_="\\[\\]\\.:\\/",vH=new RegExp("["+P_+"]","g"),B_="[^"+P_+"]",xH="[^"+P_.replace("\\.","")+"]",AH=/((?:WC+[\/:])*)/.source.replace("WC",B_),_H=/(WCOD+)?/.source.replace("WCOD",xH),wH=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",B_),MH=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",B_),SH=new RegExp("^"+AH+_H+wH+MH+"$"),CH=["material","materials","bones","map"];class EH{constructor(e,t,i){const r=i||Pt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class Pt{constructor(e,t,i){this.path=t,this.parsedPath=i||Pt.parseTrackName(t),this.node=Pt.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Pt.Composite(e,t,i):new Pt(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(vH,"")}static parseTrackName(e){const t=SH.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);CH.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o=s){const d=s++,p=e[d];t[p.uuid]=h,e[h]=p,t[u]=d,e[d]=l;for(let m=0,v=r;m!==v;++m){const y=i[m],x=y[d],A=y[h];y[h]=x,y[d]=A}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const u=arguments[a],h=u.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[m.uuid]=d),e[d]=m,e.pop();for(let v=0,y=r;v!==y;++v){const x=i[v];x[d]=x[p],x.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,u=l.length,h=this.nCachedObjects_,d=new Array(u);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,m=l.length;p!==m;++p){const v=l[p];d[p]=new Pt(v,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],u=e[a];t[u]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class TH{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:Da,endingEnd:Da};for(let u=0;u!==o;++u){const h=s[u].createInterpolant(null);a[u]=h,h.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=bB,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(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,u=a.sampleValues;return l[0]=s,l[1]=s+i,u[0]=e/o,u[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,u=this._propertyBindings;switch(this.blendMode){case J1:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),u[h].accumulateAdditive(a);break;case Eg:default:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),u[h].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===TB;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===EB){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const u=e<0;this._setEndings(u,!u,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=Fa,r.endingEnd=Fa):(e?r.endingStart=this.zeroSlopeAtStart?Fa:Da:r.endingStart=Wf,t?r.endingEnd=this.zeroSlopeAtEnd?Fa:Da:r.endingEnd=Wf)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const PH=new Float32Array(1);class BH extends cs{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,u=this._bindingsByRootAndName;let h=u[l];h===void 0&&(h={},u[l]=h);for(let d=0;d!==s;++d){const p=r[d],m=p.name;let v=h[m];if(v!==void 0)++v.referenceCount,o[d]=v;else{if(v=o[d],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const y=t&&t._propertyBindings[d].binding.parsedPath;v=new b3(Pt.create(i,m,y),p.ValueTypeName,p.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),o[d]=v}a[d].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let u=0;u!==i;++u)t[u]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let u=0;u!==l;++u)a[u].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return _E.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const wE=new D,Rp=new D;class kH{constructor(e=new D,t=new D){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){wE.subVectors(e,this.start),Rp.subVectors(this.end,this.start);const i=Rp.dot(Rp);let s=Rp.dot(wE)/i;return t&&(s=yn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const ME=new D;class OH extends bt{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new ft,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{TE.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(TE,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class ZH extends zr{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new ft;r.setAttribute("position",new Ve(t,3)),r.setAttribute("color",new Ve(i,3));const s=new ri({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Ie,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class qH{constructor(){this.type="ShapePath",this.color=new Ie,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Yf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(A){const _=[];for(let w=0,S=A.length;wNumber.EPSILON){if(L<0&&(R=_[P],B=-B,b=_[E],L=-L),A.yb.y)continue;if(A.y===R.y){if(A.x===R.x)return!0}else{const U=L*(A.x-R.x)-B*(A.y-R.y);if(U===0)return!0;if(U<0)continue;S=!S}}else{if(A.y!==R.y)continue;if(b.x<=A.x&&A.x<=R.x||R.x<=A.x&&A.x<=b.x)return!0}}return S}const r=is.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const u=[];if(s.length===1)return a=s[0],l=new Ya,l.curves=a.curves,u.push(l),u;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let m=[],v=0,y;p[v]=void 0,m[v]=[];for(let A=0,_=s.length;A<_;A++)a=s[A],y=a.getPoints(),o=r(y),o=e?!o:o,o?(!h&&p[v]&&v++,p[v]={s:new Ya,p:y},p[v].s.curves=a.curves,h&&v++,m[v]=[]):m[v].push({h:a,p:y[0]});if(!p[0])return t(s);if(p.length>1){let A=!1,_=0;for(let w=0,S=p.length;w0&&A===!1&&(m=d)}let x;for(let A=0,_=p.length;A<_;A++){l=p[A].s,u.push(l),x=m[A];for(let w=0,S=x.length;w>-u-14,i[l|256]=1024>>-u-14|32768,r[l]=-u-1,r[l|256]=-u-1):u<=15?(i[l]=u+15<<10,i[l|256]=u+15<<10|32768,r[l]=13,r[l|256]=13):u<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let u=l<<13,h=0;for(;!(u&8388608);)u<<=1,h-=8388608;u&=-8388609,h+=947912704,s[l]=u|h}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function e5(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=yn(n,-65504,65504),Bs.floatView[0]=n;const e=Bs.uint32View[0],t=e>>23&511;return Bs.baseTable[t]+((e&8388607)>>Bs.shiftTable[t])}function t5(n){const e=n>>10;return Bs.uint32View[0]=Bs.mantissaTable[Bs.offsetTable[e]+(n&1023)]+Bs.exponentTable[e],Bs.floatView[0]}var n5=Object.freeze({__proto__:null,fromHalfFloat:t5,toHalfFloat:e5});class i5 extends Ko{constructor(e,t,i,r,s,o){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(e,t,i,r,s,o)}}class r5 extends yh{constructor(e,t,i,r){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(e,t,i,r)}}class s5 extends vh{constructor(e,t,i,r){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(e,t,i,r)}}class o5 extends xh{constructor(e,t,i,r,s,o,a){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(e,t,i,r,s,o,a)}}class a5 extends al{constructor(e,t,i,r,s,o,a,l){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(e,t,i,r,s,o,a,l)}}class l5 extends Ah{constructor(e,t){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(e,t)}}class c5 extends _h{constructor(e,t){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(e,t)}}class u5 extends wh{constructor(e,t){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(e,t)}}class f5 extends Zc{constructor(e,t,i,r){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(e,t,i,r)}}class h5 extends qc{constructor(e,t){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(e,t)}}class d5 extends Kc{constructor(e,t,i,r){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(e,t,i,r)}}class p5 extends Ys{constructor(e,t,i,r){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(e,t,i,r)}}class m5 extends Mh{constructor(e,t,i,r,s,o){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(e,t,i,r,s,o)}}class g5 extends Sh{constructor(e,t){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(e,t)}}class y5 extends $c{constructor(e,t,i,r,s,o,a){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(e,t,i,r,s,o,a)}}class v5 extends Ch{constructor(e,t){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(e,t)}}class x5 extends Eh{constructor(e,t,i,r,s){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(e,t,i,r,s)}}class A5 extends bh{constructor(e,t,i,r,s,o){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(e,t,i,r,s,o)}}class _5 extends Th{constructor(e,t,i,r,s){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(e,t,i,r,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Jc}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Jc);const w5=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:W1,AddEquation:ba,AddOperation:oB,AdditiveAnimationBlendMode:J1,AdditiveBlending:Lx,AlphaFormat:gB,AlwaysDepth:$P,AlwaysStencilFunc:IB,AmbientLight:A3,AmbientLightProbe:fH,AnimationClip:Uc,AnimationLoader:eH,AnimationMixer:BH,AnimationObjectGroup:bH,AnimationUtils:QG,ArcCurve:ZB,ArrayCamera:jB,ArrowHelper:QH,Audio:E3,AudioAnalyser:yH,AudioContext:b_,AudioListener:pH,AudioLoader:cH,AxesHelper:ZH,BackSide:Ti,BasicDepthPacking:BB,BasicShadowMap:UP,Bone:Lg,BooleanKeyframeTrack:ll,Box2:NH,Box3:Xo,Box3Helper:YH,BoxBufferGeometry:i5,BoxGeometry:Ko,BoxHelper:XH,BufferAttribute:Ft,BufferGeometry:ft,BufferGeometryLoader:S3,ByteType:fB,Cache:il,Camera:hh,CameraHelper:JH,CanvasTexture:AG,CapsuleBufferGeometry:r5,CapsuleGeometry:yh,CatmullRomCurve3:qB,CineonToneMapping:cB,CircleBufferGeometry:s5,CircleGeometry:vh,ClampToEdgeWrapping:Wn,Clock:T_,Color:Ie,ColorKeyframeTrack:__,ColorManagement:ti,CompressedArrayTexture:xG,CompressedTexture:f_,CompressedTextureLoader:tH,ConeBufferGeometry:o5,ConeGeometry:xh,CubeCamera:e_,CubeReflectionMapping:Fo,CubeRefractionMapping:No,CubeTexture:dh,CubeTextureLoader:nH,CubeUVReflectionMapping:Xc,CubicBezierCurve:d_,CubicBezierCurve3:$B,CubicInterpolant:g3,CullFaceBack:Rx,CullFaceFront:OP,CullFaceFrontBack:EN,CullFaceNone:kP,Curve:Gr,CurvePath:t3,CustomBlending:zP,CustomToneMapping:uB,CylinderBufferGeometry:a5,CylinderGeometry:al,Cylindrical:FH,Data3DTexture:Z1,DataArrayTexture:bg,DataTexture:_c,DataTextureLoader:iH,DataUtils:n5,DecrementStencilOp:NN,DecrementWrapStencilOp:ON,DefaultLoadingManager:cc,DepthFormat:Ro,DepthStencilFormat:el,DepthTexture:JB,DirectionalLight:E_,DirectionalLightHelper:jH,DiscreteInterpolant:y3,DodecahedronBufferGeometry:l5,DodecahedronGeometry:Ah,DoubleSide:Ir,DstAlphaFactor:XP,DstColorFactor:KP,DynamicCopyUsage:qN,DynamicDrawUsage:Wa,DynamicReadUsage:KN,EdgesGeometry:n3,EllipseCurve:Ig,EqualDepth:tB,EqualStencilFunc:HN,EquirectangularReflectionMapping:Gf,EquirectangularRefractionMapping:Hf,Euler:ol,EventDispatcher:cs,ExtrudeBufferGeometry:c5,ExtrudeGeometry:_h,FileLoader:Wi,Float16BufferAttribute:Lk,Float32BufferAttribute:Ve,Float64BufferAttribute:Ik,FloatType:Is,Fog:Rg,FogExp2:Bg,FramebufferTexture:vG,FrontSide:os,Frustum:Tg,GLBufferAttribute:DH,GLSL1:ek,GLSL3:oA,GreaterDepth:iB,GreaterEqualDepth:nB,GreaterEqualStencilFunc:JN,GreaterStencilFunc:WN,GridHelper:VH,Group:Fs,HalfFloatType:Lc,HemisphereLight:x3,HemisphereLightHelper:HH,HemisphereLightProbe:uH,IcosahedronBufferGeometry:u5,IcosahedronGeometry:wh,ImageBitmapLoader:C3,ImageLoader:qf,ImageUtils:Q1,IncrementStencilOp:FN,IncrementWrapStencilOp:kN,InstancedBufferAttribute:Nc,InstancedBufferGeometry:M3,InstancedInterleavedBuffer:IH,InstancedMesh:l_,Int16BufferAttribute:Bk,Int32BufferAttribute:Rk,Int8BufferAttribute:bk,IntType:dB,InterleavedBuffer:ph,InterleavedBufferAttribute:Uo,Interpolant:eu,InterpolateDiscrete:Ic,InterpolateLinear:tl,InterpolateSmooth:um,InvertStencilOp:UN,KeepStencilOp:fm,KeyframeTrack:Hr,LOD:QB,LatheBufferGeometry:f5,LatheGeometry:Zc,Layers:Xa,LessDepth:eB,LessEqualDepth:Gm,LessEqualStencilFunc:VN,LessStencilFunc:GN,Light:Qo,LightProbe:Ng,Line:Js,Line3:kH,LineBasicMaterial:ri,LineCurve:Dg,LineCurve3:e3,LineDashedMaterial:p3,LineLoop:c_,LineSegments:zr,LinearEncoding:Oo,LinearFilter:nn,LinearInterpolant:A_,LinearMipMapLinearFilter:RN,LinearMipMapNearestFilter:BN,LinearMipmapLinearFilter:as,LinearMipmapNearestFilter:Cg,LinearSRGBColorSpace:Dc,LinearToneMapping:aB,Loader:yi,LoaderUtils:rs,LoadingManager:w_,LoopOnce:EB,LoopPingPong:TB,LoopRepeat:bB,LuminanceAlphaFormat:vB,LuminanceFormat:yB,MOUSE:wa,Material:Mn,MaterialLoader:kg,MathUtils:K1,Matrix3:hi,Matrix4:ot,MaxEquation:Nx,Mesh:Pn,MeshBasicMaterial:zi,MeshDepthMaterial:i_,MeshDistanceMaterial:r_,MeshLambertMaterial:h3,MeshMatcapMaterial:d3,MeshNormalMaterial:f3,MeshPhongMaterial:c3,MeshPhysicalMaterial:us,MeshStandardMaterial:Ph,MeshToonMaterial:u3,MinEquation:Fx,MirroredRepeatWrapping:Rc,MixOperation:sB,MultiplyBlending:Dx,MultiplyOperation:fh,NearestFilter:dn,NearestMipMapLinearFilter:PN,NearestMipMapNearestFilter:TN,NearestMipmapLinearFilter:Ac,NearestMipmapNearestFilter:Vf,NeverDepth:qP,NeverStencilFunc:zN,NoBlending:Os,NoColorSpace:LN,NoToneMapping:kr,NormalAnimationBlendMode:Eg,NormalBlending:Ha,NotEqualDepth:rB,NotEqualStencilFunc:jN,NumberKeyframeTrack:kc,Object3D:bt,ObjectLoader:aH,ObjectSpaceNormalMap:LB,OctahedronBufferGeometry:h5,OctahedronGeometry:qc,OneFactor:WP,OneMinusDstAlphaFactor:YP,OneMinusDstColorFactor:QP,OneMinusSrcAlphaFactor:V1,OneMinusSrcColorFactor:JP,OrthographicCamera:pr,PCFShadowMap:Mg,PCFSoftShadowMap:df,PMREMGenerator:lA,Path:Yf,PerspectiveCamera:Xt,Plane:Ps,PlaneBufferGeometry:d5,PlaneGeometry:Kc,PlaneHelper:KH,PointLight:C_,PointLightHelper:zH,Points:u_,PointsMaterial:gh,PolarGridHelper:WH,PolyhedronBufferGeometry:p5,PolyhedronGeometry:Ys,PositionalAudio:gH,PropertyBinding:Pt,PropertyMixer:b3,QuadraticBezierCurve:p_,QuadraticBezierCurve3:m_,Quaternion:Gn,QuaternionKeyframeTrack:zo,QuaternionLinearInterpolant:v3,RED_GREEN_RGTC2_Format:rA,RED_RGTC1_Format:CB,REVISION:Jc,RGBADepthPacking:RB,RGBAFormat:Mi,RGBAIntegerFormat:MB,RGBA_ASTC_10x10_Format:eA,RGBA_ASTC_10x5_Format:Zx,RGBA_ASTC_10x6_Format:qx,RGBA_ASTC_10x8_Format:$x,RGBA_ASTC_12x10_Format:tA,RGBA_ASTC_12x12_Format:nA,RGBA_ASTC_4x4_Format:Vx,RGBA_ASTC_5x4_Format:Wx,RGBA_ASTC_5x5_Format:jx,RGBA_ASTC_6x5_Format:Jx,RGBA_ASTC_6x6_Format:Xx,RGBA_ASTC_8x5_Format:Yx,RGBA_ASTC_8x6_Format:Kx,RGBA_ASTC_8x8_Format:Qx,RGBA_BPTC_Format:cm,RGBA_ETC2_EAC_Format:Hx,RGBA_PVRTC_2BPPV1_Format:zx,RGBA_PVRTC_4BPPV1_Format:Ux,RGBA_S3TC_DXT1_Format:om,RGBA_S3TC_DXT3_Format:am,RGBA_S3TC_DXT5_Format:lm,RGB_ETC1_Format:SB,RGB_ETC2_Format:Gx,RGB_PVRTC_2BPPV1_Format:Ox,RGB_PVRTC_4BPPV1_Format:kx,RGB_S3TC_DXT1_Format:sm,RGFormat:_B,RGIntegerFormat:wB,RawShaderMaterial:l3,Ray:Yc,Raycaster:T3,RectAreaLight:_3,RedFormat:xB,RedIntegerFormat:AB,ReinhardToneMapping:lB,RepeatWrapping:ko,ReplaceStencilOp:DN,ReverseSubtractEquation:HP,RingBufferGeometry:m5,RingGeometry:Mh,SIGNED_RED_GREEN_RGTC2_Format:sA,SIGNED_RED_RGTC1_Format:iA,SRGBColorSpace:Br,Scene:jm,ShaderChunk:gt,ShaderLib:Lr,ShaderMaterial:ls,ShadowMaterial:a3,Shape:Ya,ShapeBufferGeometry:g5,ShapeGeometry:Sh,ShapePath:qH,ShapeUtils:is,ShortType:hB,Skeleton:mh,SkeletonHelper:UH,SkinnedMesh:a_,Source:Na,Sphere:Yo,SphereBufferGeometry:y5,SphereGeometry:$c,Spherical:mA,SphericalHarmonics3:w3,SplineCurve:g_,SpotLight:S_,SpotLightHelper:OH,Sprite:KB,SpriteMaterial:o_,SrcAlphaFactor:H1,SrcAlphaSaturateFactor:ZP,SrcColorFactor:jP,StaticCopyUsage:ZN,StaticDrawUsage:jf,StaticReadUsage:YN,StereoCamera:hH,StreamCopyUsage:$N,StreamDrawUsage:XN,StreamReadUsage:QN,StringKeyframeTrack:cl,SubtractEquation:GP,SubtractiveBlending:Ix,TOUCH:Ma,TangentSpaceNormalMap:Jo,TetrahedronBufferGeometry:v5,TetrahedronGeometry:Ch,Texture:$t,TextureLoader:Bh,TorusBufferGeometry:x5,TorusGeometry:Eh,TorusKnotBufferGeometry:A5,TorusKnotGeometry:bh,Triangle:hr,TriangleFanDrawMode:Hm,TriangleStripDrawMode:X1,TrianglesDrawMode:PB,TubeBufferGeometry:_5,TubeGeometry:Th,TwoPassDoubleSide:bN,UVMapping:Sg,Uint16BufferAttribute:q1,Uint32BufferAttribute:$1,Uint8BufferAttribute:Tk,Uint8ClampedBufferAttribute:Pk,Uniform:R_,UniformsGroup:LH,UniformsLib:Pe,UniformsUtils:OB,UnsignedByteType:js,UnsignedInt248Type:Va,UnsignedIntType:wo,UnsignedShort4444Type:pB,UnsignedShort5551Type:mB,UnsignedShortType:j1,VSMShadowMap:Ia,Vector2:pe,Vector3:D,Vector4:Ot,VectorKeyframeTrack:Oc,VideoTexture:yG,WebGL1Renderer:XB,WebGL3DRenderTarget:yk,WebGLArrayRenderTarget:gk,WebGLCubeRenderTarget:t_,WebGLMultipleRenderTargets:vk,WebGLRenderTarget:Ur,WebGLRenderer:s_,WebGLUtils:WB,WireframeGeometry:o3,WrapAroundEnding:Wf,ZeroCurvatureEnding:Da,ZeroFactor:VP,ZeroSlopeEnding:Fa,ZeroStencilOp:IN,_SRGBAFormat:Vm,sRGBEncoding:Vt},Symbol.toStringTag,{value:"Module"}));var B3={exports:{}},ul={};/** +}`;function oG(n,e,t){let i=new Tg;const r=new pe,s=new pe,o=new Ot,a=new i_({depthPacking:RB}),l=new r_,u={},h=t.maxTextureSize,d={[os]:Ti,[Ti]:os,[Ir]:Ir},p=new ls({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new pe},radius:{value:4}},vertexShader:rG,fragmentShader:sG}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const v=new ft;v.setAttribute("position",new Ft(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new Pn(v,p),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Mg,this.render=function(S,E,P){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||S.length===0)return;const R=n.getRenderTarget(),b=n.getActiveCubeFace(),B=n.getActiveMipmapLevel(),L=n.state;L.setBlending(Os),L.buffers.color.setClear(1,1,1,1),L.buffers.depth.setTest(!0),L.setScissorTest(!1);for(let U=0,Z=S.length;Uh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/K.x),r.x=s.x*K.x,H.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/K.y),r.y=s.y*K.y,H.mapSize.y=s.y)),H.map===null){const ce=this.type!==Ia?{minFilter:dn,magFilter:dn}:{};H.map=new Ur(r.x,r.y,ce),H.map.texture.name=V.name+".shadowMap",H.camera.updateProjectionMatrix()}n.setRenderTarget(H.map),n.clear();const ie=H.getViewportCount();for(let ce=0;ce0||E.map&&E.alphaTest>0){const Z=L.uuid,V=E.uuid;let H=u[Z];H===void 0&&(H={},u[Z]=H);let K=H[V];K===void 0&&(K=L.clone(),H[V]=K),L=K}return L.visible=E.visible,L.wireframe=E.wireframe,B===Ia?L.side=E.shadowSide!==null?E.shadowSide:E.side:L.side=E.shadowSide!==null?E.shadowSide:d[E.side],L.alphaMap=E.alphaMap,L.alphaTest=E.alphaTest,L.map=E.map,L.clipShadows=E.clipShadows,L.clippingPlanes=E.clippingPlanes,L.clipIntersection=E.clipIntersection,L.displacementMap=E.displacementMap,L.displacementScale=E.displacementScale,L.displacementBias=E.displacementBias,L.wireframeLinewidth=E.wireframeLinewidth,L.linewidth=E.linewidth,P.isPointLight===!0&&L.isMeshDistanceMaterial===!0&&(L.referencePosition.setFromMatrixPosition(P.matrixWorld),L.nearDistance=R,L.farDistance=b),L}function w(S,E,P,R,b){if(S.visible===!1)return;if(S.layers.test(E.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&b===Ia)&&(!S.frustumCulled||i.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,S.matrixWorld);const U=e.update(S),Z=S.material;if(Array.isArray(Z)){const V=U.groups;for(let H=0,K=V.length;H=1):N.indexOf("OpenGL ES")!==-1&&(ce=parseFloat(/^OpenGL ES (\d)/.exec(N)[1]),ie=ce>=2);let J=null,Y={};const le=n.getParameter(3088),W=n.getParameter(2978),ee=new Ot().fromArray(le),ve=new Ot().fromArray(W);function ye(G,re,Ae){const Re=new Uint8Array(4),Xe=n.createTexture();n.bindTexture(G,Xe),n.texParameteri(G,10241,9728),n.texParameteri(G,10240,9728);for(let _t=0;_t"u"?!1:/OculusBrowser/g.test(navigator.userAgent),v=new WeakMap;let y;const x=new WeakMap;let A=!1;try{A=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(O,I){return A?new OffscreenCanvas(O,I):Xf("canvas")}function w(O,I,se,we){let Ce=1;if((O.width>we||O.height>we)&&(Ce=we/Math.max(O.width,O.height)),Ce<1||I===!0)if(typeof HTMLImageElement<"u"&&O instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&O instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&O instanceof ImageBitmap){const be=I?Wm:Math.floor,it=be(Ce*O.width),De=be(Ce*O.height);y===void 0&&(y=_(it,De));const ge=se?_(it,De):y;return ge.width=it,ge.height=De,ge.getContext("2d").drawImage(O,0,0,it,De),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+O.width+"x"+O.height+") to ("+it+"x"+De+")."),ge}else return"data"in O&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+O.width+"x"+O.height+")."),O;return O}function S(O){return aA(O.width)&&aA(O.height)}function E(O){return a?!1:O.wrapS!==Wn||O.wrapT!==Wn||O.minFilter!==dn&&O.minFilter!==nn}function P(O,I){return O.generateMipmaps&&I&&O.minFilter!==dn&&O.minFilter!==nn}function R(O){n.generateMipmap(O)}function b(O,I,se,we,Ce=!1){if(a===!1)return I;if(O!==null){if(n[O]!==void 0)return n[O];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+O+"'")}let be=I;return I===6403&&(se===5126&&(be=33326),se===5131&&(be=33325),se===5121&&(be=33321)),I===33319&&(se===5126&&(be=33328),se===5131&&(be=33327),se===5121&&(be=33323)),I===6408&&(se===5126&&(be=34836),se===5131&&(be=34842),se===5121&&(be=we===Vt&&Ce===!1?35907:32856),se===32819&&(be=32854),se===32820&&(be=32855)),(be===33325||be===33326||be===33327||be===33328||be===34842||be===34836)&&e.get("EXT_color_buffer_float"),be}function B(O,I,se){return P(O,se)===!0||O.isFramebufferTexture&&O.minFilter!==dn&&O.minFilter!==nn?Math.log2(Math.max(I.width,I.height))+1:O.mipmaps!==void 0&&O.mipmaps.length>0?O.mipmaps.length:O.isCompressedTexture&&Array.isArray(O.image)?I.mipmaps.length:1}function L(O){return O===dn||O===Vf||O===Ac?9728:9729}function U(O){const I=O.target;I.removeEventListener("dispose",U),V(I),I.isVideoTexture&&v.delete(I)}function Z(O){const I=O.target;I.removeEventListener("dispose",Z),K(I)}function V(O){const I=i.get(O);if(I.__webglInit===void 0)return;const se=O.source,we=x.get(se);if(we){const Ce=we[I.__cacheKey];Ce.usedTimes--,Ce.usedTimes===0&&H(O),Object.keys(we).length===0&&x.delete(se)}i.remove(O)}function H(O){const I=i.get(O);n.deleteTexture(I.__webglTexture);const se=O.source,we=x.get(se);delete we[I.__cacheKey],o.memory.textures--}function K(O){const I=O.texture,se=i.get(O),we=i.get(I);if(we.__webglTexture!==void 0&&(n.deleteTexture(we.__webglTexture),o.memory.textures--),O.depthTexture&&O.depthTexture.dispose(),O.isWebGLCubeRenderTarget)for(let Ce=0;Ce<6;Ce++)n.deleteFramebuffer(se.__webglFramebuffer[Ce]),se.__webglDepthbuffer&&n.deleteRenderbuffer(se.__webglDepthbuffer[Ce]);else{if(n.deleteFramebuffer(se.__webglFramebuffer),se.__webglDepthbuffer&&n.deleteRenderbuffer(se.__webglDepthbuffer),se.__webglMultisampledFramebuffer&&n.deleteFramebuffer(se.__webglMultisampledFramebuffer),se.__webglColorRenderbuffer)for(let Ce=0;Ce=l&&console.warn("THREE.WebGLTextures: Trying to use "+O+" texture units while this GPU supports only "+l),ie+=1,O}function J(O){const I=[];return I.push(O.wrapS),I.push(O.wrapT),I.push(O.wrapR||0),I.push(O.magFilter),I.push(O.minFilter),I.push(O.anisotropy),I.push(O.internalFormat),I.push(O.format),I.push(O.type),I.push(O.generateMipmaps),I.push(O.premultiplyAlpha),I.push(O.flipY),I.push(O.unpackAlignment),I.push(O.encoding),I.join()}function Y(O,I){const se=i.get(O);if(O.isVideoTexture&&xt(O),O.isRenderTargetTexture===!1&&O.version>0&&se.__version!==O.version){const we=O.image;if(we===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(we.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ke(se,O,I);return}}t.bindTexture(3553,se.__webglTexture,33984+I)}function le(O,I){const se=i.get(O);if(O.version>0&&se.__version!==O.version){ke(se,O,I);return}t.bindTexture(35866,se.__webglTexture,33984+I)}function W(O,I){const se=i.get(O);if(O.version>0&&se.__version!==O.version){ke(se,O,I);return}t.bindTexture(32879,se.__webglTexture,33984+I)}function ee(O,I){const se=i.get(O);if(O.version>0&&se.__version!==O.version){He(se,O,I);return}t.bindTexture(34067,se.__webglTexture,33984+I)}const ve={[ko]:10497,[Wn]:33071,[Rc]:33648},ye={[dn]:9728,[Vf]:9984,[Ac]:9986,[nn]:9729,[Cg]:9985,[as]:9987};function q(O,I,se){if(se?(n.texParameteri(O,10242,ve[I.wrapS]),n.texParameteri(O,10243,ve[I.wrapT]),(O===32879||O===35866)&&n.texParameteri(O,32882,ve[I.wrapR]),n.texParameteri(O,10240,ye[I.magFilter]),n.texParameteri(O,10241,ye[I.minFilter])):(n.texParameteri(O,10242,33071),n.texParameteri(O,10243,33071),(O===32879||O===35866)&&n.texParameteri(O,32882,33071),(I.wrapS!==Wn||I.wrapT!==Wn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(O,10240,L(I.magFilter)),n.texParameteri(O,10241,L(I.minFilter)),I.minFilter!==dn&&I.minFilter!==nn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const we=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===dn||I.minFilter!==Ac&&I.minFilter!==as||I.type===Is&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===Lc&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(n.texParameterf(O,we.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,r.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function Fe(O,I){let se=!1;O.__webglInit===void 0&&(O.__webglInit=!0,I.addEventListener("dispose",U));const we=I.source;let Ce=x.get(we);Ce===void 0&&(Ce={},x.set(we,Ce));const be=J(I);if(be!==O.__cacheKey){Ce[be]===void 0&&(Ce[be]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,se=!0),Ce[be].usedTimes++;const it=Ce[O.__cacheKey];it!==void 0&&(Ce[O.__cacheKey].usedTimes--,it.usedTimes===0&&H(I)),O.__cacheKey=be,O.__webglTexture=Ce[be].texture}return se}function ke(O,I,se){let we=3553;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(we=35866),I.isData3DTexture&&(we=32879);const Ce=Fe(O,I),be=I.source;t.bindTexture(we,O.__webglTexture,33984+se);const it=i.get(be);if(be.version!==it.__version||Ce===!0){t.activeTexture(33984+se),n.pixelStorei(37440,I.flipY),n.pixelStorei(37441,I.premultiplyAlpha),n.pixelStorei(3317,I.unpackAlignment),n.pixelStorei(37443,0);const De=E(I)&&S(I.image)===!1;let ge=w(I.image,De,!1,h);ge=At(I,ge);const Qe=S(ge)||a,rt=s.convert(I.format,I.encoding);let We=s.convert(I.type),$e=b(I.internalFormat,rt,We,I.encoding,I.isVideoTexture);q(we,I,Qe);let Je;const j=I.mipmaps,xe=a&&I.isVideoTexture!==!0,Oe=it.__version===void 0||Ce===!0,G=B(I,ge,Qe);if(I.isDepthTexture)$e=6402,a?I.type===Is?$e=36012:I.type===wo?$e=33190:I.type===Va?$e=35056:$e=33189:I.type===Is&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===Ro&&$e===6402&&I.type!==j1&&I.type!==wo&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=wo,We=s.convert(I.type)),I.format===el&&$e===6402&&($e=34041,I.type!==Va&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=Va,We=s.convert(I.type))),Oe&&(xe?t.texStorage2D(3553,1,$e,ge.width,ge.height):t.texImage2D(3553,0,$e,ge.width,ge.height,0,rt,We,null));else if(I.isDataTexture)if(j.length>0&&Qe){xe&&Oe&&t.texStorage2D(3553,G,$e,j[0].width,j[0].height);for(let re=0,Ae=j.length;re>=1,Ae>>=1}}else if(j.length>0&&Qe){xe&&Oe&&t.texStorage2D(3553,G,$e,j[0].width,j[0].height);for(let re=0,Ae=j.length;re0&&Oe++,t.texStorage2D(34067,Oe,Je,ge[0].width,ge[0].height));for(let re=0;re<6;re++)if(De){j?t.texSubImage2D(34069+re,0,0,0,ge[re].width,ge[re].height,We,$e,ge[re].data):t.texImage2D(34069+re,0,Je,ge[re].width,ge[re].height,0,We,$e,ge[re].data);for(let Ae=0;Ae=34069&&Ce<=34074)&&n.framebufferTexture2D(36160,we,Ce,i.get(se).__webglTexture,0),t.bindFramebuffer(36160,null)}function Be(O,I,se){if(n.bindRenderbuffer(36161,O),I.depthBuffer&&!I.stencilBuffer){let we=33189;if(se||je(I)){const Ce=I.depthTexture;Ce&&Ce.isDepthTexture&&(Ce.type===Is?we=36012:Ce.type===wo&&(we=33190));const be=Ke(I);je(I)?p.renderbufferStorageMultisampleEXT(36161,be,we,I.width,I.height):n.renderbufferStorageMultisample(36161,be,we,I.width,I.height)}else n.renderbufferStorage(36161,we,I.width,I.height);n.framebufferRenderbuffer(36160,36096,36161,O)}else if(I.depthBuffer&&I.stencilBuffer){const we=Ke(I);se&&je(I)===!1?n.renderbufferStorageMultisample(36161,we,35056,I.width,I.height):je(I)?p.renderbufferStorageMultisampleEXT(36161,we,35056,I.width,I.height):n.renderbufferStorage(36161,34041,I.width,I.height),n.framebufferRenderbuffer(36160,33306,36161,O)}else{const we=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let Ce=0;Ce0&&je(O)===!1){const De=be?I:[I];se.__webglMultisampledFramebuffer=n.createFramebuffer(),se.__webglColorRenderbuffer=[],t.bindFramebuffer(36160,se.__webglMultisampledFramebuffer);for(let ge=0;ge0&&je(O)===!1){const I=O.isWebGLMultipleRenderTargets?O.texture:[O.texture],se=O.width,we=O.height;let Ce=16384;const be=[],it=O.stencilBuffer?33306:36096,De=i.get(O),ge=O.isWebGLMultipleRenderTargets===!0;if(ge)for(let Qe=0;Qe0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function xt(O){const I=o.render.frame;v.get(O)!==I&&(v.set(O,I),O.update())}function At(O,I){const se=O.encoding,we=O.format,Ce=O.type;return O.isCompressedTexture===!0||O.isVideoTexture===!0||O.format===Vm||se!==Oo&&(se===Vt?a===!1?e.has("EXT_sRGB")===!0&&we===Mi?(O.format=Vm,O.minFilter=nn,O.generateMipmaps=!1):I=Q1.sRGBToLinear(I):(we!==Mi||Ce!==js)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",se)),I}this.allocateTextureUnit=N,this.resetTextureUnits=ce,this.setTexture2D=Y,this.setTexture2DArray=le,this.setTexture3D=W,this.setTextureCube=ee,this.rebindTextures=Se,this.setupRenderTarget=Ue,this.updateRenderTargetMipmap=Te,this.updateMultisampleRenderTarget=qe,this.setupDepthRenderbuffer=oe,this.setupFrameBufferTexture=_e,this.useMultisampledRTT=je}function WB(n,e,t){const i=t.isWebGL2;function r(s,o=null){let a;if(s===js)return 5121;if(s===pB)return 32819;if(s===mB)return 32820;if(s===fB)return 5120;if(s===hB)return 5122;if(s===j1)return 5123;if(s===dB)return 5124;if(s===wo)return 5125;if(s===Is)return 5126;if(s===Lc)return i?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===gB)return 6406;if(s===Mi)return 6408;if(s===yB)return 6409;if(s===vB)return 6410;if(s===Ro)return 6402;if(s===el)return 34041;if(s===Vm)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===xB)return 6403;if(s===AB)return 36244;if(s===_B)return 33319;if(s===wB)return 33320;if(s===MB)return 36249;if(s===sm||s===om||s===am||s===lm)if(o===Vt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===sm)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===om)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===am)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===lm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===sm)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===om)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===am)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===lm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===kx||s===Ox||s===Ux||s===zx)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===kx)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Ox)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Ux)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===zx)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===SB)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===Gx||s===Hx)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===Gx)return o===Vt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===Hx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Vx||s===Wx||s===jx||s===Jx||s===Xx||s===Yx||s===Kx||s===Qx||s===Zx||s===qx||s===$x||s===eA||s===tA||s===nA)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===Vx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Wx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===jx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===Jx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===Xx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===Yx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Kx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===Qx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===Zx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===qx)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===$x)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===eA)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===tA)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===nA)return o===Vt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===cm)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===cm)return o===Vt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===CB||s===iA||s===rA||s===sA)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===cm)return a.COMPRESSED_RED_RGTC1_EXT;if(s===iA)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===rA)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===sA)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Va?i?34042:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[s]!==void 0?n[s]:null}return{convert:r}}class jB extends Xt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Fs extends bt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const cG={type:"move"};class Zy{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Fs,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 Fs,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new D,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new D),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Fs,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new D,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new D),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const y of e.hand.values()){const x=t.getJointPose(y,i),A=this._getHandJoint(u,y);x!==null&&(A.matrix.fromArray(x.transform.matrix),A.matrix.decompose(A.position,A.rotation,A.scale),A.jointRadius=x.radius),A.visible=x!==null}const h=u.joints["index-finger-tip"],d=u.joints["thumb-tip"],p=h.position.distanceTo(d.position),m=.02,v=.005;u.inputState.pinching&&p>m+v?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&p<=m-v&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(cG)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Fs;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class JB extends $t{constructor(e,t,i,r,s,o,a,l,u,h){if(h=h!==void 0?h:Ro,h!==Ro&&h!==el)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&h===Ro&&(i=wo),i===void 0&&h===el&&(i=Va),super(null,r,s,o,a,l,h,i,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:dn,this.minFilter=l!==void 0?l:dn,this.flipY=!1,this.generateMipmaps=!1}}class uG extends cs{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,u=null,h=null,d=null,p=null,m=null,v=null;const y=t.getContextAttributes();let x=null,A=null;const _=[],w=[],S=new Set,E=new Map,P=new Xt;P.layers.enable(1),P.viewport=new Ot;const R=new Xt;R.layers.enable(2),R.viewport=new Ot;const b=[P,R],B=new jB;B.layers.enable(1),B.layers.enable(2);let L=null,U=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(W){let ee=_[W];return ee===void 0&&(ee=new Zy,_[W]=ee),ee.getTargetRaySpace()},this.getControllerGrip=function(W){let ee=_[W];return ee===void 0&&(ee=new Zy,_[W]=ee),ee.getGripSpace()},this.getHand=function(W){let ee=_[W];return ee===void 0&&(ee=new Zy,_[W]=ee),ee.getHandSpace()};function Z(W){const ee=w.indexOf(W.inputSource);if(ee===-1)return;const ve=_[ee];ve!==void 0&&ve.dispatchEvent({type:W.type,data:W.inputSource})}function V(){r.removeEventListener("select",Z),r.removeEventListener("selectstart",Z),r.removeEventListener("selectend",Z),r.removeEventListener("squeeze",Z),r.removeEventListener("squeezestart",Z),r.removeEventListener("squeezeend",Z),r.removeEventListener("end",V),r.removeEventListener("inputsourceschange",H);for(let W=0;W<_.length;W++){const ee=w[W];ee!==null&&(w[W]=null,_[W].disconnect(ee))}L=null,U=null,e.setRenderTarget(x),m=null,p=null,d=null,r=null,A=null,le.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(W){s=W,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(W){a=W,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(W){u=W},this.getBaseLayer=function(){return p!==null?p:m},this.getBinding=function(){return d},this.getFrame=function(){return v},this.getSession=function(){return r},this.setSession=async function(W){if(r=W,r!==null){if(x=e.getRenderTarget(),r.addEventListener("select",Z),r.addEventListener("selectstart",Z),r.addEventListener("selectend",Z),r.addEventListener("squeeze",Z),r.addEventListener("squeezestart",Z),r.addEventListener("squeezeend",Z),r.addEventListener("end",V),r.addEventListener("inputsourceschange",H),y.xrCompatible!==!0&&await t.makeXRCompatible(),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const ee={antialias:r.renderState.layers===void 0?y.antialias:!0,alpha:y.alpha,depth:y.depth,stencil:y.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,t,ee),r.updateRenderState({baseLayer:m}),A=new Ur(m.framebufferWidth,m.framebufferHeight,{format:Mi,type:js,encoding:e.outputEncoding,stencilBuffer:y.stencil})}else{let ee=null,ve=null,ye=null;y.depth&&(ye=y.stencil?35056:33190,ee=y.stencil?el:Ro,ve=y.stencil?Va:wo);const q={colorFormat:32856,depthFormat:ye,scaleFactor:s};d=new XRWebGLBinding(r,t),p=d.createProjectionLayer(q),r.updateRenderState({layers:[p]}),A=new Ur(p.textureWidth,p.textureHeight,{format:Mi,type:js,depthTexture:new JB(p.textureWidth,p.textureHeight,ve,void 0,void 0,void 0,void 0,void 0,void 0,ee),stencilBuffer:y.stencil,encoding:e.outputEncoding,samples:y.antialias?4:0});const Fe=e.properties.get(A);Fe.__ignoreDepthValues=p.ignoreDepthValues}A.isXRRenderTarget=!0,this.setFoveation(l),u=null,o=await r.requestReferenceSpace(a),le.setContext(r),le.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};function H(W){for(let ee=0;ee=0&&(w[ye]=null,_[ye].disconnect(ve))}for(let ee=0;ee=w.length){w.push(ve),ye=Fe;break}else if(w[Fe]===null){w[Fe]=ve,ye=Fe;break}if(ye===-1)break}const q=_[ye];q&&q.connect(ve)}}const K=new D,ie=new D;function ce(W,ee,ve){K.setFromMatrixPosition(ee.matrixWorld),ie.setFromMatrixPosition(ve.matrixWorld);const ye=K.distanceTo(ie),q=ee.projectionMatrix.elements,Fe=ve.projectionMatrix.elements,ke=q[14]/(q[10]-1),He=q[14]/(q[10]+1),_e=(q[9]+1)/q[5],Be=(q[9]-1)/q[5],fe=(q[8]-1)/q[0],oe=(Fe[8]+1)/Fe[0],Se=ke*fe,Ue=ke*oe,Te=ye/(-fe+oe),qe=Te*-fe;ee.matrixWorld.decompose(W.position,W.quaternion,W.scale),W.translateX(qe),W.translateZ(Te),W.matrixWorld.compose(W.position,W.quaternion,W.scale),W.matrixWorldInverse.copy(W.matrixWorld).invert();const Ke=ke+Te,je=He+Te,xt=Se-qe,At=Ue+(ye-qe),O=_e*He/je*Ke,I=Be*He/je*Ke;W.projectionMatrix.makePerspective(xt,At,O,I,Ke,je)}function N(W,ee){ee===null?W.matrixWorld.copy(W.matrix):W.matrixWorld.multiplyMatrices(ee.matrixWorld,W.matrix),W.matrixWorldInverse.copy(W.matrixWorld).invert()}this.updateCamera=function(W){if(r===null)return;B.near=R.near=P.near=W.near,B.far=R.far=P.far=W.far,(L!==B.near||U!==B.far)&&(r.updateRenderState({depthNear:B.near,depthFar:B.far}),L=B.near,U=B.far);const ee=W.parent,ve=B.cameras;N(B,ee);for(let q=0;qq&&(E.set(ye,ye.lastChangedTime),i.dispatchEvent({type:"planechanged",data:ye}))}}v=null}const le=new UB;le.setAnimationLoop(Y),this.setAnimationLoop=function(W){J=W},this.dispose=function(){}}}function fG(n,e){function t(y,x){x.color.getRGB(y.fogColor.value,kB(n)),x.isFog?(y.fogNear.value=x.near,y.fogFar.value=x.far):x.isFogExp2&&(y.fogDensity.value=x.density)}function i(y,x,A,_,w){x.isMeshBasicMaterial||x.isMeshLambertMaterial?r(y,x):x.isMeshToonMaterial?(r(y,x),h(y,x)):x.isMeshPhongMaterial?(r(y,x),u(y,x)):x.isMeshStandardMaterial?(r(y,x),d(y,x),x.isMeshPhysicalMaterial&&p(y,x,w)):x.isMeshMatcapMaterial?(r(y,x),m(y,x)):x.isMeshDepthMaterial?r(y,x):x.isMeshDistanceMaterial?(r(y,x),v(y,x)):x.isMeshNormalMaterial?r(y,x):x.isLineBasicMaterial?(s(y,x),x.isLineDashedMaterial&&o(y,x)):x.isPointsMaterial?a(y,x,A,_):x.isSpriteMaterial?l(y,x):x.isShadowMaterial?(y.color.value.copy(x.color),y.opacity.value=x.opacity):x.isShaderMaterial&&(x.uniformsNeedUpdate=!1)}function r(y,x){y.opacity.value=x.opacity,x.color&&y.diffuse.value.copy(x.color),x.emissive&&y.emissive.value.copy(x.emissive).multiplyScalar(x.emissiveIntensity),x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ti&&(y.bumpScale.value*=-1)),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ti&&y.normalScale.value.negate()),x.specularMap&&(y.specularMap.value=x.specularMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);const A=e.get(x).envMap;if(A&&(y.envMap.value=A,y.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=x.reflectivity,y.ior.value=x.ior,y.refractionRatio.value=x.refractionRatio),x.lightMap){y.lightMap.value=x.lightMap;const S=n.physicallyCorrectLights!==!0?Math.PI:1;y.lightMapIntensity.value=x.lightMapIntensity*S}x.aoMap&&(y.aoMap.value=x.aoMap,y.aoMapIntensity.value=x.aoMapIntensity);let _;x.map?_=x.map:x.specularMap?_=x.specularMap:x.displacementMap?_=x.displacementMap:x.normalMap?_=x.normalMap:x.bumpMap?_=x.bumpMap:x.roughnessMap?_=x.roughnessMap:x.metalnessMap?_=x.metalnessMap:x.alphaMap?_=x.alphaMap:x.emissiveMap?_=x.emissiveMap:x.clearcoatMap?_=x.clearcoatMap:x.clearcoatNormalMap?_=x.clearcoatNormalMap:x.clearcoatRoughnessMap?_=x.clearcoatRoughnessMap:x.iridescenceMap?_=x.iridescenceMap:x.iridescenceThicknessMap?_=x.iridescenceThicknessMap:x.specularIntensityMap?_=x.specularIntensityMap:x.specularColorMap?_=x.specularColorMap:x.transmissionMap?_=x.transmissionMap:x.thicknessMap?_=x.thicknessMap:x.sheenColorMap?_=x.sheenColorMap:x.sheenRoughnessMap&&(_=x.sheenRoughnessMap),_!==void 0&&(_.isWebGLRenderTarget&&(_=_.texture),_.matrixAutoUpdate===!0&&_.updateMatrix(),y.uvTransform.value.copy(_.matrix));let w;x.aoMap?w=x.aoMap:x.lightMap&&(w=x.lightMap),w!==void 0&&(w.isWebGLRenderTarget&&(w=w.texture),w.matrixAutoUpdate===!0&&w.updateMatrix(),y.uv2Transform.value.copy(w.matrix))}function s(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity}function o(y,x){y.dashSize.value=x.dashSize,y.totalSize.value=x.dashSize+x.gapSize,y.scale.value=x.scale}function a(y,x,A,_){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.size.value=x.size*A,y.scale.value=_*.5,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let w;x.map?w=x.map:x.alphaMap&&(w=x.alphaMap),w!==void 0&&(w.matrixAutoUpdate===!0&&w.updateMatrix(),y.uvTransform.value.copy(w.matrix))}function l(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.rotation.value=x.rotation,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let A;x.map?A=x.map:x.alphaMap&&(A=x.alphaMap),A!==void 0&&(A.matrixAutoUpdate===!0&&A.updateMatrix(),y.uvTransform.value.copy(A.matrix))}function u(y,x){y.specular.value.copy(x.specular),y.shininess.value=Math.max(x.shininess,1e-4)}function h(y,x){x.gradientMap&&(y.gradientMap.value=x.gradientMap)}function d(y,x){y.roughness.value=x.roughness,y.metalness.value=x.metalness,x.roughnessMap&&(y.roughnessMap.value=x.roughnessMap),x.metalnessMap&&(y.metalnessMap.value=x.metalnessMap),e.get(x).envMap&&(y.envMapIntensity.value=x.envMapIntensity)}function p(y,x,A){y.ior.value=x.ior,x.sheen>0&&(y.sheenColor.value.copy(x.sheenColor).multiplyScalar(x.sheen),y.sheenRoughness.value=x.sheenRoughness,x.sheenColorMap&&(y.sheenColorMap.value=x.sheenColorMap),x.sheenRoughnessMap&&(y.sheenRoughnessMap.value=x.sheenRoughnessMap)),x.clearcoat>0&&(y.clearcoat.value=x.clearcoat,y.clearcoatRoughness.value=x.clearcoatRoughness,x.clearcoatMap&&(y.clearcoatMap.value=x.clearcoatMap),x.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=x.clearcoatRoughnessMap),x.clearcoatNormalMap&&(y.clearcoatNormalScale.value.copy(x.clearcoatNormalScale),y.clearcoatNormalMap.value=x.clearcoatNormalMap,x.side===Ti&&y.clearcoatNormalScale.value.negate())),x.iridescence>0&&(y.iridescence.value=x.iridescence,y.iridescenceIOR.value=x.iridescenceIOR,y.iridescenceThicknessMinimum.value=x.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=x.iridescenceThicknessRange[1],x.iridescenceMap&&(y.iridescenceMap.value=x.iridescenceMap),x.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=x.iridescenceThicknessMap)),x.transmission>0&&(y.transmission.value=x.transmission,y.transmissionSamplerMap.value=A.texture,y.transmissionSamplerSize.value.set(A.width,A.height),x.transmissionMap&&(y.transmissionMap.value=x.transmissionMap),y.thickness.value=x.thickness,x.thicknessMap&&(y.thicknessMap.value=x.thicknessMap),y.attenuationDistance.value=x.attenuationDistance,y.attenuationColor.value.copy(x.attenuationColor)),y.specularIntensity.value=x.specularIntensity,y.specularColor.value.copy(x.specularColor),x.specularIntensityMap&&(y.specularIntensityMap.value=x.specularIntensityMap),x.specularColorMap&&(y.specularColorMap.value=x.specularColorMap)}function m(y,x){x.matcap&&(y.matcap.value=x.matcap)}function v(y,x){y.referencePosition.value.copy(x.referencePosition),y.nearDistance.value=x.nearDistance,y.farDistance.value=x.farDistance}return{refreshFogUniforms:t,refreshMaterialUniforms:i}}function hG(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(35375):0;function l(_,w){const S=w.program;i.uniformBlockBinding(_,S)}function u(_,w){let S=r[_.id];S===void 0&&(v(_),S=h(_),r[_.id]=S,_.addEventListener("dispose",x));const E=w.program;i.updateUBOMapping(_,E);const P=e.render.frame;s[_.id]!==P&&(p(_),s[_.id]=P)}function h(_){const w=d();_.__bindingPointIndex=w;const S=n.createBuffer(),E=_.__size,P=_.usage;return n.bindBuffer(35345,S),n.bufferData(35345,E,P),n.bindBuffer(35345,null),n.bindBufferBase(35345,w,S),S}function d(){for(let _=0;_0){P=S%E;const Z=E-P;P!==0&&Z-L.boundary<0&&(S+=E-P,B.__offset=S)}S+=L.storage}return P=S%E,P>0&&(S+=E-P),_.__size=S,_.__cache={},this}function y(_){const w={boundary:0,storage:0};return typeof _=="number"?(w.boundary=4,w.storage=4):_.isVector2?(w.boundary=8,w.storage=8):_.isVector3||_.isColor?(w.boundary=16,w.storage=12):_.isVector4?(w.boundary=16,w.storage=16):_.isMatrix3?(w.boundary=48,w.storage=48):_.isMatrix4?(w.boundary=64,w.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),w}function x(_){const w=_.target;w.removeEventListener("dispose",x);const S=o.indexOf(w.__bindingPointIndex);o.splice(S,1),n.deleteBuffer(r[w.id]),delete r[w.id],delete s[w.id]}function A(){for(const _ in r)n.deleteBuffer(r[_]);o=[],r={},s={}}return{bind:l,update:u,dispose:A}}function dG(){const n=Xf("canvas");return n.style.display="block",n}function s_(n={}){this.isWebGLRenderer=!0;const e=n.canvas!==void 0?n.canvas:dG(),t=n.context!==void 0?n.context:null,i=n.depth!==void 0?n.depth:!0,r=n.stencil!==void 0?n.stencil:!0,s=n.antialias!==void 0?n.antialias:!1,o=n.premultipliedAlpha!==void 0?n.premultipliedAlpha:!0,a=n.preserveDrawingBuffer!==void 0?n.preserveDrawingBuffer:!1,l=n.powerPreference!==void 0?n.powerPreference:"default",u=n.failIfMajorPerformanceCaveat!==void 0?n.failIfMajorPerformanceCaveat:!1;let h;t!==null?h=t.getContextAttributes().alpha:h=n.alpha!==void 0?n.alpha:!1;let d=null,p=null;const m=[],v=[];this.domElement=e,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.outputEncoding=Oo,this.physicallyCorrectLights=!1,this.toneMapping=kr,this.toneMappingExposure=1;const y=this;let x=!1,A=0,_=0,w=null,S=-1,E=null;const P=new Ot,R=new Ot;let b=null,B=e.width,L=e.height,U=1,Z=null,V=null;const H=new Ot(0,0,B,L),K=new Ot(0,0,B,L);let ie=!1;const ce=new Tg;let N=!1,J=!1,Y=null;const le=new ot,W=new pe,ee=new D,ve={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ye(){return w===null?U:1}let q=t;function Fe(F,te){for(let de=0;de0?p=v[v.length-1]:p=null,m.pop(),m.length>0?d=m[m.length-1]:d=null};function Nt(F,te,de,$){if(F.visible===!1)return;if(F.layers.test(te.layers)){if(F.isGroup)de=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(te);else if(F.isLight)p.pushLight(F),F.castShadow&&p.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||ce.intersectsSprite(F)){$&&ee.setFromMatrixPosition(F.matrixWorld).applyMatrix4(le);const lt=Ke.update(F),dt=F.material;dt.visible&&d.push(F,lt,dt,de,ee.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(F.isSkinnedMesh&&F.skeleton.frame!==Be.render.frame&&(F.skeleton.update(),F.skeleton.frame=Be.render.frame),!F.frustumCulled||ce.intersectsObject(F))){$&&ee.setFromMatrixPosition(F.matrixWorld).applyMatrix4(le);const lt=Ke.update(F),dt=F.material;if(Array.isArray(dt)){const yt=lt.groups;for(let Ct=0,wt=yt.length;Ct0&&Xn(me,te,de),$&&_e.viewport(P.copy($)),me.length>0&&Bt(me,te,de),tt.length>0&&Bt(tt,te,de),lt.length>0&&Bt(lt,te,de),_e.buffers.depth.setTest(!0),_e.buffers.depth.setMask(!0),_e.buffers.color.setMask(!0),_e.setPolygonOffset(!1)}function Xn(F,te,de){const $=He.isWebGL2;Y===null&&(Y=new Ur(1,1,{generateMipmaps:!0,type:ke.has("EXT_color_buffer_half_float")?Lc:js,minFilter:as,samples:$&&s===!0?4:0})),y.getDrawingBufferSize(W),$?Y.setSize(W.x,W.y):Y.setSize(Wm(W.x),Wm(W.y));const me=y.getRenderTarget();y.setRenderTarget(Y),y.clear();const tt=y.toneMapping;y.toneMapping=kr,Bt(F,te,de),y.toneMapping=tt,oe.updateMultisampleRenderTarget(Y),oe.updateRenderTargetMipmap(Y),y.setRenderTarget(me)}function Bt(F,te,de){const $=te.isScene===!0?te.overrideMaterial:null;for(let me=0,tt=F.length;me0&&oe.useMultisampledRTT(F)===!1?me=fe.get(F).__webglMultisampledFramebuffer:me=wt,P.copy(F.viewport),R.copy(F.scissor),b=F.scissorTest}else P.copy(H).multiplyScalar(U).floor(),R.copy(K).multiplyScalar(U).floor(),b=ie;if(_e.bindFramebuffer(36160,me)&&He.drawBuffers&&$&&_e.drawBuffers(F,me),_e.viewport(P),_e.scissor(R),_e.setScissorTest(b),tt){const yt=fe.get(F.texture);q.framebufferTexture2D(36160,36064,34069+te,yt.__webglTexture,de)}else if(lt){const yt=fe.get(F.texture),Ct=te||0;q.framebufferTextureLayer(36160,36064,yt.__webglTexture,de||0,Ct)}S=-1},this.readRenderTargetPixels=function(F,te,de,$,me,tt,lt){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let dt=fe.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&<!==void 0&&(dt=dt[lt]),dt){_e.bindFramebuffer(36160,dt);try{const yt=F.texture,Ct=yt.format,wt=yt.type;if(Ct!==Mi&&De.convert(Ct)!==q.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Mt=wt===Lc&&(ke.has("EXT_color_buffer_half_float")||He.isWebGL2&&ke.has("EXT_color_buffer_float"));if(wt!==js&&De.convert(wt)!==q.getParameter(35738)&&!(wt===Is&&(He.isWebGL2||ke.has("OES_texture_float")||ke.has("WEBGL_color_buffer_float")))&&!Mt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}te>=0&&te<=F.width-$&&de>=0&&de<=F.height-me&&q.readPixels(te,de,$,me,De.convert(Ct),De.convert(wt),tt)}finally{const yt=w!==null?fe.get(w).__webglFramebuffer:null;_e.bindFramebuffer(36160,yt)}}},this.copyFramebufferToTexture=function(F,te,de=0){const $=Math.pow(2,-de),me=Math.floor(te.image.width*$),tt=Math.floor(te.image.height*$);oe.setTexture2D(te,0),q.copyTexSubImage2D(3553,de,0,0,F.x,F.y,me,tt),_e.unbindTexture()},this.copyTextureToTexture=function(F,te,de,$=0){const me=te.image.width,tt=te.image.height,lt=De.convert(de.format),dt=De.convert(de.type);oe.setTexture2D(de,0),q.pixelStorei(37440,de.flipY),q.pixelStorei(37441,de.premultiplyAlpha),q.pixelStorei(3317,de.unpackAlignment),te.isDataTexture?q.texSubImage2D(3553,$,F.x,F.y,me,tt,lt,dt,te.image.data):te.isCompressedTexture?q.compressedTexSubImage2D(3553,$,F.x,F.y,te.mipmaps[0].width,te.mipmaps[0].height,lt,te.mipmaps[0].data):q.texSubImage2D(3553,$,F.x,F.y,lt,dt,te.image),$===0&&de.generateMipmaps&&q.generateMipmap(3553),_e.unbindTexture()},this.copyTextureToTexture3D=function(F,te,de,$,me=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const tt=F.max.x-F.min.x+1,lt=F.max.y-F.min.y+1,dt=F.max.z-F.min.z+1,yt=De.convert($.format),Ct=De.convert($.type);let wt;if($.isData3DTexture)oe.setTexture3D($,0),wt=32879;else if($.isDataArrayTexture)oe.setTexture2DArray($,0),wt=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}q.pixelStorei(37440,$.flipY),q.pixelStorei(37441,$.premultiplyAlpha),q.pixelStorei(3317,$.unpackAlignment);const Mt=q.getParameter(3314),ln=q.getParameter(32878),si=q.getParameter(3316),Ar=q.getParameter(3315),fs=q.getParameter(32877),Kt=de.isCompressedTexture?de.mipmaps[0]:de.image;q.pixelStorei(3314,Kt.width),q.pixelStorei(32878,Kt.height),q.pixelStorei(3316,F.min.x),q.pixelStorei(3315,F.min.y),q.pixelStorei(32877,F.min.z),de.isDataTexture||de.isData3DTexture?q.texSubImage3D(wt,me,te.x,te.y,te.z,tt,lt,dt,yt,Ct,Kt.data):de.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),q.compressedTexSubImage3D(wt,me,te.x,te.y,te.z,tt,lt,dt,yt,Kt.data)):q.texSubImage3D(wt,me,te.x,te.y,te.z,tt,lt,dt,yt,Ct,Kt),q.pixelStorei(3314,Mt),q.pixelStorei(32878,ln),q.pixelStorei(3316,si),q.pixelStorei(3315,Ar),q.pixelStorei(32877,fs),me===0&&$.generateMipmaps&&q.generateMipmap(wt),_e.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?oe.setTextureCube(F,0):F.isData3DTexture?oe.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?oe.setTexture2DArray(F,0):oe.setTexture2D(F,0),_e.unbindTexture()},this.resetState=function(){A=0,_=0,w=null,_e.reset(),ge.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class XB extends s_{}XB.prototype.isWebGL1Renderer=!0;class Bg{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Ie(e),this.density=t}clone(){return new Bg(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Rg{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Ie(e),this.near=t,this.far=i}clone(){return new Rg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class jm extends bt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class ph{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=jf,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Hi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;re.far||t.push({distance:l,point:Ou.clone(),uv:hr.getUV(Ou,gp,zu,yp,GC,qy,HC,new pe),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function vp(n,e,t,i,r,s){Wl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Uu.x=s*Wl.x-r*Wl.y,Uu.y=r*Wl.x+s*Wl.y):Uu.copy(Wl),n.copy(e),n.x+=Uu.x,n.y+=Uu.y,n.applyMatrix4(YB)}const xp=new D,VC=new D;class QB extends bt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){xp.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(xp);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){xp.setFromMatrixPosition(e.matrixWorld),VC.setFromMatrixPosition(this.matrixWorld);const i=xp.distanceTo(VC)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;rl)continue;p.applyMatrix4(this.matrixWorld);const b=e.ray.origin.distanceTo(p);be.far||t.push({distance:b,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const A=Math.max(0,o.start),_=Math.min(x.count,o.start+o.count);for(let w=A,S=_-1;wl)continue;p.applyMatrix4(this.matrixWorld);const P=e.ray.origin.distanceTo(p);Pe.far||t.push({distance:P,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class yG extends $t{constructor(e,t,i,r,s,o,a,l,u){super(e,t,i,r,s,o,a,l,u),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:nn,this.magFilter=s!==void 0?s:nn,this.generateMipmaps=!1;const h=this;function d(){h.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class vG extends $t{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=dn,this.minFilter=dn,this.generateMipmaps=!1,this.needsUpdate=!0}}class f_ extends $t{constructor(e,t,i,r,s,o,a,l,u,h,d,p){super(null,o,a,l,u,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class xG extends f_{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Wn}}class AG extends $t{constructor(e,t,i,r,s,o,a,l,u){super(e,t,i,r,s,o,a,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Gr{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,l=s-1,u;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),u=i[r]-o,u<0)a=r+1;else if(u>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,m=(o-h)/p;return(r+m)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new pe:new D);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new D,r=[],s=[],o=[],a=new D,l=new ot;for(let m=0;m<=e;m++){const v=m/e;r[m]=this.getTangentAt(v,new D)}s[0]=new D,o[0]=new D;let u=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=u&&(u=h,i.set(1,0,0)),d<=u&&(u=d,i.set(0,1,0)),p<=u&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos(yn(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,v))}o[m].crossVectors(r[m],s[m])}if(t===!0){let m=Math.acos(yn(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let v=1;v<=e;v++)s[v].applyMatrix4(l.makeRotationAxis(r[v],m*v)),o[v].crossVectors(r[v],s[v])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Ig extends Gr{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const i=t||new pe,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let u,h;this.closed||a>0?u=r[(a-1)%s]:(Sp.subVectors(r[0],r[1]).add(r[0]),u=Sp);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(rE(a,l.x,u.x,h.x,d.x),rE(a,l.y,u.y,h.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),u=l===0?0:1-o/l;return a.getPointAt(u,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const d=u.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(u);const h=u.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Zc extends ft{constructor(e=[new pe(0,-.5),new pe(.5,0),new pe(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=yn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],u=[],h=1/t,d=new D,p=new pe,m=new D,v=new D,y=new D;let x=0,A=0;for(let _=0;_<=e.length-1;_++)switch(_){case 0:x=e[_+1].x-e[_].x,A=e[_+1].y-e[_].y,m.x=A*1,m.y=-x,m.z=A*0,y.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(y.x,y.y,y.z);break;default:x=e[_+1].x-e[_].x,A=e[_+1].y-e[_].y,m.x=A*1,m.y=-x,m.z=A*0,v.copy(m),m.x+=y.x,m.y+=y.y,m.z+=y.z,m.normalize(),l.push(m.x,m.y,m.z),y.copy(v)}for(let _=0;_<=t;_++){const w=i+_*h*r,S=Math.sin(w),E=Math.cos(w);for(let P=0;P<=e.length-1;P++){d.x=e[P].x*S,d.y=e[P].y,d.z=e[P].x*E,o.push(d.x,d.y,d.z),p.x=_/t,p.y=P/(e.length-1),a.push(p.x,p.y);const R=l[3*P+0]*S,b=l[3*P+1],B=l[3*P+0]*E;u.push(R,b,B)}}for(let _=0;_0&&w(!0),t>0&&w(!1)),this.setIndex(h),this.setAttribute("position",new Ve(d,3)),this.setAttribute("normal",new Ve(p,3)),this.setAttribute("uv",new Ve(m,2));function _(){const S=new D,E=new D;let P=0;const R=(t-e)/i;for(let b=0;b<=s;b++){const B=[],L=b/s,U=L*(t-e)+e;for(let Z=0;Z<=r;Z++){const V=Z/r,H=V*l+a,K=Math.sin(H),ie=Math.cos(H);E.x=U*K,E.y=-L*i+x,E.z=U*ie,d.push(E.x,E.y,E.z),S.set(K,R,ie).normalize(),p.push(S.x,S.y,S.z),m.push(V,1-L),B.push(v++)}y.push(B)}for(let b=0;b.9&&R<.1&&(w<.2&&(o[_+0]+=1),S<.2&&(o[_+2]+=1),E<.2&&(o[_+4]+=1))}}function p(_){s.push(_.x,_.y,_.z)}function m(_,w){const S=_*3;w.x=e[S+0],w.y=e[S+1],w.z=e[S+2]}function v(){const _=new D,w=new D,S=new D,E=new D,P=new pe,R=new pe,b=new pe;for(let B=0,L=0;B80*t){a=u=n[0],l=h=n[1];for(let v=t;vu&&(u=d),p>h&&(h=p);m=Math.max(u-a,h-l),m=m!==0?32767/m:0}return Kf(s,o,t,a,l,m,0),o}};function i3(n,e,t,i,r){let s,o;if(r===WG(n,e,t,i)>0)for(s=e;s=e;s-=i)o=sE(s,n[s],n[s+1],o);return o&&Fg(o,o.next)&&(Zf(o),o=o.next),o}function nl(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Fg(t,t.next)||rn(t.prev,t,t.next)===0)){if(Zf(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Kf(n,e,t,i,r,s,o){if(!n)return;!o&&s&&OG(n,i,r,s);let a=n,l,u;for(;n.prev!==n.next;){if(l=n.prev,u=n.next,s?BG(n,i,r,s):PG(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(u.i/t|0),Zf(n),n=u.next,a=u.next;continue}if(n=u,n===a){o?o===1?(n=RG(nl(n),e,t),Kf(n,e,t,i,r,s,2)):o===2&&LG(n,e,t,i,r,s):Kf(nl(n),e,t,i,r,s,1);break}}}function PG(n){const e=n.prev,t=n,i=n.next;if(rn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,u=i.y,h=rs?r>o?r:o:s>o?s:o,m=a>l?a>u?a:u:l>u?l:u;let v=i.next;for(;v!==e;){if(v.x>=h&&v.x<=p&&v.y>=d&&v.y<=m&&lc(r,a,s,l,o,u,v.x,v.y)&&rn(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function BG(n,e,t,i){const r=n.prev,s=n,o=n.next;if(rn(r,s,o)>=0)return!1;const a=r.x,l=s.x,u=o.x,h=r.y,d=s.y,p=o.y,m=al?a>u?a:u:l>u?l:u,x=h>d?h>p?h:p:d>p?d:p,A=fA(m,v,e,t,i),_=fA(y,x,e,t,i);let w=n.prevZ,S=n.nextZ;for(;w&&w.z>=A&&S&&S.z<=_;){if(w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==r&&w!==o&&lc(a,h,l,d,u,p,w.x,w.y)&&rn(w.prev,w,w.next)>=0||(w=w.prevZ,S.x>=m&&S.x<=y&&S.y>=v&&S.y<=x&&S!==r&&S!==o&&lc(a,h,l,d,u,p,S.x,S.y)&&rn(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;w&&w.z>=A;){if(w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==r&&w!==o&&lc(a,h,l,d,u,p,w.x,w.y)&&rn(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;S&&S.z<=_;){if(S.x>=m&&S.x<=y&&S.y>=v&&S.y<=x&&S!==r&&S!==o&&lc(a,h,l,d,u,p,S.x,S.y)&&rn(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function RG(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Fg(r,s)&&r3(r,i,i.next,s)&&Qf(r,s)&&Qf(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Zf(i),Zf(i.next),i=n=s),i=i.next}while(i!==n);return nl(i)}function LG(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&GG(o,a)){let l=s3(o,a);o=nl(o,o.next),l=nl(l,l.next),Kf(o,e,t,i,r,s,0),Kf(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function IG(n,e,t,i){const r=[];let s,o,a,l,u;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x=t.x&&t.x>=l&&s!==t.x&&lc(or.x||t.x===r.x&&kG(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function kG(n,e){return rn(n.prev,n,e.prev)<0&&rn(e.next,n,n.next)<0}function OG(n,e,t,i){let r=n;do r.z===0&&(r.z=fA(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,UG(r)}function UG(n){let e,t,i,r,s,o,a,l,u=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,u*=2}while(o>1);return n}function fA(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function zG(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function GG(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!HG(n,e)&&(Qf(n,e)&&Qf(e,n)&&VG(n,e)&&(rn(n.prev,n,e.prev)||rn(n,e.prev,e))||Fg(n,e)&&rn(n.prev,n,n.next)>0&&rn(e.prev,e,e.next)>0)}function rn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Fg(n,e){return n.x===e.x&&n.y===e.y}function r3(n,e,t,i){const r=Pp(rn(n,e,t)),s=Pp(rn(n,e,i)),o=Pp(rn(t,i,n)),a=Pp(rn(t,i,e));return!!(r!==s&&o!==a||r===0&&Tp(n,t,e)||s===0&&Tp(n,i,e)||o===0&&Tp(t,n,i)||a===0&&Tp(t,e,i))}function Tp(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Pp(n){return n>0?1:n<0?-1:0}function HG(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&r3(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Qf(n,e){return rn(n.prev,n,n.next)<0?rn(n,e,n.next)>=0&&rn(n,n.prev,e)>=0:rn(n,e,n.prev)<0||rn(n,n.next,e)<0}function VG(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function s3(n,e){const t=new hA(n.i,n.x,n.y),i=new hA(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function sE(n,e,t,i){const r=new hA(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Zf(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function hA(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function WG(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function aE(n,e){for(let t=0;tNumber.EPSILON){const se=Math.sqrt(O),we=Math.sqrt(xt*xt+At*At),Ce=oe.x-je/se,be=oe.y+Ke/se,it=Se.x-At/we,De=Se.y+xt/we,ge=((it-Ce)*At-(De-be)*xt)/(Ke*At-je*xt);Ue=Ce+Ke*ge-fe.x,Te=be+je*ge-fe.y;const Qe=Ue*Ue+Te*Te;if(Qe<=2)return new pe(Ue,Te);qe=Math.sqrt(Qe/2)}else{let se=!1;Ke>Number.EPSILON?xt>Number.EPSILON&&(se=!0):Ke<-Number.EPSILON?xt<-Number.EPSILON&&(se=!0):Math.sign(je)===Math.sign(At)&&(se=!0),se?(Ue=-je,Te=Ke,qe=Math.sqrt(O)):(Ue=Ke,Te=je,qe=Math.sqrt(O/2))}return new pe(Ue/qe,Te/qe)}const J=[];for(let fe=0,oe=H.length,Se=oe-1,Ue=fe+1;fe=0;fe--){const oe=fe/x,Se=m*Math.cos(oe*Math.PI/2),Ue=v*Math.sin(oe*Math.PI/2)+y;for(let Te=0,qe=H.length;Te=0;){const Ue=Se;let Te=Se-1;Te<0&&(Te=fe.length-1);for(let qe=0,Ke=h+x*2;qe0)&&m.push(w,S,P),(A!==i-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class c3 extends Mn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Ie(16777215),this.specular=new Ie(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ie(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=fh,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class u3 extends Mn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ie(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ie(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class f3 extends Mn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class h3 extends Mn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Ie(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ie(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=fh,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class d3 extends Mn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ie(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Jo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class p3 extends ri{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function cr(n,e,t){return v_(n)?new n.constructor(n.subarray(e,t!==void 0?t:n.length)):n.slice(e,t)}function ka(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function v_(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function m3(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function dA(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function x_(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function YG(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){d.push(u.times[m]);for(let y=0;ys.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[v]){const A=v*d+h,_=A+d-h;y=cr(a.values,A,_)}else{const A=a.createInterpolant(),_=h,w=d-h;A.evaluate(s),y=cr(A.resultBuffer,_,w)}l==="quaternion"&&new Gn().fromArray(y).normalize().conjugate().toArray(y);const x=u.times.length;for(let A=0;A=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=cr(i,s,o),this.values=cr(this.values,s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&v_(r))for(let a=0,l=r.length;a!==l;++a){const u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=cr(this.times),t=cr(this.values),i=this.getValueSize(),r=this.getInterpolation()===um,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,u=0;u!==i;++u)t[l+u]=t[a+u];++o}return o!==e.length?(this.times=cr(e,0,o),this.values=cr(t,0,o*i)):(this.times=e,this.values=t),this}clone(){const e=cr(this.times,0),t=cr(this.values,0),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Hr.prototype.TimeBufferType=Float32Array;Hr.prototype.ValueBufferType=Float32Array;Hr.prototype.DefaultInterpolation=tl;class ll extends Hr{}ll.prototype.ValueTypeName="bool";ll.prototype.ValueBufferType=Array;ll.prototype.DefaultInterpolation=Ic;ll.prototype.InterpolantFactoryMethodLinear=void 0;ll.prototype.InterpolantFactoryMethodSmooth=void 0;class __ extends Hr{}__.prototype.ValueTypeName="color";class kc extends Hr{}kc.prototype.ValueTypeName="number";class v3 extends eu{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let u=e*a;for(let h=u+a;u!==h;u+=4)Gn.slerpFlat(s,0,o,u-a,o,u,l);return s}}class zo extends Hr{InterpolantFactoryMethodLinear(e){return new v3(this.times,this.values,this.getValueSize(),e)}}zo.prototype.ValueTypeName="quaternion";zo.prototype.DefaultInterpolation=tl;zo.prototype.InterpolantFactoryMethodSmooth=void 0;class cl extends Hr{}cl.prototype.ValueTypeName="string";cl.prototype.ValueBufferType=Array;cl.prototype.DefaultInterpolation=Ic;cl.prototype.InterpolantFactoryMethodLinear=void 0;cl.prototype.InterpolantFactoryMethodSmooth=void 0;class Oc extends Hr{}Oc.prototype.ValueTypeName="vector";class Uc{constructor(e,t=-1,i,r=Eg){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Hi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(qG(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Hr.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const d=h[1];let p=r[d];p||(r[d]=p=[]),p.push(u)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,p,m,v,y){if(m.length!==0){const x=[],A=[];x_(m,x,A,v),x.length!==0&&y.push(new d(p,x,A))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(Es[e]!==void 0){Es[e].push({onLoad:t,onProgress:i,onError:r});return}Es[e]=[],Es[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const h=Es[e],d=u.body.getReader(),p=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),m=p?parseInt(p):0,v=m!==0;let y=0;const x=new ReadableStream({start(A){_();function _(){d.read().then(({done:w,value:S})=>{if(w)A.close();else{y+=S.byteLength;const E=new ProgressEvent("progress",{lengthComputable:v,loaded:y,total:m});for(let P=0,R=h.length;P{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return u.json();default:if(a===void 0)return u.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,m=new TextDecoder(p);return u.arrayBuffer().then(v=>m.decode(v))}}}).then(u=>{il.add(e,u);const h=Es[e];delete Es[e];for(let d=0,p=h.length;d{const h=Es[e];if(h===void 0)throw this.manager.itemError(e),u;delete Es[e];for(let d=0,p=h.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class eH extends yi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Wi(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Ie().setHex(o.value);break;case"v2":r.uniforms[s].value=new pe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new D().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Ot().fromArray(o.value);break;case"m3":r.uniforms[s].value=new hi().fromArray(o.value);break;case"m4":r.uniforms[s].value=new ot().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new pe().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new pe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:a3,SpriteMaterial:o_,RawShaderMaterial:l3,ShaderMaterial:ls,PointsMaterial:gh,MeshPhysicalMaterial:us,MeshStandardMaterial:Ph,MeshPhongMaterial:c3,MeshToonMaterial:u3,MeshNormalMaterial:f3,MeshLambertMaterial:h3,MeshDepthMaterial:i_,MeshDistanceMaterial:r_,MeshBasicMaterial:zi,MeshMatcapMaterial:d3,LineDashedMaterial:p3,LineBasicMaterial:ri,Material:Mn};return new t[e]}}class rs{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const l=new w_(t);s=new qf(l),s.setCrossOrigin(this.crossOrigin);for(let u=0,h=e.length;u0){r=new qf(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=il.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(l){il.add(e,l),t&&t(l),s.manager.itemEnd(e)}).catch(function(l){r&&r(l),s.manager.itemError(e),s.manager.itemEnd(e)}),s.manager.itemStart(e)}}let Bp;class b_{static getContext(){return Bp===void 0&&(Bp=new(window.AudioContext||window.webkitAudioContext)),Bp}static setContext(e){Bp=e}}class cH extends yi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Wi(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{const l=a.slice(0);b_.getContext().decodeAudioData(l,function(h){t(h)})}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}}class uH extends Ng{constructor(e,t,i=1){super(void 0,i),this.isHemisphereLightProbe=!0;const r=new Ie().set(e),s=new Ie().set(t),o=new D(r.r,r.g,r.b),a=new D(s.r,s.g,s.b),l=Math.sqrt(Math.PI),u=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(u)}}class fH extends Ng{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const i=new Ie().set(e);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const mE=new ot,gE=new ot,ha=new ot;class hH{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Xt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Xt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,ha.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(ja*t.fov*.5)/t.zoom;let a,l;gE.elements[12]=-r,mE.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,ha.elements[0]=2*t.near/(l-a),ha.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(ha),a=-o*t.aspect-s,l=o*t.aspect-s,ha.elements[0]=2*t.near/(l-a),ha.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(ha)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(gE),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(mE)}}class T_{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=yE(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=yE();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function yE(){return(typeof performance>"u"?Date:performance).now()}const da=new D,vE=new Gn,dH=new D,pa=new D;class pH extends bt{constructor(){super(),this.type="AudioListener",this.context=b_.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new T_}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(da,vE,dH),pa.set(0,0,-1).applyQuaternion(vE),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(da.x,r),t.positionY.linearRampToValueAtTime(da.y,r),t.positionZ.linearRampToValueAtTime(da.z,r),t.forwardX.linearRampToValueAtTime(pa.x,r),t.forwardY.linearRampToValueAtTime(pa.y,r),t.forwardZ.linearRampToValueAtTime(pa.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(da.x,da.y,da.z),t.setOrientation(pa.x,pa.y,pa.z,i.x,i.y,i.z)}}class E3 extends bt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(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+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(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 e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let l=t,u=t+t;l!==u;++l)if(i[l]!==i[l+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){Gn.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;Gn.multiplyQuaternionsFlat(e,o,e,t,e,i),Gn.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const P_="\\[\\]\\.:\\/",vH=new RegExp("["+P_+"]","g"),B_="[^"+P_+"]",xH="[^"+P_.replace("\\.","")+"]",AH=/((?:WC+[\/:])*)/.source.replace("WC",B_),_H=/(WCOD+)?/.source.replace("WCOD",xH),wH=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",B_),MH=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",B_),SH=new RegExp("^"+AH+_H+wH+MH+"$"),CH=["material","materials","bones","map"];class EH{constructor(e,t,i){const r=i||Pt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class Pt{constructor(e,t,i){this.path=t,this.parsedPath=i||Pt.parseTrackName(t),this.node=Pt.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Pt.Composite(e,t,i):new Pt(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(vH,"")}static parseTrackName(e){const t=SH.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);CH.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o=s){const d=s++,p=e[d];t[p.uuid]=h,e[h]=p,t[u]=d,e[d]=l;for(let m=0,v=r;m!==v;++m){const y=i[m],x=y[d],A=y[h];y[h]=x,y[d]=A}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const u=arguments[a],h=u.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[m.uuid]=d),e[d]=m,e.pop();for(let v=0,y=r;v!==y;++v){const x=i[v];x[d]=x[p],x.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,u=l.length,h=this.nCachedObjects_,d=new Array(u);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,m=l.length;p!==m;++p){const v=l[p];d[p]=new Pt(v,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],u=e[a];t[u]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class TH{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:Da,endingEnd:Da};for(let u=0;u!==o;++u){const h=s[u].createInterpolant(null);a[u]=h,h.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=bB,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(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,u=a.sampleValues;return l[0]=s,l[1]=s+i,u[0]=e/o,u[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,u=this._propertyBindings;switch(this.blendMode){case J1:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),u[h].accumulateAdditive(a);break;case Eg:default:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),u[h].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===TB;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===EB){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const u=e<0;this._setEndings(u,!u,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=Fa,r.endingEnd=Fa):(e?r.endingStart=this.zeroSlopeAtStart?Fa:Da:r.endingStart=Wf,t?r.endingEnd=this.zeroSlopeAtEnd?Fa:Da:r.endingEnd=Wf)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const PH=new Float32Array(1);class BH extends cs{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,u=this._bindingsByRootAndName;let h=u[l];h===void 0&&(h={},u[l]=h);for(let d=0;d!==s;++d){const p=r[d],m=p.name;let v=h[m];if(v!==void 0)++v.referenceCount,o[d]=v;else{if(v=o[d],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const y=t&&t._propertyBindings[d].binding.parsedPath;v=new b3(Pt.create(i,m,y),p.ValueTypeName,p.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),o[d]=v}a[d].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let u=0;u!==i;++u)t[u]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let u=0;u!==l;++u)a[u].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return _E.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const wE=new D,Rp=new D;class kH{constructor(e=new D,t=new D){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){wE.subVectors(e,this.start),Rp.subVectors(this.end,this.start);const i=Rp.dot(Rp);let s=Rp.dot(wE)/i;return t&&(s=yn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const ME=new D;class OH extends bt{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new ft,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{TE.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(TE,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class ZH extends zr{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new ft;r.setAttribute("position",new Ve(t,3)),r.setAttribute("color",new Ve(i,3));const s=new ri({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Ie,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class qH{constructor(){this.type="ShapePath",this.color=new Ie,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Yf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(A){const _=[];for(let w=0,S=A.length;wNumber.EPSILON){if(L<0&&(R=_[P],B=-B,b=_[E],L=-L),A.yb.y)continue;if(A.y===R.y){if(A.x===R.x)return!0}else{const U=L*(A.x-R.x)-B*(A.y-R.y);if(U===0)return!0;if(U<0)continue;S=!S}}else{if(A.y!==R.y)continue;if(b.x<=A.x&&A.x<=R.x||R.x<=A.x&&A.x<=b.x)return!0}}return S}const r=is.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const u=[];if(s.length===1)return a=s[0],l=new Ya,l.curves=a.curves,u.push(l),u;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let m=[],v=0,y;p[v]=void 0,m[v]=[];for(let A=0,_=s.length;A<_;A++)a=s[A],y=a.getPoints(),o=r(y),o=e?!o:o,o?(!h&&p[v]&&v++,p[v]={s:new Ya,p:y},p[v].s.curves=a.curves,h&&v++,m[v]=[]):m[v].push({h:a,p:y[0]});if(!p[0])return t(s);if(p.length>1){let A=!1,_=0;for(let w=0,S=p.length;w0&&A===!1&&(m=d)}let x;for(let A=0,_=p.length;A<_;A++){l=p[A].s,u.push(l),x=m[A];for(let w=0,S=x.length;w>-u-14,i[l|256]=1024>>-u-14|32768,r[l]=-u-1,r[l|256]=-u-1):u<=15?(i[l]=u+15<<10,i[l|256]=u+15<<10|32768,r[l]=13,r[l|256]=13):u<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let u=l<<13,h=0;for(;!(u&8388608);)u<<=1,h-=8388608;u&=-8388609,h+=947912704,s[l]=u|h}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function e5(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=yn(n,-65504,65504),Bs.floatView[0]=n;const e=Bs.uint32View[0],t=e>>23&511;return Bs.baseTable[t]+((e&8388607)>>Bs.shiftTable[t])}function t5(n){const e=n>>10;return Bs.uint32View[0]=Bs.mantissaTable[Bs.offsetTable[e]+(n&1023)]+Bs.exponentTable[e],Bs.floatView[0]}var n5=Object.freeze({__proto__:null,fromHalfFloat:t5,toHalfFloat:e5});class i5 extends Ko{constructor(e,t,i,r,s,o){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(e,t,i,r,s,o)}}class r5 extends yh{constructor(e,t,i,r){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(e,t,i,r)}}class s5 extends vh{constructor(e,t,i,r){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(e,t,i,r)}}class o5 extends xh{constructor(e,t,i,r,s,o,a){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(e,t,i,r,s,o,a)}}class a5 extends al{constructor(e,t,i,r,s,o,a,l){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(e,t,i,r,s,o,a,l)}}class l5 extends Ah{constructor(e,t){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(e,t)}}class c5 extends _h{constructor(e,t){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(e,t)}}class u5 extends wh{constructor(e,t){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(e,t)}}class f5 extends Zc{constructor(e,t,i,r){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(e,t,i,r)}}class h5 extends qc{constructor(e,t){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(e,t)}}class d5 extends Kc{constructor(e,t,i,r){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(e,t,i,r)}}class p5 extends Ys{constructor(e,t,i,r){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(e,t,i,r)}}class m5 extends Mh{constructor(e,t,i,r,s,o){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(e,t,i,r,s,o)}}class g5 extends Sh{constructor(e,t){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(e,t)}}class y5 extends $c{constructor(e,t,i,r,s,o,a){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(e,t,i,r,s,o,a)}}class v5 extends Ch{constructor(e,t){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(e,t)}}class x5 extends Eh{constructor(e,t,i,r,s){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(e,t,i,r,s)}}class A5 extends bh{constructor(e,t,i,r,s,o){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(e,t,i,r,s,o)}}class _5 extends Th{constructor(e,t,i,r,s){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(e,t,i,r,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Jc}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Jc);const w5=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:W1,AddEquation:ba,AddOperation:oB,AdditiveAnimationBlendMode:J1,AdditiveBlending:Lx,AlphaFormat:gB,AlwaysDepth:$P,AlwaysStencilFunc:IB,AmbientLight:A3,AmbientLightProbe:fH,AnimationClip:Uc,AnimationLoader:eH,AnimationMixer:BH,AnimationObjectGroup:bH,AnimationUtils:QG,ArcCurve:ZB,ArrayCamera:jB,ArrowHelper:QH,Audio:E3,AudioAnalyser:yH,AudioContext:b_,AudioListener:pH,AudioLoader:cH,AxesHelper:ZH,BackSide:Ti,BasicDepthPacking:BB,BasicShadowMap:UP,Bone:Lg,BooleanKeyframeTrack:ll,Box2:NH,Box3:Xo,Box3Helper:YH,BoxBufferGeometry:i5,BoxGeometry:Ko,BoxHelper:XH,BufferAttribute:Ft,BufferGeometry:ft,BufferGeometryLoader:S3,ByteType:fB,Cache:il,Camera:hh,CameraHelper:JH,CanvasTexture:AG,CapsuleBufferGeometry:r5,CapsuleGeometry:yh,CatmullRomCurve3:qB,CineonToneMapping:cB,CircleBufferGeometry:s5,CircleGeometry:vh,ClampToEdgeWrapping:Wn,Clock:T_,Color:Ie,ColorKeyframeTrack:__,ColorManagement:ti,CompressedArrayTexture:xG,CompressedTexture:f_,CompressedTextureLoader:tH,ConeBufferGeometry:o5,ConeGeometry:xh,CubeCamera:e_,CubeReflectionMapping:Fo,CubeRefractionMapping:No,CubeTexture:dh,CubeTextureLoader:nH,CubeUVReflectionMapping:Xc,CubicBezierCurve:d_,CubicBezierCurve3:$B,CubicInterpolant:g3,CullFaceBack:Rx,CullFaceFront:OP,CullFaceFrontBack:EN,CullFaceNone:kP,Curve:Gr,CurvePath:t3,CustomBlending:zP,CustomToneMapping:uB,CylinderBufferGeometry:a5,CylinderGeometry:al,Cylindrical:FH,Data3DTexture:Z1,DataArrayTexture:bg,DataTexture:_c,DataTextureLoader:iH,DataUtils:n5,DecrementStencilOp:NN,DecrementWrapStencilOp:ON,DefaultLoadingManager:cc,DepthFormat:Ro,DepthStencilFormat:el,DepthTexture:JB,DirectionalLight:E_,DirectionalLightHelper:jH,DiscreteInterpolant:y3,DodecahedronBufferGeometry:l5,DodecahedronGeometry:Ah,DoubleSide:Ir,DstAlphaFactor:XP,DstColorFactor:KP,DynamicCopyUsage:qN,DynamicDrawUsage:Wa,DynamicReadUsage:KN,EdgesGeometry:n3,EllipseCurve:Ig,EqualDepth:tB,EqualStencilFunc:HN,EquirectangularReflectionMapping:Gf,EquirectangularRefractionMapping:Hf,Euler:ol,EventDispatcher:cs,ExtrudeBufferGeometry:c5,ExtrudeGeometry:_h,FileLoader:Wi,Float16BufferAttribute:Lk,Float32BufferAttribute:Ve,Float64BufferAttribute:Ik,FloatType:Is,Fog:Rg,FogExp2:Bg,FramebufferTexture:vG,FrontSide:os,Frustum:Tg,GLBufferAttribute:DH,GLSL1:ek,GLSL3:oA,GreaterDepth:iB,GreaterEqualDepth:nB,GreaterEqualStencilFunc:JN,GreaterStencilFunc:WN,GridHelper:VH,Group:Fs,HalfFloatType:Lc,HemisphereLight:x3,HemisphereLightHelper:HH,HemisphereLightProbe:uH,IcosahedronBufferGeometry:u5,IcosahedronGeometry:wh,ImageBitmapLoader:C3,ImageLoader:qf,ImageUtils:Q1,IncrementStencilOp:FN,IncrementWrapStencilOp:kN,InstancedBufferAttribute:Nc,InstancedBufferGeometry:M3,InstancedInterleavedBuffer:IH,InstancedMesh:l_,Int16BufferAttribute:Bk,Int32BufferAttribute:Rk,Int8BufferAttribute:bk,IntType:dB,InterleavedBuffer:ph,InterleavedBufferAttribute:Uo,Interpolant:eu,InterpolateDiscrete:Ic,InterpolateLinear:tl,InterpolateSmooth:um,InvertStencilOp:UN,KeepStencilOp:fm,KeyframeTrack:Hr,LOD:QB,LatheBufferGeometry:f5,LatheGeometry:Zc,Layers:Xa,LessDepth:eB,LessEqualDepth:Gm,LessEqualStencilFunc:VN,LessStencilFunc:GN,Light:Qo,LightProbe:Ng,Line:Js,Line3:kH,LineBasicMaterial:ri,LineCurve:Dg,LineCurve3:e3,LineDashedMaterial:p3,LineLoop:c_,LineSegments:zr,LinearEncoding:Oo,LinearFilter:nn,LinearInterpolant:A_,LinearMipMapLinearFilter:RN,LinearMipMapNearestFilter:BN,LinearMipmapLinearFilter:as,LinearMipmapNearestFilter:Cg,LinearSRGBColorSpace:Dc,LinearToneMapping:aB,Loader:yi,LoaderUtils:rs,LoadingManager:w_,LoopOnce:EB,LoopPingPong:TB,LoopRepeat:bB,LuminanceAlphaFormat:vB,LuminanceFormat:yB,MOUSE:wa,Material:Mn,MaterialLoader:kg,MathUtils:K1,Matrix3:hi,Matrix4:ot,MaxEquation:Nx,Mesh:Pn,MeshBasicMaterial:zi,MeshDepthMaterial:i_,MeshDistanceMaterial:r_,MeshLambertMaterial:h3,MeshMatcapMaterial:d3,MeshNormalMaterial:f3,MeshPhongMaterial:c3,MeshPhysicalMaterial:us,MeshStandardMaterial:Ph,MeshToonMaterial:u3,MinEquation:Fx,MirroredRepeatWrapping:Rc,MixOperation:sB,MultiplyBlending:Dx,MultiplyOperation:fh,NearestFilter:dn,NearestMipMapLinearFilter:PN,NearestMipMapNearestFilter:TN,NearestMipmapLinearFilter:Ac,NearestMipmapNearestFilter:Vf,NeverDepth:qP,NeverStencilFunc:zN,NoBlending:Os,NoColorSpace:LN,NoToneMapping:kr,NormalAnimationBlendMode:Eg,NormalBlending:Ha,NotEqualDepth:rB,NotEqualStencilFunc:jN,NumberKeyframeTrack:kc,Object3D:bt,ObjectLoader:aH,ObjectSpaceNormalMap:LB,OctahedronBufferGeometry:h5,OctahedronGeometry:qc,OneFactor:WP,OneMinusDstAlphaFactor:YP,OneMinusDstColorFactor:QP,OneMinusSrcAlphaFactor:V1,OneMinusSrcColorFactor:JP,OrthographicCamera:pr,PCFShadowMap:Mg,PCFSoftShadowMap:df,PMREMGenerator:lA,Path:Yf,PerspectiveCamera:Xt,Plane:Ps,PlaneBufferGeometry:d5,PlaneGeometry:Kc,PlaneHelper:KH,PointLight:C_,PointLightHelper:zH,Points:u_,PointsMaterial:gh,PolarGridHelper:WH,PolyhedronBufferGeometry:p5,PolyhedronGeometry:Ys,PositionalAudio:gH,PropertyBinding:Pt,PropertyMixer:b3,QuadraticBezierCurve:p_,QuadraticBezierCurve3:m_,Quaternion:Gn,QuaternionKeyframeTrack:zo,QuaternionLinearInterpolant:v3,RED_GREEN_RGTC2_Format:rA,RED_RGTC1_Format:CB,REVISION:Jc,RGBADepthPacking:RB,RGBAFormat:Mi,RGBAIntegerFormat:MB,RGBA_ASTC_10x10_Format:eA,RGBA_ASTC_10x5_Format:Zx,RGBA_ASTC_10x6_Format:qx,RGBA_ASTC_10x8_Format:$x,RGBA_ASTC_12x10_Format:tA,RGBA_ASTC_12x12_Format:nA,RGBA_ASTC_4x4_Format:Vx,RGBA_ASTC_5x4_Format:Wx,RGBA_ASTC_5x5_Format:jx,RGBA_ASTC_6x5_Format:Jx,RGBA_ASTC_6x6_Format:Xx,RGBA_ASTC_8x5_Format:Yx,RGBA_ASTC_8x6_Format:Kx,RGBA_ASTC_8x8_Format:Qx,RGBA_BPTC_Format:cm,RGBA_ETC2_EAC_Format:Hx,RGBA_PVRTC_2BPPV1_Format:zx,RGBA_PVRTC_4BPPV1_Format:Ux,RGBA_S3TC_DXT1_Format:om,RGBA_S3TC_DXT3_Format:am,RGBA_S3TC_DXT5_Format:lm,RGB_ETC1_Format:SB,RGB_ETC2_Format:Gx,RGB_PVRTC_2BPPV1_Format:Ox,RGB_PVRTC_4BPPV1_Format:kx,RGB_S3TC_DXT1_Format:sm,RGFormat:_B,RGIntegerFormat:wB,RawShaderMaterial:l3,Ray:Yc,Raycaster:T3,RectAreaLight:_3,RedFormat:xB,RedIntegerFormat:AB,ReinhardToneMapping:lB,RepeatWrapping:ko,ReplaceStencilOp:DN,ReverseSubtractEquation:HP,RingBufferGeometry:m5,RingGeometry:Mh,SIGNED_RED_GREEN_RGTC2_Format:sA,SIGNED_RED_RGTC1_Format:iA,SRGBColorSpace:Br,Scene:jm,ShaderChunk:gt,ShaderLib:Lr,ShaderMaterial:ls,ShadowMaterial:a3,Shape:Ya,ShapeBufferGeometry:g5,ShapeGeometry:Sh,ShapePath:qH,ShapeUtils:is,ShortType:hB,Skeleton:mh,SkeletonHelper:UH,SkinnedMesh:a_,Source:Na,Sphere:Yo,SphereBufferGeometry:y5,SphereGeometry:$c,Spherical:mA,SphericalHarmonics3:w3,SplineCurve:g_,SpotLight:S_,SpotLightHelper:OH,Sprite:KB,SpriteMaterial:o_,SrcAlphaFactor:H1,SrcAlphaSaturateFactor:ZP,SrcColorFactor:jP,StaticCopyUsage:ZN,StaticDrawUsage:jf,StaticReadUsage:YN,StereoCamera:hH,StreamCopyUsage:$N,StreamDrawUsage:XN,StreamReadUsage:QN,StringKeyframeTrack:cl,SubtractEquation:GP,SubtractiveBlending:Ix,TOUCH:Ma,TangentSpaceNormalMap:Jo,TetrahedronBufferGeometry:v5,TetrahedronGeometry:Ch,Texture:$t,TextureLoader:Bh,TorusBufferGeometry:x5,TorusGeometry:Eh,TorusKnotBufferGeometry:A5,TorusKnotGeometry:bh,Triangle:hr,TriangleFanDrawMode:Hm,TriangleStripDrawMode:X1,TrianglesDrawMode:PB,TubeBufferGeometry:_5,TubeGeometry:Th,TwoPassDoubleSide:bN,UVMapping:Sg,Uint16BufferAttribute:q1,Uint32BufferAttribute:$1,Uint8BufferAttribute:Tk,Uint8ClampedBufferAttribute:Pk,Uniform:R_,UniformsGroup:LH,UniformsLib:Pe,UniformsUtils:OB,UnsignedByteType:js,UnsignedInt248Type:Va,UnsignedIntType:wo,UnsignedShort4444Type:pB,UnsignedShort5551Type:mB,UnsignedShortType:j1,VSMShadowMap:Ia,Vector2:pe,Vector3:D,Vector4:Ot,VectorKeyframeTrack:Oc,VideoTexture:yG,WebGL1Renderer:XB,WebGL3DRenderTarget:yk,WebGLArrayRenderTarget:gk,WebGLCubeRenderTarget:t_,WebGLMultipleRenderTargets:vk,WebGLRenderTarget:Ur,WebGLRenderer:s_,WebGLUtils:WB,WireframeGeometry:o3,WrapAroundEnding:Wf,ZeroCurvatureEnding:Da,ZeroFactor:VP,ZeroSlopeEnding:Fa,ZeroStencilOp:IN,_SRGBAFormat:Vm,sRGBEncoding:Vt},Symbol.toStringTag,{value:"Module"}));var B3={exports:{}},ul={};/** * @license React * react-reconciler-constants.production.min.js * @@ -3229,17 +3229,17 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var C5=function(e){var t={},i=z,r=gA,s=Object.assign;function o(c){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+c,g=1;gX||C[k]!==T[X]){var ue=` `+C[k].replace(" at new "," at ");return c.displayName&&ue.includes("")&&(ue=ue.replace("",c.displayName)),ue}while(1<=k&&0<=X);break}}}finally{$o=!1,Error.prepareStackTrace=g}return(c=c?c.displayName||c.name:"")?pt(c):""}var hs=Object.prototype.hasOwnProperty,dl=[],Yi=-1;function Ki(c){return{current:c}}function ht(c){0>Yi||(c.current=dl[Yi],dl[Yi]=null,Yi--)}function Tt(c,f){Yi++,dl[Yi]=c.current,c.current=f}var Qi={},kt=Ki(Qi),In=Ki(!1),ds=Qi;function ps(c,f){var g=c.type.contextTypes;if(!g)return Qi;var M=c.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===f)return M.__reactInternalMemoizedMaskedChildContext;var C={},T;for(T in g)C[T]=f[T];return M&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=f,c.__reactInternalMemoizedMaskedChildContext=C),C}function vi(c){return c=c.childContextTypes,c!=null}function Gh(){ht(In),ht(kt)}function pw(c,f,g){if(kt.current!==Qi)throw Error(o(168));Tt(kt,f),Tt(In,g)}function mw(c,f,g){var M=c.stateNode;if(f=f.childContextTypes,typeof M.getChildContext!="function")return g;M=M.getChildContext();for(var C in M)if(!(C in f))throw Error(o(108,b(c)||"Unknown",C));return s({},g,M)}function Hh(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Qi,ds=kt.current,Tt(kt,c),Tt(In,In.current),!0}function gw(c,f,g){var M=c.stateNode;if(!M)throw Error(o(169));g?(c=mw(c,f,ds),M.__reactInternalMemoizedMergedChildContext=c,ht(In),ht(kt),Tt(kt,c)):ht(In),Tt(In,g)}var _r=Math.clz32?Math.clz32:OL,NL=Math.log,kL=Math.LN2;function OL(c){return c>>>=0,c===0?32:31-(NL(c)/kL|0)|0}var Vh=64,Wh=4194304;function ru(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function jh(c,f){var g=c.pendingLanes;if(g===0)return 0;var M=0,C=c.suspendedLanes,T=c.pingedLanes,k=g&268435455;if(k!==0){var X=k&~C;X!==0?M=ru(X):(T&=k,T!==0&&(M=ru(T)))}else k=g&~C,k!==0?M=ru(k):T!==0&&(M=ru(T));if(M===0)return 0;if(f!==0&&f!==M&&!(f&C)&&(C=M&-M,T=f&-f,C>=T||C===16&&(T&4194240)!==0))return f;if(M&4&&(M|=g&16),f=c.entangledLanes,f!==0)for(c=c.entanglements,f&=M;0g;g++)f.push(c);return f}function su(c,f,g){c.pendingLanes|=f,f!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,f=31-_r(f),c[f]=g}function GL(c,f){var g=c.pendingLanes&~f;c.pendingLanes=f,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=f,c.mutableReadLanes&=f,c.entangledLanes&=f,f=c.entanglements;var M=c.eventTimes;for(c=c.expirationTimes;0>=k,C-=k,ys=1<<32-_r(f)+C|g<It?(Nn=ut,ut=null):Nn=ut.sibling;var Dt=nt(ne,ut,ae[It],Ne);if(Dt===null){ut===null&&(ut=Nn);break}c&&ut&&Dt.alternate===null&&f(ne,ut),Q=T(Dt,Q,It),mt===null?Ye=Dt:mt.sibling=Dt,mt=Dt,ut=Nn}if(It===ae.length)return g(ne,ut),Qt&&ta(ne,It),Ye;if(ut===null){for(;ItIt?(Nn=ut,ut=null):Nn=ut.sibling;var no=nt(ne,ut,Dt.value,Ne);if(no===null){ut===null&&(ut=Nn);break}c&&ut&&no.alternate===null&&f(ne,ut),Q=T(no,Q,It),mt===null?Ye=no:mt.sibling=no,mt=no,ut=Nn}if(Dt.done)return g(ne,ut),Qt&&ta(ne,It),Ye;if(ut===null){for(;!Dt.done;It++,Dt=ae.next())Dt=ct(ne,Dt.value,Ne),Dt!==null&&(Q=T(Dt,Q,It),mt===null?Ye=Dt:mt.sibling=Dt,mt=Dt);return Qt&&ta(ne,It),Ye}for(ut=M(ne,ut);!Dt.done;It++,Dt=ae.next())Dt=Gt(ut,ne,It,Dt.value,Ne),Dt!==null&&(c&&Dt.alternate!==null&&ut.delete(Dt.key===null?It:Dt.key),Q=T(Dt,Q,It),mt===null?Ye=Dt:mt.sibling=Dt,mt=Dt);return c&&ut.forEach(function(EI){return f(ne,EI)}),Qt&&ta(ne,It),Ye}function rr(ne,Q,ae,Ne){if(typeof ae=="object"&&ae!==null&&ae.type===h&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case l:e:{for(var Ye=ae.key,mt=Q;mt!==null;){if(mt.key===Ye){if(Ye=ae.type,Ye===h){if(mt.tag===7){g(ne,mt.sibling),Q=C(mt,ae.props.children),Q.return=ne,ne=Q;break e}}else if(mt.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===w&&Lw(Ye)===mt.type){g(ne,mt.sibling),Q=C(mt,ae.props),Q.ref=lu(ne,mt,ae),Q.return=ne,ne=Q;break e}g(ne,mt);break}else f(ne,mt);mt=mt.sibling}ae.type===h?(Q=la(ae.props.children,ne.mode,Ne,ae.key),Q.return=ne,ne=Q):(Ne=Id(ae.type,ae.key,ae.props,null,ne.mode,Ne),Ne.ref=lu(ne,Q,ae),Ne.return=ne,ne=Ne)}return k(ne);case u:e:{for(mt=ae.key;Q!==null;){if(Q.key===mt)if(Q.tag===4&&Q.stateNode.containerInfo===ae.containerInfo&&Q.stateNode.implementation===ae.implementation){g(ne,Q.sibling),Q=C(Q,ae.children||[]),Q.return=ne,ne=Q;break e}else{g(ne,Q);break}else f(ne,Q);Q=Q.sibling}Q=$0(ae,ne.mode,Ne),Q.return=ne,ne=Q}return k(ne);case w:return mt=ae._init,rr(ne,Q,mt(ae._payload),Ne)}if(K(ae))return Ze(ne,Q,ae,Ne);if(P(ae))return Zn(ne,Q,ae,Ne);nd(ne,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"?(ae=""+ae,Q!==null&&Q.tag===6?(g(ne,Q.sibling),Q=C(Q,ae),Q.return=ne,ne=Q):(g(ne,Q),Q=q0(ae,ne.mode,Ne),Q.return=ne,ne=Q),k(ne)):g(ne,Q)}return rr}var xl=Iw(!0),Dw=Iw(!1),cu={},er=Ki(cu),uu=Ki(cu),Al=Ki(cu);function Xr(c){if(c===cu)throw Error(o(174));return c}function g0(c,f){Tt(Al,f),Tt(uu,c),Tt(er,cu),c=ce(f),ht(er),Tt(er,c)}function _l(){ht(er),ht(uu),ht(Al)}function Fw(c){var f=Xr(Al.current),g=Xr(er.current);f=N(g,c.type,f),g!==f&&(Tt(uu,c),Tt(er,f))}function y0(c){uu.current===c&&(ht(er),ht(uu))}var en=Ki(0);function id(c){for(var f=c;f!==null;){if(f.tag===13){var g=f.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||zh(g)||iu(g)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if(f.flags&128)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===c)break;for(;f.sibling===null;){if(f.return===null||f.return===c)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var v0=[];function x0(){for(var c=0;cg?g:4,c(!0);var M=tr.transition;tr.transition={};try{c(!1),f()}finally{Lt=g,tr.transition=M}}function Kw(){return Yr().memoizedState}function $L(c,f,g){var M=$s(c);g={lane:M,action:g,hasEagerState:!1,eagerState:null,next:null},Qw(c)?Zw(f,g):(qw(c,f,g),g=ai(),c=nr(c,M,g),c!==null&&$w(c,f,M))}function eI(c,f,g){var M=$s(c),C={lane:M,action:g,hasEagerState:!1,eagerState:null,next:null};if(Qw(c))Zw(f,C);else{qw(c,f,C);var T=c.alternate;if(c.lanes===0&&(T===null||T.lanes===0)&&(T=f.lastRenderedReducer,T!==null))try{var k=f.lastRenderedState,X=T(k,g);if(C.hasEagerState=!0,C.eagerState=X,Wr(X,k))return}catch{}finally{}g=ai(),c=nr(c,M,g),c!==null&&$w(c,f,M)}}function Qw(c){var f=c.alternate;return c===un||f!==null&&f===un}function Zw(c,f){fu=sd=!0;var g=c.pending;g===null?f.next=f:(f.next=g.next,g.next=f),c.pending=f}function qw(c,f,g){vn!==null&&c.mode&1&&!(vt&2)?(c=f.interleaved,c===null?(g.next=g,Jr===null?Jr=[f]:Jr.push(f)):(g.next=c.next,c.next=g),f.interleaved=g):(c=f.pending,c===null?g.next=g:(g.next=c.next,c.next=g),f.pending=g)}function $w(c,f,g){if(g&4194240){var M=f.lanes;M&=c.pendingLanes,g|=M,f.lanes=g,$g(c,g)}}var ud={readContext:Zi,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},tI={readContext:Zi,useCallback:function(c,f){return xs().memoizedState=[c,f===void 0?null:f],c},useContext:Zi,useEffect:S0,useImperativeHandle:function(c,f,g){return g=g!=null?g.concat([c]):null,ld(4194308,4,jw.bind(null,f,c),g)},useLayoutEffect:function(c,f){return ld(4194308,4,c,f)},useInsertionEffect:function(c,f){return ld(4,2,c,f)},useMemo:function(c,f){var g=xs();return f=f===void 0?null:f,c=c(),g.memoizedState=[c,f],c},useReducer:function(c,f,g){var M=xs();return f=g!==void 0?g(f):f,M.memoizedState=M.baseState=f,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:f},M.queue=c,c=c.dispatch=$L.bind(null,un,c),[M.memoizedState,c]},useRef:function(c){var f=xs();return c={current:c},f.memoizedState=c},useState:M0,useDebugValue:C0,useDeferredValue:function(c){var f=M0(c),g=f[0],M=f[1];return S0(function(){var C=tr.transition;tr.transition={};try{M(c)}finally{tr.transition=C}},[c]),g},useTransition:function(){var c=M0(!1),f=c[0];return c=qL.bind(null,c[1]),xs().memoizedState=c,[f,c]},useMutableSource:function(){},useSyncExternalStore:function(c,f,g){var M=un,C=xs();if(Qt){if(g===void 0)throw Error(o(407));g=g()}else{if(g=f(),vn===null)throw Error(o(349));wl&30||Ow(M,f,g)}C.memoizedState=g;var T={value:g,getSnapshot:f};return C.queue=T,S0(zw.bind(null,M,T,c),[c]),M.flags|=2048,du(9,Uw.bind(null,M,T,g,f),void 0,null),g},useId:function(){var c=xs(),f=vn.identifierPrefix;if(Qt){var g=vs,M=ys;g=(M&~(1<<32-_r(M)-1)).toString(32)+g,f=":"+f+"R"+g,g=hu++,0W0&&(f.flags|=128,M=!0,yu(C,!1),f.lanes=4194304)}else{if(!M)if(c=id(T),c!==null){if(f.flags|=128,M=!0,c=c.updateQueue,c!==null&&(f.updateQueue=c,f.flags|=4),yu(C,!0),C.tail===null&&C.tailMode==="hidden"&&!T.alternate&&!Qt)return Qn(f),null}else 2*Dn()-C.renderingStartTime>W0&&g!==1073741824&&(f.flags|=128,M=!0,yu(C,!1),f.lanes=4194304);C.isBackwards?(T.sibling=f.child,f.child=T):(c=C.last,c!==null?c.sibling=T:f.child=T,C.last=T)}return C.tail!==null?(f=C.tail,C.rendering=f,C.tail=f.sibling,C.renderingStartTime=Dn(),f.sibling=null,c=en.current,Tt(en,M?c&1|2:c&1),f):(Qn(f),null);case 22:case 23:return K0(),M=f.memoizedState!==null,c!==null&&c.memoizedState!==null!==M&&(f.flags|=8192),M&&f.mode&1?Di&1073741824&&(Qn(f),Be&&f.subtreeFlags&6&&(f.flags|=8192)):Qn(f),null;case 24:return null;case 25:return null}throw Error(o(156,f.tag))}var oI=a.ReactCurrentOwner,Ii=!1;function oi(c,f,g,M){f.child=c===null?Dw(f,null,g,M):xl(f,c.child,g,M)}function aM(c,f,g,M,C){g=g.render;var T=f.ref;return ml(f,C),M=_0(c,f,g,M,T,C),g=w0(),c!==null&&!Ii?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~C,As(c,f,C)):(Qt&&g&&f0(f),f.flags|=1,oi(c,f,M,C),f.child)}function lM(c,f,g,M,C){if(c===null){var T=g.type;return typeof T=="function"&&!Z0(T)&&T.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(f.tag=15,f.type=T,cM(c,f,T,M,C)):(c=Id(g.type,null,M,f,f.mode,C),c.ref=f.ref,c.return=f,f.child=c)}if(T=c.child,!(c.lanes&C)){var k=T.memoizedProps;if(g=g.compare,g=g!==null?g:Yh,g(k,M)&&c.ref===f.ref)return As(c,f,C)}return f.flags|=1,c=to(T,M),c.ref=f.ref,c.return=f,f.child=c}function cM(c,f,g,M,C){if(c!==null&&Yh(c.memoizedProps,M)&&c.ref===f.ref)if(Ii=!1,(c.lanes&C)!==0)c.flags&131072&&(Ii=!0);else return f.lanes=c.lanes,As(c,f,C);return T0(c,f,g,M,C)}function uM(c,f,g){var M=f.pendingProps,C=M.children,T=c!==null?c.memoizedState:null;if(M.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null},Tt(Ml,Di),Di|=g;else if(g&1073741824)f.memoizedState={baseLanes:0,cachePool:null},M=T!==null?T.baseLanes:g,Tt(Ml,Di),Di|=M;else return c=T!==null?T.baseLanes|g:g,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:c,cachePool:null},f.updateQueue=null,Tt(Ml,Di),Di|=c,null;else T!==null?(M=T.baseLanes|g,f.memoizedState=null):M=g,Tt(Ml,Di),Di|=M;return oi(c,f,C,g),f.child}function fM(c,f){var g=f.ref;(c===null&&g!==null||c!==null&&c.ref!==g)&&(f.flags|=512,f.flags|=2097152)}function T0(c,f,g,M,C){var T=vi(g)?ds:kt.current;return T=ps(f,T),ml(f,C),g=_0(c,f,g,M,T,C),M=w0(),c!==null&&!Ii?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~C,As(c,f,C)):(Qt&&M&&f0(f),f.flags|=1,oi(c,f,g,C),f.child)}function hM(c,f,g,M,C){if(vi(g)){var T=!0;Hh(f)}else T=!1;if(ml(f,C),f.stateNode===null)c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),Ew(f,g,M),u0(f,g,M,C),M=!0;else if(c===null){var k=f.stateNode,X=f.memoizedProps;k.props=X;var ue=k.context,Ee=g.contextType;typeof Ee=="object"&&Ee!==null?Ee=Zi(Ee):(Ee=vi(g)?ds:kt.current,Ee=ps(f,Ee));var Ge=g.getDerivedStateFromProps,ct=typeof Ge=="function"||typeof k.getSnapshotBeforeUpdate=="function";ct||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(X!==M||ue!==Ee)&&bw(f,k,M,Ee),Ks=!1;var nt=f.memoizedState;k.state=nt,qh(f,M,k,C),ue=f.memoizedState,X!==M||nt!==ue||In.current||Ks?(typeof Ge=="function"&&(c0(f,g,Ge,M),ue=f.memoizedState),(X=Ks||Cw(f,g,X,M,nt,ue,Ee))?(ct||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(f.flags|=4194308)):(typeof k.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=M,f.memoizedState=ue),k.props=M,k.state=ue,k.context=Ee,M=X):(typeof k.componentDidMount=="function"&&(f.flags|=4194308),M=!1)}else{k=f.stateNode,_w(c,f),X=f.memoizedProps,Ee=f.type===f.elementType?X:wr(f.type,X),k.props=Ee,ct=f.pendingProps,nt=k.context,ue=g.contextType,typeof ue=="object"&&ue!==null?ue=Zi(ue):(ue=vi(g)?ds:kt.current,ue=ps(f,ue));var Gt=g.getDerivedStateFromProps;(Ge=typeof Gt=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(X!==ct||nt!==ue)&&bw(f,k,M,ue),Ks=!1,nt=f.memoizedState,k.state=nt,qh(f,M,k,C);var Ze=f.memoizedState;X!==ct||nt!==Ze||In.current||Ks?(typeof Gt=="function"&&(c0(f,g,Gt,M),Ze=f.memoizedState),(Ee=Ks||Cw(f,g,Ee,M,nt,Ze,ue)||!1)?(Ge||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(M,Ze,ue),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(M,Ze,ue)),typeof k.componentDidUpdate=="function"&&(f.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof k.componentDidUpdate!="function"||X===c.memoizedProps&&nt===c.memoizedState||(f.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||X===c.memoizedProps&&nt===c.memoizedState||(f.flags|=1024),f.memoizedProps=M,f.memoizedState=Ze),k.props=M,k.state=Ze,k.context=ue,M=Ee):(typeof k.componentDidUpdate!="function"||X===c.memoizedProps&&nt===c.memoizedState||(f.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||X===c.memoizedProps&&nt===c.memoizedState||(f.flags|=1024),M=!1)}return P0(c,f,g,M,T,C)}function P0(c,f,g,M,C,T){fM(c,f);var k=(f.flags&128)!==0;if(!M&&!k)return C&&gw(f,g,!1),As(c,f,T);M=f.stateNode,oI.current=f;var X=k&&typeof g.getDerivedStateFromError!="function"?null:M.render();return f.flags|=1,c!==null&&k?(f.child=xl(f,c.child,null,T),f.child=xl(f,null,X,T)):oi(c,f,X,T),f.memoizedState=M.state,C&&gw(f,g,!0),f.child}function dM(c){var f=c.stateNode;f.pendingContext?pw(c,f.pendingContext,f.pendingContext!==f.context):f.context&&pw(c,f.context,!1),g0(c,f.containerInfo)}function pM(c,f,g,M,C){return vl(),m0(C),f.flags|=256,oi(c,f,g,M),f.child}var dd={dehydrated:null,treeContext:null,retryLane:0};function pd(c){return{baseLanes:c,cachePool:null}}function mM(c,f,g){var M=f.pendingProps,C=en.current,T=!1,k=(f.flags&128)!==0,X;if((X=k)||(X=c!==null&&c.memoizedState===null?!1:(C&2)!==0),X?(T=!0,f.flags&=-129):(c===null||c.memoizedState!==null)&&(C|=1),Tt(en,C&1),c===null)return p0(f),c=f.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(f.mode&1?iu(c)?f.lanes=8:f.lanes=1073741824:f.lanes=1,null):(C=M.children,c=M.fallback,T?(M=f.mode,T=f.child,C={mode:"hidden",children:C},!(M&1)&&T!==null?(T.childLanes=0,T.pendingProps=C):T=Dd(C,M,0,null),c=la(c,M,g,null),T.return=f,c.return=f,T.sibling=c,f.child=T,f.child.memoizedState=pd(g),f.memoizedState=dd,c):B0(f,C));if(C=c.memoizedState,C!==null){if(X=C.dehydrated,X!==null){if(k)return f.flags&256?(f.flags&=-257,md(c,f,g,Error(o(422)))):f.memoizedState!==null?(f.child=c.child,f.flags|=128,null):(T=M.fallback,C=f.mode,M=Dd({mode:"visible",children:M.children},C,0,null),T=la(T,C,g,null),T.flags|=2,M.return=f,T.return=f,M.sibling=T,f.child=M,f.mode&1&&xl(f,c.child,null,g),f.child.memoizedState=pd(g),f.memoizedState=dd,T);if(!(f.mode&1))f=md(c,f,g,null);else if(iu(X))f=md(c,f,g,Error(o(419)));else if(M=(g&c.childLanes)!==0,Ii||M){if(M=vn,M!==null){switch(g&-g){case 4:T=2;break;case 16:T=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:T=32;break;case 536870912:T=268435456;break;default:T=0}M=T&(M.suspendedLanes|g)?0:T,M!==0&&M!==C.retryLane&&(C.retryLane=M,nr(c,M,-1))}Q0(),f=md(c,f,g,Error(o(421)))}else zh(X)?(f.flags|=128,f.child=c.child,f=xI.bind(null,c),F(X,f),f=null):(g=C.treeContext,oe&&(Li=me(X),Ri=f,Qt=!0,Mr=null,ou=!1,g!==null&&(qi[$i++]=ys,qi[$i++]=vs,qi[$i++]=ea,ys=g.id,vs=g.overflow,ea=f)),f=B0(f,f.pendingProps.children),f.flags|=4096);return f}return T?(M=yM(c,f,M.children,M.fallback,g),T=f.child,C=c.child.memoizedState,T.memoizedState=C===null?pd(g):{baseLanes:C.baseLanes|g,cachePool:null},T.childLanes=c.childLanes&~g,f.memoizedState=dd,M):(g=gM(c,f,M.children,g),f.memoizedState=null,g)}return T?(M=yM(c,f,M.children,M.fallback,g),T=f.child,C=c.child.memoizedState,T.memoizedState=C===null?pd(g):{baseLanes:C.baseLanes|g,cachePool:null},T.childLanes=c.childLanes&~g,f.memoizedState=dd,M):(g=gM(c,f,M.children,g),f.memoizedState=null,g)}function B0(c,f){return f=Dd({mode:"visible",children:f},c.mode,0,null),f.return=c,c.child=f}function gM(c,f,g,M){var C=c.child;return c=C.sibling,g=to(C,{mode:"visible",children:g}),!(f.mode&1)&&(g.lanes=M),g.return=f,g.sibling=null,c!==null&&(M=f.deletions,M===null?(f.deletions=[c],f.flags|=16):M.push(c)),f.child=g}function yM(c,f,g,M,C){var T=f.mode;c=c.child;var k=c.sibling,X={mode:"hidden",children:g};return!(T&1)&&f.child!==c?(g=f.child,g.childLanes=0,g.pendingProps=X,f.deletions=null):(g=to(c,X),g.subtreeFlags=c.subtreeFlags&14680064),k!==null?M=to(k,M):(M=la(M,T,C,null),M.flags|=2),M.return=f,g.return=f,g.sibling=M,f.child=g,M}function md(c,f,g,M){return M!==null&&m0(M),xl(f,c.child,null,g),c=B0(f,f.pendingProps.children),c.flags|=2,f.memoizedState=null,c}function vM(c,f,g){c.lanes|=f;var M=c.alternate;M!==null&&(M.lanes|=f),a0(c.return,f,g)}function R0(c,f,g,M,C){var T=c.memoizedState;T===null?c.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:M,tail:g,tailMode:C}:(T.isBackwards=f,T.rendering=null,T.renderingStartTime=0,T.last=M,T.tail=g,T.tailMode=C)}function xM(c,f,g){var M=f.pendingProps,C=M.revealOrder,T=M.tail;if(oi(c,f,M.children,g),M=en.current,M&2)M=M&1|2,f.flags|=128;else{if(c!==null&&c.flags&128)e:for(c=f.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&vM(c,g,f);else if(c.tag===19)vM(c,g,f);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===f)break e;for(;c.sibling===null;){if(c.return===null||c.return===f)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}M&=1}if(Tt(en,M),!(f.mode&1))f.memoizedState=null;else switch(C){case"forwards":for(g=f.child,C=null;g!==null;)c=g.alternate,c!==null&&id(c)===null&&(C=g),g=g.sibling;g=C,g===null?(C=f.child,f.child=null):(C=g.sibling,g.sibling=null),R0(f,!1,C,g,T);break;case"backwards":for(g=null,C=f.child,f.child=null;C!==null;){if(c=C.alternate,c!==null&&id(c)===null){f.child=C;break}c=C.sibling,C.sibling=g,g=C,C=c}R0(f,!0,g,null,T);break;case"together":R0(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function As(c,f,g){if(c!==null&&(f.dependencies=c.dependencies),Sl|=f.lanes,!(g&f.childLanes))return null;if(c!==null&&f.child!==c.child)throw Error(o(153));if(f.child!==null){for(c=f.child,g=to(c,c.pendingProps),f.child=g,g.return=f;c.sibling!==null;)c=c.sibling,g=g.sibling=to(c,c.pendingProps),g.return=f;g.sibling=null}return f.child}function aI(c,f,g){switch(f.tag){case 3:dM(f),vl();break;case 5:Fw(f);break;case 1:vi(f.type)&&Hh(f);break;case 4:g0(f,f.stateNode.containerInfo);break;case 10:Aw(f,f.type._context,f.memoizedProps.value);break;case 13:var M=f.memoizedState;if(M!==null)return M.dehydrated!==null?(Tt(en,en.current&1),f.flags|=128,null):g&f.child.childLanes?mM(c,f,g):(Tt(en,en.current&1),c=As(c,f,g),c!==null?c.sibling:null);Tt(en,en.current&1);break;case 19:if(M=(g&f.childLanes)!==0,c.flags&128){if(M)return xM(c,f,g);f.flags|=128}var C=f.memoizedState;if(C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),Tt(en,en.current),M)break;return null;case 22:case 23:return f.lanes=0,uM(c,f,g)}return As(c,f,g)}function lI(c,f){switch(h0(f),f.tag){case 1:return vi(f.type)&&Gh(),c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 3:return _l(),ht(In),ht(kt),x0(),c=f.flags,c&65536&&!(c&128)?(f.flags=c&-65537|128,f):null;case 5:return y0(f),null;case 13:if(ht(en),c=f.memoizedState,c!==null&&c.dehydrated!==null){if(f.alternate===null)throw Error(o(340));vl()}return c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 19:return ht(en),null;case 4:return _l(),null;case 10:return o0(f.type._context),null;case 22:case 23:return K0(),null;case 24:return null;default:return null}}var gd=!1,ia=!1,cI=typeof WeakSet=="function"?WeakSet:Set,Le=null;function yd(c,f){var g=c.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(M){_i(c,f,M)}else g.current=null}function L0(c,f,g){try{g()}catch(M){_i(c,f,M)}}var AM=!1;function uI(c,f){for(J(c.containerInfo),Le=f;Le!==null;)if(c=Le,f=c.child,(c.subtreeFlags&1028)!==0&&f!==null)f.return=c,Le=f;else for(;Le!==null;){c=Le;try{var g=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var M=g.memoizedProps,C=g.memoizedState,T=c.stateNode,k=T.getSnapshotBeforeUpdate(c.elementType===c.type?M:wr(c.type,M),C);T.__reactInternalSnapshotBeforeUpdate=k}break;case 3:Be&&Re(c.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(X){_i(c,c.return,X)}if(f=c.sibling,f!==null){f.return=c.return,Le=f;break}Le=c.return}return g=AM,AM=!1,g}function ra(c,f,g){var M=f.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var C=M=M.next;do{if((C.tag&c)===c){var T=C.destroy;C.destroy=void 0,T!==void 0&&L0(f,g,T)}C=C.next}while(C!==M)}}function vu(c,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&c)===c){var M=g.create;g.destroy=M()}g=g.next}while(g!==f)}}function I0(c){var f=c.ref;if(f!==null){var g=c.stateNode;switch(c.tag){case 5:c=ie(g);break;default:c=g}typeof f=="function"?f(c):f.current=c}}function _M(c,f,g){if(Vr&&typeof Vr.onCommitFiberUnmount=="function")try{Vr.onCommitFiberUnmount(Jh,f)}catch{}switch(f.tag){case 0:case 11:case 14:case 15:if(c=f.updateQueue,c!==null&&(c=c.lastEffect,c!==null)){var M=c=c.next;do{var C=M,T=C.destroy;C=C.tag,T!==void 0&&(C&2||C&4)&&L0(f,g,T),M=M.next}while(M!==c)}break;case 1:if(yd(f,g),c=f.stateNode,typeof c.componentWillUnmount=="function")try{c.props=f.memoizedProps,c.state=f.memoizedState,c.componentWillUnmount()}catch(k){_i(f,g,k)}break;case 5:yd(f,g);break;case 4:Be?bM(c,f,g):he&&he&&(f=f.stateNode.containerInfo,g=_t(f),Xn(f,g))}}function wM(c,f,g){for(var M=f;;)if(_M(c,M,g),M.child===null||Be&&M.tag===4){if(M===f)break;for(;M.sibling===null;){if(M.return===null||M.return===f)return;M=M.return}M.sibling.return=M.return,M=M.sibling}else M.child.return=M,M=M.child}function MM(c){var f=c.alternate;f!==null&&(c.alternate=null,MM(f)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(f=c.stateNode,f!==null&&qe(f)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function SM(c){return c.tag===5||c.tag===3||c.tag===4}function CM(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||SM(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function EM(c){if(Be){e:{for(var f=c.return;f!==null;){if(SM(f))break e;f=f.return}throw Error(o(160))}var g=f;switch(g.tag){case 5:f=g.stateNode,g.flags&32&&(xe(f),g.flags&=-33),g=CM(c),F0(c,g,f);break;case 3:case 4:f=g.stateNode.containerInfo,g=CM(c),D0(c,g,f);break;default:throw Error(o(161))}}}function D0(c,f,g){var M=c.tag;if(M===5||M===6)c=c.stateNode,f?$e(g,c,f):De(g,c);else if(M!==4&&(c=c.child,c!==null))for(D0(c,f,g),c=c.sibling;c!==null;)D0(c,f,g),c=c.sibling}function F0(c,f,g){var M=c.tag;if(M===5||M===6)c=c.stateNode,f?We(g,c,f):it(g,c);else if(M!==4&&(c=c.child,c!==null))for(F0(c,f,g),c=c.sibling;c!==null;)F0(c,f,g),c=c.sibling}function bM(c,f,g){for(var M=f,C=!1,T,k;;){if(!C){C=M.return;e:for(;;){if(C===null)throw Error(o(160));switch(T=C.stateNode,C.tag){case 5:k=!1;break e;case 3:T=T.containerInfo,k=!0;break e;case 4:T=T.containerInfo,k=!0;break e}C=C.return}C=!0}if(M.tag===5||M.tag===6)wM(c,M,g),k?j(T,M.stateNode):Je(T,M.stateNode);else if(M.tag===18)k?ln(T,M.stateNode):Mt(T,M.stateNode);else if(M.tag===4){if(M.child!==null){T=M.stateNode.containerInfo,k=!0,M.child.return=M,M=M.child;continue}}else if(_M(c,M,g),M.child!==null){M.child.return=M,M=M.child;continue}if(M===f)break;for(;M.sibling===null;){if(M.return===null||M.return===f)return;M=M.return,M.tag===4&&(C=!1)}M.sibling.return=M.return,M=M.sibling}}function N0(c,f){if(Be){switch(f.tag){case 0:case 11:case 14:case 15:ra(3,f,f.return),vu(3,f),ra(5,f,f.return);return;case 1:return;case 5:var g=f.stateNode;if(g!=null){var M=f.memoizedProps;c=c!==null?c.memoizedProps:M;var C=f.type,T=f.updateQueue;f.updateQueue=null,T!==null&&rt(g,T,C,c,M,f)}return;case 6:if(f.stateNode===null)throw Error(o(162));g=f.memoizedProps,ge(f.stateNode,c!==null?c.memoizedProps:g,g);return;case 3:oe&&c!==null&&c.memoizedState.isDehydrated&&Ct(f.stateNode.containerInfo);return;case 12:return;case 13:vd(f);return;case 19:vd(f);return;case 17:return}throw Error(o(163))}switch(f.tag){case 0:case 11:case 14:case 15:ra(3,f,f.return),vu(3,f),ra(5,f,f.return);return;case 12:return;case 13:vd(f);return;case 19:vd(f);return;case 3:oe&&c!==null&&c.memoizedState.isDehydrated&&Ct(f.stateNode.containerInfo);break;case 22:case 23:return}e:if(he){switch(f.tag){case 1:case 5:case 6:break e;case 3:case 4:f=f.stateNode,Xn(f.containerInfo,f.pendingChildren);break e}throw Error(o(163))}}function vd(c){var f=c.updateQueue;if(f!==null){c.updateQueue=null;var g=c.stateNode;g===null&&(g=c.stateNode=new cI),f.forEach(function(M){var C=AI.bind(null,c,M);g.has(M)||(g.add(M),M.then(C,C))})}}function fI(c,f){for(Le=f;Le!==null;){f=Le;var g=f.deletions;if(g!==null)for(var M=0;M";case Ad:return":has("+(U0(c)||"")+")";case _d:return'[role="'+c.value+'"]';case Md:return'"'+c.value+'"';case wd:return'[data-testname="'+c.value+'"]';default:throw Error(o(365))}}function LM(c,f){var g=[];c=[c,0];for(var M=0;MC&&(C=k),M&=~T}if(M=C,M=Dn()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*dI(M/1960))-M,10c?16:c,qs===null)var M=!1;else{if(c=qs,qs=null,Td=0,vt&6)throw Error(o(331));var C=vt;for(vt|=4,Le=c.current;Le!==null;){var T=Le,k=T.child;if(Le.flags&16){var X=T.deletions;if(X!==null){for(var ue=0;ueDn()-V0?sa(c,0):H0|=g),Ai(c,f)}function GM(c,f){f===0&&(c.mode&1?(f=Wh,Wh<<=1,!(Wh&130023424)&&(Wh=4194304)):f=1);var g=ai();c=Rd(c,f),c!==null&&(su(c,f,g),Ai(c,g))}function xI(c){var f=c.memoizedState,g=0;f!==null&&(g=f.retryLane),GM(c,g)}function AI(c,f){var g=0;switch(c.tag){case 13:var M=c.stateNode,C=c.memoizedState;C!==null&&(g=C.retryLane);break;case 19:M=c.stateNode;break;default:throw Error(o(314))}M!==null&&M.delete(f),GM(c,g)}var HM;HM=function(c,f,g){if(c!==null)if(c.memoizedProps!==f.pendingProps||In.current)Ii=!0;else{if(!(c.lanes&g)&&!(f.flags&128))return Ii=!1,aI(c,f,g);Ii=!!(c.flags&131072)}else Ii=!1,Qt&&f.flags&1048576&&Tw(f,td,f.index);switch(f.lanes=0,f.tag){case 2:var M=f.type;c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),c=f.pendingProps;var C=ps(f,kt.current);ml(f,g),C=_0(null,f,M,c,C,g);var T=w0();return f.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,vi(M)?(T=!0,Hh(f)):T=!1,f.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,l0(f),C.updater=$h,f.stateNode=C,C._reactInternals=f,u0(f,M,c,g),f=P0(null,f,M,!0,T,g)):(f.tag=0,Qt&&T&&f0(f),oi(null,f,C,g),f=f.child),f;case 16:M=f.elementType;e:{switch(c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),c=f.pendingProps,C=M._init,M=C(M._payload),f.type=M,C=f.tag=wI(M),c=wr(M,c),C){case 0:f=T0(null,f,M,c,g);break e;case 1:f=hM(null,f,M,c,g);break e;case 11:f=aM(null,f,M,c,g);break e;case 14:f=lM(null,f,M,wr(M.type,c),g);break e}throw Error(o(306,M,""))}return f;case 0:return M=f.type,C=f.pendingProps,C=f.elementType===M?C:wr(M,C),T0(c,f,M,C,g);case 1:return M=f.type,C=f.pendingProps,C=f.elementType===M?C:wr(M,C),hM(c,f,M,C,g);case 3:e:{if(dM(f),c===null)throw Error(o(387));M=f.pendingProps,T=f.memoizedState,C=T.element,_w(c,f),qh(f,M,null,g);var k=f.memoizedState;if(M=k.element,oe&&T.isDehydrated)if(T={element:M,isDehydrated:!1,cache:k.cache,transitions:k.transitions},f.updateQueue.baseState=T,f.memoizedState=T,f.flags&256){C=Error(o(423)),f=pM(c,f,M,g,C);break e}else if(M!==C){C=Error(o(424)),f=pM(c,f,M,g,C);break e}else for(oe&&(Li=$(f.stateNode.containerInfo),Ri=f,Qt=!0,Mr=null,ou=!1),g=Dw(f,null,M,g),f.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(vl(),M===C){f=As(c,f,g);break e}oi(c,f,M,g)}f=f.child}return f;case 5:return Fw(f),c===null&&p0(f),M=f.type,C=f.pendingProps,T=c!==null?c.memoizedProps:null,k=C.children,ye(M,C)?k=null:T!==null&&ye(M,T)&&(f.flags|=32),fM(c,f),oi(c,f,k,g),f.child;case 6:return c===null&&p0(f),null;case 13:return mM(c,f,g);case 4:return g0(f,f.stateNode.containerInfo),M=f.pendingProps,c===null?f.child=xl(f,null,M,g):oi(c,f,M,g),f.child;case 11:return M=f.type,C=f.pendingProps,C=f.elementType===M?C:wr(M,C),aM(c,f,M,C,g);case 7:return oi(c,f,f.pendingProps,g),f.child;case 8:return oi(c,f,f.pendingProps.children,g),f.child;case 12:return oi(c,f,f.pendingProps.children,g),f.child;case 10:e:{if(M=f.type._context,C=f.pendingProps,T=f.memoizedProps,k=C.value,Aw(f,M,k),T!==null)if(Wr(T.value,k)){if(T.children===C.children&&!In.current){f=As(c,f,g);break e}}else for(T=f.child,T!==null&&(T.return=f);T!==null;){var X=T.dependencies;if(X!==null){k=T.child;for(var ue=X.firstContext;ue!==null;){if(ue.context===M){if(T.tag===1){ue=gs(-1,g&-g),ue.tag=2;var Ee=T.updateQueue;if(Ee!==null){Ee=Ee.shared;var Ge=Ee.pending;Ge===null?ue.next=ue:(ue.next=Ge.next,Ge.next=ue),Ee.pending=ue}}T.lanes|=g,ue=T.alternate,ue!==null&&(ue.lanes|=g),a0(T.return,g,f),X.lanes|=g;break}ue=ue.next}}else if(T.tag===10)k=T.type===f.type?null:T.child;else if(T.tag===18){if(k=T.return,k===null)throw Error(o(341));k.lanes|=g,X=k.alternate,X!==null&&(X.lanes|=g),a0(k,g,f),k=T.sibling}else k=T.child;if(k!==null)k.return=T;else for(k=T;k!==null;){if(k===f){k=null;break}if(T=k.sibling,T!==null){T.return=k.return,k=T;break}k=k.return}T=k}oi(c,f,C.children,g),f=f.child}return f;case 9:return C=f.type,M=f.pendingProps.children,ml(f,g),C=Zi(C),M=M(C),f.flags|=1,oi(c,f,M,g),f.child;case 14:return M=f.type,C=wr(M,f.pendingProps),C=wr(M.type,C),lM(c,f,M,C,g);case 15:return cM(c,f,f.type,f.pendingProps,g);case 17:return M=f.type,C=f.pendingProps,C=f.elementType===M?C:wr(M,C),c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),f.tag=1,vi(M)?(c=!0,Hh(f)):c=!1,ml(f,g),Ew(f,M,C),u0(f,M,C,g),P0(null,f,M,!0,c,g);case 19:return xM(c,f,g);case 22:return uM(c,f,g)}throw Error(o(156,f.tag))};function VM(c,f){return e0(c,f)}function _I(c,f,g,M){this.tag=c,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ir(c,f,g,M){return new _I(c,f,g,M)}function Z0(c){return c=c.prototype,!(!c||!c.isReactComponent)}function wI(c){if(typeof c=="function")return Z0(c)?1:0;if(c!=null){if(c=c.$$typeof,c===y)return 11;if(c===_)return 14}return 2}function to(c,f){var g=c.alternate;return g===null?(g=ir(c.tag,f,c.key,c.mode),g.elementType=c.elementType,g.type=c.type,g.stateNode=c.stateNode,g.alternate=c,c.alternate=g):(g.pendingProps=f,g.type=c.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=c.flags&14680064,g.childLanes=c.childLanes,g.lanes=c.lanes,g.child=c.child,g.memoizedProps=c.memoizedProps,g.memoizedState=c.memoizedState,g.updateQueue=c.updateQueue,f=c.dependencies,g.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},g.sibling=c.sibling,g.index=c.index,g.ref=c.ref,g}function Id(c,f,g,M,C,T){var k=2;if(M=c,typeof c=="function")Z0(c)&&(k=1);else if(typeof c=="string")k=5;else e:switch(c){case h:return la(g.children,C,T,f);case d:k=8,C|=8;break;case p:return c=ir(12,g,f,C|2),c.elementType=p,c.lanes=T,c;case x:return c=ir(13,g,f,C),c.elementType=x,c.lanes=T,c;case A:return c=ir(19,g,f,C),c.elementType=A,c.lanes=T,c;case S:return Dd(g,C,T,f);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case m:k=10;break e;case v:k=9;break e;case y:k=11;break e;case _:k=14;break e;case w:k=16,M=null;break e}throw Error(o(130,c==null?c:typeof c,""))}return f=ir(k,g,f,C),f.elementType=c,f.type=M,f.lanes=T,f}function la(c,f,g,M){return c=ir(7,c,M,f),c.lanes=g,c}function Dd(c,f,g,M){return c=ir(22,c,M,f),c.elementType=S,c.lanes=g,c.stateNode={},c}function q0(c,f,g){return c=ir(6,c,null,f),c.lanes=g,c}function $0(c,f,g){return f=ir(4,c.children!==null?c.children:[],c.key,f),f.lanes=g,f.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},f}function MI(c,f,g,M,C){this.tag=f,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=He,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qg(0),this.expirationTimes=qg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qg(0),this.identifierPrefix=M,this.onRecoverableError=C,oe&&(this.mutableSourceEagerHydrationData=null)}function WM(c,f,g,M,C,T,k,X,ue){return c=new MI(c,f,g,X,ue),f===1?(f=1,T===!0&&(f|=8)):f=0,T=ir(3,null,null,f),c.current=T,T.stateNode=c,T.memoizedState={element:M,isDehydrated:g,cache:null,transitions:null},l0(T),c}function jM(c){if(!c)return Qi;c=c._reactInternals;e:{if(B(c)!==c||c.tag!==1)throw Error(o(170));var f=c;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(vi(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(o(171))}if(c.tag===1){var g=c.type;if(vi(g))return mw(c,g,f)}return f}function JM(c){var f=c._reactInternals;if(f===void 0)throw typeof c.render=="function"?Error(o(188)):(c=Object.keys(c).join(","),Error(o(268,c)));return c=Z(f),c===null?null:c.stateNode}function XM(c,f){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var g=c.retryLane;c.retryLane=g!==0&&g=Ee&&T>=ct&&C<=Ge&&k<=nt){c.splice(f,1);break}else if(M!==Ee||g.width!==ue.width||ntk){if(!(T!==ct||g.height!==ue.height||GeC)){Ee>M&&(ue.width+=Ee-M,ue.x=M),GeT&&(ue.height+=ct-T,ue.y=T),ntg&&(g=k)),kW0&&(f.flags|=128,M=!0,yu(C,!1),f.lanes=4194304)}else{if(!M)if(c=id(T),c!==null){if(f.flags|=128,M=!0,c=c.updateQueue,c!==null&&(f.updateQueue=c,f.flags|=4),yu(C,!0),C.tail===null&&C.tailMode==="hidden"&&!T.alternate&&!Qt)return Qn(f),null}else 2*Dn()-C.renderingStartTime>W0&&g!==1073741824&&(f.flags|=128,M=!0,yu(C,!1),f.lanes=4194304);C.isBackwards?(T.sibling=f.child,f.child=T):(c=C.last,c!==null?c.sibling=T:f.child=T,C.last=T)}return C.tail!==null?(f=C.tail,C.rendering=f,C.tail=f.sibling,C.renderingStartTime=Dn(),f.sibling=null,c=en.current,Tt(en,M?c&1|2:c&1),f):(Qn(f),null);case 22:case 23:return K0(),M=f.memoizedState!==null,c!==null&&c.memoizedState!==null!==M&&(f.flags|=8192),M&&f.mode&1?Di&1073741824&&(Qn(f),Be&&f.subtreeFlags&6&&(f.flags|=8192)):Qn(f),null;case 24:return null;case 25:return null}throw Error(o(156,f.tag))}var oI=a.ReactCurrentOwner,Ii=!1;function oi(c,f,g,M){f.child=c===null?Dw(f,null,g,M):xl(f,c.child,g,M)}function aM(c,f,g,M,C){g=g.render;var T=f.ref;return ml(f,C),M=_0(c,f,g,M,T,C),g=w0(),c!==null&&!Ii?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~C,As(c,f,C)):(Qt&&g&&f0(f),f.flags|=1,oi(c,f,M,C),f.child)}function lM(c,f,g,M,C){if(c===null){var T=g.type;return typeof T=="function"&&!Z0(T)&&T.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(f.tag=15,f.type=T,cM(c,f,T,M,C)):(c=Id(g.type,null,M,f,f.mode,C),c.ref=f.ref,c.return=f,f.child=c)}if(T=c.child,!(c.lanes&C)){var k=T.memoizedProps;if(g=g.compare,g=g!==null?g:Yh,g(k,M)&&c.ref===f.ref)return As(c,f,C)}return f.flags|=1,c=to(T,M),c.ref=f.ref,c.return=f,f.child=c}function cM(c,f,g,M,C){if(c!==null&&Yh(c.memoizedProps,M)&&c.ref===f.ref)if(Ii=!1,(c.lanes&C)!==0)c.flags&131072&&(Ii=!0);else return f.lanes=c.lanes,As(c,f,C);return T0(c,f,g,M,C)}function uM(c,f,g){var M=f.pendingProps,C=M.children,T=c!==null?c.memoizedState:null;if(M.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null},Tt(Ml,Di),Di|=g;else if(g&1073741824)f.memoizedState={baseLanes:0,cachePool:null},M=T!==null?T.baseLanes:g,Tt(Ml,Di),Di|=M;else return c=T!==null?T.baseLanes|g:g,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:c,cachePool:null},f.updateQueue=null,Tt(Ml,Di),Di|=c,null;else T!==null?(M=T.baseLanes|g,f.memoizedState=null):M=g,Tt(Ml,Di),Di|=M;return oi(c,f,C,g),f.child}function fM(c,f){var g=f.ref;(c===null&&g!==null||c!==null&&c.ref!==g)&&(f.flags|=512,f.flags|=2097152)}function T0(c,f,g,M,C){var T=vi(g)?ds:kt.current;return T=ps(f,T),ml(f,C),g=_0(c,f,g,M,T,C),M=w0(),c!==null&&!Ii?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~C,As(c,f,C)):(Qt&&M&&f0(f),f.flags|=1,oi(c,f,g,C),f.child)}function hM(c,f,g,M,C){if(vi(g)){var T=!0;Hh(f)}else T=!1;if(ml(f,C),f.stateNode===null)c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),Ew(f,g,M),u0(f,g,M,C),M=!0;else if(c===null){var k=f.stateNode,X=f.memoizedProps;k.props=X;var ue=k.context,Ee=g.contextType;typeof Ee=="object"&&Ee!==null?Ee=Zi(Ee):(Ee=vi(g)?ds:kt.current,Ee=ps(f,Ee));var Ge=g.getDerivedStateFromProps,ct=typeof Ge=="function"||typeof k.getSnapshotBeforeUpdate=="function";ct||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(X!==M||ue!==Ee)&&bw(f,k,M,Ee),Ks=!1;var nt=f.memoizedState;k.state=nt,qh(f,M,k,C),ue=f.memoizedState,X!==M||nt!==ue||In.current||Ks?(typeof Ge=="function"&&(c0(f,g,Ge,M),ue=f.memoizedState),(X=Ks||Cw(f,g,X,M,nt,ue,Ee))?(ct||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(f.flags|=4194308)):(typeof k.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=M,f.memoizedState=ue),k.props=M,k.state=ue,k.context=Ee,M=X):(typeof k.componentDidMount=="function"&&(f.flags|=4194308),M=!1)}else{k=f.stateNode,_w(c,f),X=f.memoizedProps,Ee=f.type===f.elementType?X:wr(f.type,X),k.props=Ee,ct=f.pendingProps,nt=k.context,ue=g.contextType,typeof ue=="object"&&ue!==null?ue=Zi(ue):(ue=vi(g)?ds:kt.current,ue=ps(f,ue));var Gt=g.getDerivedStateFromProps;(Ge=typeof Gt=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(X!==ct||nt!==ue)&&bw(f,k,M,ue),Ks=!1,nt=f.memoizedState,k.state=nt,qh(f,M,k,C);var Ze=f.memoizedState;X!==ct||nt!==Ze||In.current||Ks?(typeof Gt=="function"&&(c0(f,g,Gt,M),Ze=f.memoizedState),(Ee=Ks||Cw(f,g,Ee,M,nt,Ze,ue)||!1)?(Ge||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(M,Ze,ue),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(M,Ze,ue)),typeof k.componentDidUpdate=="function"&&(f.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof k.componentDidUpdate!="function"||X===c.memoizedProps&&nt===c.memoizedState||(f.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||X===c.memoizedProps&&nt===c.memoizedState||(f.flags|=1024),f.memoizedProps=M,f.memoizedState=Ze),k.props=M,k.state=Ze,k.context=ue,M=Ee):(typeof k.componentDidUpdate!="function"||X===c.memoizedProps&&nt===c.memoizedState||(f.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||X===c.memoizedProps&&nt===c.memoizedState||(f.flags|=1024),M=!1)}return P0(c,f,g,M,T,C)}function P0(c,f,g,M,C,T){fM(c,f);var k=(f.flags&128)!==0;if(!M&&!k)return C&&gw(f,g,!1),As(c,f,T);M=f.stateNode,oI.current=f;var X=k&&typeof g.getDerivedStateFromError!="function"?null:M.render();return f.flags|=1,c!==null&&k?(f.child=xl(f,c.child,null,T),f.child=xl(f,null,X,T)):oi(c,f,X,T),f.memoizedState=M.state,C&&gw(f,g,!0),f.child}function dM(c){var f=c.stateNode;f.pendingContext?pw(c,f.pendingContext,f.pendingContext!==f.context):f.context&&pw(c,f.context,!1),g0(c,f.containerInfo)}function pM(c,f,g,M,C){return vl(),m0(C),f.flags|=256,oi(c,f,g,M),f.child}var dd={dehydrated:null,treeContext:null,retryLane:0};function pd(c){return{baseLanes:c,cachePool:null}}function mM(c,f,g){var M=f.pendingProps,C=en.current,T=!1,k=(f.flags&128)!==0,X;if((X=k)||(X=c!==null&&c.memoizedState===null?!1:(C&2)!==0),X?(T=!0,f.flags&=-129):(c===null||c.memoizedState!==null)&&(C|=1),Tt(en,C&1),c===null)return p0(f),c=f.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(f.mode&1?iu(c)?f.lanes=8:f.lanes=1073741824:f.lanes=1,null):(C=M.children,c=M.fallback,T?(M=f.mode,T=f.child,C={mode:"hidden",children:C},!(M&1)&&T!==null?(T.childLanes=0,T.pendingProps=C):T=Dd(C,M,0,null),c=la(c,M,g,null),T.return=f,c.return=f,T.sibling=c,f.child=T,f.child.memoizedState=pd(g),f.memoizedState=dd,c):B0(f,C));if(C=c.memoizedState,C!==null){if(X=C.dehydrated,X!==null){if(k)return f.flags&256?(f.flags&=-257,md(c,f,g,Error(o(422)))):f.memoizedState!==null?(f.child=c.child,f.flags|=128,null):(T=M.fallback,C=f.mode,M=Dd({mode:"visible",children:M.children},C,0,null),T=la(T,C,g,null),T.flags|=2,M.return=f,T.return=f,M.sibling=T,f.child=M,f.mode&1&&xl(f,c.child,null,g),f.child.memoizedState=pd(g),f.memoizedState=dd,T);if(!(f.mode&1))f=md(c,f,g,null);else if(iu(X))f=md(c,f,g,Error(o(419)));else if(M=(g&c.childLanes)!==0,Ii||M){if(M=vn,M!==null){switch(g&-g){case 4:T=2;break;case 16:T=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:T=32;break;case 536870912:T=268435456;break;default:T=0}M=T&(M.suspendedLanes|g)?0:T,M!==0&&M!==C.retryLane&&(C.retryLane=M,nr(c,M,-1))}Q0(),f=md(c,f,g,Error(o(421)))}else zh(X)?(f.flags|=128,f.child=c.child,f=xI.bind(null,c),F(X,f),f=null):(g=C.treeContext,oe&&(Li=me(X),Ri=f,Qt=!0,Mr=null,ou=!1,g!==null&&(qi[$i++]=ys,qi[$i++]=vs,qi[$i++]=ea,ys=g.id,vs=g.overflow,ea=f)),f=B0(f,f.pendingProps.children),f.flags|=4096);return f}return T?(M=yM(c,f,M.children,M.fallback,g),T=f.child,C=c.child.memoizedState,T.memoizedState=C===null?pd(g):{baseLanes:C.baseLanes|g,cachePool:null},T.childLanes=c.childLanes&~g,f.memoizedState=dd,M):(g=gM(c,f,M.children,g),f.memoizedState=null,g)}return T?(M=yM(c,f,M.children,M.fallback,g),T=f.child,C=c.child.memoizedState,T.memoizedState=C===null?pd(g):{baseLanes:C.baseLanes|g,cachePool:null},T.childLanes=c.childLanes&~g,f.memoizedState=dd,M):(g=gM(c,f,M.children,g),f.memoizedState=null,g)}function B0(c,f){return f=Dd({mode:"visible",children:f},c.mode,0,null),f.return=c,c.child=f}function gM(c,f,g,M){var C=c.child;return c=C.sibling,g=to(C,{mode:"visible",children:g}),!(f.mode&1)&&(g.lanes=M),g.return=f,g.sibling=null,c!==null&&(M=f.deletions,M===null?(f.deletions=[c],f.flags|=16):M.push(c)),f.child=g}function yM(c,f,g,M,C){var T=f.mode;c=c.child;var k=c.sibling,X={mode:"hidden",children:g};return!(T&1)&&f.child!==c?(g=f.child,g.childLanes=0,g.pendingProps=X,f.deletions=null):(g=to(c,X),g.subtreeFlags=c.subtreeFlags&14680064),k!==null?M=to(k,M):(M=la(M,T,C,null),M.flags|=2),M.return=f,g.return=f,g.sibling=M,f.child=g,M}function md(c,f,g,M){return M!==null&&m0(M),xl(f,c.child,null,g),c=B0(f,f.pendingProps.children),c.flags|=2,f.memoizedState=null,c}function vM(c,f,g){c.lanes|=f;var M=c.alternate;M!==null&&(M.lanes|=f),a0(c.return,f,g)}function R0(c,f,g,M,C){var T=c.memoizedState;T===null?c.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:M,tail:g,tailMode:C}:(T.isBackwards=f,T.rendering=null,T.renderingStartTime=0,T.last=M,T.tail=g,T.tailMode=C)}function xM(c,f,g){var M=f.pendingProps,C=M.revealOrder,T=M.tail;if(oi(c,f,M.children,g),M=en.current,M&2)M=M&1|2,f.flags|=128;else{if(c!==null&&c.flags&128)e:for(c=f.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&vM(c,g,f);else if(c.tag===19)vM(c,g,f);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===f)break e;for(;c.sibling===null;){if(c.return===null||c.return===f)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}M&=1}if(Tt(en,M),!(f.mode&1))f.memoizedState=null;else switch(C){case"forwards":for(g=f.child,C=null;g!==null;)c=g.alternate,c!==null&&id(c)===null&&(C=g),g=g.sibling;g=C,g===null?(C=f.child,f.child=null):(C=g.sibling,g.sibling=null),R0(f,!1,C,g,T);break;case"backwards":for(g=null,C=f.child,f.child=null;C!==null;){if(c=C.alternate,c!==null&&id(c)===null){f.child=C;break}c=C.sibling,C.sibling=g,g=C,C=c}R0(f,!0,g,null,T);break;case"together":R0(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function As(c,f,g){if(c!==null&&(f.dependencies=c.dependencies),Sl|=f.lanes,!(g&f.childLanes))return null;if(c!==null&&f.child!==c.child)throw Error(o(153));if(f.child!==null){for(c=f.child,g=to(c,c.pendingProps),f.child=g,g.return=f;c.sibling!==null;)c=c.sibling,g=g.sibling=to(c,c.pendingProps),g.return=f;g.sibling=null}return f.child}function aI(c,f,g){switch(f.tag){case 3:dM(f),vl();break;case 5:Fw(f);break;case 1:vi(f.type)&&Hh(f);break;case 4:g0(f,f.stateNode.containerInfo);break;case 10:Aw(f,f.type._context,f.memoizedProps.value);break;case 13:var M=f.memoizedState;if(M!==null)return M.dehydrated!==null?(Tt(en,en.current&1),f.flags|=128,null):g&f.child.childLanes?mM(c,f,g):(Tt(en,en.current&1),c=As(c,f,g),c!==null?c.sibling:null);Tt(en,en.current&1);break;case 19:if(M=(g&f.childLanes)!==0,c.flags&128){if(M)return xM(c,f,g);f.flags|=128}var C=f.memoizedState;if(C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),Tt(en,en.current),M)break;return null;case 22:case 23:return f.lanes=0,uM(c,f,g)}return As(c,f,g)}function lI(c,f){switch(h0(f),f.tag){case 1:return vi(f.type)&&Gh(),c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 3:return _l(),ht(In),ht(kt),x0(),c=f.flags,c&65536&&!(c&128)?(f.flags=c&-65537|128,f):null;case 5:return y0(f),null;case 13:if(ht(en),c=f.memoizedState,c!==null&&c.dehydrated!==null){if(f.alternate===null)throw Error(o(340));vl()}return c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 19:return ht(en),null;case 4:return _l(),null;case 10:return o0(f.type._context),null;case 22:case 23:return K0(),null;case 24:return null;default:return null}}var gd=!1,ia=!1,cI=typeof WeakSet=="function"?WeakSet:Set,Le=null;function yd(c,f){var g=c.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(M){_i(c,f,M)}else g.current=null}function L0(c,f,g){try{g()}catch(M){_i(c,f,M)}}var AM=!1;function uI(c,f){for(J(c.containerInfo),Le=f;Le!==null;)if(c=Le,f=c.child,(c.subtreeFlags&1028)!==0&&f!==null)f.return=c,Le=f;else for(;Le!==null;){c=Le;try{var g=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var M=g.memoizedProps,C=g.memoizedState,T=c.stateNode,k=T.getSnapshotBeforeUpdate(c.elementType===c.type?M:wr(c.type,M),C);T.__reactInternalSnapshotBeforeUpdate=k}break;case 3:Be&&Re(c.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(X){_i(c,c.return,X)}if(f=c.sibling,f!==null){f.return=c.return,Le=f;break}Le=c.return}return g=AM,AM=!1,g}function ra(c,f,g){var M=f.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var C=M=M.next;do{if((C.tag&c)===c){var T=C.destroy;C.destroy=void 0,T!==void 0&&L0(f,g,T)}C=C.next}while(C!==M)}}function vu(c,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&c)===c){var M=g.create;g.destroy=M()}g=g.next}while(g!==f)}}function I0(c){var f=c.ref;if(f!==null){var g=c.stateNode;switch(c.tag){case 5:c=ie(g);break;default:c=g}typeof f=="function"?f(c):f.current=c}}function _M(c,f,g){if(Vr&&typeof Vr.onCommitFiberUnmount=="function")try{Vr.onCommitFiberUnmount(Jh,f)}catch{}switch(f.tag){case 0:case 11:case 14:case 15:if(c=f.updateQueue,c!==null&&(c=c.lastEffect,c!==null)){var M=c=c.next;do{var C=M,T=C.destroy;C=C.tag,T!==void 0&&(C&2||C&4)&&L0(f,g,T),M=M.next}while(M!==c)}break;case 1:if(yd(f,g),c=f.stateNode,typeof c.componentWillUnmount=="function")try{c.props=f.memoizedProps,c.state=f.memoizedState,c.componentWillUnmount()}catch(k){_i(f,g,k)}break;case 5:yd(f,g);break;case 4:Be?bM(c,f,g):fe&&fe&&(f=f.stateNode.containerInfo,g=_t(f),Xn(f,g))}}function wM(c,f,g){for(var M=f;;)if(_M(c,M,g),M.child===null||Be&&M.tag===4){if(M===f)break;for(;M.sibling===null;){if(M.return===null||M.return===f)return;M=M.return}M.sibling.return=M.return,M=M.sibling}else M.child.return=M,M=M.child}function MM(c){var f=c.alternate;f!==null&&(c.alternate=null,MM(f)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(f=c.stateNode,f!==null&&qe(f)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function SM(c){return c.tag===5||c.tag===3||c.tag===4}function CM(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||SM(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function EM(c){if(Be){e:{for(var f=c.return;f!==null;){if(SM(f))break e;f=f.return}throw Error(o(160))}var g=f;switch(g.tag){case 5:f=g.stateNode,g.flags&32&&(xe(f),g.flags&=-33),g=CM(c),F0(c,g,f);break;case 3:case 4:f=g.stateNode.containerInfo,g=CM(c),D0(c,g,f);break;default:throw Error(o(161))}}}function D0(c,f,g){var M=c.tag;if(M===5||M===6)c=c.stateNode,f?$e(g,c,f):De(g,c);else if(M!==4&&(c=c.child,c!==null))for(D0(c,f,g),c=c.sibling;c!==null;)D0(c,f,g),c=c.sibling}function F0(c,f,g){var M=c.tag;if(M===5||M===6)c=c.stateNode,f?We(g,c,f):it(g,c);else if(M!==4&&(c=c.child,c!==null))for(F0(c,f,g),c=c.sibling;c!==null;)F0(c,f,g),c=c.sibling}function bM(c,f,g){for(var M=f,C=!1,T,k;;){if(!C){C=M.return;e:for(;;){if(C===null)throw Error(o(160));switch(T=C.stateNode,C.tag){case 5:k=!1;break e;case 3:T=T.containerInfo,k=!0;break e;case 4:T=T.containerInfo,k=!0;break e}C=C.return}C=!0}if(M.tag===5||M.tag===6)wM(c,M,g),k?j(T,M.stateNode):Je(T,M.stateNode);else if(M.tag===18)k?ln(T,M.stateNode):Mt(T,M.stateNode);else if(M.tag===4){if(M.child!==null){T=M.stateNode.containerInfo,k=!0,M.child.return=M,M=M.child;continue}}else if(_M(c,M,g),M.child!==null){M.child.return=M,M=M.child;continue}if(M===f)break;for(;M.sibling===null;){if(M.return===null||M.return===f)return;M=M.return,M.tag===4&&(C=!1)}M.sibling.return=M.return,M=M.sibling}}function N0(c,f){if(Be){switch(f.tag){case 0:case 11:case 14:case 15:ra(3,f,f.return),vu(3,f),ra(5,f,f.return);return;case 1:return;case 5:var g=f.stateNode;if(g!=null){var M=f.memoizedProps;c=c!==null?c.memoizedProps:M;var C=f.type,T=f.updateQueue;f.updateQueue=null,T!==null&&rt(g,T,C,c,M,f)}return;case 6:if(f.stateNode===null)throw Error(o(162));g=f.memoizedProps,ge(f.stateNode,c!==null?c.memoizedProps:g,g);return;case 3:oe&&c!==null&&c.memoizedState.isDehydrated&&Ct(f.stateNode.containerInfo);return;case 12:return;case 13:vd(f);return;case 19:vd(f);return;case 17:return}throw Error(o(163))}switch(f.tag){case 0:case 11:case 14:case 15:ra(3,f,f.return),vu(3,f),ra(5,f,f.return);return;case 12:return;case 13:vd(f);return;case 19:vd(f);return;case 3:oe&&c!==null&&c.memoizedState.isDehydrated&&Ct(f.stateNode.containerInfo);break;case 22:case 23:return}e:if(fe){switch(f.tag){case 1:case 5:case 6:break e;case 3:case 4:f=f.stateNode,Xn(f.containerInfo,f.pendingChildren);break e}throw Error(o(163))}}function vd(c){var f=c.updateQueue;if(f!==null){c.updateQueue=null;var g=c.stateNode;g===null&&(g=c.stateNode=new cI),f.forEach(function(M){var C=AI.bind(null,c,M);g.has(M)||(g.add(M),M.then(C,C))})}}function fI(c,f){for(Le=f;Le!==null;){f=Le;var g=f.deletions;if(g!==null)for(var M=0;M";case Ad:return":has("+(U0(c)||"")+")";case _d:return'[role="'+c.value+'"]';case Md:return'"'+c.value+'"';case wd:return'[data-testname="'+c.value+'"]';default:throw Error(o(365))}}function LM(c,f){var g=[];c=[c,0];for(var M=0;MC&&(C=k),M&=~T}if(M=C,M=Dn()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*dI(M/1960))-M,10c?16:c,qs===null)var M=!1;else{if(c=qs,qs=null,Td=0,vt&6)throw Error(o(331));var C=vt;for(vt|=4,Le=c.current;Le!==null;){var T=Le,k=T.child;if(Le.flags&16){var X=T.deletions;if(X!==null){for(var ue=0;ueDn()-V0?sa(c,0):H0|=g),Ai(c,f)}function GM(c,f){f===0&&(c.mode&1?(f=Wh,Wh<<=1,!(Wh&130023424)&&(Wh=4194304)):f=1);var g=ai();c=Rd(c,f),c!==null&&(su(c,f,g),Ai(c,g))}function xI(c){var f=c.memoizedState,g=0;f!==null&&(g=f.retryLane),GM(c,g)}function AI(c,f){var g=0;switch(c.tag){case 13:var M=c.stateNode,C=c.memoizedState;C!==null&&(g=C.retryLane);break;case 19:M=c.stateNode;break;default:throw Error(o(314))}M!==null&&M.delete(f),GM(c,g)}var HM;HM=function(c,f,g){if(c!==null)if(c.memoizedProps!==f.pendingProps||In.current)Ii=!0;else{if(!(c.lanes&g)&&!(f.flags&128))return Ii=!1,aI(c,f,g);Ii=!!(c.flags&131072)}else Ii=!1,Qt&&f.flags&1048576&&Tw(f,td,f.index);switch(f.lanes=0,f.tag){case 2:var M=f.type;c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),c=f.pendingProps;var C=ps(f,kt.current);ml(f,g),C=_0(null,f,M,c,C,g);var T=w0();return f.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,vi(M)?(T=!0,Hh(f)):T=!1,f.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,l0(f),C.updater=$h,f.stateNode=C,C._reactInternals=f,u0(f,M,c,g),f=P0(null,f,M,!0,T,g)):(f.tag=0,Qt&&T&&f0(f),oi(null,f,C,g),f=f.child),f;case 16:M=f.elementType;e:{switch(c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),c=f.pendingProps,C=M._init,M=C(M._payload),f.type=M,C=f.tag=wI(M),c=wr(M,c),C){case 0:f=T0(null,f,M,c,g);break e;case 1:f=hM(null,f,M,c,g);break e;case 11:f=aM(null,f,M,c,g);break e;case 14:f=lM(null,f,M,wr(M.type,c),g);break e}throw Error(o(306,M,""))}return f;case 0:return M=f.type,C=f.pendingProps,C=f.elementType===M?C:wr(M,C),T0(c,f,M,C,g);case 1:return M=f.type,C=f.pendingProps,C=f.elementType===M?C:wr(M,C),hM(c,f,M,C,g);case 3:e:{if(dM(f),c===null)throw Error(o(387));M=f.pendingProps,T=f.memoizedState,C=T.element,_w(c,f),qh(f,M,null,g);var k=f.memoizedState;if(M=k.element,oe&&T.isDehydrated)if(T={element:M,isDehydrated:!1,cache:k.cache,transitions:k.transitions},f.updateQueue.baseState=T,f.memoizedState=T,f.flags&256){C=Error(o(423)),f=pM(c,f,M,g,C);break e}else if(M!==C){C=Error(o(424)),f=pM(c,f,M,g,C);break e}else for(oe&&(Li=$(f.stateNode.containerInfo),Ri=f,Qt=!0,Mr=null,ou=!1),g=Dw(f,null,M,g),f.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(vl(),M===C){f=As(c,f,g);break e}oi(c,f,M,g)}f=f.child}return f;case 5:return Fw(f),c===null&&p0(f),M=f.type,C=f.pendingProps,T=c!==null?c.memoizedProps:null,k=C.children,ye(M,C)?k=null:T!==null&&ye(M,T)&&(f.flags|=32),fM(c,f),oi(c,f,k,g),f.child;case 6:return c===null&&p0(f),null;case 13:return mM(c,f,g);case 4:return g0(f,f.stateNode.containerInfo),M=f.pendingProps,c===null?f.child=xl(f,null,M,g):oi(c,f,M,g),f.child;case 11:return M=f.type,C=f.pendingProps,C=f.elementType===M?C:wr(M,C),aM(c,f,M,C,g);case 7:return oi(c,f,f.pendingProps,g),f.child;case 8:return oi(c,f,f.pendingProps.children,g),f.child;case 12:return oi(c,f,f.pendingProps.children,g),f.child;case 10:e:{if(M=f.type._context,C=f.pendingProps,T=f.memoizedProps,k=C.value,Aw(f,M,k),T!==null)if(Wr(T.value,k)){if(T.children===C.children&&!In.current){f=As(c,f,g);break e}}else for(T=f.child,T!==null&&(T.return=f);T!==null;){var X=T.dependencies;if(X!==null){k=T.child;for(var ue=X.firstContext;ue!==null;){if(ue.context===M){if(T.tag===1){ue=gs(-1,g&-g),ue.tag=2;var Ee=T.updateQueue;if(Ee!==null){Ee=Ee.shared;var Ge=Ee.pending;Ge===null?ue.next=ue:(ue.next=Ge.next,Ge.next=ue),Ee.pending=ue}}T.lanes|=g,ue=T.alternate,ue!==null&&(ue.lanes|=g),a0(T.return,g,f),X.lanes|=g;break}ue=ue.next}}else if(T.tag===10)k=T.type===f.type?null:T.child;else if(T.tag===18){if(k=T.return,k===null)throw Error(o(341));k.lanes|=g,X=k.alternate,X!==null&&(X.lanes|=g),a0(k,g,f),k=T.sibling}else k=T.child;if(k!==null)k.return=T;else for(k=T;k!==null;){if(k===f){k=null;break}if(T=k.sibling,T!==null){T.return=k.return,k=T;break}k=k.return}T=k}oi(c,f,C.children,g),f=f.child}return f;case 9:return C=f.type,M=f.pendingProps.children,ml(f,g),C=Zi(C),M=M(C),f.flags|=1,oi(c,f,M,g),f.child;case 14:return M=f.type,C=wr(M,f.pendingProps),C=wr(M.type,C),lM(c,f,M,C,g);case 15:return cM(c,f,f.type,f.pendingProps,g);case 17:return M=f.type,C=f.pendingProps,C=f.elementType===M?C:wr(M,C),c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),f.tag=1,vi(M)?(c=!0,Hh(f)):c=!1,ml(f,g),Ew(f,M,C),u0(f,M,C,g),P0(null,f,M,!0,c,g);case 19:return xM(c,f,g);case 22:return uM(c,f,g)}throw Error(o(156,f.tag))};function VM(c,f){return e0(c,f)}function _I(c,f,g,M){this.tag=c,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ir(c,f,g,M){return new _I(c,f,g,M)}function Z0(c){return c=c.prototype,!(!c||!c.isReactComponent)}function wI(c){if(typeof c=="function")return Z0(c)?1:0;if(c!=null){if(c=c.$$typeof,c===y)return 11;if(c===_)return 14}return 2}function to(c,f){var g=c.alternate;return g===null?(g=ir(c.tag,f,c.key,c.mode),g.elementType=c.elementType,g.type=c.type,g.stateNode=c.stateNode,g.alternate=c,c.alternate=g):(g.pendingProps=f,g.type=c.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=c.flags&14680064,g.childLanes=c.childLanes,g.lanes=c.lanes,g.child=c.child,g.memoizedProps=c.memoizedProps,g.memoizedState=c.memoizedState,g.updateQueue=c.updateQueue,f=c.dependencies,g.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},g.sibling=c.sibling,g.index=c.index,g.ref=c.ref,g}function Id(c,f,g,M,C,T){var k=2;if(M=c,typeof c=="function")Z0(c)&&(k=1);else if(typeof c=="string")k=5;else e:switch(c){case h:return la(g.children,C,T,f);case d:k=8,C|=8;break;case p:return c=ir(12,g,f,C|2),c.elementType=p,c.lanes=T,c;case x:return c=ir(13,g,f,C),c.elementType=x,c.lanes=T,c;case A:return c=ir(19,g,f,C),c.elementType=A,c.lanes=T,c;case S:return Dd(g,C,T,f);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case m:k=10;break e;case v:k=9;break e;case y:k=11;break e;case _:k=14;break e;case w:k=16,M=null;break e}throw Error(o(130,c==null?c:typeof c,""))}return f=ir(k,g,f,C),f.elementType=c,f.type=M,f.lanes=T,f}function la(c,f,g,M){return c=ir(7,c,M,f),c.lanes=g,c}function Dd(c,f,g,M){return c=ir(22,c,M,f),c.elementType=S,c.lanes=g,c.stateNode={},c}function q0(c,f,g){return c=ir(6,c,null,f),c.lanes=g,c}function $0(c,f,g){return f=ir(4,c.children!==null?c.children:[],c.key,f),f.lanes=g,f.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},f}function MI(c,f,g,M,C){this.tag=f,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=He,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qg(0),this.expirationTimes=qg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qg(0),this.identifierPrefix=M,this.onRecoverableError=C,oe&&(this.mutableSourceEagerHydrationData=null)}function WM(c,f,g,M,C,T,k,X,ue){return c=new MI(c,f,g,X,ue),f===1?(f=1,T===!0&&(f|=8)):f=0,T=ir(3,null,null,f),c.current=T,T.stateNode=c,T.memoizedState={element:M,isDehydrated:g,cache:null,transitions:null},l0(T),c}function jM(c){if(!c)return Qi;c=c._reactInternals;e:{if(B(c)!==c||c.tag!==1)throw Error(o(170));var f=c;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(vi(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(o(171))}if(c.tag===1){var g=c.type;if(vi(g))return mw(c,g,f)}return f}function JM(c){var f=c._reactInternals;if(f===void 0)throw typeof c.render=="function"?Error(o(188)):(c=Object.keys(c).join(","),Error(o(268,c)));return c=Z(f),c===null?null:c.stateNode}function XM(c,f){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var g=c.retryLane;c.retryLane=g!==0&&g=Ee&&T>=ct&&C<=Ge&&k<=nt){c.splice(f,1);break}else if(M!==Ee||g.width!==ue.width||ntk){if(!(T!==ct||g.height!==ue.height||GeC)){Ee>M&&(ue.width+=Ee-M,ue.x=M),GeT&&(ue.height+=ct-T,ue.y=T),ntg&&(g=k)),k ")+` No matching component was found for: - `)+c.join(" > ")}return null},t.getPublicRootInstance=function(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return ie(c.child.stateNode);default:return c.child.stateNode}},t.injectIntoDevTools=function(c){if(c={bundleType:c.bundleType,version:c.version,rendererPackageName:c.rendererPackageName,rendererConfig:c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:SI,findFiberByHostInstance:c.findFiberByHostInstance||CI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)c=!0;else{try{Jh=f.inject(c),Vr=f}catch{}c=!!f.checkDCE}}return c},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(c,f,g,M){if(!xt)throw Error(o(363));c=z0(c,f);var C=be(c,g,M).disconnect;return{disconnect:function(){C()}}},t.registerMutableSourceForHydration=function(c,f){var g=f._getVersion;g=g(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,g]:c.mutableSourceEagerHydrationData.push(f,g)},t.runWithPriority=function(c,f){var g=Lt;try{return Lt=c,f()}finally{Lt=g}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(c,f,g,M){var C=f.current,T=ai(),k=$s(C);return g=jM(g),f.context===null?f.context=g:f.pendingContext=g,f=gs(T,k),f.payload={element:c},M=M===void 0?null:M,M!==null&&(f.callback=M),Qs(C,f),c=nr(C,k,T),c!==null&&Zh(c,C,k),k},t};L3.exports=C5;var E5=L3.exports;const b5=WA(E5),T5=n=>typeof n=="object"&&typeof n.then=="function",Oa=[];function F3(n,e,t=(i,r)=>i===r){if(n===e)return!0;if(!n||!e)return!1;const i=n.length;if(e.length!==i)return!1;for(let r=0;r0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,i.lifespan)),s.response;if(!t)throw s.promise}const r={keys:e,equal:i.equal,remove:()=>{const s=Oa.indexOf(r);s!==-1&&Oa.splice(s,1)},promise:(T5(n)?n:n(...e)).then(s=>{r.response=s,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(s=>r.error=s)};if(Oa.push(r),!t)throw r.promise}const P5=(n,e,t)=>N3(n,e,!1,t),B5=(n,e,t)=>void N3(n,e,!0,t),R5=n=>{if(n===void 0||n.length===0)Oa.splice(0,Oa.length);else{const e=Oa.find(t=>F3(n,t.keys,t.equal));e&&e.remove()}},L_={},L5=n=>void Object.assign(L_,n);function I5(n,e){function t(h,{args:d=[],attach:p,...m},v){let y=`${h[0].toUpperCase()}${h.slice(1)}`,x;if(h==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const A=m.object;x=Jl(A,{type:h,root:v,attach:p,primitive:!0})}else{const A=L_[y];if(!A)throw new Error(`R3F: ${y} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");x=Jl(new A(...d),{type:h,root:v,attach:p,memoizedProps:{args:d}})}return x.__r3f.attach===void 0&&(x instanceof ft?x.__r3f.attach="geometry":x instanceof Mn&&(x.__r3f.attach="material")),y!=="inject"&&uv(x,m),x}function i(h,d){let p=!1;if(d){var m,v;(m=d.__r3f)!=null&&m.attach?cv(h,d,d.__r3f.attach):d.isObject3D&&h.isObject3D&&(h.add(d),p=!0),p||(v=h.__r3f)==null||v.objects.push(d),d.__r3f||Jl(d,{}),d.__r3f.parent=h,vA(d),Xl(d)}}function r(h,d,p){let m=!1;if(d){var v,y;if((v=d.__r3f)!=null&&v.attach)cv(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"});const x=h.children.filter(_=>_!==d),A=x.indexOf(p);h.children=[...x.slice(0,A),d,...x.slice(A)],m=!0}m||(y=h.__r3f)==null||y.objects.push(d),d.__r3f||Jl(d,{}),d.__r3f.parent=h,vA(d),Xl(d)}}function s(h,d,p=!1){h&&[...h].forEach(m=>o(d,m,p))}function o(h,d,p){if(d){var m,v,y;if(d.__r3f&&(d.__r3f.parent=null),(m=h.__r3f)!=null&&m.objects&&(h.__r3f.objects=h.__r3f.objects.filter(S=>S!==d)),(v=d.__r3f)!=null&&v.attach)DE(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var x;h.remove(d),(x=d.__r3f)!=null&&x.root&&H5(d.__r3f.root,d)}const _=(y=d.__r3f)==null?void 0:y.primitive,w=!_&&(p===void 0?d.dispose!==null:p);if(!_){var A;s((A=d.__r3f)==null?void 0:A.objects,d,w),s(d.children,d,w)}if(delete d.__r3f,w&&d.dispose&&d.type!=="Scene"){const S=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?gA.unstable_scheduleCallback(gA.unstable_IdlePriority,S):S()}Xl(h)}}function a(h,d,p,m){var v;const y=(v=h.__r3f)==null?void 0:v.parent;if(!y)return;const x=t(d,p,h.__r3f.root);if(h.children){for(const A of h.children)A.__r3f&&i(x,A);h.children=h.children.filter(A=>!A.__r3f)}h.__r3f.objects.forEach(A=>i(x,A)),h.__r3f.objects=[],h.__r3f.autoRemovedBeforeAppend||o(y,h),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),i(y,x),x.raycast&&x.__r3f.eventCount&&x.__r3f.root.getState().internal.interaction.push(x),[m,m.alternate].forEach(A=>{A!==null&&(A.stateNode=x,A.ref&&(typeof A.ref=="function"?A.ref(x):A.ref.current=x))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:b5({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(h,d)=>{if(!d)return;const p=h.getState().scene;p.__r3f&&(p.__r3f.root=h,i(p,d))},removeChildFromContainer:(h,d)=>{d&&o(h.getState().scene,d)},insertInContainerBefore:(h,d,p)=>{if(!d||!p)return;const m=h.getState().scene;m.__r3f&&r(m,d,p)},getRootHostContext:()=>null,getChildHostContext:h=>h,finalizeInitialChildren(h){var d;return!!((d=h==null?void 0:h.__r3f)!=null?d:{}).handlers},prepareUpdate(h,d,p,m){var v;if(((v=h==null?void 0:h.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==h)return[!0];{const{args:x=[],children:A,..._}=m,{args:w=[],children:S,...E}=p;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((R,b)=>R!==w[b]))return[!0];const P=V3(h,_,E,!0);return P.changes.length?[!1,P]:null}},commitUpdate(h,[d,p],m,v,y,x){d?a(h,m,y,x):uv(h,p)},commitMount(h,d,p,m){var v;const y=(v=h.__r3f)!=null?v:{};h.raycast&&y.handlers&&y.eventCount&&h.__r3f.root.getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>Jl(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:m}=(d=h.__r3f)!=null?d:{};p&&m&&DE(m,h,p),h.isObject3D&&(h.visible=!1),Xl(h)},unhideInstance(h,d){var p;const{attach:m,parent:v}=(p=h.__r3f)!=null?p:{};m&&v&&cv(v,h,m),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),Xl(h)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():uc.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&Jt.fun(performance.now)?performance.now:Jt.fun(Date.now)?Date.now:()=>0,scheduleTimeout:Jt.fun(setTimeout)?setTimeout:void 0,cancelTimeout:Jt.fun(clearTimeout)?clearTimeout:void 0}),applyProps:uv}}var BE,RE;const lv=n=>"colorSpace"in n||"outputColorSpace"in n,k3=()=>{var n;return(n=L_.ColorManagement)!=null?n:null},O3=n=>n&&n.isOrthographicCamera,D5=n=>n&&n.hasOwnProperty("current"),Rh=typeof window<"u"&&((BE=window.document)!=null&&BE.createElement||((RE=window.navigator)==null?void 0:RE.product)==="ReactNative")?z.useLayoutEffect:z.useEffect;function U3(n){const e=z.useRef(n);return Rh(()=>void(e.current=n),[n]),e}function F5({set:n}){return Rh(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class z3 extends z.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}z3.getDerivedStateFromError=()=>({error:!0});const G3="__default",LE=new Map,N5=n=>n&&!!n.memoized&&!!n.changes;function H3(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const Vu=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},Jt={obj:n=>n===Object(n)&&!Jt.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(Jt.str(n)||Jt.num(n))return n===e;const s=Jt.obj(n);if(s&&i==="reference")return n===e;const o=Jt.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;if(s&&t==="shallow"&&i==="shallow"){for(a in r?e:n)if(!Jt.equ(n[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:n)if(n[a]!==e[a])return!1;if(Jt.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function k5(n){const e={nodes:{},materials:{}};return n&&n.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function O5(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function Jl(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function yA(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const IE=/-\d+$/;function cv(n,e,t){if(Jt.str(t)){if(IE.test(t)){const s=t.replace(IE,""),{target:o,key:a}=yA(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=yA(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function DE(n,e,t){var i,r;if(Jt.str(t)){const{target:s,key:o}=yA(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function V3(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},u=!1){var h;const d=(h=n==null?void 0:n.__r3f)!=null?h:{},p=Object.entries(r),m=[];if(u){const y=Object.keys(l);for(let x=0;x{var A;if((A=n.__r3f)!=null&&A.primitive&&y==="object"||Jt.equ(x,l[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return m.push([y,x,!0,[]]);let _=[];y.includes("-")&&(_=y.split("-")),m.push([y,x,!1,_]);for(const w in r){const S=r[w];w.startsWith(`${y}-`)&&m.push([w,S,!1,w.split("-")])}});const v={...r};return d.memoizedProps&&d.memoizedProps.args&&(v.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(v.attach=d.memoizedProps.attach),{memoized:v,changes:m}}const U5=typeof process<"u"&&!1;function uv(n,e){var t,i,r;const s=(t=n.__r3f)!=null?t:{},o=s.root,a=(i=o==null||o.getState==null?void 0:o.getState())!=null?i:{},{memoized:l,changes:u}=N5(e)?e:V3(n,e),h=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=l);for(let p=0;pw[S],n),!(_&&_.set))){const[w,...S]=x.reverse();A=S.reverse().reduce((E,P)=>E[P],n),m=w}if(v===G3+"remove")if(A.constructor){let w=LE.get(A.constructor);w||(w=new A.constructor,LE.set(A.constructor,w)),v=w[m]}else v=0;if(y)v?s.handlers[m]=v:delete s.handlers[m],s.eventCount=Object.keys(s.handlers).length;else if(_&&_.set&&(_.copy||_ instanceof Xa)){if(Array.isArray(v))_.fromArray?_.fromArray(v):_.set(...v);else if(_.copy&&v&&v.constructor&&(U5?_.constructor.name===v.constructor.name:_.constructor===v.constructor))_.copy(v);else if(v!==void 0){const w=_ instanceof Ie;!w&&_.setScalar?_.setScalar(v):_ instanceof Xa&&v instanceof Xa?_.mask=v.mask:_.set(v),!k3()&&!a.linear&&w&&_.convertSRGBToLinear()}}else if(A[m]=v,A[m]instanceof $t&&A[m].format===Mi&&A[m].type===js){const w=A[m];lv(w)&&lv(a.gl)?w.colorSpace=a.gl.outputColorSpace:w.encoding=a.gl.outputEncoding}Xl(n)}if(s.parent&&a.internal&&n.raycast&&h!==s.eventCount){const p=a.internal.interaction.indexOf(n);p>-1&&a.internal.interaction.splice(p,1),s.eventCount&&a.internal.interaction.push(n)}return!(u.length===1&&u[0][0]==="onUpdate")&&u.length&&(r=n.__r3f)!=null&&r.parent&&vA(n),n}function Xl(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function vA(n){n.onUpdate==null||n.onUpdate(n)}function z5(n,e){n.manual||(O3(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function kp(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function G5(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return uc.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return uc.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return uc.ContinuousEventPriority;default:return uc.DefaultEventPriority}}function W3(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function H5(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{W3(t.capturedMap,e,i,r)})}function V5(n){function e(l){const{internal:u}=n.getState(),h=l.offsetX-u.initialClick[0],d=l.offsetY-u.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(l){return l.filter(u=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=u.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(l,u){const h=n.getState(),d=new Set,p=[],m=u?u(h.internal.interaction):h.internal.interaction;for(let A=0;A{const w=Vu(A.object),S=Vu(_.object);return!w||!S?A.distance-_.distance:S.events.priority-w.events.priority||A.distance-_.distance}).filter(A=>{const _=kp(A);return d.has(_)?!1:(d.add(_),!0)});h.events.filter&&(y=h.events.filter(y,h));for(const A of y){let _=A.object;for(;_;){var x;(x=_.__r3f)!=null&&x.eventCount&&p.push({...A,eventObject:_}),_=_.parent}}if("pointerId"in l&&h.internal.capturedMap.has(l.pointerId))for(let A of h.internal.capturedMap.get(l.pointerId).values())d.has(kp(A.intersection))||p.push(A.intersection);return p}function r(l,u,h,d){const p=n.getState();if(l.length){const m={stopped:!1};for(const v of l){const y=Vu(v.object)||p,{raycaster:x,pointer:A,camera:_,internal:w}=y,S=new D(A.x,A.y,0).unproject(_),E=L=>{var U,Z;return(U=(Z=w.capturedMap.get(L))==null?void 0:Z.has(v.eventObject))!=null?U:!1},P=L=>{const U={intersection:v,target:u.target};w.capturedMap.has(L)?w.capturedMap.get(L).set(v.eventObject,U):w.capturedMap.set(L,new Map([[v.eventObject,U]])),u.target.setPointerCapture(L)},R=L=>{const U=w.capturedMap.get(L);U&&W3(w.capturedMap,v.eventObject,U,L)};let b={};for(let L in u){let U=u[L];typeof U!="function"&&(b[L]=U)}let B={...v,...b,pointer:A,intersections:l,stopped:m.stopped,delta:h,unprojectedPoint:S,ray:x.ray,camera:_,stopPropagation(){const L="pointerId"in u&&w.capturedMap.get(u.pointerId);if((!L||L.has(v.eventObject))&&(B.stopped=m.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(U=>U.eventObject===v.eventObject))){const U=l.slice(0,l.indexOf(v));s([...U,v])}},target:{hasPointerCapture:E,setPointerCapture:P,releasePointerCapture:R},currentTarget:{hasPointerCapture:E,setPointerCapture:P,releasePointerCapture:R},nativeEvent:u};if(d(B),m.stopped===!0)break}}return l}function s(l){const{internal:u}=n.getState();for(const h of u.hovered.values())if(!l.length||!l.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,m=p==null?void 0:p.handlers;if(u.hovered.delete(kp(h)),p!=null&&p.eventCount){const v={...h,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function o(l,u){for(let h=0;hs([]);case"onLostPointerCapture":return u=>{const{internal:h}=n.getState();"pointerId"in u&&h.capturedMap.has(u.pointerId)&&requestAnimationFrame(()=>{h.capturedMap.has(u.pointerId)&&(h.capturedMap.delete(u.pointerId),s([]))})}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",x=i(h,m?t:void 0),A=v?e(h):0;l==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=x.map(w=>w.eventObject)),v&&!x.length&&A<=2&&(o(h,p.interaction),d&&d(h)),m&&s(x);function _(w){const S=w.eventObject,E=S.__r3f,P=E==null?void 0:E.handlers;if(E!=null&&E.eventCount)if(m){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const R=kp(w),b=p.hovered.get(R);b?b.stopped&&w.stopPropagation():(p.hovered.set(R,w),P.onPointerOver==null||P.onPointerOver(w),P.onPointerEnter==null||P.onPointerEnter(w))}P.onPointerMove==null||P.onPointerMove(w)}else{const R=P[l];R?(!v||p.initialHits.includes(S))&&(o(h,p.interaction.filter(b=>!p.initialHits.includes(b))),R(w)):v&&p.initialHits.includes(S)&&o(h,p.interaction.filter(b=>!p.initialHits.includes(b)))}}r(x,h,A,_)}}return{handlePointer:a}}const j3=n=>!!(n!=null&&n.render),J3=z.createContext(null),W5=(n,e)=>{const t=R3((a,l)=>{const u=new D,h=new D,d=new D;function p(A=l().camera,_=h,w=l().size){const{width:S,height:E,top:P,left:R}=w,b=S/E;_ instanceof D?d.copy(_):d.set(..._);const B=A.getWorldPosition(u).distanceTo(d);if(O3(A))return{width:S/A.zoom,height:E/A.zoom,top:P,left:R,factor:1,distance:B,aspect:b};{const L=A.fov*Math.PI/180,U=2*Math.tan(L/2)*B,Z=U*(S/E);return{width:Z,height:U,top:P,left:R,factor:S/Z,distance:B,aspect:b}}}let m;const v=A=>a(_=>({performance:{..._.performance,current:A}})),y=new pe;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(A=1)=>n(l(),A),advance:(A,_)=>e(A,_,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new T_,pointer:y,mouse:y,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const A=l();m&&clearTimeout(m),A.performance.current!==A.performance.min&&v(A.performance.min),m=setTimeout(()=>v(l().performance.max),A.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:A=>a(_=>({..._,events:{..._.events,...A}})),setSize:(A,_,w,S,E)=>{const P=l().camera,R={width:A,height:_,top:S||0,left:E||0,updateStyle:w};a(b=>({size:R,viewport:{...b.viewport,...p(P,h,R)}}))},setDpr:A=>a(_=>{const w=H3(A);return{viewport:{..._.viewport,dpr:w,initialDpr:_.viewport.initialDpr||w}}}),setFrameloop:(A="always")=>{const _=l().clock;_.stop(),_.elapsedTime=0,A!=="never"&&(_.start(),_.elapsedTime=0),a(()=>({frameloop:A}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:z.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(A,_,w)=>{const S=l().internal;return S.priority=S.priority+(_>0?1:0),S.subscribers.push({ref:A,priority:_,store:w}),S.subscribers=S.subscribers.sort((E,P)=>E.priority-P.priority),()=>{const E=l().internal;E!=null&&E.subscribers&&(E.priority=E.priority-(_>0?1:0),E.subscribers=E.subscribers.filter(P=>P.ref!==A))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:u,gl:h,set:d}=t.getState();if(l.width!==r.width||l.height!==r.height||u.dpr!==s){var p;r=l,s=u.dpr,z5(a,l),h.setPixelRatio(u.dpr);const m=(p=l.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(l.width,l.height,m)}a!==o&&(o=a,d(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Op,j5=new Set,J5=new Set,X5=new Set;function fv(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Wu(n,e){switch(n){case"before":return fv(j5,e);case"after":return fv(J5,e);case"tail":return fv(X5,e)}}let hv,dv;function pv(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),hv=e.internal.subscribers,Op=0;Op0)&&!((u=r.gl.xr)!=null&&u.isPresenting)&&(t+=pv(l,r))}if(Wu("after",l),t===0)return Wu("tail",l),e=!1,cancelAnimationFrame(i)}function o(l,u=1){var h;if(!l)return n.forEach(d=>o(d.store.getState()),u);(h=l.gl.xr)!=null&&h.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+u),e||(e=!0,requestAnimationFrame(s)))}function a(l,u=!0,h,d){if(u&&Wu("before",l),h)pv(l,h,d);else for(const p of n.values())pv(l,p.store.getState());u&&Wu("after",l)}return{loop:s,invalidate:o,advance:a}}function X3(){const n=z.useContext(J3);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Oi(n=t=>t,e){return X3()(n,e)}function tu(n,e=0){const t=X3(),i=t.getState().internal.subscribe,r=U3(n);return Rh(()=>i(r,e,t),[e,i,t]),null}const FE=new WeakMap;function Y3(n,e){return function(t,...i){let r=FE.get(t);return r||(r=new t,FE.set(t,r)),n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,k5(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`)))))).finally(()=>r.dispose==null?void 0:r.dispose())}}function Zo(n,e,t,i){const r=Array.isArray(e)?e:[e],s=P5(Y3(t,i),[n,...r],{equal:Jt.equ});return Array.isArray(e)?s:s[0]}Zo.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return B5(Y3(t),[n,...i])};Zo.clear=function(n,e){const t=Array.isArray(e)?e:[e];return R5([n,...t])};const zc=new Map,{invalidate:NE,advance:kE}=Y5(zc),{reconciler:Jm,applyProps:$r}=I5(zc,G5),jl={objects:"shallow",strict:!1},K5=(n,e)=>{const t=typeof n=="function"?n(e):n;return j3(t)?t:new s_({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function Q5(n,e){const t=typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:i,height:r,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function Z5(n){const e=zc.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||W5(NE,kE),o=t||Jm.createContainer(s,uc.ConcurrentRoot,null,!1,null,"",r,null);e||zc.set(n,{fiber:o,store:s});let a,l=!1,u;return{configure(h={}){let{gl:d,size:p,scene:m,events:v,onCreated:y,shadows:x=!1,linear:A=!1,flat:_=!1,legacy:w=!1,orthographic:S=!1,frameloop:E="always",dpr:P=[1,2],performance:R,raycaster:b,camera:B,onPointerMissed:L}=h,U=s.getState(),Z=U.gl;U.gl||U.set({gl:Z=K5(d,n)});let V=U.raycaster;V||U.set({raycaster:V=new T3});const{params:H,...K}=b||{};if(Jt.equ(K,V,jl)||$r(V,{...K}),Jt.equ(H,V.params,jl)||$r(V,{params:{...V.params,...H}}),!U.camera||U.camera===u&&!Jt.equ(u,B,jl)){u=B;const W=B instanceof hh,ee=W?B:S?new pr(0,0,0,0,.1,1e3):new Xt(75,0,.1,1e3);W||(ee.position.z=5,B&&$r(ee,B),!U.camera&&!(B!=null&&B.rotation)&&ee.lookAt(0,0,0)),U.set({camera:ee}),V.camera=ee}if(!U.scene){let W;m instanceof jm?W=m:(W=new jm,m&&$r(W,m)),U.set({scene:Jl(W)})}if(!U.xr){var ie;const W=(ye,q)=>{const Fe=s.getState();Fe.frameloop!=="never"&&kE(ye,!0,Fe,q)},ee=()=>{const ye=s.getState();ye.gl.xr.enabled=ye.gl.xr.isPresenting,ye.gl.xr.setAnimationLoop(ye.gl.xr.isPresenting?W:null),ye.gl.xr.isPresenting||NE(ye)},ve={connect(){const ye=s.getState().gl;ye.xr.addEventListener("sessionstart",ee),ye.xr.addEventListener("sessionend",ee)},disconnect(){const ye=s.getState().gl;ye.xr.removeEventListener("sessionstart",ee),ye.xr.removeEventListener("sessionend",ee)}};typeof((ie=Z.xr)==null?void 0:ie.addEventListener)=="function"&&ve.connect(),U.set({xr:ve})}if(Z.shadowMap){const W=Z.shadowMap.enabled,ee=Z.shadowMap.type;if(Z.shadowMap.enabled=!!x,Jt.boo(x))Z.shadowMap.type=df;else if(Jt.str(x)){var ce;const ve={basic:UP,percentage:Mg,soft:df,variance:Ia};Z.shadowMap.type=(ce=ve[x])!=null?ce:df}else Jt.obj(x)&&Object.assign(Z.shadowMap,x);(W!==Z.shadowMap.enabled||ee!==Z.shadowMap.type)&&(Z.shadowMap.needsUpdate=!0)}const N=k3();N&&("enabled"in N?N.enabled=!w:"legacyMode"in N&&(N.legacyMode=w)),$r(Z,{outputEncoding:A?3e3:3001,toneMapping:_?kr:W1}),U.legacy!==w&&U.set(()=>({legacy:w})),U.linear!==A&&U.set(()=>({linear:A})),U.flat!==_&&U.set(()=>({flat:_})),d&&!Jt.fun(d)&&!j3(d)&&!Jt.equ(d,Z,jl)&&$r(Z,d),v&&!U.events.handlers&&U.set({events:v(s)});const le=Q5(n,p);return Jt.equ(le,U.size,jl)||U.setSize(le.width,le.height,le.updateStyle,le.top,le.left),P&&U.viewport.dpr!==H3(P)&&U.setDpr(P),U.frameloop!==E&&U.setFrameloop(E),U.onPointerMissed||U.set({onPointerMissed:L}),R&&!Jt.equ(R,U.performance,jl)&&U.set(W=>({performance:{...W.performance,...R}})),a=y,l=!0,this},render(h){return l||this.configure(),Jm.updateContainer(z.createElement(q5,{store:s,children:h,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){K3(n)}}}function q5({store:n,children:e,onCreated:t,rootElement:i}){return Rh(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),z.createElement(J3.Provider,{value:n},e)}function K3(n,e){const t=zc.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),Jm.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),O5(r),zc.delete(n),e&&e(n)}catch{}},500)})}}Jm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:z.version});function xr(){return xr=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0?i=setTimeout(l,e-h):(i=null,t||(a=n.apply(s,r),s=r=null))}var u=function(){s=this,r=arguments,o=Date.now();var h=t&&!i;return i||(i=setTimeout(l,e)),h&&(a=n.apply(s,r),s=r=null),a};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},u}xA.debounce=xA;var $5=xA;const OE=WA($5);function e9(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=z.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=z.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),u=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=z.useRef(!1);z.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,m,v]=z.useMemo(()=>{const _=()=>{if(!l.current.element)return;const{left:w,top:S,width:E,height:P,bottom:R,right:b,x:B,y:L}=l.current.element.getBoundingClientRect(),U={left:w,top:S,width:E,height:P,bottom:R,right:b,x:B,y:L};l.current.element instanceof HTMLElement&&r&&(U.height=l.current.element.offsetHeight,U.width=l.current.element.offsetWidth),Object.freeze(U),d.current&&!r9(l.current.lastBounds,U)&&a(l.current.lastBounds=U)};return[_,h?OE(_,h):_,u?OE(_,u):_]},[a,r,u,h]);function y(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",v,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function x(){l.current.element&&(l.current.resizeObserver=new s(v),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",v,{capture:!0,passive:!0})))}const A=_=>{!_||_===l.current.element||(y(),l.current.element=_,l.current.scrollContainers=Q3(_),x())};return n9(v,!!t),t9(m),z.useEffect(()=>{y(),x()},[t,v,m]),z.useEffect(()=>y,[]),[A,o,p]}function t9(n){z.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function n9(n,e){z.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function Q3(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...Q3(n.parentElement)]}const i9=["x","y","top","bottom","left","right","width","height"],r9=(n,e)=>i9.every(t=>n[t]===e[t]);var s9=Object.defineProperty,o9=Object.defineProperties,a9=Object.getOwnPropertyDescriptors,UE=Object.getOwnPropertySymbols,l9=Object.prototype.hasOwnProperty,c9=Object.prototype.propertyIsEnumerable,zE=(n,e,t)=>e in n?s9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,GE=(n,e)=>{for(var t in e||(e={}))l9.call(e,t)&&zE(n,t,e[t]);if(UE)for(var t of UE(e))c9.call(e,t)&&zE(n,t,e[t]);return n},u9=(n,e)=>o9(n,a9(e));function Z3(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=Z3(i,e,t);if(r)return r;i=e?null:i.sibling}}function q3(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const I_=q3(z.createContext(null));class $3 extends z.Component{render(){return z.createElement(I_.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:f9,ReactCurrentDispatcher:h9}=z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d9(){const n=z.useContext(I_);if(!n)throw new Error("its-fine: useFiber must be called within a !");const e=z.useId();return z.useMemo(()=>{var i;return(i=f9.current)!=null?i:Z3(n,!1,r=>{let s=r.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}})},[n,e])}function p9(){var n,e;const t=d9(),[i]=z.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==I_&&!i.has(s)&&i.set(s,(e=h9.current)==null?void 0:e.readContext(q3(s))),r=r.return}return z.useMemo(()=>Array.from(i.keys()).reduce((s,o)=>a=>z.createElement(s,null,z.createElement(o.Provider,u9(GE({},a),{value:i.get(o)}))),s=>z.createElement($3,GE({},s))),[i])}const mv={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function m9(n){const{handlePointer:e}=V5(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(mv).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:r}=n.getState();(t=r.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,u]=mv[o];t.addEventListener(l,a,{passive:u})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=mv[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const g9=z.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=m9,eventSource:a,eventPrefix:l,shadows:u,linear:h,flat:d,legacy:p,orthographic:m,frameloop:v,dpr:y,performance:x,raycaster:A,camera:_,scene:w,onPointerMissed:S,onCreated:E,...P},R){z.useMemo(()=>L5(w5),[]);const b=p9(),[B,L]=e9({scroll:!0,debounce:{scroll:50,resize:0},...i}),U=z.useRef(null),Z=z.useRef(null);z.useImperativeHandle(R,()=>U.current);const V=U3(S),[H,K]=z.useState(!1),[ie,ce]=z.useState(!1);if(H)throw H;if(ie)throw ie;const N=z.useRef(null);Rh(()=>{const Y=U.current;L.width>0&&L.height>0&&Y&&(N.current||(N.current=Z5(Y)),N.current.configure({gl:s,events:o,shadows:u,linear:h,flat:d,legacy:p,orthographic:m,frameloop:v,dpr:y,performance:x,raycaster:A,camera:_,scene:w,size:L,onPointerMissed:(...le)=>V.current==null?void 0:V.current(...le),onCreated:le=>{le.events.connect==null||le.events.connect(a?D5(a)?a.current:a:Z.current),l&&le.setEvents({compute:(W,ee)=>{const ve=W[l+"X"],ye=W[l+"Y"];ee.pointer.set(ve/ee.size.width*2-1,-(ye/ee.size.height)*2+1),ee.raycaster.setFromCamera(ee.pointer,ee.camera)}}),E==null||E(le)}}),N.current.render(z.createElement(b,null,z.createElement(z3,{set:ce},z.createElement(z.Suspense,{fallback:z.createElement(F5,{set:K})},e)))))}),z.useEffect(()=>{const Y=U.current;if(Y)return()=>K3(Y)},[]);const J=a?"none":"auto";return z.createElement("div",xr({ref:Z,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:J,...r}},P),z.createElement("div",{ref:B,style:{width:"100%",height:"100%"}},z.createElement("canvas",{ref:U,style:{display:"block"}},t)))}),Og=z.forwardRef(function(e,t){return z.createElement($3,null,z.createElement(g9,xr({},e,{ref:t})))}),Lh=new D,D_=new D,y9=new D;function v9(n,e,t){const i=Lh.setFromMatrixPosition(n.matrixWorld);i.project(e);const r=t.width/2,s=t.height/2;return[i.x*r+r,-(i.y*s)+s]}function x9(n,e){const t=Lh.setFromMatrixPosition(n.matrixWorld),i=D_.setFromMatrixPosition(e.matrixWorld),r=t.sub(i),s=e.getWorldDirection(y9);return r.angleTo(s)>Math.PI/2}function A9(n,e,t,i){const r=Lh.setFromMatrixPosition(n.matrixWorld),s=r.clone();s.project(e),t.setFromCamera(s,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)Math.abs(n)<1e-10?0:n;function eR(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=AA(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const M9=(n=>e=>eR(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),S9=(n=>(e,t)=>eR(e,n(t),"translate(-50%,-50%)"))(n=>[1/n,1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1]);function C9(n){return n&&typeof n=="object"&&"current"in n}const E9=z.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:u=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:m,receiveShadow:v,material:y,geometry:x,zIndexRange:A=[16777271,0],calculatePosition:_=v9,as:w="div",wrapperClass:S,pointerEvents:E="auto",...P},R)=>{const{gl:b,camera:B,scene:L,size:U,raycaster:Z,events:V,viewport:H}=Oi(),[K]=z.useState(()=>document.createElement(w)),ie=z.useRef(),ce=z.useRef(null),N=z.useRef(0),J=z.useRef([0,0]),Y=z.useRef(null),le=z.useRef(null),W=(a==null?void 0:a.current)||V.connected||b.domElement.parentNode,ee=z.useRef(null),ve=z.useRef(!1),ye=z.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&C9(d[0]),[d]);z.useLayoutEffect(()=>{const _e=b.domElement;d&&d==="blending"?(_e.style.zIndex=`${Math.floor(A[0]/2)}`,_e.style.position="absolute",_e.style.pointerEvents="none"):(_e.style.zIndex=null,_e.style.position=null,_e.style.pointerEvents=null)},[d]),z.useLayoutEffect(()=>{if(ce.current){const _e=ie.current=EP(K);if(L.updateMatrixWorld(),h)K.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Be=_(ce.current,B,U);K.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Be[0]}px,${Be[1]}px,0);transform-origin:0 0;`}return W&&(r?W.prepend(K):W.appendChild(K)),()=>{W&&W.removeChild(K),_e.unmount()}}},[W,h]),z.useLayoutEffect(()=>{S&&(K.className=S)},[S]);const q=z.useMemo(()=>h?{position:"absolute",top:0,left:0,width:U.width,height:U.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-U.height/2,left:-U.width/2,width:U.width,height:U.height},...t},[t,s,o,U,h]),Fe=z.useMemo(()=>({position:"absolute",pointerEvents:E}),[E]);z.useLayoutEffect(()=>{if(ve.current=!1,h){var _e;(_e=ie.current)==null||_e.render(z.createElement("div",{ref:Y,style:q},z.createElement("div",{ref:le,style:Fe},z.createElement("div",{ref:R,className:i,style:t,children:n}))))}else{var Be;(Be=ie.current)==null||Be.render(z.createElement("div",{ref:R,style:q,className:i,children:n}))}});const ke=z.useRef(!0);tu(_e=>{if(ce.current){B.updateMatrixWorld(),ce.current.updateWorldMatrix(!0,!1);const Be=h?J.current:_(ce.current,B,U);if(h||Math.abs(N.current-B.zoom)>e||Math.abs(J.current[0]-Be[0])>e||Math.abs(J.current[1]-Be[1])>e){const he=x9(ce.current,B);let oe=!1;ye&&(Array.isArray(d)?oe=d.map(qe=>qe.current):d!=="blending"&&(oe=[L]));const Se=ke.current;if(oe){const qe=A9(ce.current,B,Z,oe);ke.current=qe&&!he}else ke.current=!he;Se!==ke.current&&(p?p(!ke.current):K.style.display=ke.current?"block":"none");const Ue=Math.floor(A[0]/2),Te=d?ye?[A[0],Ue]:[Ue-1,0]:A;if(K.style.zIndex=`${w9(ce.current,B,Te)}`,h){const[qe,Ke]=[U.width/2,U.height/2],je=B.projectionMatrix.elements[5]*Ke,{isOrthographicCamera:xt,top:At,left:O,bottom:I,right:se}=B,we=M9(B.matrixWorldInverse),Ce=xt?`scale(${je})translate(${AA(-(se+O)/2)}px,${AA((At+I)/2)}px)`:`translateZ(${je}px)`;let be=ce.current.matrixWorld;u&&(be=B.matrixWorldInverse.clone().transpose().copyPosition(be).scale(ce.current.scale),be.elements[3]=be.elements[7]=be.elements[11]=0,be.elements[15]=1),K.style.width=U.width+"px",K.style.height=U.height+"px",K.style.perspective=xt?"":`${je}px`,Y.current&&le.current&&(Y.current.style.transform=`${Ce}${we}translate(${qe}px,${Ke}px)`,le.current.style.transform=S9(be,1/((l||10)/400)))}else{const qe=l===void 0?1:_9(ce.current,B)*l;K.style.transform=`translate3d(${Be[0]}px,${Be[1]}px,0) scale(${qe})`}J.current=Be,N.current=B.zoom}}if(!ye&&ee.current&&!ve.current)if(h){if(Y.current){const Be=Y.current.children[0];if(Be!=null&&Be.clientWidth&&Be!=null&&Be.clientHeight){const{isOrthographicCamera:he}=B;if(he||x)P.scale&&(Array.isArray(P.scale)?P.scale instanceof D?ee.current.scale.copy(P.scale.clone().divideScalar(1)):ee.current.scale.set(1/P.scale[0],1/P.scale[1],1/P.scale[2]):ee.current.scale.setScalar(1/P.scale));else{const oe=(l||10)/400,Se=Be.clientWidth*oe,Ue=Be.clientHeight*oe;ee.current.scale.set(Se,Ue,1)}ve.current=!0}}}else{const Be=K.children[0];if(Be!=null&&Be.clientWidth&&Be!=null&&Be.clientHeight){const he=1/H.factor,oe=Be.clientWidth*he,Se=Be.clientHeight*he;ee.current.scale.set(oe,Se,1),ve.current=!0}ee.current.lookAt(_e.camera.position)}});const He=z.useMemo(()=>({vertexShader:h?void 0:` + `)+c.join(" > ")}return null},t.getPublicRootInstance=function(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return ie(c.child.stateNode);default:return c.child.stateNode}},t.injectIntoDevTools=function(c){if(c={bundleType:c.bundleType,version:c.version,rendererPackageName:c.rendererPackageName,rendererConfig:c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:SI,findFiberByHostInstance:c.findFiberByHostInstance||CI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)c=!0;else{try{Jh=f.inject(c),Vr=f}catch{}c=!!f.checkDCE}}return c},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(c,f,g,M){if(!xt)throw Error(o(363));c=z0(c,f);var C=be(c,g,M).disconnect;return{disconnect:function(){C()}}},t.registerMutableSourceForHydration=function(c,f){var g=f._getVersion;g=g(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,g]:c.mutableSourceEagerHydrationData.push(f,g)},t.runWithPriority=function(c,f){var g=Lt;try{return Lt=c,f()}finally{Lt=g}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(c,f,g,M){var C=f.current,T=ai(),k=$s(C);return g=jM(g),f.context===null?f.context=g:f.pendingContext=g,f=gs(T,k),f.payload={element:c},M=M===void 0?null:M,M!==null&&(f.callback=M),Qs(C,f),c=nr(C,k,T),c!==null&&Zh(c,C,k),k},t};L3.exports=C5;var E5=L3.exports;const b5=WA(E5),T5=n=>typeof n=="object"&&typeof n.then=="function",Oa=[];function F3(n,e,t=(i,r)=>i===r){if(n===e)return!0;if(!n||!e)return!1;const i=n.length;if(e.length!==i)return!1;for(let r=0;r0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,i.lifespan)),s.response;if(!t)throw s.promise}const r={keys:e,equal:i.equal,remove:()=>{const s=Oa.indexOf(r);s!==-1&&Oa.splice(s,1)},promise:(T5(n)?n:n(...e)).then(s=>{r.response=s,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(s=>r.error=s)};if(Oa.push(r),!t)throw r.promise}const P5=(n,e,t)=>N3(n,e,!1,t),B5=(n,e,t)=>void N3(n,e,!0,t),R5=n=>{if(n===void 0||n.length===0)Oa.splice(0,Oa.length);else{const e=Oa.find(t=>F3(n,t.keys,t.equal));e&&e.remove()}},L_={},L5=n=>void Object.assign(L_,n);function I5(n,e){function t(h,{args:d=[],attach:p,...m},v){let y=`${h[0].toUpperCase()}${h.slice(1)}`,x;if(h==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const A=m.object;x=Jl(A,{type:h,root:v,attach:p,primitive:!0})}else{const A=L_[y];if(!A)throw new Error(`R3F: ${y} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");x=Jl(new A(...d),{type:h,root:v,attach:p,memoizedProps:{args:d}})}return x.__r3f.attach===void 0&&(x instanceof ft?x.__r3f.attach="geometry":x instanceof Mn&&(x.__r3f.attach="material")),y!=="inject"&&uv(x,m),x}function i(h,d){let p=!1;if(d){var m,v;(m=d.__r3f)!=null&&m.attach?cv(h,d,d.__r3f.attach):d.isObject3D&&h.isObject3D&&(h.add(d),p=!0),p||(v=h.__r3f)==null||v.objects.push(d),d.__r3f||Jl(d,{}),d.__r3f.parent=h,vA(d),Xl(d)}}function r(h,d,p){let m=!1;if(d){var v,y;if((v=d.__r3f)!=null&&v.attach)cv(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"});const x=h.children.filter(_=>_!==d),A=x.indexOf(p);h.children=[...x.slice(0,A),d,...x.slice(A)],m=!0}m||(y=h.__r3f)==null||y.objects.push(d),d.__r3f||Jl(d,{}),d.__r3f.parent=h,vA(d),Xl(d)}}function s(h,d,p=!1){h&&[...h].forEach(m=>o(d,m,p))}function o(h,d,p){if(d){var m,v,y;if(d.__r3f&&(d.__r3f.parent=null),(m=h.__r3f)!=null&&m.objects&&(h.__r3f.objects=h.__r3f.objects.filter(S=>S!==d)),(v=d.__r3f)!=null&&v.attach)DE(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var x;h.remove(d),(x=d.__r3f)!=null&&x.root&&H5(d.__r3f.root,d)}const _=(y=d.__r3f)==null?void 0:y.primitive,w=!_&&(p===void 0?d.dispose!==null:p);if(!_){var A;s((A=d.__r3f)==null?void 0:A.objects,d,w),s(d.children,d,w)}if(delete d.__r3f,w&&d.dispose&&d.type!=="Scene"){const S=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?gA.unstable_scheduleCallback(gA.unstable_IdlePriority,S):S()}Xl(h)}}function a(h,d,p,m){var v;const y=(v=h.__r3f)==null?void 0:v.parent;if(!y)return;const x=t(d,p,h.__r3f.root);if(h.children){for(const A of h.children)A.__r3f&&i(x,A);h.children=h.children.filter(A=>!A.__r3f)}h.__r3f.objects.forEach(A=>i(x,A)),h.__r3f.objects=[],h.__r3f.autoRemovedBeforeAppend||o(y,h),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),i(y,x),x.raycast&&x.__r3f.eventCount&&x.__r3f.root.getState().internal.interaction.push(x),[m,m.alternate].forEach(A=>{A!==null&&(A.stateNode=x,A.ref&&(typeof A.ref=="function"?A.ref(x):A.ref.current=x))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:b5({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(h,d)=>{if(!d)return;const p=h.getState().scene;p.__r3f&&(p.__r3f.root=h,i(p,d))},removeChildFromContainer:(h,d)=>{d&&o(h.getState().scene,d)},insertInContainerBefore:(h,d,p)=>{if(!d||!p)return;const m=h.getState().scene;m.__r3f&&r(m,d,p)},getRootHostContext:()=>null,getChildHostContext:h=>h,finalizeInitialChildren(h){var d;return!!((d=h==null?void 0:h.__r3f)!=null?d:{}).handlers},prepareUpdate(h,d,p,m){var v;if(((v=h==null?void 0:h.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==h)return[!0];{const{args:x=[],children:A,..._}=m,{args:w=[],children:S,...E}=p;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((R,b)=>R!==w[b]))return[!0];const P=V3(h,_,E,!0);return P.changes.length?[!1,P]:null}},commitUpdate(h,[d,p],m,v,y,x){d?a(h,m,y,x):uv(h,p)},commitMount(h,d,p,m){var v;const y=(v=h.__r3f)!=null?v:{};h.raycast&&y.handlers&&y.eventCount&&h.__r3f.root.getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>Jl(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:m}=(d=h.__r3f)!=null?d:{};p&&m&&DE(m,h,p),h.isObject3D&&(h.visible=!1),Xl(h)},unhideInstance(h,d){var p;const{attach:m,parent:v}=(p=h.__r3f)!=null?p:{};m&&v&&cv(v,h,m),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),Xl(h)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():uc.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&Jt.fun(performance.now)?performance.now:Jt.fun(Date.now)?Date.now:()=>0,scheduleTimeout:Jt.fun(setTimeout)?setTimeout:void 0,cancelTimeout:Jt.fun(clearTimeout)?clearTimeout:void 0}),applyProps:uv}}var BE,RE;const lv=n=>"colorSpace"in n||"outputColorSpace"in n,k3=()=>{var n;return(n=L_.ColorManagement)!=null?n:null},O3=n=>n&&n.isOrthographicCamera,D5=n=>n&&n.hasOwnProperty("current"),Rh=typeof window<"u"&&((BE=window.document)!=null&&BE.createElement||((RE=window.navigator)==null?void 0:RE.product)==="ReactNative")?z.useLayoutEffect:z.useEffect;function U3(n){const e=z.useRef(n);return Rh(()=>void(e.current=n),[n]),e}function F5({set:n}){return Rh(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class z3 extends z.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}z3.getDerivedStateFromError=()=>({error:!0});const G3="__default",LE=new Map,N5=n=>n&&!!n.memoized&&!!n.changes;function H3(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const Vu=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},Jt={obj:n=>n===Object(n)&&!Jt.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(Jt.str(n)||Jt.num(n))return n===e;const s=Jt.obj(n);if(s&&i==="reference")return n===e;const o=Jt.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;if(s&&t==="shallow"&&i==="shallow"){for(a in r?e:n)if(!Jt.equ(n[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:n)if(n[a]!==e[a])return!1;if(Jt.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function k5(n){const e={nodes:{},materials:{}};return n&&n.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function O5(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function Jl(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function yA(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const IE=/-\d+$/;function cv(n,e,t){if(Jt.str(t)){if(IE.test(t)){const s=t.replace(IE,""),{target:o,key:a}=yA(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=yA(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function DE(n,e,t){var i,r;if(Jt.str(t)){const{target:s,key:o}=yA(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function V3(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},u=!1){var h;const d=(h=n==null?void 0:n.__r3f)!=null?h:{},p=Object.entries(r),m=[];if(u){const y=Object.keys(l);for(let x=0;x{var A;if((A=n.__r3f)!=null&&A.primitive&&y==="object"||Jt.equ(x,l[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return m.push([y,x,!0,[]]);let _=[];y.includes("-")&&(_=y.split("-")),m.push([y,x,!1,_]);for(const w in r){const S=r[w];w.startsWith(`${y}-`)&&m.push([w,S,!1,w.split("-")])}});const v={...r};return d.memoizedProps&&d.memoizedProps.args&&(v.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(v.attach=d.memoizedProps.attach),{memoized:v,changes:m}}const U5=typeof process<"u"&&!1;function uv(n,e){var t,i,r;const s=(t=n.__r3f)!=null?t:{},o=s.root,a=(i=o==null||o.getState==null?void 0:o.getState())!=null?i:{},{memoized:l,changes:u}=N5(e)?e:V3(n,e),h=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=l);for(let p=0;pw[S],n),!(_&&_.set))){const[w,...S]=x.reverse();A=S.reverse().reduce((E,P)=>E[P],n),m=w}if(v===G3+"remove")if(A.constructor){let w=LE.get(A.constructor);w||(w=new A.constructor,LE.set(A.constructor,w)),v=w[m]}else v=0;if(y)v?s.handlers[m]=v:delete s.handlers[m],s.eventCount=Object.keys(s.handlers).length;else if(_&&_.set&&(_.copy||_ instanceof Xa)){if(Array.isArray(v))_.fromArray?_.fromArray(v):_.set(...v);else if(_.copy&&v&&v.constructor&&(U5?_.constructor.name===v.constructor.name:_.constructor===v.constructor))_.copy(v);else if(v!==void 0){const w=_ instanceof Ie;!w&&_.setScalar?_.setScalar(v):_ instanceof Xa&&v instanceof Xa?_.mask=v.mask:_.set(v),!k3()&&!a.linear&&w&&_.convertSRGBToLinear()}}else if(A[m]=v,A[m]instanceof $t&&A[m].format===Mi&&A[m].type===js){const w=A[m];lv(w)&&lv(a.gl)?w.colorSpace=a.gl.outputColorSpace:w.encoding=a.gl.outputEncoding}Xl(n)}if(s.parent&&a.internal&&n.raycast&&h!==s.eventCount){const p=a.internal.interaction.indexOf(n);p>-1&&a.internal.interaction.splice(p,1),s.eventCount&&a.internal.interaction.push(n)}return!(u.length===1&&u[0][0]==="onUpdate")&&u.length&&(r=n.__r3f)!=null&&r.parent&&vA(n),n}function Xl(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function vA(n){n.onUpdate==null||n.onUpdate(n)}function z5(n,e){n.manual||(O3(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function kp(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function G5(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return uc.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return uc.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return uc.ContinuousEventPriority;default:return uc.DefaultEventPriority}}function W3(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function H5(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{W3(t.capturedMap,e,i,r)})}function V5(n){function e(l){const{internal:u}=n.getState(),h=l.offsetX-u.initialClick[0],d=l.offsetY-u.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(l){return l.filter(u=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=u.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(l,u){const h=n.getState(),d=new Set,p=[],m=u?u(h.internal.interaction):h.internal.interaction;for(let A=0;A{const w=Vu(A.object),S=Vu(_.object);return!w||!S?A.distance-_.distance:S.events.priority-w.events.priority||A.distance-_.distance}).filter(A=>{const _=kp(A);return d.has(_)?!1:(d.add(_),!0)});h.events.filter&&(y=h.events.filter(y,h));for(const A of y){let _=A.object;for(;_;){var x;(x=_.__r3f)!=null&&x.eventCount&&p.push({...A,eventObject:_}),_=_.parent}}if("pointerId"in l&&h.internal.capturedMap.has(l.pointerId))for(let A of h.internal.capturedMap.get(l.pointerId).values())d.has(kp(A.intersection))||p.push(A.intersection);return p}function r(l,u,h,d){const p=n.getState();if(l.length){const m={stopped:!1};for(const v of l){const y=Vu(v.object)||p,{raycaster:x,pointer:A,camera:_,internal:w}=y,S=new D(A.x,A.y,0).unproject(_),E=L=>{var U,Z;return(U=(Z=w.capturedMap.get(L))==null?void 0:Z.has(v.eventObject))!=null?U:!1},P=L=>{const U={intersection:v,target:u.target};w.capturedMap.has(L)?w.capturedMap.get(L).set(v.eventObject,U):w.capturedMap.set(L,new Map([[v.eventObject,U]])),u.target.setPointerCapture(L)},R=L=>{const U=w.capturedMap.get(L);U&&W3(w.capturedMap,v.eventObject,U,L)};let b={};for(let L in u){let U=u[L];typeof U!="function"&&(b[L]=U)}let B={...v,...b,pointer:A,intersections:l,stopped:m.stopped,delta:h,unprojectedPoint:S,ray:x.ray,camera:_,stopPropagation(){const L="pointerId"in u&&w.capturedMap.get(u.pointerId);if((!L||L.has(v.eventObject))&&(B.stopped=m.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(U=>U.eventObject===v.eventObject))){const U=l.slice(0,l.indexOf(v));s([...U,v])}},target:{hasPointerCapture:E,setPointerCapture:P,releasePointerCapture:R},currentTarget:{hasPointerCapture:E,setPointerCapture:P,releasePointerCapture:R},nativeEvent:u};if(d(B),m.stopped===!0)break}}return l}function s(l){const{internal:u}=n.getState();for(const h of u.hovered.values())if(!l.length||!l.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,m=p==null?void 0:p.handlers;if(u.hovered.delete(kp(h)),p!=null&&p.eventCount){const v={...h,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function o(l,u){for(let h=0;hs([]);case"onLostPointerCapture":return u=>{const{internal:h}=n.getState();"pointerId"in u&&h.capturedMap.has(u.pointerId)&&requestAnimationFrame(()=>{h.capturedMap.has(u.pointerId)&&(h.capturedMap.delete(u.pointerId),s([]))})}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",x=i(h,m?t:void 0),A=v?e(h):0;l==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=x.map(w=>w.eventObject)),v&&!x.length&&A<=2&&(o(h,p.interaction),d&&d(h)),m&&s(x);function _(w){const S=w.eventObject,E=S.__r3f,P=E==null?void 0:E.handlers;if(E!=null&&E.eventCount)if(m){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const R=kp(w),b=p.hovered.get(R);b?b.stopped&&w.stopPropagation():(p.hovered.set(R,w),P.onPointerOver==null||P.onPointerOver(w),P.onPointerEnter==null||P.onPointerEnter(w))}P.onPointerMove==null||P.onPointerMove(w)}else{const R=P[l];R?(!v||p.initialHits.includes(S))&&(o(h,p.interaction.filter(b=>!p.initialHits.includes(b))),R(w)):v&&p.initialHits.includes(S)&&o(h,p.interaction.filter(b=>!p.initialHits.includes(b)))}}r(x,h,A,_)}}return{handlePointer:a}}const j3=n=>!!(n!=null&&n.render),J3=z.createContext(null),W5=(n,e)=>{const t=R3((a,l)=>{const u=new D,h=new D,d=new D;function p(A=l().camera,_=h,w=l().size){const{width:S,height:E,top:P,left:R}=w,b=S/E;_ instanceof D?d.copy(_):d.set(..._);const B=A.getWorldPosition(u).distanceTo(d);if(O3(A))return{width:S/A.zoom,height:E/A.zoom,top:P,left:R,factor:1,distance:B,aspect:b};{const L=A.fov*Math.PI/180,U=2*Math.tan(L/2)*B,Z=U*(S/E);return{width:Z,height:U,top:P,left:R,factor:S/Z,distance:B,aspect:b}}}let m;const v=A=>a(_=>({performance:{..._.performance,current:A}})),y=new pe;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(A=1)=>n(l(),A),advance:(A,_)=>e(A,_,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new T_,pointer:y,mouse:y,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const A=l();m&&clearTimeout(m),A.performance.current!==A.performance.min&&v(A.performance.min),m=setTimeout(()=>v(l().performance.max),A.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:A=>a(_=>({..._,events:{..._.events,...A}})),setSize:(A,_,w,S,E)=>{const P=l().camera,R={width:A,height:_,top:S||0,left:E||0,updateStyle:w};a(b=>({size:R,viewport:{...b.viewport,...p(P,h,R)}}))},setDpr:A=>a(_=>{const w=H3(A);return{viewport:{..._.viewport,dpr:w,initialDpr:_.viewport.initialDpr||w}}}),setFrameloop:(A="always")=>{const _=l().clock;_.stop(),_.elapsedTime=0,A!=="never"&&(_.start(),_.elapsedTime=0),a(()=>({frameloop:A}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:z.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(A,_,w)=>{const S=l().internal;return S.priority=S.priority+(_>0?1:0),S.subscribers.push({ref:A,priority:_,store:w}),S.subscribers=S.subscribers.sort((E,P)=>E.priority-P.priority),()=>{const E=l().internal;E!=null&&E.subscribers&&(E.priority=E.priority-(_>0?1:0),E.subscribers=E.subscribers.filter(P=>P.ref!==A))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:u,gl:h,set:d}=t.getState();if(l.width!==r.width||l.height!==r.height||u.dpr!==s){var p;r=l,s=u.dpr,z5(a,l),h.setPixelRatio(u.dpr);const m=(p=l.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(l.width,l.height,m)}a!==o&&(o=a,d(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Op,j5=new Set,J5=new Set,X5=new Set;function fv(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Wu(n,e){switch(n){case"before":return fv(j5,e);case"after":return fv(J5,e);case"tail":return fv(X5,e)}}let hv,dv;function pv(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),hv=e.internal.subscribers,Op=0;Op0)&&!((u=r.gl.xr)!=null&&u.isPresenting)&&(t+=pv(l,r))}if(Wu("after",l),t===0)return Wu("tail",l),e=!1,cancelAnimationFrame(i)}function o(l,u=1){var h;if(!l)return n.forEach(d=>o(d.store.getState()),u);(h=l.gl.xr)!=null&&h.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+u),e||(e=!0,requestAnimationFrame(s)))}function a(l,u=!0,h,d){if(u&&Wu("before",l),h)pv(l,h,d);else for(const p of n.values())pv(l,p.store.getState());u&&Wu("after",l)}return{loop:s,invalidate:o,advance:a}}function X3(){const n=z.useContext(J3);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Oi(n=t=>t,e){return X3()(n,e)}function tu(n,e=0){const t=X3(),i=t.getState().internal.subscribe,r=U3(n);return Rh(()=>i(r,e,t),[e,i,t]),null}const FE=new WeakMap;function Y3(n,e){return function(t,...i){let r=FE.get(t);return r||(r=new t,FE.set(t,r)),n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,k5(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`)))))).finally(()=>r.dispose==null?void 0:r.dispose())}}function Zo(n,e,t,i){const r=Array.isArray(e)?e:[e],s=P5(Y3(t,i),[n,...r],{equal:Jt.equ});return Array.isArray(e)?s:s[0]}Zo.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return B5(Y3(t),[n,...i])};Zo.clear=function(n,e){const t=Array.isArray(e)?e:[e];return R5([n,...t])};const zc=new Map,{invalidate:NE,advance:kE}=Y5(zc),{reconciler:Jm,applyProps:$r}=I5(zc,G5),jl={objects:"shallow",strict:!1},K5=(n,e)=>{const t=typeof n=="function"?n(e):n;return j3(t)?t:new s_({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function Q5(n,e){const t=typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:i,height:r,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function Z5(n){const e=zc.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||W5(NE,kE),o=t||Jm.createContainer(s,uc.ConcurrentRoot,null,!1,null,"",r,null);e||zc.set(n,{fiber:o,store:s});let a,l=!1,u;return{configure(h={}){let{gl:d,size:p,scene:m,events:v,onCreated:y,shadows:x=!1,linear:A=!1,flat:_=!1,legacy:w=!1,orthographic:S=!1,frameloop:E="always",dpr:P=[1,2],performance:R,raycaster:b,camera:B,onPointerMissed:L}=h,U=s.getState(),Z=U.gl;U.gl||U.set({gl:Z=K5(d,n)});let V=U.raycaster;V||U.set({raycaster:V=new T3});const{params:H,...K}=b||{};if(Jt.equ(K,V,jl)||$r(V,{...K}),Jt.equ(H,V.params,jl)||$r(V,{params:{...V.params,...H}}),!U.camera||U.camera===u&&!Jt.equ(u,B,jl)){u=B;const W=B instanceof hh,ee=W?B:S?new pr(0,0,0,0,.1,1e3):new Xt(75,0,.1,1e3);W||(ee.position.z=5,B&&$r(ee,B),!U.camera&&!(B!=null&&B.rotation)&&ee.lookAt(0,0,0)),U.set({camera:ee}),V.camera=ee}if(!U.scene){let W;m instanceof jm?W=m:(W=new jm,m&&$r(W,m)),U.set({scene:Jl(W)})}if(!U.xr){var ie;const W=(ye,q)=>{const Fe=s.getState();Fe.frameloop!=="never"&&kE(ye,!0,Fe,q)},ee=()=>{const ye=s.getState();ye.gl.xr.enabled=ye.gl.xr.isPresenting,ye.gl.xr.setAnimationLoop(ye.gl.xr.isPresenting?W:null),ye.gl.xr.isPresenting||NE(ye)},ve={connect(){const ye=s.getState().gl;ye.xr.addEventListener("sessionstart",ee),ye.xr.addEventListener("sessionend",ee)},disconnect(){const ye=s.getState().gl;ye.xr.removeEventListener("sessionstart",ee),ye.xr.removeEventListener("sessionend",ee)}};typeof((ie=Z.xr)==null?void 0:ie.addEventListener)=="function"&&ve.connect(),U.set({xr:ve})}if(Z.shadowMap){const W=Z.shadowMap.enabled,ee=Z.shadowMap.type;if(Z.shadowMap.enabled=!!x,Jt.boo(x))Z.shadowMap.type=df;else if(Jt.str(x)){var ce;const ve={basic:UP,percentage:Mg,soft:df,variance:Ia};Z.shadowMap.type=(ce=ve[x])!=null?ce:df}else Jt.obj(x)&&Object.assign(Z.shadowMap,x);(W!==Z.shadowMap.enabled||ee!==Z.shadowMap.type)&&(Z.shadowMap.needsUpdate=!0)}const N=k3();N&&("enabled"in N?N.enabled=!w:"legacyMode"in N&&(N.legacyMode=w)),$r(Z,{outputEncoding:A?3e3:3001,toneMapping:_?kr:W1}),U.legacy!==w&&U.set(()=>({legacy:w})),U.linear!==A&&U.set(()=>({linear:A})),U.flat!==_&&U.set(()=>({flat:_})),d&&!Jt.fun(d)&&!j3(d)&&!Jt.equ(d,Z,jl)&&$r(Z,d),v&&!U.events.handlers&&U.set({events:v(s)});const le=Q5(n,p);return Jt.equ(le,U.size,jl)||U.setSize(le.width,le.height,le.updateStyle,le.top,le.left),P&&U.viewport.dpr!==H3(P)&&U.setDpr(P),U.frameloop!==E&&U.setFrameloop(E),U.onPointerMissed||U.set({onPointerMissed:L}),R&&!Jt.equ(R,U.performance,jl)&&U.set(W=>({performance:{...W.performance,...R}})),a=y,l=!0,this},render(h){return l||this.configure(),Jm.updateContainer(z.createElement(q5,{store:s,children:h,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){K3(n)}}}function q5({store:n,children:e,onCreated:t,rootElement:i}){return Rh(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),z.createElement(J3.Provider,{value:n},e)}function K3(n,e){const t=zc.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),Jm.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),O5(r),zc.delete(n),e&&e(n)}catch{}},500)})}}Jm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:z.version});function xr(){return xr=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0?i=setTimeout(l,e-h):(i=null,t||(a=n.apply(s,r),s=r=null))}var u=function(){s=this,r=arguments,o=Date.now();var h=t&&!i;return i||(i=setTimeout(l,e)),h&&(a=n.apply(s,r),s=r=null),a};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},u}xA.debounce=xA;var $5=xA;const OE=WA($5);function e9(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=z.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=z.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),u=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=z.useRef(!1);z.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,m,v]=z.useMemo(()=>{const _=()=>{if(!l.current.element)return;const{left:w,top:S,width:E,height:P,bottom:R,right:b,x:B,y:L}=l.current.element.getBoundingClientRect(),U={left:w,top:S,width:E,height:P,bottom:R,right:b,x:B,y:L};l.current.element instanceof HTMLElement&&r&&(U.height=l.current.element.offsetHeight,U.width=l.current.element.offsetWidth),Object.freeze(U),d.current&&!r9(l.current.lastBounds,U)&&a(l.current.lastBounds=U)};return[_,h?OE(_,h):_,u?OE(_,u):_]},[a,r,u,h]);function y(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",v,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function x(){l.current.element&&(l.current.resizeObserver=new s(v),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",v,{capture:!0,passive:!0})))}const A=_=>{!_||_===l.current.element||(y(),l.current.element=_,l.current.scrollContainers=Q3(_),x())};return n9(v,!!t),t9(m),z.useEffect(()=>{y(),x()},[t,v,m]),z.useEffect(()=>y,[]),[A,o,p]}function t9(n){z.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function n9(n,e){z.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function Q3(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...Q3(n.parentElement)]}const i9=["x","y","top","bottom","left","right","width","height"],r9=(n,e)=>i9.every(t=>n[t]===e[t]);var s9=Object.defineProperty,o9=Object.defineProperties,a9=Object.getOwnPropertyDescriptors,UE=Object.getOwnPropertySymbols,l9=Object.prototype.hasOwnProperty,c9=Object.prototype.propertyIsEnumerable,zE=(n,e,t)=>e in n?s9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,GE=(n,e)=>{for(var t in e||(e={}))l9.call(e,t)&&zE(n,t,e[t]);if(UE)for(var t of UE(e))c9.call(e,t)&&zE(n,t,e[t]);return n},u9=(n,e)=>o9(n,a9(e));function Z3(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=Z3(i,e,t);if(r)return r;i=e?null:i.sibling}}function q3(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const I_=q3(z.createContext(null));class $3 extends z.Component{render(){return z.createElement(I_.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:f9,ReactCurrentDispatcher:h9}=z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d9(){const n=z.useContext(I_);if(!n)throw new Error("its-fine: useFiber must be called within a !");const e=z.useId();return z.useMemo(()=>{var i;return(i=f9.current)!=null?i:Z3(n,!1,r=>{let s=r.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}})},[n,e])}function p9(){var n,e;const t=d9(),[i]=z.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==I_&&!i.has(s)&&i.set(s,(e=h9.current)==null?void 0:e.readContext(q3(s))),r=r.return}return z.useMemo(()=>Array.from(i.keys()).reduce((s,o)=>a=>z.createElement(s,null,z.createElement(o.Provider,u9(GE({},a),{value:i.get(o)}))),s=>z.createElement($3,GE({},s))),[i])}const mv={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function m9(n){const{handlePointer:e}=V5(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(mv).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:r}=n.getState();(t=r.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,u]=mv[o];t.addEventListener(l,a,{passive:u})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=mv[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const g9=z.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=m9,eventSource:a,eventPrefix:l,shadows:u,linear:h,flat:d,legacy:p,orthographic:m,frameloop:v,dpr:y,performance:x,raycaster:A,camera:_,scene:w,onPointerMissed:S,onCreated:E,...P},R){z.useMemo(()=>L5(w5),[]);const b=p9(),[B,L]=e9({scroll:!0,debounce:{scroll:50,resize:0},...i}),U=z.useRef(null),Z=z.useRef(null);z.useImperativeHandle(R,()=>U.current);const V=U3(S),[H,K]=z.useState(!1),[ie,ce]=z.useState(!1);if(H)throw H;if(ie)throw ie;const N=z.useRef(null);Rh(()=>{const Y=U.current;L.width>0&&L.height>0&&Y&&(N.current||(N.current=Z5(Y)),N.current.configure({gl:s,events:o,shadows:u,linear:h,flat:d,legacy:p,orthographic:m,frameloop:v,dpr:y,performance:x,raycaster:A,camera:_,scene:w,size:L,onPointerMissed:(...le)=>V.current==null?void 0:V.current(...le),onCreated:le=>{le.events.connect==null||le.events.connect(a?D5(a)?a.current:a:Z.current),l&&le.setEvents({compute:(W,ee)=>{const ve=W[l+"X"],ye=W[l+"Y"];ee.pointer.set(ve/ee.size.width*2-1,-(ye/ee.size.height)*2+1),ee.raycaster.setFromCamera(ee.pointer,ee.camera)}}),E==null||E(le)}}),N.current.render(z.createElement(b,null,z.createElement(z3,{set:ce},z.createElement(z.Suspense,{fallback:z.createElement(F5,{set:K})},e)))))}),z.useEffect(()=>{const Y=U.current;if(Y)return()=>K3(Y)},[]);const J=a?"none":"auto";return z.createElement("div",xr({ref:Z,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:J,...r}},P),z.createElement("div",{ref:B,style:{width:"100%",height:"100%"}},z.createElement("canvas",{ref:U,style:{display:"block"}},t)))}),Og=z.forwardRef(function(e,t){return z.createElement($3,null,z.createElement(g9,xr({},e,{ref:t})))}),Lh=new D,D_=new D,y9=new D;function v9(n,e,t){const i=Lh.setFromMatrixPosition(n.matrixWorld);i.project(e);const r=t.width/2,s=t.height/2;return[i.x*r+r,-(i.y*s)+s]}function x9(n,e){const t=Lh.setFromMatrixPosition(n.matrixWorld),i=D_.setFromMatrixPosition(e.matrixWorld),r=t.sub(i),s=e.getWorldDirection(y9);return r.angleTo(s)>Math.PI/2}function A9(n,e,t,i){const r=Lh.setFromMatrixPosition(n.matrixWorld),s=r.clone();s.project(e),t.setFromCamera(s,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)Math.abs(n)<1e-10?0:n;function eR(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=AA(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const M9=(n=>e=>eR(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),S9=(n=>(e,t)=>eR(e,n(t),"translate(-50%,-50%)"))(n=>[1/n,1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1]);function C9(n){return n&&typeof n=="object"&&"current"in n}const E9=z.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:u=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:m,receiveShadow:v,material:y,geometry:x,zIndexRange:A=[16777271,0],calculatePosition:_=v9,as:w="div",wrapperClass:S,pointerEvents:E="auto",...P},R)=>{const{gl:b,camera:B,scene:L,size:U,raycaster:Z,events:V,viewport:H}=Oi(),[K]=z.useState(()=>document.createElement(w)),ie=z.useRef(),ce=z.useRef(null),N=z.useRef(0),J=z.useRef([0,0]),Y=z.useRef(null),le=z.useRef(null),W=(a==null?void 0:a.current)||V.connected||b.domElement.parentNode,ee=z.useRef(null),ve=z.useRef(!1),ye=z.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&C9(d[0]),[d]);z.useLayoutEffect(()=>{const _e=b.domElement;d&&d==="blending"?(_e.style.zIndex=`${Math.floor(A[0]/2)}`,_e.style.position="absolute",_e.style.pointerEvents="none"):(_e.style.zIndex=null,_e.style.position=null,_e.style.pointerEvents=null)},[d]),z.useLayoutEffect(()=>{if(ce.current){const _e=ie.current=EP(K);if(L.updateMatrixWorld(),h)K.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Be=_(ce.current,B,U);K.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Be[0]}px,${Be[1]}px,0);transform-origin:0 0;`}return W&&(r?W.prepend(K):W.appendChild(K)),()=>{W&&W.removeChild(K),_e.unmount()}}},[W,h]),z.useLayoutEffect(()=>{S&&(K.className=S)},[S]);const q=z.useMemo(()=>h?{position:"absolute",top:0,left:0,width:U.width,height:U.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-U.height/2,left:-U.width/2,width:U.width,height:U.height},...t},[t,s,o,U,h]),Fe=z.useMemo(()=>({position:"absolute",pointerEvents:E}),[E]);z.useLayoutEffect(()=>{if(ve.current=!1,h){var _e;(_e=ie.current)==null||_e.render(z.createElement("div",{ref:Y,style:q},z.createElement("div",{ref:le,style:Fe},z.createElement("div",{ref:R,className:i,style:t,children:n}))))}else{var Be;(Be=ie.current)==null||Be.render(z.createElement("div",{ref:R,style:q,className:i,children:n}))}});const ke=z.useRef(!0);tu(_e=>{if(ce.current){B.updateMatrixWorld(),ce.current.updateWorldMatrix(!0,!1);const Be=h?J.current:_(ce.current,B,U);if(h||Math.abs(N.current-B.zoom)>e||Math.abs(J.current[0]-Be[0])>e||Math.abs(J.current[1]-Be[1])>e){const fe=x9(ce.current,B);let oe=!1;ye&&(Array.isArray(d)?oe=d.map(qe=>qe.current):d!=="blending"&&(oe=[L]));const Se=ke.current;if(oe){const qe=A9(ce.current,B,Z,oe);ke.current=qe&&!fe}else ke.current=!fe;Se!==ke.current&&(p?p(!ke.current):K.style.display=ke.current?"block":"none");const Ue=Math.floor(A[0]/2),Te=d?ye?[A[0],Ue]:[Ue-1,0]:A;if(K.style.zIndex=`${w9(ce.current,B,Te)}`,h){const[qe,Ke]=[U.width/2,U.height/2],je=B.projectionMatrix.elements[5]*Ke,{isOrthographicCamera:xt,top:At,left:O,bottom:I,right:se}=B,we=M9(B.matrixWorldInverse),Ce=xt?`scale(${je})translate(${AA(-(se+O)/2)}px,${AA((At+I)/2)}px)`:`translateZ(${je}px)`;let be=ce.current.matrixWorld;u&&(be=B.matrixWorldInverse.clone().transpose().copyPosition(be).scale(ce.current.scale),be.elements[3]=be.elements[7]=be.elements[11]=0,be.elements[15]=1),K.style.width=U.width+"px",K.style.height=U.height+"px",K.style.perspective=xt?"":`${je}px`,Y.current&&le.current&&(Y.current.style.transform=`${Ce}${we}translate(${qe}px,${Ke}px)`,le.current.style.transform=S9(be,1/((l||10)/400)))}else{const qe=l===void 0?1:_9(ce.current,B)*l;K.style.transform=`translate3d(${Be[0]}px,${Be[1]}px,0) scale(${qe})`}J.current=Be,N.current=B.zoom}}if(!ye&&ee.current&&!ve.current)if(h){if(Y.current){const Be=Y.current.children[0];if(Be!=null&&Be.clientWidth&&Be!=null&&Be.clientHeight){const{isOrthographicCamera:fe}=B;if(fe||x)P.scale&&(Array.isArray(P.scale)?P.scale instanceof D?ee.current.scale.copy(P.scale.clone().divideScalar(1)):ee.current.scale.set(1/P.scale[0],1/P.scale[1],1/P.scale[2]):ee.current.scale.setScalar(1/P.scale));else{const oe=(l||10)/400,Se=Be.clientWidth*oe,Ue=Be.clientHeight*oe;ee.current.scale.set(Se,Ue,1)}ve.current=!0}}}else{const Be=K.children[0];if(Be!=null&&Be.clientWidth&&Be!=null&&Be.clientHeight){const fe=1/H.factor,oe=Be.clientWidth*fe,Se=Be.clientHeight*fe;ee.current.scale.set(oe,Se,1),ve.current=!0}ee.current.lookAt(_e.camera.position)}});const He=z.useMemo(()=>({vertexShader:h?void 0:` /* This shader is from the THREE's SpriteMaterial. We need to turn the backing plane into a Sprite @@ -3276,7 +3276,7 @@ No matching component was found for: void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } - `}),[h]);return z.createElement("group",xr({},P,{ref:ce}),d&&!ye&&z.createElement("mesh",{castShadow:m,receiveShadow:v,ref:ee},x||z.createElement("planeGeometry",null),y||z.createElement("shaderMaterial",{side:Ir,vertexShader:He.vertexShader,fragmentShader:He.fragmentShader})))});let ju=0;const b9=R3(n=>(cc.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-ju)/(i-ju)*100})},cc.onLoad=()=>{n({active:!1})},cc.onError=e=>n(t=>({errors:[...t.errors,e]})),cc.onProgress=(e,t,i)=>{t===i&&(ju=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-ju)/(i-ju)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function F_(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}function HE(n,e){if(e===PB)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),n;if(e===Hm||e===X1){let t=n.getIndex();if(t===null){const o=[],a=n.getAttribute("position");if(a!==void 0){for(let l=0;le in n?P9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,at=(n,e,t)=>(B9(n,typeof e!="symbol"?e+"":e,t),t);const Up=new Yc,VE=new Ps,R9=Math.cos(70*(Math.PI/180)),WE=(n,e)=>(n%e+e)%e;let L9=class extends cs{constructor(e,t){super(),at(this,"object"),at(this,"domElement"),at(this,"enabled",!0),at(this,"target",new D),at(this,"minDistance",0),at(this,"maxDistance",1/0),at(this,"minZoom",0),at(this,"maxZoom",1/0),at(this,"minPolarAngle",0),at(this,"maxPolarAngle",Math.PI),at(this,"minAzimuthAngle",-1/0),at(this,"maxAzimuthAngle",1/0),at(this,"enableDamping",!1),at(this,"dampingFactor",.05),at(this,"enableZoom",!0),at(this,"zoomSpeed",1),at(this,"enableRotate",!0),at(this,"rotateSpeed",1),at(this,"enablePan",!0),at(this,"panSpeed",1),at(this,"screenSpacePanning",!0),at(this,"keyPanSpeed",7),at(this,"zoomToCursor",!1),at(this,"autoRotate",!1),at(this,"autoRotateSpeed",2),at(this,"reverseOrbit",!1),at(this,"reverseHorizontalOrbit",!1),at(this,"reverseVerticalOrbit",!1),at(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),at(this,"mouseButtons",{LEFT:wa.ROTATE,MIDDLE:wa.DOLLY,RIGHT:wa.PAN}),at(this,"touches",{ONE:Ma.ROTATE,TWO:Ma.DOLLY_PAN}),at(this,"target0"),at(this,"position0"),at(this,"zoom0"),at(this,"_domElementKeyEvents",null),at(this,"getPolarAngle"),at(this,"getAzimuthalAngle"),at(this,"setPolarAngle"),at(this,"setAzimuthalAngle"),at(this,"getDistance"),at(this,"listenToKeyEvents"),at(this,"stopListenToKeyEvents"),at(this,"saveState"),at(this,"reset"),at(this,"update"),at(this,"connect"),at(this,"dispose"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=j=>{let xe=WE(j,2*Math.PI),Oe=h.phi;Oe<0&&(Oe+=2*Math.PI),xe<0&&(xe+=2*Math.PI);let G=Math.abs(xe-Oe);2*Math.PI-G{let xe=WE(j,2*Math.PI),Oe=h.theta;Oe<0&&(Oe+=2*Math.PI),xe<0&&(xe+=2*Math.PI);let G=Math.abs(xe-Oe);2*Math.PI-Gi.object.position.distanceTo(i.target),this.listenToKeyEvents=j=>{j.addEventListener("keydown",it),this._domElementKeyEvents=j},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",it),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const j=new D,xe=new D(0,1,0),Oe=new Gn().setFromUnitVectors(e.up,xe),G=Oe.clone().invert(),re=new D,Ae=new Gn,Re=2*Math.PI;return function(){const _t=i.object.position;Oe.setFromUnitVectors(e.up,xe),G.copy(Oe).invert(),j.copy(_t).sub(i.target),j.applyQuaternion(Oe),h.setFromVector3(j),i.autoRotate&&l===a.NONE&&H(Z()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let Nt=i.minAzimuthAngle,zt=i.maxAzimuthAngle;isFinite(Nt)&&isFinite(zt)&&(Nt<-Math.PI?Nt+=Re:Nt>Math.PI&&(Nt-=Re),zt<-Math.PI?zt+=Re:zt>Math.PI&&(zt-=Re),Nt<=zt?h.theta=Math.max(Nt,Math.min(zt,h.theta)):h.theta=h.theta>(Nt+zt)/2?Math.max(Nt,h.theta):Math.min(zt,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(m,i.dampingFactor):i.target.add(m),i.zoomToCursor&&B||i.object.isOrthographicCamera?h.radius=W(h.radius):h.radius=W(h.radius*p),j.setFromSpherical(h),j.applyQuaternion(G),_t.copy(i.target).add(j),i.object.matrixAutoUpdate||i.object.updateMatrix(),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,m.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),m.set(0,0,0));let Xn=!1;if(i.zoomToCursor&&B){let Bt=null;if(i.object instanceof Xt&&i.object.isPerspectiveCamera){const Ln=j.length();Bt=W(Ln*p);const Sn=Ln-Bt;i.object.position.addScaledVector(R,Sn),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const Ln=new D(b.x,b.y,0);Ln.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),Xn=!0;const Sn=new D(b.x,b.y,0);Sn.unproject(i.object),i.object.position.sub(Sn).add(Ln),i.object.updateMatrixWorld(),Bt=j.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Bt!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Bt).add(i.object.position):(Up.origin.copy(i.object.position),Up.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Up.direction))u||8*(1-Ae.dot(i.object.quaternion))>u?(i.dispatchEvent(r),re.copy(i.object.position),Ae.copy(i.object.quaternion),Xn=!1,!0):!1}})(),this.connect=j=>{j===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=j,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Qe),i.domElement.addEventListener("pointerdown",At),i.domElement.addEventListener("pointercancel",se),i.domElement.addEventListener("wheel",be)},this.dispose=()=>{var j,xe,Oe,G,re,Ae;(j=i.domElement)==null||j.removeEventListener("contextmenu",Qe),(xe=i.domElement)==null||xe.removeEventListener("pointerdown",At),(Oe=i.domElement)==null||Oe.removeEventListener("pointercancel",se),(G=i.domElement)==null||G.removeEventListener("wheel",be),(re=i.domElement)==null||re.ownerDocument.removeEventListener("pointermove",O),(Ae=i.domElement)==null||Ae.ownerDocument.removeEventListener("pointerup",I),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",it)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const u=1e-6,h=new mA,d=new mA;let p=1;const m=new D,v=new pe,y=new pe,x=new pe,A=new pe,_=new pe,w=new pe,S=new pe,E=new pe,P=new pe,R=new D,b=new pe;let B=!1;const L=[],U={};function Z(){return 2*Math.PI/60/60*i.autoRotateSpeed}function V(){return Math.pow(.95,i.zoomSpeed)}function H(j){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=j:d.theta-=j}function K(j){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=j:d.phi-=j}const ie=(()=>{const j=new D;return function(Oe,G){j.setFromMatrixColumn(G,0),j.multiplyScalar(-Oe),m.add(j)}})(),ce=(()=>{const j=new D;return function(Oe,G){i.screenSpacePanning===!0?j.setFromMatrixColumn(G,1):(j.setFromMatrixColumn(G,0),j.crossVectors(i.object.up,j)),j.multiplyScalar(Oe),m.add(j)}})(),N=(()=>{const j=new D;return function(Oe,G){const re=i.domElement;if(re&&i.object instanceof Xt&&i.object.isPerspectiveCamera){const Ae=i.object.position;j.copy(Ae).sub(i.target);let Re=j.length();Re*=Math.tan(i.object.fov/2*Math.PI/180),ie(2*Oe*Re/re.clientHeight,i.object.matrix),ce(2*G*Re/re.clientHeight,i.object.matrix)}else re&&i.object instanceof pr&&i.object.isOrthographicCamera?(ie(Oe*(i.object.right-i.object.left)/i.object.zoom/re.clientWidth,i.object.matrix),ce(G*(i.object.top-i.object.bottom)/i.object.zoom/re.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function J(j){i.object instanceof Xt&&i.object.isPerspectiveCamera||i.object instanceof pr&&i.object.isOrthographicCamera?p/=j:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function Y(j){i.object instanceof Xt&&i.object.isPerspectiveCamera||i.object instanceof pr&&i.object.isOrthographicCamera?p*=j:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function le(j){if(!i.zoomToCursor||!i.domElement)return;B=!0;const xe=i.domElement.getBoundingClientRect(),Oe=j.clientX-xe.left,G=j.clientY-xe.top,re=xe.width,Ae=xe.height;b.x=Oe/re*2-1,b.y=-(G/Ae)*2+1,R.set(b.x,b.y,1).unproject(i.object).sub(i.object.position).normalize()}function W(j){return Math.max(i.minDistance,Math.min(i.maxDistance,j))}function ee(j){v.set(j.clientX,j.clientY)}function ve(j){le(j),S.set(j.clientX,j.clientY)}function ye(j){A.set(j.clientX,j.clientY)}function q(j){y.set(j.clientX,j.clientY),x.subVectors(y,v).multiplyScalar(i.rotateSpeed);const xe=i.domElement;xe&&(H(2*Math.PI*x.x/xe.clientHeight),K(2*Math.PI*x.y/xe.clientHeight)),v.copy(y),i.update()}function Fe(j){E.set(j.clientX,j.clientY),P.subVectors(E,S),P.y>0?J(V()):P.y<0&&Y(V()),S.copy(E),i.update()}function ke(j){_.set(j.clientX,j.clientY),w.subVectors(_,A).multiplyScalar(i.panSpeed),N(w.x,w.y),A.copy(_),i.update()}function He(j){le(j),j.deltaY<0?Y(V()):j.deltaY>0&&J(V()),i.update()}function _e(j){let xe=!1;switch(j.code){case i.keys.UP:N(0,i.keyPanSpeed),xe=!0;break;case i.keys.BOTTOM:N(0,-i.keyPanSpeed),xe=!0;break;case i.keys.LEFT:N(i.keyPanSpeed,0),xe=!0;break;case i.keys.RIGHT:N(-i.keyPanSpeed,0),xe=!0;break}xe&&(j.preventDefault(),i.update())}function Be(){if(L.length==1)v.set(L[0].pageX,L[0].pageY);else{const j=.5*(L[0].pageX+L[1].pageX),xe=.5*(L[0].pageY+L[1].pageY);v.set(j,xe)}}function he(){if(L.length==1)A.set(L[0].pageX,L[0].pageY);else{const j=.5*(L[0].pageX+L[1].pageX),xe=.5*(L[0].pageY+L[1].pageY);A.set(j,xe)}}function oe(){const j=L[0].pageX-L[1].pageX,xe=L[0].pageY-L[1].pageY,Oe=Math.sqrt(j*j+xe*xe);S.set(0,Oe)}function Se(){i.enableZoom&&oe(),i.enablePan&&he()}function Ue(){i.enableZoom&&oe(),i.enableRotate&&Be()}function Te(j){if(L.length==1)y.set(j.pageX,j.pageY);else{const Oe=Je(j),G=.5*(j.pageX+Oe.x),re=.5*(j.pageY+Oe.y);y.set(G,re)}x.subVectors(y,v).multiplyScalar(i.rotateSpeed);const xe=i.domElement;xe&&(H(2*Math.PI*x.x/xe.clientHeight),K(2*Math.PI*x.y/xe.clientHeight)),v.copy(y)}function qe(j){if(L.length==1)_.set(j.pageX,j.pageY);else{const xe=Je(j),Oe=.5*(j.pageX+xe.x),G=.5*(j.pageY+xe.y);_.set(Oe,G)}w.subVectors(_,A).multiplyScalar(i.panSpeed),N(w.x,w.y),A.copy(_)}function Ke(j){const xe=Je(j),Oe=j.pageX-xe.x,G=j.pageY-xe.y,re=Math.sqrt(Oe*Oe+G*G);E.set(0,re),P.set(0,Math.pow(E.y/S.y,i.zoomSpeed)),J(P.y),S.copy(E)}function je(j){i.enableZoom&&Ke(j),i.enablePan&&qe(j)}function xt(j){i.enableZoom&&Ke(j),i.enableRotate&&Te(j)}function At(j){var xe,Oe;i.enabled!==!1&&(L.length===0&&((xe=i.domElement)==null||xe.ownerDocument.addEventListener("pointermove",O),(Oe=i.domElement)==null||Oe.ownerDocument.addEventListener("pointerup",I)),rt(j),j.pointerType==="touch"?De(j):we(j))}function O(j){i.enabled!==!1&&(j.pointerType==="touch"?ge(j):Ce(j))}function I(j){var xe,Oe,G;We(j),L.length===0&&((xe=i.domElement)==null||xe.releasePointerCapture(j.pointerId),(Oe=i.domElement)==null||Oe.ownerDocument.removeEventListener("pointermove",O),(G=i.domElement)==null||G.ownerDocument.removeEventListener("pointerup",I)),i.dispatchEvent(o),l=a.NONE}function se(j){We(j)}function we(j){let xe;switch(j.button){case 0:xe=i.mouseButtons.LEFT;break;case 1:xe=i.mouseButtons.MIDDLE;break;case 2:xe=i.mouseButtons.RIGHT;break;default:xe=-1}switch(xe){case wa.DOLLY:if(i.enableZoom===!1)return;ve(j),l=a.DOLLY;break;case wa.ROTATE:if(j.ctrlKey||j.metaKey||j.shiftKey){if(i.enablePan===!1)return;ye(j),l=a.PAN}else{if(i.enableRotate===!1)return;ee(j),l=a.ROTATE}break;case wa.PAN:if(j.ctrlKey||j.metaKey||j.shiftKey){if(i.enableRotate===!1)return;ee(j),l=a.ROTATE}else{if(i.enablePan===!1)return;ye(j),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Ce(j){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;q(j);break;case a.DOLLY:if(i.enableZoom===!1)return;Fe(j);break;case a.PAN:if(i.enablePan===!1)return;ke(j);break}}function be(j){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(j.preventDefault(),i.dispatchEvent(s),He(j),i.dispatchEvent(o))}function it(j){i.enabled===!1||i.enablePan===!1||_e(j)}function De(j){switch($e(j),L.length){case 1:switch(i.touches.ONE){case Ma.ROTATE:if(i.enableRotate===!1)return;Be(),l=a.TOUCH_ROTATE;break;case Ma.PAN:if(i.enablePan===!1)return;he(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case Ma.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Se(),l=a.TOUCH_DOLLY_PAN;break;case Ma.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ue(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function ge(j){switch($e(j),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;Te(j),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;qe(j),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;je(j),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;xt(j),i.update();break;default:l=a.NONE}}function Qe(j){i.enabled!==!1&&j.preventDefault()}function rt(j){L.push(j)}function We(j){delete U[j.pointerId];for(let xe=0;xe=2.0 are supported."));return}const l=new cV(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,s){i.parse(e,t,r,s)})}}function I9(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const Et={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class D9{constructor(e){this.parser=e,this.name=Et.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class J9{constructor(e){this.parser=e,this.name=Et.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class X9{constructor(e){this.parser=e,this.name=Et.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Y9{constructor(e){this.name=Et.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,u=r.byteLength||0,h=r.count,d=r.byteStride,p=new Uint8Array(a,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(h,d,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(h*d);return o.decodeGltfBuffer(new Uint8Array(m),h,d,p,r.mode,r.filter),m})})}else return null}}class K9{constructor(e){this.name=Et.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=t.meshes[i.mesh];for(const u of r.primitives)if(u.mode!==lr.TRIANGLES&&u.mode!==lr.TRIANGLE_STRIP&&u.mode!==lr.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const u in o)a.push(this.parser.getDependency("accessor",o[u]).then(h=>(l[u]=h,l[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(u=>{const h=u.pop(),d=h.isGroup?h.children:[h],p=u[0].count,m=[];for(const v of d){const y=new ot,x=new D,A=new Gn,_=new D(1,1,1),w=new l_(v.geometry,v.material,p);for(let S=0;S=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},co={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},nV={CUBICSPLINE:void 0,LINEAR:tl,STEP:Ic},yv={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function iV(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new Ph({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:os})),n.DefaultMaterial}function ya(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function go(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function rV(n,e,t){let i=!1,r=!1,s=!1;for(let u=0,h=e.length;u0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const lV=new ot;class cV{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new I9,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||r&&s<98?this.textureLoader=new Bh(this.options.manager):this.textureLoader=new C3(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Wi(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};ya(s,a,r),go(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[u,h]of o.children.entries())s(h,a.children[u])};return s(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&x.setY(B,P[R*l+1]),l>=3&&x.setZ(B,P[R*l+2]),l>=4&&x.setW(B,P[R*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return x})}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,i){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(t,i).then(function(h){h.flipY=!1,h.name=o.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return h.magFilter=JE[p.magFilter]||nn,h.minFilter=JE[p.minFilter]||as,h.wrapS=XE[p.wrapS]||ko,h.wrapT=XE[p.wrapT]||ko,r.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,t){const i=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(d){u=!0;const p=new Blob([d],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const h=Promise.resolve(l).then(function(d){return new Promise(function(p,m){let v=p;t.isImageBitmapLoader===!0&&(v=function(y){const x=new $t(y);x.needsUpdate=!0,p(x)}),t.load(rs.resolveURL(d,s.path),v,void 0,m)})}).then(function(d){return u===!0&&a.revokeObjectURL(l),d.userData.mimeType=o.mimeType||aV(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=h,h}assignTexture(e,t,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[Et.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[Et.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Et.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&("colorSpace"in o?o.colorSpace=r===3001?"srgb":"srgb-linear":o.encoding=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new gh,Mn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new ri,Mn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return Ph}loadMaterial(e){const t=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const a={},l=s.extensions||{},u=[];if(l[Et.KHR_MATERIALS_UNLIT]){const d=r[Et.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),u.push(d.extendParams(a,s,t))}else{const d=s.pbrMetallicRoughness||{};if(a.color=new Ie(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;a.color.fromArray(p),a.opacity=p[3]}d.baseColorTexture!==void 0&&u.push(t.assignTexture(a,"map",d.baseColorTexture,3001)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),u.push(t.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=Ir);const h=s.alphaMode||yv.OPAQUE;if(h===yv.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===yv.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==zi&&(u.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new pe(1,1),s.normalTexture.scale!==void 0)){const d=s.normalTexture.scale;a.normalScale.set(d,d)}return s.occlusionTexture!==void 0&&o!==zi&&(u.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==zi&&(a.emissive=new Ie().fromArray(s.emissiveFactor)),s.emissiveTexture!==void 0&&o!==zi&&u.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,3001)),Promise.all(u).then(function(){const d=new o(a);return s.name&&(d.name=s.name),go(d,s),t.associations.set(d,{materials:e}),s.extensions&&ya(r,d,s),d})}createUniqueName(e){const t=Pt.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[Et.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return YE(l,a,t)})}const o=[];for(let a=0,l=e.length;a0&&sV(A,s),A.name=t.createUniqueName(s.name||"mesh_"+e),go(A,s),x.extensions&&ya(r,A,x),t.assignFinalMaterial(A),d.push(A)}for(let m=0,v=d.length;m1?h=new Fs:u.length===1?h=u[0]:h=new bt,h!==u[0])for(let d=0,p=u.length;d{const d=new Map;for(const[p,m]of r.associations)(p instanceof Mn||p instanceof $t)&&d.set(p,m);return h.traverse(p=>{const m=r.associations.get(p);m!=null&&d.set(p,m)}),d};return r.associations=u(s),s})}}function uV(n,e,t){const i=e.attributes,r=new Xo;if(i.POSITION!==void 0){const a=t.json.accessors[i.POSITION],l=a.min,u=a.max;if(l!==void 0&&u!==void 0){if(r.set(new D(l[0],l[1],l[2]),new D(u[0],u[1],u[2])),a.normalized){const h=wA(wc[a.componentType]);r.min.multiplyScalar(h),r.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new D,l=new D;for(let u=0,h=s.length;u0,E=V>0,P=H>0,R=(S?1:0)+(E?1:0)+(P?1:0),R){case 0:{A.push(y[w]),A.push(y[w+1]),A.push(y[w+2]);break}case 1:{if(S&&(b=y[w+1],B=y[w+2],L=v(y[w],b,x,_),U=v(y[w],B,x,_)),E){b=y[w],B=y[w+2],L=v(y[w+1],b,x,_),U=v(y[w+1],B,x,_),A.push(L),A.push(B.clone()),A.push(b.clone()),A.push(B.clone()),A.push(L.clone()),A.push(U);break}P&&(b=y[w],B=y[w+1],L=v(y[w+2],b,x,_),U=v(y[w+2],B,x,_)),A.push(b.clone()),A.push(B.clone()),A.push(L),A.push(U),A.push(L.clone()),A.push(B.clone());break}case 2:{S||(b=y[w].clone(),B=v(b,y[w+1],x,_),L=v(b,y[w+2],x,_),A.push(b),A.push(B),A.push(L)),E||(b=y[w+1].clone(),B=v(b,y[w+2],x,_),L=v(b,y[w],x,_),A.push(b),A.push(B),A.push(L)),P||(b=y[w+2].clone(),B=v(b,y[w],x,_),L=v(b,y[w+1],x,_),A.push(b),A.push(B),A.push(L));break}}}return A}function v(y,x,A,_){const w=y.position.dot(A)-_,S=x.position.dot(A)-_,E=w/(w-S);return new KE(new D(y.position.x+E*(x.position.x-y.position.x),y.position.y+E*(x.position.y-y.position.y),y.position.z+E*(x.position.z-y.position.z)),new D(y.normal.x+E*(x.normal.x-y.normal.x),y.normal.y+E*(x.normal.y-y.normal.y),y.normal.z+E*(x.normal.z-y.normal.z)))}}}class KE{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const xv=new WeakMap;class hV extends yi{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,i,r){const s=new Wi(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,o=>{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(t).catch(r)},i,r)}decodeDracoFile(e,t,i,r){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i};this.decodeGeometry(e,s).then(t)}decodeGeometry(e,t){for(const l in t.attributeTypes){const u=t.attributeTypes[l];u.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[l]=u.name)}const i=JSON.stringify(t);if(xv.has(e)){const l=xv.get(e);if(l.key===i)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(l=>(r=l,new Promise((u,h)=>{r._callbacks[s]={resolve:u,reject:h},r.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return a.catch(()=>!0).then(()=>{r&&s&&this._releaseTask(r,s)}),xv.set(e,{key:i,promise:a}),a}_createGeometry(e){const t=new ft;e.index&&t.setIndex(new Ft(e.index.array,1));for(let i=0;i{i.load(e,r,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const s=dV.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(` + `}),[h]);return z.createElement("group",xr({},P,{ref:ce}),d&&!ye&&z.createElement("mesh",{castShadow:m,receiveShadow:v,ref:ee},x||z.createElement("planeGeometry",null),y||z.createElement("shaderMaterial",{side:Ir,vertexShader:He.vertexShader,fragmentShader:He.fragmentShader})))});let ju=0;const b9=R3(n=>(cc.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-ju)/(i-ju)*100})},cc.onLoad=()=>{n({active:!1})},cc.onError=e=>n(t=>({errors:[...t.errors,e]})),cc.onProgress=(e,t,i)=>{t===i&&(ju=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-ju)/(i-ju)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function F_(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}function HE(n,e){if(e===PB)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),n;if(e===Hm||e===X1){let t=n.getIndex();if(t===null){const o=[],a=n.getAttribute("position");if(a!==void 0){for(let l=0;le in n?P9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,at=(n,e,t)=>(B9(n,typeof e!="symbol"?e+"":e,t),t);const Up=new Yc,VE=new Ps,R9=Math.cos(70*(Math.PI/180)),WE=(n,e)=>(n%e+e)%e;let L9=class extends cs{constructor(e,t){super(),at(this,"object"),at(this,"domElement"),at(this,"enabled",!0),at(this,"target",new D),at(this,"minDistance",0),at(this,"maxDistance",1/0),at(this,"minZoom",0),at(this,"maxZoom",1/0),at(this,"minPolarAngle",0),at(this,"maxPolarAngle",Math.PI),at(this,"minAzimuthAngle",-1/0),at(this,"maxAzimuthAngle",1/0),at(this,"enableDamping",!1),at(this,"dampingFactor",.05),at(this,"enableZoom",!0),at(this,"zoomSpeed",1),at(this,"enableRotate",!0),at(this,"rotateSpeed",1),at(this,"enablePan",!0),at(this,"panSpeed",1),at(this,"screenSpacePanning",!0),at(this,"keyPanSpeed",7),at(this,"zoomToCursor",!1),at(this,"autoRotate",!1),at(this,"autoRotateSpeed",2),at(this,"reverseOrbit",!1),at(this,"reverseHorizontalOrbit",!1),at(this,"reverseVerticalOrbit",!1),at(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),at(this,"mouseButtons",{LEFT:wa.ROTATE,MIDDLE:wa.DOLLY,RIGHT:wa.PAN}),at(this,"touches",{ONE:Ma.ROTATE,TWO:Ma.DOLLY_PAN}),at(this,"target0"),at(this,"position0"),at(this,"zoom0"),at(this,"_domElementKeyEvents",null),at(this,"getPolarAngle"),at(this,"getAzimuthalAngle"),at(this,"setPolarAngle"),at(this,"setAzimuthalAngle"),at(this,"getDistance"),at(this,"listenToKeyEvents"),at(this,"stopListenToKeyEvents"),at(this,"saveState"),at(this,"reset"),at(this,"update"),at(this,"connect"),at(this,"dispose"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=j=>{let xe=WE(j,2*Math.PI),Oe=h.phi;Oe<0&&(Oe+=2*Math.PI),xe<0&&(xe+=2*Math.PI);let G=Math.abs(xe-Oe);2*Math.PI-G{let xe=WE(j,2*Math.PI),Oe=h.theta;Oe<0&&(Oe+=2*Math.PI),xe<0&&(xe+=2*Math.PI);let G=Math.abs(xe-Oe);2*Math.PI-Gi.object.position.distanceTo(i.target),this.listenToKeyEvents=j=>{j.addEventListener("keydown",it),this._domElementKeyEvents=j},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",it),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const j=new D,xe=new D(0,1,0),Oe=new Gn().setFromUnitVectors(e.up,xe),G=Oe.clone().invert(),re=new D,Ae=new Gn,Re=2*Math.PI;return function(){const _t=i.object.position;Oe.setFromUnitVectors(e.up,xe),G.copy(Oe).invert(),j.copy(_t).sub(i.target),j.applyQuaternion(Oe),h.setFromVector3(j),i.autoRotate&&l===a.NONE&&H(Z()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let Nt=i.minAzimuthAngle,zt=i.maxAzimuthAngle;isFinite(Nt)&&isFinite(zt)&&(Nt<-Math.PI?Nt+=Re:Nt>Math.PI&&(Nt-=Re),zt<-Math.PI?zt+=Re:zt>Math.PI&&(zt-=Re),Nt<=zt?h.theta=Math.max(Nt,Math.min(zt,h.theta)):h.theta=h.theta>(Nt+zt)/2?Math.max(Nt,h.theta):Math.min(zt,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(m,i.dampingFactor):i.target.add(m),i.zoomToCursor&&B||i.object.isOrthographicCamera?h.radius=W(h.radius):h.radius=W(h.radius*p),j.setFromSpherical(h),j.applyQuaternion(G),_t.copy(i.target).add(j),i.object.matrixAutoUpdate||i.object.updateMatrix(),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,m.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),m.set(0,0,0));let Xn=!1;if(i.zoomToCursor&&B){let Bt=null;if(i.object instanceof Xt&&i.object.isPerspectiveCamera){const Ln=j.length();Bt=W(Ln*p);const Sn=Ln-Bt;i.object.position.addScaledVector(R,Sn),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const Ln=new D(b.x,b.y,0);Ln.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),Xn=!0;const Sn=new D(b.x,b.y,0);Sn.unproject(i.object),i.object.position.sub(Sn).add(Ln),i.object.updateMatrixWorld(),Bt=j.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Bt!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Bt).add(i.object.position):(Up.origin.copy(i.object.position),Up.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Up.direction))u||8*(1-Ae.dot(i.object.quaternion))>u?(i.dispatchEvent(r),re.copy(i.object.position),Ae.copy(i.object.quaternion),Xn=!1,!0):!1}})(),this.connect=j=>{j===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=j,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Qe),i.domElement.addEventListener("pointerdown",At),i.domElement.addEventListener("pointercancel",se),i.domElement.addEventListener("wheel",be)},this.dispose=()=>{var j,xe,Oe,G,re,Ae;(j=i.domElement)==null||j.removeEventListener("contextmenu",Qe),(xe=i.domElement)==null||xe.removeEventListener("pointerdown",At),(Oe=i.domElement)==null||Oe.removeEventListener("pointercancel",se),(G=i.domElement)==null||G.removeEventListener("wheel",be),(re=i.domElement)==null||re.ownerDocument.removeEventListener("pointermove",O),(Ae=i.domElement)==null||Ae.ownerDocument.removeEventListener("pointerup",I),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",it)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const u=1e-6,h=new mA,d=new mA;let p=1;const m=new D,v=new pe,y=new pe,x=new pe,A=new pe,_=new pe,w=new pe,S=new pe,E=new pe,P=new pe,R=new D,b=new pe;let B=!1;const L=[],U={};function Z(){return 2*Math.PI/60/60*i.autoRotateSpeed}function V(){return Math.pow(.95,i.zoomSpeed)}function H(j){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=j:d.theta-=j}function K(j){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=j:d.phi-=j}const ie=(()=>{const j=new D;return function(Oe,G){j.setFromMatrixColumn(G,0),j.multiplyScalar(-Oe),m.add(j)}})(),ce=(()=>{const j=new D;return function(Oe,G){i.screenSpacePanning===!0?j.setFromMatrixColumn(G,1):(j.setFromMatrixColumn(G,0),j.crossVectors(i.object.up,j)),j.multiplyScalar(Oe),m.add(j)}})(),N=(()=>{const j=new D;return function(Oe,G){const re=i.domElement;if(re&&i.object instanceof Xt&&i.object.isPerspectiveCamera){const Ae=i.object.position;j.copy(Ae).sub(i.target);let Re=j.length();Re*=Math.tan(i.object.fov/2*Math.PI/180),ie(2*Oe*Re/re.clientHeight,i.object.matrix),ce(2*G*Re/re.clientHeight,i.object.matrix)}else re&&i.object instanceof pr&&i.object.isOrthographicCamera?(ie(Oe*(i.object.right-i.object.left)/i.object.zoom/re.clientWidth,i.object.matrix),ce(G*(i.object.top-i.object.bottom)/i.object.zoom/re.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function J(j){i.object instanceof Xt&&i.object.isPerspectiveCamera||i.object instanceof pr&&i.object.isOrthographicCamera?p/=j:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function Y(j){i.object instanceof Xt&&i.object.isPerspectiveCamera||i.object instanceof pr&&i.object.isOrthographicCamera?p*=j:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function le(j){if(!i.zoomToCursor||!i.domElement)return;B=!0;const xe=i.domElement.getBoundingClientRect(),Oe=j.clientX-xe.left,G=j.clientY-xe.top,re=xe.width,Ae=xe.height;b.x=Oe/re*2-1,b.y=-(G/Ae)*2+1,R.set(b.x,b.y,1).unproject(i.object).sub(i.object.position).normalize()}function W(j){return Math.max(i.minDistance,Math.min(i.maxDistance,j))}function ee(j){v.set(j.clientX,j.clientY)}function ve(j){le(j),S.set(j.clientX,j.clientY)}function ye(j){A.set(j.clientX,j.clientY)}function q(j){y.set(j.clientX,j.clientY),x.subVectors(y,v).multiplyScalar(i.rotateSpeed);const xe=i.domElement;xe&&(H(2*Math.PI*x.x/xe.clientHeight),K(2*Math.PI*x.y/xe.clientHeight)),v.copy(y),i.update()}function Fe(j){E.set(j.clientX,j.clientY),P.subVectors(E,S),P.y>0?J(V()):P.y<0&&Y(V()),S.copy(E),i.update()}function ke(j){_.set(j.clientX,j.clientY),w.subVectors(_,A).multiplyScalar(i.panSpeed),N(w.x,w.y),A.copy(_),i.update()}function He(j){le(j),j.deltaY<0?Y(V()):j.deltaY>0&&J(V()),i.update()}function _e(j){let xe=!1;switch(j.code){case i.keys.UP:N(0,i.keyPanSpeed),xe=!0;break;case i.keys.BOTTOM:N(0,-i.keyPanSpeed),xe=!0;break;case i.keys.LEFT:N(i.keyPanSpeed,0),xe=!0;break;case i.keys.RIGHT:N(-i.keyPanSpeed,0),xe=!0;break}xe&&(j.preventDefault(),i.update())}function Be(){if(L.length==1)v.set(L[0].pageX,L[0].pageY);else{const j=.5*(L[0].pageX+L[1].pageX),xe=.5*(L[0].pageY+L[1].pageY);v.set(j,xe)}}function fe(){if(L.length==1)A.set(L[0].pageX,L[0].pageY);else{const j=.5*(L[0].pageX+L[1].pageX),xe=.5*(L[0].pageY+L[1].pageY);A.set(j,xe)}}function oe(){const j=L[0].pageX-L[1].pageX,xe=L[0].pageY-L[1].pageY,Oe=Math.sqrt(j*j+xe*xe);S.set(0,Oe)}function Se(){i.enableZoom&&oe(),i.enablePan&&fe()}function Ue(){i.enableZoom&&oe(),i.enableRotate&&Be()}function Te(j){if(L.length==1)y.set(j.pageX,j.pageY);else{const Oe=Je(j),G=.5*(j.pageX+Oe.x),re=.5*(j.pageY+Oe.y);y.set(G,re)}x.subVectors(y,v).multiplyScalar(i.rotateSpeed);const xe=i.domElement;xe&&(H(2*Math.PI*x.x/xe.clientHeight),K(2*Math.PI*x.y/xe.clientHeight)),v.copy(y)}function qe(j){if(L.length==1)_.set(j.pageX,j.pageY);else{const xe=Je(j),Oe=.5*(j.pageX+xe.x),G=.5*(j.pageY+xe.y);_.set(Oe,G)}w.subVectors(_,A).multiplyScalar(i.panSpeed),N(w.x,w.y),A.copy(_)}function Ke(j){const xe=Je(j),Oe=j.pageX-xe.x,G=j.pageY-xe.y,re=Math.sqrt(Oe*Oe+G*G);E.set(0,re),P.set(0,Math.pow(E.y/S.y,i.zoomSpeed)),J(P.y),S.copy(E)}function je(j){i.enableZoom&&Ke(j),i.enablePan&&qe(j)}function xt(j){i.enableZoom&&Ke(j),i.enableRotate&&Te(j)}function At(j){var xe,Oe;i.enabled!==!1&&(L.length===0&&((xe=i.domElement)==null||xe.ownerDocument.addEventListener("pointermove",O),(Oe=i.domElement)==null||Oe.ownerDocument.addEventListener("pointerup",I)),rt(j),j.pointerType==="touch"?De(j):we(j))}function O(j){i.enabled!==!1&&(j.pointerType==="touch"?ge(j):Ce(j))}function I(j){var xe,Oe,G;We(j),L.length===0&&((xe=i.domElement)==null||xe.releasePointerCapture(j.pointerId),(Oe=i.domElement)==null||Oe.ownerDocument.removeEventListener("pointermove",O),(G=i.domElement)==null||G.ownerDocument.removeEventListener("pointerup",I)),i.dispatchEvent(o),l=a.NONE}function se(j){We(j)}function we(j){let xe;switch(j.button){case 0:xe=i.mouseButtons.LEFT;break;case 1:xe=i.mouseButtons.MIDDLE;break;case 2:xe=i.mouseButtons.RIGHT;break;default:xe=-1}switch(xe){case wa.DOLLY:if(i.enableZoom===!1)return;ve(j),l=a.DOLLY;break;case wa.ROTATE:if(j.ctrlKey||j.metaKey||j.shiftKey){if(i.enablePan===!1)return;ye(j),l=a.PAN}else{if(i.enableRotate===!1)return;ee(j),l=a.ROTATE}break;case wa.PAN:if(j.ctrlKey||j.metaKey||j.shiftKey){if(i.enableRotate===!1)return;ee(j),l=a.ROTATE}else{if(i.enablePan===!1)return;ye(j),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Ce(j){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;q(j);break;case a.DOLLY:if(i.enableZoom===!1)return;Fe(j);break;case a.PAN:if(i.enablePan===!1)return;ke(j);break}}function be(j){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(j.preventDefault(),i.dispatchEvent(s),He(j),i.dispatchEvent(o))}function it(j){i.enabled===!1||i.enablePan===!1||_e(j)}function De(j){switch($e(j),L.length){case 1:switch(i.touches.ONE){case Ma.ROTATE:if(i.enableRotate===!1)return;Be(),l=a.TOUCH_ROTATE;break;case Ma.PAN:if(i.enablePan===!1)return;fe(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case Ma.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Se(),l=a.TOUCH_DOLLY_PAN;break;case Ma.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ue(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function ge(j){switch($e(j),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;Te(j),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;qe(j),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;je(j),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;xt(j),i.update();break;default:l=a.NONE}}function Qe(j){i.enabled!==!1&&j.preventDefault()}function rt(j){L.push(j)}function We(j){delete U[j.pointerId];for(let xe=0;xe=2.0 are supported."));return}const l=new cV(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,s){i.parse(e,t,r,s)})}}function I9(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const Et={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class D9{constructor(e){this.parser=e,this.name=Et.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class J9{constructor(e){this.parser=e,this.name=Et.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class X9{constructor(e){this.parser=e,this.name=Et.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Y9{constructor(e){this.name=Et.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,u=r.byteLength||0,h=r.count,d=r.byteStride,p=new Uint8Array(a,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(h,d,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(h*d);return o.decodeGltfBuffer(new Uint8Array(m),h,d,p,r.mode,r.filter),m})})}else return null}}class K9{constructor(e){this.name=Et.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=t.meshes[i.mesh];for(const u of r.primitives)if(u.mode!==lr.TRIANGLES&&u.mode!==lr.TRIANGLE_STRIP&&u.mode!==lr.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const u in o)a.push(this.parser.getDependency("accessor",o[u]).then(h=>(l[u]=h,l[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(u=>{const h=u.pop(),d=h.isGroup?h.children:[h],p=u[0].count,m=[];for(const v of d){const y=new ot,x=new D,A=new Gn,_=new D(1,1,1),w=new l_(v.geometry,v.material,p);for(let S=0;S=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},co={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},nV={CUBICSPLINE:void 0,LINEAR:tl,STEP:Ic},yv={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function iV(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new Ph({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:os})),n.DefaultMaterial}function ya(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function go(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function rV(n,e,t){let i=!1,r=!1,s=!1;for(let u=0,h=e.length;u0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const lV=new ot;class cV{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new I9,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||r&&s<98?this.textureLoader=new Bh(this.options.manager):this.textureLoader=new C3(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Wi(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};ya(s,a,r),go(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[u,h]of o.children.entries())s(h,a.children[u])};return s(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&x.setY(B,P[R*l+1]),l>=3&&x.setZ(B,P[R*l+2]),l>=4&&x.setW(B,P[R*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return x})}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,i){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(t,i).then(function(h){h.flipY=!1,h.name=o.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return h.magFilter=JE[p.magFilter]||nn,h.minFilter=JE[p.minFilter]||as,h.wrapS=XE[p.wrapS]||ko,h.wrapT=XE[p.wrapT]||ko,r.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,t){const i=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(d){u=!0;const p=new Blob([d],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const h=Promise.resolve(l).then(function(d){return new Promise(function(p,m){let v=p;t.isImageBitmapLoader===!0&&(v=function(y){const x=new $t(y);x.needsUpdate=!0,p(x)}),t.load(rs.resolveURL(d,s.path),v,void 0,m)})}).then(function(d){return u===!0&&a.revokeObjectURL(l),d.userData.mimeType=o.mimeType||aV(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=h,h}assignTexture(e,t,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[Et.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[Et.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Et.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&("colorSpace"in o?o.colorSpace=r===3001?"srgb":"srgb-linear":o.encoding=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new gh,Mn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new ri,Mn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return Ph}loadMaterial(e){const t=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const a={},l=s.extensions||{},u=[];if(l[Et.KHR_MATERIALS_UNLIT]){const d=r[Et.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),u.push(d.extendParams(a,s,t))}else{const d=s.pbrMetallicRoughness||{};if(a.color=new Ie(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;a.color.fromArray(p),a.opacity=p[3]}d.baseColorTexture!==void 0&&u.push(t.assignTexture(a,"map",d.baseColorTexture,3001)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),u.push(t.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=Ir);const h=s.alphaMode||yv.OPAQUE;if(h===yv.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===yv.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==zi&&(u.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new pe(1,1),s.normalTexture.scale!==void 0)){const d=s.normalTexture.scale;a.normalScale.set(d,d)}return s.occlusionTexture!==void 0&&o!==zi&&(u.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==zi&&(a.emissive=new Ie().fromArray(s.emissiveFactor)),s.emissiveTexture!==void 0&&o!==zi&&u.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,3001)),Promise.all(u).then(function(){const d=new o(a);return s.name&&(d.name=s.name),go(d,s),t.associations.set(d,{materials:e}),s.extensions&&ya(r,d,s),d})}createUniqueName(e){const t=Pt.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[Et.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return YE(l,a,t)})}const o=[];for(let a=0,l=e.length;a0&&sV(A,s),A.name=t.createUniqueName(s.name||"mesh_"+e),go(A,s),x.extensions&&ya(r,A,x),t.assignFinalMaterial(A),d.push(A)}for(let m=0,v=d.length;m1?h=new Fs:u.length===1?h=u[0]:h=new bt,h!==u[0])for(let d=0,p=u.length;d{const d=new Map;for(const[p,m]of r.associations)(p instanceof Mn||p instanceof $t)&&d.set(p,m);return h.traverse(p=>{const m=r.associations.get(p);m!=null&&d.set(p,m)}),d};return r.associations=u(s),s})}}function uV(n,e,t){const i=e.attributes,r=new Xo;if(i.POSITION!==void 0){const a=t.json.accessors[i.POSITION],l=a.min,u=a.max;if(l!==void 0&&u!==void 0){if(r.set(new D(l[0],l[1],l[2]),new D(u[0],u[1],u[2])),a.normalized){const h=wA(wc[a.componentType]);r.min.multiplyScalar(h),r.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new D,l=new D;for(let u=0,h=s.length;u0,E=V>0,P=H>0,R=(S?1:0)+(E?1:0)+(P?1:0),R){case 0:{A.push(y[w]),A.push(y[w+1]),A.push(y[w+2]);break}case 1:{if(S&&(b=y[w+1],B=y[w+2],L=v(y[w],b,x,_),U=v(y[w],B,x,_)),E){b=y[w],B=y[w+2],L=v(y[w+1],b,x,_),U=v(y[w+1],B,x,_),A.push(L),A.push(B.clone()),A.push(b.clone()),A.push(B.clone()),A.push(L.clone()),A.push(U);break}P&&(b=y[w],B=y[w+1],L=v(y[w+2],b,x,_),U=v(y[w+2],B,x,_)),A.push(b.clone()),A.push(B.clone()),A.push(L),A.push(U),A.push(L.clone()),A.push(B.clone());break}case 2:{S||(b=y[w].clone(),B=v(b,y[w+1],x,_),L=v(b,y[w+2],x,_),A.push(b),A.push(B),A.push(L)),E||(b=y[w+1].clone(),B=v(b,y[w+2],x,_),L=v(b,y[w],x,_),A.push(b),A.push(B),A.push(L)),P||(b=y[w+2].clone(),B=v(b,y[w],x,_),L=v(b,y[w+1],x,_),A.push(b),A.push(B),A.push(L));break}}}return A}function v(y,x,A,_){const w=y.position.dot(A)-_,S=x.position.dot(A)-_,E=w/(w-S);return new KE(new D(y.position.x+E*(x.position.x-y.position.x),y.position.y+E*(x.position.y-y.position.y),y.position.z+E*(x.position.z-y.position.z)),new D(y.normal.x+E*(x.normal.x-y.normal.x),y.normal.y+E*(x.normal.y-y.normal.y),y.normal.z+E*(x.normal.z-y.normal.z)))}}}class KE{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const xv=new WeakMap;class hV extends yi{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,i,r){const s=new Wi(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,o=>{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(t).catch(r)},i,r)}decodeDracoFile(e,t,i,r){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i};this.decodeGeometry(e,s).then(t)}decodeGeometry(e,t){for(const l in t.attributeTypes){const u=t.attributeTypes[l];u.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[l]=u.name)}const i=JSON.stringify(t);if(xv.has(e)){const l=xv.get(e);if(l.key===i)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(l=>(r=l,new Promise((u,h)=>{r._callbacks[s]={resolve:u,reject:h},r.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return a.catch(()=>!0).then(()=>{r&&s&&this._releaseTask(r,s)}),xv.set(e,{key:i,promise:a}),a}_createGeometry(e){const t=new ft;e.index&&t.setIndex(new Ft(e.index.array,1));for(let i=0;i{i.load(e,r,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const s=dV.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(` `);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.lengths._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e{const d=h.draco,p=new d.Decoder,m=new d.DecoderBuffer;m.Init(new Int8Array(l),l.byteLength);try{const v=t(d,p,m,u),y=v.attributes.map(x=>x.array.buffer);v.index&&y.push(v.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:v},y)}catch(v){console.error(v),self.postMessage({type:"error",id:a.id,error:v.message})}finally{d.destroy(m),d.destroy(p)}});break}};function t(o,a,l,u){const h=u.attributeIDs,d=u.attributeTypes;let p,m;const v=a.GetEncodedGeometryType(l);if(v===o.TRIANGULAR_MESH)p=new o.Mesh,m=a.DecodeBufferToMesh(l,p);else if(v===o.POINT_CLOUD)p=new o.PointCloud,m=a.DecodeBufferToPointCloud(l,p);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!m.ok()||p.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+m.error_msg());const y={index:null,attributes:[]};for(const x in h){const A=self[d[x]];let _,w;if(u.useUniqueIDs)w=h[x],_=a.GetAttributeByUniqueId(p,w);else{if(w=a.GetAttributeId(p,o[h[x]]),w===-1)continue;_=a.GetAttribute(p,w)}y.attributes.push(r(o,a,p,x,A,_))}return v===o.TRIANGULAR_MESH&&(y.index=i(o,a,p)),o.destroy(p),y}function i(o,a,l){const h=l.num_faces()*3,d=h*4,p=o._malloc(d);a.GetTrianglesUInt32Array(l,d,p);const m=new Uint32Array(o.HEAPF32.buffer,p,h).slice();return o._free(p),{array:m,itemSize:1}}function r(o,a,l,u,h,d){const p=d.num_components(),v=l.num_points()*p,y=v*h.BYTES_PER_ELEMENT,x=s(o,h),A=o._malloc(y);a.GetAttributeDataArrayForAllPoints(l,d,x,y,A);const _=new h(o.HEAPF32.buffer,A,v).slice();return o._free(A),{name:u,array:_,itemSize:p}}function s(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let zp;const Av=()=>{if(zp)return zp;const n="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",e="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",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let r=n;WebAssembly.validate(t)&&(r=e);let s;const o=WebAssembly.instantiate(a(r),{}).then(d=>{s=d.instance,s.exports.__wasm_call_ctors()});function a(d){const p=new Uint8Array(d.length);for(let v=0;v96?y-71:y>64?y-65:y>47?y+4:y>46?63:62}let m=0;for(let v=0;vn===Object(n)&&!Array.isArray(n)&&typeof n!="function";function k_(n,e){const t=Oi(r=>r.gl),i=Zo(Bh,QE(n)?Object.values(n):n);if(z.useLayoutEffect(()=>{e==null||e(i)},[e]),z.useEffect(()=>{"initTexture"in t&&(Array.isArray(i)?i:[i]).forEach(t.initTexture)},[t,i]),QE(n)){const r={};let s=0;for(const o in n)r[o]=i[s++];return r}else return i}k_.preload=n=>Zo.preload(Bh,n);k_.clear=n=>Zo.clear(Bh,n);const pV=()=>parseInt(Jc.replace(/\D+/g,"")),iR=pV();function mV(n){return Array.isArray(n)}function _v(n=[0,0,0]){return mV(n)?n:n instanceof D||n instanceof ol?[n.x,n.y,n.z]:[n,n,n]}const gV=z.forwardRef(function({debug:e,depthTest:t=!1,polygonOffsetFactor:i=-10,map:r,mesh:s,children:o,position:a,rotation:l,scale:u,...h},d){const p=z.useRef(null);z.useImperativeHandle(d,()=>p.current);const m=z.useRef(null);return z.useLayoutEffect(()=>{const v=(s==null?void 0:s.current)||p.current.parent,y=p.current;if(!(v instanceof Pn))throw new Error('Decal must have a Mesh as parent or specify its "mesh" prop');const x={position:new D,rotation:new ol,scale:new D(1,1,1)};if(v){$r(x,{position:a,scale:u});const A=v.matrixWorld.clone();if(v.matrixWorld.identity(),!l||typeof l=="number"){const _=new bt;_.position.copy(x.position),_.lookAt(v.position),typeof l=="number"&&_.rotateZ(l),$r(x,{rotation:_.rotation})}else $r(x,{rotation:l});return y.geometry=new fV(v,x.position,x.rotation,x.scale),m.current&&($r(m.current,x),m.current.traverse(_=>_.raycast=()=>null)),v.matrixWorld=A,()=>{y.geometry.dispose()}}},[s,..._v(a),..._v(u),..._v(l)]),z.createElement("mesh",xr({ref:p,"material-transparent":!0,"material-polygonOffset":!0,"material-polygonOffsetFactor":i,"material-depthTest":t,"material-map":r},h),o,e&&z.createElement("mesh",{ref:m},z.createElement("boxGeometry",null),z.createElement("meshNormalMaterial",{wireframe:!0}),z.createElement("axesHelper",null)))});let Gp=null,rR="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function sR(n,e,t){return i=>{t&&t(i),n&&(Gp||(Gp=new hV),Gp.setDecoderPath(typeof n=="string"?n:rR),i.setDRACOLoader(Gp)),e&&i.setMeshoptDecoder(typeof Av=="function"?Av():Av)}}function Ih(n,e=!0,t=!0,i){return Zo(N_,n,sR(e,t,i))}Ih.preload=(n,e=!0,t=!0,i)=>Zo.preload(N_,n,sR(e,t,i));Ih.clear=n=>Zo.clear(N_,n);Ih.setDecoderPath=n=>{rR=n};const O_=z.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:l,...u},h)=>{const d=Oi(P=>P.invalidate),p=Oi(P=>P.camera),m=Oi(P=>P.gl),v=Oi(P=>P.events),y=Oi(P=>P.setEvents),x=Oi(P=>P.set),A=Oi(P=>P.get),_=Oi(P=>P.performance),w=e||p,S=i||v.connected||m.domElement,E=z.useMemo(()=>new L9(w),[w]);return tu(()=>{E.enabled&&E.update()},-1),z.useEffect(()=>(s&&E.connect(s===!0?S:s),E.connect(S),()=>void E.dispose()),[s,S,t,E,d]),z.useEffect(()=>{const P=B=>{d(),t&&_.regress(),o&&o(B)},R=B=>{a&&a(B)},b=B=>{l&&l(B)};return E.addEventListener("change",P),E.addEventListener("start",R),E.addEventListener("end",b),()=>{E.removeEventListener("start",R),E.removeEventListener("end",b),E.removeEventListener("change",P)}},[o,a,l,E,d,y]),z.useEffect(()=>{if(n){const P=A().controls;return x({controls:E}),()=>x({controls:P})}},[n,E]),z.createElement("primitive",xr({ref:h,object:E,enableDamping:r},u))});var oR={exports:{}},yV="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vV=yV,xV=vV;function aR(){}function lR(){}lR.resetWarningCache=aR;var AV=function(){function n(i,r,s,o,a,l){if(l!==xV){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}n.isRequired=n;function e(){return n}var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:lR,resetWarningCache:aR};return t.PropTypes=t,t};oR.exports=AV();var cR=oR.exports;const wv=iR>=154?"opaque_fragment":"output_fragment";class _V extends gh{constructor(e){super(e),this.onBeforeCompile=(t,i)=>{const{isWebGL2:r}=i.capabilities;t.fragmentShader=t.fragmentShader.replace(`#include <${wv}>`,` ${r?`#include <${wv}>`:`#extension GL_OES_standard_derivatives : enable #include <${wv}>`} @@ -3287,8 +3287,8 @@ No matching component was found for: gl_FragColor = vec4(gl_FragColor.rgb, mask * gl_FragColor.a ); #include #include <${iR>=154?"colorspace_fragment":"encodings_fragment"}> - `)}}}const wV=z.forwardRef((n,e)=>{const[t]=z.useState(()=>new _V(null));return z.createElement("primitive",xr({},n,{object:t,ref:e,attach:"material"}))}),MV=z.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=z.useRef(null),u=z.useRef(Math.random()*1e4);return tu(h=>{var d,p;if(!e||t===0)return;const m=u.current+h.clock.getElapsedTime();l.current.rotation.x=Math.cos(m/4*t)/8*i,l.current.rotation.y=Math.sin(m/4*t)/8*i,l.current.rotation.z=Math.sin(m/4*t)/20*i;let v=Math.sin(m/4*t)/10;v=K1.mapLinear(v,-.1,.1,(d=s==null?void 0:s[0])!==null&&d!==void 0?d:-.1,(p=s==null?void 0:s[1])!==null&&p!==void 0?p:.1),l.current.position.y=v*r,l.current.updateMatrix()}),z.createElement("group",o,z.createElement("group",{ref:F_([l,a]),matrixAutoUpdate:!1},n))});let va,Xu;const SV=z.createContext(null),ZE=new ot,qE=new D,CV=z.forwardRef(({children:n,range:e,limit:t=1e3,...i},r)=>{const s=z.useRef(null),[o,a]=z.useState([]),[[l,u,h]]=z.useState(()=>[new Float32Array(t*3),Float32Array.from({length:t*3},()=>1),Float32Array.from({length:t},()=>1)]);z.useEffect(()=>{s.current.geometry.attributes.position.needsUpdate=!0}),tu(()=>{for(s.current.updateMatrix(),s.current.updateMatrixWorld(),ZE.copy(s.current.matrixWorld).invert(),s.current.geometry.drawRange.count=Math.min(t,e!==void 0?e:t,o.length),va=0;va({getParent:()=>s,subscribe:p=>(a(m=>[...m,p]),()=>a(m=>m.filter(v=>v.current!==p.current)))}),[]);return z.createElement("points",xr({userData:{instances:o},matrixAutoUpdate:!1,ref:F_([r,s]),raycast:()=>null},i),z.createElement("bufferGeometry",null,z.createElement("bufferAttribute",{attach:"attributes-position",count:l.length/3,array:l,itemSize:3,usage:Wa}),z.createElement("bufferAttribute",{attach:"attributes-color",count:u.length/3,array:u,itemSize:3,usage:Wa}),z.createElement("bufferAttribute",{attach:"attributes-size",count:h.length,array:h,itemSize:1,usage:Wa})),z.createElement(SV.Provider,{value:d},n))}),EV=z.forwardRef(({children:n,positions:e,colors:t,sizes:i,stride:r=3,...s},o)=>{const a=z.useRef(null);return tu(()=>{const l=a.current.geometry.attributes;l.position.needsUpdate=!0,t&&(l.color.needsUpdate=!0),i&&(l.size.needsUpdate=!0)}),z.createElement("points",xr({ref:F_([o,a])},s),z.createElement("bufferGeometry",null,z.createElement("bufferAttribute",{attach:"attributes-position",count:e.length/r,array:e,itemSize:r,usage:Wa}),t&&z.createElement("bufferAttribute",{attach:"attributes-color",count:t.length/r,array:t,itemSize:3,usage:Wa}),i&&z.createElement("bufferAttribute",{attach:"attributes-size",count:i.length/r,array:i,itemSize:1,usage:Wa})),n)}),bV=z.forwardRef((n,e)=>n.positions instanceof Float32Array?z.createElement(EV,xr({},n,{ref:e})):z.createElement(CV,xr({},n,{ref:e})));function Ug({all:n,scene:e,camera:t}){const i=Oi(({gl:o})=>o),r=Oi(({camera:o})=>o),s=Oi(({scene:o})=>o);return z.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(u=>{u.visible===!1&&(o.push(u),u.visible=!0)}),i.compile(e||s,t||r);const a=new t_(128);new e_(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(u=>u.visible=!1)},[]),null}const U_=()=>{const{progress:n}=b9();return et(E9,{as:"div",center:!0,style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[fe("span",{className:"canvas-loader"}),et("p",{style:{fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40},children:[n.toFixed(2),"%"]})]})},TV=()=>{const n=Ih("./planet/scene.gltf");return fe("primitive",{object:n.scene,scale:2.5,"position-y":0,"rotation-y":0})},PV=()=>fe(Og,{shadows:!0,frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},camera:{fov:45,near:.1,far:200,position:[-4,3,6]},children:et(z.Suspense,{fallback:fe(U_,{}),children:[fe(O_,{autoRotate:!0,enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),fe(TV,{}),fe(Ug,{all:!0})]})}),BV=n=>{const[e]=k_([n.imgUrl]);return et(MV,{speed:1.75,rotationIntensity:1,floatIntensity:2,children:[fe("ambientLight",{intensity:.25}),fe("directionalLight",{position:[0,0,.05]}),et("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[fe("icosahedronGeometry",{args:[1,1]}),fe("meshStandardMaterial",{color:"#fff8eb",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),fe(gV,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},RV=({icon:n})=>et(Og,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[et(z.Suspense,{fallback:fe(U_,{}),children:[fe(O_,{enableZoom:!1}),fe(BV,{imgUrl:n})]}),fe(Ug,{all:!0})]}),LV=({isMobile:n})=>{const e=Ih("./desktop_pc/scene.gltf");return et("mesh",{children:[fe("hemisphereLight",{intensity:.15,groundColor:"black"}),fe("spotLight",{position:[-20,50,10],angle:.12,penumbra:1,intensity:1,castShadow:!0,"shadow-mapSize":1024}),fe("pointLight",{intensity:1}),fe("primitive",{object:e.scene,scale:n?.7:.75,position:n?[0,-3,-2.2]:[0,-3.25,-1.5],rotation:[-.01,-.2,-.1]})]})},IV=()=>{const[n,e]=z.useState(!1);return z.useEffect(()=>{const t=window.matchMedia("(max-width: 500px)");e(t.matches);const i=r=>{e(r.matches)};return t.addEventListener("change",i),()=>{t.removeEventListener("change",i)}},[]),et(Og,{frameloop:"demand",shadows:!0,dpr:[1,2],camera:{position:[20,3,5],fov:25},gl:{preserveDrawingBuffer:!0},children:[et(z.Suspense,{fallback:fe(U_,{}),children:[fe(O_,{enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),fe(LV,{isMobile:n})]}),fe(Ug,{all:!0})]})};function Mc(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function $E(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function eb(n){for(var e=1;e0&&e<1&&(e*=65536),e=Math.floor(e),e<256&&(e|=e<<8);for(var t=0;t<256;t++){var i;t&1?i=tb[t]^e&255:i=tb[t]^e>>8&255,nb[t]=nb[t+256]=i,ib[t]=ib[t+256]=DV[i%12]}};FV(0);function NV(n){if(typeof n=="number")n=Math.abs(n);else if(typeof n=="string"){var e=n;n=0;for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:OV,i=eb(eb({},UV),e),r=i.radius,s=i.center,o=0;o{const e=z.useRef(),[t]=z.useState(()=>zV(new Float32Array(5e3),{radius:1.2}));return tu((i,r)=>{e.current.rotation.x-=r/10,e.current.rotation.y-=r/15}),fe("group",{rotation:[0,0,Math.PI/4],children:fe(bV,{ref:e,positions:t,stride:3,frustumCulled:!0,...n,children:fe(wV,{transparent:!0,color:"#f272c8",size:.002,sizeAttenuation:!0,depthWrite:!1})})})},HV=()=>fe("div",{className:"w-full h-auto absolute inset-0 z-[-1]",children:et(Og,{camera:{position:[0,0,1]},children:[fe(z.Suspense,{fallback:null,children:fe(GV,{})}),fe(Ug,{all:!0})]})}),fR=z.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),zg=z.createContext({});function VV(){return z.useContext(zg).visualElement}const z_=z.createContext(null),Gg=typeof document<"u",sb=Gg?z.useLayoutEffect:z.useEffect,hR=z.createContext({strict:!1});function WV(n,e,t,i){const r=VV(),s=z.useContext(hR),o=z.useContext(z_),a=z.useContext(fR).reducedMotion,l=z.useRef();i=i||s.renderer,!l.current&&i&&(l.current=i(n,{visualState:e,parent:r,props:t,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;return z.useInsertionEffect(()=>{u&&u.update(t,o)}),sb(()=>{u&&u.render()}),z.useEffect(()=>{u&&u.updateFeatures()}),(window.HandoffAppearAnimations?sb:z.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),u}function fc(n){return typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function jV(n,e,t){return z.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):fc(t)&&(t.current=i))},[e])}function $f(n){return typeof n=="string"||Array.isArray(n)}function Hg(n){return typeof n=="object"&&typeof n.start=="function"}const G_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],H_=["initial",...G_];function Vg(n){return Hg(n.animate)||H_.some(e=>$f(n[e]))}function dR(n){return!!(Vg(n)||n.variants)}function JV(n,e){if(Vg(n)){const{initial:t,animate:i}=n;return{initial:t===!1||$f(t)?t:void 0,animate:$f(i)?i:void 0}}return n.inherit!==!1?e:{}}function XV(n){const{initial:e,animate:t}=JV(n,z.useContext(zg));return z.useMemo(()=>({initial:e,animate:t}),[ob(e),ob(t)])}function ob(n){return Array.isArray(n)?n.join(" "):n}const ab={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},eh={};for(const n in ab)eh[n]={isEnabled:e=>ab[n].some(t=>!!e[t])};function YV(n){for(const e in n)eh[e]={...eh[e],...n[e]}}function pR(n){const e=z.useRef(null);return e.current===null&&(e.current=n()),e.current}const yf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let KV=1;function QV(){return pR(()=>{if(yf.hasEverUpdated)return KV++})}const mR=z.createContext({}),gR=z.createContext({}),ZV=Symbol.for("motionComponentSymbol");function qV({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&YV(n);function s(a,l){let u;const h={...z.useContext(fR),...a,layoutId:$V(a)},{isStatic:d}=h,p=XV(a),m=d?void 0:QV(),v=i(a,d);if(!d&&Gg){p.visualElement=WV(r,v,h,e);const y=z.useContext(gR),x=z.useContext(hR).strict;p.visualElement&&(u=p.visualElement.loadFeatures(h,x,n,m,y))}return z.createElement(zg.Provider,{value:p},u&&p.visualElement?z.createElement(u,{visualElement:p.visualElement,...h}):null,t(r,a,m,jV(v,p.visualElement,l),v,d,p.visualElement))}const o=z.forwardRef(s);return o[ZV]=r,o}function $V({layoutId:n}){const e=z.useContext(mR).id;return e&&n!==void 0?e+"-"+n:n}function e8(n){function e(i,r={}){return qV(n(i,r))}if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(e,{get:(i,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}const t8=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function V_(n){return typeof n!="string"||n.includes("-")?!1:!!(t8.indexOf(n)>-1||/[A-Z]/.test(n))}const Xm={};function n8(n){Object.assign(Xm,n)}const Wg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fl=new Set(Wg);function yR(n,{layout:e,layoutId:t}){return fl.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!Xm[n]||n==="opacity")}const Pi=n=>!!(n&&n.getVelocity),i8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},r8=Wg.length;function s8(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),xR=vR("--"),MA=vR("var(--"),o8=(n,e)=>e&&typeof n=="number"?e.transform(n):n,Gc=(n,e,t)=>Math.min(Math.max(t,n),e),hl={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},vf={...hl,transform:n=>Gc(0,1,n)},Hp={...hl,default:1},xf=n=>Math.round(n*1e5)/1e5,th=/(-)?([\d]*\.?[\d])+/g,SA=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,a8=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dh(n){return typeof n=="string"}const Fh=n=>({test:e=>Dh(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),ho=Fh("deg"),ss=Fh("%"),st=Fh("px"),l8=Fh("vh"),c8=Fh("vw"),lb={...ss,parse:n=>ss.parse(n)/100,transform:n=>ss.transform(n*100)},cb={...hl,transform:Math.round},AR={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,size:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,rotate:ho,rotateX:ho,rotateY:ho,rotateZ:ho,scale:Hp,scaleX:Hp,scaleY:Hp,scaleZ:Hp,skew:ho,skewX:ho,skewY:ho,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:vf,originX:lb,originY:lb,originZ:st,zIndex:cb,fillOpacity:vf,strokeOpacity:vf,numOctaves:cb};function W_(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let l=!1,u=!1,h=!0;for(const d in e){const p=e[d];if(xR(d)){s[d]=p;continue}const m=AR[d],v=o8(p,m);if(fl.has(d)){if(l=!0,o[d]=v,!h)continue;p!==(m.default||0)&&(h=!1)}else d.startsWith("origin")?(u=!0,a[d]=v):r[d]=v}if(e.transform||(l||i?r.transform=s8(n.transform,t,h,i):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:p="50%",originZ:m=0}=a;r.transformOrigin=`${d} ${p} ${m}`}}const j_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _R(n,e,t){for(const i in e)!Pi(e[i])&&!yR(i,t)&&(n[i]=e[i])}function u8({transformTemplate:n},e,t){return z.useMemo(()=>{const i=j_();return W_(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function f8(n,e,t){const i=n.style||{},r={};return _R(r,i,n),Object.assign(r,u8(n,e,t)),n.transformValues?n.transformValues(r):r}function h8(n,e,t){const i={},r=f8(n,e,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=r,i}const d8=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Ym(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||d8.has(n)}let wR=n=>!Ym(n);function p8(n){n&&(wR=e=>e.startsWith("on")?!Ym(e):n(e))}try{p8(require("@emotion/is-prop-valid").default)}catch{}function m8(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(wR(r)||t===!0&&Ym(r)||!e&&!Ym(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function ub(n,e,t){return typeof n=="string"?n:st.transform(e+t*n)}function g8(n,e,t){const i=ub(e,n.x,n.width),r=ub(t,n.y,n.height);return`${i} ${r}`}const y8={offset:"stroke-dashoffset",array:"stroke-dasharray"},v8={offset:"strokeDashoffset",array:"strokeDasharray"};function x8(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?y8:v8;n[s.offset]=st.transform(-i);const o=st.transform(e),a=st.transform(t);n[s.array]=`${o} ${a}`}function J_(n,{attrX:e,attrY:t,originX:i,originY:r,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},u,h,d){if(W_(n,l,u,d),h){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:p,style:m,dimensions:v}=n;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(i!==void 0||r!==void 0||m.transform)&&(m.transformOrigin=g8(v,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(p.x=e),t!==void 0&&(p.y=t),s!==void 0&&x8(p,s,o,a,!1)}const MR=()=>({...j_(),attrs:{}}),X_=n=>typeof n=="string"&&n.toLowerCase()==="svg";function A8(n,e,t,i){const r=z.useMemo(()=>{const s=MR();return J_(s,e,{enableHardwareAcceleration:!1},X_(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};_R(s,n.style,n),r.style={...s,...r.style}}return r}function _8(n=!1){return(t,i,r,s,{latestValues:o},a)=>{const u=(V_(t)?A8:h8)(i,o,a,t),d={...m8(i,typeof t=="string",n),...u,ref:s},{children:p}=i,m=z.useMemo(()=>Pi(p)?p.get():p,[p]);return r&&(d["data-projection-id"]=r),z.createElement(t,{...d,children:m})}}const Y_=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function SR(n,{style:e,vars:t},i,r){Object.assign(n.style,e,r&&r.getProjectionStyles(i));for(const s in t)n.style.setProperty(s,t[s])}const CR=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ER(n,e,t,i){SR(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(CR.has(r)?r:Y_(r),e.attrs[r])}function K_(n,e){const{style:t}=n,i={};for(const r in t)(Pi(t[r])||e.style&&Pi(e.style[r])||yR(r,n))&&(i[r]=t[r]);return i}function bR(n,e){const t=K_(n,e);for(const i in n)if(Pi(n[i])||Pi(e[i])){const r=i==="x"||i==="y"?"attr"+i.toUpperCase():i;t[r]=n[i]}return t}function Q_(n,e,t,i={},r={}){return typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),e}const Km=n=>Array.isArray(n),w8=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),M8=n=>Km(n)?n[n.length-1]||0:n;function pm(n){const e=Pi(n)?n.get():n;return w8(e)?e.toValue():e}function S8({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:C8(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const TR=n=>(e,t)=>{const i=z.useContext(zg),r=z.useContext(z_),s=()=>S8(n,e,i,r);return t?s():pR(s)};function C8(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=pm(s[p]);let{initial:o,animate:a}=n;const l=Vg(n),u=dR(n);e&&u&&!l&&n.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let h=t?t.initial===!1:!1;h=h||o===!1;const d=h?a:o;return d&&typeof d!="boolean"&&!Hg(d)&&(Array.isArray(d)?d:[d]).forEach(m=>{const v=Q_(n,m);if(!v)return;const{transitionEnd:y,transition:x,...A}=v;for(const _ in A){let w=A[_];if(Array.isArray(w)){const S=h?w.length-1:0;w=w[S]}w!==null&&(r[_]=w)}for(const _ in y)r[_]=y[_]}),r}const E8={useVisualState:TR({scrapeMotionValuesFromProps:bR,createRenderState:MR,onMount:(n,e,{renderState:t,latestValues:i})=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}J_(t,i,{enableHardwareAcceleration:!1},X_(e.tagName),n.transformTemplate),ER(e,t)}})},b8={useVisualState:TR({scrapeMotionValuesFromProps:K_,createRenderState:j_})};function T8(n,{forwardMotionProps:e=!1},t,i){return{...V_(n)?E8:b8,preloadedFeatures:t,useRender:_8(e),createVisualElement:i,Component:n}}function Ns(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const PR=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function jg(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const P8=n=>e=>PR(e)&&n(e,jg(e));function Us(n,e,t,i){return Ns(n,e,P8(t),i)}const B8=(n,e)=>t=>e(n(t)),Lo=(...n)=>n.reduce(B8);function BR(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const fb=BR("dragHorizontal"),hb=BR("dragVertical");function RR(n){let e=!1;if(n==="y")e=hb();else if(n==="x")e=fb();else{const t=fb(),i=hb();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function LR(){const n=RR(!0);return n?(n(),!1):!0}class qo{constructor(e){this.isMounted=!1,this.node=e}update(){}}function db(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.type==="touch"||LR())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&a[i](s,o)};return Us(n.current,t,r,{passive:!n.getProps()[i]})}class R8 extends qo{mount(){this.unmount=Lo(db(this.node,!0),db(this.node,!1))}unmount(){}}class L8 extends qo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Lo(Ns(this.node.current,"focus",()=>this.onFocus()),Ns(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const IR=(n,e)=>e?n===e?!0:IR(n,e.parentElement):!1,gr=n=>n;function Mv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,jg(t))}class I8 extends qo{constructor(){super(...arguments),this.removeStartListeners=gr,this.removeEndListeners=gr,this.removeAccessibleListeners=gr,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const i=this.node.getProps(),s=Us(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:h}=this.node.getProps();IR(this.node.current,a.target)?u&&u(a,l):h&&h(a,l)},{passive:!(i.onTap||i.onPointerUp)}),o=Us(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Lo(s,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Mv("up",this.node.getProps().onTap)};this.removeEndListeners(),this.removeEndListeners=Ns(this.node.current,"keyup",o),Mv("down",(a,l)=>{this.startPress(a,l)})},t=Ns(this.node.current,"keydown",e),i=()=>{this.isPressing&&Mv("cancel",(s,o)=>this.cancelPress(s,o))},r=Ns(this.node.current,"blur",i);this.removeAccessibleListeners=Lo(t,r)}}startPress(e,t){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&i(e,t)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!LR()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&i(e,t)}mount(){const e=this.node.getProps(),t=Us(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Ns(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Lo(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const CA=new WeakMap,Sv=new WeakMap,D8=n=>{const e=CA.get(n.target);e&&e(n)},F8=n=>{n.forEach(D8)};function N8({root:n,...e}){const t=n||document;Sv.has(t)||Sv.set(t,{});const i=Sv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(F8,{root:n,...e})),i[r]}function k8(n,e,t){const i=N8(e);return CA.set(n,t),i.observe(n),()=>{CA.delete(n),i.unobserve(n)}}const O8={some:0,all:1};class U8 extends qo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:e}=this.node.getProps();e&&e(null),this.node.animationState&&this.node.animationState.setActive("whileInView",!0)})}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:r="some",once:s,fallback:o=!0}=e;if(typeof IntersectionObserver>"u"){o&&this.viewportFallback();return}const a={root:t?t.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:O8[r]},l=u=>{const{isIntersecting:h}=u;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),m=h?d:p;m&&m(u)};return k8(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(z8(e,t))&&this.startObserver()}unmount(){}}function z8({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const G8={inView:{Feature:U8},tap:{Feature:I8},focus:{Feature:L8},hover:{Feature:R8}};function DR(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let i=0;i/^\-?\d*\.?\d+$/.test(n),V8=n=>/^0[^.\s]+$/.test(n),zs={delta:0,timestamp:0},FR=1/60*1e3,W8=typeof performance<"u"?()=>performance.now():()=>Date.now(),NR=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(W8()),FR);function j8(n){let e=[],t=[],i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,u=!1,h=!1)=>{const d=h&&r,p=d?e:t;return u&&o.add(l),p.indexOf(l)===-1&&(p.push(l),d&&r&&(i=e.length)),l},cancel:l=>{const u=t.indexOf(l);u!==-1&&t.splice(u,1),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let u=0;u(n[e]=j8(()=>nh=!0),n),{}),pi=Nh.reduce((n,e)=>{const t=Jg[e];return n[e]=(i,r=!1,s=!1)=>(nh||Y8(),t.schedule(i,r,s)),n},{}),Go=Nh.reduce((n,e)=>(n[e]=Jg[e].cancel,n),{}),Cv=Nh.reduce((n,e)=>(n[e]=()=>Jg[e].process(zs),n),{}),X8=n=>Jg[n].process(zs),kR=n=>{nh=!1,zs.delta=EA?FR:Math.max(Math.min(n-zs.timestamp,J8),1),zs.timestamp=n,bA=!0,Nh.forEach(X8),bA=!1,nh&&(EA=!1,NR(kR))},Y8=()=>{nh=!0,EA=!0,bA||NR(kR)};function Z_(n,e){n.indexOf(e)===-1&&n.push(e)}function q_(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class $_{constructor(){this.subscriptions=[]}add(e){return Z_(this.subscriptions,e),()=>q_(this.subscriptions,e)}notify(e,t,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,i);else for(let s=0;s!isNaN(parseFloat(n));class Q8{constructor(e,t={}){this.version="9.1.7",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,r=!0)=>{this.prev=this.current,this.current=i;const{delta:s,timestamp:o}=zs;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,pi.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>pi.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=K8(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new $_);const i=this.events[e].add(t);return e==="change"?()=>{i(),pi.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,i){this.set(t),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ew(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hc(n,e){return new Q8(n,e)}const tw=(n,e)=>t=>!!(Dh(t)&&a8.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),OR=(n,e,t)=>i=>{if(!Dh(i))return i;const[r,s,o,a]=i.match(th);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Z8=n=>Gc(0,255,n),Ev={...hl,transform:n=>Math.round(Z8(n))},Ua={test:tw("rgb","red"),parse:OR("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Ev.transform(n)+", "+Ev.transform(e)+", "+Ev.transform(t)+", "+xf(vf.transform(i))+")"};function q8(n){let e="",t="",i="",r="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),i=n.substring(5,7),r=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),i=n.substring(3,4),r=n.substring(4,5),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const TA={test:tw("#"),parse:q8,transform:Ua.transform},hc={test:tw("hsl","hue"),parse:OR("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+ss.transform(xf(e))+", "+ss.transform(xf(t))+", "+xf(vf.transform(i))+")"},ui={test:n=>Ua.test(n)||TA.test(n)||hc.test(n),parse:n=>Ua.test(n)?Ua.parse(n):hc.test(n)?hc.parse(n):TA.parse(n),transform:n=>Dh(n)?n:n.hasOwnProperty("red")?Ua.transform(n):hc.transform(n)},UR="${c}",zR="${n}";function $8(n){var e,t;return isNaN(n)&&Dh(n)&&(((e=n.match(th))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(SA))===null||t===void 0?void 0:t.length)||0)>0}function Qm(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0,i=0;const r=n.match(SA);r&&(t=r.length,n=n.replace(SA,UR),e.push(...r.map(ui.parse)));const s=n.match(th);return s&&(i=s.length,n=n.replace(th,zR),e.push(...s.map(hl.parse))),{values:e,numColors:t,numNumbers:i,tokenised:n}}function GR(n){return Qm(n).values}function HR(n){const{values:e,numColors:t,tokenised:i}=Qm(n),r=e.length;return s=>{let o=i;for(let a=0;atypeof n=="number"?0:n;function t6(n){const e=GR(n);return HR(n)(e.map(e6))}const Ho={test:$8,parse:GR,createTransformer:HR,getAnimatableNone:t6},n6=new Set(["brightness","contrast","saturate","opacity"]);function i6(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(th)||[];if(!i)return n;const r=t.replace(i,"");let s=n6.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const r6=/([a-z-]*)\(.*?\)/g,PA={...Ho,getAnimatableNone:n=>{const e=n.match(r6);return e?e.map(i6).join(" "):n}},s6={...AR,color:ui,backgroundColor:ui,outlineColor:ui,fill:ui,stroke:ui,borderColor:ui,borderTopColor:ui,borderRightColor:ui,borderBottomColor:ui,borderLeftColor:ui,filter:PA,WebkitFilter:PA},nw=n=>s6[n];function iw(n,e){let t=nw(n);return t!==PA&&(t=Ho),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const VR=n=>e=>e.test(n),o6={test:n=>n==="auto",parse:n=>n},WR=[hl,st,ss,ho,c8,l8,o6],Yu=n=>WR.find(VR(n)),a6=[...WR,ui,Ho],l6=n=>a6.find(VR(n));function c6(n){const e={};return n.values.forEach((t,i)=>e[i]=t.get()),e}function u6(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function Xg(n,e,t){const i=n.getProps();return Q_(i,e,t!==void 0?t:i.custom,c6(n),u6(n))}function f6(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,Hc(t))}function h6(n,e){const t=Xg(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=M8(s[o]);f6(n,o,a)}}function d6(n,e,t){var i,r;const s=Object.keys(e).filter(a=>!n.hasValue(a)),o=s.length;if(o)for(let a=0;an*1e3,x6={current:!1},rw=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,sw=n=>e=>1-n(1-e),ow=n=>n*n,A6=sw(ow),aw=rw(ow),sn=(n,e,t)=>-t*n+t*e+n;function bv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function _6({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=bv(l,a,n+1/3),s=bv(l,a,n),o=bv(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const Tv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},w6=[TA,Ua,hc],M6=n=>w6.find(e=>e.test(n));function pb(n){const e=M6(n);let t=e.parse(n);return e===hc&&(t=_6(t)),t}const jR=(n,e)=>{const t=pb(n),i=pb(e),r={...t};return s=>(r.red=Tv(t.red,i.red,s),r.green=Tv(t.green,i.green,s),r.blue=Tv(t.blue,i.blue,s),r.alpha=sn(t.alpha,i.alpha,s),Ua.transform(r))};function JR(n,e){return typeof n=="number"?t=>sn(n,e,t):ui.test(n)?jR(n,e):YR(n,e)}const XR=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>JR(s,e[o]));return s=>{for(let o=0;o{const t={...n,...e},i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=JR(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},YR=(n,e)=>{const t=Ho.createTransformer(e),i=Qm(n),r=Qm(e);return i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?Lo(XR(i.values,r.values),t):o=>`${o>0?e:n}`},ih=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},mb=(n,e)=>t=>sn(n,e,t);function C6(n){return typeof n=="number"?mb:typeof n=="string"?ui.test(n)?jR:YR:Array.isArray(n)?XR:typeof n=="object"?S6:mb}function E6(n,e,t){const i=[],r=t||C6(n[0]),s=n.length-1;for(let o=0;on[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const o=E6(e,i,r),a=o.length,l=u=>{let h=0;if(a>1)for(;hl(Gc(n[0],n[s-1],u)):l}function b6(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=ih(0,e,i);n.push(sn(t,1,r))}}function T6(n){const e=[0];return b6(e,n.length-1),e}function P6(n,e){return n.map(t=>t*e)}const QR=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,B6=1e-7,R6=12;function L6(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=QR(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>B6&&++aL6(s,0,1,n,t);return s=>s===0||s===1?s:QR(r(s),e,i)}const qR=n=>1-Math.sin(Math.acos(n)),lw=sw(qR),I6=rw(lw),$R=ZR(.33,1.53,.69,.99),cw=sw($R),D6=rw(cw),F6=n=>(n*=2)<1?.5*cw(n):.5*(2-Math.pow(2,-10*(n-1))),N6={linear:gr,easeIn:ow,easeInOut:aw,easeOut:A6,circIn:qR,circInOut:I6,circOut:lw,backIn:cw,backInOut:D6,backOut:$R,anticipate:F6},gb=n=>{if(Array.isArray(n)){qm(n.length===4);const[e,t,i,r]=n;return ZR(e,t,i,r)}else if(typeof n=="string")return N6[n];return n},k6=n=>Array.isArray(n)&&typeof n[0]!="number";function O6(n,e){return n.map(()=>e||aw).splice(0,n.length-1)}function BA({keyframes:n,ease:e=aw,times:t,duration:i=300}){n=[...n];const r=k6(e)?e.map(gb):gb(e),s={done:!1,value:n[0]},o=P6(t&&t.length===n.length?t:T6(n),i);function a(){return KR(o,n,{ease:Array.isArray(r)?r:O6(n,r)})}let l=a();return{next:u=>(s.value=l(u),s.done=u>=i,s),flipTarget:()=>{n.reverse(),l=a()}}}const Pv=.001,U6=.01,yb=10,z6=.05,G6=1;function H6({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;v6(n<=yb*1e3);let o=1-e;o=Gc(z6,G6,o),n=Gc(U6,yb,n/1e3),o<1?(r=u=>{const h=u*o,d=h*n,p=h-t,m=RA(u,o),v=Math.exp(-d);return Pv-p/m*v},s=u=>{const d=u*o*n,p=d*t+t,m=Math.pow(o,2)*Math.pow(u,2)*n,v=Math.exp(-d),y=RA(Math.pow(u,2),o);return(-r(u)+Pv>0?-1:1)*((p-m)*v)/y}):(r=u=>{const h=Math.exp(-u*n),d=(u-t)*n+1;return-Pv+h*d},s=u=>{const h=Math.exp(-u*n),d=(t-u)*(n*n);return h*d});const a=5/n,l=W6(r,s,a);if(n=n*1e3,isNaN(l))return{stiffness:100,damping:10,duration:n};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:n}}}const V6=12;function W6(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function X6(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!vb(n,J6)&&vb(n,j6)){const t=H6(n);e={...e,...t,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Y6=5;function eL({keyframes:n,restDelta:e,restSpeed:t,...i}){let r=n[0],s=n[n.length-1];const o={done:!1,value:r},{stiffness:a,damping:l,mass:u,velocity:h,duration:d,isResolvedFromDuration:p}=X6(i);let m=K6,v=h?-(h/1e3):0;const y=l/(2*Math.sqrt(a*u));function x(){const A=s-r,_=Math.sqrt(a/u)/1e3,w=Math.abs(A)<5;if(t||(t=w?.01:2),e||(e=w?.005:.5),y<1){const S=RA(_,y);m=E=>{const P=Math.exp(-y*_*E);return s-P*((v+y*_*A)/S*Math.sin(S*E)+A*Math.cos(S*E))}}else if(y===1)m=S=>s-Math.exp(-_*S)*(A+(v+_*A)*S);else{const S=_*Math.sqrt(y*y-1);m=E=>{const P=Math.exp(-y*_*E),R=Math.min(S*E,300);return s-P*((v+y*_*A)*Math.sinh(R)+S*A*Math.cosh(R))/S}}}return x(),{next:A=>{const _=m(A);if(p)o.done=A>=d;else{let w=v;if(A!==0)if(y<1){const P=Math.max(0,A-Y6);w=ew(_-m(P),A-P)}else w=0;const S=Math.abs(w)<=t,E=Math.abs(s-_)<=e;o.done=S&&E}return o.value=o.done?s:_,o},flipTarget:()=>{v=-v,[r,s]=[s,r],x()}}}eL.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const K6=n=>0;function Q6({keyframes:n=[0],velocity:e=0,power:t=.8,timeConstant:i=350,restDelta:r=.5,modifyTarget:s}){const o=n[0],a={done:!1,value:o};let l=t*e;const u=o+l,h=s===void 0?u:s(u);return h!==u&&(l=h-o),{next:d=>{const p=-l*Math.exp(-d/i);return a.done=!(p>r||p<-r),a.value=a.done?h:h+p,a},flipTarget:()=>{}}}const Z6={decay:Q6,keyframes:BA,tween:BA,spring:eL};function tL(n,e,t=0){return n-e-t}function q6(n,e=0,t=0,i=!0){return i?tL(e+-n,e,t):e-(n-e)+t}function $6(n,e,t,i){return i?n>=e+t:n<=-t}const eW=n=>{const e=({delta:t})=>n(t);return{start:()=>pi.update(e,!0),stop:()=>Go.update(e)}};function $m({duration:n,driver:e=eW,elapsed:t=0,repeat:i=0,repeatType:r="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:u,onComplete:h,onRepeat:d,onUpdate:p,type:m="keyframes",...v}){const y=t;let x,A=0,_=n,w=!1,S=!0,E;const P=Z6[o.length>2?"keyframes":m]||BA,R=o[0],b=o[o.length-1];let B={done:!1,value:R};const{needsInterpolation:L}=P;L&&L(R,b)&&(E=KR([0,100],[R,b],{clamp:!1}),o=[0,100]);const U=P({...v,duration:n,keyframes:o});function Z(){A++,r==="reverse"?(S=A%2===0,t=q6(t,_,s,S)):(t=tL(t,_,s),r==="mirror"&&U.flipTarget()),w=!1,d&&d()}function V(){x&&x.stop(),h&&h()}function H(ie){S||(ie=-ie),t+=ie,w||(B=U.next(Math.max(0,t)),E&&(B.value=E(B.value)),w=S?B.done:t<=0),p&&p(B.value),w&&(A===0&&(_=_!==void 0?_:t),A{u&&u(),x&&x.stop()},set currentTime(ie){t=y,H(ie)},sample:ie=>{t=y;const ce=n&&typeof n=="number"?Math.max(n*.5,50):50;let N=0;for(H(0);N<=ie;){const J=ie-N;H(Math.min(J,ce)),N+=ce}return B}}}function tW(n){return!n||Array.isArray(n)||typeof n=="string"&&nL[n]}const nf=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,nL={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:nf([0,.65,.55,1]),circOut:nf([.55,0,1,.45]),backIn:nf([.31,.01,.66,-.59]),backOut:nf([.33,1.53,.69,.99])};function nW(n){if(n)return Array.isArray(n)?nf(n):nL[n]}function iW(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){return n.animate({[e]:t,offset:l},{delay:i,duration:r,easing:nW(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const xb={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Bv={},iL={};for(const n in xb)iL[n]=()=>(Bv[n]===void 0&&(Bv[n]=xb[n]()),Bv[n]);function rW(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const sW=new Set(["opacity","clipPath","filter","transform"]),Vp=10;function oW(n,e,{onUpdate:t,onComplete:i,...r}){if(!(iL.waapi()&&sW.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:u}=r;if(r.type==="spring"||!tW(r.ease)){if(r.repeat===1/0)return;const d=$m({...r,elapsed:0});let p={done:!1,value:o[0]};const m=[];let v=0;for(;!p.done&&v<2e4;)p=d.sample(v),m.push(p.value),v+=Vp;o=m,a=v-Vp,u="linear"}const h=iW(n.owner.current,e,o,{...r,delay:-l,duration:a,ease:u});return h.onfinish=()=>{n.set(rW(o,r)),pi.update(()=>h.cancel()),i&&i()},{get currentTime(){return h.currentTime||0},set currentTime(d){h.currentTime=d},stop:()=>{const{currentTime:d}=h;if(d){const p=$m({...r,autoplay:!1});n.setWithVelocity(p.sample(d-Vp).value,p.sample(d).value,Vp)}pi.update(()=>h.cancel())}}}function rL(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&(Go.read(i),n(s-e))};return pi.read(i,!0),()=>Go.read(i)}function aW({keyframes:n,elapsed:e,onUpdate:t,onComplete:i}){const r=()=>{t&&t(n[n.length-1]),i&&i()};return e?{stop:rL(r,-e)}:r()}function lW({keyframes:n,velocity:e=0,min:t,max:i,power:r=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:d,onComplete:p,onStop:m}){const v=n[0];let y;function x(S){return t!==void 0&&Si}function A(S){return t===void 0?i:i===void 0||Math.abs(t-S){d&&d(E),S.onUpdate&&S.onUpdate(E)},onComplete:p,onStop:m})}function w(S){_({type:"spring",stiffness:o,damping:a,restDelta:l,...S})}if(x(v))w({velocity:e,keyframes:[v,A(v)]});else{let S=r*e+v;typeof u<"u"&&(S=u(S));const E=A(S),P=E===t?-1:1;let R,b;const B=L=>{R=b,b=L,e=ew(L-R,zs.delta),(P===1&&L>E||P===-1&&Ly&&y.stop()}}const cW={type:"spring",stiffness:500,damping:25,restSpeed:10},uW=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),fW={type:"keyframes",duration:.8},hW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dW=(n,{keyframes:e})=>e.length>2?fW:fl.has(n)?n.startsWith("scale")?uW(e[1]):cW:hW,LA=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Ho.test(e)&&!e.startsWith("url("));function pW({when:n,delay:e,delayChildren:t,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length}function Ab(n){return n===0||typeof n=="string"&&parseFloat(n)===0&&n.indexOf(" ")===-1}function _b(n){return typeof n=="number"?0:iw("",n)}function sL(n,e){return n[e]||n.default||n}function mW(n,e,t,i){const r=LA(e,t);let s=i.from!==void 0?i.from:n.get();return s==="none"&&r&&typeof t=="string"?s=iw(e,t):Ab(s)&&typeof t=="string"?s=_b(t):!Array.isArray(t)&&Ab(t)&&typeof s=="string"&&(t=_b(s)),Array.isArray(t)?(t[0]===null&&(t[0]=s),t):[s,t]}const uw=(n,e,t,i={})=>r=>{const s=sL(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-mm(o);const l=mW(e,n,t,s),u=l[0],h=l[l.length-1],d=LA(n,u),p=LA(n,h);let m={keyframes:l,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:v=>{e.set(v),s.onUpdate&&s.onUpdate(v)},onComplete:()=>{r(),s.onComplete&&s.onComplete()}};if(!d||!p||x6.current||s.type===!1)return aW(m);if(s.type==="inertia")return lW(m);if(pW(s)||(m={...m,...dW(n,m)}),m.duration&&(m.duration=mm(m.duration)),m.repeatDelay&&(m.repeatDelay=mm(m.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const v=oW(e,n,m);if(v)return v}return $m(m)};function gW(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>IA(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=IA(n,e,t);else{const r=typeof e=="function"?Xg(n,e,t.custom):e;i=oL(n,r,t)}return i.then(()=>n.notify("AnimationComplete",e))}function IA(n,e,t={}){const i=Xg(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>oL(n,i,t):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:d}=r;return yW(n,e,u+l,h,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,u]=a==="beforeChildren"?[s,o]:[o,s];return l().then(u)}else return Promise.all([s(),o(t.delay)])}function oL(n,e,{delay:t=0,transitionOverride:i,type:r}={}){let{transition:s=n.getDefaultTransition(),transitionEnd:o,...a}=n.makeTargetAnimatable(e);const l=n.getValue("willChange");i&&(s=i);const u=[],h=r&&n.animationState&&n.animationState.getState()[r];for(const d in a){const p=n.getValue(d),m=a[d];if(!p||m===void 0||h&&xW(h,d))continue;const v={delay:t,elapsed:0,...s};if(window.HandoffAppearAnimations&&!p.hasAnimated){const x=n.getProps()[y6];x&&(v.elapsed=window.HandoffAppearAnimations(x,d,p,pi))}let y=p.start(uw(d,p,m,n.shouldReduceMotion&&fl.has(d)?{type:!1}:v));Zm(l)&&(l.add(d),y=y.then(()=>l.remove(d))),u.push(y)}return Promise.all(u).then(()=>{o&&h6(n,o)})}function yW(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,l=r===1?(u=0)=>u*i:(u=0)=>a-u*i;return Array.from(n.variantChildren).sort(vW).forEach((u,h)=>{u.notify("AnimationStart",e),o.push(IA(u,e,{...s,delay:t+l(h)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function vW(n,e){return n.sortNodePosition(e)}function xW({protectedKeys:n,needsAnimating:e},t){const i=n.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,i}const AW=[...G_].reverse(),_W=G_.length;function wW(n){return e=>Promise.all(e.map(({animation:t,options:i})=>gW(n,t,i)))}function MW(n){let e=wW(n);const t=CW();let i=!0;const r=(l,u)=>{const h=Xg(n,u);if(h){const{transition:d,transitionEnd:p,...m}=h;l={...l,...m,...p}}return l};function s(l){e=l(n)}function o(l,u){const h=n.getProps(),d=n.getVariantContext(!0)||{},p=[],m=new Set;let v={},y=1/0;for(let A=0;A<_W;A++){const _=AW[A],w=t[_],S=h[_]!==void 0?h[_]:d[_],E=$f(S),P=_===u?w.isActive:null;P===!1&&(y=A);let R=S===d[_]&&S!==h[_]&&E;if(R&&i&&n.manuallyAnimateOnMount&&(R=!1),w.protectedKeys={...v},!w.isActive&&P===null||!S&&!w.prevProp||Hg(S)||typeof S=="boolean")continue;const b=SW(w.prevProp,S);let B=b||_===u&&w.isActive&&!R&&E||A>y&&E;const L=Array.isArray(S)?S:[S];let U=L.reduce(r,{});P===!1&&(U={});const{prevResolvedValues:Z={}}=w,V={...Z,...U},H=K=>{B=!0,m.delete(K),w.needsAnimating[K]=!0};for(const K in V){const ie=U[K],ce=Z[K];v.hasOwnProperty(K)||(ie!==ce?Km(ie)&&Km(ce)?!DR(ie,ce)||b?H(K):w.protectedKeys[K]=!0:ie!==void 0?H(K):m.add(K):ie!==void 0&&m.has(K)?H(K):w.protectedKeys[K]=!0)}w.prevProp=S,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),i&&n.blockInitialAnimation&&(B=!1),B&&!R&&p.push(...L.map(K=>({animation:K,options:{type:_,...l}})))}if(m.size){const A={};m.forEach(_=>{const w=n.getBaseTarget(_);w!==void 0&&(A[_]=w)}),p.push({animation:A})}let x=!!p.length;return i&&h.initial===!1&&!n.manuallyAnimateOnMount&&(x=!1),i=!1,x?e(p):Promise.resolve()}function a(l,u,h){var d;if(t[l].isActive===u)return Promise.resolve();(d=n.variantChildren)===null||d===void 0||d.forEach(m=>{var v;return(v=m.animationState)===null||v===void 0?void 0:v.setActive(l,u)}),t[l].isActive=u;const p=o(h,l);for(const m in t)t[m].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function SW(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!DR(e,n):!1}function xa(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function CW(){return{animate:xa(!0),whileInView:xa(),whileHover:xa(),whileTap:xa(),whileDrag:xa(),whileFocus:xa(),exit:xa()}}class EW extends qo{constructor(e){super(e),e.animationState||(e.animationState=MW(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Hg(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}let bW=0;class TW extends qo{constructor(){super(...arguments),this.id=bW++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});t&&!e&&s.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const PW={animation:{Feature:EW},exit:{Feature:TW}},wb=(n,e)=>Math.abs(n-e);function BW(n,e){const t=wb(n.x,e.x),i=wb(n.y,e.y);return Math.sqrt(t**2+i**2)}class aL{constructor(e,t,{transformPagePoint:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Lv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=BW(u.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=u,{timestamp:m}=zs;this.history.push({...p,timestamp:m});const{onStart:v,onMove:y}=this.handlers;h||(v&&v(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Rv(h,this.transformPagePoint),pi.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:p}=this.handlers,m=Lv(u.type==="pointercancel"?this.lastMoveEventInfo:Rv(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,m),p&&p(u,m)},!PR(e))return;this.handlers=t,this.transformPagePoint=i;const r=jg(e),s=Rv(r,this.transformPagePoint),{point:o}=s,{timestamp:a}=zs;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Lv(s,this.history)),this.removeListeners=Lo(Us(window,"pointermove",this.handlePointerMove),Us(window,"pointerup",this.handlePointerUp),Us(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Go.update(this.updatePoint)}}function Rv(n,e){return e?{point:e(n.point)}:n}function Mb(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Lv({point:n},e){return{point:n,delta:Mb(n,lL(e)),offset:Mb(n,RW(e)),velocity:LW(e,.1)}}function RW(n){return n[0]}function lL(n){return n[n.length-1]}function LW(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=lL(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>mm(e)));)t--;if(!i)return{x:0,y:0};const s=(r.timestamp-i.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ji(n){return n.max-n.min}function DA(n,e=0,t=.01){return Math.abs(n-e)<=t}function Sb(n,e,t,i=.5){n.origin=i,n.originPoint=sn(e.min,e.max,n.origin),n.scale=ji(t)/ji(e),(DA(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=sn(t.min,t.max,n.origin)-n.originPoint,(DA(n.translate)||isNaN(n.translate))&&(n.translate=0)}function Af(n,e,t,i){Sb(n.x,e.x,t.x,i?i.originX:void 0),Sb(n.y,e.y,t.y,i?i.originY:void 0)}function Cb(n,e,t){n.min=t.min+e.min,n.max=n.min+ji(e)}function IW(n,e,t){Cb(n.x,e.x,t.x),Cb(n.y,e.y,t.y)}function Eb(n,e,t){n.min=e.min-t.min,n.max=n.min+ji(e)}function _f(n,e,t){Eb(n.x,e.x,t.x),Eb(n.y,e.y,t.y)}function DW(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?sn(t,n,i.max):Math.min(n,t)),n}function bb(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function FW(n,{top:e,left:t,bottom:i,right:r}){return{x:bb(n.x,t,r),y:bb(n.y,e,i)}}function Tb(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=ih(e.min,e.max-i,n.min):i>r&&(t=ih(n.min,n.max-r,e.min)),Gc(0,1,t)}function OW(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const FA=.35;function UW(n=FA){return n===!1?n=0:n===!0&&(n=FA),{x:Pb(n,"left","right"),y:Pb(n,"top","bottom")}}function Pb(n,e,t){return{min:Bb(n,e),max:Bb(n,t)}}function Bb(n,e){return typeof n=="number"?n:n[e]||0}const Rb=()=>({translate:0,scale:1,origin:0,originPoint:0}),wf=()=>({x:Rb(),y:Rb()}),Lb=()=>({min:0,max:0}),_n=()=>({x:Lb(),y:Lb()});function qr(n){return[n("x"),n("y")]}function cL({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function zW({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function GW(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),i=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:i.y,right:i.x}}function Iv(n){return n===void 0||n===1}function NA({scale:n,scaleX:e,scaleY:t}){return!Iv(n)||!Iv(e)||!Iv(t)}function Ca(n){return NA(n)||uL(n)||n.z||n.rotate||n.rotateX||n.rotateY}function uL(n){return Ib(n.x)||Ib(n.y)}function Ib(n){return n&&n!=="0%"}function eg(n,e,t){const i=n-t,r=e*i;return t+r}function Db(n,e,t,i,r){return r!==void 0&&(n=eg(n,r,i)),eg(n,t,i)+e}function kA(n,e=0,t=1,i,r){n.min=Db(n.min,e,t,i,r),n.max=Db(n.max,e,t,i,r)}function fL(n,{x:e,y:t}){kA(n.x,e.translate,e.scale,e.originPoint),kA(n.y,t.translate,t.scale,t.originPoint)}function HW(n,e,t,i=!1){const r=t.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||n<.999999999999?n:1}function yo(n,e){n.min=n.min+e,n.max=n.max+e}function Nb(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=sn(n.min,n.max,s);kA(n,e[t],e[i],o,e.scale)}const VW=["x","scaleX","originX"],WW=["y","scaleY","originY"];function dc(n,e){Nb(n.x,e,VW),Nb(n.y,e,WW)}function hL(n,e){return cL(GW(n.getBoundingClientRect(),e))}function jW(n,e,t){const i=hL(n,t),{scroll:r}=e;return r&&(yo(i.x,r.offset.x),yo(i.y,r.offset.y)),i}const JW=new WeakMap;class XW{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_n(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=l=>{this.stopAnimation(),t&&this.snapToCursor(jg(l,"page").point)},s=(l,u)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=RR(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qr(v=>{let y=this.getAxisMotionValue(v).get()||0;if(ss.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const A=x.layout.layoutBox[v];A&&(y=ji(A)*(parseFloat(y)/100))}}this.originPoint[v]=y}),p&&p(l,u);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(l,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:v}=u;if(d&&this.currentDirection===null){this.currentDirection=YW(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",u.point,v),this.updateAxis("y",u.point,v),this.visualElement.render(),m&&m(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new aL(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&s(e,t)}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){const{drag:r}=this.getProps();if(!i||!Wp(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=DW(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:i}=this.visualElement.projection||{},r=this.constraints;e&&fc(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=FW(i.layoutBox,e):this.constraints=!1,this.elastic=UW(t),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&qr(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=OW(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!fc(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=jW(i,r.root,this.visualElement.getTransformPagePoint());let o=NW(r.layout.layoutBox,s);if(t){const a=t(zW(o));this.hasMutatedConstraints=!!a,a&&(o=cL(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=qr(h=>{if(!Wp(h,t,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,v={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,v)});return Promise.all(u).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(uw(e,i,0,t))}stopAnimation(){qr(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),r=i[t];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){qr(t=>{const{drag:i}=this.getProps();if(!Wp(t,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[t];s.set(e[t]-sn(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!fc(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};qr(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();r[o]=kW({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),qr(o=>{if(!Wp(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(sn(l,u,r[o]))})}addListeners(){if(!this.visualElement.current)return;JW.set(this.visualElement,this);const e=this.visualElement.current,t=Us(e,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps();u&&h&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();fc(l)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),i();const o=Ns(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(qr(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=FA,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Wp(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function YW(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class KW extends qo{constructor(e){super(e),this.removeGroupControls=gr,this.removeListeners=gr,this.controls=new XW(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gr}unmount(){this.removeGroupControls(),this.removeListeners()}}class QW extends qo{constructor(){super(...arguments),this.removePointerDownListener=gr}onPointerDown(e){this.session=new aL(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:e,onStart:t,onMove:i,onEnd:(s,o)=>{delete this.session,r&&r(s,o)}}}mount(){this.removePointerDownListener=Us(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ZW(){const n=z.useContext(z_);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=z.useId();return z.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}function kb(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const Ku={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(st.test(n))n=parseFloat(n);else return n;const t=kb(n,e.target.x),i=kb(n,e.target.y);return`${t}% ${i}%`}},dL=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function qW(n){const e=dL.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function OA(n,e,t=1){const[i,r]=qW(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():MA(r)?OA(r,e,t+1):r}function $W(n,{...e},t){const i=n.current;if(!(i instanceof Element))return{target:e,transitionEnd:t};t&&(t={...t}),n.values.forEach(r=>{const s=r.get();if(!MA(s))return;const o=OA(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!MA(s))continue;const o=OA(s,i);o&&(e[r]=o,t&&t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const Ob="_$css",e7={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=n.includes("var("),s=[];r&&(n=n.replace(dL,m=>(s.push(m),Ob)));const o=Ho.parse(n);if(o.length>5)return i;const a=Ho.createTransformer(n),l=typeof o[0]!="number"?1:0,u=t.x.scale*e.x,h=t.y.scale*e.y;o[0+l]/=u,o[1+l]/=h;const d=sn(u,h,.5);typeof o[2+l]=="number"&&(o[2+l]/=d),typeof o[3+l]=="number"&&(o[3+l]/=d);let p=a(o);if(r){let m=0;p=p.replace(Ob,()=>{const v=s[m];return m++,v})}return p}};class t7 extends ig.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;n8(n7),s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),yf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==t||t===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||pi.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function pL(n){const[e,t]=ZW(),i=z.useContext(mR);return ig.createElement(t7,{...n,layoutGroup:i,switchLayoutGroup:z.useContext(gR),isPresent:e,safeToRemove:t})}const n7={borderRadius:{...Ku,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ku,borderTopRightRadius:Ku,borderBottomLeftRadius:Ku,borderBottomRightRadius:Ku,boxShadow:e7};function i7(n,e,t={}){const i=Pi(n)?n:Hc(n);return i.start(uw("",i,e,t)),{stop:()=>i.stop(),isAnimating:()=>i.isAnimating()}}const mL=["TopLeft","TopRight","BottomLeft","BottomRight"],r7=mL.length,Ub=n=>typeof n=="string"?parseFloat(n):n,zb=n=>typeof n=="number"||st.test(n);function s7(n,e,t,i,r,s){r?(n.opacity=sn(0,t.opacity!==void 0?t.opacity:1,o7(i)),n.opacityExit=sn(e.opacity!==void 0?e.opacity:1,0,a7(i))):s&&(n.opacity=sn(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(ih(n,e,i))}function Hb(n,e){n.min=e.min,n.max=e.max}function ar(n,e){Hb(n.x,e.x),Hb(n.y,e.y)}function Vb(n,e,t,i,r){return n-=e,n=eg(n,1/t,i),r!==void 0&&(n=eg(n,1/r,i)),n}function l7(n,e=0,t=1,i=.5,r,s=n,o=n){if(ss.test(e)&&(e=parseFloat(e),e=sn(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=sn(s.min,s.max,i);n===s&&(a-=e),n.min=Vb(n.min,e,t,a,r),n.max=Vb(n.max,e,t,a,r)}function Wb(n,e,[t,i,r],s,o){l7(n,e[t],e[i],e[r],e.scale,s,o)}const c7=["x","scaleX","originX"],u7=["y","scaleY","originY"];function jb(n,e,t,i){Wb(n.x,e,c7,t?t.x:void 0,i?i.x:void 0),Wb(n.y,e,u7,t?t.y:void 0,i?i.y:void 0)}function Jb(n){return n.translate===0&&n.scale===1}function yL(n){return Jb(n.x)&&Jb(n.y)}function UA(n,e){return n.x.min===e.x.min&&n.x.max===e.x.max&&n.y.min===e.y.min&&n.y.max===e.y.max}function Xb(n){return ji(n.x)/ji(n.y)}class f7{constructor(){this.members=[]}add(e){Z_(this.members,e),e.scheduleRender()}remove(e){if(q_(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(r=>e===r);if(t===0)return!1;let i;for(let r=t;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Yb(n,e,t){let i="";const r=n.x.translate/e.x,s=n.y.translate/e.y;if((r||s)&&(i=`translate3d(${r}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{rotate:l,rotateX:u,rotateY:h}=t;l&&(i+=`rotate(${l}deg) `),u&&(i+=`rotateX(${u}deg) `),h&&(i+=`rotateY(${h}deg) `)}const o=n.x.scale*e.x,a=n.y.scale*e.y;return(o!==1||a!==1)&&(i+=`scale(${o}, ${a})`),i||"none"}const h7=(n,e)=>n.depth-e.depth;class d7{constructor(){this.children=[],this.isDirty=!1}add(e){Z_(this.children,e),this.isDirty=!0}remove(e){q_(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(h7),this.isDirty=!1,this.children.forEach(e)}}function p7(n){window.MotionDebug&&window.MotionDebug.record(n)}const Kb=["","X","Y","Z"],Qb=1e3;let m7=0;const Ea={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function vL({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=m7++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Ea.totalNodes=Ea.resolvedTargetDeltas=Ea.recalculatedProjection=0,this.nodes.forEach(v7),this.nodes.forEach(w7),this.nodes.forEach(M7),this.nodes.forEach(x7),p7(Ea)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let u=0;uthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=rL(p,250),yf.hasAnimatedSinceResize&&(yf.hasAnimatedSinceResize=!1,this.nodes.forEach(qb))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||h.getDefaultTransition()||T7,{onLayoutAnimationStart:x,onLayoutAnimationComplete:A}=h.getProps(),_=!this.targetLayout||!UA(this.targetLayout,v)||m,w=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||p&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const S={...sL(y,"layout"),onPlay:x,onComplete:A};(h.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else!p&&this.animationProgress===0&&qb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Go.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(S7),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const E=S/1e3;$b(d.x,o.x,E),$b(d.y,o.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_f(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),E7(this.relativeTarget,this.relativeTargetOrigin,p,E),w&&UA(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=_n()),ar(w,this.relativeTarget)),y&&(this.animationValues=h,s7(h,u,this.latestValues,E,_,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Go.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pi.update(()=>{yf.hasAnimatedSinceResize=!0,this.currentAnimation=i7(0,Qb,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qb),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:h}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&xL(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||_n();const d=ji(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=ji(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}ar(a,l),dc(a,h),Af(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new f7),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let h=0;h{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Zb),this.root.sharedNodes.clear()}}}function g7(n){n.updateLayout()}function y7(n){var e;const t=((e=n.resumeFrom)===null||e===void 0?void 0:e.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=n.layout,{animationType:s}=n.options,o=t.source!==n.layout.source;s==="size"?qr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=ji(p);p.min=i[d].min,p.max=p.min+m}):xL(s,t.layoutBox,i)&&qr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=ji(i[d]);p.max=p.min+m});const a=wf();Af(a,i,t.layoutBox);const l=wf();o?Af(l,n.applyTransform(r,!0),t.measuredBox):Af(l,i,t.layoutBox);const u=!yL(a);let h=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:m}=d;if(p&&m){const v=_n();_f(v,t.layoutBox,p.layoutBox);const y=_n();_f(y,i,m.layoutBox),UA(v,y)||(h=!0),d.options.layoutRoot&&(n.relativeTarget=y,n.relativeTargetOrigin=v,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:h})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function v7(n){Ea.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function x7(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function A7(n){n.clearSnapshot()}function Zb(n){n.clearMeasurements()}function _7(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function qb(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0}function w7(n){n.resolveTargetDelta()}function M7(n){n.calcProjection()}function S7(n){n.resetRotation()}function C7(n){n.removeLeadSnapshot()}function $b(n,e,t){n.translate=sn(e.translate,0,t),n.scale=sn(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function eT(n,e,t,i){n.min=sn(e.min,t.min,i),n.max=sn(e.max,t.max,i)}function E7(n,e,t,i){eT(n.x,e.x,t.x,i),eT(n.y,e.y,t.y,i)}function b7(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const T7={duration:.45,ease:[.4,0,.1,1]};function P7(n,e){let t=n.root;for(let s=n.path.length-1;s>=0;s--)if(n.path[s].instance){t=n.path[s];break}const r=(t&&t!==n.root?t.instance:document).querySelector(`[data-projection-id="${e}"]`);r&&n.mount(r,!0)}function tT(n){n.min=Math.round(n.min),n.max=Math.round(n.max)}function B7(n){tT(n.x),tT(n.y)}function xL(n,e,t){return n==="position"||n==="preserve-aspect"&&!DA(Xb(e),Xb(t),.2)}const R7=vL({attachResizeListener:(n,e)=>Ns(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dv={current:void 0},AL=vL({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Dv.current){const n=new R7(0,{});n.mount(window),n.setOptions({layoutScroll:!0}),Dv.current=n}return Dv.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),L7={pan:{Feature:QW},drag:{Feature:KW,ProjectionNode:AL,MeasureLayout:pL}},I7=new Set(["width","height","top","left","right","bottom","x","y"]),_L=n=>I7.has(n),D7=n=>Object.keys(n).some(_L),nT=n=>n===hl||n===st,iT=(n,e)=>parseFloat(n.split(", ")[e]),rT=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return iT(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?iT(s[1],n):0}},F7=new Set(["x","y","z"]),N7=Wg.filter(n=>!F7.has(n));function k7(n){const e=[];return N7.forEach(t=>{const i=n.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e.length&&n.render(),e}const sT={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:rT(4,13),y:rT(5,14)},O7=(n,e,t)=>{const i=e.measureViewportBox(),r=e.current,s=getComputedStyle(r),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",n.display||"block"),t.forEach(u=>{a[u]=sT[u](i,s)}),e.render();const l=e.measureViewportBox();return t.forEach(u=>{const h=e.getValue(u);h&&h.jump(a[u]),n[u]=sT[u](l,s)}),n},U7=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(_L);let s=[],o=!1;const a=[];if(r.forEach(l=>{const u=n.getValue(l);if(!n.hasValue(l))return;let h=t[l],d=Yu(h);const p=e[l];let m;if(Km(p)){const v=p.length,y=p[0]===null?1:0;h=p[y],d=Yu(h);for(let x=y;x=0?window.pageYOffset:null,u=O7(e,n,a);return s.length&&s.forEach(([h,d])=>{n.getValue(h).set(d)}),n.render(),Gg&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:i}}else return{target:e,transitionEnd:i}};function z7(n,e,t,i){return D7(e)?U7(n,e,t,i):{target:e,transitionEnd:i}}const G7=(n,e,t,i)=>{const r=$W(n,e,i);return e=r.target,i=r.transitionEnd,z7(n,e,t,i)},zA={current:null},wL={current:!1};function H7(){if(wL.current=!0,!!Gg)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>zA.current=n.matches;n.addListener(e),e()}else zA.current=!1}function V7(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(Pi(s))n.addValue(r,s),Zm(i)&&i.add(r);else if(Pi(o))n.addValue(r,Hc(s,{owner:n})),Zm(i)&&i.remove(r);else if(o!==s)if(n.hasValue(r)){const a=n.getValue(r);!a.hasAnimated&&a.set(s)}else{const a=n.getStaticValue(r);n.addValue(r,Hc(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const ML=Object.keys(eh),W7=ML.length,oT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],j7=H_.length;class J7{constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>pi.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=Vg(t),this.isVariantNode=dR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(t,{});for(const d in h){const p=h[d];a[d]!==void 0&&Pi(p)&&(p.set(a[d],!1),Zm(u)&&u.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,i)=>this.bindToMotionValue(i,t)),wL.current||H7(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:zA.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Go.update(this.notifyUpdate),Go.render(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const i=fl.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&pi.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...t},i,r,s,o){let a,l;for(let u=0;uthis.scheduleRender(),animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:v})}return l}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update(this.props,this.prevProps):(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_n()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let i=0;it.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&t!==void 0&&(i=Hc(t,{owner:this}),this.addValue(e,i)),i}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(t=Q_(this.props,i))===null||t===void 0?void 0:t[e]:void 0;if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Pi(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new $_),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class SL extends J7{sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...i},{transformValues:r},s){let o=m6(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){d6(this,i,o);const a=G7(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function X7(n){return window.getComputedStyle(n)}class Y7 extends SL{readValueFromInstance(e,t){if(fl.has(t)){const i=nw(t);return i&&i.default||0}else{const i=X7(e),r=(xR(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return hL(e,t)}build(e,t,i,r){W_(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return K_(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Pi(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){SR(e,t,i,r)}}class K7 extends SL{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(fl.has(t)){const i=nw(t);return i&&i.default||0}return t=CR.has(t)?t:Y_(t),e.getAttribute(t)}measureInstanceViewportBox(){return _n()}scrapeMotionValuesFromProps(e,t){return bR(e,t)}build(e,t,i,r){J_(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){ER(e,t,i,r)}mount(e){this.isSVGTag=X_(e.tagName),super.mount(e)}}const Q7=(n,e)=>V_(n)?new K7(e,{enableHardwareAcceleration:!1}):new Y7(e,{enableHardwareAcceleration:!0}),Z7={layout:{ProjectionNode:AL,MeasureLayout:pL}},q7={...PW,...G8,...L7,...Z7},Bi=e8((n,e)=>T8(n,e,q7,Q7)),Un={paddingX:"sm:px-16 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-white lg:text-[80px] sm:text-[60px] xs:text-[50px] text-[40px] lg:leading-[98px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px] lg:leading-[40px]",sectionHeadText:"text-white font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},$7=()=>et("section",{className:"relative w-full h-screen mx-auto",children:[et("div",{className:`absolute inset-0 top-[120px] max-w-7xl mx-auto ${Un.paddingX} flex flex-row items-start gap-5`,children:[et("div",{className:"flex flex-col justify-center items-center mt-5",children:[fe("div",{className:"w-5 h-5 rounded-full bg-[#915EFF]"}),fe("div",{className:"w-1 sm:h-80 h-40 violet-gradient"})]}),et("div",{children:[et("h1",{className:`${Un.heroHeadText} text-white`,children:["Hi, I'm ",fe("span",{className:"text-[#915EFF]",children:"Edward"})]}),et("p",{className:`${Un.heroSubText} mt-2 text-white-100`,children:["I developed 3D visuals, user ",fe("br",{className:"sm:block hidden"}),"interfaces and web applications"]})]})]}),fe(IV,{}),fe("div",{className:"absolute xs:bottom-10 bottom-32 w-full flex justify-center items-center",children:fe("a",{href:"#about",children:fe("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-secondary flex justify-center items-start p-2",children:fe(Bi.div,{animate:{y:[0,24,0]},transition:{duration:1.5,repeat:1/0,repeatType:"loop"},className:"w-3 h-3 rounded-full bg-secondary mb-1"})})})})]}),ej="/Edward-portfolio/assets/logo-ee7889cb.png",tj="/Edward-portfolio/assets/backend-565fc01f.png",nj="/Edward-portfolio/assets/creator-dbbffaec.png",ij="/Edward-portfolio/assets/mobile-896ef2f5.png",rj="/Edward-portfolio/assets/web-0d05165f.png",sj="/Edward-portfolio/assets/github-3b4e1609.png",oj="/Edward-portfolio/assets/menu-242d80a8.svg",aj="/Edward-portfolio/assets/close-ad0e0ca6.svg",lj="/Edward-portfolio/assets/css-79a7f026.png",cj="/Edward-portfolio/assets/docker-602a695a.png",uj="/Edward-portfolio/assets/figma-184a11e6.png",fj="data:image/png;base64,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",hj="/Edward-portfolio/assets/html-92b76a73.png",dj="data:image/png;base64,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",pj="/Edward-portfolio/assets/mongodb-54000b2b.png",mj="/Edward-portfolio/assets/nodejs-d83eb6dd.png",gj="/Edward-portfolio/assets/reactjs-966214a8.png",yj="/Edward-portfolio/assets/redux-171787ca.png",vj="/Edward-portfolio/assets/tailwind-6ece120d.png",xj="data:image/png;base64,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",Aj="/Edward-portfolio/assets/threejs-1d0654a8.svg",_j="/Edward-portfolio/assets/carrent-aba013d1.png",wj="/Edward-portfolio/assets/jobit-ecb9d39c.png",Mj="/Edward-portfolio/assets/project1-0e94d7b7.png",Sj="/Edward-portfolio/assets/project2-25aabb30.png",Cj="/Edward-portfolio/assets/project4-f71459d7.png",Ej="/Edward-portfolio/assets/project5-6cbd9b09.png",bj="/Edward-portfolio/assets/SYNOPTEK-8a0c3765.png",Tj="/Edward-portfolio/assets/apptio-256337c4.png",Pj="/Edward-portfolio/assets/anaplan-283119e5.png",aT=[{id:"about",title:"About"},{id:"work",title:"Work"},{id:"contact",title:"Contact"}],Bj=[{title:"Front-end developer",icon:rj},{title:"Back-end developer",icon:ij},{title:"Website Designer",icon:tj},{title:"Database management",icon:nj}],Rj=[{name:"HTML 5",icon:hj},{name:"CSS 3",icon:lj},{name:"JavaScript",icon:dj},{name:"TypeScript",icon:xj},{name:"React JS",icon:gj},{name:"Redux Toolkit",icon:yj},{name:"Tailwind CSS",icon:vj},{name:"Node JS",icon:mj},{name:"MongoDB",icon:pj},{name:"Three JS",icon:Aj},{name:"git",icon:fj},{name:"figma",icon:uj},{name:"docker",icon:cj}],Lj=[{title:"Frontend Developer",company_name:"SYNOPTEK company",icon:bj,iconBg:"#E6DEDD",date:"May 2017 - Dec 2018",points:["Strong understanding of HTML, CSS, and JavaScript, and have used various frameworks and libraries such as React, Angular, and Vue.js to create responsive and interactive websites","Collaboration with designers and backend developers to integrate front-end components with backend systems, and have also optimized website performance and user experience","Experience in testing and debugging code, as well as staying up-to-date with the latest trends and technologies in frontend development","Strengthening team cooperation skills using github work"]},{title:"Full Stack Developer",company_name:"Apptio Denver",icon:Tj,iconBg:"#E6DEDD",date:"Feb 2019 - Mar 2021",points:["Precisely translating designs into pixel-perfect, mobile-first, and responsive web applications using HTML5, CSS3, Material UI, and Bootstrap, consistently delivered exceptional visual and user experiences, achieving a remarkable 95% fidelity to the original designs","Improved code quality by 30% by migrating a complex legacy JavaScript codebase to a modern and scalable system using TypeScript, while also implementing automated testing with Jest, Mocha, and Cypress for enhanced reliability and robustness","Collaborated with cross-functional teams to successfully deliver a real estate platform, meeting project goals and client requirements within a tight deadline"]},{title:"Sr. Full Stack Engineer",company_name:"Anaplan company",icon:Pj,iconBg:"#E6DEDD",date:"April 2021 - Dec 2023",points:["Designed and developed front-end and back-end applications including e-commerce platform utilizing React, Node.js, Express.js,and Docker","Contributed to the migration of applications from monolithic to microservice architecture using React,and Angular.js, achieving 50% scalability improvement and enhanced maintainability and performance","Refactored a complex legacy JavaScript codebase to TypeScript, resulting in significant improvements in code maintainability and a 30% reduction in type-related errors","Proficiently engineered server-side logic and RESTful APIs utilizing Node.js, capitalizing on its event-driven architecture and non-blocking I/O model to deliver scalable and high-performance backend services","Developed the interactive and responsive 3D graphics design feature using Three.js,resulting in an 80% increase in user engagement and a highly positive user experience","Collaborating with multi-disciplinary teams to deliver exceptional results and communicating effectively with designers, frontend and backend developers, and stakeholders, ensuring alignment and fostering a cohesive working environment"]}],Ij=[{testimonial:"I thought it was impossible to make a website as beautiful as our product, but Edward proved me wrong.",name:"Sara Lee",designation:"CFO",company:"Acme Co",image:"https://randomuser.me/api/portraits/women/4.jpg"},{testimonial:"I've never met a web developer who truly cares about their clients' success like Edward does.",name:"Chris Brown",designation:"COO",company:"DEF Corp",image:"https://randomuser.me/api/portraits/men/5.jpg"},{testimonial:"After Edward optimized our website, our traffic increased by 40%. We can't thank them enough!",name:"Lisa Wang",designation:"CTO",company:"456 Enterprises",image:"https://randomuser.me/api/portraits/women/6.jpg"}],Dj=[{name:"Car Rent",description:"Web-based platform that allows users to search, book, and manage car rentals from various providers, providing a convenient and efficient solution for transportation needs.",tags:[{name:"react",color:"blue-text-gradient"},{name:"mongodb",color:"green-text-gradient"},{name:"tailwind",color:"pink-text-gradient"}],image:_j,source_code_link:"https://github.com/edward7770/Car-Rental"},{name:"Job Portal",description:"Web application that enables users to search for job openings, view estimated salary ranges for positions, and locate available jobs based on their current location.",tags:[{name:"typescript",color:"blue-text-gradient"},{name:"restapi",color:"green-text-gradient"},{name:"scss",color:"pink-text-gradient"}],image:wj,source_code_link:"https://github.com/edward7770/Job-Portal-Platform"},{name:"Filpcart",description:"Flipkart web application with Admin real time analytics Dashboard & Paytm Payment Gateway using mern-stack with react and nodejs",tags:[{name:"react",color:"blue-text-gradient"},{name:"nodejs",color:"green-text-gradient"},{name:"tailwindcss",color:"pink-text-gradient"}],image:Mj,source_code_link:"https://github.com/edward7770/filpcart-mern"},{name:"Ecommerce-Headphones",description:"With Modern design, animations, the ability to add and edit products on the go using a CMS, all advanced cart functionalities, and most importantly the complete integration with Stripe to cover REAL payments.",tags:[{name:"nextjs",color:"blue-text-gradient"},{name:"css",color:"green-text-gradient"},{name:"mongodb",color:"pink-text-gradient"}],image:Ej,source_code_link:"https://github.com/edward7770/Headphones-EShop"},{name:"Analytics Dashboard",description:"PHP-based analytics dashboard provides analyzing data, enabling decision-making and performance tracking with web-based interface displays metrics and data insights in a visually user-friendly format.",tags:[{name:"php",color:"blue-text-gradient"},{name:"css",color:"green-text-gradient"},{name:"restapi",color:"pink-text-gradient"}],image:Sj,source_code_link:"https://github.com/edward7770/Analytics-dashboard"},{name:"Wcked Shoes",description:"A fully functional E-Commerce app in React and Flask offers useful features to customers such as product recommendations, creating and reading helpful reviews, managing orders, and much more",tags:[{name:"react",color:"blue-text-gradient"},{name:"PostgreSQL",color:"green-text-gradient"},{name:"tailwindcss",color:"pink-text-gradient"}],image:Cj,source_code_link:"https://github.com/edward7770/WCKED-Shoes"}],Fj=()=>{const[n,e]=z.useState(""),[t,i]=z.useState(!1),[r,s]=z.useState(!1);return z.useEffect(()=>{const o=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[]),fe("nav",{className:`${Un.paddingX} w-full flex items-center py-5 fixed top-0 z-20 ${r?"bg-primary":"bg-transparent"}`,children:et("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[et(SN,{to:"/",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[fe("img",{src:ej,alt:"logo",className:"w-9 h-9 object-contain"}),fe("p",{className:"text-white text-[18px] font-bold cursor-pointer flex ",children:"Edward Thomas"})]}),et("ul",{className:"list-none hidden sm:flex flex-row gap-10",children:[aT.map(o=>fe("li",{className:`${n===o.title?"text-white":"text-secondary"} hover:text-white text-[18px] font-medium cursor-pointer`,onClick:()=>e(o.title),children:fe("a",{href:`#${o.id}`,children:o.title})},o.id)),fe("li",{className:"text-secondaryn hover:text-white text-[18px] font-medium cursor-pointer",children:fe("a",{href:"https://drive.google.com/file/d/1IL05G9spubthnuIEgV6F69N5kXFJf2su/view",children:"Resume"})})]}),et("div",{className:"sm:hidden flex flex-1 justify-end items-center",children:[fe("img",{src:t?aj:oj,alt:"menu",className:"w-[28px] h-[28px] object-contain",onClick:()=>i(!t)}),fe("div",{className:`${t?"flex":"hidden"} p-6 black-gradient absolute top-20 right-0 mx-4 my-2 min-w-[140px] z-10 rounded-xl`,children:fe("ul",{className:"list-none flex justify-end items-start flex-1 flex-col gap-4",children:aT.map(o=>fe("li",{className:`font-poppins font-medium cursor-pointer text-[16px] ${n===o.title?"text-white":"text-secondary"}`,onClick:()=>{i(!t),e(o.title)},children:fe("a",{href:`#${o.id}`,children:o.title})},o.id))})})]})]})})};var CL={};Object.defineProperty(CL,"__esModule",{value:!0});var Qu=Object.assign||function(n){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:function(){},r=arguments[1];return this.updateElementPosition(),this.setState(Object.assign({},this.state,{style:Qu({},this.state.style,{willChange:"transform"})})),this.setTransition(),i(r)}},{key:"reset",value:function(){var i=this;window.requestAnimationFrame(function(){i.setState(Object.assign({},i.state,{style:Qu({},i.state.style,{transform:"perspective("+i.settings.perspective+"px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"})}))})}},{key:"onMouseMove",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},r=arguments[1];return r.persist(),this.updateCall!==null&&window.cancelAnimationFrame(this.updateCall),this.event=r,this.updateCall=requestAnimationFrame(this.update.bind(this,r)),i(r)}},{key:"setTransition",value:function(){var i=this;clearTimeout(this.transitionTimeout),this.setState(Object.assign({},this.state,{style:Qu({},this.state.style,{transition:this.settings.speed+"ms "+this.settings.easing})})),this.transitionTimeout=setTimeout(function(){i.setState(Object.assign({},i.state,{style:Qu({},i.state.style,{transition:""})}))},this.settings.speed)}},{key:"onMouseLeave",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},r=arguments[1];return this.setTransition(),this.settings.reset&&this.reset(),i(r)}},{key:"getValues",value:function(i){var r=(i.nativeEvent.clientX-this.left)/this.width,s=(i.nativeEvent.clientY-this.top)/this.height,o=Math.min(Math.max(r,0),1),a=Math.min(Math.max(s,0),1),l=(this.reverse*(this.settings.max/2-o*this.settings.max)).toFixed(2),u=(this.reverse*(a*this.settings.max-this.settings.max/2)).toFixed(2),h=o*100,d=a*100;return{tiltX:l,tiltY:u,percentageX:h,percentageY:d}}},{key:"updateElementPosition",value:function(){var i=this.element.getBoundingClientRect();this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.left=i.left,this.top=i.top}},{key:"update",value:function(i){var r=this.getValues(i);this.setState(Object.assign({},this.state,{style:Qu({},this.state.style,{transform:"perspective("+this.settings.perspective+"px) rotateX("+(this.settings.axis==="x"?0:r.tiltY)+"deg) rotateY("+(this.settings.axis==="y"?0:r.tiltX)+"deg) scale3d("+this.settings.scale+", "+this.settings.scale+", "+this.settings.scale+")"})})),this.updateCall=null}},{key:"render",value:function(){var i=Object.assign({},this.props.style,this.state.style);return kj.default.createElement("div",{style:i,className:this.props.className,onMouseEnter:this.onMouseEnter,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave},this.props.children)}}]),e}(EL.Component),bL=CL.default=Vj;const kh=n=>({hidden:{y:-50,opacity:0},show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),Oh=(n,e,t,i)=>({hidden:{x:n==="left"?100:n==="right"?-100:0,y:n==="up"?100:n==="down"?-100:0,opacity:0},show:{x:0,y:0,opacity:1,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),lT=(n,e,t,i)=>({hidden:{x:n==="left"?"-100%":n==="right"?"100%":0,y:n==="up"||n==="down"?"100%":0},show:{x:0,y:0,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),Wj=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),nu=(n,e)=>function(){return et(Bi.section,{variants:Wj(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:.25},className:`${Un.padding} max-w-7xl mx-auto relative z-0`,children:[fe("span",{className:"hash-span",id:e,children:" "}),fe(n,{})]})},jj=({index:n,title:e,icon:t})=>fe(bL,{className:"xs:w-[250px] w-full",children:fe(Bi.div,{variants:Oh("right","spring",n*.5,.75),className:"w-full green-pink-gradient p-[1px] rounded-[20px] shadow-card",children:et("div",{options:{max:45,scale:1,speed:450},className:"bg-tertiary rounded-[20px] py-5 px-12 min-h-[280px] flex justify-evenly items-center flex-col",children:[fe("img",{src:t,alt:"web-development",className:"w-16 h-16 object-contain"}),fe("h3",{className:"text-white text-[20px] font-bold text-center",children:e})]})})}),Jj=()=>et(rg,{children:[et(Bi.div,{variants:kh(),children:[fe("p",{className:Un.sectionSubText,children:"Introduction"}),fe("h2",{className:Un.sectionHeadText,children:"Overview."})]}),et(Bi.p,{variants:Oh("","",.1,1),className:"mt-4 text-secondary text-[17px] max-w-4xl leading-[30px]",children:["Experienced Senior Full Stack Developer with expertise in Javascript Libraries, PHP frameworks and other relevant technologies.",fe("br",{})," I have 6+ years of experience developing and maintaining innovative software solutions to improve business processes and drive efficiency. Skilled at collaborating with cross-functional teams, gathering requirements, designing scalable software solutions. Successfully delivered a mission-critical software project to a demanding client, leading to a long-term partnership and increased revenue. Enthusiastic about leveraging my skills and experience to contribute to the team's success and drive continuous improvement.",fe("br",{}),fe("b",{children:"Let's bring your ideas to real life together!"})]}),fe("div",{className:"mt-20 flex flex-wrap gap-10",children:Bj.map((n,e)=>fe(jj,{index:e,...n},n.title))})]}),Xj=nu(Jj,"about"),Yj=()=>et(rg,{children:[fe(Bi.div,{variants:kh(),children:fe("h2",{className:`${Un.sectionHeadText} text-center`,children:"Skills"})}),fe("div",{className:"flex flex-row flex-wrap justify-center gap-10",children:Rj.map(n=>fe("div",{className:"w-28 h-28",children:fe(RV,{icon:n.icon})},n.name))})]}),Kj=nu(Yj,"");var Yg={},TL={exports:{}};/*! + `)}}}const wV=z.forwardRef((n,e)=>{const[t]=z.useState(()=>new _V(null));return z.createElement("primitive",xr({},n,{object:t,ref:e,attach:"material"}))}),MV=z.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=z.useRef(null),u=z.useRef(Math.random()*1e4);return tu(h=>{var d,p;if(!e||t===0)return;const m=u.current+h.clock.getElapsedTime();l.current.rotation.x=Math.cos(m/4*t)/8*i,l.current.rotation.y=Math.sin(m/4*t)/8*i,l.current.rotation.z=Math.sin(m/4*t)/20*i;let v=Math.sin(m/4*t)/10;v=K1.mapLinear(v,-.1,.1,(d=s==null?void 0:s[0])!==null&&d!==void 0?d:-.1,(p=s==null?void 0:s[1])!==null&&p!==void 0?p:.1),l.current.position.y=v*r,l.current.updateMatrix()}),z.createElement("group",o,z.createElement("group",{ref:F_([l,a]),matrixAutoUpdate:!1},n))});let va,Xu;const SV=z.createContext(null),ZE=new ot,qE=new D,CV=z.forwardRef(({children:n,range:e,limit:t=1e3,...i},r)=>{const s=z.useRef(null),[o,a]=z.useState([]),[[l,u,h]]=z.useState(()=>[new Float32Array(t*3),Float32Array.from({length:t*3},()=>1),Float32Array.from({length:t},()=>1)]);z.useEffect(()=>{s.current.geometry.attributes.position.needsUpdate=!0}),tu(()=>{for(s.current.updateMatrix(),s.current.updateMatrixWorld(),ZE.copy(s.current.matrixWorld).invert(),s.current.geometry.drawRange.count=Math.min(t,e!==void 0?e:t,o.length),va=0;va({getParent:()=>s,subscribe:p=>(a(m=>[...m,p]),()=>a(m=>m.filter(v=>v.current!==p.current)))}),[]);return z.createElement("points",xr({userData:{instances:o},matrixAutoUpdate:!1,ref:F_([r,s]),raycast:()=>null},i),z.createElement("bufferGeometry",null,z.createElement("bufferAttribute",{attach:"attributes-position",count:l.length/3,array:l,itemSize:3,usage:Wa}),z.createElement("bufferAttribute",{attach:"attributes-color",count:u.length/3,array:u,itemSize:3,usage:Wa}),z.createElement("bufferAttribute",{attach:"attributes-size",count:h.length,array:h,itemSize:1,usage:Wa})),z.createElement(SV.Provider,{value:d},n))}),EV=z.forwardRef(({children:n,positions:e,colors:t,sizes:i,stride:r=3,...s},o)=>{const a=z.useRef(null);return tu(()=>{const l=a.current.geometry.attributes;l.position.needsUpdate=!0,t&&(l.color.needsUpdate=!0),i&&(l.size.needsUpdate=!0)}),z.createElement("points",xr({ref:F_([o,a])},s),z.createElement("bufferGeometry",null,z.createElement("bufferAttribute",{attach:"attributes-position",count:e.length/r,array:e,itemSize:r,usage:Wa}),t&&z.createElement("bufferAttribute",{attach:"attributes-color",count:t.length/r,array:t,itemSize:3,usage:Wa}),i&&z.createElement("bufferAttribute",{attach:"attributes-size",count:i.length/r,array:i,itemSize:1,usage:Wa})),n)}),bV=z.forwardRef((n,e)=>n.positions instanceof Float32Array?z.createElement(EV,xr({},n,{ref:e})):z.createElement(CV,xr({},n,{ref:e})));function Ug({all:n,scene:e,camera:t}){const i=Oi(({gl:o})=>o),r=Oi(({camera:o})=>o),s=Oi(({scene:o})=>o);return z.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(u=>{u.visible===!1&&(o.push(u),u.visible=!0)}),i.compile(e||s,t||r);const a=new t_(128);new e_(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(u=>u.visible=!1)},[]),null}const U_=()=>{const{progress:n}=b9();return et(E9,{as:"div",center:!0,style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[he("span",{className:"canvas-loader"}),et("p",{style:{fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40},children:[n.toFixed(2),"%"]})]})},TV=()=>{const n=Ih("./planet/scene.gltf");return he("primitive",{object:n.scene,scale:2.5,"position-y":0,"rotation-y":0})},PV=()=>he(Og,{shadows:!0,frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},camera:{fov:45,near:.1,far:200,position:[-4,3,6]},children:et(z.Suspense,{fallback:he(U_,{}),children:[he(O_,{autoRotate:!0,enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),he(TV,{}),he(Ug,{all:!0})]})}),BV=n=>{const[e]=k_([n.imgUrl]);return et(MV,{speed:1.75,rotationIntensity:1,floatIntensity:2,children:[he("ambientLight",{intensity:.25}),he("directionalLight",{position:[0,0,.05]}),et("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[he("icosahedronGeometry",{args:[1,1]}),he("meshStandardMaterial",{color:"#fff8eb",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),he(gV,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},RV=({icon:n})=>et(Og,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[et(z.Suspense,{fallback:he(U_,{}),children:[he(O_,{enableZoom:!1}),he(BV,{imgUrl:n})]}),he(Ug,{all:!0})]}),LV=({isMobile:n})=>{const e=Ih("./desktop_pc/scene.gltf");return et("mesh",{children:[he("hemisphereLight",{intensity:.15,groundColor:"black"}),he("spotLight",{position:[-20,50,10],angle:.12,penumbra:1,intensity:1,castShadow:!0,"shadow-mapSize":1024}),he("pointLight",{intensity:1}),he("primitive",{object:e.scene,scale:n?.7:.75,position:n?[0,-3,-2.2]:[0,-3.25,-1.5],rotation:[-.01,-.2,-.1]})]})},IV=()=>{const[n,e]=z.useState(!1);return z.useEffect(()=>{const t=window.matchMedia("(max-width: 500px)");e(t.matches);const i=r=>{e(r.matches)};return t.addEventListener("change",i),()=>{t.removeEventListener("change",i)}},[]),et(Og,{frameloop:"demand",shadows:!0,dpr:[1,2],camera:{position:[20,3,5],fov:25},gl:{preserveDrawingBuffer:!0},children:[et(z.Suspense,{fallback:he(U_,{}),children:[he(O_,{enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),he(LV,{isMobile:n})]}),he(Ug,{all:!0})]})};function Mc(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function $E(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function eb(n){for(var e=1;e0&&e<1&&(e*=65536),e=Math.floor(e),e<256&&(e|=e<<8);for(var t=0;t<256;t++){var i;t&1?i=tb[t]^e&255:i=tb[t]^e>>8&255,nb[t]=nb[t+256]=i,ib[t]=ib[t+256]=DV[i%12]}};FV(0);function NV(n){if(typeof n=="number")n=Math.abs(n);else if(typeof n=="string"){var e=n;n=0;for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:OV,i=eb(eb({},UV),e),r=i.radius,s=i.center,o=0;o{const e=z.useRef(),[t]=z.useState(()=>zV(new Float32Array(5e3),{radius:1.2}));return tu((i,r)=>{e.current.rotation.x-=r/10,e.current.rotation.y-=r/15}),he("group",{rotation:[0,0,Math.PI/4],children:he(bV,{ref:e,positions:t,stride:3,frustumCulled:!0,...n,children:he(wV,{transparent:!0,color:"#f272c8",size:.002,sizeAttenuation:!0,depthWrite:!1})})})},HV=()=>he("div",{className:"w-full h-auto absolute inset-0 z-[-1]",children:et(Og,{camera:{position:[0,0,1]},children:[he(z.Suspense,{fallback:null,children:he(GV,{})}),he(Ug,{all:!0})]})}),fR=z.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),zg=z.createContext({});function VV(){return z.useContext(zg).visualElement}const z_=z.createContext(null),Gg=typeof document<"u",sb=Gg?z.useLayoutEffect:z.useEffect,hR=z.createContext({strict:!1});function WV(n,e,t,i){const r=VV(),s=z.useContext(hR),o=z.useContext(z_),a=z.useContext(fR).reducedMotion,l=z.useRef();i=i||s.renderer,!l.current&&i&&(l.current=i(n,{visualState:e,parent:r,props:t,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;return z.useInsertionEffect(()=>{u&&u.update(t,o)}),sb(()=>{u&&u.render()}),z.useEffect(()=>{u&&u.updateFeatures()}),(window.HandoffAppearAnimations?sb:z.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),u}function fc(n){return typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function jV(n,e,t){return z.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):fc(t)&&(t.current=i))},[e])}function $f(n){return typeof n=="string"||Array.isArray(n)}function Hg(n){return typeof n=="object"&&typeof n.start=="function"}const G_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],H_=["initial",...G_];function Vg(n){return Hg(n.animate)||H_.some(e=>$f(n[e]))}function dR(n){return!!(Vg(n)||n.variants)}function JV(n,e){if(Vg(n)){const{initial:t,animate:i}=n;return{initial:t===!1||$f(t)?t:void 0,animate:$f(i)?i:void 0}}return n.inherit!==!1?e:{}}function XV(n){const{initial:e,animate:t}=JV(n,z.useContext(zg));return z.useMemo(()=>({initial:e,animate:t}),[ob(e),ob(t)])}function ob(n){return Array.isArray(n)?n.join(" "):n}const ab={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},eh={};for(const n in ab)eh[n]={isEnabled:e=>ab[n].some(t=>!!e[t])};function YV(n){for(const e in n)eh[e]={...eh[e],...n[e]}}function pR(n){const e=z.useRef(null);return e.current===null&&(e.current=n()),e.current}const yf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let KV=1;function QV(){return pR(()=>{if(yf.hasEverUpdated)return KV++})}const mR=z.createContext({}),gR=z.createContext({}),ZV=Symbol.for("motionComponentSymbol");function qV({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&YV(n);function s(a,l){let u;const h={...z.useContext(fR),...a,layoutId:$V(a)},{isStatic:d}=h,p=XV(a),m=d?void 0:QV(),v=i(a,d);if(!d&&Gg){p.visualElement=WV(r,v,h,e);const y=z.useContext(gR),x=z.useContext(hR).strict;p.visualElement&&(u=p.visualElement.loadFeatures(h,x,n,m,y))}return z.createElement(zg.Provider,{value:p},u&&p.visualElement?z.createElement(u,{visualElement:p.visualElement,...h}):null,t(r,a,m,jV(v,p.visualElement,l),v,d,p.visualElement))}const o=z.forwardRef(s);return o[ZV]=r,o}function $V({layoutId:n}){const e=z.useContext(mR).id;return e&&n!==void 0?e+"-"+n:n}function e8(n){function e(i,r={}){return qV(n(i,r))}if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(e,{get:(i,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}const t8=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function V_(n){return typeof n!="string"||n.includes("-")?!1:!!(t8.indexOf(n)>-1||/[A-Z]/.test(n))}const Xm={};function n8(n){Object.assign(Xm,n)}const Wg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fl=new Set(Wg);function yR(n,{layout:e,layoutId:t}){return fl.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!Xm[n]||n==="opacity")}const Pi=n=>!!(n&&n.getVelocity),i8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},r8=Wg.length;function s8(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),xR=vR("--"),MA=vR("var(--"),o8=(n,e)=>e&&typeof n=="number"?e.transform(n):n,Gc=(n,e,t)=>Math.min(Math.max(t,n),e),hl={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},vf={...hl,transform:n=>Gc(0,1,n)},Hp={...hl,default:1},xf=n=>Math.round(n*1e5)/1e5,th=/(-)?([\d]*\.?[\d])+/g,SA=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,a8=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dh(n){return typeof n=="string"}const Fh=n=>({test:e=>Dh(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),ho=Fh("deg"),ss=Fh("%"),st=Fh("px"),l8=Fh("vh"),c8=Fh("vw"),lb={...ss,parse:n=>ss.parse(n)/100,transform:n=>ss.transform(n*100)},cb={...hl,transform:Math.round},AR={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,size:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,rotate:ho,rotateX:ho,rotateY:ho,rotateZ:ho,scale:Hp,scaleX:Hp,scaleY:Hp,scaleZ:Hp,skew:ho,skewX:ho,skewY:ho,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:vf,originX:lb,originY:lb,originZ:st,zIndex:cb,fillOpacity:vf,strokeOpacity:vf,numOctaves:cb};function W_(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let l=!1,u=!1,h=!0;for(const d in e){const p=e[d];if(xR(d)){s[d]=p;continue}const m=AR[d],v=o8(p,m);if(fl.has(d)){if(l=!0,o[d]=v,!h)continue;p!==(m.default||0)&&(h=!1)}else d.startsWith("origin")?(u=!0,a[d]=v):r[d]=v}if(e.transform||(l||i?r.transform=s8(n.transform,t,h,i):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:p="50%",originZ:m=0}=a;r.transformOrigin=`${d} ${p} ${m}`}}const j_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _R(n,e,t){for(const i in e)!Pi(e[i])&&!yR(i,t)&&(n[i]=e[i])}function u8({transformTemplate:n},e,t){return z.useMemo(()=>{const i=j_();return W_(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function f8(n,e,t){const i=n.style||{},r={};return _R(r,i,n),Object.assign(r,u8(n,e,t)),n.transformValues?n.transformValues(r):r}function h8(n,e,t){const i={},r=f8(n,e,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=r,i}const d8=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Ym(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||d8.has(n)}let wR=n=>!Ym(n);function p8(n){n&&(wR=e=>e.startsWith("on")?!Ym(e):n(e))}try{p8(require("@emotion/is-prop-valid").default)}catch{}function m8(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(wR(r)||t===!0&&Ym(r)||!e&&!Ym(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function ub(n,e,t){return typeof n=="string"?n:st.transform(e+t*n)}function g8(n,e,t){const i=ub(e,n.x,n.width),r=ub(t,n.y,n.height);return`${i} ${r}`}const y8={offset:"stroke-dashoffset",array:"stroke-dasharray"},v8={offset:"strokeDashoffset",array:"strokeDasharray"};function x8(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?y8:v8;n[s.offset]=st.transform(-i);const o=st.transform(e),a=st.transform(t);n[s.array]=`${o} ${a}`}function J_(n,{attrX:e,attrY:t,originX:i,originY:r,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},u,h,d){if(W_(n,l,u,d),h){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:p,style:m,dimensions:v}=n;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(i!==void 0||r!==void 0||m.transform)&&(m.transformOrigin=g8(v,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(p.x=e),t!==void 0&&(p.y=t),s!==void 0&&x8(p,s,o,a,!1)}const MR=()=>({...j_(),attrs:{}}),X_=n=>typeof n=="string"&&n.toLowerCase()==="svg";function A8(n,e,t,i){const r=z.useMemo(()=>{const s=MR();return J_(s,e,{enableHardwareAcceleration:!1},X_(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};_R(s,n.style,n),r.style={...s,...r.style}}return r}function _8(n=!1){return(t,i,r,s,{latestValues:o},a)=>{const u=(V_(t)?A8:h8)(i,o,a,t),d={...m8(i,typeof t=="string",n),...u,ref:s},{children:p}=i,m=z.useMemo(()=>Pi(p)?p.get():p,[p]);return r&&(d["data-projection-id"]=r),z.createElement(t,{...d,children:m})}}const Y_=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function SR(n,{style:e,vars:t},i,r){Object.assign(n.style,e,r&&r.getProjectionStyles(i));for(const s in t)n.style.setProperty(s,t[s])}const CR=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ER(n,e,t,i){SR(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(CR.has(r)?r:Y_(r),e.attrs[r])}function K_(n,e){const{style:t}=n,i={};for(const r in t)(Pi(t[r])||e.style&&Pi(e.style[r])||yR(r,n))&&(i[r]=t[r]);return i}function bR(n,e){const t=K_(n,e);for(const i in n)if(Pi(n[i])||Pi(e[i])){const r=i==="x"||i==="y"?"attr"+i.toUpperCase():i;t[r]=n[i]}return t}function Q_(n,e,t,i={},r={}){return typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),e}const Km=n=>Array.isArray(n),w8=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),M8=n=>Km(n)?n[n.length-1]||0:n;function pm(n){const e=Pi(n)?n.get():n;return w8(e)?e.toValue():e}function S8({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:C8(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const TR=n=>(e,t)=>{const i=z.useContext(zg),r=z.useContext(z_),s=()=>S8(n,e,i,r);return t?s():pR(s)};function C8(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=pm(s[p]);let{initial:o,animate:a}=n;const l=Vg(n),u=dR(n);e&&u&&!l&&n.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let h=t?t.initial===!1:!1;h=h||o===!1;const d=h?a:o;return d&&typeof d!="boolean"&&!Hg(d)&&(Array.isArray(d)?d:[d]).forEach(m=>{const v=Q_(n,m);if(!v)return;const{transitionEnd:y,transition:x,...A}=v;for(const _ in A){let w=A[_];if(Array.isArray(w)){const S=h?w.length-1:0;w=w[S]}w!==null&&(r[_]=w)}for(const _ in y)r[_]=y[_]}),r}const E8={useVisualState:TR({scrapeMotionValuesFromProps:bR,createRenderState:MR,onMount:(n,e,{renderState:t,latestValues:i})=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}J_(t,i,{enableHardwareAcceleration:!1},X_(e.tagName),n.transformTemplate),ER(e,t)}})},b8={useVisualState:TR({scrapeMotionValuesFromProps:K_,createRenderState:j_})};function T8(n,{forwardMotionProps:e=!1},t,i){return{...V_(n)?E8:b8,preloadedFeatures:t,useRender:_8(e),createVisualElement:i,Component:n}}function Ns(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const PR=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function jg(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const P8=n=>e=>PR(e)&&n(e,jg(e));function Us(n,e,t,i){return Ns(n,e,P8(t),i)}const B8=(n,e)=>t=>e(n(t)),Lo=(...n)=>n.reduce(B8);function BR(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const fb=BR("dragHorizontal"),hb=BR("dragVertical");function RR(n){let e=!1;if(n==="y")e=hb();else if(n==="x")e=fb();else{const t=fb(),i=hb();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function LR(){const n=RR(!0);return n?(n(),!1):!0}class qo{constructor(e){this.isMounted=!1,this.node=e}update(){}}function db(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.type==="touch"||LR())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&a[i](s,o)};return Us(n.current,t,r,{passive:!n.getProps()[i]})}class R8 extends qo{mount(){this.unmount=Lo(db(this.node,!0),db(this.node,!1))}unmount(){}}class L8 extends qo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Lo(Ns(this.node.current,"focus",()=>this.onFocus()),Ns(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const IR=(n,e)=>e?n===e?!0:IR(n,e.parentElement):!1,gr=n=>n;function Mv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,jg(t))}class I8 extends qo{constructor(){super(...arguments),this.removeStartListeners=gr,this.removeEndListeners=gr,this.removeAccessibleListeners=gr,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const i=this.node.getProps(),s=Us(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:h}=this.node.getProps();IR(this.node.current,a.target)?u&&u(a,l):h&&h(a,l)},{passive:!(i.onTap||i.onPointerUp)}),o=Us(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Lo(s,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Mv("up",this.node.getProps().onTap)};this.removeEndListeners(),this.removeEndListeners=Ns(this.node.current,"keyup",o),Mv("down",(a,l)=>{this.startPress(a,l)})},t=Ns(this.node.current,"keydown",e),i=()=>{this.isPressing&&Mv("cancel",(s,o)=>this.cancelPress(s,o))},r=Ns(this.node.current,"blur",i);this.removeAccessibleListeners=Lo(t,r)}}startPress(e,t){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&i(e,t)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!LR()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&i(e,t)}mount(){const e=this.node.getProps(),t=Us(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Ns(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Lo(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const CA=new WeakMap,Sv=new WeakMap,D8=n=>{const e=CA.get(n.target);e&&e(n)},F8=n=>{n.forEach(D8)};function N8({root:n,...e}){const t=n||document;Sv.has(t)||Sv.set(t,{});const i=Sv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(F8,{root:n,...e})),i[r]}function k8(n,e,t){const i=N8(e);return CA.set(n,t),i.observe(n),()=>{CA.delete(n),i.unobserve(n)}}const O8={some:0,all:1};class U8 extends qo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:e}=this.node.getProps();e&&e(null),this.node.animationState&&this.node.animationState.setActive("whileInView",!0)})}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:r="some",once:s,fallback:o=!0}=e;if(typeof IntersectionObserver>"u"){o&&this.viewportFallback();return}const a={root:t?t.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:O8[r]},l=u=>{const{isIntersecting:h}=u;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),m=h?d:p;m&&m(u)};return k8(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(z8(e,t))&&this.startObserver()}unmount(){}}function z8({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const G8={inView:{Feature:U8},tap:{Feature:I8},focus:{Feature:L8},hover:{Feature:R8}};function DR(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let i=0;i/^\-?\d*\.?\d+$/.test(n),V8=n=>/^0[^.\s]+$/.test(n),zs={delta:0,timestamp:0},FR=1/60*1e3,W8=typeof performance<"u"?()=>performance.now():()=>Date.now(),NR=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(W8()),FR);function j8(n){let e=[],t=[],i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,u=!1,h=!1)=>{const d=h&&r,p=d?e:t;return u&&o.add(l),p.indexOf(l)===-1&&(p.push(l),d&&r&&(i=e.length)),l},cancel:l=>{const u=t.indexOf(l);u!==-1&&t.splice(u,1),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let u=0;u(n[e]=j8(()=>nh=!0),n),{}),pi=Nh.reduce((n,e)=>{const t=Jg[e];return n[e]=(i,r=!1,s=!1)=>(nh||Y8(),t.schedule(i,r,s)),n},{}),Go=Nh.reduce((n,e)=>(n[e]=Jg[e].cancel,n),{}),Cv=Nh.reduce((n,e)=>(n[e]=()=>Jg[e].process(zs),n),{}),X8=n=>Jg[n].process(zs),kR=n=>{nh=!1,zs.delta=EA?FR:Math.max(Math.min(n-zs.timestamp,J8),1),zs.timestamp=n,bA=!0,Nh.forEach(X8),bA=!1,nh&&(EA=!1,NR(kR))},Y8=()=>{nh=!0,EA=!0,bA||NR(kR)};function Z_(n,e){n.indexOf(e)===-1&&n.push(e)}function q_(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class $_{constructor(){this.subscriptions=[]}add(e){return Z_(this.subscriptions,e),()=>q_(this.subscriptions,e)}notify(e,t,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,i);else for(let s=0;s!isNaN(parseFloat(n));class Q8{constructor(e,t={}){this.version="9.1.7",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,r=!0)=>{this.prev=this.current,this.current=i;const{delta:s,timestamp:o}=zs;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,pi.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>pi.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=K8(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new $_);const i=this.events[e].add(t);return e==="change"?()=>{i(),pi.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,i){this.set(t),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ew(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hc(n,e){return new Q8(n,e)}const tw=(n,e)=>t=>!!(Dh(t)&&a8.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),OR=(n,e,t)=>i=>{if(!Dh(i))return i;const[r,s,o,a]=i.match(th);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Z8=n=>Gc(0,255,n),Ev={...hl,transform:n=>Math.round(Z8(n))},Ua={test:tw("rgb","red"),parse:OR("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Ev.transform(n)+", "+Ev.transform(e)+", "+Ev.transform(t)+", "+xf(vf.transform(i))+")"};function q8(n){let e="",t="",i="",r="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),i=n.substring(5,7),r=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),i=n.substring(3,4),r=n.substring(4,5),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const TA={test:tw("#"),parse:q8,transform:Ua.transform},hc={test:tw("hsl","hue"),parse:OR("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+ss.transform(xf(e))+", "+ss.transform(xf(t))+", "+xf(vf.transform(i))+")"},ui={test:n=>Ua.test(n)||TA.test(n)||hc.test(n),parse:n=>Ua.test(n)?Ua.parse(n):hc.test(n)?hc.parse(n):TA.parse(n),transform:n=>Dh(n)?n:n.hasOwnProperty("red")?Ua.transform(n):hc.transform(n)},UR="${c}",zR="${n}";function $8(n){var e,t;return isNaN(n)&&Dh(n)&&(((e=n.match(th))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(SA))===null||t===void 0?void 0:t.length)||0)>0}function Qm(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0,i=0;const r=n.match(SA);r&&(t=r.length,n=n.replace(SA,UR),e.push(...r.map(ui.parse)));const s=n.match(th);return s&&(i=s.length,n=n.replace(th,zR),e.push(...s.map(hl.parse))),{values:e,numColors:t,numNumbers:i,tokenised:n}}function GR(n){return Qm(n).values}function HR(n){const{values:e,numColors:t,tokenised:i}=Qm(n),r=e.length;return s=>{let o=i;for(let a=0;atypeof n=="number"?0:n;function t6(n){const e=GR(n);return HR(n)(e.map(e6))}const Ho={test:$8,parse:GR,createTransformer:HR,getAnimatableNone:t6},n6=new Set(["brightness","contrast","saturate","opacity"]);function i6(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(th)||[];if(!i)return n;const r=t.replace(i,"");let s=n6.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const r6=/([a-z-]*)\(.*?\)/g,PA={...Ho,getAnimatableNone:n=>{const e=n.match(r6);return e?e.map(i6).join(" "):n}},s6={...AR,color:ui,backgroundColor:ui,outlineColor:ui,fill:ui,stroke:ui,borderColor:ui,borderTopColor:ui,borderRightColor:ui,borderBottomColor:ui,borderLeftColor:ui,filter:PA,WebkitFilter:PA},nw=n=>s6[n];function iw(n,e){let t=nw(n);return t!==PA&&(t=Ho),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const VR=n=>e=>e.test(n),o6={test:n=>n==="auto",parse:n=>n},WR=[hl,st,ss,ho,c8,l8,o6],Yu=n=>WR.find(VR(n)),a6=[...WR,ui,Ho],l6=n=>a6.find(VR(n));function c6(n){const e={};return n.values.forEach((t,i)=>e[i]=t.get()),e}function u6(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function Xg(n,e,t){const i=n.getProps();return Q_(i,e,t!==void 0?t:i.custom,c6(n),u6(n))}function f6(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,Hc(t))}function h6(n,e){const t=Xg(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=M8(s[o]);f6(n,o,a)}}function d6(n,e,t){var i,r;const s=Object.keys(e).filter(a=>!n.hasValue(a)),o=s.length;if(o)for(let a=0;an*1e3,x6={current:!1},rw=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,sw=n=>e=>1-n(1-e),ow=n=>n*n,A6=sw(ow),aw=rw(ow),sn=(n,e,t)=>-t*n+t*e+n;function bv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function _6({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=bv(l,a,n+1/3),s=bv(l,a,n),o=bv(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const Tv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},w6=[TA,Ua,hc],M6=n=>w6.find(e=>e.test(n));function pb(n){const e=M6(n);let t=e.parse(n);return e===hc&&(t=_6(t)),t}const jR=(n,e)=>{const t=pb(n),i=pb(e),r={...t};return s=>(r.red=Tv(t.red,i.red,s),r.green=Tv(t.green,i.green,s),r.blue=Tv(t.blue,i.blue,s),r.alpha=sn(t.alpha,i.alpha,s),Ua.transform(r))};function JR(n,e){return typeof n=="number"?t=>sn(n,e,t):ui.test(n)?jR(n,e):YR(n,e)}const XR=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>JR(s,e[o]));return s=>{for(let o=0;o{const t={...n,...e},i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=JR(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},YR=(n,e)=>{const t=Ho.createTransformer(e),i=Qm(n),r=Qm(e);return i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?Lo(XR(i.values,r.values),t):o=>`${o>0?e:n}`},ih=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},mb=(n,e)=>t=>sn(n,e,t);function C6(n){return typeof n=="number"?mb:typeof n=="string"?ui.test(n)?jR:YR:Array.isArray(n)?XR:typeof n=="object"?S6:mb}function E6(n,e,t){const i=[],r=t||C6(n[0]),s=n.length-1;for(let o=0;on[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const o=E6(e,i,r),a=o.length,l=u=>{let h=0;if(a>1)for(;hl(Gc(n[0],n[s-1],u)):l}function b6(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=ih(0,e,i);n.push(sn(t,1,r))}}function T6(n){const e=[0];return b6(e,n.length-1),e}function P6(n,e){return n.map(t=>t*e)}const QR=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,B6=1e-7,R6=12;function L6(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=QR(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>B6&&++aL6(s,0,1,n,t);return s=>s===0||s===1?s:QR(r(s),e,i)}const qR=n=>1-Math.sin(Math.acos(n)),lw=sw(qR),I6=rw(lw),$R=ZR(.33,1.53,.69,.99),cw=sw($R),D6=rw(cw),F6=n=>(n*=2)<1?.5*cw(n):.5*(2-Math.pow(2,-10*(n-1))),N6={linear:gr,easeIn:ow,easeInOut:aw,easeOut:A6,circIn:qR,circInOut:I6,circOut:lw,backIn:cw,backInOut:D6,backOut:$R,anticipate:F6},gb=n=>{if(Array.isArray(n)){qm(n.length===4);const[e,t,i,r]=n;return ZR(e,t,i,r)}else if(typeof n=="string")return N6[n];return n},k6=n=>Array.isArray(n)&&typeof n[0]!="number";function O6(n,e){return n.map(()=>e||aw).splice(0,n.length-1)}function BA({keyframes:n,ease:e=aw,times:t,duration:i=300}){n=[...n];const r=k6(e)?e.map(gb):gb(e),s={done:!1,value:n[0]},o=P6(t&&t.length===n.length?t:T6(n),i);function a(){return KR(o,n,{ease:Array.isArray(r)?r:O6(n,r)})}let l=a();return{next:u=>(s.value=l(u),s.done=u>=i,s),flipTarget:()=>{n.reverse(),l=a()}}}const Pv=.001,U6=.01,yb=10,z6=.05,G6=1;function H6({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;v6(n<=yb*1e3);let o=1-e;o=Gc(z6,G6,o),n=Gc(U6,yb,n/1e3),o<1?(r=u=>{const h=u*o,d=h*n,p=h-t,m=RA(u,o),v=Math.exp(-d);return Pv-p/m*v},s=u=>{const d=u*o*n,p=d*t+t,m=Math.pow(o,2)*Math.pow(u,2)*n,v=Math.exp(-d),y=RA(Math.pow(u,2),o);return(-r(u)+Pv>0?-1:1)*((p-m)*v)/y}):(r=u=>{const h=Math.exp(-u*n),d=(u-t)*n+1;return-Pv+h*d},s=u=>{const h=Math.exp(-u*n),d=(t-u)*(n*n);return h*d});const a=5/n,l=W6(r,s,a);if(n=n*1e3,isNaN(l))return{stiffness:100,damping:10,duration:n};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:n}}}const V6=12;function W6(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function X6(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!vb(n,J6)&&vb(n,j6)){const t=H6(n);e={...e,...t,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Y6=5;function eL({keyframes:n,restDelta:e,restSpeed:t,...i}){let r=n[0],s=n[n.length-1];const o={done:!1,value:r},{stiffness:a,damping:l,mass:u,velocity:h,duration:d,isResolvedFromDuration:p}=X6(i);let m=K6,v=h?-(h/1e3):0;const y=l/(2*Math.sqrt(a*u));function x(){const A=s-r,_=Math.sqrt(a/u)/1e3,w=Math.abs(A)<5;if(t||(t=w?.01:2),e||(e=w?.005:.5),y<1){const S=RA(_,y);m=E=>{const P=Math.exp(-y*_*E);return s-P*((v+y*_*A)/S*Math.sin(S*E)+A*Math.cos(S*E))}}else if(y===1)m=S=>s-Math.exp(-_*S)*(A+(v+_*A)*S);else{const S=_*Math.sqrt(y*y-1);m=E=>{const P=Math.exp(-y*_*E),R=Math.min(S*E,300);return s-P*((v+y*_*A)*Math.sinh(R)+S*A*Math.cosh(R))/S}}}return x(),{next:A=>{const _=m(A);if(p)o.done=A>=d;else{let w=v;if(A!==0)if(y<1){const P=Math.max(0,A-Y6);w=ew(_-m(P),A-P)}else w=0;const S=Math.abs(w)<=t,E=Math.abs(s-_)<=e;o.done=S&&E}return o.value=o.done?s:_,o},flipTarget:()=>{v=-v,[r,s]=[s,r],x()}}}eL.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const K6=n=>0;function Q6({keyframes:n=[0],velocity:e=0,power:t=.8,timeConstant:i=350,restDelta:r=.5,modifyTarget:s}){const o=n[0],a={done:!1,value:o};let l=t*e;const u=o+l,h=s===void 0?u:s(u);return h!==u&&(l=h-o),{next:d=>{const p=-l*Math.exp(-d/i);return a.done=!(p>r||p<-r),a.value=a.done?h:h+p,a},flipTarget:()=>{}}}const Z6={decay:Q6,keyframes:BA,tween:BA,spring:eL};function tL(n,e,t=0){return n-e-t}function q6(n,e=0,t=0,i=!0){return i?tL(e+-n,e,t):e-(n-e)+t}function $6(n,e,t,i){return i?n>=e+t:n<=-t}const eW=n=>{const e=({delta:t})=>n(t);return{start:()=>pi.update(e,!0),stop:()=>Go.update(e)}};function $m({duration:n,driver:e=eW,elapsed:t=0,repeat:i=0,repeatType:r="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:u,onComplete:h,onRepeat:d,onUpdate:p,type:m="keyframes",...v}){const y=t;let x,A=0,_=n,w=!1,S=!0,E;const P=Z6[o.length>2?"keyframes":m]||BA,R=o[0],b=o[o.length-1];let B={done:!1,value:R};const{needsInterpolation:L}=P;L&&L(R,b)&&(E=KR([0,100],[R,b],{clamp:!1}),o=[0,100]);const U=P({...v,duration:n,keyframes:o});function Z(){A++,r==="reverse"?(S=A%2===0,t=q6(t,_,s,S)):(t=tL(t,_,s),r==="mirror"&&U.flipTarget()),w=!1,d&&d()}function V(){x&&x.stop(),h&&h()}function H(ie){S||(ie=-ie),t+=ie,w||(B=U.next(Math.max(0,t)),E&&(B.value=E(B.value)),w=S?B.done:t<=0),p&&p(B.value),w&&(A===0&&(_=_!==void 0?_:t),A{u&&u(),x&&x.stop()},set currentTime(ie){t=y,H(ie)},sample:ie=>{t=y;const ce=n&&typeof n=="number"?Math.max(n*.5,50):50;let N=0;for(H(0);N<=ie;){const J=ie-N;H(Math.min(J,ce)),N+=ce}return B}}}function tW(n){return!n||Array.isArray(n)||typeof n=="string"&&nL[n]}const nf=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,nL={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:nf([0,.65,.55,1]),circOut:nf([.55,0,1,.45]),backIn:nf([.31,.01,.66,-.59]),backOut:nf([.33,1.53,.69,.99])};function nW(n){if(n)return Array.isArray(n)?nf(n):nL[n]}function iW(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){return n.animate({[e]:t,offset:l},{delay:i,duration:r,easing:nW(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const xb={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Bv={},iL={};for(const n in xb)iL[n]=()=>(Bv[n]===void 0&&(Bv[n]=xb[n]()),Bv[n]);function rW(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const sW=new Set(["opacity","clipPath","filter","transform"]),Vp=10;function oW(n,e,{onUpdate:t,onComplete:i,...r}){if(!(iL.waapi()&&sW.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:u}=r;if(r.type==="spring"||!tW(r.ease)){if(r.repeat===1/0)return;const d=$m({...r,elapsed:0});let p={done:!1,value:o[0]};const m=[];let v=0;for(;!p.done&&v<2e4;)p=d.sample(v),m.push(p.value),v+=Vp;o=m,a=v-Vp,u="linear"}const h=iW(n.owner.current,e,o,{...r,delay:-l,duration:a,ease:u});return h.onfinish=()=>{n.set(rW(o,r)),pi.update(()=>h.cancel()),i&&i()},{get currentTime(){return h.currentTime||0},set currentTime(d){h.currentTime=d},stop:()=>{const{currentTime:d}=h;if(d){const p=$m({...r,autoplay:!1});n.setWithVelocity(p.sample(d-Vp).value,p.sample(d).value,Vp)}pi.update(()=>h.cancel())}}}function rL(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&(Go.read(i),n(s-e))};return pi.read(i,!0),()=>Go.read(i)}function aW({keyframes:n,elapsed:e,onUpdate:t,onComplete:i}){const r=()=>{t&&t(n[n.length-1]),i&&i()};return e?{stop:rL(r,-e)}:r()}function lW({keyframes:n,velocity:e=0,min:t,max:i,power:r=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:d,onComplete:p,onStop:m}){const v=n[0];let y;function x(S){return t!==void 0&&Si}function A(S){return t===void 0?i:i===void 0||Math.abs(t-S){d&&d(E),S.onUpdate&&S.onUpdate(E)},onComplete:p,onStop:m})}function w(S){_({type:"spring",stiffness:o,damping:a,restDelta:l,...S})}if(x(v))w({velocity:e,keyframes:[v,A(v)]});else{let S=r*e+v;typeof u<"u"&&(S=u(S));const E=A(S),P=E===t?-1:1;let R,b;const B=L=>{R=b,b=L,e=ew(L-R,zs.delta),(P===1&&L>E||P===-1&&Ly&&y.stop()}}const cW={type:"spring",stiffness:500,damping:25,restSpeed:10},uW=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),fW={type:"keyframes",duration:.8},hW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dW=(n,{keyframes:e})=>e.length>2?fW:fl.has(n)?n.startsWith("scale")?uW(e[1]):cW:hW,LA=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Ho.test(e)&&!e.startsWith("url("));function pW({when:n,delay:e,delayChildren:t,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length}function Ab(n){return n===0||typeof n=="string"&&parseFloat(n)===0&&n.indexOf(" ")===-1}function _b(n){return typeof n=="number"?0:iw("",n)}function sL(n,e){return n[e]||n.default||n}function mW(n,e,t,i){const r=LA(e,t);let s=i.from!==void 0?i.from:n.get();return s==="none"&&r&&typeof t=="string"?s=iw(e,t):Ab(s)&&typeof t=="string"?s=_b(t):!Array.isArray(t)&&Ab(t)&&typeof s=="string"&&(t=_b(s)),Array.isArray(t)?(t[0]===null&&(t[0]=s),t):[s,t]}const uw=(n,e,t,i={})=>r=>{const s=sL(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-mm(o);const l=mW(e,n,t,s),u=l[0],h=l[l.length-1],d=LA(n,u),p=LA(n,h);let m={keyframes:l,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:v=>{e.set(v),s.onUpdate&&s.onUpdate(v)},onComplete:()=>{r(),s.onComplete&&s.onComplete()}};if(!d||!p||x6.current||s.type===!1)return aW(m);if(s.type==="inertia")return lW(m);if(pW(s)||(m={...m,...dW(n,m)}),m.duration&&(m.duration=mm(m.duration)),m.repeatDelay&&(m.repeatDelay=mm(m.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const v=oW(e,n,m);if(v)return v}return $m(m)};function gW(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>IA(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=IA(n,e,t);else{const r=typeof e=="function"?Xg(n,e,t.custom):e;i=oL(n,r,t)}return i.then(()=>n.notify("AnimationComplete",e))}function IA(n,e,t={}){const i=Xg(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>oL(n,i,t):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:d}=r;return yW(n,e,u+l,h,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,u]=a==="beforeChildren"?[s,o]:[o,s];return l().then(u)}else return Promise.all([s(),o(t.delay)])}function oL(n,e,{delay:t=0,transitionOverride:i,type:r}={}){let{transition:s=n.getDefaultTransition(),transitionEnd:o,...a}=n.makeTargetAnimatable(e);const l=n.getValue("willChange");i&&(s=i);const u=[],h=r&&n.animationState&&n.animationState.getState()[r];for(const d in a){const p=n.getValue(d),m=a[d];if(!p||m===void 0||h&&xW(h,d))continue;const v={delay:t,elapsed:0,...s};if(window.HandoffAppearAnimations&&!p.hasAnimated){const x=n.getProps()[y6];x&&(v.elapsed=window.HandoffAppearAnimations(x,d,p,pi))}let y=p.start(uw(d,p,m,n.shouldReduceMotion&&fl.has(d)?{type:!1}:v));Zm(l)&&(l.add(d),y=y.then(()=>l.remove(d))),u.push(y)}return Promise.all(u).then(()=>{o&&h6(n,o)})}function yW(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,l=r===1?(u=0)=>u*i:(u=0)=>a-u*i;return Array.from(n.variantChildren).sort(vW).forEach((u,h)=>{u.notify("AnimationStart",e),o.push(IA(u,e,{...s,delay:t+l(h)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function vW(n,e){return n.sortNodePosition(e)}function xW({protectedKeys:n,needsAnimating:e},t){const i=n.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,i}const AW=[...G_].reverse(),_W=G_.length;function wW(n){return e=>Promise.all(e.map(({animation:t,options:i})=>gW(n,t,i)))}function MW(n){let e=wW(n);const t=CW();let i=!0;const r=(l,u)=>{const h=Xg(n,u);if(h){const{transition:d,transitionEnd:p,...m}=h;l={...l,...m,...p}}return l};function s(l){e=l(n)}function o(l,u){const h=n.getProps(),d=n.getVariantContext(!0)||{},p=[],m=new Set;let v={},y=1/0;for(let A=0;A<_W;A++){const _=AW[A],w=t[_],S=h[_]!==void 0?h[_]:d[_],E=$f(S),P=_===u?w.isActive:null;P===!1&&(y=A);let R=S===d[_]&&S!==h[_]&&E;if(R&&i&&n.manuallyAnimateOnMount&&(R=!1),w.protectedKeys={...v},!w.isActive&&P===null||!S&&!w.prevProp||Hg(S)||typeof S=="boolean")continue;const b=SW(w.prevProp,S);let B=b||_===u&&w.isActive&&!R&&E||A>y&&E;const L=Array.isArray(S)?S:[S];let U=L.reduce(r,{});P===!1&&(U={});const{prevResolvedValues:Z={}}=w,V={...Z,...U},H=K=>{B=!0,m.delete(K),w.needsAnimating[K]=!0};for(const K in V){const ie=U[K],ce=Z[K];v.hasOwnProperty(K)||(ie!==ce?Km(ie)&&Km(ce)?!DR(ie,ce)||b?H(K):w.protectedKeys[K]=!0:ie!==void 0?H(K):m.add(K):ie!==void 0&&m.has(K)?H(K):w.protectedKeys[K]=!0)}w.prevProp=S,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),i&&n.blockInitialAnimation&&(B=!1),B&&!R&&p.push(...L.map(K=>({animation:K,options:{type:_,...l}})))}if(m.size){const A={};m.forEach(_=>{const w=n.getBaseTarget(_);w!==void 0&&(A[_]=w)}),p.push({animation:A})}let x=!!p.length;return i&&h.initial===!1&&!n.manuallyAnimateOnMount&&(x=!1),i=!1,x?e(p):Promise.resolve()}function a(l,u,h){var d;if(t[l].isActive===u)return Promise.resolve();(d=n.variantChildren)===null||d===void 0||d.forEach(m=>{var v;return(v=m.animationState)===null||v===void 0?void 0:v.setActive(l,u)}),t[l].isActive=u;const p=o(h,l);for(const m in t)t[m].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function SW(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!DR(e,n):!1}function xa(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function CW(){return{animate:xa(!0),whileInView:xa(),whileHover:xa(),whileTap:xa(),whileDrag:xa(),whileFocus:xa(),exit:xa()}}class EW extends qo{constructor(e){super(e),e.animationState||(e.animationState=MW(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Hg(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}let bW=0;class TW extends qo{constructor(){super(...arguments),this.id=bW++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});t&&!e&&s.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const PW={animation:{Feature:EW},exit:{Feature:TW}},wb=(n,e)=>Math.abs(n-e);function BW(n,e){const t=wb(n.x,e.x),i=wb(n.y,e.y);return Math.sqrt(t**2+i**2)}class aL{constructor(e,t,{transformPagePoint:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Lv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=BW(u.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=u,{timestamp:m}=zs;this.history.push({...p,timestamp:m});const{onStart:v,onMove:y}=this.handlers;h||(v&&v(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Rv(h,this.transformPagePoint),pi.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:p}=this.handlers,m=Lv(u.type==="pointercancel"?this.lastMoveEventInfo:Rv(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,m),p&&p(u,m)},!PR(e))return;this.handlers=t,this.transformPagePoint=i;const r=jg(e),s=Rv(r,this.transformPagePoint),{point:o}=s,{timestamp:a}=zs;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Lv(s,this.history)),this.removeListeners=Lo(Us(window,"pointermove",this.handlePointerMove),Us(window,"pointerup",this.handlePointerUp),Us(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Go.update(this.updatePoint)}}function Rv(n,e){return e?{point:e(n.point)}:n}function Mb(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Lv({point:n},e){return{point:n,delta:Mb(n,lL(e)),offset:Mb(n,RW(e)),velocity:LW(e,.1)}}function RW(n){return n[0]}function lL(n){return n[n.length-1]}function LW(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=lL(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>mm(e)));)t--;if(!i)return{x:0,y:0};const s=(r.timestamp-i.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ji(n){return n.max-n.min}function DA(n,e=0,t=.01){return Math.abs(n-e)<=t}function Sb(n,e,t,i=.5){n.origin=i,n.originPoint=sn(e.min,e.max,n.origin),n.scale=ji(t)/ji(e),(DA(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=sn(t.min,t.max,n.origin)-n.originPoint,(DA(n.translate)||isNaN(n.translate))&&(n.translate=0)}function Af(n,e,t,i){Sb(n.x,e.x,t.x,i?i.originX:void 0),Sb(n.y,e.y,t.y,i?i.originY:void 0)}function Cb(n,e,t){n.min=t.min+e.min,n.max=n.min+ji(e)}function IW(n,e,t){Cb(n.x,e.x,t.x),Cb(n.y,e.y,t.y)}function Eb(n,e,t){n.min=e.min-t.min,n.max=n.min+ji(e)}function _f(n,e,t){Eb(n.x,e.x,t.x),Eb(n.y,e.y,t.y)}function DW(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?sn(t,n,i.max):Math.min(n,t)),n}function bb(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function FW(n,{top:e,left:t,bottom:i,right:r}){return{x:bb(n.x,t,r),y:bb(n.y,e,i)}}function Tb(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=ih(e.min,e.max-i,n.min):i>r&&(t=ih(n.min,n.max-r,e.min)),Gc(0,1,t)}function OW(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const FA=.35;function UW(n=FA){return n===!1?n=0:n===!0&&(n=FA),{x:Pb(n,"left","right"),y:Pb(n,"top","bottom")}}function Pb(n,e,t){return{min:Bb(n,e),max:Bb(n,t)}}function Bb(n,e){return typeof n=="number"?n:n[e]||0}const Rb=()=>({translate:0,scale:1,origin:0,originPoint:0}),wf=()=>({x:Rb(),y:Rb()}),Lb=()=>({min:0,max:0}),_n=()=>({x:Lb(),y:Lb()});function qr(n){return[n("x"),n("y")]}function cL({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function zW({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function GW(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),i=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:i.y,right:i.x}}function Iv(n){return n===void 0||n===1}function NA({scale:n,scaleX:e,scaleY:t}){return!Iv(n)||!Iv(e)||!Iv(t)}function Ca(n){return NA(n)||uL(n)||n.z||n.rotate||n.rotateX||n.rotateY}function uL(n){return Ib(n.x)||Ib(n.y)}function Ib(n){return n&&n!=="0%"}function eg(n,e,t){const i=n-t,r=e*i;return t+r}function Db(n,e,t,i,r){return r!==void 0&&(n=eg(n,r,i)),eg(n,t,i)+e}function kA(n,e=0,t=1,i,r){n.min=Db(n.min,e,t,i,r),n.max=Db(n.max,e,t,i,r)}function fL(n,{x:e,y:t}){kA(n.x,e.translate,e.scale,e.originPoint),kA(n.y,t.translate,t.scale,t.originPoint)}function HW(n,e,t,i=!1){const r=t.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||n<.999999999999?n:1}function yo(n,e){n.min=n.min+e,n.max=n.max+e}function Nb(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=sn(n.min,n.max,s);kA(n,e[t],e[i],o,e.scale)}const VW=["x","scaleX","originX"],WW=["y","scaleY","originY"];function dc(n,e){Nb(n.x,e,VW),Nb(n.y,e,WW)}function hL(n,e){return cL(GW(n.getBoundingClientRect(),e))}function jW(n,e,t){const i=hL(n,t),{scroll:r}=e;return r&&(yo(i.x,r.offset.x),yo(i.y,r.offset.y)),i}const JW=new WeakMap;class XW{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_n(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=l=>{this.stopAnimation(),t&&this.snapToCursor(jg(l,"page").point)},s=(l,u)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=RR(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qr(v=>{let y=this.getAxisMotionValue(v).get()||0;if(ss.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const A=x.layout.layoutBox[v];A&&(y=ji(A)*(parseFloat(y)/100))}}this.originPoint[v]=y}),p&&p(l,u);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(l,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:v}=u;if(d&&this.currentDirection===null){this.currentDirection=YW(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",u.point,v),this.updateAxis("y",u.point,v),this.visualElement.render(),m&&m(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new aL(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&s(e,t)}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){const{drag:r}=this.getProps();if(!i||!Wp(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=DW(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:i}=this.visualElement.projection||{},r=this.constraints;e&&fc(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=FW(i.layoutBox,e):this.constraints=!1,this.elastic=UW(t),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&qr(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=OW(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!fc(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=jW(i,r.root,this.visualElement.getTransformPagePoint());let o=NW(r.layout.layoutBox,s);if(t){const a=t(zW(o));this.hasMutatedConstraints=!!a,a&&(o=cL(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=qr(h=>{if(!Wp(h,t,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,v={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,v)});return Promise.all(u).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(uw(e,i,0,t))}stopAnimation(){qr(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),r=i[t];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){qr(t=>{const{drag:i}=this.getProps();if(!Wp(t,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[t];s.set(e[t]-sn(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!fc(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};qr(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();r[o]=kW({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),qr(o=>{if(!Wp(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(sn(l,u,r[o]))})}addListeners(){if(!this.visualElement.current)return;JW.set(this.visualElement,this);const e=this.visualElement.current,t=Us(e,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps();u&&h&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();fc(l)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),i();const o=Ns(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(qr(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=FA,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Wp(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function YW(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class KW extends qo{constructor(e){super(e),this.removeGroupControls=gr,this.removeListeners=gr,this.controls=new XW(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gr}unmount(){this.removeGroupControls(),this.removeListeners()}}class QW extends qo{constructor(){super(...arguments),this.removePointerDownListener=gr}onPointerDown(e){this.session=new aL(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:e,onStart:t,onMove:i,onEnd:(s,o)=>{delete this.session,r&&r(s,o)}}}mount(){this.removePointerDownListener=Us(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ZW(){const n=z.useContext(z_);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=z.useId();return z.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}function kb(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const Ku={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(st.test(n))n=parseFloat(n);else return n;const t=kb(n,e.target.x),i=kb(n,e.target.y);return`${t}% ${i}%`}},dL=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function qW(n){const e=dL.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function OA(n,e,t=1){const[i,r]=qW(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():MA(r)?OA(r,e,t+1):r}function $W(n,{...e},t){const i=n.current;if(!(i instanceof Element))return{target:e,transitionEnd:t};t&&(t={...t}),n.values.forEach(r=>{const s=r.get();if(!MA(s))return;const o=OA(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!MA(s))continue;const o=OA(s,i);o&&(e[r]=o,t&&t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const Ob="_$css",e7={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=n.includes("var("),s=[];r&&(n=n.replace(dL,m=>(s.push(m),Ob)));const o=Ho.parse(n);if(o.length>5)return i;const a=Ho.createTransformer(n),l=typeof o[0]!="number"?1:0,u=t.x.scale*e.x,h=t.y.scale*e.y;o[0+l]/=u,o[1+l]/=h;const d=sn(u,h,.5);typeof o[2+l]=="number"&&(o[2+l]/=d),typeof o[3+l]=="number"&&(o[3+l]/=d);let p=a(o);if(r){let m=0;p=p.replace(Ob,()=>{const v=s[m];return m++,v})}return p}};class t7 extends ig.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;n8(n7),s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),yf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==t||t===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||pi.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function pL(n){const[e,t]=ZW(),i=z.useContext(mR);return ig.createElement(t7,{...n,layoutGroup:i,switchLayoutGroup:z.useContext(gR),isPresent:e,safeToRemove:t})}const n7={borderRadius:{...Ku,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ku,borderTopRightRadius:Ku,borderBottomLeftRadius:Ku,borderBottomRightRadius:Ku,boxShadow:e7};function i7(n,e,t={}){const i=Pi(n)?n:Hc(n);return i.start(uw("",i,e,t)),{stop:()=>i.stop(),isAnimating:()=>i.isAnimating()}}const mL=["TopLeft","TopRight","BottomLeft","BottomRight"],r7=mL.length,Ub=n=>typeof n=="string"?parseFloat(n):n,zb=n=>typeof n=="number"||st.test(n);function s7(n,e,t,i,r,s){r?(n.opacity=sn(0,t.opacity!==void 0?t.opacity:1,o7(i)),n.opacityExit=sn(e.opacity!==void 0?e.opacity:1,0,a7(i))):s&&(n.opacity=sn(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(ih(n,e,i))}function Hb(n,e){n.min=e.min,n.max=e.max}function ar(n,e){Hb(n.x,e.x),Hb(n.y,e.y)}function Vb(n,e,t,i,r){return n-=e,n=eg(n,1/t,i),r!==void 0&&(n=eg(n,1/r,i)),n}function l7(n,e=0,t=1,i=.5,r,s=n,o=n){if(ss.test(e)&&(e=parseFloat(e),e=sn(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=sn(s.min,s.max,i);n===s&&(a-=e),n.min=Vb(n.min,e,t,a,r),n.max=Vb(n.max,e,t,a,r)}function Wb(n,e,[t,i,r],s,o){l7(n,e[t],e[i],e[r],e.scale,s,o)}const c7=["x","scaleX","originX"],u7=["y","scaleY","originY"];function jb(n,e,t,i){Wb(n.x,e,c7,t?t.x:void 0,i?i.x:void 0),Wb(n.y,e,u7,t?t.y:void 0,i?i.y:void 0)}function Jb(n){return n.translate===0&&n.scale===1}function yL(n){return Jb(n.x)&&Jb(n.y)}function UA(n,e){return n.x.min===e.x.min&&n.x.max===e.x.max&&n.y.min===e.y.min&&n.y.max===e.y.max}function Xb(n){return ji(n.x)/ji(n.y)}class f7{constructor(){this.members=[]}add(e){Z_(this.members,e),e.scheduleRender()}remove(e){if(q_(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(r=>e===r);if(t===0)return!1;let i;for(let r=t;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Yb(n,e,t){let i="";const r=n.x.translate/e.x,s=n.y.translate/e.y;if((r||s)&&(i=`translate3d(${r}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{rotate:l,rotateX:u,rotateY:h}=t;l&&(i+=`rotate(${l}deg) `),u&&(i+=`rotateX(${u}deg) `),h&&(i+=`rotateY(${h}deg) `)}const o=n.x.scale*e.x,a=n.y.scale*e.y;return(o!==1||a!==1)&&(i+=`scale(${o}, ${a})`),i||"none"}const h7=(n,e)=>n.depth-e.depth;class d7{constructor(){this.children=[],this.isDirty=!1}add(e){Z_(this.children,e),this.isDirty=!0}remove(e){q_(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(h7),this.isDirty=!1,this.children.forEach(e)}}function p7(n){window.MotionDebug&&window.MotionDebug.record(n)}const Kb=["","X","Y","Z"],Qb=1e3;let m7=0;const Ea={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function vL({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=m7++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Ea.totalNodes=Ea.resolvedTargetDeltas=Ea.recalculatedProjection=0,this.nodes.forEach(v7),this.nodes.forEach(w7),this.nodes.forEach(M7),this.nodes.forEach(x7),p7(Ea)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let u=0;uthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=rL(p,250),yf.hasAnimatedSinceResize&&(yf.hasAnimatedSinceResize=!1,this.nodes.forEach(qb))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||h.getDefaultTransition()||T7,{onLayoutAnimationStart:x,onLayoutAnimationComplete:A}=h.getProps(),_=!this.targetLayout||!UA(this.targetLayout,v)||m,w=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||p&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const S={...sL(y,"layout"),onPlay:x,onComplete:A};(h.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else!p&&this.animationProgress===0&&qb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Go.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(S7),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const E=S/1e3;$b(d.x,o.x,E),$b(d.y,o.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_f(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),E7(this.relativeTarget,this.relativeTargetOrigin,p,E),w&&UA(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=_n()),ar(w,this.relativeTarget)),y&&(this.animationValues=h,s7(h,u,this.latestValues,E,_,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Go.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pi.update(()=>{yf.hasAnimatedSinceResize=!0,this.currentAnimation=i7(0,Qb,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qb),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:h}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&xL(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||_n();const d=ji(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=ji(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}ar(a,l),dc(a,h),Af(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new f7),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let h=0;h{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Zb),this.root.sharedNodes.clear()}}}function g7(n){n.updateLayout()}function y7(n){var e;const t=((e=n.resumeFrom)===null||e===void 0?void 0:e.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=n.layout,{animationType:s}=n.options,o=t.source!==n.layout.source;s==="size"?qr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=ji(p);p.min=i[d].min,p.max=p.min+m}):xL(s,t.layoutBox,i)&&qr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=ji(i[d]);p.max=p.min+m});const a=wf();Af(a,i,t.layoutBox);const l=wf();o?Af(l,n.applyTransform(r,!0),t.measuredBox):Af(l,i,t.layoutBox);const u=!yL(a);let h=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:m}=d;if(p&&m){const v=_n();_f(v,t.layoutBox,p.layoutBox);const y=_n();_f(y,i,m.layoutBox),UA(v,y)||(h=!0),d.options.layoutRoot&&(n.relativeTarget=y,n.relativeTargetOrigin=v,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:h})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function v7(n){Ea.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function x7(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function A7(n){n.clearSnapshot()}function Zb(n){n.clearMeasurements()}function _7(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function qb(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0}function w7(n){n.resolveTargetDelta()}function M7(n){n.calcProjection()}function S7(n){n.resetRotation()}function C7(n){n.removeLeadSnapshot()}function $b(n,e,t){n.translate=sn(e.translate,0,t),n.scale=sn(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function eT(n,e,t,i){n.min=sn(e.min,t.min,i),n.max=sn(e.max,t.max,i)}function E7(n,e,t,i){eT(n.x,e.x,t.x,i),eT(n.y,e.y,t.y,i)}function b7(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const T7={duration:.45,ease:[.4,0,.1,1]};function P7(n,e){let t=n.root;for(let s=n.path.length-1;s>=0;s--)if(n.path[s].instance){t=n.path[s];break}const r=(t&&t!==n.root?t.instance:document).querySelector(`[data-projection-id="${e}"]`);r&&n.mount(r,!0)}function tT(n){n.min=Math.round(n.min),n.max=Math.round(n.max)}function B7(n){tT(n.x),tT(n.y)}function xL(n,e,t){return n==="position"||n==="preserve-aspect"&&!DA(Xb(e),Xb(t),.2)}const R7=vL({attachResizeListener:(n,e)=>Ns(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dv={current:void 0},AL=vL({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Dv.current){const n=new R7(0,{});n.mount(window),n.setOptions({layoutScroll:!0}),Dv.current=n}return Dv.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),L7={pan:{Feature:QW},drag:{Feature:KW,ProjectionNode:AL,MeasureLayout:pL}},I7=new Set(["width","height","top","left","right","bottom","x","y"]),_L=n=>I7.has(n),D7=n=>Object.keys(n).some(_L),nT=n=>n===hl||n===st,iT=(n,e)=>parseFloat(n.split(", ")[e]),rT=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return iT(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?iT(s[1],n):0}},F7=new Set(["x","y","z"]),N7=Wg.filter(n=>!F7.has(n));function k7(n){const e=[];return N7.forEach(t=>{const i=n.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e.length&&n.render(),e}const sT={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:rT(4,13),y:rT(5,14)},O7=(n,e,t)=>{const i=e.measureViewportBox(),r=e.current,s=getComputedStyle(r),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",n.display||"block"),t.forEach(u=>{a[u]=sT[u](i,s)}),e.render();const l=e.measureViewportBox();return t.forEach(u=>{const h=e.getValue(u);h&&h.jump(a[u]),n[u]=sT[u](l,s)}),n},U7=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(_L);let s=[],o=!1;const a=[];if(r.forEach(l=>{const u=n.getValue(l);if(!n.hasValue(l))return;let h=t[l],d=Yu(h);const p=e[l];let m;if(Km(p)){const v=p.length,y=p[0]===null?1:0;h=p[y],d=Yu(h);for(let x=y;x=0?window.pageYOffset:null,u=O7(e,n,a);return s.length&&s.forEach(([h,d])=>{n.getValue(h).set(d)}),n.render(),Gg&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:i}}else return{target:e,transitionEnd:i}};function z7(n,e,t,i){return D7(e)?U7(n,e,t,i):{target:e,transitionEnd:i}}const G7=(n,e,t,i)=>{const r=$W(n,e,i);return e=r.target,i=r.transitionEnd,z7(n,e,t,i)},zA={current:null},wL={current:!1};function H7(){if(wL.current=!0,!!Gg)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>zA.current=n.matches;n.addListener(e),e()}else zA.current=!1}function V7(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(Pi(s))n.addValue(r,s),Zm(i)&&i.add(r);else if(Pi(o))n.addValue(r,Hc(s,{owner:n})),Zm(i)&&i.remove(r);else if(o!==s)if(n.hasValue(r)){const a=n.getValue(r);!a.hasAnimated&&a.set(s)}else{const a=n.getStaticValue(r);n.addValue(r,Hc(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const ML=Object.keys(eh),W7=ML.length,oT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],j7=H_.length;class J7{constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>pi.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=Vg(t),this.isVariantNode=dR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(t,{});for(const d in h){const p=h[d];a[d]!==void 0&&Pi(p)&&(p.set(a[d],!1),Zm(u)&&u.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,i)=>this.bindToMotionValue(i,t)),wL.current||H7(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:zA.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Go.update(this.notifyUpdate),Go.render(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const i=fl.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&pi.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...t},i,r,s,o){let a,l;for(let u=0;uthis.scheduleRender(),animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:v})}return l}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update(this.props,this.prevProps):(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_n()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let i=0;it.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&t!==void 0&&(i=Hc(t,{owner:this}),this.addValue(e,i)),i}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(t=Q_(this.props,i))===null||t===void 0?void 0:t[e]:void 0;if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Pi(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new $_),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class SL extends J7{sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...i},{transformValues:r},s){let o=m6(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){d6(this,i,o);const a=G7(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function X7(n){return window.getComputedStyle(n)}class Y7 extends SL{readValueFromInstance(e,t){if(fl.has(t)){const i=nw(t);return i&&i.default||0}else{const i=X7(e),r=(xR(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return hL(e,t)}build(e,t,i,r){W_(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return K_(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Pi(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){SR(e,t,i,r)}}class K7 extends SL{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(fl.has(t)){const i=nw(t);return i&&i.default||0}return t=CR.has(t)?t:Y_(t),e.getAttribute(t)}measureInstanceViewportBox(){return _n()}scrapeMotionValuesFromProps(e,t){return bR(e,t)}build(e,t,i,r){J_(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){ER(e,t,i,r)}mount(e){this.isSVGTag=X_(e.tagName),super.mount(e)}}const Q7=(n,e)=>V_(n)?new K7(e,{enableHardwareAcceleration:!1}):new Y7(e,{enableHardwareAcceleration:!0}),Z7={layout:{ProjectionNode:AL,MeasureLayout:pL}},q7={...PW,...G8,...L7,...Z7},Bi=e8((n,e)=>T8(n,e,q7,Q7)),Un={paddingX:"sm:px-16 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-white lg:text-[80px] sm:text-[60px] xs:text-[50px] text-[40px] lg:leading-[98px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px] lg:leading-[40px]",sectionHeadText:"text-white font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},$7=()=>et("section",{className:"relative w-full h-screen mx-auto",children:[et("div",{className:`absolute inset-0 top-[120px] max-w-7xl mx-auto ${Un.paddingX} flex flex-row items-start gap-5`,children:[et("div",{className:"flex flex-col justify-center items-center mt-5",children:[he("div",{className:"w-5 h-5 rounded-full bg-[#915EFF]"}),he("div",{className:"w-1 sm:h-80 h-40 violet-gradient"})]}),et("div",{children:[et("h1",{className:`${Un.heroHeadText} text-white`,children:["Hi, I'm ",he("span",{className:"text-[#915EFF]",children:"Edward"})]}),et("p",{className:`${Un.heroSubText} mt-2 text-white-100`,children:["I developed 3D visuals, user ",he("br",{className:"sm:block hidden"}),"interfaces and web applications"]})]})]}),he(IV,{}),he("div",{className:"absolute xs:bottom-10 bottom-32 w-full flex justify-center items-center",children:he("a",{href:"#about",children:he("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-secondary flex justify-center items-start p-2",children:he(Bi.div,{animate:{y:[0,24,0]},transition:{duration:1.5,repeat:1/0,repeatType:"loop"},className:"w-3 h-3 rounded-full bg-secondary mb-1"})})})})]}),ej="/Edward-portfolio/assets/logo-ee7889cb.png",tj="/Edward-portfolio/assets/backend-565fc01f.png",nj="/Edward-portfolio/assets/creator-dbbffaec.png",ij="/Edward-portfolio/assets/mobile-896ef2f5.png",rj="/Edward-portfolio/assets/web-0d05165f.png",sj="/Edward-portfolio/assets/github-3b4e1609.png",oj="/Edward-portfolio/assets/menu-242d80a8.svg",aj="/Edward-portfolio/assets/close-ad0e0ca6.svg",lj="/Edward-portfolio/assets/css-79a7f026.png",cj="/Edward-portfolio/assets/docker-602a695a.png",uj="/Edward-portfolio/assets/figma-184a11e6.png",fj="data:image/png;base64,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",hj="/Edward-portfolio/assets/html-92b76a73.png",dj="data:image/png;base64,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",pj="/Edward-portfolio/assets/mongodb-54000b2b.png",mj="/Edward-portfolio/assets/nodejs-d83eb6dd.png",gj="/Edward-portfolio/assets/reactjs-966214a8.png",yj="/Edward-portfolio/assets/redux-171787ca.png",vj="/Edward-portfolio/assets/tailwind-6ece120d.png",xj="data:image/png;base64,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",Aj="/Edward-portfolio/assets/threejs-1d0654a8.svg",_j="/Edward-portfolio/assets/carrent-aba013d1.png",wj="/Edward-portfolio/assets/jobit-ecb9d39c.png",Mj="/Edward-portfolio/assets/project1-0e94d7b7.png",Sj="/Edward-portfolio/assets/project2-25aabb30.png",Cj="/Edward-portfolio/assets/project4-f71459d7.png",Ej="/Edward-portfolio/assets/project5-6cbd9b09.png",bj="/Edward-portfolio/assets/SYNOPTEK-8a0c3765.png",Tj="/Edward-portfolio/assets/apptio-256337c4.png",Pj="/Edward-portfolio/assets/anaplan-283119e5.png",aT=[{id:"about",title:"About"},{id:"work",title:"Work"},{id:"contact",title:"Contact"}],Bj=[{title:"Front-end Frameworks",icon:rj},{title:"User Interface (UI)",icon:ij},{title:"User Experience (UX)",icon:tj},{title:"Responsive web design",icon:nj}],Rj=[{name:"HTML 5",icon:hj},{name:"CSS 3",icon:lj},{name:"JavaScript",icon:dj},{name:"TypeScript",icon:xj},{name:"React JS",icon:gj},{name:"Redux Toolkit",icon:yj},{name:"Tailwind CSS",icon:vj},{name:"Node JS",icon:mj},{name:"MongoDB",icon:pj},{name:"Three JS",icon:Aj},{name:"git",icon:fj},{name:"figma",icon:uj},{name:"docker",icon:cj}],Lj=[{title:"Frontend Developer",company_name:"SYNOPTEK company",icon:bj,iconBg:"#E6DEDD",date:"May 2017 - Dec 2018",points:["Strong understanding of HTML, CSS, and JavaScript, and have used various frameworks and libraries such as React, Angular, and Vue.js to create responsive and interactive websites","Collaboration with designers and backend developers to integrate front-end components with backend systems, and have also optimized website performance and user experience","Experience in testing and debugging code, as well as staying up-to-date with the latest trends and technologies in frontend development","Strengthening team cooperation skills using github work"]},{title:"Full Stack Developer",company_name:"Apptio Denver",icon:Tj,iconBg:"#E6DEDD",date:"Feb 2019 - Mar 2021",points:["Precisely translating designs into pixel-perfect, mobile-first, and responsive web applications using HTML5, CSS3, Material UI, and Bootstrap, consistently delivered exceptional visual and user experiences, achieving a remarkable 95% fidelity to the original designs","Improved code quality by 30% by migrating a complex legacy JavaScript codebase to a modern and scalable system using TypeScript, while also implementing automated testing with Jest, Mocha, and Cypress for enhanced reliability and robustness","Collaborated with cross-functional teams to successfully deliver a real estate platform, meeting project goals and client requirements within a tight deadline"]},{title:"Sr.Frontend Engineer",company_name:"Anaplan company",icon:Pj,iconBg:"#E6DEDD",date:"April 2021 - Dec 2023",points:["Designed and developed front-end web applications including e-commerce platform utilizing React,TailwindCSS and Docker","Refactored a complex legacy JS codebase to TypeScript, resulting in significantly improved code maintainability and a 30% reduction in type-related errors","Implemented AWS to allow easy iteration in company cloud infrastructure","Developed the interactive and responsive 3D graphics design feature using Three.js,resulting in an 80% increase in user engagement and a highly positive user experience","Created 3 efficient and reusable front-end systems to drive web applications to the marketplace","Supervised, led, and mentored 10 junior team members to achieve high performance and meet goals"]}],Ij=[{testimonial:"I thought it was impossible to make a website as beautiful as our product, but Edward proved me wrong.",name:"Sara Lee",designation:"CFO",company:"Acme Co",image:"https://randomuser.me/api/portraits/women/4.jpg"},{testimonial:"I've never met a web developer who truly cares about their clients' success like Edward does.",name:"Chris Brown",designation:"COO",company:"DEF Corp",image:"https://randomuser.me/api/portraits/men/5.jpg"},{testimonial:"After Edward optimized our website, our traffic increased by 40%. We can't thank them enough!",name:"Lisa Wang",designation:"CTO",company:"456 Enterprises",image:"https://randomuser.me/api/portraits/women/6.jpg"}],Dj=[{name:"Car Rent",description:"Web-based platform that allows users to search, book, and manage car rentals from various providers, providing a convenient and efficient solution for transportation needs.",tags:[{name:"react",color:"blue-text-gradient"},{name:"mongodb",color:"green-text-gradient"},{name:"tailwind",color:"pink-text-gradient"}],image:_j,source_code_link:"https://github.com/edward7770/Car-Rental"},{name:"Job Portal",description:"Web application that enables users to search for job openings, view estimated salary ranges for positions, and locate available jobs based on their current location.",tags:[{name:"typescript",color:"blue-text-gradient"},{name:"restapi",color:"green-text-gradient"},{name:"scss",color:"pink-text-gradient"}],image:wj,source_code_link:"https://github.com/edward7770/Job-Portal-Platform"},{name:"Filpcart",description:"Flipkart web application with Admin real time analytics Dashboard & Paytm Payment Gateway using mern-stack with react and nodejs",tags:[{name:"react",color:"blue-text-gradient"},{name:"nodejs",color:"green-text-gradient"},{name:"tailwindcss",color:"pink-text-gradient"}],image:Mj,source_code_link:"https://github.com/edward7770/filpcart-mern"},{name:"Ecommerce-Headphones",description:"With Modern design, animations, the ability to add and edit products on the go using a CMS, all advanced cart functionalities, and most importantly the complete integration with Stripe to cover REAL payments.",tags:[{name:"nextjs",color:"blue-text-gradient"},{name:"css",color:"green-text-gradient"},{name:"mongodb",color:"pink-text-gradient"}],image:Ej,source_code_link:"https://github.com/edward7770/Headphones-EShop"},{name:"Analytics Dashboard",description:"PHP-based analytics dashboard provides analyzing data, enabling decision-making and performance tracking with web-based interface displays metrics and data insights in a visually user-friendly format.",tags:[{name:"php",color:"blue-text-gradient"},{name:"css",color:"green-text-gradient"},{name:"restapi",color:"pink-text-gradient"}],image:Sj,source_code_link:"https://github.com/edward7770/Analytics-dashboard"},{name:"Wcked Shoes",description:"A fully functional E-Commerce app in React and Flask offers useful features to customers such as product recommendations, creating and reading helpful reviews, managing orders, and much more",tags:[{name:"react",color:"blue-text-gradient"},{name:"PostgreSQL",color:"green-text-gradient"},{name:"tailwindcss",color:"pink-text-gradient"}],image:Cj,source_code_link:"https://github.com/edward7770/WCKED-Shoes"}],Fj=()=>{const[n,e]=z.useState(""),[t,i]=z.useState(!1),[r,s]=z.useState(!1);return z.useEffect(()=>{const o=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[]),he("nav",{className:`${Un.paddingX} w-full flex items-center py-5 fixed top-0 z-20 ${r?"bg-primary":"bg-transparent"}`,children:et("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[et(SN,{to:"/",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[he("img",{src:ej,alt:"logo",className:"w-9 h-9 object-contain"}),he("p",{className:"text-white text-[18px] font-bold cursor-pointer flex ",children:"Edward Thomas - Sr.Frontend Developer"})]}),et("ul",{className:"list-none hidden sm:flex flex-row gap-10",children:[aT.map(o=>he("li",{className:`${n===o.title?"text-white":"text-secondary"} hover:text-white text-[18px] font-medium cursor-pointer`,onClick:()=>e(o.title),children:he("a",{href:`#${o.id}`,children:o.title})},o.id)),he("li",{className:"text-secondary hover:text-white text-[18px] font-medium cursor-pointer",children:he("a",{href:"https://drive.google.com/file/d/1IL05G9spubthnuIEgV6F69N5kXFJf2su/view",children:"Resume"})})]}),et("div",{className:"sm:hidden flex flex-1 justify-end items-center",children:[he("img",{src:t?aj:oj,alt:"menu",className:"w-[28px] h-[28px] object-contain",onClick:()=>i(!t)}),he("div",{className:`${t?"flex":"hidden"} p-6 black-gradient absolute top-20 right-0 mx-4 my-2 min-w-[140px] z-10 rounded-xl`,children:he("ul",{className:"list-none flex justify-end items-start flex-1 flex-col gap-4",children:aT.map(o=>he("li",{className:`font-poppins font-medium cursor-pointer text-[16px] ${n===o.title?"text-white":"text-secondary"}`,onClick:()=>{i(!t),e(o.title)},children:he("a",{href:`#${o.id}`,children:o.title})},o.id))})})]})]})})};var CL={};Object.defineProperty(CL,"__esModule",{value:!0});var Qu=Object.assign||function(n){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:function(){},r=arguments[1];return this.updateElementPosition(),this.setState(Object.assign({},this.state,{style:Qu({},this.state.style,{willChange:"transform"})})),this.setTransition(),i(r)}},{key:"reset",value:function(){var i=this;window.requestAnimationFrame(function(){i.setState(Object.assign({},i.state,{style:Qu({},i.state.style,{transform:"perspective("+i.settings.perspective+"px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"})}))})}},{key:"onMouseMove",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},r=arguments[1];return r.persist(),this.updateCall!==null&&window.cancelAnimationFrame(this.updateCall),this.event=r,this.updateCall=requestAnimationFrame(this.update.bind(this,r)),i(r)}},{key:"setTransition",value:function(){var i=this;clearTimeout(this.transitionTimeout),this.setState(Object.assign({},this.state,{style:Qu({},this.state.style,{transition:this.settings.speed+"ms "+this.settings.easing})})),this.transitionTimeout=setTimeout(function(){i.setState(Object.assign({},i.state,{style:Qu({},i.state.style,{transition:""})}))},this.settings.speed)}},{key:"onMouseLeave",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},r=arguments[1];return this.setTransition(),this.settings.reset&&this.reset(),i(r)}},{key:"getValues",value:function(i){var r=(i.nativeEvent.clientX-this.left)/this.width,s=(i.nativeEvent.clientY-this.top)/this.height,o=Math.min(Math.max(r,0),1),a=Math.min(Math.max(s,0),1),l=(this.reverse*(this.settings.max/2-o*this.settings.max)).toFixed(2),u=(this.reverse*(a*this.settings.max-this.settings.max/2)).toFixed(2),h=o*100,d=a*100;return{tiltX:l,tiltY:u,percentageX:h,percentageY:d}}},{key:"updateElementPosition",value:function(){var i=this.element.getBoundingClientRect();this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.left=i.left,this.top=i.top}},{key:"update",value:function(i){var r=this.getValues(i);this.setState(Object.assign({},this.state,{style:Qu({},this.state.style,{transform:"perspective("+this.settings.perspective+"px) rotateX("+(this.settings.axis==="x"?0:r.tiltY)+"deg) rotateY("+(this.settings.axis==="y"?0:r.tiltX)+"deg) scale3d("+this.settings.scale+", "+this.settings.scale+", "+this.settings.scale+")"})})),this.updateCall=null}},{key:"render",value:function(){var i=Object.assign({},this.props.style,this.state.style);return kj.default.createElement("div",{style:i,className:this.props.className,onMouseEnter:this.onMouseEnter,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave},this.props.children)}}]),e}(EL.Component),bL=CL.default=Vj;const kh=n=>({hidden:{y:-50,opacity:0},show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),Oh=(n,e,t,i)=>({hidden:{x:n==="left"?100:n==="right"?-100:0,y:n==="up"?100:n==="down"?-100:0,opacity:0},show:{x:0,y:0,opacity:1,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),lT=(n,e,t,i)=>({hidden:{x:n==="left"?"-100%":n==="right"?"100%":0,y:n==="up"||n==="down"?"100%":0},show:{x:0,y:0,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),Wj=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),nu=(n,e)=>function(){return et(Bi.section,{variants:Wj(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:.25},className:`${Un.padding} max-w-7xl mx-auto relative z-0`,children:[he("span",{className:"hash-span",id:e,children:" "}),he(n,{})]})},jj=({index:n,title:e,icon:t})=>he(bL,{className:"xs:w-[250px] w-full",children:he(Bi.div,{variants:Oh("right","spring",n*.5,.75),className:"w-full green-pink-gradient p-[1px] rounded-[20px] shadow-card",children:et("div",{options:{max:45,scale:1,speed:450},className:"bg-tertiary rounded-[20px] py-5 px-12 min-h-[280px] flex justify-evenly items-center flex-col",children:[he("img",{src:t,alt:"web-development",className:"w-16 h-16 object-contain"}),he("h3",{className:"text-white text-[20px] font-bold text-center",children:e})]})})}),Jj=()=>et(rg,{children:[et(Bi.div,{variants:kh(),children:[he("p",{className:Un.sectionSubText,children:"Introduction"}),he("h2",{className:Un.sectionHeadText,children:"Overview."})]}),et(Bi.p,{variants:Oh("","",.1,1),className:"mt-4 text-secondary text-[17px] max-w-4xl leading-[30px]",children:["Experienced Senior Frontend Web Developer with expertise in Javascript Libraries and frameworks and other relevant technologies. With 7 years of experience developing and maintaining innovative web application solutions to improve business e-commerce processes and drive efficiency. Excelled in UI/ UX design, responsive web development, and performance optimization. With proficiency in frontend frameworks like React.js or Angular, built complex applications with elegance and efficiency. Skilled extend to accessibility, cross-browser compatibility, and animation design, ensuring inclusivity and engagement across diverse user demographics. Enthusiastic about leveraging my skills and experience to contribute to the team's success and drive continuous improvement",he("br",{}),he("b",{children:"Let's bring your ideas to real life together!"})]}),he("div",{className:"mt-20 flex flex-wrap gap-10",children:Bj.map((n,e)=>he(jj,{index:e,...n},n.title))})]}),Xj=nu(Jj,"about"),Yj=()=>et(rg,{children:[he(Bi.div,{variants:kh(),children:he("h2",{className:`${Un.sectionHeadText} text-center`,children:"Skills"})}),he("div",{className:"flex flex-row flex-wrap justify-center gap-10",children:Rj.map(n=>he("div",{className:"w-28 h-28",children:he(RV,{icon:n.icon})},n.name))})]}),Kj=nu(Yj,"");var Yg={},TL={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var i=[],r=0;r(typeof window=="object"&&document.documentElement.style.setProperty("--line-color",i),Qj.default.createElement("div",{className:(0,Zj.default)(e,"vertical-timeline",{"vertical-timeline--animate":n,"vertical-timeline--two-columns":t==="2-columns","vertical-timeline--one-column-left":t==="1-column"||t==="1-column-left","vertical-timeline--one-column-right":t==="1-column-right"})},r));BL.propTypes={children:uo.default.oneOfType([uo.default.arrayOf(uo.default.node),uo.default.node]).isRequired,className:uo.default.string,animate:uo.default.bool,layout:uo.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:uo.default.string};var qj=BL;Yg.default=qj;var Kg={};function GA(){return GA=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var VA=new Map,jp=new WeakMap,cT=0,RL=void 0;function tJ(n){RL=n}function nJ(n){return n?(jp.has(n)||(cT+=1,jp.set(n,cT.toString())),jp.get(n)):"0"}function iJ(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?nJ(n.root):n[e])}).toString()}function rJ(n){var e=iJ(n),t=VA.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var l,u=a.isIntersecting&&r.some(function(h){return a.intersectionRatio>=h});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=u),(l=i.get(a.target))==null||l.forEach(function(h){h(u,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},VA.set(e,t)}return t}function hw(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=RL),typeof window.IntersectionObserver>"u"&&i!==void 0){var r=n.getBoundingClientRect();return e(i,{isIntersecting:i,target:n,intersectionRatio:typeof t.threshold=="number"?t.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=rJ(t),o=s.id,a=s.observer,l=s.elements,u=l.get(n)||[];return l.has(n)||l.set(n,u),u.push(e),a.observe(n),function(){u.splice(u.indexOf(e),1),u.length===0&&(l.delete(n),a.unobserve(n)),l.size===0&&(a.disconnect(),VA.delete(o))}}var sJ=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function uT(n){return typeof n.children!="function"}var tg=function(n){$j(e,n);function e(i){var r;return r=n.call(this,i)||this,r.node=null,r._unobserveCb=null,r.handleNode=function(s){r.node&&(r.unobserve(),!s&&!r.props.triggerOnce&&!r.props.skip&&r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=s||null,r.observeNode()},r.handleChange=function(s,o){s&&r.props.triggerOnce&&r.unobserve(),uT(r.props)||r.setState({inView:s,entry:o}),r.props.onChange&&r.props.onChange(s,o)},r.state={inView:!!i.initialInView,entry:void 0},r}var t=e.prototype;return t.componentDidUpdate=function(r){(r.rootMargin!==this.props.rootMargin||r.root!==this.props.root||r.threshold!==this.props.threshold||r.skip!==this.props.skip||r.trackVisibility!==this.props.trackVisibility||r.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(!(!this.node||this.props.skip)){var r=this.props,s=r.threshold,o=r.root,a=r.rootMargin,l=r.trackVisibility,u=r.delay,h=r.fallbackInView;this._unobserveCb=hw(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:l,delay:u},h)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!uT(this.props)){var r=this.state,s=r.inView,o=r.entry;return this.props.children({inView:s,entry:o,ref:this.handleNode})}var a=this.props,l=a.children,u=a.as,h=eJ(a,sJ);return z.createElement(u||"div",GA({ref:this.handleNode},h),l)},e}(z.Component);tg.displayName="InView";tg.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function oJ(n){var e=n===void 0?{}:n,t=e.threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,l=e.skip,u=e.initialInView,h=e.fallbackInView,d=z.useRef(),p=z.useState({inView:!!u}),m=p[0],v=p[1],y=z.useCallback(function(A){d.current!==void 0&&(d.current(),d.current=void 0),!l&&A&&(d.current=hw(A,function(_,w){v({inView:_,entry:w}),w.isIntersecting&&a&&d.current&&(d.current(),d.current=void 0)},{root:o,rootMargin:s,threshold:t,trackVisibility:r,delay:i},h))},[Array.isArray(t)?t.toString():t,o,s,a,l,r,h,i]);z.useEffect(function(){!d.current&&m.entry&&!a&&!l&&v({inView:!!u})});var x=[y,m.inView,m.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}const aJ=Object.freeze(Object.defineProperty({__proto__:null,InView:tg,default:tg,defaultFallbackInView:tJ,observe:hw,useInView:oJ},Symbol.toStringTag,{value:"Module"})),lJ=TI(aJ);Kg.__esModule=!0;Kg.default=void 0;var fo=dw(z),Zt=dw(cR),Jp=dw(PL),cJ=lJ;function dw(n){return n&&n.__esModule?n:{default:n}}const LL=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:l=null,onTimelineElementClick:u=null,iconStyle:h=null,id:d="",position:p="",style:m=null,textClassName:v="",intersectionObserverProps:y={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:x=!1})=>fo.default.createElement(cJ.InView,y,({inView:A,ref:_})=>fo.default.createElement("div",{ref:_,id:d,className:(0,Jp.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:m},fo.default.createElement(fo.default.Fragment,null,fo.default.createElement("span",{style:h,onClick:l,className:(0,Jp.default)(a,"vertical-timeline-element-icon",{"bounce-in":A||x,"is-hidden":!(A||x)})},o),fo.default.createElement("div",{style:i,onClick:u,className:(0,Jp.default)(v,"vertical-timeline-element-content",{"bounce-in":A||x,"is-hidden":!(A||x)})},fo.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,fo.default.createElement("span",{className:(0,Jp.default)(s,"vertical-timeline-element-date")},r)))));LL.propTypes={children:Zt.default.oneOfType([Zt.default.arrayOf(Zt.default.node),Zt.default.node]),className:Zt.default.string,contentArrowStyle:Zt.default.shape({}),contentStyle:Zt.default.shape({}),date:Zt.default.node,dateClassName:Zt.default.string,icon:Zt.default.element,iconClassName:Zt.default.string,iconStyle:Zt.default.shape({}),iconOnClick:Zt.default.func,onTimelineElementClick:Zt.default.func,id:Zt.default.string,position:Zt.default.string,style:Zt.default.shape({}),textClassName:Zt.default.string,visible:Zt.default.bool,intersectionObserverProps:Zt.default.shape({root:Zt.default.object,rootMargin:Zt.default.string,threshold:Zt.default.number,triggerOnce:Zt.default.bool})};var uJ=LL;Kg.default=uJ;var IL={VerticalTimeline:Yg.default,VerticalTimelineElement:Kg.default};const fJ=({experience:n})=>et(IL.VerticalTimelineElement,{contentStyle:{background:"#1d1836",color:"#fff"},contentArrowStyle:{borderRight:"7px solid #232631"},date:n.date,iconStyle:{background:n.iconBg},icon:fe("div",{className:"flex justify-center items-center w-full h-full",children:fe("img",{src:n.icon,alt:n.company_name,className:"w-[60%] h-[60%] object-contain"})}),children:[et("div",{children:[fe("h3",{className:"text-white text-[24px] font-bold",children:n.title}),fe("p",{className:"text-secondary text-[16px] font-semibold",style:{margin:0},children:n.company_name})]}),fe("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:n.points.map((e,t)=>fe("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:e},`experience-point-${t}`))})]}),hJ=()=>et(rg,{children:[et(Bi.div,{variants:kh(),children:[fe("p",{className:`${Un.sectionSubText} text-center`,children:"What I have done so far"}),fe("h2",{className:`${Un.sectionHeadText} text-center`,children:"Work Experience."})]}),fe("div",{className:"mt-20 flex flex-col",children:fe(IL.VerticalTimeline,{children:Lj.map((n,e)=>fe(fJ,{experience:n},`experience-${e}`))})})]}),dJ=nu(hJ,"work"),pJ=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s})=>fe(Bi.div,{variants:Oh("up","spring",n*.5,.75),children:et(bL,{options:{max:45,scale:1,speed:450},className:"bg-tertiary p-5 rounded-2xl sm:w-[360px] w-full",children:[et("div",{className:"relative w-full h-[230px]",children:[fe("img",{src:r,alt:"project_image",className:"w-full h-full object-cover rounded-2xl"}),fe("div",{className:"absolute inset-0 flex justify-end m-3 card-img_hover",children:fe("div",{onClick:()=>window.open(s,"_blank"),className:"black-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer",children:fe("img",{src:sj,alt:"source code",className:"w-1/2 h-1/2 object-contain"})})})]}),et("div",{className:"mt-5",children:[fe("h3",{className:"text-white font-bold text-[24px]",children:e}),fe("p",{className:"mt-2 text-secondary text-[14px]",children:t})]}),fe("div",{className:"mt-4 flex flex-wrap gap-2",children:i.map(o=>et("p",{className:`text-[14px] ${o.color}`,children:["#",o.name]},`${e}-${o.name}`))})]})}),mJ=()=>et(rg,{children:[et(Bi.div,{variants:kh(),children:[fe("p",{className:`${Un.sectionSubText} `,children:"My work"}),fe("h2",{className:`${Un.sectionHeadText}`,children:"Projects."})]}),fe("div",{className:"w-full flex",children:fe(Bi.p,{variants:Oh("","",.1,1),className:"mt-3 text-secondary text-[17px] max-w-3xl leading-[30px]",children:"Following projects showcases my skills and experience through real-world examples of my work. Each project is briefly described with links to code repositories and live demos in it. It reflects my ability to solve complex problems, work with different technologies, and manage projects effectively."})}),fe("div",{className:"mt-20 flex flex-wrap gap-7",children:Dj.map((n,e)=>fe(pJ,{index:e,...n},`project-${e}`))})]}),gJ=nu(mJ,""),yJ=({index:n,testimonial:e,name:t,designation:i,company:r,image:s})=>et(Bi.div,{variants:Oh("","spring",n*.5,.75),className:"bg-black-200 p-10 rounded-3xl xs:w-[320px] w-full",children:[fe("p",{className:"text-white font-black text-[48px]",children:'"'}),et("div",{className:"mt-1",children:[fe("p",{className:"text-white tracking-wider text-[18px]",children:e}),et("div",{className:"mt-7 flex justify-between items-center gap-1",children:[et("div",{className:"flex-1 flex flex-col",children:[et("p",{className:"text-white font-medium text-[16px]",children:[fe("span",{className:"blue-text-gradient",children:"@"})," ",t]}),et("p",{className:"mt-1 text-secondary text-[12px]",children:[i," of ",r]})]}),fe("img",{src:s,alt:`feedback_by-${t}`,className:"w-10 h-10 rounded-full object-cover"})]})]})]}),vJ=()=>et("div",{className:"mt-12 bg-black-100 rounded-[20px]",children:[fe("div",{className:`bg-tertiary rounded-2xl ${Un.padding} min-h-[300px]`,children:et(Bi.div,{variants:kh(),children:[fe("p",{className:Un.sectionSubText,children:"What others say"}),fe("h2",{className:Un.sectionHeadText,children:"Testimonials."})]})}),fe("div",{className:`-mt-20 pb-14 ${Un.paddingX} flex flex-wrap gap-7`,children:Ij.map((n,e)=>fe(yJ,{index:e,...n},n.name))})]}),xJ=nu(vJ,""),rh={_origin:"https://api.emailjs.com"},AJ=(n,e="https://api.emailjs.com")=>{rh._userID=n,rh._origin=e},DL=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class fT{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const FL=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new fT(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new fT(o))}),s.open("POST",rh._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),_J=(n,e,t,i)=>{const r=i||rh._userID;return DL(r,n,e),FL("/api/v1.0/email/send",JSON.stringify({lib_version:"3.11.0",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},wJ=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},MJ=(n,e,t,i)=>{const r=i||rh._userID,s=wJ(t);DL(r,n,e);const o=new FormData(s);return o.append("lib_version","3.11.0"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),FL("/api/v1.0/email/send-form",o)},SJ={init:AJ,send:_J,sendForm:MJ},CJ=()=>{const n=z.useRef(),[e,t]=z.useState({name:"",email:"",message:""}),[i,r]=z.useState(!1),s=a=>{const{target:l}=a,{name:u,value:h}=l;t({...e,[u]:h})},o=a=>{a.preventDefault(),r(!0),SJ.send("service_me64jak","template_21a02ln",{from_name:e.name,to_name:"Dmytro",from_email:e.email,to_email:"edward1997703@gmail.com",message:e.message},"04unMmx332w3ItVL3").then(()=>{r(!1),alert("Thank you! I will get back to you as soon as possbile."),t({name:"",email:"",message:""})},l=>{r(!1),console.log(l),alert("Something went wrong.")})};return et("div",{className:"xl:mt-12 flex xl:flex-row flex-col-reverse gap-10 overflow-hidden",children:[et(Bi.div,{variants:lT("left","tween",.2,1),className:"flex-[0.75] bg-black-100 p-8 rounded-2xl",children:[fe("p",{className:Un.sectionSubText,children:"Get in touch"}),fe("h3",{className:Un.sectionHeadText,children:"Contact."}),et("form",{ref:n,onSubmit:o,className:"mt-12 flex flex-col gap-8",children:[et("label",{className:"flex flex-col",children:[fe("span",{className:"text-white font-medium mb-4",children:"Your Name"}),fe("input",{type:"text",name:"name",value:e.name,onChange:s,placeholder:"What's your good name?",className:"bg-tertiary py-4 px-6 placeholder:text-secondary text-white rounded-lg outline-none border-none font-medium"})]}),et("label",{className:"flex flex-col",children:[fe("span",{className:"text-white font-medium mb-4",children:"Your email"}),fe("input",{type:"email",name:"email",value:e.email,onChange:s,placeholder:"What's your web address?",className:"bg-tertiary py-4 px-6 placeholder:text-secondary text-white rounded-lg outline-none border-none font-medium"})]}),et("label",{className:"flex flex-col",children:[fe("span",{className:"text-white font-medium mb-4",children:"Your Message"}),fe("textarea",{rows:7,name:"message",value:e.message,onChange:s,placeholder:"What you want to say?",className:"bg-tertiary py-4 px-6 placeholder:text-secondary text-white rounded-lg outline-none border-none font-medium"})]}),fe("button",{type:"submit",className:"bg-tertiary py-3 px-8 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:i?"Sending...":"Send"})]})]}),fe(Bi.div,{variants:lT("right","tween",.2,1),className:"xl:flex-1 xl:h-auto md:h-[550px] h-[350px]",children:fe(PV,{})})]})},EJ=nu(CJ,"contact"),bJ=()=>fe(_N,{children:et("div",{className:"relative z-0 bg-primary",children:[et("div",{className:"bg-hero-pattern bg-cover bg-no-repeat bg-center",children:[fe(Fj,{}),fe($7,{})]}),fe(Xj,{}),fe(dJ,{}),fe(Kj,{}),fe(gJ,{}),fe(xJ,{}),et("div",{className:"relative z-0",children:[fe(EJ,{}),fe(HV,{})]})]})});Fv.createRoot(document.getElementById("root")).render(fe(ig.StrictMode,{children:fe(bJ,{})})); +*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var i=[],r=0;r(typeof window=="object"&&document.documentElement.style.setProperty("--line-color",i),Qj.default.createElement("div",{className:(0,Zj.default)(e,"vertical-timeline",{"vertical-timeline--animate":n,"vertical-timeline--two-columns":t==="2-columns","vertical-timeline--one-column-left":t==="1-column"||t==="1-column-left","vertical-timeline--one-column-right":t==="1-column-right"})},r));BL.propTypes={children:uo.default.oneOfType([uo.default.arrayOf(uo.default.node),uo.default.node]).isRequired,className:uo.default.string,animate:uo.default.bool,layout:uo.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:uo.default.string};var qj=BL;Yg.default=qj;var Kg={};function GA(){return GA=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var VA=new Map,jp=new WeakMap,cT=0,RL=void 0;function tJ(n){RL=n}function nJ(n){return n?(jp.has(n)||(cT+=1,jp.set(n,cT.toString())),jp.get(n)):"0"}function iJ(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?nJ(n.root):n[e])}).toString()}function rJ(n){var e=iJ(n),t=VA.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var l,u=a.isIntersecting&&r.some(function(h){return a.intersectionRatio>=h});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=u),(l=i.get(a.target))==null||l.forEach(function(h){h(u,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},VA.set(e,t)}return t}function hw(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=RL),typeof window.IntersectionObserver>"u"&&i!==void 0){var r=n.getBoundingClientRect();return e(i,{isIntersecting:i,target:n,intersectionRatio:typeof t.threshold=="number"?t.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=rJ(t),o=s.id,a=s.observer,l=s.elements,u=l.get(n)||[];return l.has(n)||l.set(n,u),u.push(e),a.observe(n),function(){u.splice(u.indexOf(e),1),u.length===0&&(l.delete(n),a.unobserve(n)),l.size===0&&(a.disconnect(),VA.delete(o))}}var sJ=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function uT(n){return typeof n.children!="function"}var tg=function(n){$j(e,n);function e(i){var r;return r=n.call(this,i)||this,r.node=null,r._unobserveCb=null,r.handleNode=function(s){r.node&&(r.unobserve(),!s&&!r.props.triggerOnce&&!r.props.skip&&r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=s||null,r.observeNode()},r.handleChange=function(s,o){s&&r.props.triggerOnce&&r.unobserve(),uT(r.props)||r.setState({inView:s,entry:o}),r.props.onChange&&r.props.onChange(s,o)},r.state={inView:!!i.initialInView,entry:void 0},r}var t=e.prototype;return t.componentDidUpdate=function(r){(r.rootMargin!==this.props.rootMargin||r.root!==this.props.root||r.threshold!==this.props.threshold||r.skip!==this.props.skip||r.trackVisibility!==this.props.trackVisibility||r.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(!(!this.node||this.props.skip)){var r=this.props,s=r.threshold,o=r.root,a=r.rootMargin,l=r.trackVisibility,u=r.delay,h=r.fallbackInView;this._unobserveCb=hw(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:l,delay:u},h)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!uT(this.props)){var r=this.state,s=r.inView,o=r.entry;return this.props.children({inView:s,entry:o,ref:this.handleNode})}var a=this.props,l=a.children,u=a.as,h=eJ(a,sJ);return z.createElement(u||"div",GA({ref:this.handleNode},h),l)},e}(z.Component);tg.displayName="InView";tg.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function oJ(n){var e=n===void 0?{}:n,t=e.threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,l=e.skip,u=e.initialInView,h=e.fallbackInView,d=z.useRef(),p=z.useState({inView:!!u}),m=p[0],v=p[1],y=z.useCallback(function(A){d.current!==void 0&&(d.current(),d.current=void 0),!l&&A&&(d.current=hw(A,function(_,w){v({inView:_,entry:w}),w.isIntersecting&&a&&d.current&&(d.current(),d.current=void 0)},{root:o,rootMargin:s,threshold:t,trackVisibility:r,delay:i},h))},[Array.isArray(t)?t.toString():t,o,s,a,l,r,h,i]);z.useEffect(function(){!d.current&&m.entry&&!a&&!l&&v({inView:!!u})});var x=[y,m.inView,m.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}const aJ=Object.freeze(Object.defineProperty({__proto__:null,InView:tg,default:tg,defaultFallbackInView:tJ,observe:hw,useInView:oJ},Symbol.toStringTag,{value:"Module"})),lJ=TI(aJ);Kg.__esModule=!0;Kg.default=void 0;var fo=dw(z),Zt=dw(cR),Jp=dw(PL),cJ=lJ;function dw(n){return n&&n.__esModule?n:{default:n}}const LL=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:l=null,onTimelineElementClick:u=null,iconStyle:h=null,id:d="",position:p="",style:m=null,textClassName:v="",intersectionObserverProps:y={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:x=!1})=>fo.default.createElement(cJ.InView,y,({inView:A,ref:_})=>fo.default.createElement("div",{ref:_,id:d,className:(0,Jp.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:m},fo.default.createElement(fo.default.Fragment,null,fo.default.createElement("span",{style:h,onClick:l,className:(0,Jp.default)(a,"vertical-timeline-element-icon",{"bounce-in":A||x,"is-hidden":!(A||x)})},o),fo.default.createElement("div",{style:i,onClick:u,className:(0,Jp.default)(v,"vertical-timeline-element-content",{"bounce-in":A||x,"is-hidden":!(A||x)})},fo.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,fo.default.createElement("span",{className:(0,Jp.default)(s,"vertical-timeline-element-date")},r)))));LL.propTypes={children:Zt.default.oneOfType([Zt.default.arrayOf(Zt.default.node),Zt.default.node]),className:Zt.default.string,contentArrowStyle:Zt.default.shape({}),contentStyle:Zt.default.shape({}),date:Zt.default.node,dateClassName:Zt.default.string,icon:Zt.default.element,iconClassName:Zt.default.string,iconStyle:Zt.default.shape({}),iconOnClick:Zt.default.func,onTimelineElementClick:Zt.default.func,id:Zt.default.string,position:Zt.default.string,style:Zt.default.shape({}),textClassName:Zt.default.string,visible:Zt.default.bool,intersectionObserverProps:Zt.default.shape({root:Zt.default.object,rootMargin:Zt.default.string,threshold:Zt.default.number,triggerOnce:Zt.default.bool})};var uJ=LL;Kg.default=uJ;var IL={VerticalTimeline:Yg.default,VerticalTimelineElement:Kg.default};const fJ=({experience:n})=>et(IL.VerticalTimelineElement,{contentStyle:{background:"#1d1836",color:"#fff"},contentArrowStyle:{borderRight:"7px solid #232631"},date:n.date,iconStyle:{background:n.iconBg},icon:he("div",{className:"flex justify-center items-center w-full h-full",children:he("img",{src:n.icon,alt:n.company_name,className:"w-[60%] h-[60%] object-contain"})}),children:[et("div",{children:[he("h3",{className:"text-white text-[24px] font-bold",children:n.title}),he("p",{className:"text-secondary text-[16px] font-semibold",style:{margin:0},children:n.company_name})]}),he("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:n.points.map((e,t)=>he("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:e},`experience-point-${t}`))})]}),hJ=()=>et(rg,{children:[et(Bi.div,{variants:kh(),children:[he("p",{className:`${Un.sectionSubText} text-center`,children:"What I have done so far"}),he("h2",{className:`${Un.sectionHeadText} text-center`,children:"Work Experience."})]}),he("div",{className:"mt-20 flex flex-col",children:he(IL.VerticalTimeline,{children:Lj.map((n,e)=>he(fJ,{experience:n},`experience-${e}`))})})]}),dJ=nu(hJ,"work"),pJ=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s})=>he(Bi.div,{variants:Oh("up","spring",n*.5,.75),children:et(bL,{options:{max:45,scale:1,speed:450},className:"bg-tertiary p-5 rounded-2xl sm:w-[360px] w-full",children:[et("div",{className:"relative w-full h-[230px]",children:[he("img",{src:r,alt:"project_image",className:"w-full h-full object-cover rounded-2xl"}),he("div",{className:"absolute inset-0 flex justify-end m-3 card-img_hover",children:he("div",{onClick:()=>window.open(s,"_blank"),className:"black-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer",children:he("img",{src:sj,alt:"source code",className:"w-1/2 h-1/2 object-contain"})})})]}),et("div",{className:"mt-5",children:[he("h3",{className:"text-white font-bold text-[24px]",children:e}),he("p",{className:"mt-2 text-secondary text-[14px]",children:t})]}),he("div",{className:"mt-4 flex flex-wrap gap-2",children:i.map(o=>et("p",{className:`text-[14px] ${o.color}`,children:["#",o.name]},`${e}-${o.name}`))})]})}),mJ=()=>et(rg,{children:[et(Bi.div,{variants:kh(),children:[he("p",{className:`${Un.sectionSubText} `,children:"My work"}),he("h2",{className:`${Un.sectionHeadText}`,children:"Projects."})]}),he("div",{className:"w-full flex",children:he(Bi.p,{variants:Oh("","",.1,1),className:"mt-3 text-secondary text-[17px] max-w-3xl leading-[30px]",children:"Following projects showcases my skills and experience through real-world examples of my work. Each project is briefly described with links to code repositories and live demos in it. It reflects my ability to solve complex problems, work with different technologies, and manage projects effectively."})}),he("div",{className:"mt-20 flex flex-wrap gap-7",children:Dj.map((n,e)=>he(pJ,{index:e,...n},`project-${e}`))})]}),gJ=nu(mJ,""),yJ=({index:n,testimonial:e,name:t,designation:i,company:r,image:s})=>et(Bi.div,{variants:Oh("","spring",n*.5,.75),className:"bg-black-200 p-10 rounded-3xl xs:w-[320px] w-full",children:[he("p",{className:"text-white font-black text-[48px]",children:'"'}),et("div",{className:"mt-1",children:[he("p",{className:"text-white tracking-wider text-[18px]",children:e}),et("div",{className:"mt-7 flex justify-between items-center gap-1",children:[et("div",{className:"flex-1 flex flex-col",children:[et("p",{className:"text-white font-medium text-[16px]",children:[he("span",{className:"blue-text-gradient",children:"@"})," ",t]}),et("p",{className:"mt-1 text-secondary text-[12px]",children:[i," of ",r]})]}),he("img",{src:s,alt:`feedback_by-${t}`,className:"w-10 h-10 rounded-full object-cover"})]})]})]}),vJ=()=>et("div",{className:"mt-12 bg-black-100 rounded-[20px]",children:[he("div",{className:`bg-tertiary rounded-2xl ${Un.padding} min-h-[300px]`,children:et(Bi.div,{variants:kh(),children:[he("p",{className:Un.sectionSubText,children:"What others say"}),he("h2",{className:Un.sectionHeadText,children:"Testimonials."})]})}),he("div",{className:`-mt-20 pb-14 ${Un.paddingX} flex flex-wrap gap-7`,children:Ij.map((n,e)=>he(yJ,{index:e,...n},n.name))})]}),xJ=nu(vJ,""),rh={_origin:"https://api.emailjs.com"},AJ=(n,e="https://api.emailjs.com")=>{rh._userID=n,rh._origin=e},DL=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class fT{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const FL=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new fT(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new fT(o))}),s.open("POST",rh._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),_J=(n,e,t,i)=>{const r=i||rh._userID;return DL(r,n,e),FL("/api/v1.0/email/send",JSON.stringify({lib_version:"3.11.0",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},wJ=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},MJ=(n,e,t,i)=>{const r=i||rh._userID,s=wJ(t);DL(r,n,e);const o=new FormData(s);return o.append("lib_version","3.11.0"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),FL("/api/v1.0/email/send-form",o)},SJ={init:AJ,send:_J,sendForm:MJ},CJ=()=>{const n=z.useRef(),[e,t]=z.useState({name:"",email:"",message:""}),[i,r]=z.useState(!1),s=a=>{const{target:l}=a,{name:u,value:h}=l;t({...e,[u]:h})},o=a=>{a.preventDefault(),r(!0),SJ.send("service_me64jak","template_21a02ln",{from_name:e.name,to_name:"Dmytro",from_email:e.email,to_email:"edward1997703@gmail.com",message:e.message},"04unMmx332w3ItVL3").then(()=>{r(!1),alert("Thank you! I will get back to you as soon as possbile."),t({name:"",email:"",message:""})},l=>{r(!1),console.log(l),alert("Something went wrong.")})};return et("div",{className:"xl:mt-12 flex xl:flex-row flex-col-reverse gap-10 overflow-hidden",children:[et(Bi.div,{variants:lT("left","tween",.2,1),className:"flex-[0.75] bg-black-100 p-8 rounded-2xl",children:[he("p",{className:Un.sectionSubText,children:"Get in touch"}),he("h3",{className:Un.sectionHeadText,children:"Contact."}),et("form",{ref:n,onSubmit:o,className:"mt-12 flex flex-col gap-8",children:[et("label",{className:"flex flex-col",children:[he("span",{className:"text-white font-medium mb-4",children:"Your Name"}),he("input",{type:"text",name:"name",value:e.name,onChange:s,placeholder:"What's your good name?",className:"bg-tertiary py-4 px-6 placeholder:text-secondary text-white rounded-lg outline-none border-none font-medium"})]}),et("label",{className:"flex flex-col",children:[he("span",{className:"text-white font-medium mb-4",children:"Your email"}),he("input",{type:"email",name:"email",value:e.email,onChange:s,placeholder:"What's your web address?",className:"bg-tertiary py-4 px-6 placeholder:text-secondary text-white rounded-lg outline-none border-none font-medium"})]}),et("label",{className:"flex flex-col",children:[he("span",{className:"text-white font-medium mb-4",children:"Your Message"}),he("textarea",{rows:7,name:"message",value:e.message,onChange:s,placeholder:"What you want to say?",className:"bg-tertiary py-4 px-6 placeholder:text-secondary text-white rounded-lg outline-none border-none font-medium"})]}),he("button",{type:"submit",className:"bg-tertiary py-3 px-8 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:i?"Sending...":"Send"})]})]}),he(Bi.div,{variants:lT("right","tween",.2,1),className:"xl:flex-1 xl:h-auto md:h-[550px] h-[350px]",children:he(PV,{})})]})},EJ=nu(CJ,"contact"),bJ=()=>he(_N,{children:et("div",{className:"relative z-0 bg-primary",children:[et("div",{className:"bg-hero-pattern bg-cover bg-no-repeat bg-center",children:[he(Fj,{}),he($7,{})]}),he(Xj,{}),he(dJ,{}),he(Kj,{}),he(gJ,{}),he(xJ,{}),et("div",{className:"relative z-0",children:[he(EJ,{}),he(HV,{})]})]})});Fv.createRoot(document.getElementById("root")).render(he(ig.StrictMode,{children:he(bJ,{})})); diff --git a/index.html b/index.html index 8ed6693..fb8b7b9 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Edward Thomas || Full Stack Engineer Portfolio - +