t2-mapper/docs/_next/static/chunks/a99c02adf7563d85.js
2025-12-09 14:59:47 -08:00

1 line
20 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47071,80520,e=>{"use strict";e.s(["useTexture",()=>a],47071);var t=e.i(71645),n=e.i(90072),r=e.i(16096);e.s(["useLoader",()=>i.G],80520);var i=e.i(46712),i=i;let o=e=>e===Object(e)&&!Array.isArray(e)&&"function"!=typeof e;function a(e,a){let l=(0,r.useThree)(e=>e.gl),s=(0,i.G)(n.TextureLoader,o(e)?Object.values(e):e);return(0,t.useLayoutEffect)(()=>{null==a||a(s)},[a]),(0,t.useEffect)(()=>{if("initTexture"in l){let e=[];Array.isArray(s)?e=s:s instanceof n.Texture?e=[s]:o(s)&&(e=Object.values(s)),e.forEach(e=>{e instanceof n.Texture&&l.initTexture(e)})}},[l,s]),(0,t.useMemo)(()=>{if(!o(e))return s;{let t={},n=0;for(let r in e)t[r]=s[n++];return t}},[e,s])}a.preload=e=>i.G.preload(n.TextureLoader,e),a.clear=e=>i.G.clear(n.TextureLoader,e)},6112,51475,77482,e=>{"use strict";e.s(["useDatablock",()=>u],6112),e.s(["RuntimeProvider",()=>s,"useRuntime",()=>c],77482);var t=e.i(43476),n=e.i(71645);e.s(["TickProvider",()=>o,"useTick",()=>a],51475);var r=e.i(5230);let i=(0,n.createContext)(null);function o(e){let{children:o}=e,a=(0,n.useRef)(void 0),l=(0,n.useRef)(0),s=(0,n.useRef)(0);(0,r.useFrame)((e,t)=>{for(l.current+=t;l.current>=.03125;)if(l.current-=.03125,s.current++,a.current)for(let e of a.current)e(s.current)});let c=(0,n.useCallback)(e=>(null!=a.current||(a.current=new Set),a.current.add(e),()=>{a.current.delete(e)}),[]),u=(0,n.useCallback)(()=>s.current,[]),f=(0,n.useMemo)(()=>({subscribe:c,getTick:u}),[c,u]);return(0,t.jsx)(i.Provider,{value:f,children:o})}function a(e){let t=(0,n.useContext)(i);if(!t)throw Error("useTick must be used within a TickProvider");let r=(0,n.useRef)(e);r.current=e,(0,n.useEffect)(()=>t.subscribe(e=>r.current(e)),[t])}let l=(0,n.createContext)(null);function s(e){let{runtime:n,children:r}=e;return(0,t.jsx)(l.Provider,{value:n,children:(0,t.jsx)(o,{children:r})})}function c(){let e=(0,n.useContext)(l);if(!e)throw Error("useRuntime must be used within a RuntimeProvider");return e}function u(e){let t=c();if(e)return t.state.datablocks.get(e)}},75567,e=>{"use strict";e.s(["setupAlphaTestedTexture",()=>i,"setupColor",()=>r,"setupMask",()=>o]);var t=e.i(90072);function n(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{repeat:r=[1,1],disableMipmaps:i=!1}=n;return e.wrapS=e.wrapT=t.RepeatWrapping,e.colorSpace=t.SRGBColorSpace,e.repeat.set(...r),e.flipY=!1,e.anisotropy=16,i?(e.generateMipmaps=!1,e.minFilter=t.LinearFilter):(e.generateMipmaps=!0,e.minFilter=t.LinearMipmapLinearFilter),e.magFilter=t.LinearFilter,e.needsUpdate=!0,e}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[1,1];return n(e,{repeat:t})}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[1,1];return n(e,{repeat:t,disableMipmaps:!0})}function o(e){let n=new t.DataTexture(e,256,256,t.RedFormat,t.UnsignedByteType);return n.colorSpace=t.NoColorSpace,n.wrapS=n.wrapT=t.RepeatWrapping,n.generateMipmaps=!1,n.minFilter=t.LinearFilter,n.magFilter=t.LinearFilter,n.needsUpdate=!0,n}},47021,e=>{"use strict";e.s(["fogFragmentShader",()=>n,"injectCustomFog",()=>i,"installCustomFogShader",()=>r]);var t=e.i(8560);let n="\n#ifdef USE_FOG\n float dist = vFogDepth;\n\n // Discard fragments at or beyond visible distance - matches Torque's behavior\n // where objects beyond visibleDistance are not rendered at all.\n // This prevents fully-fogged geometry from showing as silhouettes against\n // the sky's fog-to-sky gradient.\n if (dist >= fogFar) {\n discard;\n }\n\n // Step 1: Calculate distance-based haze (quadratic falloff)\n // Since we discard at fogFar, haze never reaches 1.0 here\n float haze = 0.0;\n if (dist > fogNear) {\n float fogScale = 1.0 / (fogFar - fogNear);\n float distFactor = (dist - fogNear) * fogScale - 1.0;\n haze = 1.0 - distFactor * distFactor;\n }\n\n // Step 2: Calculate fog volume contributions\n // Note: Per-volume colors are NOT used in Tribes 2 ($specialFog defaults to false)\n // All fog uses the global fogColor - see Tribes2_Fog_System.md for details\n float volumeFog = 0.0;\n\n #ifdef USE_VOLUMETRIC_FOG\n {\n #ifdef USE_FOG_WORLD_POSITION\n float fragmentHeight = vFogWorldPosition.y;\n #else\n float fragmentHeight = cameraHeight;\n #endif\n\n float deltaY = fragmentHeight - cameraHeight;\n float absDeltaY = abs(deltaY);\n\n // Determine if we're going up (positive) or down (negative)\n if (absDeltaY > 0.01) {\n // Non-horizontal ray: ray-march through fog volumes\n for (int i = 0; i < 3; i++) {\n int offset = i * 4;\n float volVisDist = fogVolumeData[offset + 0];\n float volMinH = fogVolumeData[offset + 1];\n float volMaxH = fogVolumeData[offset + 2];\n float volPct = fogVolumeData[offset + 3];\n\n // Skip inactive volumes (visibleDistance = 0)\n if (volVisDist <= 0.0) continue;\n\n // Calculate fog factor for this volume\n // From Torque: factor = (1 / (volumeVisDist * visFactor)) * percentage\n // where visFactor is smVisibleDistanceMod (a user quality pref, default 1.0)\n // Since we don't have quality settings, we use visFactor = 1.0\n float factor = (1.0 / volVisDist) * volPct;\n\n // Find ray intersection with this volume's height range\n float rayMinY = min(cameraHeight, fragmentHeight);\n float rayMaxY = max(cameraHeight, fragmentHeight);\n\n // Check if ray intersects volume height range\n if (rayMinY < volMaxH && rayMaxY > volMinH) {\n float intersectMin = max(rayMinY, volMinH);\n float intersectMax = min(rayMaxY, volMaxH);\n float intersectHeight = intersectMax - intersectMin;\n\n // Calculate distance traveled through this volume using similar triangles:\n // subDist / dist = intersectHeight / absDeltaY\n float subDist = dist * (intersectHeight / absDeltaY);\n\n // Accumulate fog: fog += subDist * factor\n volumeFog += subDist * factor;\n }\n }\n } else {\n // Near-horizontal ray: if camera is inside a volume, apply full fog for that volume\n for (int i = 0; i < 3; i++) {\n int offset = i * 4;\n float volVisDist = fogVolumeData[offset + 0];\n float volMinH = fogVolumeData[offset + 1];\n float volMaxH = fogVolumeData[offset + 2];\n float volPct = fogVolumeData[offset + 3];\n\n if (volVisDist <= 0.0) continue;\n\n // If camera is inside this volume, apply fog for full distance\n if (cameraHeight >= volMinH && cameraHeight <= volMaxH) {\n float factor = (1.0 / volVisDist) * volPct;\n volumeFog += dist * factor;\n }\n }\n }\n }\n #endif\n\n // Step 3: Combine haze and volume fog\n // Torque's clamping: if (bandPct + hazePct > 1) hazePct = 1 - bandPct\n // This gives fog volumes priority over haze\n float volPct = min(volumeFog, 1.0);\n float hazePct = haze;\n if (volPct + hazePct > 1.0) {\n hazePct = 1.0 - volPct;\n }\n float fogFactor = hazePct + volPct;\n\n // Apply fog using global fogColor (per-volume colors not used in Tribes 2)\n gl_FragColor.rgb = mix(gl_FragColor.rgb, fogColor, fogFactor);\n#endif\n";function r(){t.ShaderChunk.fog_pars_fragment="\n#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float vFogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n\n // Custom volumetric fog uniforms (only defined when USE_VOLUMETRIC_FOG is set)\n // Format: [visDist, minH, maxH, percentage] x 3 volumes = 12 floats\n #ifdef USE_VOLUMETRIC_FOG\n uniform float fogVolumeData[12];\n uniform float cameraHeight;\n #endif\n\n #ifdef USE_FOG_WORLD_POSITION\n varying vec3 vFogWorldPosition;\n #endif\n#endif\n",t.ShaderChunk.fog_fragment=n,t.ShaderChunk.fog_pars_vertex="\n#ifdef USE_FOG\n varying float vFogDepth;\n #ifdef USE_FOG_WORLD_POSITION\n varying vec3 vFogWorldPosition;\n #endif\n#endif\n",t.ShaderChunk.fog_vertex="\n#ifdef USE_FOG\n // Use Euclidean distance from camera, not view-space z-depth\n // This ensures fog doesn't change when rotating the camera\n vFogDepth = length(mvPosition.xyz);\n #ifdef USE_FOG_WORLD_POSITION\n vFogWorldPosition = (modelMatrix * vec4(transformed, 1.0)).xyz;\n #endif\n#endif\n"}function i(e,t){e.uniforms.fogVolumeData=t.fogVolumeData,e.uniforms.cameraHeight=t.cameraHeight,e.vertexShader=e.vertexShader.replace("#include <fog_pars_vertex>","#include <fog_pars_vertex>\n#ifdef USE_FOG\n #define USE_FOG_WORLD_POSITION\n #define USE_VOLUMETRIC_FOG\n varying vec3 vFogWorldPosition;\n#endif"),e.vertexShader=e.vertexShader.replace("#include <fog_vertex>","#include <fog_vertex>\n#ifdef USE_FOG\n vFogWorldPosition = (modelMatrix * vec4(transformed, 1.0)).xyz;\n#endif"),e.fragmentShader=e.fragmentShader.replace("#include <fog_pars_fragment>","#include <fog_pars_fragment>\n#ifdef USE_FOG\n #define USE_VOLUMETRIC_FOG\n uniform float fogVolumeData[12];\n uniform float cameraHeight;\n #define USE_FOG_WORLD_POSITION\n varying vec3 vFogWorldPosition;\n#endif"),e.fragmentShader=e.fragmentShader.replace("#include <fog_fragment>",n)}},48066,e=>{"use strict";e.s(["globalFogUniforms",()=>t,"packFogVolumeData",()=>i,"resetGlobalFogUniforms",()=>r,"updateGlobalFogUniforms",()=>n]);let t={fogVolumeData:{value:new Float32Array(12)},cameraHeight:{value:0}};function n(e,n){t.cameraHeight.value=e,t.fogVolumeData.value.set(n)}function r(){t.cameraHeight.value=0,t.fogVolumeData.value.fill(0)}function i(e){let t=new Float32Array(12);for(let n=0;n<3;n++){let r=4*n,i=e[n];i&&(t[r+0]=i.visibleDistance,t[r+1]=i.minHeight,t[r+2]=i.maxHeight,t[r+3]=i.percentage)}return t}},31067,e=>{"use strict";function t(){return(t=Object.assign.bind()).apply(null,arguments)}e.s(["default",()=>t])},77975,e=>{"use strict";e.s(["useDistanceFromCamera",()=>o],77975);var t=e.i(5230),n=e.i(16096),r=e.i(71645),i=e.i(90072);function o(e){let{camera:o}=(0,n.useThree)(),a=(0,r.useRef)(null),l=function(e){let n=(0,r.useRef)(null);return(0,t.useFrame)(()=>{e.current&&(null!=n.current||(n.current=new i.Vector3),e.current.getWorldPosition(n.current))}),n}(e);return(0,t.useFrame)(()=>{l.current?a.current=o.position.distanceTo(l.current):a.current=null}),a}},89887,60099,e=>{"use strict";let t,n;e.s(["FloatingLabel",()=>M],89887);var r=e.i(43476),i=e.i(71645),o=e.i(77975),a=e.i(5230);e.s(["Html",()=>F],60099);var l=e.i(31067),s=e.i(88014),c=e.i(90072),u=e.i(16096);let f=new c.Vector3,d=new c.Vector3,m=new c.Vector3,g=new c.Vector2;function h(e,t,n){let r=f.setFromMatrixPosition(e.matrixWorld);r.project(t);let i=n.width/2,o=n.height/2;return[r.x*i+i,-(r.y*o)+o]}let v=e=>1e-10>Math.abs(e)?0:e;function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="matrix3d(";for(let n=0;16!==n;n++)r+=v(t[n]*e.elements[n])+(15!==n?",":")");return n+r}let x=(t=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>p(e,t)),y=(n=e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1],(e,t)=>p(e,n(t),"translate(-50%,-50%)")),F=i.forwardRef((e,t)=>{let{children:n,eps:r=.001,style:o,className:p,prepend:F,center:b,fullscreen:M,portal:S,distanceFactor:P,sprite:_=!1,transform:D=!1,occlude:T,onOcclude:E,castShadow:w,receiveShadow:O,material:C,geometry:H,zIndexRange:R=[0x1000037,0],calculatePosition:W=h,as:V="div",wrapperClass:L,pointerEvents:U="auto",...z}=e,{gl:G,camera:k,scene:A,size:I,raycaster:j,events:N,viewport:Y}=(0,u.useThree)(),[q]=i.useState(()=>document.createElement(V)),B=i.useRef(null),K=i.useRef(null),X=i.useRef(0),Z=i.useRef([0,0]),$=i.useRef(null),J=i.useRef(null),Q=(null==S?void 0:S.current)||N.connected||G.domElement.parentNode,ee=i.useRef(null),et=i.useRef(!1),en=i.useMemo(()=>T&&"blending"!==T||Array.isArray(T)&&T.length&&function(e){return e&&"object"==typeof e&&"current"in e}(T[0]),[T]);i.useLayoutEffect(()=>{let e=G.domElement;T&&"blending"===T?(e.style.zIndex="".concat(Math.floor(R[0]/2)),e.style.position="absolute",e.style.pointerEvents="none"):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)},[T]),i.useLayoutEffect(()=>{if(K.current){let e=B.current=s.createRoot(q);if(A.updateMatrixWorld(),D)q.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{let e=W(K.current,k,I);q.style.cssText="position:absolute;top:0;left:0;transform:translate3d(".concat(e[0],"px,").concat(e[1],"px,0);transform-origin:0 0;")}return Q&&(F?Q.prepend(q):Q.appendChild(q)),()=>{Q&&Q.removeChild(q),e.unmount()}}},[Q,D]),i.useLayoutEffect(()=>{L&&(q.className=L)},[L]);let er=i.useMemo(()=>D?{position:"absolute",top:0,left:0,width:I.width,height:I.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:b?"translate3d(-50%,-50%,0)":"none",...M&&{top:-I.height/2,left:-I.width/2,width:I.width,height:I.height},...o},[o,b,M,I,D]),ei=i.useMemo(()=>({position:"absolute",pointerEvents:U}),[U]);i.useLayoutEffect(()=>{var e,r;et.current=!1,D?null==(e=B.current)||e.render(i.createElement("div",{ref:$,style:er},i.createElement("div",{ref:J,style:ei},i.createElement("div",{ref:t,className:p,style:o,children:n})))):null==(r=B.current)||r.render(i.createElement("div",{ref:t,style:er,className:p,children:n}))});let eo=i.useRef(!0);(0,a.useFrame)(e=>{if(K.current){k.updateMatrixWorld(),K.current.updateWorldMatrix(!0,!1);let e=D?Z.current:W(K.current,k,I);if(D||Math.abs(X.current-k.zoom)>r||Math.abs(Z.current[0]-e[0])>r||Math.abs(Z.current[1]-e[1])>r){let t=function(e,t){let n=f.setFromMatrixPosition(e.matrixWorld),r=d.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),o=t.getWorldDirection(m);return i.angleTo(o)>Math.PI/2}(K.current,k),n=!1;en&&(Array.isArray(T)?n=T.map(e=>e.current):"blending"!==T&&(n=[A]));let r=eo.current;n?eo.current=function(e,t,n,r){let i=f.setFromMatrixPosition(e.matrixWorld),o=i.clone();o.project(t),g.set(o.x,o.y),n.setFromCamera(g,t);let a=n.intersectObjects(r,!0);if(a.length){let e=a[0].distance;return i.distanceTo(n.ray.origin)<e}return!0}(K.current,k,j,n)&&!t:eo.current=!t,r!==eo.current&&(E?E(!eo.current):q.style.display=eo.current?"block":"none");let i=Math.floor(R[0]/2),o=T?en?[R[0],i]:[i-1,0]:R;if(q.style.zIndex="".concat(function(e,t,n){if(t instanceof c.PerspectiveCamera||t instanceof c.OrthographicCamera){let r=f.setFromMatrixPosition(e.matrixWorld),i=d.setFromMatrixPosition(t.matrixWorld),o=r.distanceTo(i),a=(n[1]-n[0])/(t.far-t.near),l=n[1]-a*t.far;return Math.round(a*o+l)}}(K.current,k,o)),D){let[e,t]=[I.width/2,I.height/2],n=k.projectionMatrix.elements[5]*t,{isOrthographicCamera:r,top:i,left:o,bottom:a,right:l}=k,s=x(k.matrixWorldInverse),c=r?"scale(".concat(n,")translate(").concat(v(-(l+o)/2),"px,").concat(v((i+a)/2),"px)"):"translateZ(".concat(n,"px)"),u=K.current.matrixWorld;_&&((u=k.matrixWorldInverse.clone().transpose().copyPosition(u).scale(K.current.scale)).elements[3]=u.elements[7]=u.elements[11]=0,u.elements[15]=1),q.style.width=I.width+"px",q.style.height=I.height+"px",q.style.perspective=r?"":"".concat(n,"px"),$.current&&J.current&&($.current.style.transform="".concat(c).concat(s,"translate(").concat(e,"px,").concat(t,"px)"),J.current.style.transform=y(u,1/((P||10)/400)))}else{let t=void 0===P?1:function(e,t){if(t instanceof c.OrthographicCamera)return t.zoom;if(!(t instanceof c.PerspectiveCamera))return 1;{let n=f.setFromMatrixPosition(e.matrixWorld),r=d.setFromMatrixPosition(t.matrixWorld);return 1/(2*Math.tan(t.fov*Math.PI/180/2)*n.distanceTo(r))}}(K.current,k)*P;q.style.transform="translate3d(".concat(e[0],"px,").concat(e[1],"px,0) scale(").concat(t,")")}Z.current=e,X.current=k.zoom}}if(!en&&ee.current&&!et.current)if(D){if($.current){let e=$.current.children[0];if(null!=e&&e.clientWidth&&null!=e&&e.clientHeight){let{isOrthographicCamera:t}=k;if(t||H)z.scale&&(Array.isArray(z.scale)?z.scale instanceof c.Vector3?ee.current.scale.copy(z.scale.clone().divideScalar(1)):ee.current.scale.set(1/z.scale[0],1/z.scale[1],1/z.scale[2]):ee.current.scale.setScalar(1/z.scale));else{let t=(P||10)/400,n=e.clientWidth*t,r=e.clientHeight*t;ee.current.scale.set(n,r,1)}et.current=!0}}}else{let t=q.children[0];if(null!=t&&t.clientWidth&&null!=t&&t.clientHeight){let e=1/Y.factor,n=t.clientWidth*e,r=t.clientHeight*e;ee.current.scale.set(n,r,1),et.current=!0}ee.current.lookAt(e.camera.position)}});let ea=i.useMemo(()=>({vertexShader:D?void 0:'\n /*\n This shader is from the THREE\'s SpriteMaterial.\n We need to turn the backing plane into a Sprite\n (make it always face the camera) if "transfrom"\n is false.\n */\n #include <common>\n\n void main() {\n vec2 center = vec2(0., 1.);\n float rotation = 0.0;\n\n // This is somewhat arbitrary, but it seems to work well\n // Need to figure out how to derive this dynamically if it even matters\n float size = 0.03;\n\n vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n vec2 scale;\n scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n\n gl_Position = projectionMatrix * mvPosition;\n }\n ',fragmentShader:"\n void main() {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n "}),[D]);return i.createElement("group",(0,l.default)({},z,{ref:K}),T&&!en&&i.createElement("mesh",{castShadow:w,receiveShadow:O,ref:ee},H||i.createElement("planeGeometry",null),C||i.createElement("shaderMaterial",{side:c.DoubleSide,vertexShader:ea.vertexShader,fragmentShader:ea.fragmentShader})))}),b=[0,0,0],M=(0,i.memo)(function(e){let{children:t,color:n="white",position:l=b,opacity:s="fadeWithDistance"}=e,c="fadeWithDistance"===s,u=(0,i.useRef)(null),f=(0,o.useDistanceFromCamera)(u),[d,m]=(0,i.useState)(0!==s),g=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(c&&g.current&&null!=f.current){let e=Math.max(0,Math.min(1,1-f.current/200));g.current.style.opacity=e.toString()}},[d,c]),(0,a.useFrame)(()=>{if(c){let e=f.current,t=null!=e&&e<200;if(d!==t&&m(t),g.current&&t){let t=Math.max(0,Math.min(1,1-e/200));g.current.style.opacity=t.toString()}}else m(0!==s),g.current&&(g.current.style.opacity=s.toString())}),(0,r.jsx)("group",{ref:u,children:d?(0,r.jsx)(F,{position:l,center:!0,children:(0,r.jsx)("div",{ref:g,className:"StaticShapeLabel",style:{color:n},children:t})}):null})})},51434,e=>{"use strict";e.s(["AudioProvider",()=>a,"useAudio",()=>l]);var t=e.i(43476),n=e.i(71645),r=e.i(16096),i=e.i(90072);let o=(0,n.createContext)(void 0);function a(e){let{children:a}=e,{camera:l}=(0,r.useThree)(),[s,c]=(0,n.useState)({audioLoader:null,audioListener:null});return(0,n.useEffect)(()=>{let e=new i.AudioLoader,t=l.children.find(e=>e instanceof i.AudioListener);t||(t=new i.AudioListener,l.add(t)),c({audioLoader:e,audioListener:t})},[l]),(0,t.jsx)(o.Provider,{value:s,children:a})}function l(){let e=(0,n.useContext)(o);if(void 0===e)throw Error("useAudio must be used within AudioProvider");return e}},61921,e=>{e.v(t=>Promise.all(["static/chunks/5342f4b5b8c465ca.js"].map(t=>e.l(t))).then(()=>t(29055)))},25147,e=>{e.v(t=>Promise.all(["static/chunks/40a2f59d0c05dc35.js"].map(t=>e.l(t))).then(()=>t(63724)))},18599,e=>{e.v(t=>Promise.all(["static/chunks/f863efae27259b81.js"].map(t=>e.l(t))).then(()=>t(42585)))}]);