@mapcomponents/three 1.8.10 → 1.8.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/.storybook/main.ts +15 -6
  2. package/.storybook/manager.js +6 -0
  3. package/.storybook/mapcomponents_logo.png +0 -0
  4. package/.storybook/preview.ts +32 -0
  5. package/.storybook/style.css +13 -0
  6. package/.storybook/wheregroupTheme.js +9 -0
  7. package/cypress.config.ts +27 -4
  8. package/dist/catalogue/mc_meta.json +44 -0
  9. package/dist/components/MlThreeGizmo.d.ts.map +1 -1
  10. package/dist/contexts/ThreeProvider.d.ts.map +1 -1
  11. package/dist/cypress/support/component.d.ts.map +1 -1
  12. package/dist/hooks/useThreeModel.d.ts.map +1 -1
  13. package/dist/index.js +52 -113
  14. package/dist/index.mjs +10316 -12269
  15. package/dist/lib/ThreejsSceneHelper.d.ts.map +1 -1
  16. package/dist/lib/splats/GaussianSplattingMesh.d.ts.map +1 -1
  17. package/dist/thumbnails/MlThreeModelLayer.png +0 -0
  18. package/dist/thumbnails/MlThreeSplatLayer.png +0 -0
  19. package/eslint.config.cjs +3 -0
  20. package/package.json +9 -7
  21. package/public/catalogue/mc_meta.json +44 -0
  22. package/public/thumbnails/MlThreeModelLayer.png +0 -0
  23. package/public/thumbnails/MlThreeSplatLayer.png +0 -0
  24. package/src/components/MlThreeGizmo.tsx +0 -1
  25. package/src/components/MlThreeModelLayer/MlThreeModelLayer.meta.json +2 -2
  26. package/src/components/MlThreeModelLayer/MlThreeModelLayer.stories.tsx +1 -1
  27. package/src/components/MlThreeSplatLayer/MlThreeSplatLayer.meta.json +2 -2
  28. package/src/contexts/ThreeProvider.tsx +0 -1
  29. package/src/cypress/support/component.ts +11 -0
  30. package/src/decorators/style.css +22 -8
  31. package/src/hooks/useThreeModel.tsx +2 -0
  32. package/src/lib/ThreejsSceneHelper.ts +1 -0
  33. package/src/lib/splats/GaussianSplattingMesh.ts +0 -1
  34. package/tsconfig.json +0 -9
  35. package/tsconfig.lib.json +6 -1
  36. package/tsconfig.storybook.json +4 -20
  37. package/vite.config.ts +57 -55
  38. package/dist/package.json +0 -33
  39. package/eslint.config.mjs +0 -12
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ir=require("maplibre-gl"),u=require("three"),Y=require("react"),H=require("react/jsx-runtime"),ii=require("@mapcomponents/react-maplibre"),Ge=require("@mui/system"),ai=require("@emotion/styled");require("@emotion/react");function ms(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const ar=ms(u),z=ms(Y),li=Math.PI/180,ci=180/Math.PI;class _t{static updateWorldMatrix(e,n=null){if(!e)return new u.Matrix4;const r=n??e.getCenter(),o=ir.MercatorCoordinate.fromLngLat(r),s=o.meterInMercatorCoordinateUnits();return new u.Matrix4().compose(new u.Vector3(o.x,o.y,o.z),new u.Quaternion,new u.Vector3(s,-s,s))}static toScenePositionMercator(e,n){return new u.Vector3(n.x,n.y,n.z).applyMatrix4(e)}static toMapPositionMercator(e,n){const r=n.clone().applyMatrix4(e);return new ir.MercatorCoordinate(r.x,r.y,r.z)}static toScenePosition(e,n,r){return this.toScenePositionMercator(e,ir.MercatorCoordinate.fromLngLat(n,r))}static toMapPosition(e,n){const r=this.toMapPositionMercator(e,n),o=r.toLngLat();return[o.lng,o.lat,r.toAltitude()]}static degToRad(e){return e*li}static radToDeg(e){return e*ci}}class ui extends u.DataTextureLoader{constructor(e){super(e),this.type=u.HalfFloatType}parse(e){const i=function(P,N){switch(P){case 1:throw new Error("THREE.HDRLoader: Read Error: "+(N||""));case 2:throw new Error("THREE.HDRLoader: Write Error: "+(N||""));case 3:throw new Error("THREE.HDRLoader: Bad File Format: "+(N||""));default:case 4:throw new Error("THREE.HDRLoader: Memory Error: "+(N||""))}},f=function(P,N,$){N=N||1024;let y=P.pos,A=-1,E=0,L="",k=String.fromCharCode.apply(null,new Uint16Array(P.subarray(y,y+128)));for(;0>(A=k.indexOf(`
2
- `))&&E<N&&y<P.byteLength;)L+=k,E+=k.length,y+=128,k+=String.fromCharCode.apply(null,new Uint16Array(P.subarray(y,y+128)));return-1<A?(P.pos+=E+A+1,L+k.slice(0,A)):!1},h=function(P){const N=/^#\?(\S+)/,$=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,B=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,y=/^\s*FORMAT=(\S+)\s*$/,A=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,E={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let L,k;for((P.pos>=P.byteLength||!(L=f(P)))&&i(1,"no header found"),(k=L.match(N))||i(3,"bad initial token"),E.valid|=1,E.programtype=k[1],E.string+=L+`
3
- `;L=f(P),L!==!1;){if(E.string+=L+`
4
- `,L.charAt(0)==="#"){E.comments+=L+`
5
- `;continue}if((k=L.match($))&&(E.gamma=parseFloat(k[1])),(k=L.match(B))&&(E.exposure=parseFloat(k[1])),(k=L.match(y))&&(E.valid|=2,E.format=k[1]),(k=L.match(A))&&(E.valid|=4,E.height=parseInt(k[1],10),E.width=parseInt(k[2],10)),E.valid&2&&E.valid&4)break}return E.valid&2||i(3,"missing format specifier"),E.valid&4||i(3,"missing image size specifier"),E},b=function(P,N,$){const B=N;if(B<8||B>32767||P[0]!==2||P[1]!==2||P[2]&128)return new Uint8Array(P);B!==(P[2]<<8|P[3])&&i(3,"wrong scanline width");const y=new Uint8Array(4*N*$);y.length||i(4,"unable to allocate buffer space");let A=0,E=0;const L=4*B,k=new Uint8Array(4),V=new Uint8Array(L);let G=$;for(;G>0&&E<P.byteLength;){E+4>P.byteLength&&i(1),k[0]=P[E++],k[1]=P[E++],k[2]=P[E++],k[3]=P[E++],(k[0]!=2||k[1]!=2||(k[2]<<8|k[3])!=B)&&i(3,"bad rgbe scanline format");let W=0,I;for(;W<L&&E<P.byteLength;){I=P[E++];const U=I>128;if(U&&(I-=128),(I===0||W+I>L)&&i(3,"bad scanline data"),U){const X=P[E++];for(let K=0;K<I;K++)V[W++]=X}else V.set(P.subarray(E,E+I),W),W+=I,E+=I}const O=B;for(let U=0;U<O;U++){let X=0;y[A]=V[U+X],X+=B,y[A+1]=V[U+X],X+=B,y[A+2]=V[U+X],X+=B,y[A+3]=V[U+X],A+=4}G--}return y},g=function(P,N,$,B){const y=P[N+3],A=Math.pow(2,y-128)/255;$[B+0]=P[N+0]*A,$[B+1]=P[N+1]*A,$[B+2]=P[N+2]*A,$[B+3]=1},d=function(P,N,$,B){const y=P[N+3],A=Math.pow(2,y-128)/255;$[B+0]=u.DataUtils.toHalfFloat(Math.min(P[N+0]*A,65504)),$[B+1]=u.DataUtils.toHalfFloat(Math.min(P[N+1]*A,65504)),$[B+2]=u.DataUtils.toHalfFloat(Math.min(P[N+2]*A,65504)),$[B+3]=u.DataUtils.toHalfFloat(1)},x=new Uint8Array(e);x.pos=0;const T=h(x),C=T.width,M=T.height,S=b(x.subarray(x.pos),C,M);let w,v,R;switch(this.type){case u.FloatType:R=S.length/4;const P=new Float32Array(R*4);for(let $=0;$<R;$++)g(S,$*4,P,$*4);w=P,v=u.FloatType;break;case u.HalfFloatType:R=S.length/4;const N=new Uint16Array(R*4);for(let $=0;$<R;$++)d(S,$*4,N,$*4);w=N,v=u.HalfFloatType;break;default:throw new Error("THREE.HDRLoader: Unsupported type: "+this.type)}return{width:C,height:M,data:w,header:T.string,gamma:T.gamma,exposure:T.exposure,type:v}}setDataType(e){return this.type=e,this}load(e,n,r,o){function s(i,a){switch(i.type){case u.FloatType:case u.HalfFloatType:i.colorSpace=u.LinearSRGBColorSpace,i.minFilter=u.LinearFilter,i.magFilter=u.LinearFilter,i.generateMipmaps=!1,i.flipY=!0;break}n&&n(i,a)}return super.load(e,s,r,o)}}class di{createScene(e=!0){const n=new u.Scene;if(e){const r=new u.DirectionalLight(16777215,4);r.position.set(1,2,3),n.add(r);const o=new u.AmbientLight(16777215,.2);n.add(o)}return n}createGroup(e,n){const r=new u.Group;return r.name=n,e.add(r),r}createCamera(e,n){const r=new u.PerspectiveCamera;r.name=n;const o=new u.Group;return o.name=`${n}-parent`,o.add(r),e.add(o),r}buildPerspectiveMatrix(e,n,r,o){const s=1/Math.tan(e/2),i=1/(r-o);return new Float64Array([s/n,0,0,0,0,s,0,0,0,0,(o+r)*i,-1,0,0,2*o*r*i,0])}buildOrthographicMatrix(e,n,r,o,s,i){const a=1/(e-n),l=1/(r-o),c=1/(s-i);return new Float64Array([-2*a,0,0,0,0,-2*l,0,0,0,0,2*c,0,(e+n)*a,(o+r)*l,(i+s)*c,1])}calcProjectionMatrix(e,n,r,o){const s=e.centerOffset,i=e.width/e.height,a=this.buildPerspectiveMatrix(n,i,r,o);if(a[8]=-s.x*2/e.width,a[9]=s.y*2/e.height,!e.isOrthographic)return new u.Matrix4().fromArray(a);const c=.5*e.height/Math.tan(n/2)*Math.tan(n*.5),p=c*i,f=this.buildOrthographicMatrix(-p-s.x,p-s.x,-c+s.y,c+s.y,r,o),b=Math.min(e.pitch/15,1),g=b*b*b*b*b,d=new Float64Array(16);for(let x=0;x<16;x++)d[x]=(1-g)*f[x]+g*a[x];return new u.Matrix4().fromArray(d)}updateCameraForRender(e,n,r,o,s){const i=n.transform,{fov:a,nearZ:l,farZ:c,aspect:p}=this.extractCameraParams(r,i);e.fov=_t.radToDeg(a),e.aspect=p,e.near=l,e.far=c;const f=this.buildPerspectiveMatrix(a,p,l,c);e._cleanProjectionMatrix=f;const h=this.extractMVPMatrix(r,o),b=this.calcProjectionMatrix(i,a,l,c);e.projectionMatrix.copy(b),e.projectionMatrixInverse.copy(b).invert();const g=new u.Matrix4().multiplyMatrices(e.projectionMatrixInverse,h);e.matrixWorld.copy(g).invert(),e.matrixWorldInverse.copy(g),e.matrixAutoUpdate=!1,e.matrixWorldAutoUpdate=!1,this.updateCameraTransform(e)}extractCameraParams(e,n){const r=n.width/n.height;if(e.fov!==void 0)return{fov:e.fov,nearZ:e.nearZ,farZ:e.farZ,aspect:r};const o=n.cameraToCenterDistance;return{fov:o&&n.height?2*Math.atan(n.height/2/o):.6435,nearZ:n.nearZ||.1,farZ:n.farZ||1e4,aspect:r}}extractMVPMatrix(e,n){let r;if(e.defaultProjectionData?.mainMatrix)r=new u.Matrix4().fromArray(Object.values(e.defaultProjectionData.mainMatrix));else if(e.modelViewProjectionMatrix)r=new u.Matrix4().fromArray(e.modelViewProjectionMatrix);else{const o=Array.isArray(e)?e:Array.from(e);r=new u.Matrix4().fromArray(o)}return new u.Matrix4().multiplyMatrices(r,n)}updateCameraTransform(e){const n=new u.Vector3,r=new u.Quaternion,o=new u.Vector3;e.matrixWorld.decompose(n,r,o),e.position.copy(n),e.rotation.copy(new u.Euler().setFromQuaternion(r,"YXZ"))}createEnvTexture(e,n){e?.endsWith(".hdr")&&new ui().load(e,r=>{r.mapping=u.EquirectangularReflectionMapping,n.environment=r,n.environmentRotation.x=Math.PI/2})}}const Dt=new u.Vector3,Jr=new u.Matrix4,eo=new u.Matrix4,to=new u.Vector3,no=new u.Vector3;class fi{constructor(e={}){const n=this;let r,o,s,i;const a={objects:new WeakMap},l=e.element!==void 0?e.element:document.createElement("div");l.style.overflow="hidden",this.domElement=l,this.sortObjects=!0,this.getSize=function(){return{width:r,height:o}},this.render=function(g,d){g.matrixWorldAutoUpdate===!0&&g.updateMatrixWorld(),d.parent===null&&d.matrixWorldAutoUpdate===!0&&d.updateMatrixWorld(),Jr.copy(d.matrixWorldInverse),eo.multiplyMatrices(d.projectionMatrix,Jr),p(g,g,d),this.sortObjects&&b(g)},this.setSize=function(g,d){r=g,o=d,s=r/2,i=o/2,l.style.width=g+"px",l.style.height=d+"px"};function c(g){g.isCSS2DObject&&(g.element.style.display="none");for(let d=0,x=g.children.length;d<x;d++)c(g.children[d])}function p(g,d,x){if(g.visible===!1){c(g);return}if(g.isCSS2DObject){Dt.setFromMatrixPosition(g.matrixWorld),Dt.applyMatrix4(eo);const T=Dt.z>=-1&&Dt.z<=1&&g.layers.test(x.layers)===!0,C=g.element;C.style.display=T===!0?"":"none",T===!0&&(g.onBeforeRender(n,d,x),C.style.transform="translate("+-100*g.center.x+"%,"+-100*g.center.y+"%)translate("+(Dt.x*s+s)+"px,"+(-Dt.y*i+i)+"px)",C.parentNode!==l&&l.appendChild(C),g.onAfterRender(n,d,x));const M={distanceToCameraSquared:f(x,g)};a.objects.set(g,M)}for(let T=0,C=g.children.length;T<C;T++)p(g.children[T],d,x)}function f(g,d){return to.setFromMatrixPosition(g.matrixWorld),no.setFromMatrixPosition(d.matrixWorld),to.distanceToSquared(no)}function h(g){const d=[];return g.traverseVisible(function(x){x.isCSS2DObject&&d.push(x)}),d}function b(g){const d=h(g).sort(function(T,C){if(T.renderOrder!==C.renderOrder)return C.renderOrder-T.renderOrder;const M=a.objects.get(T).distanceToCameraSquared,S=a.objects.get(C).distanceToCameraSquared;return M-S}),x=d.length;for(let T=0,C=d.length;T<C;T++)d[T].element.style.zIndex=x-T}}}class pi{renderer;labelRenderer;constructor(e,n){if(!n||n.isContextLost())throw new Error("WebGL context is lost or invalid");this.renderer=new u.WebGLRenderer({alpha:!0,antialias:!0,canvas:e.getCanvas(),context:n}),this.renderer.autoClear=!1,this.renderer.shadowMap.enabled=!0,this.labelRenderer=this.createLabelRenderer(e)}createLabelRenderer(e){const n=e.getContainer(),r=new fi;return r.setSize(n.clientWidth,n.clientHeight),r.domElement.style.position="absolute",r.domElement.style.top="0px",r.domElement.style.pointerEvents="none",e._container.appendChild(r.domElement),e.on("resize",()=>{const{clientWidth:o,clientHeight:s}=e.getContainer();r.setSize(o,s)}),r}getRenderer(){return this.renderer}render(e,n){this.renderer.resetState(),this.renderer.render(e,n),this.labelRenderer.render(e,n)}dispose(){this.labelRenderer.domElement?.parentNode?.removeChild(this.labelRenderer.domElement),this.renderer?.dispose()}}const Br=Y.createContext({scene:void 0,camera:void 0,renderer:void 0,map:void 0,sceneRoot:void 0,worldMatrix:void 0,worldMatrixInv:void 0}),Hn=()=>Y.useContext(Br),hi=({mapId:t,id:e,refCenter:n,envTexture:r,envIntensity:o=1,createLight:s=!0,children:i,beforeId:a})=>{const{map:l}=ii.useMap({mapId:t,waitForLayer:a}),[c,p]=Y.useState(),[f,h]=Y.useState(),[b,g]=Y.useState(),[d,x]=Y.useState(),[T,C]=Y.useState(),[M,S]=Y.useState(),w=Y.useRef(new di),v=Y.useRef(new u.Matrix4),R=Y.useRef(new u.Matrix4),P=Y.useRef(void 0);return Y.useEffect(()=>{if(!l)return;const N=w.current,$=N.createScene(s),B=N.createGroup($,"scene-root"),y=N.createCamera(B,"camera-for-render"),A={id:e,type:"custom",renderingMode:"3d",onAdd:(E,L)=>{const k=new pi(E,L);P.current=k,g(k);const V=n||E.getCenter();v.current=_t.updateWorldMatrix(E,V),R.current=v.current.clone().invert(),C(v.current),S(R.current),r&&N.createEnvTexture(r,$),$.environmentIntensity=o,E.triggerRepaint()},render:(E,L)=>{!P.current||!$||!y||(N.updateCameraForRender(y,l.map,L,v.current,R.current),P.current.render($,y),l.triggerRepaint())},onRemove:()=>{P.current&&(P.current.dispose(),P.current=void 0),g(void 0)}};return l.getLayer(e)||l.addLayer(A,a),p($),h(y),x(B),()=>{l.getLayer(e)&&l.removeLayer(e)}},[l,e]),Y.useEffect(()=>{c&&r&&w.current.createEnvTexture(r,c)},[c,r]),Y.useEffect(()=>{c&&(c.environmentIntensity=o)},[c,o]),Y.useEffect(()=>{l&&n&&(v.current=_t.updateWorldMatrix(l.map,n),R.current=v.current.clone().invert(),C(v.current),S(R.current),l.triggerRepaint())},[l,n]),H.jsx(Br.Provider,{value:{scene:c,camera:f,renderer:b,map:l?.map,sceneRoot:d,worldMatrix:T,worldMatrixInv:M},children:i})};function ro(t,e){if(e===u.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===u.TriangleFanDrawMode||e===u.TriangleStripDrawMode){let n=t.getIndex();if(n===null){const i=[],a=t.getAttribute("position");if(a!==void 0){for(let l=0;l<a.count;l++)i.push(l);t.setIndex(i),n=t.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t}const r=n.count-2,o=[];if(e===u.TriangleFanDrawMode)for(let i=1;i<=r;i++)o.push(n.getX(0)),o.push(n.getX(i)),o.push(n.getX(i+1));else for(let i=0;i<r;i++)i%2===0?(o.push(n.getX(i)),o.push(n.getX(i+1)),o.push(n.getX(i+2))):(o.push(n.getX(i+2)),o.push(n.getX(i+1)),o.push(n.getX(i)));o.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=t.clone();return s.setIndex(o),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),t}class oo extends u.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(n){return new xi(n)}),this.register(function(n){return new vi(n)}),this.register(function(n){return new Ai(n)}),this.register(function(n){return new Pi(n)}),this.register(function(n){return new Ii(n)}),this.register(function(n){return new Si(n)}),this.register(function(n){return new wi(n)}),this.register(function(n){return new Ei(n)}),this.register(function(n){return new Ci(n)}),this.register(function(n){return new bi(n)}),this.register(function(n){return new _i(n)}),this.register(function(n){return new Ti(n)}),this.register(function(n){return new Ri(n)}),this.register(function(n){return new Mi(n)}),this.register(function(n){return new gi(n)}),this.register(function(n){return new Oi(n)}),this.register(function(n){return new ki(n)})}load(e,n,r,o){const s=this;let i;if(this.resourcePath!=="")i=this.resourcePath;else if(this.path!==""){const c=u.LoaderUtils.extractUrlBase(e);i=u.LoaderUtils.resolveURL(c,this.path)}else i=u.LoaderUtils.extractUrlBase(e);this.manager.itemStart(e);const a=function(c){o?o(c):console.error(c),s.manager.itemError(e),s.manager.itemEnd(e)},l=new u.FileLoader(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(c){try{s.parse(c,i,function(p){n(p),s.manager.itemEnd(e)},a)}catch(p){a(p)}},r,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,n,r,o){let s;const i={},a={},l=new TextDecoder;if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(l.decode(new Uint8Array(e,0,4))===gs){try{i[ie.KHR_BINARY_GLTF]=new Li(e)}catch(f){o&&o(f);return}s=JSON.parse(i[ie.KHR_BINARY_GLTF].content)}else s=JSON.parse(l.decode(e));else s=e;if(s.asset===void 0||s.asset.version[0]<2){o&&o(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Yi(s,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let p=0;p<this.pluginCallbacks.length;p++){const f=this.pluginCallbacks[p](c);f.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[f.name]=f,i[f.name]=!0}if(s.extensionsUsed)for(let p=0;p<s.extensionsUsed.length;++p){const f=s.extensionsUsed[p],h=s.extensionsRequired||[];switch(f){case ie.KHR_MATERIALS_UNLIT:i[f]=new yi;break;case ie.KHR_DRACO_MESH_COMPRESSION:i[f]=new Ni(s,this.dracoLoader);break;case ie.KHR_TEXTURE_TRANSFORM:i[f]=new Di;break;case ie.KHR_MESH_QUANTIZATION:i[f]=new $i;break;default:h.indexOf(f)>=0&&a[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}c.setExtensions(i),c.setPlugins(a),c.parse(r,o)}parseAsync(e,n){const r=this;return new Promise(function(o,s){r.parse(e,n,o,s)})}}function mi(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const ie={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class gi{constructor(e){this.parser=e,this.name=ie.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,o=n.length;r<o;r++){const s=n[r];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const n=this.parser,r="light:"+e;let o=n.cache.get(r);if(o)return o;const s=n.json,l=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let c;const p=new u.Color(16777215);l.color!==void 0&&p.setRGB(l.color[0],l.color[1],l.color[2],u.LinearSRGBColorSpace);const f=l.range!==void 0?l.range:0;switch(l.type){case"directional":c=new u.DirectionalLight(p),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new u.PointLight(p),c.distance=f;break;case"spot":c=new u.SpotLight(p),c.distance=f,l.spot=l.spot||{},l.spot.innerConeAngle=l.spot.innerConeAngle!==void 0?l.spot.innerConeAngle:0,l.spot.outerConeAngle=l.spot.outerConeAngle!==void 0?l.spot.outerConeAngle:Math.PI/4,c.angle=l.spot.outerConeAngle,c.penumbra=1-l.spot.innerConeAngle/l.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+l.type)}return c.position.set(0,0,0),Ze(c,l),l.intensity!==void 0&&(c.intensity=l.intensity),c.name=n.createUniqueName(l.name||"light_"+e),o=Promise.resolve(c),n.cache.add(r,o),o}getDependency(e,n){if(e==="light")return this._loadLight(n)}createNodeAttachment(e){const n=this,r=this.parser,s=r.json.nodes[e],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(l){return r._getNodeRef(n.cache,a,l)})}}class yi{constructor(){this.name=ie.KHR_MATERIALS_UNLIT}getMaterialType(){return u.MeshBasicMaterial}extendParams(e,n,r){const o=[];e.color=new u.Color(1,1,1),e.opacity=1;const s=n.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const i=s.baseColorFactor;e.color.setRGB(i[0],i[1],i[2],u.LinearSRGBColorSpace),e.opacity=i[3]}s.baseColorTexture!==void 0&&o.push(r.assignTexture(e,"map",s.baseColorTexture,u.SRGBColorSpace))}return Promise.all(o)}}class bi{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,n){const o=this.parser.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=o.extensions[this.name].emissiveStrength;return s!==void 0&&(n.emissiveIntensity=s),Promise.resolve()}}class xi{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];if(i.clearcoatFactor!==void 0&&(n.clearcoat=i.clearcoatFactor),i.clearcoatTexture!==void 0&&s.push(r.assignTexture(n,"clearcoatMap",i.clearcoatTexture)),i.clearcoatRoughnessFactor!==void 0&&(n.clearcoatRoughness=i.clearcoatRoughnessFactor),i.clearcoatRoughnessTexture!==void 0&&s.push(r.assignTexture(n,"clearcoatRoughnessMap",i.clearcoatRoughnessTexture)),i.clearcoatNormalTexture!==void 0&&(s.push(r.assignTexture(n,"clearcoatNormalMap",i.clearcoatNormalTexture)),i.clearcoatNormalTexture.scale!==void 0)){const a=i.clearcoatNormalTexture.scale;n.clearcoatNormalScale=new u.Vector2(a,a)}return Promise.all(s)}}class vi{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_DISPERSION}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const o=this.parser.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=o.extensions[this.name];return n.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class Ti{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];return i.iridescenceFactor!==void 0&&(n.iridescence=i.iridescenceFactor),i.iridescenceTexture!==void 0&&s.push(r.assignTexture(n,"iridescenceMap",i.iridescenceTexture)),i.iridescenceIor!==void 0&&(n.iridescenceIOR=i.iridescenceIor),n.iridescenceThicknessRange===void 0&&(n.iridescenceThicknessRange=[100,400]),i.iridescenceThicknessMinimum!==void 0&&(n.iridescenceThicknessRange[0]=i.iridescenceThicknessMinimum),i.iridescenceThicknessMaximum!==void 0&&(n.iridescenceThicknessRange[1]=i.iridescenceThicknessMaximum),i.iridescenceThicknessTexture!==void 0&&s.push(r.assignTexture(n,"iridescenceThicknessMap",i.iridescenceThicknessTexture)),Promise.all(s)}}class Si{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_SHEEN}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[];n.sheenColor=new u.Color(0,0,0),n.sheenRoughness=0,n.sheen=1;const i=o.extensions[this.name];if(i.sheenColorFactor!==void 0){const a=i.sheenColorFactor;n.sheenColor.setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace)}return i.sheenRoughnessFactor!==void 0&&(n.sheenRoughness=i.sheenRoughnessFactor),i.sheenColorTexture!==void 0&&s.push(r.assignTexture(n,"sheenColorMap",i.sheenColorTexture,u.SRGBColorSpace)),i.sheenRoughnessTexture!==void 0&&s.push(r.assignTexture(n,"sheenRoughnessMap",i.sheenRoughnessTexture)),Promise.all(s)}}class wi{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];return i.transmissionFactor!==void 0&&(n.transmission=i.transmissionFactor),i.transmissionTexture!==void 0&&s.push(r.assignTexture(n,"transmissionMap",i.transmissionTexture)),Promise.all(s)}}class Ei{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_VOLUME}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];n.thickness=i.thicknessFactor!==void 0?i.thicknessFactor:0,i.thicknessTexture!==void 0&&s.push(r.assignTexture(n,"thicknessMap",i.thicknessTexture)),n.attenuationDistance=i.attenuationDistance||1/0;const a=i.attenuationColor||[1,1,1];return n.attenuationColor=new u.Color().setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace),Promise.all(s)}}class Ci{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_IOR}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const o=this.parser.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=o.extensions[this.name];return n.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class _i{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_SPECULAR}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];n.specularIntensity=i.specularFactor!==void 0?i.specularFactor:1,i.specularTexture!==void 0&&s.push(r.assignTexture(n,"specularIntensityMap",i.specularTexture));const a=i.specularColorFactor||[1,1,1];return n.specularColor=new u.Color().setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace),i.specularColorTexture!==void 0&&s.push(r.assignTexture(n,"specularColorMap",i.specularColorTexture,u.SRGBColorSpace)),Promise.all(s)}}class Mi{constructor(e){this.parser=e,this.name=ie.EXT_MATERIALS_BUMP}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];return n.bumpScale=i.bumpFactor!==void 0?i.bumpFactor:1,i.bumpTexture!==void 0&&s.push(r.assignTexture(n,"bumpMap",i.bumpTexture)),Promise.all(s)}}class Ri{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];return i.anisotropyStrength!==void 0&&(n.anisotropy=i.anisotropyStrength),i.anisotropyRotation!==void 0&&(n.anisotropyRotation=i.anisotropyRotation),i.anisotropyTexture!==void 0&&s.push(r.assignTexture(n,"anisotropyMap",i.anisotropyTexture)),Promise.all(s)}}class Ai{constructor(e){this.parser=e,this.name=ie.KHR_TEXTURE_BASISU}loadTexture(e){const n=this.parser,r=n.json,o=r.textures[e];if(!o.extensions||!o.extensions[this.name])return null;const s=o.extensions[this.name],i=n.options.ktx2Loader;if(!i){if(r.extensionsRequired&&r.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,s.source,i)}}class Pi{constructor(e){this.parser=e,this.name=ie.EXT_TEXTURE_WEBP}loadTexture(e){const n=this.name,r=this.parser,o=r.json,s=o.textures[e];if(!s.extensions||!s.extensions[n])return null;const i=s.extensions[n],a=o.images[i.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return r.loadTextureImage(e,i.source,l)}}class Ii{constructor(e){this.parser=e,this.name=ie.EXT_TEXTURE_AVIF}loadTexture(e){const n=this.name,r=this.parser,o=r.json,s=o.textures[e];if(!s.extensions||!s.extensions[n])return null;const i=s.extensions[n],a=o.images[i.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return r.loadTextureImage(e,i.source,l)}}class Oi{constructor(e){this.name=ie.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const o=r.extensions[this.name],s=this.parser.getDependency("buffer",o.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(n.extensionsRequired&&n.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=o.byteOffset||0,c=o.byteLength||0,p=o.count,f=o.byteStride,h=new Uint8Array(a,l,c);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(p,f,h,o.mode,o.filter).then(function(b){return b.buffer}):i.ready.then(function(){const b=new ArrayBuffer(p*f);return i.decodeGltfBuffer(new Uint8Array(b),p,f,h,o.mode,o.filter),b})})}else return null}}class ki{constructor(e){this.name=ie.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const o=n.meshes[r.mesh];for(const c of o.primitives)if(c.mode!==ze.TRIANGLES&&c.mode!==ze.TRIANGLE_STRIP&&c.mode!==ze.TRIANGLE_FAN&&c.mode!==void 0)return null;const i=r.extensions[this.name].attributes,a=[],l={};for(const c in i)a.push(this.parser.getDependency("accessor",i[c]).then(p=>(l[c]=p,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const p=c.pop(),f=p.isGroup?p.children:[p],h=c[0].count,b=[];for(const g of f){const d=new u.Matrix4,x=new u.Vector3,T=new u.Quaternion,C=new u.Vector3(1,1,1),M=new u.InstancedMesh(g.geometry,g.material,h);for(let S=0;S<h;S++)l.TRANSLATION&&x.fromBufferAttribute(l.TRANSLATION,S),l.ROTATION&&T.fromBufferAttribute(l.ROTATION,S),l.SCALE&&C.fromBufferAttribute(l.SCALE,S),M.setMatrixAt(S,d.compose(x,T,C));for(const S in l)if(S==="_COLOR_0"){const w=l[S];M.instanceColor=new u.InstancedBufferAttribute(w.array,w.itemSize,w.normalized)}else S!=="TRANSLATION"&&S!=="ROTATION"&&S!=="SCALE"&&g.geometry.setAttribute(S,l[S]);u.Object3D.prototype.copy.call(M,g),this.parser.assignFinalMaterial(M),b.push(M)}return p.isGroup?(p.clear(),p.add(...b),p):b[0]}))}}const gs="glTF",Qt=12,so={JSON:1313821514,BIN:5130562};class Li{constructor(e){this.name=ie.KHR_BINARY_GLTF,this.content=null,this.body=null;const n=new DataView(e,0,Qt),r=new TextDecoder;if(this.header={magic:r.decode(new Uint8Array(e.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==gs)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const o=this.header.length-Qt,s=new DataView(e,Qt);let i=0;for(;i<o;){const a=s.getUint32(i,!0);i+=4;const l=s.getUint32(i,!0);if(i+=4,l===so.JSON){const c=new Uint8Array(e,Qt+i,a);this.content=r.decode(c)}else if(l===so.BIN){const c=Qt+i;this.body=e.slice(c,c+a)}i+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Ni{constructor(e,n){if(!n)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=ie.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=n,this.dracoLoader.preload()}decodePrimitive(e,n){const r=this.json,o=this.dracoLoader,s=e.extensions[this.name].bufferView,i=e.extensions[this.name].attributes,a={},l={},c={};for(const p in i){const f=Cr[p]||p.toLowerCase();a[f]=i[p]}for(const p in e.attributes){const f=Cr[p]||p.toLowerCase();if(i[p]!==void 0){const h=r.accessors[e.attributes[p]],b=Gt[h.componentType];c[f]=b.name,l[f]=h.normalized===!0}}return n.getDependency("bufferView",s).then(function(p){return new Promise(function(f,h){o.decodeDracoFile(p,function(b){for(const g in b.attributes){const d=b.attributes[g],x=l[g];x!==void 0&&(d.normalized=x)}f(b)},a,c,u.LinearSRGBColorSpace,h)})})}}class Di{constructor(){this.name=ie.KHR_TEXTURE_TRANSFORM}extendTexture(e,n){return(n.texCoord===void 0||n.texCoord===e.channel)&&n.offset===void 0&&n.rotation===void 0&&n.scale===void 0||(e=e.clone(),n.texCoord!==void 0&&(e.channel=n.texCoord),n.offset!==void 0&&e.offset.fromArray(n.offset),n.rotation!==void 0&&(e.rotation=n.rotation),n.scale!==void 0&&e.repeat.fromArray(n.scale),e.needsUpdate=!0),e}}class $i{constructor(){this.name=ie.KHR_MESH_QUANTIZATION}}class ys extends u.Interpolant{constructor(e,n,r,o){super(e,n,r,o)}copySampleValue_(e){const n=this.resultBuffer,r=this.sampleValues,o=this.valueSize,s=e*o*3+o;for(let i=0;i!==o;i++)n[i]=r[s+i];return n}interpolate_(e,n,r,o){const s=this.resultBuffer,i=this.sampleValues,a=this.valueSize,l=a*2,c=a*3,p=o-n,f=(r-n)/p,h=f*f,b=h*f,g=e*c,d=g-c,x=-2*b+3*h,T=b-h,C=1-x,M=T-h+f;for(let S=0;S!==a;S++){const w=i[d+S+a],v=i[d+S+l]*p,R=i[g+S+a],P=i[g+S]*p;s[S]=C*w+M*v+x*R+T*P}return s}}const Bi=new u.Quaternion;class zi extends ys{interpolate_(e,n,r,o){const s=super.interpolate_(e,n,r,o);return Bi.fromArray(s).normalize().toArray(s),s}}const ze={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Gt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},io={9728:u.NearestFilter,9729:u.LinearFilter,9984:u.NearestMipmapNearestFilter,9985:u.LinearMipmapNearestFilter,9986:u.NearestMipmapLinearFilter,9987:u.LinearMipmapLinearFilter},ao={33071:u.ClampToEdgeWrapping,33648:u.MirroredRepeatWrapping,10497:u.RepeatWrapping},lr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Cr={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},it={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Fi={CUBICSPLINE:void 0,LINEAR:u.InterpolateLinear,STEP:u.InterpolateDiscrete},cr={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Vi(t){return t.DefaultMaterial===void 0&&(t.DefaultMaterial=new u.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:u.FrontSide})),t.DefaultMaterial}function xt(t,e,n){for(const r in n.extensions)t[r]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[r]=n.extensions[r])}function Ze(t,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(t.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function ji(t,e,n){let r=!1,o=!1,s=!1;for(let c=0,p=e.length;c<p;c++){const f=e[c];if(f.POSITION!==void 0&&(r=!0),f.NORMAL!==void 0&&(o=!0),f.COLOR_0!==void 0&&(s=!0),r&&o&&s)break}if(!r&&!o&&!s)return Promise.resolve(t);const i=[],a=[],l=[];for(let c=0,p=e.length;c<p;c++){const f=e[c];if(r){const h=f.POSITION!==void 0?n.getDependency("accessor",f.POSITION):t.attributes.position;i.push(h)}if(o){const h=f.NORMAL!==void 0?n.getDependency("accessor",f.NORMAL):t.attributes.normal;a.push(h)}if(s){const h=f.COLOR_0!==void 0?n.getDependency("accessor",f.COLOR_0):t.attributes.color;l.push(h)}}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(l)]).then(function(c){const p=c[0],f=c[1],h=c[2];return r&&(t.morphAttributes.position=p),o&&(t.morphAttributes.normal=f),s&&(t.morphAttributes.color=h),t.morphTargetsRelative=!0,t})}function Hi(t,e){if(t.updateMorphTargets(),e.weights!==void 0)for(let n=0,r=e.weights.length;n<r;n++)t.morphTargetInfluences[n]=e.weights[n];if(e.extras&&Array.isArray(e.extras.targetNames)){const n=e.extras.targetNames;if(t.morphTargetInfluences.length===n.length){t.morphTargetDictionary={};for(let r=0,o=n.length;r<o;r++)t.morphTargetDictionary[n[r]]=r}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Ui(t){let e;const n=t.extensions&&t.extensions[ie.KHR_DRACO_MESH_COMPRESSION];if(n?e="draco:"+n.bufferView+":"+n.indices+":"+ur(n.attributes):e=t.indices+":"+ur(t.attributes)+":"+t.mode,t.targets!==void 0)for(let r=0,o=t.targets.length;r<o;r++)e+=":"+ur(t.targets[r]);return e}function ur(t){let e="";const n=Object.keys(t).sort();for(let r=0,o=n.length;r<o;r++)e+=n[r]+":"+t[n[r]]+";";return e}function _r(t){switch(t){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Gi(t){return t.search(/\.jpe?g($|\?)/i)>0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":t.search(/\.ktx2($|\?)/i)>0||t.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const Wi=new u.Matrix4;class Yi{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new mi,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 r=!1,o=-1,s=!1,i=-1;if(typeof navigator<"u"){const a=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(a)===!0;const l=a.match(/Version\/(\d+)/);o=r&&l?parseInt(l[1],10):-1,s=a.indexOf("Firefox")>-1,i=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||r&&o<17||s&&i<98?this.textureLoader=new u.TextureLoader(this.options.manager):this.textureLoader=new u.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new u.FileLoader(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,n){const r=this,o=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(i){return i._markDefs&&i._markDefs()}),Promise.all(this._invokeAll(function(i){return i.beforeRoot&&i.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(i){const a={scene:i[0][o.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:o.asset,parser:r,userData:{}};return xt(s,a,o),Ze(a,o),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let o=0,s=n.length;o<s;o++){const i=n[o].joints;for(let a=0,l=i.length;a<l;a++)e[i[a]].isBone=!0}for(let o=0,s=e.length;o<s;o++){const i=e[o];i.mesh!==void 0&&(this._addNodeRef(this.meshCache,i.mesh),i.skin!==void 0&&(r[i.mesh].isSkinnedMesh=!0)),i.camera!==void 0&&this._addNodeRef(this.cameraCache,i.camera)}}_addNodeRef(e,n){n!==void 0&&(e.refs[n]===void 0&&(e.refs[n]=e.uses[n]=0),e.refs[n]++)}_getNodeRef(e,n,r){if(e.refs[n]<=1)return r;const o=r.clone(),s=(i,a)=>{const l=this.associations.get(i);l!=null&&this.associations.set(a,l);for(const[c,p]of i.children.entries())s(p,a.children[c])};return s(r,o),o.name+="_instance_"+e.uses[n]++,o}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r<n.length;r++){const o=e(n[r]);if(o)return o}return null}_invokeAll(e){const n=Object.values(this.plugins);n.unshift(this);const r=[];for(let o=0;o<n.length;o++){const s=e(n[o]);s&&r.push(s)}return r}getDependency(e,n){const r=e+":"+n;let o=this.cache.get(r);if(!o){switch(e){case"scene":o=this.loadScene(n);break;case"node":o=this._invokeOne(function(s){return s.loadNode&&s.loadNode(n)});break;case"mesh":o=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(n)});break;case"accessor":o=this.loadAccessor(n);break;case"bufferView":o=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(n)});break;case"buffer":o=this.loadBuffer(n);break;case"material":o=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(n)});break;case"texture":o=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(n)});break;case"skin":o=this.loadSkin(n);break;case"animation":o=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(n)});break;case"camera":o=this.loadCamera(n);break;default:if(o=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,n)}),!o)throw new Error("Unknown type: "+e);break}this.cache.add(r,o)}return o}getDependencies(e){let n=this.cache.get(e);if(!n){const r=this,o=this.json[e+(e==="mesh"?"es":"s")]||[];n=Promise.all(o.map(function(s,i){return r.getDependency(e,i)})),this.cache.add(e,n)}return n}loadBuffer(e){const n=this.json.buffers[e],r=this.fileLoader;if(n.type&&n.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(n.uri===void 0&&e===0)return Promise.resolve(this.extensions[ie.KHR_BINARY_GLTF].body);const o=this.options;return new Promise(function(s,i){r.load(u.LoaderUtils.resolveURL(n.uri,o.path),s,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+n.uri+'".'))})})}loadBufferView(e){const n=this.json.bufferViews[e];return this.getDependency("buffer",n.buffer).then(function(r){const o=n.byteLength||0,s=n.byteOffset||0;return r.slice(s,s+o)})}loadAccessor(e){const n=this,r=this.json,o=this.json.accessors[e];if(o.bufferView===void 0&&o.sparse===void 0){const i=lr[o.type],a=Gt[o.componentType],l=o.normalized===!0,c=new a(o.count*i);return Promise.resolve(new u.BufferAttribute(c,i,l))}const s=[];return o.bufferView!==void 0?s.push(this.getDependency("bufferView",o.bufferView)):s.push(null),o.sparse!==void 0&&(s.push(this.getDependency("bufferView",o.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",o.sparse.values.bufferView))),Promise.all(s).then(function(i){const a=i[0],l=lr[o.type],c=Gt[o.componentType],p=c.BYTES_PER_ELEMENT,f=p*l,h=o.byteOffset||0,b=o.bufferView!==void 0?r.bufferViews[o.bufferView].byteStride:void 0,g=o.normalized===!0;let d,x;if(b&&b!==f){const T=Math.floor(h/b),C="InterleavedBuffer:"+o.bufferView+":"+o.componentType+":"+T+":"+o.count;let M=n.cache.get(C);M||(d=new c(a,T*b,o.count*b/p),M=new u.InterleavedBuffer(d,b/p),n.cache.add(C,M)),x=new u.InterleavedBufferAttribute(M,l,h%b/p,g)}else a===null?d=new c(o.count*l):d=new c(a,h,o.count*l),x=new u.BufferAttribute(d,l,g);if(o.sparse!==void 0){const T=lr.SCALAR,C=Gt[o.sparse.indices.componentType],M=o.sparse.indices.byteOffset||0,S=o.sparse.values.byteOffset||0,w=new C(i[1],M,o.sparse.count*T),v=new c(i[2],S,o.sparse.count*l);a!==null&&(x=new u.BufferAttribute(x.array.slice(),x.itemSize,x.normalized)),x.normalized=!1;for(let R=0,P=w.length;R<P;R++){const N=w[R];if(x.setX(N,v[R*l]),l>=2&&x.setY(N,v[R*l+1]),l>=3&&x.setZ(N,v[R*l+2]),l>=4&&x.setW(N,v[R*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}x.normalized=g}return x})}loadTexture(e){const n=this.json,r=this.options,s=n.textures[e].source,i=n.images[s];let a=this.textureLoader;if(i.uri){const l=r.manager.getHandler(i.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,n,r){const o=this,s=this.json,i=s.textures[e],a=s.images[n],l=(a.uri||a.bufferView)+":"+i.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(n,r).then(function(p){p.flipY=!1,p.name=i.name||a.name||"",p.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(p.name=a.uri);const h=(s.samplers||{})[i.sampler]||{};return p.magFilter=io[h.magFilter]||u.LinearFilter,p.minFilter=io[h.minFilter]||u.LinearMipmapLinearFilter,p.wrapS=ao[h.wrapS]||u.RepeatWrapping,p.wrapT=ao[h.wrapT]||u.RepeatWrapping,p.generateMipmaps=!p.isCompressedTexture&&p.minFilter!==u.NearestFilter&&p.minFilter!==u.LinearFilter,o.associations.set(p,{textures:e}),p}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,n){const r=this,o=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(f=>f.clone());const i=o.images[e],a=self.URL||self.webkitURL;let l=i.uri||"",c=!1;if(i.bufferView!==void 0)l=r.getDependency("bufferView",i.bufferView).then(function(f){c=!0;const h=new Blob([f],{type:i.mimeType});return l=a.createObjectURL(h),l});else if(i.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const p=Promise.resolve(l).then(function(f){return new Promise(function(h,b){let g=h;n.isImageBitmapLoader===!0&&(g=function(d){const x=new u.Texture(d);x.needsUpdate=!0,h(x)}),n.load(u.LoaderUtils.resolveURL(f,s.path),g,void 0,b)})}).then(function(f){return c===!0&&a.revokeObjectURL(l),Ze(f,i),f.userData.mimeType=i.mimeType||Gi(i.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[e]=p,p}assignTexture(e,n,r,o){const s=this;return this.getDependency("texture",r.index).then(function(i){if(!i)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(i=i.clone(),i.channel=r.texCoord),s.extensions[ie.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[ie.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(i);i=s.extensions[ie.KHR_TEXTURE_TRANSFORM].extendTexture(i,a),s.associations.set(i,l)}}return o!==void 0&&(i.colorSpace=o),e[n]=i,i})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const o=n.attributes.tangent===void 0,s=n.attributes.color!==void 0,i=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new u.PointsMaterial,u.Material.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(a,l)),r=l}else if(e.isLine){const a="LineBasicMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new u.LineBasicMaterial,u.Material.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(a,l)),r=l}if(o||s||i){let a="ClonedMaterial:"+r.uuid+":";o&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),i&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=r.clone(),s&&(l.vertexColors=!0),i&&(l.flatShading=!0),o&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return u.MeshStandardMaterial}loadMaterial(e){const n=this,r=this.json,o=this.extensions,s=r.materials[e];let i;const a={},l=s.extensions||{},c=[];if(l[ie.KHR_MATERIALS_UNLIT]){const f=o[ie.KHR_MATERIALS_UNLIT];i=f.getMaterialType(),c.push(f.extendParams(a,s,n))}else{const f=s.pbrMetallicRoughness||{};if(a.color=new u.Color(1,1,1),a.opacity=1,Array.isArray(f.baseColorFactor)){const h=f.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],u.LinearSRGBColorSpace),a.opacity=h[3]}f.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",f.baseColorTexture,u.SRGBColorSpace)),a.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,a.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",f.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",f.metallicRoughnessTexture))),i=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=u.DoubleSide);const p=s.alphaMode||cr.OPAQUE;if(p===cr.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,p===cr.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&i!==u.MeshBasicMaterial&&(c.push(n.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new u.Vector2(1,1),s.normalTexture.scale!==void 0)){const f=s.normalTexture.scale;a.normalScale.set(f,f)}if(s.occlusionTexture!==void 0&&i!==u.MeshBasicMaterial&&(c.push(n.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&i!==u.MeshBasicMaterial){const f=s.emissiveFactor;a.emissive=new u.Color().setRGB(f[0],f[1],f[2],u.LinearSRGBColorSpace)}return s.emissiveTexture!==void 0&&i!==u.MeshBasicMaterial&&c.push(n.assignTexture(a,"emissiveMap",s.emissiveTexture,u.SRGBColorSpace)),Promise.all(c).then(function(){const f=new i(a);return s.name&&(f.name=s.name),Ze(f,s),n.associations.set(f,{materials:e}),s.extensions&&xt(o,f,s),f})}createUniqueName(e){const n=u.PropertyBinding.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,o=this.primitiveCache;function s(a){return r[ie.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return lo(l,a,n)})}const i=[];for(let a=0,l=e.length;a<l;a++){const c=e[a],p=Ui(c),f=o[p];if(f)i.push(f.promise);else{let h;c.extensions&&c.extensions[ie.KHR_DRACO_MESH_COMPRESSION]?h=s(c):h=lo(new u.BufferGeometry,c,n),o[p]={primitive:c,promise:h},i.push(h)}}return Promise.all(i)}loadMesh(e){const n=this,r=this.json,o=this.extensions,s=r.meshes[e],i=s.primitives,a=[];for(let l=0,c=i.length;l<c;l++){const p=i[l].material===void 0?Vi(this.cache):this.getDependency("material",i[l].material);a.push(p)}return a.push(n.loadGeometries(i)),Promise.all(a).then(function(l){const c=l.slice(0,l.length-1),p=l[l.length-1],f=[];for(let b=0,g=p.length;b<g;b++){const d=p[b],x=i[b];let T;const C=c[b];if(x.mode===ze.TRIANGLES||x.mode===ze.TRIANGLE_STRIP||x.mode===ze.TRIANGLE_FAN||x.mode===void 0)T=s.isSkinnedMesh===!0?new u.SkinnedMesh(d,C):new u.Mesh(d,C),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),x.mode===ze.TRIANGLE_STRIP?T.geometry=ro(T.geometry,u.TriangleStripDrawMode):x.mode===ze.TRIANGLE_FAN&&(T.geometry=ro(T.geometry,u.TriangleFanDrawMode));else if(x.mode===ze.LINES)T=new u.LineSegments(d,C);else if(x.mode===ze.LINE_STRIP)T=new u.Line(d,C);else if(x.mode===ze.LINE_LOOP)T=new u.LineLoop(d,C);else if(x.mode===ze.POINTS)T=new u.Points(d,C);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+x.mode);Object.keys(T.geometry.morphAttributes).length>0&&Hi(T,s),T.name=n.createUniqueName(s.name||"mesh_"+e),Ze(T,s),x.extensions&&xt(o,T,x),n.assignFinalMaterial(T),f.push(T)}for(let b=0,g=f.length;b<g;b++)n.associations.set(f[b],{meshes:e,primitives:b});if(f.length===1)return s.extensions&&xt(o,f[0],s),f[0];const h=new u.Group;s.extensions&&xt(o,h,s),n.associations.set(h,{meshes:e});for(let b=0,g=f.length;b<g;b++)h.add(f[b]);return h})}loadCamera(e){let n;const r=this.json.cameras[e],o=r[r.type];if(!o){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return r.type==="perspective"?n=new u.PerspectiveCamera(u.MathUtils.radToDeg(o.yfov),o.aspectRatio||1,o.znear||1,o.zfar||2e6):r.type==="orthographic"&&(n=new u.OrthographicCamera(-o.xmag,o.xmag,o.ymag,-o.ymag,o.znear,o.zfar)),r.name&&(n.name=this.createUniqueName(r.name)),Ze(n,r),Promise.resolve(n)}loadSkin(e){const n=this.json.skins[e],r=[];for(let o=0,s=n.joints.length;o<s;o++)r.push(this._loadNodeShallow(n.joints[o]));return n.inverseBindMatrices!==void 0?r.push(this.getDependency("accessor",n.inverseBindMatrices)):r.push(null),Promise.all(r).then(function(o){const s=o.pop(),i=o,a=[],l=[];for(let c=0,p=i.length;c<p;c++){const f=i[c];if(f){a.push(f);const h=new u.Matrix4;s!==null&&h.fromArray(s.array,c*16),l.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',n.joints[c])}return new u.Skeleton(a,l)})}loadAnimation(e){const n=this.json,r=this,o=n.animations[e],s=o.name?o.name:"animation_"+e,i=[],a=[],l=[],c=[],p=[];for(let f=0,h=o.channels.length;f<h;f++){const b=o.channels[f],g=o.samplers[b.sampler],d=b.target,x=d.node,T=o.parameters!==void 0?o.parameters[g.input]:g.input,C=o.parameters!==void 0?o.parameters[g.output]:g.output;d.node!==void 0&&(i.push(this.getDependency("node",x)),a.push(this.getDependency("accessor",T)),l.push(this.getDependency("accessor",C)),c.push(g),p.push(d))}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(l),Promise.all(c),Promise.all(p)]).then(function(f){const h=f[0],b=f[1],g=f[2],d=f[3],x=f[4],T=[];for(let M=0,S=h.length;M<S;M++){const w=h[M],v=b[M],R=g[M],P=d[M],N=x[M];if(w===void 0)continue;w.updateMatrix&&w.updateMatrix();const $=r._createAnimationTracks(w,v,R,P,N);if($)for(let B=0;B<$.length;B++)T.push($[B])}const C=new u.AnimationClip(s,void 0,T);return Ze(C,o),C})}createNodeMesh(e){const n=this.json,r=this,o=n.nodes[e];return o.mesh===void 0?null:r.getDependency("mesh",o.mesh).then(function(s){const i=r._getNodeRef(r.meshCache,o.mesh,s);return o.weights!==void 0&&i.traverse(function(a){if(a.isMesh)for(let l=0,c=o.weights.length;l<c;l++)a.morphTargetInfluences[l]=o.weights[l]}),i})}loadNode(e){const n=this.json,r=this,o=n.nodes[e],s=r._loadNodeShallow(e),i=[],a=o.children||[];for(let c=0,p=a.length;c<p;c++)i.push(r.getDependency("node",a[c]));const l=o.skin===void 0?Promise.resolve(null):r.getDependency("skin",o.skin);return Promise.all([s,Promise.all(i),l]).then(function(c){const p=c[0],f=c[1],h=c[2];h!==null&&p.traverse(function(b){b.isSkinnedMesh&&b.bind(h,Wi)});for(let b=0,g=f.length;b<g;b++)p.add(f[b]);return p})}_loadNodeShallow(e){const n=this.json,r=this.extensions,o=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=n.nodes[e],i=s.name?o.createUniqueName(s.name):"",a=[],l=o._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return l&&a.push(l),s.camera!==void 0&&a.push(o.getDependency("camera",s.camera).then(function(c){return o._getNodeRef(o.cameraCache,s.camera,c)})),o._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){a.push(c)}),this.nodeCache[e]=Promise.all(a).then(function(c){let p;if(s.isBone===!0?p=new u.Bone:c.length>1?p=new u.Group:c.length===1?p=c[0]:p=new u.Object3D,p!==c[0])for(let f=0,h=c.length;f<h;f++)p.add(c[f]);if(s.name&&(p.userData.name=s.name,p.name=i),Ze(p,s),s.extensions&&xt(r,p,s),s.matrix!==void 0){const f=new u.Matrix4;f.fromArray(s.matrix),p.applyMatrix4(f)}else s.translation!==void 0&&p.position.fromArray(s.translation),s.rotation!==void 0&&p.quaternion.fromArray(s.rotation),s.scale!==void 0&&p.scale.fromArray(s.scale);if(!o.associations.has(p))o.associations.set(p,{});else if(s.mesh!==void 0&&o.meshCache.refs[s.mesh]>1){const f=o.associations.get(p);o.associations.set(p,{...f})}return o.associations.get(p).nodes=e,p}),this.nodeCache[e]}loadScene(e){const n=this.extensions,r=this.json.scenes[e],o=this,s=new u.Group;r.name&&(s.name=o.createUniqueName(r.name)),Ze(s,r),r.extensions&&xt(n,s,r);const i=r.nodes||[],a=[];for(let l=0,c=i.length;l<c;l++)a.push(o.getDependency("node",i[l]));return Promise.all(a).then(function(l){for(let p=0,f=l.length;p<f;p++)s.add(l[p]);const c=p=>{const f=new Map;for(const[h,b]of o.associations)(h instanceof u.Material||h instanceof u.Texture)&&f.set(h,b);return p.traverse(h=>{const b=o.associations.get(h);b!=null&&f.set(h,b)}),f};return o.associations=c(s),s})}_createAnimationTracks(e,n,r,o,s){const i=[],a=e.name?e.name:e.uuid,l=[];it[s.path]===it.weights?e.traverse(function(h){h.morphTargetInfluences&&l.push(h.name?h.name:h.uuid)}):l.push(a);let c;switch(it[s.path]){case it.weights:c=u.NumberKeyframeTrack;break;case it.rotation:c=u.QuaternionKeyframeTrack;break;case it.translation:case it.scale:c=u.VectorKeyframeTrack;break;default:switch(r.itemSize){case 1:c=u.NumberKeyframeTrack;break;case 2:case 3:default:c=u.VectorKeyframeTrack;break}break}const p=o.interpolation!==void 0?Fi[o.interpolation]:u.InterpolateLinear,f=this._getArrayFromAccessor(r);for(let h=0,b=l.length;h<b;h++){const g=new c(l[h]+"."+it[s.path],n.array,f,p);o.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(g),i.push(g)}return i}_getArrayFromAccessor(e){let n=e.array;if(e.normalized){const r=_r(n.constructor),o=new Float32Array(n.length);for(let s=0,i=n.length;s<i;s++)o[s]=n[s]*r;n=o}return n}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(r){const o=this instanceof u.QuaternionKeyframeTrack?zi:ys;return new o(this.times,this.values,this.getValueSize()/3,r)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Xi(t,e,n){const r=e.attributes,o=new u.Box3;if(r.POSITION!==void 0){const a=n.json.accessors[r.POSITION],l=a.min,c=a.max;if(l!==void 0&&c!==void 0){if(o.set(new u.Vector3(l[0],l[1],l[2]),new u.Vector3(c[0],c[1],c[2])),a.normalized){const p=_r(Gt[a.componentType]);o.min.multiplyScalar(p),o.max.multiplyScalar(p)}}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 u.Vector3,l=new u.Vector3;for(let c=0,p=s.length;c<p;c++){const f=s[c];if(f.POSITION!==void 0){const h=n.json.accessors[f.POSITION],b=h.min,g=h.max;if(b!==void 0&&g!==void 0){if(l.setX(Math.max(Math.abs(b[0]),Math.abs(g[0]))),l.setY(Math.max(Math.abs(b[1]),Math.abs(g[1]))),l.setZ(Math.max(Math.abs(b[2]),Math.abs(g[2]))),h.normalized){const d=_r(Gt[h.componentType]);l.multiplyScalar(d)}a.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}o.expandByVector(a)}t.boundingBox=o;const i=new u.Sphere;o.getCenter(i.center),i.radius=o.min.distanceTo(o.max)/2,t.boundingSphere=i}function lo(t,e,n){const r=e.attributes,o=[];function s(i,a){return n.getDependency("accessor",i).then(function(l){t.setAttribute(a,l)})}for(const i in r){const a=Cr[i]||i.toLowerCase();a in t.attributes||o.push(s(r[i],a))}if(e.indices!==void 0&&!t.index){const i=n.getDependency("accessor",e.indices).then(function(a){t.setIndex(a)});o.push(i)}return u.ColorManagement.workingColorSpace!==u.LinearSRGBColorSpace&&"COLOR_0"in r&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${u.ColorManagement.workingColorSpace}" not supported.`),Ze(t,e),Xi(t,e,n),Promise.all(o).then(function(){return e.targets!==void 0?ji(t,e.targets,n):t})}const Ki=/^[og]\s*(.+)?/,qi=/^mtllib /,Qi=/^usemtl /,Zi=/^usemap /,co=/\s+/,uo=new u.Vector3,dr=new u.Vector3,fo=new u.Vector3,po=new u.Vector3,Be=new u.Vector3,gn=new u.Color;function Ji(){const t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,n){if(this.object&&this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=n!==!1;return}const r=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:n!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(o,s){const i=this._finalize(!1);i&&(i.inherited||i.groupCount<=0)&&this.materials.splice(i.index,1);const a={index:this.materials.length,name:o||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:i!==void 0?i.smooth:this.smooth,groupStart:i!==void 0?i.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(l){const c={index:typeof l=="number"?l:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(o){const s=this.currentMaterial();if(s&&s.groupEnd===-1&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),o&&this.materials.length>1)for(let i=this.materials.length-1;i>=0;i--)this.materials[i].groupCount<=0&&this.materials.splice(i,1);return o&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),s}},r&&r.name&&typeof r.clone=="function"){const o=r.clone(0);o.inherited=!0,this.object.materials.push(o)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(e,n){const r=parseInt(e,10);return(r>=0?r-1:r+n/3)*3},parseNormalIndex:function(e,n){const r=parseInt(e,10);return(r>=0?r-1:r+n/3)*3},parseUVIndex:function(e,n){const r=parseInt(e,10);return(r>=0?r-1:r+n/2)*2},addVertex:function(e,n,r){const o=this.vertices,s=this.object.geometry.vertices;s.push(o[e+0],o[e+1],o[e+2]),s.push(o[n+0],o[n+1],o[n+2]),s.push(o[r+0],o[r+1],o[r+2])},addVertexPoint:function(e){const n=this.vertices;this.object.geometry.vertices.push(n[e+0],n[e+1],n[e+2])},addVertexLine:function(e){const n=this.vertices;this.object.geometry.vertices.push(n[e+0],n[e+1],n[e+2])},addNormal:function(e,n,r){const o=this.normals,s=this.object.geometry.normals;s.push(o[e+0],o[e+1],o[e+2]),s.push(o[n+0],o[n+1],o[n+2]),s.push(o[r+0],o[r+1],o[r+2])},addFaceNormal:function(e,n,r){const o=this.vertices,s=this.object.geometry.normals;uo.fromArray(o,e),dr.fromArray(o,n),fo.fromArray(o,r),Be.subVectors(fo,dr),po.subVectors(uo,dr),Be.cross(po),Be.normalize(),s.push(Be.x,Be.y,Be.z),s.push(Be.x,Be.y,Be.z),s.push(Be.x,Be.y,Be.z)},addColor:function(e,n,r){const o=this.colors,s=this.object.geometry.colors;o[e]!==void 0&&s.push(o[e+0],o[e+1],o[e+2]),o[n]!==void 0&&s.push(o[n+0],o[n+1],o[n+2]),o[r]!==void 0&&s.push(o[r+0],o[r+1],o[r+2])},addUV:function(e,n,r){const o=this.uvs,s=this.object.geometry.uvs;s.push(o[e+0],o[e+1]),s.push(o[n+0],o[n+1]),s.push(o[r+0],o[r+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const n=this.uvs;this.object.geometry.uvs.push(n[e+0],n[e+1])},addFace:function(e,n,r,o,s,i,a,l,c){const p=this.vertices.length;let f=this.parseVertexIndex(e,p),h=this.parseVertexIndex(n,p),b=this.parseVertexIndex(r,p);if(this.addVertex(f,h,b),this.addColor(f,h,b),a!==void 0&&a!==""){const g=this.normals.length;f=this.parseNormalIndex(a,g),h=this.parseNormalIndex(l,g),b=this.parseNormalIndex(c,g),this.addNormal(f,h,b)}else this.addFaceNormal(f,h,b);if(o!==void 0&&o!==""){const g=this.uvs.length;f=this.parseUVIndex(o,g),h=this.parseUVIndex(s,g),b=this.parseUVIndex(i,g),this.addUV(f,h,b),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const n=this.vertices.length;for(let r=0,o=e.length;r<o;r++){const s=this.parseVertexIndex(e[r],n);this.addVertexPoint(s),this.addColor(s)}},addLineGeometry:function(e,n){this.object.geometry.type="Line";const r=this.vertices.length,o=this.uvs.length;for(let s=0,i=e.length;s<i;s++)this.addVertexLine(this.parseVertexIndex(e[s],r));for(let s=0,i=n.length;s<i;s++)this.addUVLine(this.parseUVIndex(n[s],o))}};return t.startObject("",!1),t}class ea extends u.Loader{constructor(e){super(e),this.materials=null}load(e,n,r,o){const s=this,i=new u.FileLoader(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,function(a){try{n(s.parse(a))}catch(l){o?o(l):console.error(l),s.manager.itemError(e)}},r,o)}setMaterials(e){return this.materials=e,this}parse(e){const n=new Ji;e.indexOf(`\r
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`maplibre-gl`),u=require(`three`);u=c(u,1);let d=require(`react`),f=c(d,1);d=c(d);let p=require(`@mapcomponents/react-maplibre`),m=require(`react/jsx-runtime`),h=require(`@mui/system`),g=require(`@emotion/styled`);g=c(g,1),require(`@emotion/react`);var _=Math.PI/180,v=180/Math.PI,y=class{static updateWorldMatrix(e,t=null){if(!e)return new u.Matrix4;let n=t??e.getCenter(),r=l.MercatorCoordinate.fromLngLat(n),i=r.meterInMercatorCoordinateUnits();return new u.Matrix4().compose(new u.Vector3(r.x,r.y,r.z),new u.Quaternion,new u.Vector3(i,-i,i))}static toScenePositionMercator(e,t){return new u.Vector3(t.x,t.y,t.z).applyMatrix4(e)}static toMapPositionMercator(e,t){let n=t.clone().applyMatrix4(e);return new l.MercatorCoordinate(n.x,n.y,n.z)}static toScenePosition(e,t,n){return this.toScenePositionMercator(e,l.MercatorCoordinate.fromLngLat(t,n))}static toMapPosition(e,t){let n=this.toMapPositionMercator(e,t),r=n.toLngLat();return[r.lng,r.lat,n.toAltitude()]}static degToRad(e){return e*_}static radToDeg(e){return e*v}},b=class extends u.DataTextureLoader{constructor(e){super(e),this.type=u.HalfFloatType}parse(e){let t=function(e,t){switch(e){case 1:throw Error(`THREE.HDRLoader: Read Error: `+(t||``));case 2:throw Error(`THREE.HDRLoader: Write Error: `+(t||``));case 3:throw Error(`THREE.HDRLoader: Bad File Format: `+(t||``));default:case 4:throw Error(`THREE.HDRLoader: Memory Error: `+(t||``))}},n=function(e,t,n){t||=1024;let r=e.pos,i=-1,a=0,o=``,s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));for(;0>(i=s.indexOf(`
2
+ `))&&a<t&&r<e.byteLength;)o+=s,a+=s.length,r+=128,s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));return-1<i?(!1!==n&&(e.pos+=a+i+1),o+s.slice(0,i)):!1},r=function(e){let r=/^#\?(\S+)/,i=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,a=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,o=/^\s*FORMAT=(\S+)\s*$/,s=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,c={valid:0,string:``,comments:``,programtype:`RGBE`,format:``,gamma:1,exposure:1,width:0,height:0},l,u;for((e.pos>=e.byteLength||!(l=n(e)))&&t(1,`no header found`),(u=l.match(r))||t(3,`bad initial token`),c.valid|=1,c.programtype=u[1],c.string+=l+`
3
+ `;l=n(e),!1!==l;){if(c.string+=l+`
4
+ `,l.charAt(0)===`#`){c.comments+=l+`
5
+ `;continue}if((u=l.match(i))&&(c.gamma=parseFloat(u[1])),(u=l.match(a))&&(c.exposure=parseFloat(u[1])),(u=l.match(o))&&(c.valid|=2,c.format=u[1]),(u=l.match(s))&&(c.valid|=4,c.height=parseInt(u[1],10),c.width=parseInt(u[2],10)),c.valid&2&&c.valid&4)break}return c.valid&2||t(3,`missing format specifier`),c.valid&4||t(3,`missing image size specifier`),c},i=function(e,n,r){let i=n;if(i<8||i>32767||e[0]!==2||e[1]!==2||e[2]&128)return new Uint8Array(e);i!==(e[2]<<8|e[3])&&t(3,`wrong scanline width`);let a=new Uint8Array(4*n*r);a.length||t(4,`unable to allocate buffer space`);let o=0,s=0,c=4*i,l=new Uint8Array(4),u=new Uint8Array(c),d=r;for(;d>0&&s<e.byteLength;){s+4>e.byteLength&&t(1),l[0]=e[s++],l[1]=e[s++],l[2]=e[s++],l[3]=e[s++],(l[0]!=2||l[1]!=2||(l[2]<<8|l[3])!=i)&&t(3,`bad rgbe scanline format`);let n=0,r;for(;n<c&&s<e.byteLength;){r=e[s++];let i=r>128;if(i&&(r-=128),(r===0||n+r>c)&&t(3,`bad scanline data`),i){let t=e[s++];for(let e=0;e<r;e++)u[n++]=t}else u.set(e.subarray(s,s+r),n),n+=r,s+=r}let f=i;for(let e=0;e<f;e++){let t=0;a[o]=u[e+t],t+=i,a[o+1]=u[e+t],t+=i,a[o+2]=u[e+t],t+=i,a[o+3]=u[e+t],o+=4}d--}return a},a=function(e,t,n,r){let i=2**(e[t+3]-128)/255;n[r+0]=e[t+0]*i,n[r+1]=e[t+1]*i,n[r+2]=e[t+2]*i,n[r+3]=1},o=function(e,t,n,r){let i=2**(e[t+3]-128)/255;n[r+0]=u.DataUtils.toHalfFloat(Math.min(e[t+0]*i,65504)),n[r+1]=u.DataUtils.toHalfFloat(Math.min(e[t+1]*i,65504)),n[r+2]=u.DataUtils.toHalfFloat(Math.min(e[t+2]*i,65504)),n[r+3]=u.DataUtils.toHalfFloat(1)},s=new Uint8Array(e);s.pos=0;let c=r(s),l=c.width,d=c.height,f=i(s.subarray(s.pos),l,d),p,m,h;switch(this.type){case u.FloatType:h=f.length/4;let e=new Float32Array(h*4);for(let t=0;t<h;t++)a(f,t*4,e,t*4);p=e,m=u.FloatType;break;case u.HalfFloatType:h=f.length/4;let t=new Uint16Array(h*4);for(let e=0;e<h;e++)o(f,e*4,t,e*4);p=t,m=u.HalfFloatType;break;default:throw Error(`THREE.HDRLoader: Unsupported type: `+this.type)}return{width:l,height:d,data:p,header:c.string,gamma:c.gamma,exposure:c.exposure,type:m}}setDataType(e){return this.type=e,this}load(e,t,n,r){function i(e,n){switch(e.type){case u.FloatType:case u.HalfFloatType:e.colorSpace=u.LinearSRGBColorSpace,e.minFilter=u.LinearFilter,e.magFilter=u.LinearFilter,e.generateMipmaps=!1,e.flipY=!0;break}t&&t(e,n)}return super.load(e,i,n,r)}},x=class{createScene(e=!0){let t=new u.Scene;if(e){let e=new u.DirectionalLight(16777215,4);e.position.set(1,2,3),t.add(e);let n=new u.AmbientLight(16777215,.2);t.add(n)}return t}createGroup(e,t){let n=new u.Group;return n.name=t,e.add(n),n}createCamera(e,t){let n=new u.PerspectiveCamera;n.name=t;let r=new u.Group;return r.name=`${t}-parent`,r.add(n),e.add(r),n}buildPerspectiveMatrix(e,t,n,r){let i=1/Math.tan(e/2),a=1/(n-r);return new Float64Array([i/t,0,0,0,0,i,0,0,0,0,(r+n)*a,-1,0,0,2*r*n*a,0])}buildOrthographicMatrix(e,t,n,r,i,a){let o=1/(e-t),s=1/(n-r),c=1/(i-a);return new Float64Array([-2*o,0,0,0,0,-2*s,0,0,0,0,2*c,0,(e+t)*o,(r+n)*s,(a+i)*c,1])}calcProjectionMatrix(e,t,n,r){let i=e.centerOffset,a=e.width/e.height,o=this.buildPerspectiveMatrix(t,a,n,r);if(o[8]=-i.x*2/e.width,o[9]=i.y*2/e.height,!e.isOrthographic)return new u.Matrix4().fromArray(o);let s=.5*e.height/Math.tan(t/2)*Math.tan(t*.5),c=s*a,l=this.buildOrthographicMatrix(-c-i.x,c-i.x,-s+i.y,s+i.y,n,r),d=Math.min(e.pitch/15,1),f=d*d*d*d*d,p=new Float64Array(16);for(let e=0;e<16;e++)p[e]=(1-f)*l[e]+f*o[e];return new u.Matrix4().fromArray(p)}updateCameraForRender(e,t,n,r,i){let a=t.transform,{fov:o,nearZ:s,farZ:c,aspect:l}=this.extractCameraParams(n,a);e.fov=y.radToDeg(o),e.aspect=l,e.near=s,e.far=c,e._cleanProjectionMatrix=this.buildPerspectiveMatrix(o,l,s,c);let d=this.extractMVPMatrix(n,r),f=this.calcProjectionMatrix(a,o,s,c);e.projectionMatrix.copy(f),e.projectionMatrixInverse.copy(f).invert();let p=new u.Matrix4().multiplyMatrices(e.projectionMatrixInverse,d);e.matrixWorld.copy(p).invert(),e.matrixWorldInverse.copy(p),e.matrixAutoUpdate=!1,e.matrixWorldAutoUpdate=!1,this.updateCameraTransform(e)}extractCameraParams(e,t){let n=t.width/t.height;if(e.fov!==void 0)return{fov:e.fov,nearZ:e.nearZ,farZ:e.farZ,aspect:n};let r=t.cameraToCenterDistance;return{fov:r&&t.height?2*Math.atan(t.height/2/r):.6435,nearZ:t.nearZ||.1,farZ:t.farZ||1e4,aspect:n}}extractMVPMatrix(e,t){let n;if(e.defaultProjectionData?.mainMatrix)n=new u.Matrix4().fromArray(Object.values(e.defaultProjectionData.mainMatrix));else if(e.modelViewProjectionMatrix)n=new u.Matrix4().fromArray(e.modelViewProjectionMatrix);else{let t=Array.isArray(e)?e:Array.from(e);n=new u.Matrix4().fromArray(t)}return new u.Matrix4().multiplyMatrices(n,t)}updateCameraTransform(e){let t=new u.Vector3,n=new u.Quaternion,r=new u.Vector3;e.matrixWorld.decompose(t,n,r),e.position.copy(t),e.rotation.copy(new u.Euler().setFromQuaternion(n,`YXZ`))}createEnvTexture(e,t){e?.endsWith(`.hdr`)&&new b().load(e,e=>{e.mapping=u.EquirectangularReflectionMapping,t.environment=e,t.environmentRotation.x=Math.PI/2})}},S=new u.Vector3,C=new u.Matrix4,ee=new u.Matrix4,w=new u.Vector3,T=new u.Vector3,te=class{constructor(e={}){let t=this,n,r,i,a,o={objects:new WeakMap},s=e.element===void 0?document.createElement(`div`):e.element;s.style.overflow=`hidden`,this.domElement=s,this.sortObjects=!0,this.getSize=function(){return{width:n,height:r}},this.render=function(e,t){e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.parent===null&&t.matrixWorldAutoUpdate===!0&&t.updateMatrixWorld(),C.copy(t.matrixWorldInverse),ee.multiplyMatrices(t.projectionMatrix,C),l(e,e,t),this.sortObjects&&f(e)},this.setSize=function(e,t){n=e,r=t,i=n/2,a=r/2,s.style.width=e+`px`,s.style.height=t+`px`};function c(e){e.isCSS2DObject&&(e.element.style.display=`none`);for(let t=0,n=e.children.length;t<n;t++)c(e.children[t])}function l(e,n,r){if(e.visible===!1){c(e);return}if(e.isCSS2DObject){S.setFromMatrixPosition(e.matrixWorld),S.applyMatrix4(ee);let c=S.z>=-1&&S.z<=1&&e.layers.test(r.layers)===!0,l=e.element;l.style.display=c===!0?``:`none`,c===!0&&(e.onBeforeRender(t,n,r),l.style.transform=`translate(`+-100*e.center.x+`%,`+-100*e.center.y+`%)translate(`+(S.x*i+i)+`px,`+(-S.y*a+a)+`px)`,l.parentNode!==s&&s.appendChild(l),e.onAfterRender(t,n,r));let d={distanceToCameraSquared:u(r,e)};o.objects.set(e,d)}for(let t=0,i=e.children.length;t<i;t++)l(e.children[t],n,r)}function u(e,t){return w.setFromMatrixPosition(e.matrixWorld),T.setFromMatrixPosition(t.matrixWorld),w.distanceToSquared(T)}function d(e){let t=[];return e.traverseVisible(function(e){e.isCSS2DObject&&t.push(e)}),t}function f(e){let t=d(e).sort(function(e,t){return e.renderOrder===t.renderOrder?o.objects.get(e).distanceToCameraSquared-o.objects.get(t).distanceToCameraSquared:t.renderOrder-e.renderOrder}),n=t.length;for(let e=0,r=t.length;e<r;e++)t[e].element.style.zIndex=n-e}}},E=class{renderer;labelRenderer;constructor(e,t){if(!t||t.isContextLost())throw Error(`WebGL context is lost or invalid`);this.renderer=new u.WebGLRenderer({alpha:!0,antialias:!0,canvas:e.getCanvas(),context:t}),this.renderer.autoClear=!1,this.renderer.shadowMap.enabled=!0,this.labelRenderer=this.createLabelRenderer(e)}createLabelRenderer(e){let t=e.getContainer(),n=new te;return n.setSize(t.clientWidth,t.clientHeight),n.domElement.style.position=`absolute`,n.domElement.style.top=`0px`,n.domElement.style.pointerEvents=`none`,e._container.appendChild(n.domElement),e.on(`resize`,()=>{let{clientWidth:t,clientHeight:r}=e.getContainer();n.setSize(t,r)}),n}getRenderer(){return this.renderer}render(e,t){this.renderer.resetState(),this.renderer.render(e,t),this.labelRenderer.render(e,t)}dispose(){this.labelRenderer.domElement?.parentNode?.removeChild(this.labelRenderer.domElement),this.renderer?.dispose()}},D=(0,d.createContext)({scene:void 0,camera:void 0,renderer:void 0,map:void 0,sceneRoot:void 0,worldMatrix:void 0,worldMatrixInv:void 0}),O=()=>(0,d.useContext)(D),ne=({mapId:e,id:t,refCenter:n,envTexture:r,envIntensity:i=1,createLight:a=!0,children:o,beforeId:s})=>{let{map:c}=(0,p.useMap)({mapId:e,waitForLayer:s}),[l,f]=(0,d.useState)(),[h,g]=(0,d.useState)(),[_,v]=(0,d.useState)(),[b,S]=(0,d.useState)(),[C,ee]=(0,d.useState)(),[w,T]=(0,d.useState)(),te=(0,d.useRef)(new x),O=(0,d.useRef)(new u.Matrix4),ne=(0,d.useRef)(new u.Matrix4),k=(0,d.useRef)(void 0);return(0,d.useEffect)(()=>{if(!c)return;let e=te.current,o=e.createScene(a),l=e.createGroup(o,`scene-root`),u=e.createCamera(l,`camera-for-render`),d={id:t,type:`custom`,renderingMode:`3d`,onAdd:(t,a)=>{let s=new E(t,a);k.current=s,v(s);let c=n||t.getCenter();O.current=y.updateWorldMatrix(t,c),ne.current=O.current.clone().invert(),ee(O.current),T(ne.current),r&&e.createEnvTexture(r,o),o.environmentIntensity=i,t.triggerRepaint()},render:(t,n)=>{!k.current||!o||!u||(e.updateCameraForRender(u,c.map,n,O.current,ne.current),k.current.render(o,u),c.triggerRepaint())},onRemove:()=>{k.current&&=(k.current.dispose(),void 0),v(void 0)}};return c.getLayer(t)||c.addLayer(d,s),f(o),g(u),S(l),()=>{c.getLayer(t)&&c.removeLayer(t)}},[c,t]),(0,d.useEffect)(()=>{l&&r&&te.current.createEnvTexture(r,l)},[l,r]),(0,d.useEffect)(()=>{l&&(l.environmentIntensity=i)},[l,i]),(0,d.useEffect)(()=>{c&&n&&(O.current=y.updateWorldMatrix(c.map,n),ne.current=O.current.clone().invert(),ee(O.current),T(ne.current),c.triggerRepaint())},[c,n]),(0,m.jsx)(D.Provider,{value:{scene:l,camera:h,renderer:_,map:c?.map,sceneRoot:b,worldMatrix:C,worldMatrixInv:w},children:o})};function k(e,t){if(t===u.TrianglesDrawMode)return console.warn(`THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.`),e;if(t===u.TriangleFanDrawMode||t===u.TriangleStripDrawMode){let n=e.getIndex();if(n===null){let t=[],r=e.getAttribute(`position`);if(r!==void 0){for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}else return console.error(`THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.`),e}let r=n.count-2,i=[];if(t===u.TriangleFanDrawMode)for(let e=1;e<=r;e++)i.push(n.getX(0)),i.push(n.getX(e)),i.push(n.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(n.getX(e)),i.push(n.getX(e+1)),i.push(n.getX(e+2))):(i.push(n.getX(e+2)),i.push(n.getX(e+1)),i.push(n.getX(e)));i.length/3!==r&&console.error(`THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.`);let a=e.clone();return a.setIndex(i),a.clearGroups(),a}else return console.error(`THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:`,t),e}function A(e){let t=new Map,n=new Map,r=e.clone();return j(e,r,function(e,r){t.set(r,e),n.set(e,r)}),r.traverse(function(e){if(!e.isSkinnedMesh)return;let r=e,i=t.get(e),a=i.skeleton.bones;r.skeleton=i.skeleton.clone(),r.bindMatrix.copy(i.bindMatrix),r.skeleton.bones=a.map(function(e){return n.get(e)}),r.bind(r.skeleton,r.bindMatrix)}),r}function j(e,t,n){n(e,t);for(let r=0;r<e.children.length;r++)j(e.children[r],t.children[r],n)}var M=class extends u.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new oe(e)}),this.register(function(e){return new I(e)}),this.register(function(e){return new fe(e)}),this.register(function(e){return new pe(e)}),this.register(function(e){return new me(e)}),this.register(function(e){return new se(e)}),this.register(function(e){return new ce(e)}),this.register(function(e){return new R(e)}),this.register(function(e){return new le(e)}),this.register(function(e){return new ae(e)}),this.register(function(e){return new ue(e)}),this.register(function(e){return new L(e)}),this.register(function(e){return new z(e)}),this.register(function(e){return new de(e)}),this.register(function(e){return new ie(e)}),this.register(function(e){return new he(e,P.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new he(e,P.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new ge(e)})}load(e,t,n,r){let i=this,a;if(this.resourcePath!==``)a=this.resourcePath;else if(this.path!==``){let t=u.LoaderUtils.extractUrlBase(e);a=u.LoaderUtils.resolveURL(t,this.path)}else a=u.LoaderUtils.extractUrlBase(e);this.manager.itemStart(e);let o=function(t){r?r(t):console.error(t),i.manager.itemError(e),i.manager.itemEnd(e)},s=new u.FileLoader(this.manager);s.setPath(this.path),s.setResponseType(`arraybuffer`),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(n){try{i.parse(n,a,function(n){t(n),i.manager.itemEnd(e)},o)}catch(e){o(e)}},n,o)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let i,a={},o={},s=new TextDecoder;if(typeof e==`string`)i=JSON.parse(e);else if(e instanceof ArrayBuffer)if(s.decode(new Uint8Array(e,0,4))===_e){try{a[P.KHR_BINARY_GLTF]=new be(e)}catch(e){r&&r(e);return}i=JSON.parse(a[P.KHR_BINARY_GLTF].content)}else i=JSON.parse(s.decode(e));else i=e;if(i.asset===void 0||i.asset.version[0]<2){r&&r(Error(`THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.`));return}let c=new Ke(i,{path:t||this.resourcePath||``,crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){let t=this.pluginCallbacks[e](c);t.name||console.error(`THREE.GLTFLoader: Invalid plugin found: missing name`),o[t.name]=t,a[t.name]=!0}if(i.extensionsUsed)for(let e=0;e<i.extensionsUsed.length;++e){let t=i.extensionsUsed[e],n=i.extensionsRequired||[];switch(t){case P.KHR_MATERIALS_UNLIT:a[t]=new F;break;case P.KHR_DRACO_MESH_COMPRESSION:a[t]=new xe(i,this.dracoLoader);break;case P.KHR_TEXTURE_TRANSFORM:a[t]=new Se;break;case P.KHR_MESH_QUANTIZATION:a[t]=new Ce;break;default:n.indexOf(t)>=0&&o[t]===void 0&&console.warn(`THREE.GLTFLoader: Unknown extension "`+t+`".`)}}c.setExtensions(a),c.setPlugins(o),c.parse(n,r)}parseAsync(e,t){let n=this;return new Promise(function(r,i){n.parse(e,t,r,i)})}};function re(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}function N(e,t,n){let r=e.json.materials[t];return r.extensions&&r.extensions[n]?r.extensions[n]:null}var P={KHR_BINARY_GLTF:`KHR_binary_glTF`,KHR_DRACO_MESH_COMPRESSION:`KHR_draco_mesh_compression`,KHR_LIGHTS_PUNCTUAL:`KHR_lights_punctual`,KHR_MATERIALS_CLEARCOAT:`KHR_materials_clearcoat`,KHR_MATERIALS_DISPERSION:`KHR_materials_dispersion`,KHR_MATERIALS_IOR:`KHR_materials_ior`,KHR_MATERIALS_SHEEN:`KHR_materials_sheen`,KHR_MATERIALS_SPECULAR:`KHR_materials_specular`,KHR_MATERIALS_TRANSMISSION:`KHR_materials_transmission`,KHR_MATERIALS_IRIDESCENCE:`KHR_materials_iridescence`,KHR_MATERIALS_ANISOTROPY:`KHR_materials_anisotropy`,KHR_MATERIALS_UNLIT:`KHR_materials_unlit`,KHR_MATERIALS_VOLUME:`KHR_materials_volume`,KHR_TEXTURE_BASISU:`KHR_texture_basisu`,KHR_TEXTURE_TRANSFORM:`KHR_texture_transform`,KHR_MESH_QUANTIZATION:`KHR_mesh_quantization`,KHR_MATERIALS_EMISSIVE_STRENGTH:`KHR_materials_emissive_strength`,EXT_MATERIALS_BUMP:`EXT_materials_bump`,EXT_TEXTURE_WEBP:`EXT_texture_webp`,EXT_TEXTURE_AVIF:`EXT_texture_avif`,EXT_MESHOPT_COMPRESSION:`EXT_meshopt_compression`,KHR_MESHOPT_COMPRESSION:`KHR_meshopt_compression`,EXT_MESH_GPU_INSTANCING:`EXT_mesh_gpu_instancing`},ie=class{constructor(e){this.parser=e,this.name=P.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){let r=t[n];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){let t=this.parser,n=`light:`+e,r=t.cache.get(n);if(r)return r;let i=t.json,a=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e],o,s=new u.Color(16777215);a.color!==void 0&&s.setRGB(a.color[0],a.color[1],a.color[2],u.LinearSRGBColorSpace);let c=a.range===void 0?0:a.range;switch(a.type){case`directional`:o=new u.DirectionalLight(s),o.target.position.set(0,0,-1),o.add(o.target);break;case`point`:o=new u.PointLight(s),o.distance=c;break;case`spot`:o=new u.SpotLight(s),o.distance=c,a.spot=a.spot||{},a.spot.innerConeAngle=a.spot.innerConeAngle===void 0?0:a.spot.innerConeAngle,a.spot.outerConeAngle=a.spot.outerConeAngle===void 0?Math.PI/4:a.spot.outerConeAngle,o.angle=a.spot.outerConeAngle,o.penumbra=1-a.spot.innerConeAngle/a.spot.outerConeAngle,o.target.position.set(0,0,-1),o.add(o.target);break;default:throw Error(`THREE.GLTFLoader: Unexpected light type: `+a.type)}return o.position.set(0,0,0),Re(o,a),a.intensity!==void 0&&(o.intensity=a.intensity),o.name=t.createUniqueName(a.name||`light_`+e),r=Promise.resolve(o),t.cache.add(n,r),r}getDependency(e,t){if(e===`light`)return this._loadLight(t)}createNodeAttachment(e){let t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return i===void 0?null:this._loadLight(i).then(function(e){return n._getNodeRef(t.cache,i,e)})}},F=class{constructor(){this.name=P.KHR_MATERIALS_UNLIT}getMaterialType(){return u.MeshBasicMaterial}extendParams(e,t,n){let r=[];e.color=new u.Color(1,1,1),e.opacity=1;let i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){let t=i.baseColorFactor;e.color.setRGB(t[0],t[1],t[2],u.LinearSRGBColorSpace),e.opacity=t[3]}i.baseColorTexture!==void 0&&r.push(n.assignTexture(e,`map`,i.baseColorTexture,u.SRGBColorSpace))}return Promise.all(r)}},ae=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);return n===null||n.emissiveStrength!==void 0&&(t.emissiveIntensity=n.emissiveStrength),Promise.resolve()}},oe=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);if(n===null)return Promise.resolve();let r=[];if(n.clearcoatFactor!==void 0&&(t.clearcoat=n.clearcoatFactor),n.clearcoatTexture!==void 0&&r.push(this.parser.assignTexture(t,`clearcoatMap`,n.clearcoatTexture)),n.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=n.clearcoatRoughnessFactor),n.clearcoatRoughnessTexture!==void 0&&r.push(this.parser.assignTexture(t,`clearcoatRoughnessMap`,n.clearcoatRoughnessTexture)),n.clearcoatNormalTexture!==void 0&&(r.push(this.parser.assignTexture(t,`clearcoatNormalMap`,n.clearcoatNormalTexture)),n.clearcoatNormalTexture.scale!==void 0)){let e=n.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new u.Vector2(e,e)}return Promise.all(r)}},I=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_DISPERSION}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);return n===null||(t.dispersion=n.dispersion===void 0?0:n.dispersion),Promise.resolve()}},L=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);if(n===null)return Promise.resolve();let r=[];return n.iridescenceFactor!==void 0&&(t.iridescence=n.iridescenceFactor),n.iridescenceTexture!==void 0&&r.push(this.parser.assignTexture(t,`iridescenceMap`,n.iridescenceTexture)),n.iridescenceIor!==void 0&&(t.iridescenceIOR=n.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),n.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=n.iridescenceThicknessMinimum),n.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=n.iridescenceThicknessMaximum),n.iridescenceThicknessTexture!==void 0&&r.push(this.parser.assignTexture(t,`iridescenceThicknessMap`,n.iridescenceThicknessTexture)),Promise.all(r)}},se=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_SHEEN}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);if(n===null)return Promise.resolve();let r=[];if(t.sheenColor=new u.Color(0,0,0),t.sheenRoughness=0,t.sheen=1,n.sheenColorFactor!==void 0){let e=n.sheenColorFactor;t.sheenColor.setRGB(e[0],e[1],e[2],u.LinearSRGBColorSpace)}return n.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=n.sheenRoughnessFactor),n.sheenColorTexture!==void 0&&r.push(this.parser.assignTexture(t,`sheenColorMap`,n.sheenColorTexture,u.SRGBColorSpace)),n.sheenRoughnessTexture!==void 0&&r.push(this.parser.assignTexture(t,`sheenRoughnessMap`,n.sheenRoughnessTexture)),Promise.all(r)}},ce=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);if(n===null)return Promise.resolve();let r=[];return n.transmissionFactor!==void 0&&(t.transmission=n.transmissionFactor),n.transmissionTexture!==void 0&&r.push(this.parser.assignTexture(t,`transmissionMap`,n.transmissionTexture)),Promise.all(r)}},R=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_VOLUME}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);if(n===null)return Promise.resolve();let r=[];t.thickness=n.thicknessFactor===void 0?0:n.thicknessFactor,n.thicknessTexture!==void 0&&r.push(this.parser.assignTexture(t,`thicknessMap`,n.thicknessTexture)),t.attenuationDistance=n.attenuationDistance||1/0;let i=n.attenuationColor||[1,1,1];return t.attenuationColor=new u.Color().setRGB(i[0],i[1],i[2],u.LinearSRGBColorSpace),Promise.all(r)}},le=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_IOR}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);return n===null?Promise.resolve():(t.ior=n.ior===void 0?1.5:n.ior,t.ior===0&&(t.ior=1e3),Promise.resolve())}},ue=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_SPECULAR}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);if(n===null)return Promise.resolve();let r=[];t.specularIntensity=n.specularFactor===void 0?1:n.specularFactor,n.specularTexture!==void 0&&r.push(this.parser.assignTexture(t,`specularIntensityMap`,n.specularTexture));let i=n.specularColorFactor||[1,1,1];return t.specularColor=new u.Color().setRGB(i[0],i[1],i[2],u.LinearSRGBColorSpace),n.specularColorTexture!==void 0&&r.push(this.parser.assignTexture(t,`specularColorMap`,n.specularColorTexture,u.SRGBColorSpace)),Promise.all(r)}},de=class{constructor(e){this.parser=e,this.name=P.EXT_MATERIALS_BUMP}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);if(n===null)return Promise.resolve();let r=[];return t.bumpScale=n.bumpFactor===void 0?1:n.bumpFactor,n.bumpTexture!==void 0&&r.push(this.parser.assignTexture(t,`bumpMap`,n.bumpTexture)),Promise.all(r)}},z=class{constructor(e){this.parser=e,this.name=P.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){return N(this.parser,e,this.name)===null?null:u.MeshPhysicalMaterial}extendMaterialParams(e,t){let n=N(this.parser,e,this.name);if(n===null)return Promise.resolve();let r=[];return n.anisotropyStrength!==void 0&&(t.anisotropy=n.anisotropyStrength),n.anisotropyRotation!==void 0&&(t.anisotropyRotation=n.anisotropyRotation),n.anisotropyTexture!==void 0&&r.push(this.parser.assignTexture(t,`anisotropyMap`,n.anisotropyTexture)),Promise.all(r)}},fe=class{constructor(e){this.parser=e,this.name=P.KHR_TEXTURE_BASISU}loadTexture(e){let t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;let i=r.extensions[this.name],a=t.options.ktx2Loader;if(!a){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw Error(`THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures`);return null}return t.loadTextureImage(e,i.source,a)}},pe=class{constructor(e){this.parser=e,this.name=P.EXT_TEXTURE_WEBP}loadTexture(e){let t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;let a=i.extensions[t],o=r.images[a.source],s=n.textureLoader;if(o.uri){let e=n.options.manager.getHandler(o.uri);e!==null&&(s=e)}return n.loadTextureImage(e,a.source,s)}},me=class{constructor(e){this.parser=e,this.name=P.EXT_TEXTURE_AVIF}loadTexture(e){let t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;let a=i.extensions[t],o=r.images[a.source],s=n.textureLoader;if(o.uri){let e=n.options.manager.getHandler(o.uri);e!==null&&(s=e)}return n.loadTextureImage(e,a.source,s)}},he=class{constructor(e,t){this.name=t,this.parser=e}loadBufferView(e){let t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){let e=n.extensions[this.name],r=this.parser.getDependency(`buffer`,e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw Error(`THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files`);return null}return r.then(function(t){let n=e.byteOffset||0,r=e.byteLength||0,a=e.count,o=e.byteStride,s=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(a,o,s,e.mode,e.filter).then(function(e){return e.buffer}):i.ready.then(function(){let t=new ArrayBuffer(a*o);return i.decodeGltfBuffer(new Uint8Array(t),a,o,s,e.mode,e.filter),t})})}else return null}},ge=class{constructor(e){this.name=P.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){let t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;let r=t.meshes[n.mesh];for(let e of r.primitives)if(e.mode!==De.TRIANGLES&&e.mode!==De.TRIANGLE_STRIP&&e.mode!==De.TRIANGLE_FAN&&e.mode!==void 0)return null;let i=n.extensions[this.name].attributes,a=[],o={};for(let e in i)a.push(this.parser.getDependency(`accessor`,i[e]).then(t=>(o[e]=t,o[e])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(e=>{let t=e.pop(),n=t.isGroup?t.children:[t],r=e[0].count,i=[];for(let e of n){let t=new u.Matrix4,n=new u.Vector3,a=new u.Quaternion,s=new u.Vector3(1,1,1),c=new u.InstancedMesh(e.geometry,e.material,r);for(let e=0;e<r;e++)o.TRANSLATION&&n.fromBufferAttribute(o.TRANSLATION,e),o.ROTATION&&a.fromBufferAttribute(o.ROTATION,e),o.SCALE&&s.fromBufferAttribute(o.SCALE,e),c.setMatrixAt(e,t.compose(n,a,s));for(let t in o)if(t===`_COLOR_0`){let e=o[t];c.instanceColor=new u.InstancedBufferAttribute(e.array,e.itemSize,e.normalized)}else t!==`TRANSLATION`&&t!==`ROTATION`&&t!==`SCALE`&&e.geometry.setAttribute(t,o[t]);u.Object3D.prototype.copy.call(c,e),this.parser.assignFinalMaterial(c),i.push(c)}return t.isGroup?(t.clear(),t.add(...i),t):i[0]}))}},_e=`glTF`,ve=12,ye={JSON:1313821514,BIN:5130562},be=class{constructor(e){this.name=P.KHR_BINARY_GLTF,this.content=null,this.body=null;let t=new DataView(e,0,ve),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==_e)throw Error(`THREE.GLTFLoader: Unsupported glTF-Binary header.`);if(this.header.version<2)throw Error(`THREE.GLTFLoader: Legacy binary file detected.`);let r=this.header.length-ve,i=new DataView(e,ve),a=0;for(;a<r;){let t=i.getUint32(a,!0);a+=4;let r=i.getUint32(a,!0);if(a+=4,r===ye.JSON){let r=new Uint8Array(e,ve+a,t);this.content=n.decode(r)}else if(r===ye.BIN){let n=ve+a;this.body=e.slice(n,n+t)}a+=t}if(this.content===null)throw Error(`THREE.GLTFLoader: JSON content not found.`)}},xe=class{constructor(e,t){if(!t)throw Error(`THREE.GLTFLoader: No DRACOLoader instance provided.`);this.name=P.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){let n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,a=e.extensions[this.name].attributes,o={},s={},c={};for(let e in a){let t=Me[e]||e.toLowerCase();o[t]=a[e]}for(let t in e.attributes){let r=Me[t]||t.toLowerCase();if(a[t]!==void 0){let i=n.accessors[e.attributes[t]];c[r]=Oe[i.componentType].name,s[r]=i.normalized===!0}}return t.getDependency(`bufferView`,i).then(function(e){return new Promise(function(t,n){r.decodeDracoFile(e,function(e){for(let t in e.attributes){let n=e.attributes[t],r=s[t];r!==void 0&&(n.normalized=r)}t(e)},o,c,u.LinearSRGBColorSpace,n)})})}},Se=class{constructor(){this.name=P.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0?e:(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0,e)}},Ce=class{constructor(){this.name=P.KHR_MESH_QUANTIZATION}},we=class extends u.Interpolant{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r;for(let e=0;e!==r;e++)t[e]=n[i+e];return t}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=o*2,c=o*3,l=r-t,u=(n-t)/l,d=u*u,f=d*u,p=e*c,m=p-c,h=-2*f+3*d,g=f-d,_=1-h,v=g-d+u;for(let e=0;e!==o;e++){let t=a[m+e+o],n=a[m+e+s]*l,r=a[p+e+o],c=a[p+e]*l;i[e]=_*t+v*n+h*r+g*c}return i}},Te=new u.Quaternion,Ee=class extends we{interpolate_(e,t,n,r){let i=super.interpolate_(e,t,n,r);return Te.fromArray(i).normalize().toArray(i),i}},De={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Oe={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ke={9728:u.NearestFilter,9729:u.LinearFilter,9984:u.NearestMipmapNearestFilter,9985:u.LinearMipmapNearestFilter,9986:u.NearestMipmapLinearFilter,9987:u.LinearMipmapLinearFilter},Ae={33071:u.ClampToEdgeWrapping,33648:u.MirroredRepeatWrapping,10497:u.RepeatWrapping},je={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Me={POSITION:`position`,NORMAL:`normal`,TANGENT:`tangent`,TEXCOORD_0:`uv`,TEXCOORD_1:`uv1`,TEXCOORD_2:`uv2`,TEXCOORD_3:`uv3`,COLOR_0:`color`,WEIGHTS_0:`skinWeight`,JOINTS_0:`skinIndex`},Ne={scale:`scale`,translation:`position`,rotation:`quaternion`,weights:`morphTargetInfluences`},Pe={CUBICSPLINE:void 0,LINEAR:u.InterpolateLinear,STEP:u.InterpolateDiscrete},Fe={OPAQUE:`OPAQUE`,MASK:`MASK`,BLEND:`BLEND`};function Ie(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new u.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:u.FrontSide})),e.DefaultMaterial}function Le(e,t,n){for(let r in n.extensions)e[r]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function Re(e,t){t.extras!==void 0&&(typeof t.extras==`object`?Object.assign(e.userData,t.extras):console.warn(`THREE.GLTFLoader: Ignoring primitive type .extras, `+t.extras))}function ze(e,t,n){let r=!1,i=!1,a=!1;for(let e=0,n=t.length;e<n;e++){let n=t[e];if(n.POSITION!==void 0&&(r=!0),n.NORMAL!==void 0&&(i=!0),n.COLOR_0!==void 0&&(a=!0),r&&i&&a)break}if(!r&&!i&&!a)return Promise.resolve(e);let o=[],s=[],c=[];for(let l=0,u=t.length;l<u;l++){let u=t[l];if(r){let t=u.POSITION===void 0?e.attributes.position:n.getDependency(`accessor`,u.POSITION);o.push(t)}if(i){let t=u.NORMAL===void 0?e.attributes.normal:n.getDependency(`accessor`,u.NORMAL);s.push(t)}if(a){let t=u.COLOR_0===void 0?e.attributes.color:n.getDependency(`accessor`,u.COLOR_0);c.push(t)}}return Promise.all([Promise.all(o),Promise.all(s),Promise.all(c)]).then(function(t){let n=t[0],o=t[1],s=t[2];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=o),a&&(e.morphAttributes.color=s),e.morphTargetsRelative=!0,e})}function Be(e,t){if(e.updateMorphTargets(),t.weights!==void 0)for(let n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){let n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,r=n.length;t<r;t++)e.morphTargetDictionary[n[t]]=t}else console.warn(`THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.`)}}function Ve(e){let t,n=e.extensions&&e.extensions[P.KHR_DRACO_MESH_COMPRESSION];if(t=n?`draco:`+n.bufferView+`:`+n.indices+`:`+He(n.attributes):e.indices+`:`+He(e.attributes)+`:`+e.mode,e.targets!==void 0)for(let n=0,r=e.targets.length;n<r;n++)t+=`:`+He(e.targets[n]);return t}function He(e){let t=``,n=Object.keys(e).sort();for(let r=0,i=n.length;r<i;r++)t+=n[r]+`:`+e[n[r]]+`;`;return t}function Ue(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw Error(`THREE.GLTFLoader: Unsupported normalized accessor component type.`)}}function We(e){return e.search(/\.jpe?g($|\?)/i)>0||e.search(/^data\:image\/jpeg/)===0?`image/jpeg`:e.search(/\.webp($|\?)/i)>0||e.search(/^data\:image\/webp/)===0?`image/webp`:e.search(/\.ktx2($|\?)/i)>0||e.search(/^data\:image\/ktx2/)===0?`image/ktx2`:`image/png`}var Ge=new u.Matrix4,Ke=class{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new re,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 n=!1,r=-1,i=!1,a=-1;if(typeof navigator<`u`&&navigator.userAgent!==void 0){let e=navigator.userAgent;n=/^((?!chrome|android).)*safari/i.test(e)===!0;let t=e.match(/Version\/(\d+)/);r=n&&t?parseInt(t[1],10):-1,i=e.indexOf(`Firefox`)>-1,a=i?e.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>`u`||n&&r<17||i&&a<98?this.textureLoader=new u.TextureLoader(this.options.manager):this.textureLoader=new u.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new u.FileLoader(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){let n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(e){return e._markDefs&&e._markDefs()}),Promise.all(this._invokeAll(function(e){return e.beforeRoot&&e.beforeRoot()})).then(function(){return Promise.all([n.getDependencies(`scene`),n.getDependencies(`animation`),n.getDependencies(`camera`)])}).then(function(t){let a={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};return Le(i,a,r),Re(a,r),Promise.all(n._invokeAll(function(e){return e.afterRoot&&e.afterRoot(a)})).then(function(){for(let e of a.scenes)e.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){let e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,r=t.length;n<r;n++){let r=t[n].joints;for(let t=0,n=r.length;t<n;t++)e[r[t]].isBone=!0}for(let t=0,r=e.length;t<r;t++){let r=e[t];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(n[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;let r=n.clone(),i=(e,t)=>{let n=this.associations.get(e);n!=null&&this.associations.set(t,n);for(let[n,r]of e.children.entries())i(r,t.children[n])};return i(n,r),r.name+=`_instance_`+ e.uses[t]++,r}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){let r=e(t[n]);if(r)return r}return null}_invokeAll(e){let t=Object.values(this.plugins);t.unshift(this);let n=[];for(let r=0;r<t.length;r++){let i=e(t[r]);i&&n.push(i)}return n}getDependency(e,t){let n=e+`:`+t,r=this.cache.get(n);if(!r){switch(e){case`scene`:r=this.loadScene(t);break;case`node`:r=this._invokeOne(function(e){return e.loadNode&&e.loadNode(t)});break;case`mesh`:r=this._invokeOne(function(e){return e.loadMesh&&e.loadMesh(t)});break;case`accessor`:r=this.loadAccessor(t);break;case`bufferView`:r=this._invokeOne(function(e){return e.loadBufferView&&e.loadBufferView(t)});break;case`buffer`:r=this.loadBuffer(t);break;case`material`:r=this._invokeOne(function(e){return e.loadMaterial&&e.loadMaterial(t)});break;case`texture`:r=this._invokeOne(function(e){return e.loadTexture&&e.loadTexture(t)});break;case`skin`:r=this.loadSkin(t);break;case`animation`:r=this._invokeOne(function(e){return e.loadAnimation&&e.loadAnimation(t)});break;case`camera`:r=this.loadCamera(t);break;default:if(r=this._invokeOne(function(n){return n!=this&&n.getDependency&&n.getDependency(e,t)}),!r)throw Error(`Unknown type: `+e);break}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){let n=this,r=this.json[e+(e===`mesh`?`es`:`s`)]||[];t=Promise.all(r.map(function(t,r){return n.getDependency(e,r)})),this.cache.add(e,t)}return t}loadBuffer(e){let t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!==`arraybuffer`)throw Error(`THREE.GLTFLoader: `+t.type+` buffer type is not supported.`);if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[P.KHR_BINARY_GLTF].body);let r=this.options;return new Promise(function(e,i){n.load(u.LoaderUtils.resolveURL(t.uri,r.path),e,void 0,function(){i(Error(`THREE.GLTFLoader: Failed to load buffer "`+t.uri+`".`))})})}loadBufferView(e){let t=this.json.bufferViews[e];return this.getDependency(`buffer`,t.buffer).then(function(e){let n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)})}loadAccessor(e){let t=this,n=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){let e=je[r.type],t=Oe[r.componentType],n=r.normalized===!0,i=new t(r.count*e);return Promise.resolve(new u.BufferAttribute(i,e,n))}let i=[];return r.bufferView===void 0?i.push(null):i.push(this.getDependency(`bufferView`,r.bufferView)),r.sparse!==void 0&&(i.push(this.getDependency(`bufferView`,r.sparse.indices.bufferView)),i.push(this.getDependency(`bufferView`,r.sparse.values.bufferView))),Promise.all(i).then(function(e){let i=e[0],a=je[r.type],o=Oe[r.componentType],s=o.BYTES_PER_ELEMENT,c=s*a,l=r.byteOffset||0,d=r.bufferView===void 0?void 0:n.bufferViews[r.bufferView].byteStride,f=r.normalized===!0,p,m;if(d&&d!==c){let e=Math.floor(l/d),n=`InterleavedBuffer:`+r.bufferView+`:`+r.componentType+`:`+e+`:`+r.count,c=t.cache.get(n);c||(p=new o(i,e*d,r.count*d/s),c=new u.InterleavedBuffer(p,d/s),t.cache.add(n,c)),m=new u.InterleavedBufferAttribute(c,a,l%d/s,f)}else p=i===null?new o(r.count*a):new o(i,l,r.count*a),m=new u.BufferAttribute(p,a,f);if(r.sparse!==void 0){let t=je.SCALAR,n=Oe[r.sparse.indices.componentType],s=r.sparse.indices.byteOffset||0,c=r.sparse.values.byteOffset||0,l=new n(e[1],s,r.sparse.count*t),d=new o(e[2],c,r.sparse.count*a);i!==null&&(m=new u.BufferAttribute(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let e=0,t=l.length;e<t;e++){let t=l[e];if(m.setX(t,d[e*a]),a>=2&&m.setY(t,d[e*a+1]),a>=3&&m.setZ(t,d[e*a+2]),a>=4&&m.setW(t,d[e*a+3]),a>=5)throw Error(`THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.`)}m.normalized=f}return m})}loadTexture(e){let t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r],a=this.textureLoader;if(i.uri){let e=n.manager.getHandler(i.uri);e!==null&&(a=e)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,n){let r=this,i=this.json,a=i.textures[e],o=i.images[t],s=(o.uri||o.bufferView)+`:`+a.sampler;if(this.textureCache[s])return this.textureCache[s];let c=this.loadImageSource(t,n).then(function(t){t.flipY=!1,t.name=a.name||o.name||``,t.name===``&&typeof o.uri==`string`&&o.uri.startsWith(`data:image/`)===!1&&(t.name=o.uri);let n=(i.samplers||{})[a.sampler]||{};return t.magFilter=ke[n.magFilter]||u.LinearFilter,t.minFilter=ke[n.minFilter]||u.LinearMipmapLinearFilter,t.wrapS=Ae[n.wrapS]||u.RepeatWrapping,t.wrapT=Ae[n.wrapT]||u.RepeatWrapping,t.generateMipmaps=!t.isCompressedTexture&&t.minFilter!==u.NearestFilter&&t.minFilter!==u.LinearFilter,r.associations.set(t,{textures:e}),t}).catch(function(){return null});return this.textureCache[s]=c,c}loadImageSource(e,t){let n=this,r=this.json,i=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(e=>e.clone());let a=r.images[e],o=self.URL||self.webkitURL,s=a.uri||``,c=!1;if(a.bufferView!==void 0)s=n.getDependency(`bufferView`,a.bufferView).then(function(e){c=!0;let t=new Blob([e],{type:a.mimeType});return s=o.createObjectURL(t),s});else if(a.uri===void 0)throw Error(`THREE.GLTFLoader: Image `+e+` is missing URI and bufferView`);let l=Promise.resolve(s).then(function(e){return new Promise(function(n,r){let a=n;t.isImageBitmapLoader===!0&&(a=function(e){let t=new u.Texture(e);t.needsUpdate=!0,n(t)}),t.load(u.LoaderUtils.resolveURL(e,i.path),a,void 0,r)})}).then(function(e){return c===!0&&o.revokeObjectURL(s),Re(e,a),e.userData.mimeType=a.mimeType||We(a.uri),e}).catch(function(e){throw console.error(`THREE.GLTFLoader: Couldn't load texture`,s),e});return this.sourceCache[e]=l,l}assignTexture(e,t,n,r){let i=this;return this.getDependency(`texture`,n.index).then(function(a){if(!a)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(a=a.clone(),a.channel=n.texCoord),i.extensions[P.KHR_TEXTURE_TRANSFORM]){let e=n.extensions===void 0?void 0:n.extensions[P.KHR_TEXTURE_TRANSFORM];if(e){let t=i.associations.get(a);a=i.extensions[P.KHR_TEXTURE_TRANSFORM].extendTexture(a,e),i.associations.set(a,t)}}return r!==void 0&&(a.colorSpace=r),e[t]=a,a})}assignFinalMaterial(e){let t=e.geometry,n=e.material,r=t.attributes.tangent===void 0,i=t.attributes.color!==void 0,a=t.attributes.normal===void 0;if(e.isPoints){let e=`PointsMaterial:`+n.uuid,t=this.cache.get(e);t||(t=new u.PointsMaterial,u.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){let e=`LineBasicMaterial:`+n.uuid,t=this.cache.get(e);t||(t=new u.LineBasicMaterial,u.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,this.cache.add(e,t)),n=t}if(r||i||a){let e=`ClonedMaterial:`+n.uuid+`:`;r&&(e+=`derivative-tangents:`),i&&(e+=`vertex-colors:`),a&&(e+=`flat-shading:`);let t=this.cache.get(e);t||(t=n.clone(),i&&(t.vertexColors=!0),a&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}e.material=n}getMaterialType(){return u.MeshStandardMaterial}loadMaterial(e){let t=this,n=this.json,r=this.extensions,i=n.materials[e],a,o={},s=i.extensions||{},c=[];if(s[P.KHR_MATERIALS_UNLIT]){let e=r[P.KHR_MATERIALS_UNLIT];a=e.getMaterialType(),c.push(e.extendParams(o,i,t))}else{let n=i.pbrMetallicRoughness||{};if(o.color=new u.Color(1,1,1),o.opacity=1,Array.isArray(n.baseColorFactor)){let e=n.baseColorFactor;o.color.setRGB(e[0],e[1],e[2],u.LinearSRGBColorSpace),o.opacity=e[3]}n.baseColorTexture!==void 0&&c.push(t.assignTexture(o,`map`,n.baseColorTexture,u.SRGBColorSpace)),o.metalness=n.metallicFactor===void 0?1:n.metallicFactor,o.roughness=n.roughnessFactor===void 0?1:n.roughnessFactor,n.metallicRoughnessTexture!==void 0&&(c.push(t.assignTexture(o,`metalnessMap`,n.metallicRoughnessTexture)),c.push(t.assignTexture(o,`roughnessMap`,n.metallicRoughnessTexture))),a=this._invokeOne(function(t){return t.getMaterialType&&t.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,o)})))}i.doubleSided===!0&&(o.side=u.DoubleSide);let l=i.alphaMode||Fe.OPAQUE;if(l===Fe.BLEND?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,l===Fe.MASK&&(o.alphaTest=i.alphaCutoff===void 0?.5:i.alphaCutoff)),i.normalTexture!==void 0&&a!==u.MeshBasicMaterial&&(c.push(t.assignTexture(o,`normalMap`,i.normalTexture)),o.normalScale=new u.Vector2(1,1),i.normalTexture.scale!==void 0)){let e=i.normalTexture.scale;o.normalScale.set(e,e)}if(i.occlusionTexture!==void 0&&a!==u.MeshBasicMaterial&&(c.push(t.assignTexture(o,`aoMap`,i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(o.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&a!==u.MeshBasicMaterial){let e=i.emissiveFactor;o.emissive=new u.Color().setRGB(e[0],e[1],e[2],u.LinearSRGBColorSpace)}return i.emissiveTexture!==void 0&&a!==u.MeshBasicMaterial&&c.push(t.assignTexture(o,`emissiveMap`,i.emissiveTexture,u.SRGBColorSpace)),Promise.all(c).then(function(){let n=new a(o);return i.name&&(n.name=i.name),Re(n,i),t.associations.set(n,{materials:e}),i.extensions&&Le(r,n,i),n})}createUniqueName(e){let t=u.PropertyBinding.sanitizeNodeName(e||``);return t in this.nodeNamesUsed?t+`_`+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){let t=this,n=this.extensions,r=this.primitiveCache;function i(e){return n[P.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then(function(n){return Je(n,e,t)})}let a=[];for(let n=0,o=e.length;n<o;n++){let o=e[n],s=Ve(o),c=r[s];if(c)a.push(c.promise);else{let e;e=o.extensions&&o.extensions[P.KHR_DRACO_MESH_COMPRESSION]?i(o):Je(new u.BufferGeometry,o,t),r[s]={primitive:o,promise:e},a.push(e)}}return Promise.all(a)}loadMesh(e){let t=this,n=this.json,r=this.extensions,i=n.meshes[e],a=i.primitives,o=[];for(let e=0,t=a.length;e<t;e++){let t=a[e].material===void 0?Ie(this.cache):this.getDependency(`material`,a[e].material);o.push(t)}return o.push(t.loadGeometries(a)),Promise.all(o).then(function(n){let o=n.slice(0,n.length-1),s=n[n.length-1],c=[];for(let n=0,l=s.length;n<l;n++){let l=s[n],d=a[n],f,p=o[n];if(d.mode===De.TRIANGLES||d.mode===De.TRIANGLE_STRIP||d.mode===De.TRIANGLE_FAN||d.mode===void 0)f=i.isSkinnedMesh===!0?new u.SkinnedMesh(l,p):new u.Mesh(l,p),f.isSkinnedMesh===!0&&f.normalizeSkinWeights(),d.mode===De.TRIANGLE_STRIP?f.geometry=k(f.geometry,u.TriangleStripDrawMode):d.mode===De.TRIANGLE_FAN&&(f.geometry=k(f.geometry,u.TriangleFanDrawMode));else if(d.mode===De.LINES)f=new u.LineSegments(l,p);else if(d.mode===De.LINE_STRIP)f=new u.Line(l,p);else if(d.mode===De.LINE_LOOP)f=new u.LineLoop(l,p);else if(d.mode===De.POINTS)f=new u.Points(l,p);else throw Error(`THREE.GLTFLoader: Primitive mode unsupported: `+d.mode);Object.keys(f.geometry.morphAttributes).length>0&&Be(f,i),f.name=t.createUniqueName(i.name||`mesh_`+e),Re(f,i),d.extensions&&Le(r,f,d),t.assignFinalMaterial(f),c.push(f)}for(let n=0,r=c.length;n<r;n++)t.associations.set(c[n],{meshes:e,primitives:n});if(c.length===1)return i.extensions&&Le(r,c[0],i),c[0];let l=new u.Group;i.extensions&&Le(r,l,i),t.associations.set(l,{meshes:e});for(let e=0,t=c.length;e<t;e++)l.add(c[e]);return l})}loadCamera(e){let t,n=this.json.cameras[e],r=n[n.type];if(!r){console.warn(`THREE.GLTFLoader: Missing camera parameters.`);return}return n.type===`perspective`?t=new u.PerspectiveCamera(u.MathUtils.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):n.type===`orthographic`&&(t=new u.OrthographicCamera(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Re(t,n),Promise.resolve(t)}loadSkin(e){let t=this.json.skins[e],n=[];for(let e=0,r=t.joints.length;e<r;e++)n.push(this._loadNodeShallow(t.joints[e]));return t.inverseBindMatrices===void 0?n.push(null):n.push(this.getDependency(`accessor`,t.inverseBindMatrices)),Promise.all(n).then(function(e){let n=e.pop(),r=e,i=[],a=[];for(let e=0,o=r.length;e<o;e++){let o=r[e];if(o){i.push(o);let t=new u.Matrix4;n!==null&&t.fromArray(n.array,e*16),a.push(t)}else console.warn(`THREE.GLTFLoader: Joint "%s" could not be found.`,t.joints[e])}return new u.Skeleton(i,a)})}loadAnimation(e){let t=this.json,n=this,r=t.animations[e],i=r.name?r.name:`animation_`+e,a=[],o=[],s=[],c=[],l=[];for(let e=0,t=r.channels.length;e<t;e++){let t=r.channels[e],n=r.samplers[t.sampler],i=t.target,u=i.node,d=r.parameters===void 0?n.input:r.parameters[n.input],f=r.parameters===void 0?n.output:r.parameters[n.output];i.node!==void 0&&(a.push(this.getDependency(`node`,u)),o.push(this.getDependency(`accessor`,d)),s.push(this.getDependency(`accessor`,f)),c.push(n),l.push(i))}return Promise.all([Promise.all(a),Promise.all(o),Promise.all(s),Promise.all(c),Promise.all(l)]).then(function(e){let t=e[0],a=e[1],o=e[2],s=e[3],c=e[4],l=[];for(let e=0,r=t.length;e<r;e++){let r=t[e],i=a[e],u=o[e],d=s[e],f=c[e];if(r===void 0)continue;r.updateMatrix&&r.updateMatrix();let p=n._createAnimationTracks(r,i,u,d,f);if(p)for(let e=0;e<p.length;e++)l.push(p[e])}let d=new u.AnimationClip(i,void 0,l);return Re(d,r),d})}createNodeMesh(e){let t=this.json,n=this,r=t.nodes[e];return r.mesh===void 0?null:n.getDependency(`mesh`,r.mesh).then(function(e){let t=n._getNodeRef(n.meshCache,r.mesh,e);return r.weights!==void 0&&t.traverse(function(e){if(e.isMesh)for(let t=0,n=r.weights.length;t<n;t++)e.morphTargetInfluences[t]=r.weights[t]}),t})}loadNode(e){let t=this.json,n=this,r=t.nodes[e],i=n._loadNodeShallow(e),a=[],o=r.children||[];for(let e=0,t=o.length;e<t;e++)a.push(n.getDependency(`node`,o[e]));let s=r.skin===void 0?Promise.resolve(null):n.getDependency(`skin`,r.skin);return Promise.all([i,Promise.all(a),s]).then(function(e){let t=e[0],n=e[1],r=e[2];r!==null&&t.traverse(function(e){e.isSkinnedMesh&&e.bind(r,Ge)});for(let e=0,r=n.length;e<r;e++)t.add(n[e]);if(t.userData.pivot!==void 0&&n.length>0){let e=t.userData.pivot,r=n[0];t.pivot=new u.Vector3().fromArray(e),t.position.x-=e[0],t.position.y-=e[1],t.position.z-=e[2],r.position.set(0,0,0),delete t.userData.pivot}return t})}_loadNodeShallow(e){let t=this.json,n=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];let i=t.nodes[e],a=i.name?r.createUniqueName(i.name):``,o=[],s=r._invokeOne(function(t){return t.createNodeMesh&&t.createNodeMesh(e)});return s&&o.push(s),i.camera!==void 0&&o.push(r.getDependency(`camera`,i.camera).then(function(e){return r._getNodeRef(r.cameraCache,i.camera,e)})),r._invokeAll(function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)}).forEach(function(e){o.push(e)}),this.nodeCache[e]=Promise.all(o).then(function(t){let o;if(o=i.isBone===!0?new u.Bone:t.length>1?new u.Group:t.length===1?t[0]:new u.Object3D,o!==t[0])for(let e=0,n=t.length;e<n;e++)o.add(t[e]);if(i.name&&(o.userData.name=i.name,o.name=a),Re(o,i),i.extensions&&Le(n,o,i),i.matrix!==void 0){let e=new u.Matrix4;e.fromArray(i.matrix),o.applyMatrix4(e)}else i.translation!==void 0&&o.position.fromArray(i.translation),i.rotation!==void 0&&o.quaternion.fromArray(i.rotation),i.scale!==void 0&&o.scale.fromArray(i.scale);if(!r.associations.has(o))r.associations.set(o,{});else if(i.mesh!==void 0&&r.meshCache.refs[i.mesh]>1){let e=r.associations.get(o);r.associations.set(o,{...e})}return r.associations.get(o).nodes=e,o}),this.nodeCache[e]}loadScene(e){let t=this.extensions,n=this.json.scenes[e],r=this,i=new u.Group;n.name&&(i.name=r.createUniqueName(n.name)),Re(i,n),n.extensions&&Le(t,i,n);let a=n.nodes||[],o=[];for(let e=0,t=a.length;e<t;e++)o.push(r.getDependency(`node`,a[e]));return Promise.all(o).then(function(e){for(let t=0,n=e.length;t<n;t++){let n=e[t];n.parent===null?i.add(n):i.add(A(n))}return r.associations=(e=>{let t=new Map;for(let[e,n]of r.associations)(e instanceof u.Material||e instanceof u.Texture)&&t.set(e,n);return e.traverse(e=>{let n=r.associations.get(e);n!=null&&t.set(e,n)}),t})(i),i})}_createAnimationTracks(e,t,n,r,i){let a=[],o=e.name?e.name:e.uuid,s=[];function c(e){e.morphTargetInfluences&&s.push(e.name?e.name:e.uuid)}Ne[i.path]===Ne.weights?(c(e),e.isGroup&&e.children.forEach(c)):s.push(o);let l;switch(Ne[i.path]){case Ne.weights:l=u.NumberKeyframeTrack;break;case Ne.rotation:l=u.QuaternionKeyframeTrack;break;case Ne.translation:case Ne.scale:l=u.VectorKeyframeTrack;break;default:switch(n.itemSize){case 1:l=u.NumberKeyframeTrack;break;default:l=u.VectorKeyframeTrack;break}break}let d=r.interpolation===void 0?u.InterpolateLinear:Pe[r.interpolation],f=this._getArrayFromAccessor(n);for(let e=0,n=s.length;e<n;e++){let n=new l(s[e]+`.`+Ne[i.path],t.array,f,d);r.interpolation===`CUBICSPLINE`&&this._createCubicSplineTrackInterpolant(n),a.push(n)}return a}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){let e=Ue(t.constructor),n=new Float32Array(t.length);for(let r=0,i=t.length;r<i;r++)n[r]=t[r]*e;t=n}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(e){return new(this instanceof u.QuaternionKeyframeTrack?Ee:we)(this.times,this.values,this.getValueSize()/3,e)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}};function qe(e,t,n){let r=t.attributes,i=new u.Box3;if(r.POSITION!==void 0){let e=n.json.accessors[r.POSITION],t=e.min,a=e.max;if(t!==void 0&&a!==void 0){if(i.set(new u.Vector3(t[0],t[1],t[2]),new u.Vector3(a[0],a[1],a[2])),e.normalized){let t=Ue(Oe[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}else{console.warn(`THREE.GLTFLoader: Missing min/max properties for accessor POSITION.`);return}}else return;let a=t.targets;if(a!==void 0){let e=new u.Vector3,t=new u.Vector3;for(let r=0,i=a.length;r<i;r++){let i=a[r];if(i.POSITION!==void 0){let r=n.json.accessors[i.POSITION],a=r.min,o=r.max;if(a!==void 0&&o!==void 0){if(t.setX(Math.max(Math.abs(a[0]),Math.abs(o[0]))),t.setY(Math.max(Math.abs(a[1]),Math.abs(o[1]))),t.setZ(Math.max(Math.abs(a[2]),Math.abs(o[2]))),r.normalized){let e=Ue(Oe[r.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn(`THREE.GLTFLoader: Missing min/max properties for accessor POSITION.`)}}i.expandByVector(e)}e.boundingBox=i;let o=new u.Sphere;i.getCenter(o.center),o.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=o}function Je(e,t,n){let r=t.attributes,i=[];function a(t,r){return n.getDependency(`accessor`,t).then(function(t){e.setAttribute(r,t)})}for(let t in r){let n=Me[t]||t.toLowerCase();n in e.attributes||i.push(a(r[t],n))}if(t.indices!==void 0&&!e.index){let r=n.getDependency(`accessor`,t.indices).then(function(t){e.setIndex(t)});i.push(r)}return u.ColorManagement.workingColorSpace!==u.LinearSRGBColorSpace&&`COLOR_0`in r&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${u.ColorManagement.workingColorSpace}" not supported.`),Re(e,t),qe(e,t,n),Promise.all(i).then(function(){return t.targets===void 0?e:ze(e,t.targets,n)})}var Ye=/^[og]\s*(.+)?/,Xe=/^mtllib /,Ze=/^usemtl /,Qe=/^usemap /,$e=/\s+/,et=new u.Vector3,tt=new u.Vector3,nt=new u.Vector3,rt=new u.Vector3,it=new u.Vector3,at=new u.Color;function ot(){let e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=t!==!1;return}let n=this.object&&typeof this.object.currentMaterial==`function`?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize==`function`&&this.object._finalize(!0),this.object={name:e||``,fromDeclaration:t!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){let n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);let r={index:this.materials.length,name:e||``,mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:``,smooth:n===void 0?this.smooth:n.smooth,groupStart:n===void 0?0:n.groupEnd,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){let t={index:typeof e==`number`?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){let t=this.currentMaterial();if(t&&t.groupEnd===-1&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let e=this.materials.length-1;e>=0;e--)this.materials[e].groupCount<=0&&this.materials.splice(e,1);return e&&this.materials.length===0&&this.materials.push({name:``,smooth:this.smooth}),t}},n&&n.name&&typeof n.clone==`function`){let e=n.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize==`function`&&this.object._finalize(!0)},parseVertexIndex:function(e,t){let n=parseInt(e,10);return(n>=0?n-1:n+t/3)*3},parseNormalIndex:function(e,t){let n=parseInt(e,10);return(n>=0?n-1:n+t/3)*3},parseUVIndex:function(e,t){let n=parseInt(e,10);return(n>=0?n-1:n+t/2)*2},addVertex:function(e,t,n){let r=this.vertices,i=this.object.geometry.vertices;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){let r=this.normals,i=this.object.geometry.normals;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addFaceNormal:function(e,t,n){let r=this.vertices,i=this.object.geometry.normals;et.fromArray(r,e),tt.fromArray(r,t),nt.fromArray(r,n),it.subVectors(nt,tt),rt.subVectors(et,tt),it.cross(rt),it.normalize(),i.push(it.x,it.y,it.z),i.push(it.x,it.y,it.z),i.push(it.x,it.y,it.z)},addColor:function(e,t,n){let r=this.colors,i=this.object.geometry.colors;r[e]!==void 0&&i.push(r[e+0],r[e+1],r[e+2]),r[t]!==void 0&&i.push(r[t+0],r[t+1],r[t+2]),r[n]!==void 0&&i.push(r[n+0],r[n+1],r[n+2])},addUV:function(e,t,n){let r=this.uvs,i=this.object.geometry.uvs;i.push(r[e+0],r[e+1]),i.push(r[t+0],r[t+1]),i.push(r[n+0],r[n+1])},addDefaultUV:function(){let e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){let t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,r,i,a,o,s,c){let l=this.vertices.length,u=this.parseVertexIndex(e,l),d=this.parseVertexIndex(t,l),f=this.parseVertexIndex(n,l);if(this.addVertex(u,d,f),this.addColor(u,d,f),o!==void 0&&o!==``){let e=this.normals.length;u=this.parseNormalIndex(o,e),d=this.parseNormalIndex(s,e),f=this.parseNormalIndex(c,e),this.addNormal(u,d,f)}else this.addFaceNormal(u,d,f);if(r!==void 0&&r!==``){let e=this.uvs.length;u=this.parseUVIndex(r,e),d=this.parseUVIndex(i,e),f=this.parseUVIndex(a,e),this.addUV(u,d,f),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type=`Points`;let t=this.vertices.length;for(let n=0,r=e.length;n<r;n++){let r=this.parseVertexIndex(e[n],t);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(e,t){this.object.geometry.type=`Line`;let n=this.vertices.length,r=this.uvs.length;for(let t=0,r=e.length;t<r;t++)this.addVertexLine(this.parseVertexIndex(e[t],n));for(let e=0,n=t.length;e<n;e++)this.addUVLine(this.parseUVIndex(t[e],r))}};return e.startObject(``,!1),e}var st=class extends u.Loader{constructor(e){super(e),this.materials=null}load(e,t,n,r){let i=this,a=new u.FileLoader(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(n){try{t(i.parse(n))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}setMaterials(e){return this.materials=e,this}parse(e){let t=new ot;e.indexOf(`\r
6
6
  `)!==-1&&(e=e.replace(/\r\n/g,`
7
7
  `)),e.indexOf(`\\
8
- `)!==-1&&(e=e.replace(/\\\n/g,""));const r=e.split(`
9
- `);let o=[];for(let a=0,l=r.length;a<l;a++){const c=r[a].trimStart();if(c.length===0)continue;const p=c.charAt(0);if(p!=="#")if(p==="v"){const f=c.split(co);switch(f[0]){case"v":n.vertices.push(parseFloat(f[1]),parseFloat(f[2]),parseFloat(f[3])),f.length>=7?(gn.setRGB(parseFloat(f[4]),parseFloat(f[5]),parseFloat(f[6]),u.SRGBColorSpace),n.colors.push(gn.r,gn.g,gn.b)):n.colors.push(void 0,void 0,void 0);break;case"vn":n.normals.push(parseFloat(f[1]),parseFloat(f[2]),parseFloat(f[3]));break;case"vt":n.uvs.push(parseFloat(f[1]),parseFloat(f[2]));break}}else if(p==="f"){const h=c.slice(1).trim().split(co),b=[];for(let d=0,x=h.length;d<x;d++){const T=h[d];if(T.length>0){const C=T.split("/");b.push(C)}}const g=b[0];for(let d=1,x=b.length-1;d<x;d++){const T=b[d],C=b[d+1];n.addFace(g[0],T[0],C[0],g[1],T[1],C[1],g[2],T[2],C[2])}}else if(p==="l"){const f=c.substring(1).trim().split(" ");let h=[];const b=[];if(c.indexOf("/")===-1)h=f;else for(let g=0,d=f.length;g<d;g++){const x=f[g].split("/");x[0]!==""&&h.push(x[0]),x[1]!==""&&b.push(x[1])}n.addLineGeometry(h,b)}else if(p==="p"){const h=c.slice(1).trim().split(" ");n.addPointGeometry(h)}else if((o=Ki.exec(c))!==null){const f=(" "+o[0].slice(1).trim()).slice(1);n.startObject(f)}else if(Qi.test(c))n.object.startMaterial(c.substring(7).trim(),n.materialLibraries);else if(qi.test(c))n.materialLibraries.push(c.substring(7).trim());else if(Zi.test(c))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(p==="s"){if(o=c.split(" "),o.length>1){const h=o[1].trim().toLowerCase();n.object.smooth=h!=="0"&&h!=="off"}else n.object.smooth=!0;const f=n.object.currentMaterial();f&&(f.smooth=n.object.smooth)}else{if(c==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}}n.finalize();const s=new u.Group;if(s.materialLibraries=[].concat(n.materialLibraries),!(n.objects.length===1&&n.objects[0].geometry.vertices.length===0)===!0)for(let a=0,l=n.objects.length;a<l;a++){const c=n.objects[a],p=c.geometry,f=c.materials,h=p.type==="Line",b=p.type==="Points";let g=!1;if(p.vertices.length===0)continue;const d=new u.BufferGeometry;d.setAttribute("position",new u.Float32BufferAttribute(p.vertices,3)),p.normals.length>0&&d.setAttribute("normal",new u.Float32BufferAttribute(p.normals,3)),p.colors.length>0&&(g=!0,d.setAttribute("color",new u.Float32BufferAttribute(p.colors,3))),p.hasUVIndices===!0&&d.setAttribute("uv",new u.Float32BufferAttribute(p.uvs,2));const x=[];for(let C=0,M=f.length;C<M;C++){const S=f[C],w=S.name+"_"+S.smooth+"_"+g;let v=n.materials[w];if(this.materials!==null){if(v=this.materials.create(S.name),h&&v&&!(v instanceof u.LineBasicMaterial)){const R=new u.LineBasicMaterial;u.Material.prototype.copy.call(R,v),R.color.copy(v.color),v=R}else if(b&&v&&!(v instanceof u.PointsMaterial)){const R=new u.PointsMaterial({size:10,sizeAttenuation:!1});u.Material.prototype.copy.call(R,v),R.color.copy(v.color),R.map=v.map,v=R}}v===void 0&&(h?v=new u.LineBasicMaterial:b?v=new u.PointsMaterial({size:1,sizeAttenuation:!1}):v=new u.MeshPhongMaterial,v.name=S.name,v.flatShading=!S.smooth,v.vertexColors=g,n.materials[w]=v),x.push(v)}let T;if(x.length>1){for(let C=0,M=f.length;C<M;C++){const S=f[C];d.addGroup(S.groupStart,S.groupCount,C)}h?T=new u.LineSegments(d,x):b?T=new u.Points(d,x):T=new u.Mesh(d,x)}else h?T=new u.LineSegments(d,x[0]):b?T=new u.Points(d,x[0]):T=new u.Mesh(d,x[0]);T.name=c.name,s.add(T)}else if(n.vertices.length>0){const a=new u.PointsMaterial({size:1,sizeAttenuation:!1}),l=new u.BufferGeometry;l.setAttribute("position",new u.Float32BufferAttribute(n.vertices,3)),n.colors.length>0&&n.colors[0]!==void 0&&(l.setAttribute("color",new u.Float32BufferAttribute(n.colors,3)),a.vertexColors=!0);const c=new u.Points(l,a);s.add(c)}return s}}const yn=t=>{if(t.geometry&&t.geometry.dispose(),t.material){const e=t.material;Array.isArray(e)?e.forEach(n=>n.dispose()):e.dispose()}"dispose"in t&&typeof t.dispose=="function"&&t.dispose()},bs=t=>{const{url:e,position:n,transform:r,init:o,onDone:s,loaders:i,customLoaders:a}=t,{scene:l,worldMatrixInv:c}=Hn(),[p,f]=Y.useState(void 0),h=Y.useRef(void 0),b=Y.useRef(o),g=Y.useRef(s);b.current=o,g.current=s;const d=Y.useRef({position:n,transform:r});d.current={position:n,transform:r};const x=Y.useRef(c);x.current=c;const T=Y.useMemo(()=>({...i,...a}),[i,a]),C=Y.useCallback((S,w)=>{const{position:v,transform:R}=d.current;if(v&&w){const P=_t.toScenePosition(w,v,0);S.position.set(P.x,P.y,P.z),R?.position&&(S.position.x+=R.position.x,S.position.y+=R.position.y,S.position.z+=R.position.z)}R?.rotation&&S.rotation.set(R.rotation.x,R.rotation.y,R.rotation.z),R?.scale&&(typeof R.scale=="number"?S.scale.set(R.scale,R.scale,R.scale):S.scale.set(R.scale.x,R.scale.y,R.scale.z)),S.updateMatrixWorld(!0)},[]),M=Y.useCallback(()=>{h.current&&l&&(l.remove(h.current),h.current.traverse(yn),yn(h.current),h.current=void 0,f(void 0))},[l]);return Y.useEffect(()=>{if(!l)return;typeof b.current=="function"&&b.current();let S="";try{S=new URL(e,window.location.origin).pathname.split(".").pop()?.toLowerCase()||""}catch{S=e.split(".").pop()?.toLowerCase()||""}const w=T[S];if(!w){console.warn(`useThreeModel: No loader found for file extension "${S}". Supported extensions: ${Object.keys(T).join(", ")}`);return}let v=!1;return w(e,P=>{if(v){P.traverse(yn),yn(P);return}h.current&&M(),h.current=P,C(P,x.current),l.add(P),f(P),typeof g.current=="function"&&g.current()}),()=>{v=!0,M()}},[e,l,T,M,C]),Y.useEffect(()=>{p&&C(p,c)},[p,n,r,c,C]),p},ta=t=>{const{url:e,position:n,transform:r,init:o,onDone:s,customLoaders:i}=t,a=Y.useMemo(()=>({gltf:(l,c)=>{new oo().load(l,f=>c(f.scene))},glb:(l,c)=>{new oo().load(l,f=>c(f.scene))},obj:(l,c)=>{new ea().load(l,f=>c(f))}}),[]);return bs({url:e,position:n,transform:r,init:o,onDone:s,loaders:a,customLoaders:i}),null};function Mr(t,e,n){try{const r=t.next();r.done||!r.value?e(r):r.value.then(()=>e({done:r.done,value:void 0}),n)}catch(r){n(r)}}function zr(t=25){let e;return(n,r,o)=>{const s=performance.now();e===void 0||s-e>t?(e=s,setTimeout(()=>Mr(n,r,o),0)):Mr(n,r,o)}}function xs(t,e,n,r,o){const s=()=>{let i;const a=l=>{l.done?n(l.value):i===void 0?i=!0:s()};do{if(i=void 0,o?.aborted){r(new DOMException("Aborted","AbortError"));return}e(t,a,r),i===void 0&&(i=!1)}while(i)};s()}function na(t,e){let n;return xs(t,Mr,r=>{n=r},r=>{throw r},e),n}function Fr(t,e,n){return new Promise((r,o)=>{xs(t,e,r,o,n)})}const ra=`
8
+ `)!==-1&&(e=e.replace(/\\\n/g,``));let n=e.split(`
9
+ `),r=[];for(let e=0,i=n.length;e<i;e++){let i=n[e].trimStart();if(i.length===0)continue;let a=i.charAt(0);if(a!==`#`)if(a===`v`){let e=i.split($e);switch(e[0]){case`v`:t.vertices.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])),e.length>=7?(at.setRGB(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6]),u.SRGBColorSpace),t.colors.push(at.r,at.g,at.b)):t.colors.push(void 0,void 0,void 0);break;case`vn`:t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case`vt`:t.uvs.push(parseFloat(e[1]),parseFloat(e[2]));break}}else if(a===`f`){let e=i.slice(1).trim().split($e),n=[];for(let t=0,r=e.length;t<r;t++){let r=e[t];if(r.length>0){let e=r.split(`/`);n.push(e)}}let r=n[0];for(let e=1,i=n.length-1;e<i;e++){let i=n[e],a=n[e+1];t.addFace(r[0],i[0],a[0],r[1],i[1],a[1],r[2],i[2],a[2])}}else if(a===`l`){let e=i.substring(1).trim().split(` `),n=[],r=[];if(i.indexOf(`/`)===-1)n=e;else for(let t=0,i=e.length;t<i;t++){let i=e[t].split(`/`);i[0]!==``&&n.push(i[0]),i[1]!==``&&r.push(i[1])}t.addLineGeometry(n,r)}else if(a===`p`){let e=i.slice(1).trim().split(` `);t.addPointGeometry(e)}else if((r=Ye.exec(i))!==null){let e=(` `+r[0].slice(1).trim()).slice(1);t.startObject(e)}else if(Ze.test(i))t.object.startMaterial(i.substring(7).trim(),t.materialLibraries);else if(Xe.test(i))t.materialLibraries.push(i.substring(7).trim());else if(Qe.test(i))console.warn(`THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.`);else if(a===`s`){if(r=i.split(` `),r.length>1){let e=r[1].trim().toLowerCase();t.object.smooth=e!==`0`&&e!==`off`}else t.object.smooth=!0;let e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if(i===`\0`)continue;console.warn(`THREE.OBJLoader: Unexpected line: "`+i+`"`)}}t.finalize();let i=new u.Group;if(i.materialLibraries=[].concat(t.materialLibraries),!(t.objects.length===1&&t.objects[0].geometry.vertices.length===0))for(let e=0,n=t.objects.length;e<n;e++){let n=t.objects[e],r=n.geometry,a=n.materials,o=r.type===`Line`,s=r.type===`Points`,c=!1;if(r.vertices.length===0)continue;let l=new u.BufferGeometry;l.setAttribute(`position`,new u.Float32BufferAttribute(r.vertices,3)),r.normals.length>0&&l.setAttribute(`normal`,new u.Float32BufferAttribute(r.normals,3)),r.colors.length>0&&(c=!0,l.setAttribute(`color`,new u.Float32BufferAttribute(r.colors,3))),r.hasUVIndices===!0&&l.setAttribute(`uv`,new u.Float32BufferAttribute(r.uvs,2));let d=[];for(let e=0,n=a.length;e<n;e++){let n=a[e],r=n.name+`_`+n.smooth+`_`+c,i=t.materials[r];if(this.materials!==null){if(i=this.materials.create(n.name),o&&i&&!(i instanceof u.LineBasicMaterial)){let e=new u.LineBasicMaterial;u.Material.prototype.copy.call(e,i),e.color.copy(i.color),i=e}else if(s&&i&&!(i instanceof u.PointsMaterial)){let e=new u.PointsMaterial({size:10,sizeAttenuation:!1});u.Material.prototype.copy.call(e,i),e.color.copy(i.color),e.map=i.map,i=e}}i===void 0&&(i=o?new u.LineBasicMaterial:s?new u.PointsMaterial({size:1,sizeAttenuation:!1}):new u.MeshPhongMaterial,i.name=n.name,i.flatShading=!n.smooth,i.vertexColors=c,t.materials[r]=i),d.push(i)}let f;if(d.length>1){for(let e=0,t=a.length;e<t;e++){let t=a[e];l.addGroup(t.groupStart,t.groupCount,e)}f=o?new u.LineSegments(l,d):s?new u.Points(l,d):new u.Mesh(l,d)}else f=o?new u.LineSegments(l,d[0]):s?new u.Points(l,d[0]):new u.Mesh(l,d[0]);f.name=n.name,i.add(f)}else if(t.vertices.length>0){let e=new u.PointsMaterial({size:1,sizeAttenuation:!1}),n=new u.BufferGeometry;n.setAttribute(`position`,new u.Float32BufferAttribute(t.vertices,3)),t.colors.length>0&&t.colors[0]!==void 0&&(n.setAttribute(`color`,new u.Float32BufferAttribute(t.colors,3)),e.vertexColors=!0);let r=new u.Points(n,e);i.add(r)}return i}},ct=e=>{if(e.geometry&&e.geometry.dispose(),e.material){let t=e.material;Array.isArray(t)?t.forEach(e=>e.dispose()):t.dispose()}`dispose`in e&&typeof e.dispose==`function`&&e.dispose()},lt=e=>{let{url:t,position:n,transform:r,init:i,onDone:a,loaders:o,customLoaders:s}=e,{scene:c,worldMatrixInv:l}=O(),[u,f]=(0,d.useState)(void 0),p=(0,d.useRef)(void 0),m=(0,d.useRef)(i),h=(0,d.useRef)(a);m.current=i,h.current=a;let g=(0,d.useRef)({position:n,transform:r});g.current={position:n,transform:r};let _=(0,d.useRef)(l);_.current=l;let v=(0,d.useMemo)(()=>({...o,...s}),[o,s]),b=(0,d.useCallback)((e,t)=>{let{position:n,transform:r}=g.current;if(n&&t){let i=y.toScenePosition(t,n,0);e.position.set(i.x,i.y,i.z),r?.position&&(e.position.x+=r.position.x,e.position.y+=r.position.y,e.position.z+=r.position.z)}r?.rotation&&e.rotation.set(r.rotation.x,r.rotation.y,r.rotation.z),r?.scale&&(typeof r.scale==`number`?e.scale.set(r.scale,r.scale,r.scale):e.scale.set(r.scale.x,r.scale.y,r.scale.z)),e.updateMatrixWorld(!0)},[]),x=(0,d.useCallback)(()=>{p.current&&c&&(c.remove(p.current),p.current.traverse(ct),ct(p.current),p.current=void 0,f(void 0))},[c]);return(0,d.useEffect)(()=>{if(!c)return;typeof m.current==`function`&&m.current();let e=``;try{e=new URL(t,window.location.origin).pathname.split(`.`).pop()?.toLowerCase()||``}catch{e=t.split(`.`).pop()?.toLowerCase()||``}let n=v[e];if(!n){console.warn(`useThreeModel: No loader found for file extension "${e}". Supported extensions: ${Object.keys(v).join(`, `)}`);return}let r=!1;return n(t,e=>{if(r){e.traverse(ct),ct(e);return}p.current&&x(),p.current=e,b(e,_.current),c.add(e),f(e),typeof h.current==`function`&&h.current()}),()=>{r=!0,x()}},[t,c,v,x,b]),(0,d.useEffect)(()=>{u&&b(u,l)},[u,n,r,l,b]),u},ut=e=>{let{url:t,position:n,transform:r,init:i,onDone:a,customLoaders:o}=e;return lt({url:t,position:n,transform:r,init:i,onDone:a,loaders:(0,d.useMemo)(()=>({gltf:(e,t)=>{new M().load(e,e=>t(e.scene))},glb:(e,t)=>{new M().load(e,e=>t(e.scene))},obj:(e,t)=>{new st().load(e,e=>t(e))}}),[]),customLoaders:o}),null};function dt(e,t,n){try{let r=e.next();r.done||!r.value?t(r):r.value.then(()=>t({done:r.done,value:void 0}),n)}catch(e){n(e)}}function ft(e=25){let t;return(n,r,i)=>{let a=performance.now();t===void 0||a-t>e?(t=a,setTimeout(()=>dt(n,r,i),0)):dt(n,r,i)}}function pt(e,t,n,r,i){let a=()=>{let o,s=e=>{e.done?n(e.value):o===void 0?o=!0:a()};do{if(o=void 0,i?.aborted){r(new DOMException(`Aborted`,`AbortError`));return}t(e,s,r),o===void 0&&(o=!1)}while(o)};a()}function mt(e,t){let n;return pt(e,dt,e=>{n=e},e=>{throw e},t),n}function ht(e,t,n){return new Promise((r,i)=>{pt(e,t,r,i,n)})}var gt=`
10
10
  precision highp float;
11
11
  #include <common>
12
12
 
@@ -243,7 +243,7 @@ void main() {
243
243
 
244
244
  gl_Position = gaussianSplatting(vPosition, worldPos.xyz, vec2(1.0, 1.0), covA, covB, modelMatrix, viewMatrix, projectionMatrix);
245
245
  }
246
- `,oa=`
246
+ `,_t=`
247
247
  precision highp float;
248
248
  #include <common>
249
249
 
@@ -260,70 +260,15 @@ vec4 gaussianColor(vec4 inColor) {
260
260
  void main() {
261
261
  gl_FragColor = gaussianColor(vColor);
262
262
  }
263
- `,$t=t=>u.DataUtils.toHalfFloat(t);class ho{static build(e=1){const n=new u.BufferGeometry;n.setIndex([0,1,2]);const r=new u.BufferAttribute(new Float32Array([-3,-2,0,3,-2,0,0,4,0]),3);n.setAttribute("position",r);const o=new u.InstancedBufferGeometry;o.setIndex(n.getIndex()),o.setAttribute("position",n.getAttribute("position"));const s=new u.InstancedBufferAttribute(new Float32Array(e),1,!1);return s.setUsage(u.DynamicDrawUsage),o.setAttribute("splatIndex",s),o.instanceCount=0,o}}class Je{static BATCH_SIZE=327680;static workCount=0;vertexCount=0;positions=null;hasInit=!1;splatIndex=null;depthValues=null;tempDepths=null;tempIndices=null;abortController=null;onmessage=null;terminate(){this.abortController?.abort(),this.abortController=null,this.vertexCount=0,this.positions=null,this.splatIndex=null,this.onmessage=null}initSortData(){if(this.hasInit||this.vertexCount<0)return;const e=this.vertexCount;this.depthValues=new Int32Array(e),this.splatIndex=new Uint32Array(e),this.tempDepths=new Int32Array(e),this.tempIndices=new Uint32Array(e),this.hasInit=!0}*sortData(e,n){this.hasInit||this.initSortData();const{positions:r,vertexCount:o,depthValues:s,splatIndex:i,tempDepths:a,tempIndices:l}=this;if(!r||!s||!i||!a||!l)return;let c=1/0;for(let h=0;h<o;h++){i[h]=h;const b=e[2]*r[4*h]+e[6]*r[4*h+1]+e[10]*r[4*h+2],g=Math.floor(b*4096);s[h]=g,c=Math.min(c,g)}n&&(Je.workCount+=o,Je.workCount>Je.BATCH_SIZE&&(Je.workCount=0,yield));const p=-c;for(let h=0;h<o;h++)s[h]+=p;const f=new Uint32Array(256);for(let h=0;h<32;h+=8){f.fill(0);for(let g=0;g<o;g++)f[s[g]>>h&255]++;let b=0;for(let g=0;g<f.length;g++){const d=f[g];f[g]=b,b+=d}for(let g=0;g<o;g++){const d=s[g]>>h&255,x=f[d]++;a[x]=s[g],l[x]=i[g]}s.set(a),i.set(l),n&&(Je.workCount+=o,Je.workCount>Je.BATCH_SIZE&&(Je.workCount=0,yield))}}init(e,n){this.positions=e,this.vertexCount=n,this.initSortData()}async sortDataAsync(e){this.abortController?.abort(),this.abortController=new AbortController;const n=this.abortController.signal;try{await Fr(this.sortData(e,!0),zr(),n),this.onmessage&&this.splatIndex&&this.onmessage(this.splatIndex)}catch(r){r instanceof Error&&r.name!=="AbortError"&&console.error("Splat sort error:",r)}finally{this.abortController=null}}}class fr{static build(e=0){return new u.ShaderMaterial({uniforms:{invViewport:{value:new u.Vector2},dataTextureSize:{value:new u.Vector2},focal:{value:new u.Vector2},covariancesATexture:{value:null},covariancesBTexture:{value:null},centersTexture:{value:null},colorsTexture:{value:null},shTexture0:{value:null},shTexture1:{value:null},shTexture2:{value:null}},defines:{SH_DEGREE:e},vertexShader:ra,fragmentShader:oa,transparent:!0,alphaTest:1,blending:u.NormalBlending,depthTest:!0,depthWrite:!0,side:u.DoubleSide})}static updateUniforms(e,n,r){const o=r.material;if(!o?.uniforms)return;const{uniforms:s}=o,i=e.getSize(new u.Vector2);if(s.invViewport.value.set(1/i.x,1/i.y),n){const a=n._cleanProjectionMatrix,l=a?.elements??a??n.projectionMatrix.elements;s.focal.value.set(l[0]*.5*i.x,l[5]*.5*i.y)}if(r.covariancesATexture){const{width:a,height:l}=r.covariancesATexture.image;s.dataTextureSize.value.set(a,l),s.covariancesATexture.value=r.covariancesATexture,s.covariancesBTexture.value=r.covariancesBTexture,s.centersTexture.value=r.centersTexture,s.colorsTexture.value=r.colorsTexture,r.shTextures?.forEach((c,p)=>{s[`shTexture${p}`].value=c})}o.uniformsNeedUpdate=!0}}class Wt extends u.Mesh{static ROW_OUTPUT_LENGTH=32;static SPLAT_BATCH_SIZE=327680;vertexCount=0;worker=null;frameIdLastUpdate=-1;frameIdThisUpdate=0;cameraMatrix=null;internalModelViewMatrix=null;canPostToWorker=!1;covariancesATextureInternal=null;covariancesBTextureInternal=null;centersTextureInternal=null;colorsTextureInternal=null;splatPositions=null;splatPositions2=null;splatIndex=null;shTexturesInternal=null;splatsDataInternal=null;keepInRam=!1;oldDirection=new u.Vector3;useRGBACovariants=!0;tmpCovariances=[0,0,0,0,0,0];sortIsDirty=!1;lastSortTime=0;sortThrottleMs=200;shDegreeValue=0;tempQuaternion=new u.Quaternion;tempPosition=new u.Vector3;tempScale=new u.Vector3;tempColor=new Uint8Array(4);tempMatrix=new u.Matrix4;isGaussianSplattingMesh=!0;readyToDisplay=!1;type="GaussianSplattingMesh";get shDegree(){return this.shDegreeValue}get splatsData(){return this.splatsDataInternal}get covariancesATexture(){return this.covariancesATextureInternal}get covariancesBTexture(){return this.covariancesBTextureInternal}get centersTexture(){return this.centersTextureInternal}get colorsTexture(){return this.colorsTextureInternal}get shTextures(){return this.shTexturesInternal}constructor(){super(),this.geometry=ho.build(),this.material=fr.build(),this.setEnabled(!1)}setEnabled(e){this.visible=e}postToWorker(e=!1){const n=this.frameIdThisUpdate;if((e||n!==this.frameIdLastUpdate)&&this.worker&&this.cameraMatrix&&this.canPostToWorker){this.internalModelViewMatrix=new u.Matrix4().multiplyMatrices(this.cameraMatrix,this.matrixWorld);const r=this.cameraMatrix.clone().invert(),o=new u.Matrix4().multiplyMatrices(r,this.matrixWorld),s=new u.Vector3(0,0,1).transformDirection(o),i=s.dot(this.oldDirection);if(e||Math.abs(i-1)>=.01)return this.oldDirection.copy(s),this.frameIdLastUpdate=n,this.canPostToWorker=!1,this.worker.sortDataAsync(this.internalModelViewMatrix.elements)}}onBeforeRender(e,n,r,o,s,i){this.frameIdThisUpdate=e.info.render.frame;const a=performance.now();a-this.lastSortTime>this.sortThrottleMs&&(this.lastSortTime=a,this.sortDataAsync(r).catch(l=>{l.name!=="AbortError"&&console.warn("Splat sorting error:",l)})),fr.updateUniforms(e,r,this),super.onBeforeRender(e,n,r,o,s,i)}loadDataAsync(e){return this.updateDataAsync(e)}dispose(){this.covariancesATextureInternal?.dispose(),this.covariancesBTextureInternal?.dispose(),this.centersTextureInternal?.dispose(),this.colorsTextureInternal?.dispose(),this.shTexturesInternal?.forEach(e=>e.dispose()),this.covariancesATextureInternal=null,this.covariancesBTextureInternal=null,this.centersTextureInternal=null,this.colorsTextureInternal=null,this.shTexturesInternal=null,this.worker?.terminate(),this.worker=null}copyTextures(e){this.covariancesATextureInternal=e.covariancesATexture?.clone()??null,this.covariancesBTextureInternal=e.covariancesBTexture?.clone()??null,this.centersTextureInternal=e.centersTexture?.clone()??null,this.colorsTextureInternal=e.colorsTexture?.clone()??null,e.shTexturesInternal&&(this.shTexturesInternal=e.shTexturesInternal.map(n=>n.clone()))}clone(){const e=new Wt;return e.geometry=this.geometry.clone(),e.material=this.material.clone(),e.vertexCount=this.vertexCount,e.copyTextures(this),e.splatPositions=this.splatPositions,e.readyToDisplay=!1,e.instantiateWorker(),e}makeSplatFromComponents(e,n,r,o,s,i,a,l,c,p,f){s.w=-s.w,o=o.multiplyScalar(2);const h=this.tempMatrix.elements,b=this.useRGBACovariants?4:2;this.splatPositions[4*e+0]=r.x,this.splatPositions[4*e+1]=r.y,this.splatPositions[4*e+2]=r.z,this.splatPositions2[4*e+0]=r.x,this.splatPositions2[4*e+1]=r.y,this.splatPositions2[4*e+2]=r.z,p.min(r),f.max(r);const{x:g,y:d,z:x,w:T}=s,C=g+g,M=d+d,S=x+x,w=g*C,v=g*M,R=g*S,P=d*M,N=d*S,$=x*S,B=T*C,y=T*M,A=T*S,{x:E,y:L,z:k}=o;h[0]=(1-(P+$))*E,h[1]=(v+A)*L,h[2]=(R-y)*k,h[4]=(v-A)*E,h[5]=(1-(w+$))*L,h[6]=(N+B)*k,h[8]=(R+y)*E,h[9]=(N-B)*L,h[10]=(1-(w+P))*k;const V=this.tmpCovariances;V[0]=h[0]*h[0]+h[1]*h[1]+h[2]*h[2],V[1]=h[0]*h[4]+h[1]*h[5]+h[2]*h[6],V[2]=h[0]*h[8]+h[1]*h[9]+h[2]*h[10],V[3]=h[4]*h[4]+h[5]*h[5]+h[6]*h[6],V[4]=h[4]*h[8]+h[5]*h[9]+h[6]*h[10],V[5]=h[8]*h[8]+h[9]*h[9]+h[10]*h[10];let G=-1e4;for(let W=0;W<6;W++)G=Math.max(G,Math.abs(V[W]));this.splatPositions[4*e+3]=G,this.splatPositions2[4*e+3]=G,a[n*4+0]=$t(V[0]/G),a[n*4+1]=$t(V[1]/G),a[n*4+2]=$t(V[2]/G),a[n*4+3]=$t(V[3]/G),l[n*b+0]=$t(V[4]/G),l[n*b+1]=$t(V[5]/G),c[n*4+0]=i[0],c[n*4+1]=i[1],c[n*4+2]=i[2],c[n*4+3]=i[3]}makeSplatFromBuffer(e,n,r,o,s,i,a,l,c){const p=8*e,f=32*e;this.tempPosition.set(r[p],r[p+1],r[p+2]),this.tempScale.set(r[p+3],r[p+4],r[p+5]),this.tempQuaternion.set((o[f+29]-127.5)/127.5,(o[f+30]-127.5)/127.5,(o[f+31]-127.5)/127.5,(o[f+28]-127.5)/127.5).normalize(),this.tempColor[0]=o[f+24],this.tempColor[1]=o[f+25],this.tempColor[2]=o[f+26],this.tempColor[3]=o[f+27],this.makeSplatFromComponents(e,n,this.tempPosition,this.tempScale,this.tempQuaternion,this.tempColor,s,i,a,l,c)}updateTextures(e,n,r,o){const s=this.getTextureSize(this.vertexCount),i=(p,f,h,b)=>{const g=new u.DataTexture(p,f,h,b,u.FloatType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return g.generateMipmaps=!1,g.needsUpdate=!0,g},a=(p,f,h,b)=>{const g=new u.DataTexture(p,f,h,b,u.UnsignedByteType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return g.generateMipmaps=!1,g.needsUpdate=!0,g},l=(p,f,h,b)=>{const g=new u.DataTexture(p,f,h,b,u.UnsignedIntType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return g.generateMipmaps=!1,g.needsUpdate=!0,g},c=(p,f,h,b)=>{const g=new u.DataTexture(p,f,h,b,u.HalfFloatType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return g.generateMipmaps=!1,g.needsUpdate=!0,g};this.covariancesATextureInternal=c(e,s.x,s.y,u.RGBAFormat),this.covariancesBTextureInternal=c(n,s.x,s.y,this.useRGBACovariants?u.RGBAFormat:u.RGFormat),this.centersTextureInternal=i(this.splatPositions,s.x,s.y,u.RGBAFormat),this.colorsTextureInternal=a(r,s.x,s.y,u.RGBAFormat),o&&(this.shTexturesInternal=o.map(p=>{const f=new Uint32Array(p.buffer),h=l(f,s.x,s.y,u.RGBAIntegerFormat);return h.wrapS=u.ClampToEdgeWrapping,h.wrapT=u.ClampToEdgeWrapping,h})),this.instantiateWorker()}updateBoundingInfo(e,n){this.boundingBox=new u.Box3(e,n),this.boundingSphere=this.boundingBox.getBoundingSphere(new u.Sphere)}*updateDataCoroutine(e,n,r){this.covariancesATextureInternal||(this.readyToDisplay=!1);const o=new Uint8Array(e),s=new Float32Array(o.buffer);this.keepInRam&&(this.splatsDataInternal=e),this.shDegreeValue=r?r.length:0;const i=o.length/Wt.ROW_OUTPUT_LENGTH;i!==this.vertexCount&&(this.vertexCount=i,this.geometry=ho.build(this.vertexCount),this.material=fr.build(this.shDegreeValue),this.updateSplatIndexBuffer(this.vertexCount));const a=this.getTextureSize(i),l=a.x*a.y;this.splatPositions=new Float32Array(4*l),this.splatPositions2=new Float32Array(4*i);const c=new Uint16Array(l*4),p=new Uint16Array((this.useRGBACovariants?4:2)*l),f=new Uint8Array(l*4),h=new u.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),b=new u.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let g=0;g<i;g++)this.makeSplatFromBuffer(g,g,s,o,c,p,f,h,b),n&&g%Wt.SPLAT_BATCH_SIZE===0&&(yield);this.updateTextures(c,p,f,r),this.updateBoundingInfo(h,b),this.setEnabled(!0),this.postToWorker(!0)}async updateDataAsync(e,n){return Fr(this.updateDataCoroutine(e,!0,n),zr())}updateData(e,n){na(this.updateDataCoroutine(e,!1,n))}sortDataAsync(e,n=!1){return!this.worker||!e?Promise.resolve():(this.cameraMatrix=e.matrixWorldInverse,this.postToWorker(n)??Promise.resolve())}updateSplatIndexBuffer(e){if(!this.splatIndex||e>this.splatIndex.length){this.splatIndex=new Float32Array(e);for(let n=0;n<e;n++)this.splatIndex[n]=n;this.geometry.attributes.splatIndex.set(this.splatIndex),this.geometry.attributes.splatIndex.needsUpdate=!0}this.geometry.instanceCount=e}instantiateWorker(){this.vertexCount&&(this.updateSplatIndexBuffer(this.vertexCount),this.worker?.terminate(),this.worker=new Je,this.worker.init(this.splatPositions2,this.vertexCount),this.canPostToWorker=!0,this.worker.onmessage=e=>{if(this.splatIndex&&e){for(let n=0;n<this.vertexCount;n++)this.splatIndex[n]=e[n];this.geometry.attributes.splatIndex.set(this.splatIndex)}this.geometry.attributes.splatIndex.needsUpdate=!0,this.canPostToWorker=!0,this.readyToDisplay=!0,this.sortIsDirty&&(this.postToWorker(!0),this.sortIsDirty=!1)})}getTextureSize(e){let o=1;for(;4096*o<e;)o*=2;return o>4096&&(console.error(`GaussianSplatting texture size: (4096, ${o}), maxTextureSize: 4096`),o=4096),new u.Vector2(4096,o)}}class sa extends u.Loader{load(e,n,r,o){const s=new u.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,i=>this.parse(i,n,o),r,o)}parse(e,n,r){const o=new Wt;o.loadDataAsync(e).then(()=>n(o)).catch(s=>{r?r(s):console.error(s)})}}const et=(t,e)=>{const n=(1<<e)-1;return(t&n)/n},mo=(t,e)=>{e.x=et(t>>>21,11),e.y=et(t>>>11,10),e.z=et(t,11)},ia=(t,e)=>{e[0]=et(t>>>24,8)*255,e[1]=et(t>>>16,8)*255,e[2]=et(t>>>8,8)*255,e[3]=et(t,8)*255},aa=(t,e)=>{const n=1/(Math.sqrt(2)*.5),r=(et(t>>>20,10)-.5)*n,o=(et(t>>>10,10)-.5)*n,s=(et(t,10)-.5)*n,i=Math.sqrt(1-(r*r+o*o+s*s));switch(t>>>30){case 0:e.set(i,r,o,s);break;case 1:e.set(r,i,o,s);break;case 2:e.set(r,o,i,s);break;case 3:e.set(r,o,s,i);break}};class ke extends u.Loader{static ROW_OUTPUT_LENGTH=32;static SH_C0=.28209479177387814;static PLY_CONVERSION_BATCH_SIZE=32768;load(e,n,r,o){const s=new u.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,i=>this.parse(i,n,o),r,o)}parse(e,n,r){ke.ConvertPLYToSplatAsync(e).then(o=>{const s=new Wt;return s.loadDataAsync(o).then(()=>n(s))}).catch(o=>{r?r(o):console.error(o)})}static async ConvertPLYToSplatAsync(e){return Fr(ke.ConvertPLYToSplat(e,!0),zr())}static*ConvertPLYToSplat(e,n=!1){const r=ke.ParseHeader(e);if(!r)return e;const o={value:0},s=ke.getCompressedChunks(r,o);for(let i=0;i<r.vertexCount;i++)ke.getSplat(r,i,s,o),n&&i%ke.PLY_CONVERSION_BATCH_SIZE===0&&(yield);return r.buffer}static getCompressedChunks(e,n){if(!e.chunkCount)return null;const{dataView:r,chunkProperties:o,rowChunkLength:s,chunkCount:i}=e,a=[];for(let l=0;l<i;l++){const c={min:new u.Vector3,max:new u.Vector3,minScale:new u.Vector3,maxScale:new u.Vector3};for(const p of o){if(p.type!==0)continue;const f=r.getFloat32(p.offset+n.value,!0);switch(p.value){case 0:c.min.x=f;break;case 1:c.min.y=f;break;case 2:c.min.z=f;break;case 3:c.max.x=f;break;case 4:c.max.y=f;break;case 5:c.max.z=f;break;case 6:c.minScale.x=f;break;case 7:c.minScale.y=f;break;case 8:c.minScale.z=f;break;case 9:c.maxScale.x=f;break;case 10:c.maxScale.y=f;break;case 11:c.maxScale.z=f;break}}a.push(c),n.value+=s}return a}static getSplat(e,n,r,o){const s=new u.Quaternion,i=new u.Vector3,{buffer:a,dataView:l,vertexProperties:c,rowVertexLength:p}=e,f=ke.ROW_OUTPUT_LENGTH,h=new Float32Array(a,n*f,3),b=new Float32Array(a,n*f+12,3),g=new Uint8ClampedArray(a,n*f+24,4),d=new Uint8ClampedArray(a,n*f+28,4),x=n>>8;let T=255,C=0,M=0,S=0;for(const w of c){let v;switch(w.type){case 0:v=l.getFloat32(o.value+w.offset,!0);break;case 1:v=l.getInt32(o.value+w.offset,!0);break;case 2:v=l.getUint32(o.value+w.offset,!0);break;case 3:v=l.getFloat64(o.value+w.offset,!0);break;case 4:v=l.getUint8(o.value+w.offset);break;default:continue}const R=r?.[x];switch(w.value){case 12:mo(v,i),h[0]=u.MathUtils.lerp(R.min.x,R.max.x,i.x),h[1]=-u.MathUtils.lerp(R.min.y,R.max.y,i.y),h[2]=u.MathUtils.lerp(R.min.z,R.max.z,i.z);break;case 13:aa(v,s),T=s.w,C=s.z,M=s.y,S=s.x;break;case 14:mo(v,i),b[0]=Math.exp(u.MathUtils.lerp(R.minScale.x,R.maxScale.x,i.x)),b[1]=Math.exp(u.MathUtils.lerp(R.minScale.y,R.maxScale.y,i.y)),b[2]=Math.exp(u.MathUtils.lerp(R.minScale.z,R.maxScale.z,i.z));break;case 15:ia(v,g);break;case 16:h[0]=v;break;case 17:h[1]=v;break;case 18:h[2]=v;break;case 19:b[0]=Math.exp(v);break;case 20:b[1]=Math.exp(v);break;case 21:b[2]=Math.exp(v);break;case 22:g[0]=v;break;case 23:g[1]=v;break;case 24:g[2]=v;break;case 26:g[0]=(.5+ke.SH_C0*v)*255;break;case 27:g[1]=(.5+ke.SH_C0*v)*255;break;case 28:g[2]=(.5+ke.SH_C0*v)*255;break;case 29:g[3]=(.5+ke.SH_C0*v)*255;break;case 25:g[3]=1/(1+Math.exp(-v))*255;break;case 30:T=v;break;case 31:C=v;break;case 32:M=v;break;case 33:S=v;break}}s.set(C,M,S,T).normalize(),d[0]=s.w*128+128,d[1]=s.x*128+128,d[2]=s.y*128+128,d[3]=s.z*128+128,o.value+=p}static typeNameToEnum(e){switch(e){case"float":return 0;case"int":return 1;case"uint":return 2;case"double":return 3;case"uchar":return 4;default:return 5}}static valueNameToEnum(e){return{min_x:0,min_y:1,min_z:2,max_x:3,max_y:4,max_z:5,min_scale_x:6,min_scale_y:7,min_scale_z:8,max_scale_x:9,max_scale_y:10,max_scale_z:11,packed_position:12,packed_rotation:13,packed_scale:14,packed_color:15,x:16,y:17,z:18,scale_0:19,scale_1:20,scale_2:21,diffuse_red:22,red:22,diffuse_green:23,green:23,diffuse_blue:24,blue:24,f_dc_0:26,f_dc_1:27,f_dc_2:28,f_dc_3:29,opacity:25,rot_0:30,rot_1:31,rot_2:32,rot_3:33}[e]??34}static ParseHeader(e){const n=new Uint8Array(e),r=new TextDecoder().decode(n.slice(0,1024*10)),o=`end_header
264
- `,s=r.indexOf(o);if(s<0)return null;const i=/element vertex (\d+)\n/.exec(r);if(!i)return null;const a=parseInt(i[1]),l=/element chunk (\d+)\n/.exec(r),c=l?parseInt(l[1]):0,p={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let f;(T=>{T[T.Vertex=0]="Vertex",T[T.Chunk=1]="Chunk"})(f||(f={}));let h=1,b=0,g=0;const d=[],x=[];for(const T of r.slice(0,s).split(`
265
- `))if(T.startsWith("property ")){const[,C,M]=T.split(" "),S={value:ke.valueNameToEnum(M),type:ke.typeNameToEnum(C),offset:h===1?g:b};h===1?(x.push(S),g+=p[C]??0):(d.push(S),b+=p[C]??0)}else if(T.startsWith("element ")){const[,C]=T.split(" ");h=C==="chunk"?1:0}return{vertexCount:a,chunkCount:c,rowVertexLength:b,rowChunkLength:g,vertexProperties:d,chunkProperties:x,dataView:new DataView(e,s+o.length),buffer:new ArrayBuffer(ke.ROW_OUTPUT_LENGTH*a)}}}const la=t=>{const{url:e,position:n,transform:r,init:o,onDone:s,customLoaders:i}=t,a=Y.useMemo(()=>({splat:(l,c)=>{new sa().load(l,f=>c(f))},ply:(l,c)=>{new ke().load(l,f=>c(f))}}),[]);return bs({url:e,position:n,transform:r,init:o,onDone:s,loaders:a,customLoaders:i}),null},vt=new u.Raycaster,Le=new u.Vector3,at=new u.Vector3,Se=new u.Quaternion,go={X:new u.Vector3(1,0,0),Y:new u.Vector3(0,1,0),Z:new u.Vector3(0,0,1)},pr={type:"change"},yo={type:"mouseDown",mode:null},bo={type:"mouseUp",mode:null},xo={type:"objectChange"};class ca extends u.Controls{constructor(e,n=null){super(void 0,n);const r=new ma(this);this._root=r;const o=new ga;this._gizmo=o,r.add(o);const s=new ya;this._plane=s,r.add(s);const i=this;function a(M,S){let w=S;Object.defineProperty(i,M,{get:function(){return w!==void 0?w:S},set:function(v){w!==v&&(w=v,s[M]=v,o[M]=v,i.dispatchEvent({type:M+"-changed",value:v}),i.dispatchEvent(pr))}}),i[M]=S,s[M]=S,o[M]=S}a("camera",e),a("object",void 0),a("enabled",!0),a("axis",null),a("mode","translate"),a("translationSnap",null),a("rotationSnap",null),a("scaleSnap",null),a("space","world"),a("size",1),a("dragging",!1),a("showX",!0),a("showY",!0),a("showZ",!0),a("minX",-1/0),a("maxX",1/0),a("minY",-1/0),a("maxY",1/0),a("minZ",-1/0),a("maxZ",1/0);const l=new u.Vector3,c=new u.Vector3,p=new u.Quaternion,f=new u.Quaternion,h=new u.Vector3,b=new u.Quaternion,g=new u.Vector3,d=new u.Vector3,x=new u.Vector3,T=0,C=new u.Vector3;a("worldPosition",l),a("worldPositionStart",c),a("worldQuaternion",p),a("worldQuaternionStart",f),a("cameraPosition",h),a("cameraQuaternion",b),a("pointStart",g),a("pointEnd",d),a("rotationAxis",x),a("rotationAngle",T),a("eye",C),this._offset=new u.Vector3,this._startNorm=new u.Vector3,this._endNorm=new u.Vector3,this._cameraScale=new u.Vector3,this._parentPosition=new u.Vector3,this._parentQuaternion=new u.Quaternion,this._parentQuaternionInv=new u.Quaternion,this._parentScale=new u.Vector3,this._worldScaleStart=new u.Vector3,this._worldQuaternionInv=new u.Quaternion,this._worldScale=new u.Vector3,this._positionStart=new u.Vector3,this._quaternionStart=new u.Quaternion,this._scaleStart=new u.Vector3,this._getPointer=ua.bind(this),this._onPointerDown=fa.bind(this),this._onPointerHover=da.bind(this),this._onPointerMove=pa.bind(this),this._onPointerUp=ha.bind(this),n!==null&&this.connect(n)}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.style.touchAction="auto"}getHelper(){return this._root}pointerHover(e){if(this.object===void 0||this.dragging===!0)return;e!==null&&vt.setFromCamera(e,this.camera);const n=hr(this._gizmo.picker[this.mode],vt);n?this.axis=n.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e!=null&&e.button!==0)&&this.axis!==null){e!==null&&vt.setFromCamera(e,this.camera);const n=hr(this._plane,vt,!0);n&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(n.point).sub(this.worldPositionStart)),this.dragging=!0,yo.mode=this.mode,this.dispatchEvent(yo)}}pointerMove(e){const n=this.axis,r=this.mode,o=this.object;let s=this.space;if(r==="scale"?s="local":(n==="E"||n==="XYZE"||n==="XYZ")&&(s="world"),o===void 0||n===null||this.dragging===!1||e!==null&&e.button!==-1)return;e!==null&&vt.setFromCamera(e,this.camera);const i=hr(this._plane,vt,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),r==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),s==="local"&&n!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),n.indexOf("X")===-1&&(this._offset.x=0),n.indexOf("Y")===-1&&(this._offset.y=0),n.indexOf("Z")===-1&&(this._offset.z=0),s==="local"&&n!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),o.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(s==="local"&&(o.position.applyQuaternion(Se.copy(this._quaternionStart).invert()),n.search("X")!==-1&&(o.position.x=Math.round(o.position.x/this.translationSnap)*this.translationSnap),n.search("Y")!==-1&&(o.position.y=Math.round(o.position.y/this.translationSnap)*this.translationSnap),n.search("Z")!==-1&&(o.position.z=Math.round(o.position.z/this.translationSnap)*this.translationSnap),o.position.applyQuaternion(this._quaternionStart)),s==="world"&&(o.parent&&o.position.add(Le.setFromMatrixPosition(o.parent.matrixWorld)),n.search("X")!==-1&&(o.position.x=Math.round(o.position.x/this.translationSnap)*this.translationSnap),n.search("Y")!==-1&&(o.position.y=Math.round(o.position.y/this.translationSnap)*this.translationSnap),n.search("Z")!==-1&&(o.position.z=Math.round(o.position.z/this.translationSnap)*this.translationSnap),o.parent&&o.position.sub(Le.setFromMatrixPosition(o.parent.matrixWorld)))),o.position.x=Math.max(this.minX,Math.min(this.maxX,o.position.x)),o.position.y=Math.max(this.minY,Math.min(this.maxY,o.position.y)),o.position.z=Math.max(this.minZ,Math.min(this.maxZ,o.position.z));else if(r==="scale"){if(n.search("XYZ")!==-1){let a=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(a*=-1),at.set(a,a,a)}else Le.copy(this.pointStart),at.copy(this.pointEnd),Le.applyQuaternion(this._worldQuaternionInv),at.applyQuaternion(this._worldQuaternionInv),at.divide(Le),n.search("X")===-1&&(at.x=1),n.search("Y")===-1&&(at.y=1),n.search("Z")===-1&&(at.z=1);o.scale.copy(this._scaleStart).multiply(at),this.scaleSnap&&(n.search("X")!==-1&&(o.scale.x=Math.round(o.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),n.search("Y")!==-1&&(o.scale.y=Math.round(o.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),n.search("Z")!==-1&&(o.scale.z=Math.round(o.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(r==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const a=20/this.worldPosition.distanceTo(Le.setFromMatrixPosition(this.camera.matrixWorld));let l=!1;n==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Le.copy(this.rotationAxis).cross(this.eye))*a):(n==="X"||n==="Y"||n==="Z")&&(this.rotationAxis.copy(go[n]),Le.copy(go[n]),s==="local"&&Le.applyQuaternion(this.worldQuaternion),Le.cross(this.eye),Le.length()===0?l=!0:this.rotationAngle=this._offset.dot(Le.normalize())*a),(n==="E"||l)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),s==="local"&&n!=="E"&&n!=="XYZE"?(o.quaternion.copy(this._quaternionStart),o.quaternion.multiply(Se.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),o.quaternion.copy(Se.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),o.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(pr),this.dispatchEvent(xo)}}pointerUp(e){e!==null&&e.button!==0||(this.dragging&&this.axis!==null&&(bo.mode=this.mode,this.dispatchEvent(bo)),this.dragging=!1,this.axis=null)}dispose(){this.disconnect(),this._root.dispose()}attach(e){return this.object=e,this._root.visible=!0,this}detach(){return this.object=void 0,this.axis=null,this._root.visible=!1,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(pr),this.dispatchEvent(xo),this.pointStart.copy(this.pointEnd))}getRaycaster(){return vt}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}setColors(e,n,r,o){const s=this._gizmo.materialLib;s.xAxis.color.set(e),s.yAxis.color.set(n),s.zAxis.color.set(r),s.active.color.set(o),s.xAxisTransparent.color.set(e),s.yAxisTransparent.color.set(n),s.zAxisTransparent.color.set(r),s.activeTransparent.color.set(o),s.xAxis._color&&s.xAxis._color.set(e),s.yAxis._color&&s.yAxis._color.set(n),s.zAxis._color&&s.zAxis._color.set(r),s.active._color&&s.active._color.set(o),s.xAxisTransparent._color&&s.xAxisTransparent._color.set(e),s.yAxisTransparent._color&&s.yAxisTransparent._color.set(n),s.zAxisTransparent._color&&s.zAxisTransparent._color.set(r),s.activeTransparent._color&&s.activeTransparent._color.set(o)}}function ua(t){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:t.button};{const e=this.domElement.getBoundingClientRect();return{x:(t.clientX-e.left)/e.width*2-1,y:-(t.clientY-e.top)/e.height*2+1,button:t.button}}}function da(t){if(this.enabled)switch(t.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(t));break}}function fa(t){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(t.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(t)),this.pointerDown(this._getPointer(t)))}function pa(t){this.enabled&&this.pointerMove(this._getPointer(t))}function ha(t){this.enabled&&(this.domElement.releasePointerCapture(t.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(t)))}function hr(t,e,n){const r=e.intersectObject(t,!0);for(let o=0;o<r.length;o++)if(r[o].object.visible||n)return r[o];return!1}const bn=new u.Euler,xe=new u.Vector3(0,1,0),vo=new u.Vector3(0,0,0),To=new u.Matrix4,xn=new u.Quaternion,Pn=new u.Quaternion,Xe=new u.Vector3,So=new u.Matrix4,nn=new u.Vector3(1,0,0),wt=new u.Vector3(0,1,0),rn=new u.Vector3(0,0,1),vn=new u.Vector3,Zt=new u.Vector3,Jt=new u.Vector3;class ma extends u.Object3D{constructor(e){super(),this.isTransformControlsRoot=!0,this.controls=e,this.visible=!1}updateMatrixWorld(e){const n=this.controls;n.object!==void 0&&(n.object.updateMatrixWorld(),n.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):n.object.parent.matrixWorld.decompose(n._parentPosition,n._parentQuaternion,n._parentScale),n.object.matrixWorld.decompose(n.worldPosition,n.worldQuaternion,n._worldScale),n._parentQuaternionInv.copy(n._parentQuaternion).invert(),n._worldQuaternionInv.copy(n.worldQuaternion).invert()),n.camera.updateMatrixWorld(),n.camera.matrixWorld.decompose(n.cameraPosition,n.cameraQuaternion,n._cameraScale),n.camera.isOrthographicCamera?n.camera.getWorldDirection(n.eye).negate():n.eye.copy(n.cameraPosition).sub(n.worldPosition).normalize(),super.updateMatrixWorld(e)}dispose(){this.traverse(function(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}}class ga extends u.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const e=new u.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),n=new u.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),r=e.clone();r.opacity=.15;const o=n.clone();o.opacity=.5;const s=e.clone();s.color.setHex(16711680);const i=e.clone();i.color.setHex(65280);const a=e.clone();a.color.setHex(255);const l=e.clone();l.color.setHex(16711680),l.opacity=.5;const c=e.clone();c.color.setHex(65280),c.opacity=.5;const p=e.clone();p.color.setHex(255),p.opacity=.5;const f=e.clone();f.opacity=.25;const h=e.clone();h.color.setHex(16776960),h.opacity=.25;const b=e.clone();b.color.setHex(16776960);const g=e.clone();g.color.setHex(7895160),this.materialLib={xAxis:s,yAxis:i,zAxis:a,active:b,xAxisTransparent:l,yAxisTransparent:c,zAxisTransparent:p,activeTransparent:h};const d=new u.CylinderGeometry(0,.04,.1,12);d.translate(0,.05,0);const x=new u.BoxGeometry(.08,.08,.08);x.translate(0,.04,0);const T=new u.BufferGeometry;T.setAttribute("position",new u.Float32BufferAttribute([0,0,0,1,0,0],3));const C=new u.CylinderGeometry(.0075,.0075,.5,3);C.translate(0,.25,0);function M(L,k){const V=new u.TorusGeometry(L,.0075,3,64,k*Math.PI*2);return V.rotateY(Math.PI/2),V.rotateX(Math.PI/2),V}function S(){const L=new u.BufferGeometry;return L.setAttribute("position",new u.Float32BufferAttribute([0,0,0,1,1,1],3)),L}const w={X:[[new u.Mesh(d,s),[.5,0,0],[0,0,-Math.PI/2]],[new u.Mesh(d,s),[-.5,0,0],[0,0,Math.PI/2]],[new u.Mesh(C,s),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new u.Mesh(d,i),[0,.5,0]],[new u.Mesh(d,i),[0,-.5,0],[Math.PI,0,0]],[new u.Mesh(C,i)]],Z:[[new u.Mesh(d,a),[0,0,.5],[Math.PI/2,0,0]],[new u.Mesh(d,a),[0,0,-.5],[-Math.PI/2,0,0]],[new u.Mesh(C,a),null,[Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.OctahedronGeometry(.1,0),f),[0,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),p),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),l),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),c),[.15,0,.15],[-Math.PI/2,0,0]]]},v={X:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[.3,0,0],[0,0,-Math.PI/2]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,.3,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.OctahedronGeometry(.2,0),r)]],XY:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]]},R={START:[[new u.Mesh(new u.OctahedronGeometry(.01,2),o),null,null,null,"helper"]],END:[[new u.Mesh(new u.OctahedronGeometry(.01,2),o),null,null,null,"helper"]],DELTA:[[new u.Line(S(),o),null,null,null,"helper"]],X:[[new u.Line(T,o),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new u.Line(T,o),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new u.Line(T,o),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},P={XYZE:[[new u.Mesh(M(.5,1),g),null,[0,Math.PI/2,0]]],X:[[new u.Mesh(M(.5,.5),s)]],Y:[[new u.Mesh(M(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new u.Mesh(M(.5,.5),a),null,[0,Math.PI/2,0]]],E:[[new u.Mesh(M(.75,1),h),null,[0,Math.PI/2,0]]]},N={AXIS:[[new u.Line(T,o),[-1e3,0,0],null,[1e6,1,1],"helper"]]},$={XYZE:[[new u.Mesh(new u.SphereGeometry(.25,10,8),r)]],X:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),r),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),r),[0,0,0],[Math.PI/2,0,0]]],Z:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),r),[0,0,0],[0,0,-Math.PI/2]]],E:[[new u.Mesh(new u.TorusGeometry(.75,.1,2,24),r)]]},B={X:[[new u.Mesh(x,s),[.5,0,0],[0,0,-Math.PI/2]],[new u.Mesh(C,s),[0,0,0],[0,0,-Math.PI/2]],[new u.Mesh(x,s),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(x,i),[0,.5,0]],[new u.Mesh(C,i)],[new u.Mesh(x,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new u.Mesh(x,a),[0,0,.5],[Math.PI/2,0,0]],[new u.Mesh(C,a),[0,0,0],[Math.PI/2,0,0]],[new u.Mesh(x,a),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),p),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),l),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),c),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.BoxGeometry(.1,.1,.1),f)]]},y={X:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[.3,0,0],[0,0,-Math.PI/2]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,.3,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.2),r),[0,0,0]]]},A={X:[[new u.Line(T,o),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new u.Line(T,o),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new u.Line(T,o),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function E(L){const k=new u.Object3D;for(const V in L)for(let G=L[V].length;G--;){const W=L[V][G][0].clone(),I=L[V][G][1],O=L[V][G][2],U=L[V][G][3],X=L[V][G][4];W.name=V,W.tag=X,I&&W.position.set(I[0],I[1],I[2]),O&&W.rotation.set(O[0],O[1],O[2]),U&&W.scale.set(U[0],U[1],U[2]),W.updateMatrix();const K=W.geometry.clone();K.applyMatrix4(W.matrix),W.geometry=K,W.renderOrder=1/0,W.position.set(0,0,0),W.rotation.set(0,0,0),W.scale.set(1,1,1),k.add(W)}return k}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=E(w)),this.add(this.gizmo.rotate=E(P)),this.add(this.gizmo.scale=E(B)),this.add(this.picker.translate=E(v)),this.add(this.picker.rotate=E($)),this.add(this.picker.scale=E(y)),this.add(this.helper.translate=E(R)),this.add(this.helper.rotate=E(N)),this.add(this.helper.scale=E(A)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(e){const r=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Pn;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let o=[];o=o.concat(this.picker[this.mode].children),o=o.concat(this.gizmo[this.mode].children),o=o.concat(this.helper[this.mode].children);for(let s=0;s<o.length;s++){const i=o[s];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let a;if(this.camera.isOrthographicCamera?a=(this.camera.top-this.camera.bottom)/this.camera.zoom:a=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),i.scale.set(1,1,1).multiplyScalar(a*this.size/4),i.tag==="helper"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(Se.setFromEuler(bn.set(0,0,0)),i.quaternion.copy(r).multiply(Se),Math.abs(xe.copy(nn).applyQuaternion(r).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(Se.setFromEuler(bn.set(0,0,Math.PI/2)),i.quaternion.copy(r).multiply(Se),Math.abs(xe.copy(wt).applyQuaternion(r).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(Se.setFromEuler(bn.set(0,Math.PI/2,0)),i.quaternion.copy(r).multiply(Se),Math.abs(xe.copy(rn).applyQuaternion(r).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(Se.setFromEuler(bn.set(0,Math.PI/2,0)),xe.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(To.lookAt(vo,xe,wt)),i.quaternion.multiply(Se),i.visible=this.dragging),this.axis==="E"&&(i.visible=!1)):i.name==="START"?(i.position.copy(this.worldPositionStart),i.visible=this.dragging):i.name==="END"?(i.position.copy(this.worldPosition),i.visible=this.dragging):i.name==="DELTA"?(i.position.copy(this.worldPositionStart),i.quaternion.copy(this.worldQuaternionStart),Le.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Le.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(Le),i.visible=this.dragging):(i.quaternion.copy(r),this.dragging?i.position.copy(this.worldPositionStart):i.position.copy(this.worldPosition),this.axis&&(i.visible=this.axis.search(i.name)!==-1));continue}i.quaternion.copy(r),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(xe.copy(nn).applyQuaternion(r).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(xe.copy(wt).applyQuaternion(r).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(xe.copy(rn).applyQuaternion(r).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(xe.copy(rn).applyQuaternion(r).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(xe.copy(nn).applyQuaternion(r).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(xe.copy(wt).applyQuaternion(r).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(xn.copy(r),xe.copy(this.eye).applyQuaternion(Se.copy(r).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(To.lookAt(this.eye,vo,wt)),i.name==="X"&&(Se.setFromAxisAngle(nn,Math.atan2(-xe.y,xe.z)),Se.multiplyQuaternions(xn,Se),i.quaternion.copy(Se)),i.name==="Y"&&(Se.setFromAxisAngle(wt,Math.atan2(xe.x,xe.z)),Se.multiplyQuaternions(xn,Se),i.quaternion.copy(Se)),i.name==="Z"&&(Se.setFromAxisAngle(rn,Math.atan2(xe.y,xe.x)),Se.multiplyQuaternions(xn,Se),i.quaternion.copy(Se))),i.visible=i.visible&&(i.name.indexOf("X")===-1||this.showX),i.visible=i.visible&&(i.name.indexOf("Y")===-1||this.showY),i.visible=i.visible&&(i.name.indexOf("Z")===-1||this.showZ),i.visible=i.visible&&(i.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),i.material._color=i.material._color||i.material.color.clone(),i.material._opacity=i.material._opacity||i.material.opacity,i.material.color.copy(i.material._color),i.material.opacity=i.material._opacity,this.enabled&&this.axis&&(i.name===this.axis?(i.material.color.copy(this.materialLib.active.color),i.material.opacity=1):this.axis.split("").some(function(l){return i.name===l})&&(i.material.color.copy(this.materialLib.active.color),i.material.opacity=1))}super.updateMatrixWorld(e)}}class ya extends u.Mesh{constructor(){super(new u.PlaneGeometry(1e5,1e5,2,2),new u.MeshBasicMaterial({visible:!1,wireframe:!0,side:u.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let n=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(n="local"),vn.copy(nn).applyQuaternion(n==="local"?this.worldQuaternion:Pn),Zt.copy(wt).applyQuaternion(n==="local"?this.worldQuaternion:Pn),Jt.copy(rn).applyQuaternion(n==="local"?this.worldQuaternion:Pn),xe.copy(Zt),this.mode){case"translate":case"scale":switch(this.axis){case"X":xe.copy(this.eye).cross(vn),Xe.copy(vn).cross(xe);break;case"Y":xe.copy(this.eye).cross(Zt),Xe.copy(Zt).cross(xe);break;case"Z":xe.copy(this.eye).cross(Jt),Xe.copy(Jt).cross(xe);break;case"XY":Xe.copy(Jt);break;case"YZ":Xe.copy(vn);break;case"XZ":xe.copy(Jt),Xe.copy(Zt);break;case"XYZ":case"E":Xe.set(0,0,0);break}break;case"rotate":default:Xe.set(0,0,0)}Xe.length()===0?this.quaternion.copy(this.cameraQuaternion):(So.lookAt(Le.set(0,0,0),Xe,xe),this.quaternion.setFromRotationMatrix(So)),super.updateMatrixWorld(e)}}const vs=t=>{const{target:e,mode:n,enabled:r,space:o,size:s,onObjectChange:i}=t,{scene:a,camera:l,renderer:c,map:p,sceneRoot:f}=Hn(),h=Y.useRef(null);return Y.useEffect(()=>{if(!a||!l||!c||!p||!f)return;const b=c.getRenderer().domElement,g=new ca(l,b);h.current=g,g.setMode(n||"translate"),g.setSpace(o||"world"),s&&g.setSize(s),f.add(g._root);const d=x=>{x.value?(p.dragPan.disable(),p.scrollZoom.disable()):(p.dragPan.enable(),p.scrollZoom.enable())};if(g.addEventListener("dragging-changed",d),i){const x=()=>{g.object&&i(g.object)};g.addEventListener("objectChange",x)}return()=>{g.removeEventListener("dragging-changed",d),g.detach(),f.remove(g._root),g.dispose(),h.current=null}},[a,l,c,p,f]),Y.useEffect(()=>{h.current&&(e?h.current.attach(e):h.current.detach())},[e]),Y.useEffect(()=>{h.current&&(h.current.mode=n||"translate")},[n]),Y.useEffect(()=>{h.current&&(h.current.enabled=r!==!1)},[r]),Y.useEffect(()=>{h.current&&h.current.setSpace(o||"world")},[o]),Y.useEffect(()=>{!h.current||!s||h.current.setSize(s)},[s]),null};function ba(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tn={exports:{}},Sn={exports:{}},ue={};/** @license React v16.13.1
266
- * react-is.production.min.js
267
- *
268
- * Copyright (c) Facebook, Inc. and its affiliates.
269
- *
270
- * This source code is licensed under the MIT license found in the
271
- * LICENSE file in the root directory of this source tree.
272
- */var wo;function xa(){if(wo)return ue;wo=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,b=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,d=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,T=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function M(w){if(typeof w=="object"&&w!==null){var v=w.$$typeof;switch(v){case e:switch(w=w.type,w){case l:case c:case r:case s:case o:case f:return w;default:switch(w=w&&w.$$typeof,w){case a:case p:case g:case b:case i:return w;default:return v}}case n:return v}}}function S(w){return M(w)===c}return ue.AsyncMode=l,ue.ConcurrentMode=c,ue.ContextConsumer=a,ue.ContextProvider=i,ue.Element=e,ue.ForwardRef=p,ue.Fragment=r,ue.Lazy=g,ue.Memo=b,ue.Portal=n,ue.Profiler=s,ue.StrictMode=o,ue.Suspense=f,ue.isAsyncMode=function(w){return S(w)||M(w)===l},ue.isConcurrentMode=S,ue.isContextConsumer=function(w){return M(w)===a},ue.isContextProvider=function(w){return M(w)===i},ue.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},ue.isForwardRef=function(w){return M(w)===p},ue.isFragment=function(w){return M(w)===r},ue.isLazy=function(w){return M(w)===g},ue.isMemo=function(w){return M(w)===b},ue.isPortal=function(w){return M(w)===n},ue.isProfiler=function(w){return M(w)===s},ue.isStrictMode=function(w){return M(w)===o},ue.isSuspense=function(w){return M(w)===f},ue.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===s||w===o||w===f||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===b||w.$$typeof===i||w.$$typeof===a||w.$$typeof===p||w.$$typeof===x||w.$$typeof===T||w.$$typeof===C||w.$$typeof===d)},ue.typeOf=M,ue}var de={};/** @license React v16.13.1
273
- * react-is.development.js
274
- *
275
- * Copyright (c) Facebook, Inc. and its affiliates.
276
- *
277
- * This source code is licensed under the MIT license found in the
278
- * LICENSE file in the root directory of this source tree.
279
- */var Eo;function va(){return Eo||(Eo=1,process.env.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,b=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,d=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,T=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function M(D){return typeof D=="string"||typeof D=="function"||D===r||D===c||D===s||D===o||D===f||D===h||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===b||D.$$typeof===i||D.$$typeof===a||D.$$typeof===p||D.$$typeof===x||D.$$typeof===T||D.$$typeof===C||D.$$typeof===d)}function S(D){if(typeof D=="object"&&D!==null){var he=D.$$typeof;switch(he){case e:var Oe=D.type;switch(Oe){case l:case c:case r:case s:case o:case f:return Oe;default:var st=Oe&&Oe.$$typeof;switch(st){case a:case p:case g:case b:case i:return st;default:return he}}case n:return he}}}var w=l,v=c,R=a,P=i,N=e,$=p,B=r,y=g,A=b,E=n,L=s,k=o,V=f,G=!1;function W(D){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),I(D)||S(D)===l}function I(D){return S(D)===c}function O(D){return S(D)===a}function U(D){return S(D)===i}function X(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function K(D){return S(D)===p}function re(D){return S(D)===r}function Q(D){return S(D)===g}function Z(D){return S(D)===b}function J(D){return S(D)===n}function oe(D){return S(D)===s}function ee(D){return S(D)===o}function ve(D){return S(D)===f}de.AsyncMode=w,de.ConcurrentMode=v,de.ContextConsumer=R,de.ContextProvider=P,de.Element=N,de.ForwardRef=$,de.Fragment=B,de.Lazy=y,de.Memo=A,de.Portal=E,de.Profiler=L,de.StrictMode=k,de.Suspense=V,de.isAsyncMode=W,de.isConcurrentMode=I,de.isContextConsumer=O,de.isContextProvider=U,de.isElement=X,de.isForwardRef=K,de.isFragment=re,de.isLazy=Q,de.isMemo=Z,de.isPortal=J,de.isProfiler=oe,de.isStrictMode=ee,de.isSuspense=ve,de.isValidElementType=M,de.typeOf=S})()),de}var Co;function Ts(){return Co||(Co=1,process.env.NODE_ENV==="production"?Sn.exports=xa():Sn.exports=va()),Sn.exports}/*
280
- object-assign
281
- (c) Sindre Sorhus
282
- @license MIT
283
- */var mr,_o;function Ta(){if(_o)return mr;_o=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(p){return i[p]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(p){c[p]=p}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return mr=o()?Object.assign:function(s,i){for(var a,l=r(s),c,p=1;p<arguments.length;p++){a=Object(arguments[p]);for(var f in a)e.call(a,f)&&(l[f]=a[f]);if(t){c=t(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},mr}var gr,Mo;function Vr(){if(Mo)return gr;Mo=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gr=t,gr}var yr,Ro;function Ss(){return Ro||(Ro=1,yr=Function.call.bind(Object.prototype.hasOwnProperty)),yr}var br,Ao;function Sa(){if(Ao)return br;Ao=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Vr(),n={},r=Ss();t=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var p in s)if(r(s,p)){var f;try{if(typeof s[p]!="function"){var h=Error((l||"React class")+": "+a+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=s[p](i,p,l,a,null,e)}catch(g){f=g}if(f&&!(f instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+p+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var b=c?c():"";t("Failed "+a+" type: "+f.message+(b??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},br=o,br}var xr,Po;function wa(){if(Po)return xr;Po=1;var t=Ts(),e=Ta(),n=Vr(),r=Ss(),o=Sa(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return xr=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,p="@@iterator";function f(I){var O=I&&(c&&I[c]||I[p]);if(typeof O=="function")return O}var h="<<anonymous>>",b={array:T("array"),bigint:T("bigint"),bool:T("boolean"),func:T("function"),number:T("number"),object:T("object"),string:T("string"),symbol:T("symbol"),any:C(),arrayOf:M,element:S(),elementType:w(),instanceOf:v,node:$(),objectOf:P,oneOf:R,oneOfType:N,shape:y,exact:A};function g(I,O){return I===O?I!==0||1/I===1/O:I!==I&&O!==O}function d(I,O){this.message=I,this.data=O&&typeof O=="object"?O:{},this.stack=""}d.prototype=Error.prototype;function x(I){if(process.env.NODE_ENV!=="production")var O={},U=0;function X(re,Q,Z,J,oe,ee,ve){if(J=J||h,ee=ee||Z,ve!==n){if(l){var D=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 D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var he=J+":"+Z;!O[he]&&U<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+J+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),O[he]=!0,U++)}}return Q[Z]==null?re?Q[Z]===null?new d("The "+oe+" `"+ee+"` is marked as required "+("in `"+J+"`, but its value is `null`.")):new d("The "+oe+" `"+ee+"` is marked as required in "+("`"+J+"`, but its value is `undefined`.")):null:I(Q,Z,J,oe,ee)}var K=X.bind(null,!1);return K.isRequired=X.bind(null,!0),K}function T(I){function O(U,X,K,re,Q,Z){var J=U[X],oe=k(J);if(oe!==I){var ee=V(J);return new d("Invalid "+re+" `"+Q+"` of type "+("`"+ee+"` supplied to `"+K+"`, expected ")+("`"+I+"`."),{expectedType:I})}return null}return x(O)}function C(){return x(i)}function M(I){function O(U,X,K,re,Q){if(typeof I!="function")return new d("Property `"+Q+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var Z=U[X];if(!Array.isArray(Z)){var J=k(Z);return new d("Invalid "+re+" `"+Q+"` of type "+("`"+J+"` supplied to `"+K+"`, expected an array."))}for(var oe=0;oe<Z.length;oe++){var ee=I(Z,oe,K,re,Q+"["+oe+"]",n);if(ee instanceof Error)return ee}return null}return x(O)}function S(){function I(O,U,X,K,re){var Q=O[U];if(!a(Q)){var Z=k(Q);return new d("Invalid "+K+" `"+re+"` of type "+("`"+Z+"` supplied to `"+X+"`, expected a single ReactElement."))}return null}return x(I)}function w(){function I(O,U,X,K,re){var Q=O[U];if(!t.isValidElementType(Q)){var Z=k(Q);return new d("Invalid "+K+" `"+re+"` of type "+("`"+Z+"` supplied to `"+X+"`, expected a single ReactElement type."))}return null}return x(I)}function v(I){function O(U,X,K,re,Q){if(!(U[X]instanceof I)){var Z=I.name||h,J=W(U[X]);return new d("Invalid "+re+" `"+Q+"` of type "+("`"+J+"` supplied to `"+K+"`, expected ")+("instance of `"+Z+"`."))}return null}return x(O)}function R(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function O(U,X,K,re,Q){for(var Z=U[X],J=0;J<I.length;J++)if(g(Z,I[J]))return null;var oe=JSON.stringify(I,function(ve,D){var he=V(D);return he==="symbol"?String(D):D});return new d("Invalid "+re+" `"+Q+"` of value `"+String(Z)+"` "+("supplied to `"+K+"`, expected one of "+oe+"."))}return x(O)}function P(I){function O(U,X,K,re,Q){if(typeof I!="function")return new d("Property `"+Q+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var Z=U[X],J=k(Z);if(J!=="object")return new d("Invalid "+re+" `"+Q+"` of type "+("`"+J+"` supplied to `"+K+"`, expected an object."));for(var oe in Z)if(r(Z,oe)){var ee=I(Z,oe,K,re,Q+"."+oe,n);if(ee instanceof Error)return ee}return null}return x(O)}function N(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var O=0;O<I.length;O++){var U=I[O];if(typeof U!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(U)+" at index "+O+"."),i}function X(K,re,Q,Z,J){for(var oe=[],ee=0;ee<I.length;ee++){var ve=I[ee],D=ve(K,re,Q,Z,J,n);if(D==null)return null;D.data&&r(D.data,"expectedType")&&oe.push(D.data.expectedType)}var he=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new d("Invalid "+Z+" `"+J+"` supplied to "+("`"+Q+"`"+he+"."))}return x(X)}function $(){function I(O,U,X,K,re){return E(O[U])?null:new d("Invalid "+K+" `"+re+"` supplied to "+("`"+X+"`, expected a ReactNode."))}return x(I)}function B(I,O,U,X,K){return new d((I||"React class")+": "+O+" type `"+U+"."+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function y(I){function O(U,X,K,re,Q){var Z=U[X],J=k(Z);if(J!=="object")return new d("Invalid "+re+" `"+Q+"` of type `"+J+"` "+("supplied to `"+K+"`, expected `object`."));for(var oe in I){var ee=I[oe];if(typeof ee!="function")return B(K,re,Q,oe,V(ee));var ve=ee(Z,oe,K,re,Q+"."+oe,n);if(ve)return ve}return null}return x(O)}function A(I){function O(U,X,K,re,Q){var Z=U[X],J=k(Z);if(J!=="object")return new d("Invalid "+re+" `"+Q+"` of type `"+J+"` "+("supplied to `"+K+"`, expected `object`."));var oe=e({},U[X],I);for(var ee in oe){var ve=I[ee];if(r(I,ee)&&typeof ve!="function")return B(K,re,Q,ee,V(ve));if(!ve)return new d("Invalid "+re+" `"+Q+"` key `"+ee+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(U[X],null," ")+`
284
- Valid keys: `+JSON.stringify(Object.keys(I),null," "));var D=ve(Z,ee,K,re,Q+"."+ee,n);if(D)return D}return null}return x(O)}function E(I){switch(typeof I){case"number":case"string":case"undefined":return!0;case"boolean":return!I;case"object":if(Array.isArray(I))return I.every(E);if(I===null||a(I))return!0;var O=f(I);if(O){var U=O.call(I),X;if(O!==I.entries){for(;!(X=U.next()).done;)if(!E(X.value))return!1}else for(;!(X=U.next()).done;){var K=X.value;if(K&&!E(K[1]))return!1}}else return!1;return!0;default:return!1}}function L(I,O){return I==="symbol"?!0:O?O["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&O instanceof Symbol:!1}function k(I){var O=typeof I;return Array.isArray(I)?"array":I instanceof RegExp?"object":L(O,I)?"symbol":O}function V(I){if(typeof I>"u"||I===null)return""+I;var O=k(I);if(O==="object"){if(I instanceof Date)return"date";if(I instanceof RegExp)return"regexp"}return O}function G(I){var O=V(I);switch(O){case"array":case"object":return"an "+O;case"boolean":case"date":case"regexp":return"a "+O;default:return O}}function W(I){return!I.constructor||!I.constructor.name?h:I.constructor.name}return b.checkPropTypes=o,b.resetWarningCache=o.resetWarningCache,b.PropTypes=b,b},xr}var vr,Io;function Ea(){if(Io)return vr;Io=1;var t=Vr();function e(){}function n(){}return n.resetWarningCache=e,vr=function(){function r(i,a,l,c,p,f){if(f!==t){var h=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 h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},vr}var Oo;function Ca(){if(Oo)return Tn.exports;if(Oo=1,process.env.NODE_ENV!=="production"){var t=Ts(),e=!0;Tn.exports=wa()(t.isElement,e)}else Tn.exports=Ea()();return Tn.exports}var _a=Ca();const m=ba(_a);function ws(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=ws(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function we(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=ws(t))&&(r&&(r+=" "),r+=e);return r}function Es(t,e,n=!1){const r={...e};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const s=o;if(s==="components"||s==="slots")r[s]={...t[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const i=t[s],a=e[s];if(!a)r[s]=i||{};else if(!i)r[s]=a;else{r[s]={...a};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const c=l;r[s][c]=Es(i[c],a[c],n)}}}else s==="className"&&n&&e.className?r.className=we(t?.className,e?.className):s==="style"&&n&&e.style?r.style={...t?.style,...e?.style}:r[s]===void 0&&(r[s]=t[s])}return r}function Kt(t,e,n=void 0){const r={};for(const o in t){const s=t[o];let i="",a=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(i+=(a===!0?"":" ")+e(c),a=!1,n&&n[c]&&(i+=" "+n[c]))}r[o]=i}return r}const ko=t=>t,Ma=()=>{let t=ko;return{configure(e){t=e},generate(e){return t(e)},reset(){t=ko}}},Cs=Ma();function cn(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${t}; visit ${n} for the full message.`}function ne(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":cn(7));return t.charAt(0).toUpperCase()+t.slice(1)}function Rr(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${t}; visit ${n} for the full message.`}function jr(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Rr(7));return t.charAt(0).toUpperCase()+t.slice(1)}var wn={exports:{}},me={};/**
285
- * @license React
286
- * react-is.production.js
287
- *
288
- * Copyright (c) Meta Platforms, Inc. and affiliates.
289
- *
290
- * This source code is licensed under the MIT license found in the
291
- * LICENSE file in the root directory of this source tree.
292
- */var Lo;function Ra(){if(Lo)return me;Lo=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function g(d){if(typeof d=="object"&&d!==null){var x=d.$$typeof;switch(x){case t:switch(d=d.type,d){case n:case o:case r:case l:case c:case h:return d;default:switch(d=d&&d.$$typeof,d){case i:case a:case f:case p:return d;case s:return d;default:return x}}case e:return x}}}return me.ContextConsumer=s,me.ContextProvider=i,me.Element=t,me.ForwardRef=a,me.Fragment=n,me.Lazy=f,me.Memo=p,me.Portal=e,me.Profiler=o,me.StrictMode=r,me.Suspense=l,me.SuspenseList=c,me.isContextConsumer=function(d){return g(d)===s},me.isContextProvider=function(d){return g(d)===i},me.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},me.isForwardRef=function(d){return g(d)===a},me.isFragment=function(d){return g(d)===n},me.isLazy=function(d){return g(d)===f},me.isMemo=function(d){return g(d)===p},me.isPortal=function(d){return g(d)===e},me.isProfiler=function(d){return g(d)===o},me.isStrictMode=function(d){return g(d)===r},me.isSuspense=function(d){return g(d)===l},me.isSuspenseList=function(d){return g(d)===c},me.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===n||d===o||d===r||d===l||d===c||typeof d=="object"&&d!==null&&(d.$$typeof===f||d.$$typeof===p||d.$$typeof===i||d.$$typeof===s||d.$$typeof===a||d.$$typeof===b||d.getModuleId!==void 0)},me.typeOf=g,me}var ge={};/**
293
- * @license React
294
- * react-is.development.js
295
- *
296
- * Copyright (c) Meta Platforms, Inc. and affiliates.
297
- *
298
- * This source code is licensed under the MIT license found in the
299
- * LICENSE file in the root directory of this source tree.
300
- */var No;function Aa(){return No||(No=1,process.env.NODE_ENV!=="production"&&(function(){function t(d){if(typeof d=="object"&&d!==null){var x=d.$$typeof;switch(x){case e:switch(d=d.type,d){case r:case s:case o:case c:case p:case b:return d;default:switch(d=d&&d.$$typeof,d){case a:case l:case h:case f:return d;case i:return d;default:return x}}case n:return x}}}var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");ge.ContextConsumer=i,ge.ContextProvider=a,ge.Element=e,ge.ForwardRef=l,ge.Fragment=r,ge.Lazy=h,ge.Memo=f,ge.Portal=n,ge.Profiler=s,ge.StrictMode=o,ge.Suspense=c,ge.SuspenseList=p,ge.isContextConsumer=function(d){return t(d)===i},ge.isContextProvider=function(d){return t(d)===a},ge.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},ge.isForwardRef=function(d){return t(d)===l},ge.isFragment=function(d){return t(d)===r},ge.isLazy=function(d){return t(d)===h},ge.isMemo=function(d){return t(d)===f},ge.isPortal=function(d){return t(d)===n},ge.isProfiler=function(d){return t(d)===s},ge.isStrictMode=function(d){return t(d)===o},ge.isSuspense=function(d){return t(d)===c},ge.isSuspenseList=function(d){return t(d)===p},ge.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===s||d===o||d===c||d===p||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===f||d.$$typeof===a||d.$$typeof===i||d.$$typeof===l||d.$$typeof===g||d.getModuleId!==void 0)},ge.typeOf=t})()),ge}var Do;function Pa(){return Do||(Do=1,process.env.NODE_ENV==="production"?wn.exports=Ra():wn.exports=Aa()),wn.exports}var Nn=Pa();function ut(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function _s(t){if(z.isValidElement(t)||Nn.isValidElementType(t)||!ut(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=_s(t[n])}),e}function Mt(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return ut(t)&&ut(e)&&Object.keys(e).forEach(o=>{z.isValidElement(e[o])||Nn.isValidElementType(e[o])?r[o]=e[o]:ut(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&ut(t[o])?r[o]=Mt(t[o],e[o],n):n.clone?r[o]=ut(e[o])?_s(e[o]):e[o]:r[o]=e[o]}),r}function an(t,e){return e?Mt(t,e,{clone:!1}):t}const mt=process.env.NODE_ENV!=="production"?m.oneOfType([m.number,m.string,m.object,m.array]):{};function $o(t,e){if(!t.containerQueries)return e;const n=Object.keys(e).filter(r=>r.startsWith("@container")).sort((r,o)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(o.match(s)?.[1]||0)});return n.length?n.reduce((r,o)=>{const s=e[o];return delete r[o],r[o]=s,r},{...e}):e}function Ia(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function Oa(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
301
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(s)}function ka(t){const e=(s,i)=>s.replace("@media",i?`@container ${i}`:"@container");function n(s,i){s.up=(...a)=>e(t.breakpoints.up(...a),i),s.down=(...a)=>e(t.breakpoints.down(...a),i),s.between=(...a)=>e(t.breakpoints.between(...a),i),s.only=(...a)=>e(t.breakpoints.only(...a),i),s.not=(...a)=>{const l=e(t.breakpoints.not(...a),i);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=s=>(n(r,s),r);return n(o),{...t,containerQueries:o}}const Un={xs:0,sm:600,md:900,lg:1200,xl:1536},Bo={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${Un[t]}px)`},La={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:Un[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function ot(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const s=r.breakpoints||Bo;return e.reduce((i,a,l)=>(i[s.up(s.keys[l])]=n(e[l]),i),{})}if(typeof e=="object"){const s=r.breakpoints||Bo;return Object.keys(e).reduce((i,a)=>{if(Ia(s.keys,a)){const l=Oa(r.containerQueries?r:La,a);l&&(i[l]=n(e[a],a))}else if(Object.keys(s.values||Un).includes(a)){const l=s.up(a);i[l]=n(e[a],a)}else{const l=a;i[l]=e[l]}return i},{})}return n(e)}function Na(t={}){return t.keys?.reduce((n,r)=>{const o=t.up(r);return n[o]={},n},{})||{}}function zo(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function Gn(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function Dn(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=Gn(t,n)||r,e&&(o=e(o,r,t)),o}function _e(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,s=i=>{if(i[e]==null)return null;const a=i[e],l=i.theme,c=Gn(l,r)||{};return ot(i,a,f=>{let h=Dn(c,o,f);return f===h&&typeof f=="string"&&(h=Dn(c,o,`${e}${f==="default"?"":jr(f)}`,f)),n===!1?h:{[n]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[e]:mt}:{},s.filterProps=[e],s}function Da(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const $a={m:"margin",p:"padding"},Ba={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Fo={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},za=Da(t=>{if(t.length>2)if(Fo[t])t=Fo[t];else return[t];const[e,n]=t.split(""),r=$a[e],o=Ba[n]||"";return Array.isArray(o)?o.map(s=>r+s):[r+o]}),Wn=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Yn=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Fa=[...Wn,...Yn];function dn(t,e,n,r){const o=Gn(t,e,!0)??n;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),typeof o=="string"?o.startsWith("var(")&&s===0?0:o.startsWith("var(")&&s===1?o:`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const i=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>o.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${i} > ${o.length-1}, you need to add the missing values.`].join(`
302
- `)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
303
- `)));const a=o[i];return s>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
304
- `)),()=>{})}function Hr(t){return dn(t,"spacing",8,"spacing")}function fn(t,e){return typeof e=="string"||e==null?e:t(e)}function Va(t,e){return n=>t.reduce((r,o)=>(r[o]=fn(e,n),r),{})}function ja(t,e,n,r){if(!e.includes(n))return null;const o=za(n),s=Va(o,r),i=t[n];return ot(t,i,s)}function Ms(t,e){const n=Hr(t.theme);return Object.keys(t).map(r=>ja(t,e,r,n)).reduce(an,{})}function Ee(t){return Ms(t,Wn)}Ee.propTypes=process.env.NODE_ENV!=="production"?Wn.reduce((t,e)=>(t[e]=mt,t),{}):{};Ee.filterProps=Wn;function Ce(t){return Ms(t,Yn)}Ce.propTypes=process.env.NODE_ENV!=="production"?Yn.reduce((t,e)=>(t[e]=mt,t),{}):{};Ce.filterProps=Yn;process.env.NODE_ENV!=="production"&&Fa.reduce((t,e)=>(t[e]=mt,t),{});function Xn(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>Object.keys(r).reduce((o,s)=>e[s]?an(o,e[s](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?t.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Ve(t){return typeof t!="number"?t:`${t}px solid`}function He(t,e){return _e({prop:t,themeKey:"borders",transform:e})}const Ha=He("border",Ve),Ua=He("borderTop",Ve),Ga=He("borderRight",Ve),Wa=He("borderBottom",Ve),Ya=He("borderLeft",Ve),Xa=He("borderColor"),Ka=He("borderTopColor"),qa=He("borderRightColor"),Qa=He("borderBottomColor"),Za=He("borderLeftColor"),Ja=He("outline",Ve),el=He("outlineColor"),Kn=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=dn(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:fn(e,r)});return ot(t,t.borderRadius,n)}return null};Kn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:mt}:{};Kn.filterProps=["borderRadius"];Xn(Ha,Ua,Ga,Wa,Ya,Xa,Ka,qa,Qa,Za,Kn,Ja,el);const qn=t=>{if(t.gap!==void 0&&t.gap!==null){const e=dn(t.theme,"spacing",8,"gap"),n=r=>({gap:fn(e,r)});return ot(t,t.gap,n)}return null};qn.propTypes=process.env.NODE_ENV!=="production"?{gap:mt}:{};qn.filterProps=["gap"];const Qn=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=dn(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:fn(e,r)});return ot(t,t.columnGap,n)}return null};Qn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:mt}:{};Qn.filterProps=["columnGap"];const Zn=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=dn(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:fn(e,r)});return ot(t,t.rowGap,n)}return null};Zn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:mt}:{};Zn.filterProps=["rowGap"];const tl=_e({prop:"gridColumn"}),nl=_e({prop:"gridRow"}),rl=_e({prop:"gridAutoFlow"}),ol=_e({prop:"gridAutoColumns"}),sl=_e({prop:"gridAutoRows"}),il=_e({prop:"gridTemplateColumns"}),al=_e({prop:"gridTemplateRows"}),ll=_e({prop:"gridTemplateAreas"}),cl=_e({prop:"gridArea"});Xn(qn,Qn,Zn,tl,nl,rl,ol,sl,il,al,ll,cl);function Yt(t,e){return e==="grey"?e:t}const ul=_e({prop:"color",themeKey:"palette",transform:Yt}),dl=_e({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yt}),fl=_e({prop:"backgroundColor",themeKey:"palette",transform:Yt});Xn(ul,dl,fl);function De(t){return t<=1&&t!==0?`${t*100}%`:t}const pl=_e({prop:"width",transform:De}),Ur=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{const r=t.theme?.breakpoints?.values?.[n]||Un[n];return r?t.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${t.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:De(n)}};return ot(t,t.maxWidth,e)}return null};Ur.filterProps=["maxWidth"];const hl=_e({prop:"minWidth",transform:De}),ml=_e({prop:"height",transform:De}),gl=_e({prop:"maxHeight",transform:De}),yl=_e({prop:"minHeight",transform:De});_e({prop:"size",cssProperty:"width",transform:De});_e({prop:"size",cssProperty:"height",transform:De});const bl=_e({prop:"boxSizing"});Xn(pl,Ur,hl,ml,gl,yl,bl);const pn={border:{themeKey:"borders",transform:Ve},borderTop:{themeKey:"borders",transform:Ve},borderRight:{themeKey:"borders",transform:Ve},borderBottom:{themeKey:"borders",transform:Ve},borderLeft:{themeKey:"borders",transform:Ve},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ve},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Kn},color:{themeKey:"palette",transform:Yt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yt},backgroundColor:{themeKey:"palette",transform:Yt},p:{style:Ce},pt:{style:Ce},pr:{style:Ce},pb:{style:Ce},pl:{style:Ce},px:{style:Ce},py:{style:Ce},padding:{style:Ce},paddingTop:{style:Ce},paddingRight:{style:Ce},paddingBottom:{style:Ce},paddingLeft:{style:Ce},paddingX:{style:Ce},paddingY:{style:Ce},paddingInline:{style:Ce},paddingInlineStart:{style:Ce},paddingInlineEnd:{style:Ce},paddingBlock:{style:Ce},paddingBlockStart:{style:Ce},paddingBlockEnd:{style:Ce},m:{style:Ee},mt:{style:Ee},mr:{style:Ee},mb:{style:Ee},ml:{style:Ee},mx:{style:Ee},my:{style:Ee},margin:{style:Ee},marginTop:{style:Ee},marginRight:{style:Ee},marginBottom:{style:Ee},marginLeft:{style:Ee},marginX:{style:Ee},marginY:{style:Ee},marginInline:{style:Ee},marginInlineStart:{style:Ee},marginInlineEnd:{style:Ee},marginBlock:{style:Ee},marginBlockStart:{style:Ee},marginBlockEnd:{style:Ee},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:qn},rowGap:{style:Zn},columnGap:{style:Qn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:De},maxWidth:{style:Ur},minWidth:{transform:De},height:{transform:De},maxHeight:{transform:De},minHeight:{transform:De},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function xl(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function vl(t,e){return typeof t=="function"?t(e):t}function Tl(){function t(n,r,o,s){const i={[n]:r,theme:o},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:p,style:f}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Gn(o,c)||{};return f?f(i):ot(i,r,g=>{let d=Dn(h,p,g);return g===d&&typeof g=="string"&&(d=Dn(h,p,`${n}${g==="default"?"":jr(g)}`,g)),l===!1?d:{[l]:d}})}function e(n){const{sx:r,theme:o={},nested:s}=n||{};if(!r)return null;const i=o.unstable_sxConfig??pn;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const p=Na(o.breakpoints),f=Object.keys(p);let h=p;return Object.keys(c).forEach(b=>{const g=vl(c[b],o);if(g!=null)if(typeof g=="object")if(i[b])h=an(h,t(b,g,o,i));else{const d=ot({theme:o},g,x=>({[b]:x}));xl(d,g)?h[b]=e({sx:g,theme:o,nested:!0}):h=an(h,d)}else h=an(h,t(b,g,o,i))}),!s&&o.modularCssLayers?{"@layer sx":$o(o,zo(f,h))}:$o(o,zo(f,h))}return Array.isArray(r)?r.map(a):a(r)}return e}const Xt=Tl();Xt.filterProps=["sx"];const Sl=t=>{const e={systemProps:{},otherProps:{}},n=t?.theme?.unstable_sxConfig??pn;return Object.keys(t).forEach(r=>{n[r]?e.systemProps[r]=t[r]:e.otherProps[r]=t[r]}),e};function wl(t){const{sx:e,...n}=t,{systemProps:r,otherProps:o}=Sl(n);let s;return Array.isArray(e)?s=[r,...e]:typeof e=="function"?s=(...i)=>{const a=e(...i);return ut(a)?{...r,...a}:r}:s={...r,...e},{...o,sx:s}}var En={exports:{}},ye={};/**
305
- * @license React
306
- * react-is.production.js
307
- *
308
- * Copyright (c) Meta Platforms, Inc. and affiliates.
309
- *
310
- * This source code is licensed under the MIT license found in the
311
- * LICENSE file in the root directory of this source tree.
312
- */var Vo;function El(){if(Vo)return ye;Vo=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function g(d){if(typeof d=="object"&&d!==null){var x=d.$$typeof;switch(x){case t:switch(d=d.type,d){case n:case o:case r:case l:case c:case h:return d;default:switch(d=d&&d.$$typeof,d){case i:case a:case f:case p:return d;case s:return d;default:return x}}case e:return x}}}return ye.ContextConsumer=s,ye.ContextProvider=i,ye.Element=t,ye.ForwardRef=a,ye.Fragment=n,ye.Lazy=f,ye.Memo=p,ye.Portal=e,ye.Profiler=o,ye.StrictMode=r,ye.Suspense=l,ye.SuspenseList=c,ye.isContextConsumer=function(d){return g(d)===s},ye.isContextProvider=function(d){return g(d)===i},ye.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},ye.isForwardRef=function(d){return g(d)===a},ye.isFragment=function(d){return g(d)===n},ye.isLazy=function(d){return g(d)===f},ye.isMemo=function(d){return g(d)===p},ye.isPortal=function(d){return g(d)===e},ye.isProfiler=function(d){return g(d)===o},ye.isStrictMode=function(d){return g(d)===r},ye.isSuspense=function(d){return g(d)===l},ye.isSuspenseList=function(d){return g(d)===c},ye.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===n||d===o||d===r||d===l||d===c||typeof d=="object"&&d!==null&&(d.$$typeof===f||d.$$typeof===p||d.$$typeof===i||d.$$typeof===s||d.$$typeof===a||d.$$typeof===b||d.getModuleId!==void 0)},ye.typeOf=g,ye}var be={};/**
313
- * @license React
314
- * react-is.development.js
315
- *
316
- * Copyright (c) Meta Platforms, Inc. and affiliates.
317
- *
318
- * This source code is licensed under the MIT license found in the
319
- * LICENSE file in the root directory of this source tree.
320
- */var jo;function Cl(){return jo||(jo=1,process.env.NODE_ENV!=="production"&&(function(){function t(d){if(typeof d=="object"&&d!==null){var x=d.$$typeof;switch(x){case e:switch(d=d.type,d){case r:case s:case o:case c:case p:case b:return d;default:switch(d=d&&d.$$typeof,d){case a:case l:case h:case f:return d;case i:return d;default:return x}}case n:return x}}}var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");be.ContextConsumer=i,be.ContextProvider=a,be.Element=e,be.ForwardRef=l,be.Fragment=r,be.Lazy=h,be.Memo=f,be.Portal=n,be.Profiler=s,be.StrictMode=o,be.Suspense=c,be.SuspenseList=p,be.isContextConsumer=function(d){return t(d)===i},be.isContextProvider=function(d){return t(d)===a},be.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},be.isForwardRef=function(d){return t(d)===l},be.isFragment=function(d){return t(d)===r},be.isLazy=function(d){return t(d)===h},be.isMemo=function(d){return t(d)===f},be.isPortal=function(d){return t(d)===n},be.isProfiler=function(d){return t(d)===s},be.isStrictMode=function(d){return t(d)===o},be.isSuspense=function(d){return t(d)===c},be.isSuspenseList=function(d){return t(d)===p},be.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===s||d===o||d===c||d===p||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===f||d.$$typeof===a||d.$$typeof===i||d.$$typeof===l||d.$$typeof===g||d.getModuleId!==void 0)},be.typeOf=t})()),be}var Ho;function _l(){return Ho||(Ho=1,process.env.NODE_ENV==="production"?En.exports=El():En.exports=Cl()),En.exports}var Rs=_l();function dt(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function As(t){if(z.isValidElement(t)||Rs.isValidElementType(t)||!dt(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=As(t[n])}),e}function Rt(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return dt(t)&&dt(e)&&Object.keys(e).forEach(o=>{z.isValidElement(e[o])||Rs.isValidElementType(e[o])?r[o]=e[o]:dt(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&dt(t[o])?r[o]=Rt(t[o],e[o],n):n.clone?r[o]=dt(e[o])?As(e[o]):e[o]:r[o]=e[o]}),r}function Ml(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function Gr(t,e=0,n=1){return process.env.NODE_ENV!=="production"&&(t<e||t>n)&&console.error(`MUI: The value provided ${t} is out of range [${e}, ${n}].`),Ml(t,e,n)}function Rl(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&t.length!==t.trim().length&&console.error(`MUI: The color: "${t}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function pt(t){if(t.type)return t;if(t.charAt(0)==="#")return pt(Rl(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
321
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Rr(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
322
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Rr(10,o))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:o}}const Al=t=>{const e=pt(t);return e.values.slice(0,3).map((n,r)=>e.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},on=(t,e)=>{try{return Al(t)}catch{return e&&process.env.NODE_ENV!=="production"&&console.warn(e),t}};function Jn(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.includes("rgb")?r=r.map((o,s)=>s<3?parseInt(o,10):o):e.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function Ps(t){t=pt(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,s=r*Math.min(o,1-o),i=(c,p=(c+n/30)%12)=>o-s*Math.max(Math.min(p-3,9-p,1),-1);let a="rgb";const l=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Jn({type:a,values:l})}function Ar(t){t=pt(t);let e=t.type==="hsl"||t.type==="hsla"?pt(Ps(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Uo(t,e){const n=Ar(t),r=Ar(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Is(t,e){return t=pt(t),e=Gr(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Jn(t)}function Tt(t,e,n){try{return Is(t,e)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),t}}function er(t,e){if(t=pt(t),e=Gr(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Jn(t)}function fe(t,e,n){try{return er(t,e)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),t}}function tr(t,e){if(t=pt(t),e=Gr(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Jn(t)}function pe(t,e,n){try{return tr(t,e)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),t}}function Pl(t,e=.15){return Ar(t)>.5?er(t,e):tr(t,e)}function Cn(t,e,n){try{return Pl(t,e)}catch{return t}}const un={black:"#000",white:"#fff"},Il={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Bt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},zt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},en={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Ft={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Vt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},jt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Os(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:un.white,default:un.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const ks=Os();function Ls(){return{text:{primary:un.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:un.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Pr=Ls();function Go(t,e,n,r){const o=r.light||r,s=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=tr(t.main,o):e==="dark"&&(t.dark=er(t.main,s)))}function Wo(t,e,n,r,o){const s=o.light||o,i=o.dark||o*1.5;e[n]||(e.hasOwnProperty(r)?e[n]=e[r]:n==="light"?e.light=`color-mix(in ${t}, ${e.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(e.dark=`color-mix(in ${t}, ${e.main}, #000 ${(i*100).toFixed(0)}%)`))}function Ol(t="light"){return t==="dark"?{main:Ft[200],light:Ft[50],dark:Ft[400]}:{main:Ft[700],light:Ft[400],dark:Ft[800]}}function kl(t="light"){return t==="dark"?{main:Bt[200],light:Bt[50],dark:Bt[400]}:{main:Bt[500],light:Bt[300],dark:Bt[700]}}function Ll(t="light"){return t==="dark"?{main:zt[500],light:zt[300],dark:zt[700]}:{main:zt[700],light:zt[400],dark:zt[800]}}function Nl(t="light"){return t==="dark"?{main:Vt[400],light:Vt[300],dark:Vt[700]}:{main:Vt[700],light:Vt[500],dark:Vt[900]}}function Dl(t="light"){return t==="dark"?{main:jt[400],light:jt[300],dark:jt[700]}:{main:jt[800],light:jt[500],dark:jt[900]}}function $l(t="light"){return t==="dark"?{main:en[400],light:en[300],dark:en[700]}:{main:"#ed6c02",light:en[500],dark:en[900]}}function Bl(t){return`oklch(from ${t} var(--__l) 0 h / var(--__a))`}function Wr(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...s}=t,i=t.primary||Ol(e),a=t.secondary||kl(e),l=t.error||Ll(e),c=t.info||Nl(e),p=t.success||Dl(e),f=t.warning||$l(e);function h(x){if(o)return Bl(x);const T=Uo(x,Pr.text.primary)>=n?Pr.text.primary:ks.text.primary;if(process.env.NODE_ENV!=="production"){const C=Uo(x,T);C<3&&console.error([`MUI: The contrast ratio of ${C}:1 for ${T} on ${x}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
323
- `))}return T}const b=({color:x,name:T,mainShade:C=500,lightShade:M=300,darkShade:S=700})=>{if(x={...x},!x.main&&x[C]&&(x.main=x[C]),!x.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${T?` (${T})`:""} provided to augmentColor(color) is invalid.
324
- The color object needs to have a \`main\` property or a \`${C}\` property.`:cn(11,T?` (${T})`:"",C));if(typeof x.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${T?` (${T})`:""} provided to augmentColor(color) is invalid.
325
- \`color.main\` should be a string, but \`${JSON.stringify(x.main)}\` was provided instead.
326
-
263
+ `,vt=e=>u.DataUtils.toHalfFloat(e),yt=class{static build(e=1){let t=new u.BufferGeometry;t.setIndex([0,1,2]);let n=new u.BufferAttribute(new Float32Array([-3,-2,0,3,-2,0,0,4,0]),3);t.setAttribute(`position`,n);let r=new u.InstancedBufferGeometry;r.setIndex(t.getIndex()),r.setAttribute(`position`,t.getAttribute(`position`));let i=new u.InstancedBufferAttribute(new Float32Array(e),1,!1);return i.setUsage(u.DynamicDrawUsage),r.setAttribute(`splatIndex`,i),r.instanceCount=0,r}},bt=class e{static BATCH_SIZE=327680;static workCount=0;vertexCount=0;positions=null;hasInit=!1;splatIndex=null;depthValues=null;tempDepths=null;tempIndices=null;abortController=null;onmessage=null;terminate(){this.abortController?.abort(),this.abortController=null,this.vertexCount=0,this.positions=null,this.splatIndex=null,this.onmessage=null}initSortData(){if(this.hasInit||this.vertexCount<0)return;let e=this.vertexCount;this.depthValues=new Int32Array(e),this.splatIndex=new Uint32Array(e),this.tempDepths=new Int32Array(e),this.tempIndices=new Uint32Array(e),this.hasInit=!0}*sortData(t,n){this.hasInit||this.initSortData();let{positions:r,vertexCount:i,depthValues:a,splatIndex:o,tempDepths:s,tempIndices:c}=this;if(!r||!a||!o||!s||!c)return;let l=-1/0,u=1/0;for(let e=0;e<i;e++){o[e]=e;let n=t[2]*r[4*e]+t[6]*r[4*e+1]+t[10]*r[4*e+2],i=Math.floor(n*4096);a[e]=i,l=Math.max(l,i),u=Math.min(u,i)}n&&(e.workCount+=i,e.workCount>e.BATCH_SIZE&&(e.workCount=0,yield));let d=-u;for(let e=0;e<i;e++)a[e]+=d;let f=new Uint32Array(256);for(let t=0;t<32;t+=8){f.fill(0);for(let e=0;e<i;e++)f[a[e]>>t&255]++;let r=0;for(let e=0;e<f.length;e++){let t=f[e];f[e]=r,r+=t}for(let e=0;e<i;e++){let n=a[e]>>t&255,r=f[n]++;s[r]=a[e],c[r]=o[e]}a.set(s),o.set(c),n&&(e.workCount+=i,e.workCount>e.BATCH_SIZE&&(e.workCount=0,yield))}}init(e,t){this.positions=e,this.vertexCount=t,this.initSortData()}async sortDataAsync(e){this.abortController?.abort(),this.abortController=new AbortController;let t=this.abortController.signal;try{await ht(this.sortData(e,!0),ft(),t),this.onmessage&&this.splatIndex&&this.onmessage(this.splatIndex)}catch(e){e instanceof Error&&e.name!==`AbortError`&&console.error(`Splat sort error:`,e)}finally{this.abortController=null}}},xt=class{static build(e=0){return new u.ShaderMaterial({uniforms:{invViewport:{value:new u.Vector2},dataTextureSize:{value:new u.Vector2},focal:{value:new u.Vector2},covariancesATexture:{value:null},covariancesBTexture:{value:null},centersTexture:{value:null},colorsTexture:{value:null},shTexture0:{value:null},shTexture1:{value:null},shTexture2:{value:null}},defines:{SH_DEGREE:e},vertexShader:gt,fragmentShader:_t,transparent:!0,alphaTest:1,blending:u.NormalBlending,depthTest:!0,depthWrite:!0,side:u.DoubleSide})}static updateUniforms(e,t,n){let r=n.material;if(!r?.uniforms)return;let{uniforms:i}=r,a=e.getSize(new u.Vector2);if(i.invViewport.value.set(1/a.x,1/a.y),t){let e=t._cleanProjectionMatrix,n=e?.elements??e??t.projectionMatrix.elements;i.focal.value.set(n[0]*.5*a.x,n[5]*.5*a.y)}if(n.covariancesATexture){let{width:e,height:t}=n.covariancesATexture.image;i.dataTextureSize.value.set(e,t),i.covariancesATexture.value=n.covariancesATexture,i.covariancesBTexture.value=n.covariancesBTexture,i.centersTexture.value=n.centersTexture,i.colorsTexture.value=n.colorsTexture,n.shTextures?.forEach((e,t)=>{i[`shTexture${t}`].value=e})}r.uniformsNeedUpdate=!0}},St=class e extends u.Mesh{static ROW_OUTPUT_LENGTH=32;static SPLAT_BATCH_SIZE=327680;vertexCount=0;worker=null;frameIdLastUpdate=-1;frameIdThisUpdate=0;cameraMatrix=null;internalModelViewMatrix=null;canPostToWorker=!1;covariancesATextureInternal=null;covariancesBTextureInternal=null;centersTextureInternal=null;colorsTextureInternal=null;splatPositions=null;splatPositions2=null;splatIndex=null;shTexturesInternal=null;splatsDataInternal=null;keepInRam=!1;oldDirection=new u.Vector3;useRGBACovariants=!0;tmpCovariances=[0,0,0,0,0,0];sortIsDirty=!1;lastSortTime=0;sortThrottleMs=200;shDegreeValue=0;tempQuaternion=new u.Quaternion;tempPosition=new u.Vector3;tempScale=new u.Vector3;tempColor=new Uint8Array(4);tempMatrix=new u.Matrix4;isGaussianSplattingMesh=!0;readyToDisplay=!1;type=`GaussianSplattingMesh`;get shDegree(){return this.shDegreeValue}get splatsData(){return this.splatsDataInternal}get covariancesATexture(){return this.covariancesATextureInternal}get covariancesBTexture(){return this.covariancesBTextureInternal}get centersTexture(){return this.centersTextureInternal}get colorsTexture(){return this.colorsTextureInternal}get shTextures(){return this.shTexturesInternal}constructor(){super(),this.geometry=yt.build(),this.material=xt.build(),this.setEnabled(!1)}setEnabled(e){this.visible=e}postToWorker(e=!1){let t=this.frameIdThisUpdate;if((e||t!==this.frameIdLastUpdate)&&this.worker&&this.cameraMatrix&&this.canPostToWorker){this.internalModelViewMatrix=new u.Matrix4().multiplyMatrices(this.cameraMatrix,this.matrixWorld);let n=this.cameraMatrix.clone().invert(),r=new u.Matrix4().multiplyMatrices(n,this.matrixWorld),i=new u.Vector3(0,0,1).transformDirection(r),a=i.dot(this.oldDirection);if(e||Math.abs(a-1)>=.01)return this.oldDirection.copy(i),this.frameIdLastUpdate=t,this.canPostToWorker=!1,this.worker.sortDataAsync(this.internalModelViewMatrix.elements)}}onBeforeRender(e,t,n,r,i,a){this.frameIdThisUpdate=e.info.render.frame;let o=performance.now();o-this.lastSortTime>this.sortThrottleMs&&(this.lastSortTime=o,this.sortDataAsync(n).catch(e=>{e.name!==`AbortError`&&console.warn(`Splat sorting error:`,e)})),xt.updateUniforms(e,n,this),super.onBeforeRender(e,t,n,r,i,a)}loadDataAsync(e){return this.updateDataAsync(e)}dispose(){this.covariancesATextureInternal?.dispose(),this.covariancesBTextureInternal?.dispose(),this.centersTextureInternal?.dispose(),this.colorsTextureInternal?.dispose(),this.shTexturesInternal?.forEach(e=>e.dispose()),this.covariancesATextureInternal=null,this.covariancesBTextureInternal=null,this.centersTextureInternal=null,this.colorsTextureInternal=null,this.shTexturesInternal=null,this.worker?.terminate(),this.worker=null}copyTextures(e){this.covariancesATextureInternal=e.covariancesATexture?.clone()??null,this.covariancesBTextureInternal=e.covariancesBTexture?.clone()??null,this.centersTextureInternal=e.centersTexture?.clone()??null,this.colorsTextureInternal=e.colorsTexture?.clone()??null,e.shTexturesInternal&&(this.shTexturesInternal=e.shTexturesInternal.map(e=>e.clone()))}clone(){let t=new e;return t.geometry=this.geometry.clone(),t.material=this.material.clone(),t.vertexCount=this.vertexCount,t.copyTextures(this),t.splatPositions=this.splatPositions,t.readyToDisplay=!1,t.instantiateWorker(),t}makeSplatFromComponents(e,t,n,r,i,a,o,s,c,l,u){i.w=-i.w,r=r.multiplyScalar(2);let d=this.tempMatrix.elements,f=this.useRGBACovariants?4:2;this.splatPositions[4*e+0]=n.x,this.splatPositions[4*e+1]=n.y,this.splatPositions[4*e+2]=n.z,this.splatPositions2[4*e+0]=n.x,this.splatPositions2[4*e+1]=n.y,this.splatPositions2[4*e+2]=n.z,l.min(n),u.max(n);let{x:p,y:m,z:h,w:g}=i,_=p+p,v=m+m,y=h+h,b=p*_,x=p*v,S=p*y,C=m*v,ee=m*y,w=h*y,T=g*_,te=g*v,E=g*y,{x:D,y:O,z:ne}=r;d[0]=(1-(C+w))*D,d[1]=(x+E)*O,d[2]=(S-te)*ne,d[4]=(x-E)*D,d[5]=(1-(b+w))*O,d[6]=(ee+T)*ne,d[8]=(S+te)*D,d[9]=(ee-T)*O,d[10]=(1-(b+C))*ne;let k=this.tmpCovariances;k[0]=d[0]*d[0]+d[1]*d[1]+d[2]*d[2],k[1]=d[0]*d[4]+d[1]*d[5]+d[2]*d[6],k[2]=d[0]*d[8]+d[1]*d[9]+d[2]*d[10],k[3]=d[4]*d[4]+d[5]*d[5]+d[6]*d[6],k[4]=d[4]*d[8]+d[5]*d[9]+d[6]*d[10],k[5]=d[8]*d[8]+d[9]*d[9]+d[10]*d[10];let A=-1e4;for(let e=0;e<6;e++)A=Math.max(A,Math.abs(k[e]));this.splatPositions[4*e+3]=A,this.splatPositions2[4*e+3]=A,o[t*4+0]=vt(k[0]/A),o[t*4+1]=vt(k[1]/A),o[t*4+2]=vt(k[2]/A),o[t*4+3]=vt(k[3]/A),s[t*f+0]=vt(k[4]/A),s[t*f+1]=vt(k[5]/A),c[t*4+0]=a[0],c[t*4+1]=a[1],c[t*4+2]=a[2],c[t*4+3]=a[3]}makeSplatFromBuffer(e,t,n,r,i,a,o,s,c){let l=8*e,u=32*e;this.tempPosition.set(n[l],n[l+1],n[l+2]),this.tempScale.set(n[l+3],n[l+4],n[l+5]),this.tempQuaternion.set((r[u+29]-127.5)/127.5,(r[u+30]-127.5)/127.5,(r[u+31]-127.5)/127.5,(r[u+28]-127.5)/127.5).normalize(),this.tempColor[0]=r[u+24],this.tempColor[1]=r[u+25],this.tempColor[2]=r[u+26],this.tempColor[3]=r[u+27],this.makeSplatFromComponents(e,t,this.tempPosition,this.tempScale,this.tempQuaternion,this.tempColor,i,a,o,s,c)}updateTextures(e,t,n,r){let i=this.getTextureSize(this.vertexCount),a=(e,t,n,r)=>{let i=new u.DataTexture(e,t,n,r,u.FloatType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return i.generateMipmaps=!1,i.needsUpdate=!0,i},o=(e,t,n,r)=>{let i=new u.DataTexture(e,t,n,r,u.UnsignedByteType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return i.generateMipmaps=!1,i.needsUpdate=!0,i},s=(e,t,n,r)=>{let i=new u.DataTexture(e,t,n,r,u.UnsignedIntType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return i.generateMipmaps=!1,i.needsUpdate=!0,i},c=(e,t,n,r)=>{let i=new u.DataTexture(e,t,n,r,u.HalfFloatType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return i.generateMipmaps=!1,i.needsUpdate=!0,i};this.covariancesATextureInternal=c(e,i.x,i.y,u.RGBAFormat),this.covariancesBTextureInternal=c(t,i.x,i.y,this.useRGBACovariants?u.RGBAFormat:u.RGFormat),this.centersTextureInternal=a(this.splatPositions,i.x,i.y,u.RGBAFormat),this.colorsTextureInternal=o(n,i.x,i.y,u.RGBAFormat),r&&(this.shTexturesInternal=r.map(e=>{let t=s(new Uint32Array(e.buffer),i.x,i.y,u.RGBAIntegerFormat);return t.wrapS=u.ClampToEdgeWrapping,t.wrapT=u.ClampToEdgeWrapping,t})),this.instantiateWorker()}updateBoundingInfo(e,t){this.boundingBox=new u.Box3(e,t),this.boundingSphere=this.boundingBox.getBoundingSphere(new u.Sphere)}*updateDataCoroutine(t,n,r){this.covariancesATextureInternal||(this.readyToDisplay=!1);let i=new Uint8Array(t),a=new Float32Array(i.buffer);this.keepInRam&&(this.splatsDataInternal=t),this.shDegreeValue=r?r.length:0;let o=i.length/e.ROW_OUTPUT_LENGTH;o!==this.vertexCount&&(this.vertexCount=o,this.geometry=yt.build(this.vertexCount),this.material=xt.build(this.shDegreeValue),this.updateSplatIndexBuffer(this.vertexCount));let s=this.getTextureSize(o),c=s.x*s.y;this.splatPositions=new Float32Array(4*c),this.splatPositions2=new Float32Array(4*o);let l=new Uint16Array(c*4),d=new Uint16Array((this.useRGBACovariants?4:2)*c),f=new Uint8Array(c*4),p=new u.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),m=new u.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let t=0;t<o;t++)this.makeSplatFromBuffer(t,t,a,i,l,d,f,p,m),n&&t%e.SPLAT_BATCH_SIZE===0&&(yield);this.updateTextures(l,d,f,r),this.updateBoundingInfo(p,m),this.setEnabled(!0),this.postToWorker(!0)}async updateDataAsync(e,t){return ht(this.updateDataCoroutine(e,!0,t),ft())}updateData(e,t){mt(this.updateDataCoroutine(e,!1,t))}sortDataAsync(e,t=!1){return!this.worker||!e?Promise.resolve():(this.cameraMatrix=e.matrixWorldInverse,this.postToWorker(t)??Promise.resolve())}updateSplatIndexBuffer(e){if(!this.splatIndex||e>this.splatIndex.length){this.splatIndex=new Float32Array(e);for(let t=0;t<e;t++)this.splatIndex[t]=t;this.geometry.attributes.splatIndex.set(this.splatIndex),this.geometry.attributes.splatIndex.needsUpdate=!0}this.geometry.instanceCount=e}instantiateWorker(){this.vertexCount&&(this.updateSplatIndexBuffer(this.vertexCount),this.worker?.terminate(),this.worker=new bt,this.worker.init(this.splatPositions2,this.vertexCount),this.canPostToWorker=!0,this.worker.onmessage=e=>{if(this.splatIndex&&e){for(let t=0;t<this.vertexCount;t++)this.splatIndex[t]=e[t];this.geometry.attributes.splatIndex.set(this.splatIndex)}this.geometry.attributes.splatIndex.needsUpdate=!0,this.canPostToWorker=!0,this.readyToDisplay=!0,this.sortIsDirty&&=(this.postToWorker(!0),!1)})}getTextureSize(e){let t=4096,n=1;for(;t*n<e;)n*=2;return n>t&&(console.error(`GaussianSplatting texture size: (${t}, ${n}), maxTextureSize: ${t}`),n=t),new u.Vector2(t,n)}},Ct=class extends u.Loader{load(e,t,n,r){let i=new u.FileLoader(this.manager);i.setPath(this.path),i.setResponseType(`arraybuffer`),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>this.parse(e,t,r),n,r)}parse(e,t,n){let r=new St;r.loadDataAsync(e).then(()=>t(r)).catch(e=>{n?n(e):console.error(e)})}},wt=(e,t)=>{let n=(1<<t)-1;return(e&n)/n},Tt=(e,t)=>{t.x=wt(e>>>21,11),t.y=wt(e>>>11,10),t.z=wt(e,11)},Et=(e,t)=>{t[0]=wt(e>>>24,8)*255,t[1]=wt(e>>>16,8)*255,t[2]=wt(e>>>8,8)*255,t[3]=wt(e,8)*255},Dt=(e,t)=>{let n=1/(Math.sqrt(2)*.5),r=(wt(e>>>20,10)-.5)*n,i=(wt(e>>>10,10)-.5)*n,a=(wt(e,10)-.5)*n,o=Math.sqrt(1-(r*r+i*i+a*a));switch(e>>>30){case 0:t.set(o,r,i,a);break;case 1:t.set(r,o,i,a);break;case 2:t.set(r,i,o,a);break;case 3:t.set(r,i,a,o);break}},Ot=function(e){return e[e.FLOAT=0]=`FLOAT`,e[e.INT=1]=`INT`,e[e.UINT=2]=`UINT`,e[e.DOUBLE=3]=`DOUBLE`,e[e.UCHAR=4]=`UCHAR`,e[e.UNDEFINED=5]=`UNDEFINED`,e}(Ot||{}),B=function(e){return e[e.MIN_X=0]=`MIN_X`,e[e.MIN_Y=1]=`MIN_Y`,e[e.MIN_Z=2]=`MIN_Z`,e[e.MAX_X=3]=`MAX_X`,e[e.MAX_Y=4]=`MAX_Y`,e[e.MAX_Z=5]=`MAX_Z`,e[e.MIN_SCALE_X=6]=`MIN_SCALE_X`,e[e.MIN_SCALE_Y=7]=`MIN_SCALE_Y`,e[e.MIN_SCALE_Z=8]=`MIN_SCALE_Z`,e[e.MAX_SCALE_X=9]=`MAX_SCALE_X`,e[e.MAX_SCALE_Y=10]=`MAX_SCALE_Y`,e[e.MAX_SCALE_Z=11]=`MAX_SCALE_Z`,e[e.PACKED_POSITION=12]=`PACKED_POSITION`,e[e.PACKED_ROTATION=13]=`PACKED_ROTATION`,e[e.PACKED_SCALE=14]=`PACKED_SCALE`,e[e.PACKED_COLOR=15]=`PACKED_COLOR`,e[e.X=16]=`X`,e[e.Y=17]=`Y`,e[e.Z=18]=`Z`,e[e.SCALE_0=19]=`SCALE_0`,e[e.SCALE_1=20]=`SCALE_1`,e[e.SCALE_2=21]=`SCALE_2`,e[e.DIFFUSE_RED=22]=`DIFFUSE_RED`,e[e.DIFFUSE_GREEN=23]=`DIFFUSE_GREEN`,e[e.DIFFUSE_BLUE=24]=`DIFFUSE_BLUE`,e[e.OPACITY=25]=`OPACITY`,e[e.F_DC_0=26]=`F_DC_0`,e[e.F_DC_1=27]=`F_DC_1`,e[e.F_DC_2=28]=`F_DC_2`,e[e.F_DC_3=29]=`F_DC_3`,e[e.ROT_0=30]=`ROT_0`,e[e.ROT_1=31]=`ROT_1`,e[e.ROT_2=32]=`ROT_2`,e[e.ROT_3=33]=`ROT_3`,e[e.UNDEFINED=34]=`UNDEFINED`,e}(B||{}),kt=class e extends u.Loader{static ROW_OUTPUT_LENGTH=32;static SH_C0=.28209479177387814;static PLY_CONVERSION_BATCH_SIZE=32768;load(e,t,n,r){let i=new u.FileLoader(this.manager);i.setPath(this.path),i.setResponseType(`arraybuffer`),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>this.parse(e,t,r),n,r)}parse(t,n,r){e.ConvertPLYToSplatAsync(t).then(e=>{let t=new St;return t.loadDataAsync(e).then(()=>n(t))}).catch(e=>{r?r(e):console.error(e)})}static async ConvertPLYToSplatAsync(t){return ht(e.ConvertPLYToSplat(t,!0),ft())}static*ConvertPLYToSplat(t,n=!1){let r=e.ParseHeader(t);if(!r)return t;let i={value:0},a=e.getCompressedChunks(r,i);for(let t=0;t<r.vertexCount;t++)e.getSplat(r,t,a,i),n&&t%e.PLY_CONVERSION_BATCH_SIZE===0&&(yield);return r.buffer}static getCompressedChunks(e,t){if(!e.chunkCount)return null;let{dataView:n,chunkProperties:r,rowChunkLength:i,chunkCount:a}=e,o=[];for(let e=0;e<a;e++){let e={min:new u.Vector3,max:new u.Vector3,minScale:new u.Vector3,maxScale:new u.Vector3};for(let i of r){if(i.type!==Ot.FLOAT)continue;let r=n.getFloat32(i.offset+t.value,!0);switch(i.value){case B.MIN_X:e.min.x=r;break;case B.MIN_Y:e.min.y=r;break;case B.MIN_Z:e.min.z=r;break;case B.MAX_X:e.max.x=r;break;case B.MAX_Y:e.max.y=r;break;case B.MAX_Z:e.max.z=r;break;case B.MIN_SCALE_X:e.minScale.x=r;break;case B.MIN_SCALE_Y:e.minScale.y=r;break;case B.MIN_SCALE_Z:e.minScale.z=r;break;case B.MAX_SCALE_X:e.maxScale.x=r;break;case B.MAX_SCALE_Y:e.maxScale.y=r;break;case B.MAX_SCALE_Z:e.maxScale.z=r;break}}o.push(e),t.value+=i}return o}static getSplat(t,n,r,i){let a=new u.Quaternion,o=new u.Vector3,{buffer:s,dataView:c,vertexProperties:l,rowVertexLength:d}=t,f=e.ROW_OUTPUT_LENGTH,p=new Float32Array(s,n*f,3),m=new Float32Array(s,n*f+12,3),h=new Uint8ClampedArray(s,n*f+24,4),g=new Uint8ClampedArray(s,n*f+28,4),_=n>>8,v=255,y=0,b=0,x=0;for(let t of l){let n;switch(t.type){case Ot.FLOAT:n=c.getFloat32(i.value+t.offset,!0);break;case Ot.INT:n=c.getInt32(i.value+t.offset,!0);break;case Ot.UINT:n=c.getUint32(i.value+t.offset,!0);break;case Ot.DOUBLE:n=c.getFloat64(i.value+t.offset,!0);break;case Ot.UCHAR:n=c.getUint8(i.value+t.offset);break;default:continue}let s=r?.[_];switch(t.value){case B.PACKED_POSITION:Tt(n,o),p[0]=u.MathUtils.lerp(s.min.x,s.max.x,o.x),p[1]=-u.MathUtils.lerp(s.min.y,s.max.y,o.y),p[2]=u.MathUtils.lerp(s.min.z,s.max.z,o.z);break;case B.PACKED_ROTATION:Dt(n,a),v=a.w,y=a.z,b=a.y,x=a.x;break;case B.PACKED_SCALE:Tt(n,o),m[0]=Math.exp(u.MathUtils.lerp(s.minScale.x,s.maxScale.x,o.x)),m[1]=Math.exp(u.MathUtils.lerp(s.minScale.y,s.maxScale.y,o.y)),m[2]=Math.exp(u.MathUtils.lerp(s.minScale.z,s.maxScale.z,o.z));break;case B.PACKED_COLOR:Et(n,h);break;case B.X:p[0]=n;break;case B.Y:p[1]=n;break;case B.Z:p[2]=n;break;case B.SCALE_0:m[0]=Math.exp(n);break;case B.SCALE_1:m[1]=Math.exp(n);break;case B.SCALE_2:m[2]=Math.exp(n);break;case B.DIFFUSE_RED:h[0]=n;break;case B.DIFFUSE_GREEN:h[1]=n;break;case B.DIFFUSE_BLUE:h[2]=n;break;case B.F_DC_0:h[0]=(.5+e.SH_C0*n)*255;break;case B.F_DC_1:h[1]=(.5+e.SH_C0*n)*255;break;case B.F_DC_2:h[2]=(.5+e.SH_C0*n)*255;break;case B.F_DC_3:h[3]=(.5+e.SH_C0*n)*255;break;case B.OPACITY:h[3]=1/(1+Math.exp(-n))*255;break;case B.ROT_0:v=n;break;case B.ROT_1:y=n;break;case B.ROT_2:b=n;break;case B.ROT_3:x=n;break}}a.set(y,b,x,v).normalize(),g[0]=a.w*128+128,g[1]=a.x*128+128,g[2]=a.y*128+128,g[3]=a.z*128+128,i.value+=d}static typeNameToEnum(e){switch(e){case`float`:return Ot.FLOAT;case`int`:return Ot.INT;case`uint`:return Ot.UINT;case`double`:return Ot.DOUBLE;case`uchar`:return Ot.UCHAR;default:return Ot.UNDEFINED}}static valueNameToEnum(e){return{min_x:B.MIN_X,min_y:B.MIN_Y,min_z:B.MIN_Z,max_x:B.MAX_X,max_y:B.MAX_Y,max_z:B.MAX_Z,min_scale_x:B.MIN_SCALE_X,min_scale_y:B.MIN_SCALE_Y,min_scale_z:B.MIN_SCALE_Z,max_scale_x:B.MAX_SCALE_X,max_scale_y:B.MAX_SCALE_Y,max_scale_z:B.MAX_SCALE_Z,packed_position:B.PACKED_POSITION,packed_rotation:B.PACKED_ROTATION,packed_scale:B.PACKED_SCALE,packed_color:B.PACKED_COLOR,x:B.X,y:B.Y,z:B.Z,scale_0:B.SCALE_0,scale_1:B.SCALE_1,scale_2:B.SCALE_2,diffuse_red:B.DIFFUSE_RED,red:B.DIFFUSE_RED,diffuse_green:B.DIFFUSE_GREEN,green:B.DIFFUSE_GREEN,diffuse_blue:B.DIFFUSE_BLUE,blue:B.DIFFUSE_BLUE,f_dc_0:B.F_DC_0,f_dc_1:B.F_DC_1,f_dc_2:B.F_DC_2,f_dc_3:B.F_DC_3,opacity:B.OPACITY,rot_0:B.ROT_0,rot_1:B.ROT_1,rot_2:B.ROT_2,rot_3:B.ROT_3}[e]??B.UNDEFINED}static ParseHeader(t){let n=new Uint8Array(t),r=new TextDecoder().decode(n.slice(0,1024*10)),i=r.indexOf(`end_header
264
+ `);if(i<0)return null;let a=/element vertex (\d+)\n/.exec(r);if(!a)return null;let o=parseInt(a[1]),s=/element chunk (\d+)\n/.exec(r),c=s?parseInt(s[1]):0,l={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0},u=function(e){return e[e.Vertex=0]=`Vertex`,e[e.Chunk=1]=`Chunk`,e}({}),d=u.Chunk,f=0,p=0,m=[],h=[];for(let t of r.slice(0,i).split(`
265
+ `))if(t.startsWith(`property `)){let[,n,r]=t.split(` `),i={value:e.valueNameToEnum(r),type:e.typeNameToEnum(n),offset:d===u.Chunk?p:f};d===u.Chunk?(h.push(i),p+=l[n]??0):(m.push(i),f+=l[n]??0)}else if(t.startsWith(`element `)){let[,e]=t.split(` `);d=e===`chunk`?u.Chunk:u.Vertex}return{vertexCount:o,chunkCount:c,rowVertexLength:f,rowChunkLength:p,vertexProperties:m,chunkProperties:h,dataView:new DataView(t,i+11),buffer:new ArrayBuffer(e.ROW_OUTPUT_LENGTH*o)}}},At=e=>{let{url:t,position:n,transform:r,init:i,onDone:a,customLoaders:o}=e;return lt({url:t,position:n,transform:r,init:i,onDone:a,loaders:(0,d.useMemo)(()=>({splat:(e,t)=>{new Ct().load(e,e=>t(e))},ply:(e,t)=>{new kt().load(e,e=>t(e))}}),[]),customLoaders:o}),null},jt=new u.Raycaster,Mt=new u.Vector3,Nt=new u.Vector3,V=new u.Quaternion,Pt={X:new u.Vector3(1,0,0),Y:new u.Vector3(0,1,0),Z:new u.Vector3(0,0,1)},Ft={type:`change`},It={type:`mouseDown`,mode:null},Lt={type:`mouseUp`,mode:null},Rt={type:`objectChange`},zt=class extends u.Controls{constructor(e,t=null){super(void 0,t);let n=new on(this);this._root=n;let r=new sn;this._gizmo=r,n.add(r);let i=new cn;this._plane=i,n.add(i);let a=this;function o(e,t){let n=t;Object.defineProperty(a,e,{get:function(){return n===void 0?t:n},set:function(t){n!==t&&(n=t,i[e]=t,r[e]=t,a.dispatchEvent({type:e+`-changed`,value:t}),a.dispatchEvent(Ft))}}),a[e]=t,i[e]=t,r[e]=t}o(`camera`,e),o(`object`,void 0),o(`enabled`,!0),o(`axis`,null),o(`mode`,`translate`),o(`translationSnap`,null),o(`rotationSnap`,null),o(`scaleSnap`,null),o(`space`,`world`),o(`size`,1),o(`dragging`,!1),o(`showX`,!0),o(`showY`,!0),o(`showZ`,!0),o(`showXY`,!0),o(`showYZ`,!0),o(`showXZ`,!0),o(`minX`,-1/0),o(`maxX`,1/0),o(`minY`,-1/0),o(`maxY`,1/0),o(`minZ`,-1/0),o(`maxZ`,1/0);let s=new u.Vector3,c=new u.Vector3,l=new u.Quaternion,d=new u.Quaternion,f=new u.Vector3,p=new u.Quaternion,m=new u.Vector3,h=new u.Vector3,g=new u.Vector3,_=new u.Vector3;o(`worldPosition`,s),o(`worldPositionStart`,c),o(`worldQuaternion`,l),o(`worldQuaternionStart`,d),o(`cameraPosition`,f),o(`cameraQuaternion`,p),o(`pointStart`,m),o(`pointEnd`,h),o(`rotationAxis`,g),o(`rotationAngle`,0),o(`eye`,_),this._offset=new u.Vector3,this._startNorm=new u.Vector3,this._endNorm=new u.Vector3,this._cameraScale=new u.Vector3,this._parentPosition=new u.Vector3,this._parentQuaternion=new u.Quaternion,this._parentQuaternionInv=new u.Quaternion,this._parentScale=new u.Vector3,this._worldScaleStart=new u.Vector3,this._worldQuaternionInv=new u.Quaternion,this._worldScale=new u.Vector3,this._positionStart=new u.Vector3,this._quaternionStart=new u.Quaternion,this._scaleStart=new u.Vector3,this._getPointer=Bt.bind(this),this._onPointerDown=Ht.bind(this),this._onPointerHover=Vt.bind(this),this._onPointerMove=Ut.bind(this),this._onPointerUp=Wt.bind(this),t!==null&&this.connect(t)}connect(e){super.connect(e),this.domElement.addEventListener(`pointerdown`,this._onPointerDown),this.domElement.addEventListener(`pointermove`,this._onPointerHover),this.domElement.addEventListener(`pointerup`,this._onPointerUp),this.domElement.style.touchAction=`none`}disconnect(){this.domElement.removeEventListener(`pointerdown`,this._onPointerDown),this.domElement.removeEventListener(`pointermove`,this._onPointerHover),this.domElement.removeEventListener(`pointermove`,this._onPointerMove),this.domElement.removeEventListener(`pointerup`,this._onPointerUp),this.domElement.style.touchAction=``}getHelper(){return this._root}pointerHover(e){if(this.object===void 0||this.dragging===!0)return;e!==null&&jt.setFromCamera(e,this.camera);let t=Gt(this._gizmo.picker[this.mode],jt);t?this.axis=t.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e!=null&&e.button!==0)&&this.axis!==null){e!==null&&jt.setFromCamera(e,this.camera);let t=Gt(this._plane,jt,!0);t&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)),this.dragging=!0,It.mode=this.mode,this.dispatchEvent(It)}}pointerMove(e){let t=this.axis,n=this.mode,r=this.object,i=this.space;if(n===`scale`?i=`local`:(t===`E`||t===`XYZE`||t===`XYZ`)&&(i=`world`),r===void 0||t===null||this.dragging===!1||e!==null&&e.button!==-1)return;e!==null&&jt.setFromCamera(e,this.camera);let a=Gt(this._plane,jt,!0);if(a){if(this.pointEnd.copy(a.point).sub(this.worldPositionStart),n===`translate`)this._offset.copy(this.pointEnd).sub(this.pointStart),i===`local`&&t!==`XYZ`&&this._offset.applyQuaternion(this._worldQuaternionInv),t.indexOf(`X`)===-1&&(this._offset.x=0),t.indexOf(`Y`)===-1&&(this._offset.y=0),t.indexOf(`Z`)===-1&&(this._offset.z=0),i===`local`&&t!==`XYZ`?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),r.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(i===`local`&&(r.position.applyQuaternion(V.copy(this._quaternionStart).invert()),t.search(`X`)!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),t.search(`Y`)!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),t.search(`Z`)!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this._quaternionStart)),i===`world`&&(r.parent&&r.position.add(Mt.setFromMatrixPosition(r.parent.matrixWorld)),t.search(`X`)!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),t.search(`Y`)!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),t.search(`Z`)!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(Mt.setFromMatrixPosition(r.parent.matrixWorld)))),r.position.x=Math.max(this.minX,Math.min(this.maxX,r.position.x)),r.position.y=Math.max(this.minY,Math.min(this.maxY,r.position.y)),r.position.z=Math.max(this.minZ,Math.min(this.maxZ,r.position.z));else if(n===`scale`){if(t.search(`XYZ`)!==-1){let e=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(e*=-1),Nt.set(e,e,e)}else Mt.copy(this.pointStart),Nt.copy(this.pointEnd),Mt.applyQuaternion(this._worldQuaternionInv),Nt.applyQuaternion(this._worldQuaternionInv),Nt.divide(Mt),t.search(`X`)===-1&&(Nt.x=1),t.search(`Y`)===-1&&(Nt.y=1),t.search(`Z`)===-1&&(Nt.z=1);r.scale.copy(this._scaleStart).multiply(Nt),this.scaleSnap&&(t.search(`X`)!==-1&&(r.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search(`Y`)!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),t.search(`Z`)!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(n===`rotate`){this._offset.copy(this.pointEnd).sub(this.pointStart);let e=20/this.worldPosition.distanceTo(Mt.setFromMatrixPosition(this.camera.matrixWorld)),n=!1;t===`XYZE`?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(Mt.copy(this.rotationAxis).cross(this.eye))*e):(t===`X`||t===`Y`||t===`Z`)&&(this.rotationAxis.copy(Pt[t]),Mt.copy(Pt[t]),i===`local`&&Mt.applyQuaternion(this.worldQuaternion),Mt.cross(this.eye),Mt.length()===0?n=!0:this.rotationAngle=this._offset.dot(Mt.normalize())*e),(t===`E`||n)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),i===`local`&&t!==`E`&&t!==`XYZE`?(r.quaternion.copy(this._quaternionStart),r.quaternion.multiply(V.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),r.quaternion.copy(V.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(Ft),this.dispatchEvent(Rt)}}pointerUp(e){e!==null&&e.button!==0||(this.dragging&&this.axis!==null&&(Lt.mode=this.mode,this.dispatchEvent(Lt)),this.dragging=!1,this.axis=null)}dispose(){this.disconnect(),this._root.dispose()}attach(e){return this.object=e,this._root.visible=!0,this}detach(){return this.object=void 0,this.axis=null,this._root.visible=!1,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(Ft),this.dispatchEvent(Rt),this.pointStart.copy(this.pointEnd))}getRaycaster(){return jt}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}setColors(e,t,n,r){let i=this._gizmo.materialLib;i.xAxis.color.set(e),i.yAxis.color.set(t),i.zAxis.color.set(n),i.active.color.set(r),i.xAxisTransparent.color.set(e),i.yAxisTransparent.color.set(t),i.zAxisTransparent.color.set(n),i.activeTransparent.color.set(r),i.xAxis._color&&i.xAxis._color.set(e),i.yAxis._color&&i.yAxis._color.set(t),i.zAxis._color&&i.zAxis._color.set(n),i.active._color&&i.active._color.set(r),i.xAxisTransparent._color&&i.xAxisTransparent._color.set(e),i.yAxisTransparent._color&&i.yAxisTransparent._color.set(t),i.zAxisTransparent._color&&i.zAxisTransparent._color.set(n),i.activeTransparent._color&&i.activeTransparent._color.set(r)}};function Bt(e){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:e.button};{let t=this.domElement.getBoundingClientRect();return{x:(e.clientX-t.left)/t.width*2-1,y:-(e.clientY-t.top)/t.height*2+1,button:e.button}}}function Vt(e){if(this.enabled)switch(e.pointerType){case`mouse`:case`pen`:this.pointerHover(this._getPointer(e));break}}function Ht(e){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(e.pointerId),this.domElement.addEventListener(`pointermove`,this._onPointerMove),this.pointerHover(this._getPointer(e)),this.pointerDown(this._getPointer(e)))}function Ut(e){this.enabled&&this.pointerMove(this._getPointer(e))}function Wt(e){this.enabled&&(this.domElement.releasePointerCapture(e.pointerId),this.domElement.removeEventListener(`pointermove`,this._onPointerMove),this.pointerUp(this._getPointer(e)))}function Gt(e,t,n){let r=t.intersectObject(e,!0);for(let e=0;e<r.length;e++)if(r[e].object.visible||n)return r[e];return!1}var Kt=new u.Euler,H=new u.Vector3(0,1,0),qt=new u.Vector3(0,0,0),Jt=new u.Matrix4,Yt=new u.Quaternion,Xt=new u.Quaternion,Zt=new u.Vector3,Qt=new u.Matrix4,$t=new u.Vector3(1,0,0),en=new u.Vector3(0,1,0),tn=new u.Vector3(0,0,1),nn=new u.Vector3,rn=new u.Vector3,an=new u.Vector3,on=class extends u.Object3D{constructor(e){super(),this.isTransformControlsRoot=!0,this.controls=e,this.visible=!1}updateMatrixWorld(e){let t=this.controls;t.object!==void 0&&(t.object.updateMatrixWorld(),t.object.parent===null?console.error(`TransformControls: The attached 3D object must be a part of the scene graph.`):t.object.parent.matrixWorld.decompose(t._parentPosition,t._parentQuaternion,t._parentScale),t.object.matrixWorld.decompose(t.worldPosition,t.worldQuaternion,t._worldScale),t._parentQuaternionInv.copy(t._parentQuaternion).invert(),t._worldQuaternionInv.copy(t.worldQuaternion).invert()),t.camera.updateMatrixWorld(),t.camera.matrixWorld.decompose(t.cameraPosition,t.cameraQuaternion,t._cameraScale),t.camera.isOrthographicCamera?t.camera.getWorldDirection(t.eye).negate():t.eye.copy(t.cameraPosition).sub(t.worldPosition).normalize(),super.updateMatrixWorld(e)}dispose(){this.traverse(function(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}},sn=class extends u.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type=`TransformControlsGizmo`;let e=new u.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),t=new u.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),n=e.clone();n.opacity=.15;let r=t.clone();r.opacity=.5;let i=e.clone();i.color.setHex(16711680);let a=e.clone();a.color.setHex(65280);let o=e.clone();o.color.setHex(255);let s=e.clone();s.color.setHex(16711680),s.opacity=.5;let c=e.clone();c.color.setHex(65280),c.opacity=.5;let l=e.clone();l.color.setHex(255),l.opacity=.5;let d=e.clone();d.opacity=.25;let f=e.clone();f.color.setHex(16776960),f.opacity=.25;let p=e.clone();p.color.setHex(16776960);let m=e.clone();m.color.setHex(7895160),this.materialLib={xAxis:i,yAxis:a,zAxis:o,active:p,xAxisTransparent:s,yAxisTransparent:c,zAxisTransparent:l,activeTransparent:f};let h=new u.CylinderGeometry(0,.04,.1,12);h.translate(0,.05,0);let g=new u.BoxGeometry(.08,.08,.08);g.translate(0,.04,0);let _=new u.BufferGeometry;_.setAttribute(`position`,new u.Float32BufferAttribute([0,0,0,1,0,0],3));let v=new u.CylinderGeometry(.0075,.0075,.5,3);v.translate(0,.25,0);function y(e,t){let n=new u.TorusGeometry(e,.0075,3,64,t*Math.PI*2);return n.rotateY(Math.PI/2),n.rotateX(Math.PI/2),n}function b(){let e=new u.BufferGeometry;return e.setAttribute(`position`,new u.Float32BufferAttribute([0,0,0,1,1,1],3)),e}let x={X:[[new u.Mesh(h,i),[.5,0,0],[0,0,-Math.PI/2]],[new u.Mesh(h,i),[-.5,0,0],[0,0,Math.PI/2]],[new u.Mesh(v,i),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new u.Mesh(h,a),[0,.5,0]],[new u.Mesh(h,a),[0,-.5,0],[Math.PI,0,0]],[new u.Mesh(v,a)]],Z:[[new u.Mesh(h,o),[0,0,.5],[Math.PI/2,0,0]],[new u.Mesh(h,o),[0,0,-.5],[-Math.PI/2,0,0]],[new u.Mesh(v,o),null,[Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.OctahedronGeometry(.1,0),d),[0,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),l),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),s),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),c),[.15,0,.15],[-Math.PI/2,0,0]]]},S={X:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[.3,0,0],[0,0,-Math.PI/2]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[0,.3,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[0,-.3,0],[0,0,Math.PI]]],Z:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[0,0,.3],[Math.PI/2,0,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.OctahedronGeometry(.2,0),n)]],XY:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),n),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),n),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),n),[.15,0,.15],[-Math.PI/2,0,0]]]},C={START:[[new u.Mesh(new u.OctahedronGeometry(.01,2),r),null,null,null,`helper`]],END:[[new u.Mesh(new u.OctahedronGeometry(.01,2),r),null,null,null,`helper`]],DELTA:[[new u.Line(b(),r),null,null,null,`helper`]],X:[[new u.Line(_,r),[-1e3,0,0],null,[1e6,1,1],`helper`]],Y:[[new u.Line(_,r),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],`helper`]],Z:[[new u.Line(_,r),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],`helper`]]},ee={XYZE:[[new u.Mesh(y(.5,1),m),null,[0,Math.PI/2,0]]],X:[[new u.Mesh(y(.5,.5),i)]],Y:[[new u.Mesh(y(.5,.5),a),null,[0,0,-Math.PI/2]]],Z:[[new u.Mesh(y(.5,.5),o),null,[0,Math.PI/2,0]]],E:[[new u.Mesh(y(.75,1),f),null,[0,Math.PI/2,0]]]},w={AXIS:[[new u.Line(_,r),[-1e3,0,0],null,[1e6,1,1],`helper`]]},T={XYZE:[[new u.Mesh(new u.SphereGeometry(.25,10,8),n)]],X:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),n),[0,0,0],[0,0,-Math.PI/2]]],E:[[new u.Mesh(new u.TorusGeometry(.75,.1,2,24),n)]]},te={X:[[new u.Mesh(g,i),[.5,0,0],[0,0,-Math.PI/2]],[new u.Mesh(v,i),[0,0,0],[0,0,-Math.PI/2]],[new u.Mesh(g,i),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(g,a),[0,.5,0]],[new u.Mesh(v,a)],[new u.Mesh(g,a),[0,-.5,0],[0,0,Math.PI]]],Z:[[new u.Mesh(g,o),[0,0,.5],[Math.PI/2,0,0]],[new u.Mesh(v,o),[0,0,0],[Math.PI/2,0,0]],[new u.Mesh(g,o),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),l),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),s),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),c),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.BoxGeometry(.1,.1,.1),d)]]},E={X:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[.3,0,0],[0,0,-Math.PI/2]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[0,.3,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[0,-.3,0],[0,0,Math.PI]]],Z:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[0,0,.3],[Math.PI/2,0,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),n),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),n),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),n),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),n),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.2),n),[0,0,0]]]},D={X:[[new u.Line(_,r),[-1e3,0,0],null,[1e6,1,1],`helper`]],Y:[[new u.Line(_,r),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],`helper`]],Z:[[new u.Line(_,r),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],`helper`]]};function O(e){let t=new u.Object3D;for(let n in e)for(let r=e[n].length;r--;){let i=e[n][r][0].clone(),a=e[n][r][1],o=e[n][r][2],s=e[n][r][3],c=e[n][r][4];i.name=n,i.tag=c,a&&i.position.set(a[0],a[1],a[2]),o&&i.rotation.set(o[0],o[1],o[2]),s&&i.scale.set(s[0],s[1],s[2]),i.updateMatrix();let l=i.geometry.clone();l.applyMatrix4(i.matrix),i.geometry=l,i.renderOrder=1/0,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1),t.add(i)}return t}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=O(x)),this.add(this.gizmo.rotate=O(ee)),this.add(this.gizmo.scale=O(te)),this.add(this.picker.translate=O(S)),this.add(this.picker.rotate=O(T)),this.add(this.picker.scale=O(E)),this.add(this.helper.translate=O(C)),this.add(this.helper.rotate=O(w)),this.add(this.helper.scale=O(D)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(e){let t=(this.mode===`scale`?`local`:this.space)===`local`?this.worldQuaternion:Xt;this.gizmo.translate.visible=this.mode===`translate`,this.gizmo.rotate.visible=this.mode===`rotate`,this.gizmo.scale.visible=this.mode===`scale`,this.helper.translate.visible=this.mode===`translate`,this.helper.rotate.visible=this.mode===`rotate`,this.helper.scale.visible=this.mode===`scale`;let n=[];n=n.concat(this.picker[this.mode].children),n=n.concat(this.gizmo[this.mode].children),n=n.concat(this.helper[this.mode].children);for(let e=0;e<n.length;e++){let r=n[e];r.visible=!0,r.rotation.set(0,0,0),r.position.copy(this.worldPosition);let i;if(i=this.camera.isOrthographicCamera?(this.camera.top-this.camera.bottom)/this.camera.zoom:this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),r.scale.set(1,1,1).multiplyScalar(i*this.size/4),r.tag===`helper`){r.visible=!1,r.name===`AXIS`?(r.visible=!!this.axis,this.axis===`X`&&(V.setFromEuler(Kt.set(0,0,0)),r.quaternion.copy(t).multiply(V),Math.abs(H.copy($t).applyQuaternion(t).dot(this.eye))>.9&&(r.visible=!1)),this.axis===`Y`&&(V.setFromEuler(Kt.set(0,0,Math.PI/2)),r.quaternion.copy(t).multiply(V),Math.abs(H.copy(en).applyQuaternion(t).dot(this.eye))>.9&&(r.visible=!1)),this.axis===`Z`&&(V.setFromEuler(Kt.set(0,Math.PI/2,0)),r.quaternion.copy(t).multiply(V),Math.abs(H.copy(tn).applyQuaternion(t).dot(this.eye))>.9&&(r.visible=!1)),this.axis===`XYZE`&&(V.setFromEuler(Kt.set(0,Math.PI/2,0)),H.copy(this.rotationAxis),r.quaternion.setFromRotationMatrix(Jt.lookAt(qt,H,en)),r.quaternion.multiply(V),r.visible=this.dragging),this.axis===`E`&&(r.visible=!1)):r.name===`START`?(r.position.copy(this.worldPositionStart),r.visible=this.dragging):r.name===`END`?(r.position.copy(this.worldPosition),r.visible=this.dragging):r.name===`DELTA`?(r.position.copy(this.worldPositionStart),r.quaternion.copy(this.worldQuaternionStart),Mt.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),Mt.applyQuaternion(this.worldQuaternionStart.clone().invert()),r.scale.copy(Mt),r.visible=this.dragging):(r.quaternion.copy(t),this.dragging?r.position.copy(this.worldPositionStart):r.position.copy(this.worldPosition),this.axis&&(r.visible=this.axis.search(r.name)!==-1));continue}if(r.quaternion.copy(t),this.mode===`translate`||this.mode===`scale`){let e=.99,n=.2;r.name===`X`&&Math.abs(H.copy($t).applyQuaternion(t).dot(this.eye))>e&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`Y`&&Math.abs(H.copy(en).applyQuaternion(t).dot(this.eye))>e&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`Z`&&Math.abs(H.copy(tn).applyQuaternion(t).dot(this.eye))>e&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`XY`&&Math.abs(H.copy(tn).applyQuaternion(t).dot(this.eye))<n&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`YZ`&&Math.abs(H.copy($t).applyQuaternion(t).dot(this.eye))<n&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1),r.name===`XZ`&&Math.abs(H.copy(en).applyQuaternion(t).dot(this.eye))<n&&(r.scale.set(1e-10,1e-10,1e-10),r.visible=!1)}else this.mode===`rotate`&&(Yt.copy(t),H.copy(this.eye).applyQuaternion(V.copy(t).invert()),r.name.search(`E`)!==-1&&r.quaternion.setFromRotationMatrix(Jt.lookAt(this.eye,qt,en)),r.name===`X`&&(V.setFromAxisAngle($t,Math.atan2(-H.y,H.z)),V.multiplyQuaternions(Yt,V),r.quaternion.copy(V)),r.name===`Y`&&(V.setFromAxisAngle(en,Math.atan2(H.x,H.z)),V.multiplyQuaternions(Yt,V),r.quaternion.copy(V)),r.name===`Z`&&(V.setFromAxisAngle(tn,Math.atan2(H.y,H.x)),V.multiplyQuaternions(Yt,V),r.quaternion.copy(V)));r.visible=r.visible&&(r.name.indexOf(`X`)===-1||this.showX),r.visible=r.visible&&(r.name.indexOf(`Y`)===-1||this.showY),r.visible=r.visible&&(r.name.indexOf(`Z`)===-1||this.showZ),r.visible=r.visible&&(r.name.indexOf(`E`)===-1||this.showX&&this.showY&&this.showZ),r.visible=r.visible&&(r.name.indexOf(`XY`)===-1||this.showXY),r.visible=r.visible&&(r.name.indexOf(`YZ`)===-1||this.showYZ),r.visible=r.visible&&(r.name.indexOf(`XZ`)===-1||this.showXZ),r.material._color=r.material._color||r.material.color.clone(),r.material._opacity=r.material._opacity||r.material.opacity,r.material.color.copy(r.material._color),r.material.opacity=r.material._opacity,this.enabled&&this.axis&&(r.name===this.axis||this.axis.split(``).some(function(e){return r.name===e}))&&(r.material.color.copy(this.materialLib.active.color),r.material.opacity=1)}super.updateMatrixWorld(e)}},cn=class extends u.Mesh{constructor(){super(new u.PlaneGeometry(1e5,1e5,2,2),new u.MeshBasicMaterial({visible:!1,wireframe:!0,side:u.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type=`TransformControlsPlane`}updateMatrixWorld(e){let t=this.space;switch(this.position.copy(this.worldPosition),this.mode===`scale`&&(t=`local`),nn.copy($t).applyQuaternion(t===`local`?this.worldQuaternion:Xt),rn.copy(en).applyQuaternion(t===`local`?this.worldQuaternion:Xt),an.copy(tn).applyQuaternion(t===`local`?this.worldQuaternion:Xt),H.copy(rn),this.mode){case`translate`:case`scale`:switch(this.axis){case`X`:H.copy(this.eye).cross(nn),Zt.copy(nn).cross(H);break;case`Y`:H.copy(this.eye).cross(rn),Zt.copy(rn).cross(H);break;case`Z`:H.copy(this.eye).cross(an),Zt.copy(an).cross(H);break;case`XY`:Zt.copy(an);break;case`YZ`:Zt.copy(nn);break;case`XZ`:H.copy(an),Zt.copy(rn);break;case`XYZ`:case`E`:Zt.set(0,0,0);break}break;default:Zt.set(0,0,0)}Zt.length()===0?this.quaternion.copy(this.cameraQuaternion):(Qt.lookAt(Mt.set(0,0,0),Zt,H),this.quaternion.setFromRotationMatrix(Qt)),super.updateMatrixWorld(e)}},ln=e=>{let{target:t,mode:n,enabled:r,space:i,size:a,onObjectChange:o}=e,{scene:s,camera:c,renderer:l,map:u,sceneRoot:f}=O(),p=(0,d.useRef)(null);return(0,d.useEffect)(()=>{if(!s||!c||!l||!u||!f)return;let e=l.getRenderer().domElement,t=new zt(c,e);p.current=t,t.setMode(n||`translate`),t.setSpace(i||`world`),a&&t.setSize(a),f.add(t._root);let r=e=>{e.value?(u.dragPan.disable(),u.scrollZoom.disable()):(u.dragPan.enable(),u.scrollZoom.enable())};return t.addEventListener(`dragging-changed`,r),o&&t.addEventListener(`objectChange`,()=>{t.object&&o(t.object)}),()=>{t.removeEventListener(`dragging-changed`,r),t.detach(),f.remove(t._root),t.dispose(),p.current=null}},[s,c,l,u,f]),(0,d.useEffect)(()=>{p.current&&(t?p.current.attach(t):p.current.detach())},[t]),(0,d.useEffect)(()=>{p.current&&(p.current.mode=n||`translate`)},[n]),(0,d.useEffect)(()=>{p.current&&(p.current.enabled=r!==!1)},[r]),(0,d.useEffect)(()=>{p.current&&p.current.setSpace(i||`world`)},[i]),(0,d.useEffect)(()=>{!p.current||!a||p.current.setSize(a)},[a]),null},un=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),dn=o((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,ee=c,w=s,T=n,te=d,E=i,D=h,O=m,ne=r,k=o,A=a,j=f,M=!1;function re(e){return M||(M=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.`)),N(e)||x(e)===l}function N(e){return x(e)===u}function P(e){return x(e)===c}function ie(e){return x(e)===s}function F(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function ae(e){return x(e)===d}function oe(e){return x(e)===i}function I(e){return x(e)===h}function L(e){return x(e)===m}function se(e){return x(e)===r}function ce(e){return x(e)===o}function R(e){return x(e)===a}function le(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=ee,e.ContextProvider=w,e.Element=T,e.ForwardRef=te,e.Fragment=E,e.Lazy=D,e.Memo=O,e.Portal=ne,e.Profiler=k,e.StrictMode=A,e.Suspense=j,e.isAsyncMode=re,e.isConcurrentMode=N,e.isContextConsumer=P,e.isContextProvider=ie,e.isElement=F,e.isForwardRef=ae,e.isFragment=oe,e.isLazy=I,e.isMemo=L,e.isPortal=se,e.isProfiler=ce,e.isStrictMode=R,e.isSuspense=le,e.isValidElementType=b,e.typeOf=x})()})),fn=o(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=un():t.exports=dn()})),pn=o(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),mn=o(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),hn=o(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),gn=o(((e,t)=>{var n=function(){};if(process.env.NODE_ENV!==`production`){var r=mn(),i={},a=hn();n=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}}}function o(e,t,o,s,c){if(process.env.NODE_ENV!==`production`){for(var l in e)if(a(e,l)){var u;try{if(typeof e[l]!=`function`){var d=Error((s||`React class`)+`: `+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name=`Invariant Violation`,d}u=e[l](t,l,s,o,null,r)}catch(e){u=e}if(u&&!(u instanceof Error)&&n((s||`React class`)+`: type specification of `+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+`. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).`),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var f=c?c():``;n(`Failed `+o+` type: `+u.message+(f??``))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!==`production`&&(i={})},t.exports=o})),_n=o(((e,t)=>{var n=fn(),r=pn(),i=mn(),a=hn(),o=gn(),s=function(){};process.env.NODE_ENV!==`production`&&(s=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}});function c(){return null}t.exports=function(e,t){var l=typeof Symbol==`function`&&Symbol.iterator,u=`@@iterator`;function d(e){var t=e&&(l&&e[l]||e[u]);if(typeof t==`function`)return t}var f=`<<anonymous>>`,p={array:_(`array`),bigint:_(`bigint`),bool:_(`boolean`),func:_(`function`),number:_(`number`),object:_(`object`),string:_(`string`),symbol:_(`symbol`),any:v(),arrayOf:y,element:b(),elementType:x(),instanceOf:S,node:T(),objectOf:ee,oneOf:C,oneOfType:w,shape:E,exact:D};function m(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function h(e,t){this.message=e,this.data=t&&typeof t==`object`?t:{},this.stack=``}h.prototype=Error.prototype;function g(e){if(process.env.NODE_ENV!==`production`)var n={},r=0;function a(a,o,c,l,u,d,p){if(l||=f,d||=c,p!==i){if(t){var m=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 m.name=`Invariant Violation`,m}else if(process.env.NODE_ENV!==`production`&&typeof console<`u`){var g=l+`:`+c;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return o[c]==null?a?o[c]===null?new h(`The `+u+" `"+d+"` is marked as required "+("in `"+l+"`, but its value is `null`.")):new h(`The `+u+" `"+d+"` is marked as required in "+("`"+l+"`, but its value is `undefined`.")):null:e(o,c,l,u,d)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function _(e){function t(t,n,r,i,a,o){var s=t[n];if(k(s)!==e){var c=A(s);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return g(t)}function v(){return g(c)}function y(e){function t(t,n,r,a,o){if(typeof e!=`function`)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var c=k(s);return new h(`Invalid `+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var u=e(s,l,r,a,o+`[`+l+`]`,i);if(u instanceof Error)return u}return null}return g(t)}function b(){function t(t,n,r,i,a){var o=t[n];if(!e(o)){var s=k(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return g(t)}function x(){function e(e,t,r,i,a){var o=e[t];if(!n.isValidElementType(o)){var s=k(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return g(e)}function S(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||f,s=M(t[n]);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return g(t)}function C(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&(arguments.length>1?s(`Invalid arguments supplied to oneOf, expected an array, got `+arguments.length+` arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).`):s(`Invalid argument supplied to oneOf, expected an array.`)),c;function t(t,n,r,i,a){for(var o=t[n],s=0;s<e.length;s++)if(m(o,e[s]))return null;var c=JSON.stringify(e,function(e,t){return A(t)===`symbol`?String(t):t});return new h(`Invalid `+i+" `"+a+"` of value `"+String(o)+"` "+("supplied to `"+r+"`, expected one of "+c+`.`))}return g(t)}function ee(e){function t(t,n,r,o,s){if(typeof e!=`function`)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=k(c);if(l!==`object`)return new h(`Invalid `+o+" `"+s+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var u in c)if(a(c,u)){var d=e(c,u,r,o,s+`.`+u,i);if(d instanceof Error)return d}return null}return g(t)}function w(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&s(`Invalid argument supplied to oneOfType, expected an instance of array.`),c;for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=`function`)return s(`Invalid argument supplied to oneOfType. Expected an array of check functions, but received `+j(n)+` at index `+t+`.`),c}function r(t,n,r,o,s){for(var c=[],l=0;l<e.length;l++){var u=e[l],d=u(t,n,r,o,s,i);if(d==null)return null;d.data&&a(d.data,`expectedType`)&&c.push(d.data.expectedType)}var f=c.length>0?`, expected one of type [`+c.join(`, `)+`]`:``;return new h(`Invalid `+o+" `"+s+"` supplied to "+("`"+r+"`"+f+`.`))}return g(r)}function T(){function e(e,t,n,r,i){return O(e[t])?null:new h(`Invalid `+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return g(e)}function te(e,t,n,r,i){return new h((e||`React class`)+`: `+t+" type `"+n+`.`+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function E(e){function t(t,n,r,a,o){var s=t[n],c=k(s);if(c!==`object`)return new h(`Invalid `+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var u=e[l];if(typeof u!=`function`)return te(r,a,o,l,A(u));var d=u(s,l,r,a,o+`.`+l,i);if(d)return d}return null}return g(t)}function D(e){function t(t,n,o,s,c){var l=t[n],u=k(l);if(u!==`object`)return new h(`Invalid `+s+" `"+c+"` of type `"+u+"` "+("supplied to `"+o+"`, expected `object`."));for(var d in r({},t[n],e)){var f=e[d];if(a(e,d)&&typeof f!=`function`)return te(o,s,c,d,A(f));if(!f)return new h(`Invalid `+s+" `"+c+"` key `"+d+"` supplied to `"+o+`\`.
266
+ Bad object: `+JSON.stringify(t[n],null,` `)+`
267
+ Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,i);if(p)return p}return null}return g(t)}function O(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(O);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!O(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!O(a[1]))return!1}}else return!1;return!0;default:return!1}}function ne(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function k(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:ne(t,e)?`symbol`:t}function A(e){if(e==null)return``+e;var t=k(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function j(e){var t=A(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function M(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),vn=o(((e,t)=>{var n=mn();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=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 s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),yn=o(((e,t)=>{if(process.env.NODE_ENV!==`production`){var n=fn();t.exports=_n()(n.isElement,!0)}else t.exports=vn()()}));function bn(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=bn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function U(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=bn(e))&&(r&&(r+=` `),r+=t);return r}function xn(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=xn(i[t],o[t],n)}}}else a===`className`&&n&&t.className!==void 0?r.className=U(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}function Sn(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}var Cn=e=>e,wn=(()=>{let e=Cn;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Cn}}})();function Tn(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function En(e){if(typeof e!=`string`)throw Error(process.env.NODE_ENV===`production`?Tn(7):"MUI: `capitalize(string)` expects a string argument.");return e.charAt(0).toUpperCase()+e.slice(1)}var Dn=En;function On(e,t){let n=Array.isArray(t),r=Array.isArray(e);return Nn(t)?t:Pn(e)?Fn(t):n&&r?jn(e,t):n===r?In(e,t):Fn(t)}function kn(e){let t=0,n=e.length,r=Array(n);for(t=0;t<n;t+=1)r[t]=Fn(e[t]);return r}function An(e){let t={};for(let n in e)t[n]=Fn(e[n]);return t}function jn(e,t){let n=e.length;for(let r=0;r<t.length;r+=1)e[n+r]=Fn(t[r]);return e}function Mn(e){return typeof e==`object`&&!!e&&!(e instanceof RegExp)&&!(e instanceof Date)}function Nn(e){return typeof e!=`object`||!e}function Pn(e){return typeof e!=`object`||!e||e instanceof RegExp||e instanceof Date}function Fn(e){return Mn(e)?Array.isArray(e)?kn(e):An(e):e}function In(e,t){for(let n in t)n in e?e[n]=On(e[n],t[n]):e[n]=Fn(t[n]);return e}var W=c(yn(),1),Ln=process.env.NODE_ENV===`production`?{}:W.default.oneOfType([W.default.number,W.default.string,W.default.object,W.default.array]);function Rn(e){if(e==null)return!0;for(let t in e)return!1;return!0}var zn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.suspense_list`),d=Symbol.for(`react.memo`),f=Symbol.for(`react.lazy`),p=Symbol.for(`react.view_transition`),m=Symbol.for(`react.client.reference`);function h(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case l:case u:case p:return e;default:switch(e&&=e.$$typeof,e){case s:case c:case f:case d:return e;case o:return e;default:return m}}case n:return m}}}e.ContextConsumer=o,e.ContextProvider=s,e.Element=t,e.ForwardRef=c,e.Fragment=r,e.Lazy=f,e.Memo=d,e.Portal=n,e.Profiler=a,e.StrictMode=i,e.Suspense=l,e.SuspenseList=u,e.isContextConsumer=function(e){return h(e)===o},e.isContextProvider=function(e){return h(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===t},e.isForwardRef=function(e){return h(e)===c},e.isFragment=function(e){return h(e)===r},e.isLazy=function(e){return h(e)===f},e.isMemo=function(e){return h(e)===d},e.isPortal=function(e){return h(e)===n},e.isProfiler=function(e){return h(e)===a},e.isStrictMode=function(e){return h(e)===i},e.isSuspense=function(e){return h(e)===l},e.isSuspenseList=function(e){return h(e)===u},e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===a||e===i||e===l||e===u||typeof e==`object`&&e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===s||e.$$typeof===o||e.$$typeof===c||e.$$typeof===m||e.getModuleId!==void 0))},e.typeOf=h})),Bn=o((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case i:case o:case a:case u:case d:case m:return e;default:switch(e&&=e.$$typeof,e){case c:case l:case p:case f:return e;case s:return e;default:return t}}case r:return t}}}var n=Symbol.for(`react.transitional.element`),r=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),a=Symbol.for(`react.strict_mode`),o=Symbol.for(`react.profiler`),s=Symbol.for(`react.consumer`),c=Symbol.for(`react.context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.for(`react.view_transition`),h=Symbol.for(`react.client.reference`);e.ContextConsumer=s,e.ContextProvider=c,e.Element=n,e.ForwardRef=l,e.Fragment=i,e.Lazy=p,e.Memo=f,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=u,e.SuspenseList=d,e.isContextConsumer=function(e){return t(e)===s},e.isContextProvider=function(e){return t(e)===c},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return t(e)===l},e.isFragment=function(e){return t(e)===i},e.isLazy=function(e){return t(e)===p},e.isMemo=function(e){return t(e)===f},e.isPortal=function(e){return t(e)===r},e.isProfiler=function(e){return t(e)===o},e.isStrictMode=function(e){return t(e)===a},e.isSuspense=function(e){return t(e)===u},e.isSuspenseList=function(e){return t(e)===d},e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===i||e===o||e===a||e===u||e===d||typeof e==`object`&&e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===c||e.$$typeof===s||e.$$typeof===l||e.$$typeof===h||e.getModuleId!==void 0))},e.typeOf=t})()})),Vn=o(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=zn():t.exports=Bn()}))();function Hn(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Un(e){if(f.isValidElement(e)||(0,Vn.isValidElementType)(e)||!Hn(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=Un(e[n])}),t}function Wn(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return Hn(e)&&Hn(t)&&Object.keys(t).forEach(i=>{f.isValidElement(t[i])||(0,Vn.isValidElementType)(t[i])?r[i]=t[i]:Hn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Hn(e[i])?r[i]=Wn(e[i],t[i],n):n.clone?r[i]=Hn(t[i])?Un(t[i]):t[i]:r[i]=t[i]}),r}var Gn=/min-width:\s*([0-9.]+)/;function Kn(e,t){if(!e.containerQueries||!qn(t))return t;let n=[];for(let e in t)e.startsWith(`@container`)&&n.push(e);n.sort((e,t)=>(e.match(Gn)?.[1]||0)-+(t.match(Gn)?.[1]||0));let r=t;for(let e=0;e<n.length;e+=1){let t=n[e],i=r[t];delete r[t],r[t]=i}return r}function qn(e){for(let t in e)if(t.startsWith(`@container`))return!0;return!1}function Jn(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function Yn(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!==`production`)throw Error(`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function Xn(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var Zn=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function Qn(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=Zn(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}let f=[];for(let e=0;e<o.length;e+=1)f.push(s(o[e]));return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,internal_mediaKeys:f,...i}}var $n={},er={xs:0,sm:600,md:900,lg:1200,xl:1536},tr=Qn({values:er}),nr={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:er[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function rr(e,t,n){let r={};return ir(r,e.theme,t,(e,t,i)=>{let a=n(t,i);e?r[e]=a:On(r,a)})}function ir(e,t,n,r){if(t??=$n,Array.isArray(n)){let i=t.breakpoints??tr;for(let t=0;t<n.length;t+=1)ar(e,i.up(i.keys[t]),n[t],void 0,r);return e}if(typeof n==`object`){let i=t.breakpoints??tr,a=i.values??er;for(let o in n)if(Jn(i.keys,o)){let i=Yn(t.containerQueries?t:nr,o);i&&ar(e,i,n[o],o,r)}else if(o in a)ar(e,i.up(o),n[o],o,r);else{let t=o;e[t]=n[t]}return e}return r(void 0,n),e}function ar(e,t,n,r,i){e[t]??={},i(t,n,r)}function or(e=tr){let{internal_mediaKeys:t}=e,n={};for(let e=0;e<t.length;e+=1)n[t[e]]={};return n}function sr(e,t){let n=e.internal_mediaKeys;for(let e=0;e<n.length;e+=1){let r=n[e];Rn(t[r])&&delete t[r]}return t}function cr(e,t){if(Array.isArray(t))return!0;if(typeof t==`object`&&t){for(let n=0;n<e.keys.length;n+=1)if(e.keys[n]in t)return!0;let n=Object.keys(t);for(let t=0;t<n.length;t+=1)if(Jn(e.keys,n[t]))return!0}return!1}function lr(e,t,n,r){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||n:typeof n==`string`&&ur(e,n,!0,r)||n,t&&(i=t(i,n,e)),i}function ur(e,t,n=!0,r=void 0){if(!e||!t)return null;let i=t.split(`.`);if(e.vars&&n){let t=dr(e.vars,i,r);if(t!=null)return t}return dr(e,i,r)}function dr(e,t,n=void 0){let r,i=e,a=0;for(;a<t.length;){if(i==null)return i;r=i,i=i[t[a]],a+=1}if(n&&i===void 0){let e=t[t.length-1],i=`${n}${e===`default`?``:En(e)}`;return r?.[i]}return i}function G(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=ur(o,r)||{};return rr(e,a,e=>{let r=lr(s,i,e,t);return n===!1?r:{[n]:r}})};return a.propTypes=process.env.NODE_ENV===`production`?{}:{[t]:Ln},a.filterProps=[t],a}var fr={internal_cache:{}},pr={m:`margin`,p:`padding`},mr={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},hr={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},gr={};for(let e in pr)gr[e]=[pr[e]];for(let e in pr)for(let t in mr){let n=pr[e],r=mr[t],i=Array.isArray(r)?r.map(e=>n+e):[n+r];gr[e+t]=i}for(let e in hr)gr[e]=gr[hr[e]];var _r=new Set([`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`]),vr=new Set([`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`]),yr=new Set([..._r,...vr]);function br(e,t,n,r){let i=ur(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:(process.env.NODE_ENV!==`production`&&typeof e!=`number`&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`),typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e):Array.isArray(i)?e=>{if(typeof e==`string`)return e;let n=Math.abs(e);process.env.NODE_ENV!==`production`&&(Number.isInteger(n)?n>i.length-1&&console.error([`MUI: The value provided (${n}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${n} > ${i.length-1}, you need to add the missing values.`].join(`
268
+ `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
269
+ `)));let r=i[n];return e>=0?r:typeof r==`number`?-r:typeof r==`string`&&r.startsWith(`var(`)?`calc(-1 * ${r})`:`-${r}`}:typeof i==`function`?i:(process.env.NODE_ENV!==`production`&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,`It should be a number, an array or a function.`].join(`
270
+ `)),()=>void 0)}function xr(e){return br(e,`spacing`,8,`spacing`)}function Sr(e,t){return typeof t==`string`||t==null?t:e(t)}var Cr=[``];function wr(e,t){let n=e.theme??fr,r=n?.internal_cache?.unarySpacing??xr(n),i={};for(let n in e){if(!t.has(n))continue;let a=gr[n]??(Cr[0]=n,Cr),o=e[n];ir(i,e.theme,o,(e,t)=>{let n=e?i[e]:i;for(let e=0;e<a.length;e+=1)n[a[e]]=Sr(r,t)})}return i}function K(e){return wr(e,_r)}K.propTypes=process.env.NODE_ENV===`production`?{}:Array.from(_r).reduce((e,t)=>(e[t]=Ln,e),{}),K.filterProps=_r;function q(e){return wr(e,vr)}q.propTypes=process.env.NODE_ENV===`production`?{}:Array.from(vr).reduce((e,t)=>(e[t]=Ln,e),{}),q.filterProps=vr;function Tr(e){return wr(e,yr)}Tr.propTypes=process.env.NODE_ENV===`production`?{}:Array.from(yr).reduce((e,t)=>(e[t]=Ln,e),{}),Tr.filterProps=yr;function Er(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>{let n={};for(let r in e)t[r]&&On(n,t[r](e));return n};return n.propTypes=process.env.NODE_ENV===`production`?{}:e.reduce((e,t)=>Object.assign(e,t.propTypes),{}),n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Dr(e){return typeof e==`number`?`${e}px solid`:e}function Or(e,t){return G({prop:e,themeKey:`borders`,transform:t})}var kr=Or(`border`,Dr),Ar=Or(`borderTop`,Dr),jr=Or(`borderRight`,Dr),Mr=Or(`borderBottom`,Dr),Nr=Or(`borderLeft`,Dr),Pr=Or(`borderColor`),Fr=Or(`borderTopColor`),Ir=Or(`borderRightColor`),Lr=Or(`borderBottomColor`),Rr=Or(`borderLeftColor`),zr=Or(`outline`,Dr),Br=Or(`outlineColor`),Vr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=br(e.theme,`shape.borderRadius`,4,`borderRadius`);return rr(e,e.borderRadius,e=>({borderRadius:Sr(t,e)}))}return null};Vr.propTypes=process.env.NODE_ENV===`production`?{}:{borderRadius:Ln},Vr.filterProps=[`borderRadius`],Er(kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,Vr,zr,Br);var Hr=e=>{if(e.gap!==void 0&&e.gap!==null){let t=br(e.theme,`spacing`,8,`gap`);return rr(e,e.gap,e=>({gap:Sr(t,e)}))}return null};Hr.propTypes=process.env.NODE_ENV===`production`?{}:{gap:Ln},Hr.filterProps=[`gap`];var Ur=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=br(e.theme,`spacing`,8,`columnGap`);return rr(e,e.columnGap,e=>({columnGap:Sr(t,e)}))}return null};Ur.propTypes=process.env.NODE_ENV===`production`?{}:{columnGap:Ln},Ur.filterProps=[`columnGap`];var Wr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=br(e.theme,`spacing`,8,`rowGap`);return rr(e,e.rowGap,e=>({rowGap:Sr(t,e)}))}return null};Wr.propTypes=process.env.NODE_ENV===`production`?{}:{rowGap:Ln},Wr.filterProps=[`rowGap`],Er(Hr,Ur,Wr,G({prop:`gridColumn`}),G({prop:`gridRow`}),G({prop:`gridAutoFlow`}),G({prop:`gridAutoColumns`}),G({prop:`gridAutoRows`}),G({prop:`gridTemplateColumns`}),G({prop:`gridTemplateRows`}),G({prop:`gridTemplateAreas`}),G({prop:`gridArea`}));function Gr(e,t){return t===`grey`?t:e}Er(G({prop:`color`,themeKey:`palette`,transform:Gr}),G({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:Gr}),G({prop:`backgroundColor`,themeKey:`palette`,transform:Gr}));function Kr(e){return e<=1&&e!==0?`${e*100}%`:e}var qr=G({prop:`width`,transform:Kr}),Jr=e=>e.maxWidth!==void 0&&e.maxWidth!==null?rr(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||er[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:Kr(t)}}):null;Jr.filterProps=[`maxWidth`];var Yr=G({prop:`minWidth`,transform:Kr}),Xr=G({prop:`height`,transform:Kr}),Zr=G({prop:`maxHeight`,transform:Kr}),Qr=G({prop:`minHeight`,transform:Kr});G({prop:`size`,cssProperty:`width`,transform:Kr}),G({prop:`size`,cssProperty:`height`,transform:Kr}),Er(qr,Jr,Yr,Xr,Zr,Qr,G({prop:`boxSizing`}));var $r={border:{themeKey:`borders`,transform:Dr},borderTop:{themeKey:`borders`,transform:Dr},borderRight:{themeKey:`borders`,transform:Dr},borderBottom:{themeKey:`borders`,transform:Dr},borderLeft:{themeKey:`borders`,transform:Dr},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:Dr},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:Vr},color:{themeKey:`palette`,transform:Gr},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:Gr},backgroundColor:{themeKey:`palette`,transform:Gr},p:{style:q},pt:{style:q},pr:{style:q},pb:{style:q},pl:{style:q},px:{style:q},py:{style:q},padding:{style:q},paddingTop:{style:q},paddingRight:{style:q},paddingBottom:{style:q},paddingLeft:{style:q},paddingX:{style:q},paddingY:{style:q},paddingInline:{style:q},paddingInlineStart:{style:q},paddingInlineEnd:{style:q},paddingBlock:{style:q},paddingBlockStart:{style:q},paddingBlockEnd:{style:q},m:{style:K},mt:{style:K},mr:{style:K},mb:{style:K},ml:{style:K},mx:{style:K},my:{style:K},margin:{style:K},marginTop:{style:K},marginRight:{style:K},marginBottom:{style:K},marginLeft:{style:K},marginX:{style:K},marginY:{style:K},marginInline:{style:K},marginInlineStart:{style:K},marginInlineEnd:{style:K},marginBlock:{style:K},marginBlockStart:{style:K},marginBlockEnd:{style:K},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Hr},rowGap:{style:Wr},columnGap:{style:Ur},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:Kr},maxWidth:{style:Jr},minWidth:{transform:Kr},height:{transform:Kr},maxHeight:{transform:Kr},minHeight:{transform:Kr},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}},ei={};function ti(){function e(t){if(!t.sx)return null;let{sx:n,theme:r=ei,nested:i}=t,a=r.unstable_sxConfig??$r,o={sx:null,theme:r,nested:!0};function s(n){let s=n;if(typeof n==`function`)s=n(r);else if(typeof n!=`object`)return n;if(!s)return null;let c=r.breakpoints??tr,l=or(c);for(let n in s){let i=ii(s[n],r);if(i!=null){if(typeof i!=`object`){ri(l,n,i,r,a);continue}if(a[n]){ri(l,n,i,r,a);continue}cr(c,i)?ir(l,t.theme,i,(e,t)=>{l[e][n]=t}):(o.sx=i,l[n]=e(o))}}return!i&&r.modularCssLayers?{"@layer sx":Kn(r,sr(c,l))}:Kn(r,sr(c,l))}return Array.isArray(n)?n.map(s):s(n)}return e.filterProps=[`sx`],e}var ni=ti();function ri(e,t,n,r,i){let a=i[t];if(!a){e[t]=n;return}if(n==null)return;let{themeKey:o}=a;if(o===`typography`&&n===`inherit`){e[t]=n;return}let{style:s}=a;if(s){On(e,s({[t]:n,theme:r}));return}let{cssProperty:c=t,transform:l}=a,u=ur(r,o);ir(e,r,n,(n,r)=>{let i=lr(u,l,r,t);c===!1?On(n?e[n]:e,i):n?e[n][c]=i:e[c]=i})}function ii(e,t){return typeof e==`function`?e(t):e}function ai(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function oi(e,t=0,n=1){return process.env.NODE_ENV!==`production`&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),ai(e,t,n)}function si(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),process.env.NODE_ENV!==`production`&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function ci(e){if(e.type)return e;if(e.charAt(0)===`#`)return ci(si(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(process.env.NODE_ENV===`production`?Tn(9,e):`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`);let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(process.env.NODE_ENV===`production`?Tn(10,i):`MUI: unsupported \`${i}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`)}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var li=e=>{let t=ci(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},ui=(e,t)=>{try{return li(e)}catch{return t&&process.env.NODE_ENV!==`production`&&console.warn(t),e}};function di(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function fi(e){e=ci(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),di({type:s,values:c})}function pi(e){e=ci(e);let t=e.type===`hsl`||e.type===`hsla`?ci(fi(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function mi(e,t){let n=pi(e),r=pi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function hi(e,t){return e=ci(e),t=oi(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,di(e)}function gi(e,t,n){try{return hi(e,t)}catch{return n&&process.env.NODE_ENV!==`production`&&console.warn(n),e}}function _i(e,t){if(e=ci(e),t=oi(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return di(e)}function J(e,t,n){try{return _i(e,t)}catch{return n&&process.env.NODE_ENV!==`production`&&console.warn(n),e}}function vi(e,t){if(e=ci(e),t=oi(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return di(e)}function Y(e,t,n){try{return vi(e,t)}catch{return n&&process.env.NODE_ENV!==`production`&&console.warn(n),e}}function yi(e,t=.15){return pi(e)>.5?_i(e,t):vi(e,t)}function bi(e,t,n){try{return yi(e,t)}catch{return n&&process.env.NODE_ENV!==`production`&&console.warn(n),e}}var xi={black:`#000`,white:`#fff`},Si={50:`#fafafa`,100:`#f5f5f5`,200:`#eeeeee`,300:`#e0e0e0`,400:`#bdbdbd`,500:`#9e9e9e`,600:`#757575`,700:`#616161`,800:`#424242`,900:`#212121`,A100:`#f5f5f5`,A200:`#eeeeee`,A400:`#bdbdbd`,A700:`#616161`},Ci={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},wi={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},Ti={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},Ei={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},Di={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},Oi={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`};function ki(){return{text:{primary:`rgba(0, 0, 0, 0.87)`,secondary:`rgba(0, 0, 0, 0.6)`,disabled:`rgba(0, 0, 0, 0.38)`},divider:`rgba(0, 0, 0, 0.12)`,background:{paper:xi.white,default:xi.white},action:{active:`rgba(0, 0, 0, 0.54)`,hover:`rgba(0, 0, 0, 0.04)`,hoverOpacity:.04,selected:`rgba(0, 0, 0, 0.08)`,selectedOpacity:.08,disabled:`rgba(0, 0, 0, 0.26)`,disabledBackground:`rgba(0, 0, 0, 0.12)`,disabledOpacity:.38,focus:`rgba(0, 0, 0, 0.12)`,focusOpacity:.12,activatedOpacity:.12}}}var Ai=ki();function ji(){return{text:{primary:xi.white,secondary:`rgba(255, 255, 255, 0.7)`,disabled:`rgba(255, 255, 255, 0.5)`,icon:`rgba(255, 255, 255, 0.5)`},divider:`rgba(255, 255, 255, 0.12)`,background:{paper:`#121212`,default:`#121212`},action:{active:xi.white,hover:`rgba(255, 255, 255, 0.08)`,hoverOpacity:.08,selected:`rgba(255, 255, 255, 0.16)`,selectedOpacity:.16,disabled:`rgba(255, 255, 255, 0.3)`,disabledBackground:`rgba(255, 255, 255, 0.12)`,disabledOpacity:.38,focus:`rgba(255, 255, 255, 0.12)`,focusOpacity:.12,activatedOpacity:.24}}}var Mi=ji();function Ni(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=vi(e.main,i):t===`dark`&&(e.dark=_i(e.main,a)))}function Pi(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function Fi(e=`light`){return e===`dark`?{main:Ei[200],light:Ei[50],dark:Ei[400]}:{main:Ei[700],light:Ei[400],dark:Ei[800]}}function Ii(e=`light`){return e===`dark`?{main:Ci[200],light:Ci[50],dark:Ci[400]}:{main:Ci[500],light:Ci[300],dark:Ci[700]}}function Li(e=`light`){return e===`dark`?{main:wi[500],light:wi[300],dark:wi[700]}:{main:wi[700],light:wi[400],dark:wi[800]}}function Ri(e=`light`){return e===`dark`?{main:Di[400],light:Di[300],dark:Di[700]}:{main:Di[700],light:Di[500],dark:Di[900]}}function zi(e=`light`){return e===`dark`?{main:Oi[400],light:Oi[300],dark:Oi[700]}:{main:Oi[800],light:Oi[500],dark:Oi[900]}}function Bi(e=`light`){return e===`dark`?{main:Ti[400],light:Ti[300],dark:Ti[700]}:{main:`#ed6c02`,light:Ti[500],dark:Ti[900]}}function Vi(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Hi(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||Fi(t),s=e.secondary||Ii(t),c=e.error||Li(t),l=e.info||Ri(t),u=e.success||zi(t),d=e.warning||Bi(t);function f(e){if(i)return Vi(e);let t=mi(e,Mi.text.primary)>=n?Mi.text.primary:Ai.text.primary;if(process.env.NODE_ENV!==`production`){let n=mi(e,t);n<3&&console.error([`MUI: The contrast ratio of ${n}:1 for ${t} on ${e}`,`falls below the WCAG recommended absolute minimum contrast ratio of 3:1.`,`https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast`].join(`
271
+ `))}return t}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(process.env.NODE_ENV===`production`?Tn(11,t?` (${t})`:``,n):`MUI: The color${t?` (${t})`:``} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`);if(typeof e.main!=`string`)throw Error(process.env.NODE_ENV===`production`?Tn(12,t?` (${t})`:``,JSON.stringify(e.main)):`MUI: The color${t?` (${t})`:``} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n
327
272
  Did you intend to use one of the following approaches?
328
273
 
329
274
  import { green } from "@mui/material/colors";
@@ -334,27 +279,21 @@ const theme1 = createTheme({ palette: {
334
279
 
335
280
  const theme2 = createTheme({ palette: {
336
281
  primary: { main: green[500] },
337
- } });`:cn(12,T?` (${T})`:"",JSON.stringify(x.main)));return o?(Wo(o,x,"light",M,r),Wo(o,x,"dark",S,r)):(Go(x,"light",M,r),Go(x,"dark",S,r)),x.contrastText||(x.contrastText=h(x.main)),x};let g;return e==="light"?g=Os():e==="dark"&&(g=Ls()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${e}\` is not supported.`)),Rt({common:{...un},mode:e,primary:b({color:i,name:"primary"}),secondary:b({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:l,name:"error"}),warning:b({color:f,name:"warning"}),info:b({color:c,name:"info"}),success:b({color:p,name:"success"}),grey:Il,contrastThreshold:n,getContrastText:h,augmentColor:b,tonalOffset:r,...g},s)}function zl(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Fl={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Vl(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var jl=/[A-Z]|^ms/g,Hl=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ns=function(e){return e.charCodeAt(1)===45},Yo=function(e){return e!=null&&typeof e!="boolean"},Tr=Vl(function(t){return Ns(t)?t:t.replace(jl,"-$&").toLowerCase()}),Xo=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Hl,function(r,o,s){return ft={name:o,styles:s,next:ft},o})}return Fl[e]!==1&&!Ns(e)&&typeof n=="number"&&n!==0?n+"px":n};function $n(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return ft={name:o.name,styles:o.styles,next:ft},o.name;var s=n;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)ft={name:i.name,styles:i.styles,next:ft},i=i.next;var a=s.styles+";";return a}return Ul(t,e,n)}}var l=n;return l}function Ul(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=$n(t,e,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object"){var a=i;Yo(a)&&(r+=Tr(s)+":"+Xo(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&e==null)for(var l=0;l<i.length;l++)Yo(i[l])&&(r+=Tr(s)+":"+Xo(s,i[l])+";");else{var c=$n(t,e,i);switch(s){case"animation":case"animationName":{r+=Tr(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var Ko=/label:\s*([^\s;{]+)\s*(;|$)/g,ft;function Gl(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,o="";ft=void 0;var s=t[0];if(s==null||s.raw===void 0)r=!1,o+=$n(n,e,s);else{var i=s;o+=i[0]}for(var a=1;a<t.length;a++)if(o+=$n(n,e,t[a]),r){var l=s;o+=l[a]}Ko.lastIndex=0;for(var c="",p;(p=Ko.exec(o))!==null;)c+="-"+p[1];var f=zl(o)+c;return{name:f,styles:o,next:ft}}/**
338
- * @mui/styled-engine v7.3.9
339
- *
340
- * @license MIT
341
- * This source code is licensed under the MIT license found in the
342
- * LICENSE file in the root directory of this source tree.
343
- */function Wl(t,e){const n=ai(t,e);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof t=="string"?`"${t}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
344
- `)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function Yl(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const qo=[];function At(t){return qo[0]=t,Gl(qo)}const Xl=z.createContext();process.env.NODE_ENV!=="production"&&(m.node,m.bool);const Kl=()=>z.useContext(Xl)??!1;function Ir(t,e,n=!1){const r={...e};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const s=o;if(s==="components"||s==="slots")r[s]={...t[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const i=t[s],a=e[s];if(!a)r[s]=i||{};else if(!i)r[s]=a;else{r[s]={...a};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const c=l;r[s][c]=Ir(i[c],a[c],n)}}}else s==="className"&&n&&e.className?r.className=we(t?.className,e?.className):s==="style"&&n&&e.style?r.style={...t?.style,...e?.style}:r[s]===void 0&&(r[s]=t[s])}return r}const ql=z.createContext(void 0);process.env.NODE_ENV!=="production"&&(m.node,m.object);function Ql(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const o=e.components[n];return o.defaultProps?Ir(o.defaultProps,r,e.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?Ir(o,r,e.components.mergeClassNameAndStyle):r}function Zl({props:t,name:e}){const n=z.useContext(ql);return Ql({props:t,name:e,theme:{components:n}})}const Jl=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function ec(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,s=Jl(e),i=Object.keys(s);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function c(h,b){const g=i.indexOf(b);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(g!==-1&&typeof e[i[g]]=="number"?e[i[g]]:b)-r/100}${n})`}function p(h){return i.indexOf(h)+1<i.length?c(h,i[i.indexOf(h)+1]):a(h)}function f(h){const b=i.indexOf(h);return b===0?a(i[1]):b===i.length-1?l(i[b]):c(h,i[i.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:i,values:s,up:a,down:l,between:c,only:p,not:f,unit:n,...o}}const tc={borderRadius:4};function nc(t=8,e=Hr({spacing:t})){if(t.mui)return t;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const i=e(s);return typeof i=="number"?`${i}px`:i}).join(" "));return n.mui=!0,n}function rc(t,e){const n=this;if(n.vars){if(!n.colorSchemes?.[t]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(t);return r==="&"?e:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:e})}return n.palette.mode===t?e:{}}function Ds(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...i}=t,a=ec(n),l=nc(o);let c=Mt({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...tc,...s}},i);return c=ka(c),c.applyStyles=rc,c=e.reduce((p,f)=>Mt(p,f),c),c.unstable_sxConfig={...pn,...i?.unstable_sxConfig},c.unstable_sx=function(f){return Xt({sx:f,theme:this})},c}const Qo=(t,e,n,r=[])=>{let o=t;e.forEach((s,i)=>{i===e.length-1?Array.isArray(o)?o[Number(s)]=n:o&&typeof o=="object"&&(o[s]=n):o&&typeof o=="object"&&(o[s]||(o[s]=r.includes(s)?[]:{}),o=o[s])})},oc=(t,e,n)=>{function r(o,s=[],i=[]){Object.entries(o).forEach(([a,l])=>{(!n||n&&!n([...s,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...s,a],Array.isArray(l)?[...i,a]:i):e([...s,a],l,i))})}r(t)},sc=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>t.includes(r))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function Sr(t,e){const{prefix:n,shouldSkipGeneratingVar:r}=e||{},o={},s={},i={};return oc(t,(a,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const p=`--${n?`${n}-`:""}${a.join("-")}`,f=sc(a,l);Object.assign(o,{[p]:f}),Qo(s,a,`var(${p})`,c),Qo(i,a,`var(${p}, ${f})`,c)}},a=>a[0]==="vars"),{css:o,vars:s,varsWithDefaults:i}}function ic(t,e={}){const{getSelector:n=T,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:s}=e,{colorSchemes:i={},components:a,defaultColorScheme:l="light",...c}=t,{vars:p,css:f,varsWithDefaults:h}=Sr(c,e);let b=h;const g={},{[l]:d,...x}=i;if(Object.entries(x||{}).forEach(([S,w])=>{const{vars:v,css:R,varsWithDefaults:P}=Sr(w,e);b=Mt(b,P),g[S]={css:R,vars:v}}),d){const{css:S,vars:w,varsWithDefaults:v}=Sr(d,e);b=Mt(b,v),g[l]={css:S,vars:w}}function T(S,w){let v=o;if(o==="class"&&(v=".%s"),o==="data"&&(v="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(v=`[${o}="%s"]`),S){if(v==="media")return t.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${i[S]?.palette?.mode||S})`]:{":root":w}};if(v)return t.defaultColorScheme===S?`:root, ${v.replace("%s",String(S))}`:v.replace("%s",String(S))}return":root"}return{vars:b,generateThemeVars:()=>{let S={...p};return Object.entries(g).forEach(([,{vars:w}])=>{S=Mt(S,w)}),S},generateStyleSheets:()=>{const S=[],w=t.defaultColorScheme||"light";function v(N,$){Object.keys($).length&&S.push(typeof N=="string"?{[N]:{...$}}:N)}v(n(void 0,{...f}),f);const{[w]:R,...P}=g;if(R){const{css:N}=R,$=i[w]?.palette?.mode,B=!r&&$?{colorScheme:$,...N}:{...N};v(n(w,{...B}),B)}return Object.entries(P).forEach(([N,{css:$}])=>{const B=i[N]?.palette?.mode,y=!r&&B?{colorScheme:B,...$}:{...$};v(n(N,{...y}),y)}),s&&S.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),S}}}function ac(t){const e={};return Object.entries(t).forEach(r=>{const[o,s]=r;typeof s=="object"&&(e[o]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),e}function lc(t){return function(n){return t==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${n}"] &`:t==="class"?`.${n} &`:t==="data"?`[data-${n}] &`:`${t.replace("%s",n)} &`:"&"}}const cc={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function gt(t,e,n="Mui"){const r=cc[e];return r?`${n}-${r}`:`${Cs.generate(t)}-${e}`}function uc(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function dc(t){return Math.round(t*1e5)/1e5}const Zo={textTransform:"uppercase"},Jo='"Roboto", "Helvetica", "Arial", sans-serif';function fc(t,e){const{fontFamily:n=Jo,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:c,pxToRem:p,...f}=typeof e=="function"?e(t):e;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=r/14,b=p||(x=>`${x/l*h}rem`),g=(x,T,C,M,S)=>({fontFamily:n,fontWeight:x,fontSize:b(T),lineHeight:C,...n===Jo?{letterSpacing:`${dc(M/T)}em`}:{},...S,...c}),d={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(i,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(i,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(i,14,1.75,.4,Zo),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,Zo),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Rt({htmlFontSize:l,pxToRem:b,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:i,fontWeightBold:a,...d},f,{clone:!1})}const pc=.2,hc=.14,mc=.12;function Te(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${pc})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${hc})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${mc})`].join(",")}const gc=["none",Te(0,2,1,-1,0,1,1,0,0,1,3,0),Te(0,3,1,-2,0,2,2,0,0,1,5,0),Te(0,3,3,-2,0,3,4,0,0,1,8,0),Te(0,2,4,-1,0,4,5,0,0,1,10,0),Te(0,3,5,-1,0,5,8,0,0,1,14,0),Te(0,3,5,-1,0,6,10,0,0,1,18,0),Te(0,4,5,-2,0,7,10,1,0,2,16,1),Te(0,5,5,-3,0,8,10,1,0,3,14,2),Te(0,5,6,-3,0,9,12,1,0,3,16,2),Te(0,6,6,-3,0,10,14,1,0,4,18,3),Te(0,6,7,-4,0,11,15,1,0,4,20,3),Te(0,7,8,-4,0,12,17,2,0,5,22,4),Te(0,7,8,-4,0,13,19,2,0,5,24,4),Te(0,7,9,-4,0,14,21,2,0,5,26,4),Te(0,8,9,-5,0,15,22,2,0,6,28,5),Te(0,8,10,-5,0,16,24,2,0,6,30,5),Te(0,8,11,-5,0,17,26,2,0,6,32,5),Te(0,9,11,-5,0,18,28,2,0,7,34,6),Te(0,9,12,-6,0,19,29,2,0,7,36,6),Te(0,10,13,-6,0,20,31,3,0,8,38,7),Te(0,10,13,-6,0,21,33,3,0,8,40,7),Te(0,10,14,-6,0,22,35,3,0,8,42,7),Te(0,11,14,-7,0,23,36,3,0,9,44,8),Te(0,11,15,-7,0,24,38,3,0,9,46,8)],yc={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},bc={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function es(t){return`${Math.round(t)}ms`}function xc(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function vc(t){const e={...yc,...t.easing},n={...bc,...t.duration};return{getAutoHeightDuration:xc,create:(o=["all"],s={})=>{const{duration:i=n.standard,easing:a=e.easeInOut,delay:l=0,...c}=s;if(process.env.NODE_ENV!=="production"){const p=h=>typeof h=="string",f=h=>!Number.isNaN(parseFloat(h));!p(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(i)&&!p(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),p(a)||console.error('MUI: Argument "easing" must be a string.'),!f(l)&&!p(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
345
- `)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(p=>`${p} ${typeof i=="string"?i:es(i)} ${a} ${typeof l=="string"?l:es(l)}`).join(",")},...t,easing:e,duration:n}}const Tc={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Sc(t){return dt(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function $s(t={}){const e={...t};function n(r){const o=Object.entries(r);for(let s=0;s<o.length;s++){const[i,a]=o[s];!Sc(a)||i.startsWith("unstable_")?delete r[i]:dt(a)&&(r[i]={...a},n(r[i]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
346
-
347
- const theme = ${JSON.stringify(e,null,2)};
282
+ } });`);return i?(Pi(i,e,`light`,a,r),Pi(i,e,`dark`,o,r)):(Ni(e,`light`,a,r),Ni(e,`dark`,o,r)),e.contrastText||=f(e.main),e},m;return t===`light`?m=ki():t===`dark`&&(m=ji()),process.env.NODE_ENV!==`production`&&(m||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Wn({common:{...xi},mode:t,primary:p({color:o,name:`primary`}),secondary:p({color:s,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:p({color:c,name:`error`}),warning:p({color:d,name:`warning`}),info:p({color:l,name:`info`}),success:p({color:u,name:`success`}),grey:Si,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},a)}function Ui(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Wi={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Gi(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ki=!1,qi=/[A-Z]|^ms/g,Ji=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yi=function(e){return e.charCodeAt(1)===45},Xi=function(e){return e!=null&&typeof e!=`boolean`},Zi=Gi(function(e){return Yi(e)?e:e.replace(qi,`-$&`).toLowerCase()}),Qi=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(Ji,function(e,t,n){return ra={name:t,styles:n,next:ra},t})}return Wi[e]!==1&&!Yi(e)&&typeof t==`number`&&t!==0?t+`px`:t},$i=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`;function ea(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return ra={name:i.name,styles:i.styles,next:ra},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)ra={name:o.name,styles:o.styles,next:ra},o=o.next;return a.styles+`;`}return ta(e,t,n);case`function`:if(e!==void 0){var s=ra,c=n(e);return ra=s,ea(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function ta(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=ea(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:Xi(s)&&(r+=Zi(a)+`:`+Qi(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&Ki)throw Error($i);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)Xi(o[c])&&(r+=Zi(a)+`:`+Qi(a,o[c])+`;`);else{var l=ea(e,t,o);switch(a){case`animation`:case`animationName`:r+=Zi(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}var na=/label:\s*([^\s;{]+)\s*(;|$)/g,ra;function ia(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;ra=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=ea(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=ea(n,t,e[o]),r&&(i+=a[o]);na.lastIndex=0;for(var s=``,c;(c=na.exec(i))!==null;)s+=`-`+c[1];return{name:Ui(i)+s,styles:i,next:ra}}function aa(e,t){let n=(0,g.default)(e,t);return process.env.NODE_ENV===`production`?n:(...t)=>{let r=typeof e==`string`?`"${e}"`:`component`;return t.length===0?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
283
+ `)):t.some(e=>e===void 0)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...t)}}function oa(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var sa=[];function ca(e){return sa[0]=e,ia(sa)}var la=typeof window<`u`?f.useLayoutEffect:f.useEffect,ua=f.createContext();function da({value:e,...t}){return(0,m.jsx)(ua.Provider,{value:e??!0,...t})}process.env.NODE_ENV!==`production`&&(da.propTypes={children:W.default.node,value:W.default.bool});var fa=()=>f.useContext(ua)??!1,pa=f.createContext(void 0);function ma({value:e,children:t}){return(0,m.jsx)(pa.Provider,{value:e,children:t})}process.env.NODE_ENV!==`production`&&(ma.propTypes={children:W.default.node,value:W.default.object});function ha(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?xn(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?xn(i,r,t.components.mergeClassNameAndStyle):r}function ga({props:e,name:t}){return ha({props:e,name:t,theme:{components:f.useContext(pa)}})}var _a=0;function va(e){let[t,n]=f.useState(e),r=e||t;return f.useEffect(()=>{t??(_a+=1,n(`mui-${_a}`))},[t]),r}var ya={...f}.useId;function ba(e){if(ya!==void 0){let t=ya();return e??t}return va(e)}var xa={borderRadius:4};function Sa(e=8,t=xr({spacing:e})){if(e.mui)return e;let n=(...e)=>(process.env.NODE_ENV!==`production`&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `));return n.mui=!0,n}function Ca(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function wa(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=Qn(n),c=Sa(i),l=Wn({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...xa,...a}},o);return l=Xn(l),l.applyStyles=Ca,l=t.reduce((e,t)=>Wn(e,t),l),l.unstable_sxConfig={...$r,...o?.unstable_sxConfig},l.unstable_sx=function(e){return ni({sx:e,theme:this})},l.internal_cache={},l}var Ta=(e,t,n,r=[])=>{let i=e;t.forEach((e,a)=>{a===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&typeof i==`object`&&(i[e]=n):i&&typeof i==`object`&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})},Ea=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},Da=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function Oa(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return Ea(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=Da(e,t);Object.assign(i,{[r]:c}),Ta(a,e,`var(${r})`,s),Ta(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function ka(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=Oa(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=Oa(n,t);p=Wn(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=Oa(h,t);p=Wn(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=Wn(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function Aa(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function ja(e){return function(t){return e===`media`?(process.env.NODE_ENV!==`production`&&t!==`light`&&t!==`dark`&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${t}'.`),`@media (prefers-color-scheme: ${t})`):e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}var Ma={active:`active`,checked:`checked`,completed:`completed`,disabled:`disabled`,error:`error`,expanded:`expanded`,focused:`focused`,focusVisible:`focusVisible`,open:`open`,readOnly:`readOnly`,required:`required`,selected:`selected`};function Na(e,t,n=`Mui`){let r=Ma[t];return r?`${n}-${r}`:`${wn.generate(e)}-${t}`}function Pa(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function Fa(e){return Math.round(e*1e5)/1e5}var Ia={textTransform:`uppercase`},La=`"Roboto", "Helvetica", "Arial", sans-serif`;function Ra(e,t){let{fontFamily:n=La,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t;process.env.NODE_ENV!==`production`&&(typeof r!=`number`&&console.error("MUI: `fontSize` is required to be a number."),typeof c!=`number`&&console.error("MUI: `htmlFontSize` is required to be a number."));let f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===La?{letterSpacing:`${Fa(i/t)}em`}:{},...a,...l});return Wn({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,Ia),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Ia),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var za=.2,Ba=.14,Va=.12;function X(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${za})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ba})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Va})`].join(`,`)}var Ha=[`none`,X(0,2,1,-1,0,1,1,0,0,1,3,0),X(0,3,1,-2,0,2,2,0,0,1,5,0),X(0,3,3,-2,0,3,4,0,0,1,8,0),X(0,2,4,-1,0,4,5,0,0,1,10,0),X(0,3,5,-1,0,5,8,0,0,1,14,0),X(0,3,5,-1,0,6,10,0,0,1,18,0),X(0,4,5,-2,0,7,10,1,0,2,16,1),X(0,5,5,-3,0,8,10,1,0,3,14,2),X(0,5,6,-3,0,9,12,1,0,3,16,2),X(0,6,6,-3,0,10,14,1,0,4,18,3),X(0,6,7,-4,0,11,15,1,0,4,20,3),X(0,7,8,-4,0,12,17,2,0,5,22,4),X(0,7,8,-4,0,13,19,2,0,5,24,4),X(0,7,9,-4,0,14,21,2,0,5,26,4),X(0,8,9,-5,0,15,22,2,0,6,28,5),X(0,8,10,-5,0,16,24,2,0,6,30,5),X(0,8,11,-5,0,17,26,2,0,6,32,5),X(0,9,11,-5,0,18,28,2,0,7,34,6),X(0,9,12,-6,0,19,29,2,0,7,36,6),X(0,10,13,-6,0,20,31,3,0,8,38,7),X(0,10,13,-6,0,21,33,3,0,8,40,7),X(0,10,14,-6,0,22,35,3,0,8,42,7),X(0,11,14,-7,0,23,36,3,0,9,44,8),X(0,11,15,-7,0,24,38,3,0,9,46,8)],Ua={easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,easeOut:`cubic-bezier(0.0, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,sharp:`cubic-bezier(0.4, 0, 0.6, 1)`},Wa={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ga(e){return`${Math.round(e)}ms`}function Ka(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function qa(e){let t={...Ua,...e.easing},n={...Wa,...e.duration};return{getAutoHeightDuration:Ka,create:(e=[`all`],r={})=>{let{duration:i=n.standard,easing:a=t.easeInOut,delay:o=0,...s}=r;if(process.env.NODE_ENV!==`production`){let t=e=>typeof e==`string`,n=e=>!Number.isNaN(parseFloat(e));!t(e)&&!Array.isArray(e)&&console.error(`MUI: Argument "props" must be a string or Array.`),!n(i)&&!t(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),t(a)||console.error(`MUI: Argument "easing" must be a string.`),!n(o)&&!t(o)&&console.error(`MUI: Argument "delay" must be a number or a string.`),typeof r!=`object`&&console.error([`MUI: Secong argument of transition.create must be an object.`,"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
284
+ `)),Object.keys(s).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(s).join(`,`)}].`)}return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:Ga(i)} ${a} ${typeof o==`string`?o:Ga(o)}`).join(`,`)},...e,easing:t,duration:n}}var Ja={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ya(e){return Hn(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function Xa(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!Ya(a)||i.startsWith(`unstable_`)||i.startsWith(`internal_`)?delete e[i]:Hn(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
285
+
286
+ const theme = ${JSON.stringify(t,null,2)};
348
287
 
349
288
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
350
289
  theme.transitions = createTransitions(theme.transitions || {});
351
290
 
352
- export default theme;`}function ts(t){return typeof t=="number"?`${(t*100).toFixed(0)}%`:`calc((${t}) * 100%)`}const wc=t=>{if(!Number.isNaN(+t))return+t;const e=t.match(/\d*\.?\d+/g);if(!e)return 0;let n=0;for(let r=0;r<e.length;r+=1)n+=+e[r];return n};function Ec(t){Object.assign(t,{alpha(e,n){const r=this||t;return r.colorSpace?`oklch(from ${e} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${e.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:Is(e,wc(n))},lighten(e,n){const r=this||t;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${e}, #fff ${ts(n)})`:tr(e,n)},darken(e,n){const r=this||t;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${e}, #000 ${ts(n)})`:er(e,n)}})}function Or(t={},...e){const{breakpoints:n,mixins:r={},spacing:o,palette:s={},transitions:i={},typography:a={},shape:l,colorSpace:c,...p}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":cn(20));const f=Wr({...s,colorSpace:c}),h=Ds(t);let b=Rt(h,{mixins:uc(h.breakpoints,r),palette:f,shadows:gc.slice(),typography:fc(f,a),transitions:vc(i),zIndex:{...Tc}});if(b=Rt(b,p),b=e.reduce((g,d)=>Rt(g,d),b),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],d=(x,T)=>{let C;for(C in x){const M=x[C];if(g.includes(C)&&Object.keys(M).length>0){if(process.env.NODE_ENV!=="production"){const S=gt("",C);console.error([`MUI: The \`${T}\` component increases the CSS specificity of the \`${C}\` internal state.`,"You can not override it like this: ",JSON.stringify(x,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:M}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
353
- `))}x[C]={}}}};Object.keys(b.components).forEach(x=>{const T=b.components[x].styleOverrides;T&&x.startsWith("Mui")&&d(T,x)})}return b.unstable_sxConfig={...pn,...p?.unstable_sxConfig},b.unstable_sx=function(d){return Xt({sx:d,theme:this})},b.toRuntimeSource=$s,Ec(b),b}function Cc(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const _c=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=Cc(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Bs(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function zs(t){return t==="dark"?_c:[]}function Mc(t){const{palette:e={mode:"light"},opacity:n,overlays:r,colorSpace:o,...s}=t,i=Wr({...e,colorSpace:o});return{palette:i,opacity:{...Bs(i.mode),...n},overlays:r||zs(i.mode),...s}}function Rc(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Ac=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],Pc=t=>(e,n)=>{const r=t.rootSelector||":root",o=t.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const i={};return Ac(t.cssVarPrefix).forEach(a=>{i[a]=n[a],delete n[a]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:s?{[s.replace("%s",e)]:i,[`${r}, ${s.replace("%s",e)}`]:n}:{[r]:{...n,...i}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(e))}`}else if(e){if(s==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[r]:n}};if(s)return s.replace("%s",String(e))}return r};function Ic(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function _(t,e,n){!t[e]&&n&&(t[e]=n)}function sn(t){return typeof t!="string"||!t.startsWith("hsl")?t:Ps(t)}function nt(t,e){`${e}Channel`in t||(t[`${e}Channel`]=on(sn(t[e]),`MUI: Can't create \`palette.${e}Channel\` because \`palette.${e}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
354
- To suppress this warning, you need to explicitly provide the \`palette.${e}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Oc(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const Ke=t=>{try{return t()}catch{}},kc=(t="mui")=>Ge.unstable_createGetCssVar(t);function wr(t,e,n,r,o){if(!n)return;n=n===!0?{}:n;const s=o==="dark"?"dark":"light";if(!r){e[o]=Mc({...n,palette:{mode:s,...n?.palette},colorSpace:t});return}const{palette:i,...a}=Or({...r,palette:{mode:s,...n?.palette},colorSpace:t});return e[o]={...n,palette:i,opacity:{...Bs(s),...n?.opacity},overlays:n?.overlays||zs(s)},a}function Lc(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",nativeColor:i=!1,shouldSkipGeneratingVar:a=Rc,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...p}=t,f=Object.keys(n)[0],h=r||(n.light&&f!=="light"?"light":f),b=kc(s),{[h]:g,light:d,dark:x,...T}=n,C={...T};let M=g;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(M=!0),!M)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${h}\` option is either missing or invalid.`:cn(21,h));let S;i&&(S="oklch");const w=wr(S,C,M,p,h);d&&!C.light&&wr(S,C,d,void 0,"light"),x&&!C.dark&&wr(S,C,x,void 0,"dark");let v={defaultColorScheme:h,...w,cssVarPrefix:s,colorSchemeSelector:l,rootSelector:c,getCssVar:b,colorSchemes:C,font:{...ac(w.typography),...w.font},spacing:Oc(p.spacing)};Object.keys(v.colorSchemes).forEach(B=>{const y=v.colorSchemes[B].palette,A=L=>{const k=L.split("-"),V=k[1],G=k[2];return b(L,y[V][G])};y.mode==="light"&&(_(y.common,"background","#fff"),_(y.common,"onBackground","#000")),y.mode==="dark"&&(_(y.common,"background","#000"),_(y.common,"onBackground","#fff"));function E(L,k,V){if(S){let G;return L===Tt&&(G=`transparent ${((1-V)*100).toFixed(0)}%`),L===fe&&(G=`#000 ${(V*100).toFixed(0)}%`),L===pe&&(G=`#fff ${(V*100).toFixed(0)}%`),`color-mix(in ${S}, ${k}, ${G})`}return L(k,V)}if(Ic(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){_(y.Alert,"errorColor",E(fe,y.error.light,.6)),_(y.Alert,"infoColor",E(fe,y.info.light,.6)),_(y.Alert,"successColor",E(fe,y.success.light,.6)),_(y.Alert,"warningColor",E(fe,y.warning.light,.6)),_(y.Alert,"errorFilledBg",A("palette-error-main")),_(y.Alert,"infoFilledBg",A("palette-info-main")),_(y.Alert,"successFilledBg",A("palette-success-main")),_(y.Alert,"warningFilledBg",A("palette-warning-main")),_(y.Alert,"errorFilledColor",Ke(()=>y.getContrastText(y.error.main))),_(y.Alert,"infoFilledColor",Ke(()=>y.getContrastText(y.info.main))),_(y.Alert,"successFilledColor",Ke(()=>y.getContrastText(y.success.main))),_(y.Alert,"warningFilledColor",Ke(()=>y.getContrastText(y.warning.main))),_(y.Alert,"errorStandardBg",E(pe,y.error.light,.9)),_(y.Alert,"infoStandardBg",E(pe,y.info.light,.9)),_(y.Alert,"successStandardBg",E(pe,y.success.light,.9)),_(y.Alert,"warningStandardBg",E(pe,y.warning.light,.9)),_(y.Alert,"errorIconColor",A("palette-error-main")),_(y.Alert,"infoIconColor",A("palette-info-main")),_(y.Alert,"successIconColor",A("palette-success-main")),_(y.Alert,"warningIconColor",A("palette-warning-main")),_(y.AppBar,"defaultBg",A("palette-grey-100")),_(y.Avatar,"defaultBg",A("palette-grey-400")),_(y.Button,"inheritContainedBg",A("palette-grey-300")),_(y.Button,"inheritContainedHoverBg",A("palette-grey-A100")),_(y.Chip,"defaultBorder",A("palette-grey-400")),_(y.Chip,"defaultAvatarColor",A("palette-grey-700")),_(y.Chip,"defaultIconColor",A("palette-grey-700")),_(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),_(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),_(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),_(y.LinearProgress,"primaryBg",E(pe,y.primary.main,.62)),_(y.LinearProgress,"secondaryBg",E(pe,y.secondary.main,.62)),_(y.LinearProgress,"errorBg",E(pe,y.error.main,.62)),_(y.LinearProgress,"infoBg",E(pe,y.info.main,.62)),_(y.LinearProgress,"successBg",E(pe,y.success.main,.62)),_(y.LinearProgress,"warningBg",E(pe,y.warning.main,.62)),_(y.Skeleton,"bg",S?E(Tt,y.text.primary,.11):`rgba(${A("palette-text-primaryChannel")} / 0.11)`),_(y.Slider,"primaryTrack",E(pe,y.primary.main,.62)),_(y.Slider,"secondaryTrack",E(pe,y.secondary.main,.62)),_(y.Slider,"errorTrack",E(pe,y.error.main,.62)),_(y.Slider,"infoTrack",E(pe,y.info.main,.62)),_(y.Slider,"successTrack",E(pe,y.success.main,.62)),_(y.Slider,"warningTrack",E(pe,y.warning.main,.62));const L=S?E(fe,y.background.default,.6825):Cn(y.background.default,.8);_(y.SnackbarContent,"bg",L),_(y.SnackbarContent,"color",Ke(()=>S?Pr.text.primary:y.getContrastText(L))),_(y.SpeedDialAction,"fabHoverBg",Cn(y.background.paper,.15)),_(y.StepConnector,"border",A("palette-grey-400")),_(y.StepContent,"border",A("palette-grey-400")),_(y.Switch,"defaultColor",A("palette-common-white")),_(y.Switch,"defaultDisabledColor",A("palette-grey-100")),_(y.Switch,"primaryDisabledColor",E(pe,y.primary.main,.62)),_(y.Switch,"secondaryDisabledColor",E(pe,y.secondary.main,.62)),_(y.Switch,"errorDisabledColor",E(pe,y.error.main,.62)),_(y.Switch,"infoDisabledColor",E(pe,y.info.main,.62)),_(y.Switch,"successDisabledColor",E(pe,y.success.main,.62)),_(y.Switch,"warningDisabledColor",E(pe,y.warning.main,.62)),_(y.TableCell,"border",E(pe,E(Tt,y.divider,1),.88)),_(y.Tooltip,"bg",E(Tt,y.grey[700],.92))}if(y.mode==="dark"){_(y.Alert,"errorColor",E(pe,y.error.light,.6)),_(y.Alert,"infoColor",E(pe,y.info.light,.6)),_(y.Alert,"successColor",E(pe,y.success.light,.6)),_(y.Alert,"warningColor",E(pe,y.warning.light,.6)),_(y.Alert,"errorFilledBg",A("palette-error-dark")),_(y.Alert,"infoFilledBg",A("palette-info-dark")),_(y.Alert,"successFilledBg",A("palette-success-dark")),_(y.Alert,"warningFilledBg",A("palette-warning-dark")),_(y.Alert,"errorFilledColor",Ke(()=>y.getContrastText(y.error.dark))),_(y.Alert,"infoFilledColor",Ke(()=>y.getContrastText(y.info.dark))),_(y.Alert,"successFilledColor",Ke(()=>y.getContrastText(y.success.dark))),_(y.Alert,"warningFilledColor",Ke(()=>y.getContrastText(y.warning.dark))),_(y.Alert,"errorStandardBg",E(fe,y.error.light,.9)),_(y.Alert,"infoStandardBg",E(fe,y.info.light,.9)),_(y.Alert,"successStandardBg",E(fe,y.success.light,.9)),_(y.Alert,"warningStandardBg",E(fe,y.warning.light,.9)),_(y.Alert,"errorIconColor",A("palette-error-main")),_(y.Alert,"infoIconColor",A("palette-info-main")),_(y.Alert,"successIconColor",A("palette-success-main")),_(y.Alert,"warningIconColor",A("palette-warning-main")),_(y.AppBar,"defaultBg",A("palette-grey-900")),_(y.AppBar,"darkBg",A("palette-background-paper")),_(y.AppBar,"darkColor",A("palette-text-primary")),_(y.Avatar,"defaultBg",A("palette-grey-600")),_(y.Button,"inheritContainedBg",A("palette-grey-800")),_(y.Button,"inheritContainedHoverBg",A("palette-grey-700")),_(y.Chip,"defaultBorder",A("palette-grey-700")),_(y.Chip,"defaultAvatarColor",A("palette-grey-300")),_(y.Chip,"defaultIconColor",A("palette-grey-300")),_(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),_(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),_(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),_(y.LinearProgress,"primaryBg",E(fe,y.primary.main,.5)),_(y.LinearProgress,"secondaryBg",E(fe,y.secondary.main,.5)),_(y.LinearProgress,"errorBg",E(fe,y.error.main,.5)),_(y.LinearProgress,"infoBg",E(fe,y.info.main,.5)),_(y.LinearProgress,"successBg",E(fe,y.success.main,.5)),_(y.LinearProgress,"warningBg",E(fe,y.warning.main,.5)),_(y.Skeleton,"bg",S?E(Tt,y.text.primary,.13):`rgba(${A("palette-text-primaryChannel")} / 0.13)`),_(y.Slider,"primaryTrack",E(fe,y.primary.main,.5)),_(y.Slider,"secondaryTrack",E(fe,y.secondary.main,.5)),_(y.Slider,"errorTrack",E(fe,y.error.main,.5)),_(y.Slider,"infoTrack",E(fe,y.info.main,.5)),_(y.Slider,"successTrack",E(fe,y.success.main,.5)),_(y.Slider,"warningTrack",E(fe,y.warning.main,.5));const L=S?E(pe,y.background.default,.985):Cn(y.background.default,.98);_(y.SnackbarContent,"bg",L),_(y.SnackbarContent,"color",Ke(()=>S?ks.text.primary:y.getContrastText(L))),_(y.SpeedDialAction,"fabHoverBg",Cn(y.background.paper,.15)),_(y.StepConnector,"border",A("palette-grey-600")),_(y.StepContent,"border",A("palette-grey-600")),_(y.Switch,"defaultColor",A("palette-grey-300")),_(y.Switch,"defaultDisabledColor",A("palette-grey-600")),_(y.Switch,"primaryDisabledColor",E(fe,y.primary.main,.55)),_(y.Switch,"secondaryDisabledColor",E(fe,y.secondary.main,.55)),_(y.Switch,"errorDisabledColor",E(fe,y.error.main,.55)),_(y.Switch,"infoDisabledColor",E(fe,y.info.main,.55)),_(y.Switch,"successDisabledColor",E(fe,y.success.main,.55)),_(y.Switch,"warningDisabledColor",E(fe,y.warning.main,.55)),_(y.TableCell,"border",E(fe,E(Tt,y.divider,1),.68)),_(y.Tooltip,"bg",E(Tt,y.grey[700],.92))}nt(y.background,"default"),nt(y.background,"paper"),nt(y.common,"background"),nt(y.common,"onBackground"),nt(y,"divider"),Object.keys(y).forEach(L=>{const k=y[L];L!=="tonalOffset"&&k&&typeof k=="object"&&(k.main&&_(y[L],"mainChannel",on(sn(k.main))),k.light&&_(y[L],"lightChannel",on(sn(k.light))),k.dark&&_(y[L],"darkChannel",on(sn(k.dark))),k.contrastText&&_(y[L],"contrastTextChannel",on(sn(k.contrastText))),L==="text"&&(nt(y[L],"primary"),nt(y[L],"secondary")),L==="action"&&(k.active&&nt(y[L],"active"),k.selected&&nt(y[L],"selected")))})}),v=e.reduce((B,y)=>Rt(B,y),v);const R={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:Pc(v),enableContrastVars:i},{vars:P,generateThemeVars:N,generateStyleSheets:$}=ic(v,R);return v.vars=P,Object.entries(v.colorSchemes[v.defaultColorScheme]).forEach(([B,y])=>{v[B]=y}),v.generateThemeVars=N,v.generateStyleSheets=$,v.generateSpacing=function(){return Ge.createSpacing(p.spacing,Hr(this))},v.getColorSchemeSelector=lc(l),v.spacing=v.generateSpacing(),v.shouldSkipGeneratingVar=a,v.unstable_sxConfig={...pn,...p?.unstable_sxConfig},v.unstable_sx=function(y){return Xt({sx:y,theme:this})},v.toRuntimeSource=$s,v}function ns(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:Wr({...n===!0?{}:n.palette,mode:e})})}function Fs(t={},...e){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...i}=t,a=s||"light",l=o?.[a],c={...o,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in t))return Or(t,...e);let p=n;"palette"in t||c[a]&&(c[a]!==!0?p=c[a].palette:a==="dark"&&(p={mode:"dark"}));const f=Or({...t,palette:p},...e);return f.defaultColorScheme=a,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},ns(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},ns(f,"light",c.light)),f}return!n&&!("light"in c)&&a==="light"&&(c.light=!0),Lc({...i,colorSchemes:c,defaultColorScheme:a,...typeof r!="boolean"&&r},...e)}const Nc=Fs(),Vs="$$material";function js(t,e=""){return t.displayName||t.name||e}function rs(t,e,n){const r=js(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function Dc(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return js(t,"Component");if(typeof t=="object")switch(t.$$typeof){case Nn.ForwardRef:return rs(t,t.render,"ForwardRef");case Nn.Memo:return rs(t,t.type,"memo");default:return}}}function $c(t){const{variants:e,...n}=t,r={variants:e,style:At(n),isProcessed:!0};return r.style===n||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=At(o.style))}),r}const Bc=Ds();function Er(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function Et(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function zc(t){return t?(e,n)=>n[t]:null}function Fc(t,e,n){t.theme=Uc(t.theme)?n:t.theme[e]||t.theme}function In(t,e,n){const r=typeof e=="function"?e(t):e;if(Array.isArray(r))return r.flatMap(o=>In(t,o,n));if(Array.isArray(r?.variants)){let o;if(r.isProcessed)o=n?Et(r.style,n):r.style;else{const{variants:s,...i}=r;o=n?Et(At(i),n):i}return Hs(t,r.variants,[o],n)}return r?.isProcessed?n?Et(At(r.style),n):r.style:n?Et(At(r),n):r}function Hs(t,e,n=[],r=void 0){let o;e:for(let s=0;s<e.length;s+=1){const i=e[s];if(typeof i.props=="function"){if(o??={...t,...t.ownerState,ownerState:t.ownerState},!i.props(o))continue}else for(const a in i.props)if(t[a]!==i.props[a]&&t.ownerState?.[a]!==i.props[a])continue e;typeof i.style=="function"?(o??={...t,...t.ownerState,ownerState:t.ownerState},n.push(r?Et(At(i.style(o)),r):i.style(o))):n.push(r?Et(At(i.style),r):i.style)}return n}function Vc(t={}){const{themeId:e,defaultTheme:n=Bc,rootShouldForwardProp:r=Er,slotShouldForwardProp:o=Er}=t;function s(a){Fc(a,e,n)}return(a,l={})=>{Yl(a,v=>v.filter(R=>R!==Xt));const{name:c,slot:p,skipVariantsResolver:f,skipSx:h,overridesResolver:b=zc(Us(p)),...g}=l,d=c&&c.startsWith("Mui")||p?"components":"custom",x=f!==void 0?f:p&&p!=="Root"&&p!=="root"||!1,T=h||!1;let C=Er;p==="Root"||p==="root"?C=r:p?C=o:Gc(a)&&(C=void 0);const M=Wl(a,{shouldForwardProp:C,label:Hc(c,p),...g}),S=v=>{if(v.__emotion_real===v)return v;if(typeof v=="function")return function(P){return In(P,v,P.theme.modularCssLayers?d:void 0)};if(ut(v)){const R=$c(v);return function(N){return R.variants?In(N,R,N.theme.modularCssLayers?d:void 0):N.theme.modularCssLayers?Et(R.style,d):R.style}}return v},w=(...v)=>{const R=[],P=v.map(S),N=[];if(R.push(s),c&&b&&N.push(function(A){const L=A.theme.components?.[c]?.styleOverrides;if(!L)return null;const k={};for(const V in L)k[V]=In(A,L[V],A.theme.modularCssLayers?"theme":void 0);return b(A,k)}),c&&!x&&N.push(function(A){const L=A.theme?.components?.[c]?.variants;return L?Hs(A,L,[],A.theme.modularCssLayers?"theme":void 0):null}),T||N.push(Xt),Array.isArray(P[0])){const y=P.shift(),A=new Array(R.length).fill(""),E=new Array(N.length).fill("");let L;L=[...A,...y,...E],L.raw=[...A,...y.raw,...E],R.unshift(L)}const $=[...R,...P,...N],B=M(...$);return a.muiName&&(B.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(B.displayName=jc(c,p,a)),B};return M.withConfig&&(w.withConfig=M.withConfig),w}}function jc(t,e,n){return t?`${t}${jr(e||"")}`:`Styled(${Dc(n)})`}function Hc(t,e){let n;return process.env.NODE_ENV!=="production"&&t&&(n=`${t}-${Us(e||"Root")}`),n}function Uc(t){for(const e in t)return!1;return!0}function Gc(t){return typeof t=="string"&&t.charCodeAt(0)>96}function Us(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}function Yr(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const Gs=t=>Yr(t)&&t!=="classes",Ae=Vc({themeId:Vs,defaultTheme:Nc,rootShouldForwardProp:Gs});function Wc(){return wl}const We=Ge.unstable_memoTheme;process.env.NODE_ENV!=="production"&&(m.node,m.object.isRequired);function It(t){return Zl(t)}function yt(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=gt(t,o,n)}),r}function On(t){return t&&t.ownerDocument||document}const Ws=typeof window<"u"?z.useLayoutEffect:z.useEffect;let os=0;function Yc(t){const[e,n]=z.useState(t),r=t||e;return z.useEffect(()=>{e==null&&(os+=1,n(`mui-${os}`))},[e]),r}const Xc={...z},ss=Xc.useId;function Kc(t){if(ss!==void 0){const e=ss();return t??e}return Yc(t)}function qc(t){const{controlled:e,default:n,name:r,state:o="value"}=t,{current:s}=z.useRef(e!==void 0),[i,a]=z.useState(n),l=s?e:i;if(process.env.NODE_ENV!=="production"){z.useEffect(()=>{s!==(e!==void 0)&&console.error([`MUI: A component is changing the ${s?"":"un"}controlled ${o} state of ${r} to be ${s?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
355
- `))},[o,r,e]);const{current:p}=z.useRef(n);z.useEffect(()=>{!s&&JSON.stringify(n)!==JSON.stringify(p)&&console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
356
- `))},[JSON.stringify(n)])}const c=z.useCallback(p=>{s||a(p)},[]);return[l,c]}function Pt(t){const e=z.useRef(t);return Ws(()=>{e.current=t}),z.useRef((...n)=>(0,e.current)(...n)).current}function Bn(...t){const e=z.useRef(void 0),n=z.useCallback(r=>{const o=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}});return()=>{o.forEach(s=>s?.())}},t);return z.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=n(r))},t)}const Qc=m.oneOfType([m.func,m.object]);function zn(t,e){return process.env.NODE_ENV==="production"?()=>null:function(...r){return t(...r)||e(...r)}}function Zc(t){const{prototype:e={}}=t;return!!e.isReactComponent}function Jc(t,e,n,r,o){const s=t[e],i=o||e;if(s==null||typeof window>"u")return null;let a;return typeof s=="function"&&!Zc(s)&&(a="Did you accidentally provide a plain function component instead?"),a!==void 0?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const eu=zn(m.elementType,Jc);function Fn(t){try{return t.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
357
- `))}return!1}const is={};function Ys(t,e){const n=z.useRef(is);return n.current===is&&(n.current=t(e)),n}class Vn{static create(){return new Vn}static use(){const e=Ys(Vn.create).current,[n,r]=z.useState(!1);return e.shouldMount=n,e.setShouldMount=r,z.useEffect(e.mountEffect,[n]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=nu(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}function tu(){return Vn.use()}function nu(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function kr(){return kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},kr.apply(null,arguments)}function ru(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Lr(t,e){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Lr(t,e)}function ou(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Lr(t,e)}const as=Y.createContext(null);function su(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xr(t,e){var n=function(s){return e&&Y.isValidElement(s)?e(s):s},r=Object.create(null);return t&&Y.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function iu(t,e){t=t||{},e=e||{};function n(p){return p in e?e[p]:t[p]}var r=Object.create(null),o=[];for(var s in t)s in e?o.length&&(r[s]=o,o=[]):o.push(s);var i,a={};for(var l in e){if(r[l])for(i=0;i<r[l].length;i++){var c=r[l][i];a[r[l][i]]=n(c)}a[l]=n(l)}for(i=0;i<o.length;i++)a[o[i]]=n(o[i]);return a}function Ct(t,e,n){return n[e]!=null?n[e]:t.props[e]}function au(t,e){return Xr(t.children,function(n){return Y.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:Ct(n,"appear",t),enter:Ct(n,"enter",t),exit:Ct(n,"exit",t)})})}function lu(t,e,n){var r=Xr(t.children),o=iu(e,r);return Object.keys(o).forEach(function(s){var i=o[s];if(Y.isValidElement(i)){var a=s in e,l=s in r,c=e[s],p=Y.isValidElement(c)&&!c.props.in;l&&(!a||p)?o[s]=Y.cloneElement(i,{onExited:n.bind(null,i),in:!0,exit:Ct(i,"exit",t),enter:Ct(i,"enter",t)}):!l&&a&&!p?o[s]=Y.cloneElement(i,{in:!1}):l&&a&&Y.isValidElement(c)&&(o[s]=Y.cloneElement(i,{onExited:n.bind(null,i),in:c.props.in,exit:Ct(i,"exit",t),enter:Ct(i,"enter",t)}))}}),o}var cu=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},uu={component:"div",childFactory:function(e){return e}},Kr=(function(t){ou(e,t);function e(r,o){var s;s=t.call(this,r,o)||this;var i=s.handleExited.bind(su(s));return s.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},s}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(o,s){var i=s.children,a=s.handleExited,l=s.firstRender;return{children:l?au(o,a):lu(o,i,a),firstRender:!1}},n.handleExited=function(o,s){var i=Xr(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(s),this.mounted&&this.setState(function(a){var l=kr({},a.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,s=o.component,i=o.childFactory,a=ru(o,["component","childFactory"]),l=this.state.contextValue,c=cu(this.state.children).map(i);return delete a.appear,delete a.enter,delete a.exit,s===null?Y.createElement(as.Provider,{value:l},c):Y.createElement(as.Provider,{value:l},Y.createElement(s,a,c))},e})(Y.Component);Kr.propTypes=process.env.NODE_ENV!=="production"?{component:m.any,children:m.node,appear:m.bool,enter:m.bool,exit:m.bool,childFactory:m.func}:{};Kr.defaultProps=uu;const du=[];function fu(t){z.useEffect(t,du)}class qr{static create(){return new qr}currentId=null;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function pu(){const t=Ys(qr.create).current;return fu(t.disposeEffect),t}function Xs(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:i,in:a,onExited:l,timeout:c}=t,[p,f]=z.useState(!1),h=we(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),b={width:i,height:i,top:-(i/2)+s,left:-(i/2)+o},g=we(n.child,p&&n.childLeaving,r&&n.childPulsate);return!a&&!p&&f(!0),z.useEffect(()=>{if(!a&&l!=null){const d=setTimeout(l,c);return()=>{clearTimeout(d)}}},[l,a,c]),H.jsx("span",{className:h,style:b,children:H.jsx("span",{className:g})})}process.env.NODE_ENV!=="production"&&(Xs.propTypes={classes:m.object.isRequired,className:m.string,in:m.bool,onExited:m.func,pulsate:m.bool,rippleSize:m.number,rippleX:m.number,rippleY:m.number,timeout:m.number.isRequired});const Fe=yt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Nr=550,hu=80,mu=Ge.keyframes`
291
+ export default theme;`}function Za(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var Qa=e=>{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n};function $a(e){Object.assign(e,{alpha(t,n){let r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n==`string`?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,`var(--$1Channel)`)} / ${typeof n==`string`?`calc(${n})`:n})`:hi(t,Qa(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Za(n)})`:vi(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Za(n)})`:_i(t,n)}})}function eo(e={},...t){let{breakpoints:n,mixins:r={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:c,colorSpace:l,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw Error(process.env.NODE_ENV===`production`?Tn(22):"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.");let d=Hi({...a,colorSpace:l}),f=wa(e),p=Wn(f,{mixins:Pa(f.breakpoints,r),palette:d,shadows:Ha.slice(),typography:Ra(d,s),transitions:qa(o),zIndex:{...Ja}});if(p=Wn(p,u),p=t.reduce((e,t)=>Wn(e,t),p),process.env.NODE_ENV!==`production`){let e=[`active`,`checked`,`completed`,`disabled`,`error`,`expanded`,`focused`,`focusVisible`,`required`,`selected`],t=(t,n)=>{let r;for(r in t){let i=t[r];if(e.includes(r)&&Object.keys(i).length>0){if(process.env.NODE_ENV!==`production`){let e=Na(``,r);console.error([`MUI: The \`${n}\` component increases the CSS specificity of the \`${r}\` internal state.`,`You can not override it like this: `,JSON.stringify(t,null,2),``,`Instead, you need to use the '&.${e}' syntax:`,JSON.stringify({root:{[`&.${e}`]:i}},null,2),``,`https://mui.com/r/state-classes-guide`].join(`
292
+ `))}t[r]={}}}};Object.keys(p.components).forEach(e=>{let n=p.components[e].styleOverrides;n&&e.startsWith(`Mui`)&&t(n,e)})}return p.unstable_sxConfig={...$r,...u?.unstable_sxConfig},p.unstable_sx=function(e){return ni({sx:e,theme:this})},p.toRuntimeSource=Xa,$a(p),p}function to(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var no=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=to(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function ro(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function io(e){return e===`dark`?no:[]}function ao(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=Hi({...t,colorSpace:i});return{palette:o,opacity:{...ro(o.mode),...n},overlays:r||io(o.mode),...a}}function oo(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]===`palette`&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var so=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],co=e=>(t,n)=>{let r=e.rootSelector||`:root`,i=e.colorSchemeSelector,a=i;if(i===`class`&&(a=`.%s`),i===`data`&&(a=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t===`dark`){let i={};return so(e.cssVarPrefix).forEach(e=>{i[e]=n[e],delete n[e]}),a===`media`?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace(`%s`,t)]:i,[`${r}, ${a.replace(`%s`,t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!==`media`)return`${r}, ${a.replace(`%s`,String(t))}`}else if(t){if(a===`media`)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace(`%s`,String(t))}return r};function lo(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function Z(e,t,n){!e[t]&&n&&(e[t]=n)}function uo(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:fi(e)}function fo(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ui(uo(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
293
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function po(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var mo=e=>{try{return e()}catch{}},ho=(e=`mui`)=>(0,h.unstable_createGetCssVar)(e);function go(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=ao({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=eo({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...ro(a),...n?.opacity},overlays:n?.overlays||io(a)},s}function _o(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=oo,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=ho(a),{[f]:m,light:g,dark:_,...v}=n,y={...v},b=m;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(b=!0),!b)throw Error(process.env.NODE_ENV===`production`?Tn(21,f):`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`);let x;o&&(x=`oklch`);let S=go(x,y,b,u,f);g&&!y.light&&go(x,y,g,void 0,`light`),_&&!y.dark&&go(x,y,_,void 0,`dark`);let C={defaultColorScheme:f,...S,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:y,font:{...Aa(S.typography),...S.font},spacing:po(u.spacing)};Object.keys(C.colorSchemes).forEach(e=>{let t=C.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(Z(t.common,`background`,`#fff`),Z(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(Z(t.common,`background`,`#000`),Z(t.common,`onBackground`,`#fff`));function r(e,t,n){if(x){let r;return e===gi&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===J&&(r=`#000 ${(n*100).toFixed(0)}%`),e===Y&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${x}, ${t}, ${r})`}return e(t,n)}if(lo(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){Z(t.Alert,`errorColor`,r(J,o?p(`palette-error-light`):t.error.light,.6)),Z(t.Alert,`infoColor`,r(J,o?p(`palette-info-light`):t.info.light,.6)),Z(t.Alert,`successColor`,r(J,o?p(`palette-success-light`):t.success.light,.6)),Z(t.Alert,`warningColor`,r(J,o?p(`palette-warning-light`):t.warning.light,.6)),Z(t.Alert,`errorFilledBg`,n(`palette-error-main`)),Z(t.Alert,`infoFilledBg`,n(`palette-info-main`)),Z(t.Alert,`successFilledBg`,n(`palette-success-main`)),Z(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),Z(t.Alert,`errorFilledColor`,mo(()=>t.getContrastText(t.error.main))),Z(t.Alert,`infoFilledColor`,mo(()=>t.getContrastText(t.info.main))),Z(t.Alert,`successFilledColor`,mo(()=>t.getContrastText(t.success.main))),Z(t.Alert,`warningFilledColor`,mo(()=>t.getContrastText(t.warning.main))),Z(t.Alert,`errorStandardBg`,r(Y,o?p(`palette-error-light`):t.error.light,.9)),Z(t.Alert,`infoStandardBg`,r(Y,o?p(`palette-info-light`):t.info.light,.9)),Z(t.Alert,`successStandardBg`,r(Y,o?p(`palette-success-light`):t.success.light,.9)),Z(t.Alert,`warningStandardBg`,r(Y,o?p(`palette-warning-light`):t.warning.light,.9)),Z(t.Alert,`errorIconColor`,n(`palette-error-main`)),Z(t.Alert,`infoIconColor`,n(`palette-info-main`)),Z(t.Alert,`successIconColor`,n(`palette-success-main`)),Z(t.Alert,`warningIconColor`,n(`palette-warning-main`)),Z(t.AppBar,`defaultBg`,n(`palette-grey-100`)),Z(t.Avatar,`defaultBg`,n(`palette-grey-400`)),Z(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),Z(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),Z(t.Chip,`defaultBorder`,n(`palette-grey-400`)),Z(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),Z(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),Z(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),Z(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),Z(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),Z(t.LinearProgress,`primaryBg`,r(Y,o?p(`palette-primary-main`):t.primary.main,.62)),Z(t.LinearProgress,`secondaryBg`,r(Y,o?p(`palette-secondary-main`):t.secondary.main,.62)),Z(t.LinearProgress,`errorBg`,r(Y,o?p(`palette-error-main`):t.error.main,.62)),Z(t.LinearProgress,`infoBg`,r(Y,o?p(`palette-info-main`):t.info.main,.62)),Z(t.LinearProgress,`successBg`,r(Y,o?p(`palette-success-main`):t.success.main,.62)),Z(t.LinearProgress,`warningBg`,r(Y,o?p(`palette-warning-light`):t.warning.main,.62)),Z(t.Skeleton,`bg`,x?r(gi,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),Z(t.Slider,`primaryTrack`,r(Y,o?p(`palette-primary-main`):t.primary.main,.62)),Z(t.Slider,`secondaryTrack`,r(Y,o?p(`palette-secondary-main`):t.secondary.main,.62)),Z(t.Slider,`errorTrack`,r(Y,o?p(`palette-error-main`):t.error.main,.62)),Z(t.Slider,`infoTrack`,r(Y,o?p(`palette-info-main`):t.info.main,.62)),Z(t.Slider,`successTrack`,r(Y,o?p(`palette-success-main`):t.success.main,.62)),Z(t.Slider,`warningTrack`,r(Y,o?p(`palette-warning-main`):t.warning.main,.62));let e=x?r(J,o?p(`palette-background-default`):t.background.default,.6825):bi(t.background.default,.8);Z(t.SnackbarContent,`bg`,e),Z(t.SnackbarContent,`color`,mo(()=>x?Mi.text.primary:t.getContrastText(e))),Z(t.SpeedDialAction,`fabHoverBg`,bi(t.background.paper,.15)),Z(t.StepConnector,`border`,n(`palette-grey-400`)),Z(t.StepContent,`border`,n(`palette-grey-400`)),Z(t.Switch,`defaultColor`,n(`palette-common-white`)),Z(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),Z(t.Switch,`primaryDisabledColor`,r(Y,o?p(`palette-primary-main`):t.primary.main,.62)),Z(t.Switch,`secondaryDisabledColor`,r(Y,o?p(`palette-secondary-main`):t.secondary.main,.62)),Z(t.Switch,`errorDisabledColor`,r(Y,o?p(`palette-error-main`):t.error.main,.62)),Z(t.Switch,`infoDisabledColor`,r(Y,o?p(`palette-info-main`):t.info.main,.62)),Z(t.Switch,`successDisabledColor`,r(Y,o?p(`palette-success-main`):t.success.main,.62)),Z(t.Switch,`warningDisabledColor`,r(Y,o?p(`palette-warning-main`):t.warning.main,.62)),Z(t.TableCell,`border`,r(Y,gi(o?p(`palette-divider`):t.divider,1),.88)),Z(t.Tooltip,`bg`,r(gi,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){Z(t.Alert,`errorColor`,r(Y,o?p(`palette-error-light`):t.error.light,.6)),Z(t.Alert,`infoColor`,r(Y,o?p(`palette-info-light`):t.info.light,.6)),Z(t.Alert,`successColor`,r(Y,o?p(`palette-success-light`):t.success.light,.6)),Z(t.Alert,`warningColor`,r(Y,o?p(`palette-warning-light`):t.warning.light,.6)),Z(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),Z(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),Z(t.Alert,`successFilledBg`,n(`palette-success-dark`)),Z(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),Z(t.Alert,`errorFilledColor`,mo(()=>t.getContrastText(t.error.dark))),Z(t.Alert,`infoFilledColor`,mo(()=>t.getContrastText(t.info.dark))),Z(t.Alert,`successFilledColor`,mo(()=>t.getContrastText(t.success.dark))),Z(t.Alert,`warningFilledColor`,mo(()=>t.getContrastText(t.warning.dark))),Z(t.Alert,`errorStandardBg`,r(J,o?p(`palette-error-light`):t.error.light,.9)),Z(t.Alert,`infoStandardBg`,r(J,o?p(`palette-info-light`):t.info.light,.9)),Z(t.Alert,`successStandardBg`,r(J,o?p(`palette-success-light`):t.success.light,.9)),Z(t.Alert,`warningStandardBg`,r(J,o?p(`palette-warning-light`):t.warning.light,.9)),Z(t.Alert,`errorIconColor`,n(`palette-error-main`)),Z(t.Alert,`infoIconColor`,n(`palette-info-main`)),Z(t.Alert,`successIconColor`,n(`palette-success-main`)),Z(t.Alert,`warningIconColor`,n(`palette-warning-main`)),Z(t.AppBar,`defaultBg`,n(`palette-grey-900`)),Z(t.AppBar,`darkBg`,n(`palette-background-paper`)),Z(t.AppBar,`darkColor`,n(`palette-text-primary`)),Z(t.Avatar,`defaultBg`,n(`palette-grey-600`)),Z(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),Z(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),Z(t.Chip,`defaultBorder`,n(`palette-grey-700`)),Z(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),Z(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),Z(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),Z(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),Z(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),Z(t.LinearProgress,`primaryBg`,r(J,o?p(`palette-primary-main`):t.primary.main,.5)),Z(t.LinearProgress,`secondaryBg`,r(J,o?p(`palette-secondary-main`):t.secondary.main,.5)),Z(t.LinearProgress,`errorBg`,r(J,o?p(`palette-error-main`):t.error.main,.5)),Z(t.LinearProgress,`infoBg`,r(J,o?p(`palette-info-main`):t.info.main,.5)),Z(t.LinearProgress,`successBg`,r(J,o?p(`palette-success-main`):t.success.main,.5)),Z(t.LinearProgress,`warningBg`,r(J,o?p(`palette-warning-main`):t.warning.main,.5)),Z(t.Skeleton,`bg`,x?r(gi,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),Z(t.Slider,`primaryTrack`,r(J,o?p(`palette-primary-main`):t.primary.main,.5)),Z(t.Slider,`secondaryTrack`,r(J,o?p(`palette-secondary-main`):t.secondary.main,.5)),Z(t.Slider,`errorTrack`,r(J,o?p(`palette-error-main`):t.error.main,.5)),Z(t.Slider,`infoTrack`,r(J,o?p(`palette-info-main`):t.info.main,.5)),Z(t.Slider,`successTrack`,r(J,o?p(`palette-success-main`):t.success.main,.5)),Z(t.Slider,`warningTrack`,r(J,o?p(`palette-warning-light`):t.warning.main,.5));let e=x?r(Y,o?p(`palette-background-default`):t.background.default,.985):bi(t.background.default,.98);Z(t.SnackbarContent,`bg`,e),Z(t.SnackbarContent,`color`,mo(()=>x?Ai.text.primary:t.getContrastText(e))),Z(t.SpeedDialAction,`fabHoverBg`,bi(t.background.paper,.15)),Z(t.StepConnector,`border`,n(`palette-grey-600`)),Z(t.StepContent,`border`,n(`palette-grey-600`)),Z(t.Switch,`defaultColor`,n(`palette-grey-300`)),Z(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),Z(t.Switch,`primaryDisabledColor`,r(J,o?p(`palette-primary-main`):t.primary.main,.55)),Z(t.Switch,`secondaryDisabledColor`,r(J,o?p(`palette-secondary-main`):t.secondary.main,.55)),Z(t.Switch,`errorDisabledColor`,r(J,o?p(`palette-error-main`):t.error.main,.55)),Z(t.Switch,`infoDisabledColor`,r(J,o?p(`palette-info-main`):t.info.main,.55)),Z(t.Switch,`successDisabledColor`,r(J,o?p(`palette-success-main`):t.success.main,.55)),Z(t.Switch,`warningDisabledColor`,r(J,o?p(`palette-warning-light`):t.warning.main,.55)),Z(t.TableCell,`border`,r(J,gi(o?p(`palette-divider`):t.divider,1),.68)),Z(t.Tooltip,`bg`,r(gi,o?p(`palette-grey-700`):t.grey[700],.92))}o||(fo(t.background,`default`),fo(t.background,`paper`),fo(t.common,`background`),fo(t.common,`onBackground`),fo(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&Z(t[e],`mainChannel`,ui(uo(n.main))),n.light&&Z(t[e],`lightChannel`,ui(uo(n.light))),n.dark&&Z(t[e],`darkChannel`,ui(uo(n.dark))),n.contrastText&&Z(t[e],`contrastTextChannel`,ui(uo(n.contrastText))),e===`text`&&(fo(t[e],`primary`),fo(t[e],`secondary`)),e===`action`&&(n.active&&fo(t[e],`active`),n.selected&&fo(t[e],`selected`)))})}),C=t.reduce((e,t)=>Wn(e,t),C);let ee={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:co(C),enableContrastVars:o},{vars:w,generateThemeVars:T,generateStyleSheets:te}=ka(C,ee);return C.vars=w,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([e,t])=>{C[e]=t}),C.generateThemeVars=T,C.generateStyleSheets=te,C.generateSpacing=function(){return(0,h.createSpacing)(u.spacing,xr(this))},C.getColorSchemeSelector=ja(c),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...$r,...u?.unstable_sxConfig},C.unstable_sx=function(e){return ni({sx:e,theme:this})},C.internal_cache={},C.toRuntimeSource=Xa,C}function vo(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Hi({...n===!0?{}:n.palette,mode:t})})}function yo(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return eo(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=eo({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},vo(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},vo(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),_o({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var bo=yo(),xo=`$$material`;function So(e,t=``){return e.displayName||e.name||t}function Co(e,t,n){let r=So(t);return e.displayName||(r===``?n:`${n}(${r})`)}function wo(e){if(e!=null){if(typeof e==`string`)return e;if(typeof e==`function`)return So(e,`Component`);if(typeof e==`object`)switch(e.$$typeof){case Vn.ForwardRef:return Co(e,e.render,`ForwardRef`);case Vn.Memo:return Co(e,e.type,`memo`);default:return}}}function To(e){let{variants:t,...n}=e,r={variants:t,style:ca(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=ca(e.style))}),r}var Eo=wa();function Do(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function Oo(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function ko(e){return e?(t,n)=>n[e]:null}function Ao(e,t,n){e.theme=Rn(e.theme)?n:e.theme[t]||e.theme}function jo(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>jo(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Oo(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?Oo(ca(i),n):i}return Mo(e,r.variants,[t],n)}return r?.isProcessed?n?Oo(ca(r.style),n):r.style:n?Oo(ca(r),n):r}function Mo(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Oo(ca(o.style(i)),r):o.style(i))):n.push(r?Oo(ca(o.style),r):o.style)}return n}function No(e={}){let{themeId:t,defaultTheme:n=Eo,rootShouldForwardProp:r=Do,slotShouldForwardProp:i=Do}=e;function a(e){Ao(e,t,n)}return(e,t={})=>{oa(e,e=>e.filter(e=>e!==ni));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=ko(Lo(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=Do;o===`Root`||o===`root`?m=r:o?m=i:Io(e)&&(m=void 0);let h=aa(e,{shouldForwardProp:m,label:Fo(n,o),...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return jo(t,e,t.theme.modularCssLayers?d:void 0)};if(Hn(e)){let t=To(e);return function(e){return t.variants?jo(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Oo(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),s=[];if(r.push(a),n&&l&&s.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=jo(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&s.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?Mo(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||s.push(ni),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(s.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let c=h(...r,...i,...s);return e.muiName&&(c.muiName=e.muiName),process.env.NODE_ENV!==`production`&&(c.displayName=Po(n,o,e)),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function Po(e,t,n){return e?`${e}${En(t||``)}`:`Styled(${wo(n)})`}function Fo(e,t){let n;return process.env.NODE_ENV!==`production`&&e&&(n=`${e}-${Lo(t||`Root`)}`),n}function Io(e){return typeof e==`string`&&e.charCodeAt(0)>96}function Lo(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Ro(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var zo=e=>Ro(e)&&e!==`classes`,Q=No({themeId:xo,defaultTheme:bo,rootShouldForwardProp:zo}),Bo=h.unstable_memoTheme;function Vo(e){return(0,m.jsx)(ma,{...e})}process.env.NODE_ENV!==`production`&&(Vo.propTypes={children:W.default.node,value:W.default.object.isRequired});function Ho(e){return ga(e)}function Uo(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=Na(e,t,n)}),r}function Wo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var Go=Wo;function Ko(e){return e&&e.ownerDocument||document}var qo=ba;function Jo(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=f.useRef(t!==void 0),[o,s]=f.useState(n),c=a?t:o;if(process.env.NODE_ENV!==`production`){f.useEffect(()=>{a!==(t!==void 0)&&console.error([`MUI: A component is changing the ${a?``:`un`}controlled ${i} state of ${r} to be ${a?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",`More info: https://fb.me/react-controlled-components`].join(`
294
+ `))},[i,r,t]);let{current:e}=f.useRef(n);f.useEffect(()=>{!a&&JSON.stringify(n)!==JSON.stringify(e)&&console.error([`MUI: A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
295
+ `))},[JSON.stringify(n)])}return[c,f.useCallback(e=>{a||s(e)},[])]}function Yo(e){let t=f.useRef(e);return la(()=>{t.current=e}),f.useRef((...e)=>(0,t.current)(...e)).current}var Xo=Yo;function Zo(...e){let t=f.useRef(void 0),n=f.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return f.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var Qo=Zo;function $o(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}var es=W.default.oneOfType([W.default.func,W.default.object]);function ts(e,t){return process.env.NODE_ENV===`production`?()=>null:function(...n){return e(...n)||t(...n)}}function ns(e){let{prototype:t={}}=e;return!!t.isReactComponent}function rs(e,t,n,r,i){let a=e[t],o=i||t;if(a==null||typeof window>`u`)return null;let s;return typeof a==`function`&&!ns(a)&&(s=`Did you accidentally provide a plain function component instead?`),a===f.Fragment&&(s=`Did you accidentally provide a React.Fragment instead?`),s===void 0?null:Error(`Invalid ${r} \`${o}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`)}var is=ts(W.default.elementType,rs);function as(e){try{return e.matches(`:focus-visible`)}catch{process.env.NODE_ENV!==`production`&&!window.navigator.userAgent.includes(`jsdom`)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.",`Some components rely on this feature to work properly.`].join(`
296
+ `))}return!1}function os(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return f.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}var ss={};function cs(e){let{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:i=!1,disabled:a,type:o,hasFormAction:s=!1,tabIndex:c=0,focusableWhenDisabled:l,stopEventPropagation:u=!1,onBeforeKeyDown:d,onBeforeKeyUp:p}=e,m=f.useRef(null),h=l===!0,g=os({focusableWhenDisabled:h,disabled:a,isNativeButton:t,tabIndex:c});process.env.NODE_ENV!==`production`&&f.useEffect(()=>{let e=m.current;if(e==null)return;let t=e.tagName===`BUTTON`;if(n!==void 0){n&&!t&&console.error("MUI: A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Render a real <button> or set `nativeButton` to `false`."),!n&&t&&console.error("MUI: A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while additionally applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Render a non-<button> such as <div>, or set `nativeButton` to `true`.");return}i||(r&&!t&&console.error("MUI: A component rendering a native <button> resolved to a non-<button> element, but `nativeButton={false}` was not specified and the resolved root is a non-<button>. When rendering a custom component, set `nativeButton={false}` explicitly or render a <button> element."),!r&&t&&console.error("MUI: A component that acts as a non-native button resolved to a native <button> element, but `nativeButton={true}` was not specified. When rendering a custom component, set `nativeButton={true}` explicitly or render a non-<button> element."))},[i,r,n]);let _=f.useCallback(()=>{let e=m.current;return e==null?t:e.tagName===`BUTTON`?!0:!!(e.tagName===`A`&&e.href)},[t]),v=f.useMemo(()=>{let e=h?{}:{tabIndex:a?-1:c};return t?(e.type=o===void 0&&!s?`button`:o,h||(e.disabled=a)):(e.role=`button`,!h&&a&&(e[`aria-disabled`]=a)),h?{...e,...g}:e},[a,h,g,s,t,c,o]);return{getButtonProps:f.useCallback((e=ss)=>{let{onClick:t,onKeyDown:n,onKeyUp:r,...i}=e,o=e=>{if(u&&e.stopPropagation(),a){e.preventDefault();return}t?.(e)},s=e=>{if(h&&g.onKeyDown(e),!a&&(d?.(e),n?.(e),!(e.target!==e.currentTarget||_()))){if(e.key===` `){e.preventDefault();return}e.key===`Enter`&&(e.preventDefault(),e.currentTarget.click())}},c=e=>{a||(p?.(e),r?.(e),e.target===e.currentTarget&&!_()&&e.key===` `&&!e.defaultPrevented&&e.currentTarget.click())};return{...v,...i,onClick:o,onKeyDown:s,onKeyUp:c}},[v,a,h,g,_,d,p,u]),rootRef:m}}var ls={};function us(e,t){let n=f.useRef(ls);return n.current===ls&&(n.current=e(t)),n}var ds=class e{static create(){return new e}static use(){let t=us(e.create).current,[n,r]=f.useState(!1);return t.shouldMount=n,t.setShouldMount=r,f.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=ps(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function fs(){return ds.use()}function ps(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ms.apply(null,arguments)}function hs(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gs(e,t){return gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gs(e,t)}function _s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gs(e,t)}var vs=d.default.createContext(null);function ys(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function bs(e,t){var n=function(e){return t&&(0,d.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&d.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function xs(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Ss(e,t,n){return n[t]==null?e.props[t]:n[t]}function Cs(e,t){return bs(e.children,function(n){return(0,d.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Ss(n,`appear`,e),enter:Ss(n,`enter`,e),exit:Ss(n,`exit`,e)})})}function ws(e,t,n){var r=bs(e.children),i=xs(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,d.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,d.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,d.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:Ss(o,`exit`,e),enter:Ss(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,d.cloneElement)(o,{in:!1}):c&&s&&(0,d.isValidElement)(l)&&(i[a]=(0,d.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:Ss(o,`exit`,e),enter:Ss(o,`enter`,e)}))}}),i}var Ts=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Es={component:`div`,childFactory:function(e){return e}},Ds=function(e){_s(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(ys(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Cs(e,r):ws(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=bs(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=ms({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=hs(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Ts(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?d.default.createElement(vs.Provider,{value:i},a):d.default.createElement(vs.Provider,{value:i},d.default.createElement(t,r,a))},t}(d.default.Component);Ds.propTypes=process.env.NODE_ENV===`production`?{}:{component:W.default.any,children:W.default.node,appear:W.default.bool,enter:W.default.bool,exit:W.default.bool,childFactory:W.default.func},Ds.defaultProps=Es;var Os=[];function ks(e){f.useEffect(e,Os)}var As=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function js(){let e=us(As.create).current;return ks(e.disposeEffect),e}function Ms(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=f.useState(!1),p=U(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),h={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},g=U(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),f.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,m.jsx)(`span`,{className:p,style:h,children:(0,m.jsx)(`span`,{className:g})})}process.env.NODE_ENV!==`production`&&(Ms.propTypes={classes:W.default.object.isRequired,className:W.default.string,in:W.default.bool,onExited:W.default.func,pulsate:W.default.bool,rippleSize:W.default.number,rippleX:W.default.number,rippleY:W.default.number,timeout:W.default.number.isRequired});var Ns=Uo(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),Ps=550,Fs=h.keyframes`
358
297
  0% {
359
298
  transform: scale(0);
360
299
  opacity: 0.1;
@@ -364,7 +303,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${e}Chann
364
303
  transform: scale(1);
365
304
  opacity: 0.3;
366
305
  }
367
- `,gu=Ge.keyframes`
306
+ `,Is=h.keyframes`
368
307
  0% {
369
308
  opacity: 1;
370
309
  }
@@ -372,7 +311,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${e}Chann
372
311
  100% {
373
312
  opacity: 0;
374
313
  }
375
- `,yu=Ge.keyframes`
314
+ `,Ls=h.keyframes`
376
315
  0% {
377
316
  transform: scale(1);
378
317
  }
@@ -384,23 +323,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${e}Chann
384
323
  100% {
385
324
  transform: scale(1);
386
325
  }
387
- `,bu=Ae("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),xu=Ae(Xs,{name:"MuiTouchRipple",slot:"Ripple"})`
326
+ `,Rs=Q(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),zs=Q(Ms,{name:`MuiTouchRipple`,slot:`Ripple`})`
388
327
  opacity: 0;
389
328
  position: absolute;
390
329
 
391
- &.${Fe.rippleVisible} {
330
+ &.${Ns.rippleVisible} {
392
331
  opacity: 0.3;
393
332
  transform: scale(1);
394
- animation-name: ${mu};
395
- animation-duration: ${Nr}ms;
396
- animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
333
+ animation-name: ${Fs};
334
+ animation-duration: ${Ps}ms;
335
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
397
336
  }
398
337
 
399
- &.${Fe.ripplePulsate} {
400
- animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
338
+ &.${Ns.ripplePulsate} {
339
+ animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
401
340
  }
402
341
 
403
- & .${Fe.child} {
342
+ & .${Ns.child} {
404
343
  opacity: 1;
405
344
  display: block;
406
345
  width: 100%;
@@ -409,25 +348,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${e}Chann
409
348
  background-color: currentColor;
410
349
  }
411
350
 
412
- & .${Fe.childLeaving} {
351
+ & .${Ns.childLeaving} {
413
352
  opacity: 0;
414
- animation-name: ${gu};
415
- animation-duration: ${Nr}ms;
416
- animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
353
+ animation-name: ${Is};
354
+ animation-duration: ${Ps}ms;
355
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
417
356
  }
418
357
 
419
- & .${Fe.childPulsate} {
358
+ & .${Ns.childPulsate} {
420
359
  position: absolute;
421
360
  /* @noflip */
422
361
  left: 0px;
423
362
  top: 0;
424
- animation-name: ${yu};
363
+ animation-name: ${Ls};
425
364
  animation-duration: 2500ms;
426
- animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
365
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
427
366
  animation-iteration-count: infinite;
428
367
  animation-delay: 200ms;
429
368
  }
430
- `,Ks=z.forwardRef(function(e,n){const r=It({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:s={},className:i,...a}=r,[l,c]=z.useState([]),p=z.useRef(0),f=z.useRef(null);z.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=z.useRef(!1),b=pu(),g=z.useRef(null),d=z.useRef(null),x=z.useCallback(S=>{const{pulsate:w,rippleX:v,rippleY:R,rippleSize:P,cb:N}=S;c($=>[...$,H.jsx(xu,{classes:{ripple:we(s.ripple,Fe.ripple),rippleVisible:we(s.rippleVisible,Fe.rippleVisible),ripplePulsate:we(s.ripplePulsate,Fe.ripplePulsate),child:we(s.child,Fe.child),childLeaving:we(s.childLeaving,Fe.childLeaving),childPulsate:we(s.childPulsate,Fe.childPulsate)},timeout:Nr,pulsate:w,rippleX:v,rippleY:R,rippleSize:P},p.current)]),p.current+=1,f.current=N},[s]),T=z.useCallback((S={},w={},v=()=>{})=>{const{pulsate:R=!1,center:P=o||w.pulsate,fakeElement:N=!1}=w;if(S?.type==="mousedown"&&h.current){h.current=!1;return}S?.type==="touchstart"&&(h.current=!0);const $=N?null:d.current,B=$?$.getBoundingClientRect():{width:0,height:0,left:0,top:0};let y,A,E;if(P||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)y=Math.round(B.width/2),A=Math.round(B.height/2);else{const{clientX:L,clientY:k}=S.touches&&S.touches.length>0?S.touches[0]:S;y=Math.round(L-B.left),A=Math.round(k-B.top)}if(P)E=Math.sqrt((2*B.width**2+B.height**2)/3),E%2===0&&(E+=1);else{const L=Math.max(Math.abs(($?$.clientWidth:0)-y),y)*2+2,k=Math.max(Math.abs(($?$.clientHeight:0)-A),A)*2+2;E=Math.sqrt(L**2+k**2)}S?.touches?g.current===null&&(g.current=()=>{x({pulsate:R,rippleX:y,rippleY:A,rippleSize:E,cb:v})},b.start(hu,()=>{g.current&&(g.current(),g.current=null)})):x({pulsate:R,rippleX:y,rippleY:A,rippleSize:E,cb:v})},[o,x,b]),C=z.useCallback(()=>{T({},{pulsate:!0})},[T]),M=z.useCallback((S,w)=>{if(b.clear(),S?.type==="touchend"&&g.current){g.current(),g.current=null,b.start(0,()=>{M(S,w)});return}g.current=null,c(v=>v.length>0?v.slice(1):v),f.current=w},[b]);return z.useImperativeHandle(n,()=>({pulsate:C,start:T,stop:M}),[C,T,M]),H.jsx(bu,{className:we(Fe.root,s.root,i),ref:d,...a,children:H.jsx(Kr,{component:null,exit:!0,children:l})})});process.env.NODE_ENV!=="production"&&(Ks.propTypes={center:m.bool,classes:m.object,className:m.string});function vu(t){return gt("MuiButtonBase",t)}const Tu=yt("MuiButtonBase",["root","disabled","focusVisible"]),Su=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,i=Kt({root:["root",e&&"disabled",n&&"focusVisible"]},vu,o);return n&&r&&(i.root+=` ${r}`),i},wu=Ae("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Tu.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),qs=z.forwardRef(function(e,n){const r=It({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:s=!1,children:i,className:a,component:l="button",disabled:c=!1,disableRipple:p=!1,disableTouchRipple:f=!1,focusRipple:h=!1,focusVisibleClassName:b,LinkComponent:g="a",onBlur:d,onClick:x,onContextMenu:T,onDragLeave:C,onFocus:M,onFocusVisible:S,onKeyDown:w,onKeyUp:v,onMouseDown:R,onMouseLeave:P,onMouseUp:N,onTouchEnd:$,onTouchMove:B,onTouchStart:y,tabIndex:A=0,TouchRippleProps:E,touchRippleRef:L,type:k,...V}=r,G=z.useRef(null),W=tu(),I=Bn(W.ref,L),[O,U]=z.useState(!1);c&&O&&U(!1),z.useImperativeHandle(o,()=>({focusVisible:()=>{U(!0),G.current.focus()}}),[]);const X=W.shouldMount&&!p&&!c;z.useEffect(()=>{O&&h&&!p&&W.pulsate()},[p,h,O,W]);const K=rt(W,"start",R,f),re=rt(W,"stop",T,f),Q=rt(W,"stop",C,f),Z=rt(W,"stop",N,f),J=rt(W,"stop",q=>{O&&q.preventDefault(),P&&P(q)},f),oe=rt(W,"start",y,f),ee=rt(W,"stop",$,f),ve=rt(W,"stop",B,f),D=rt(W,"stop",q=>{Fn(q.target)||U(!1),d&&d(q)},!1),he=Pt(q=>{G.current||(G.current=q.currentTarget),Fn(q.target)&&(U(!0),S&&S(q)),M&&M(q)}),Oe=()=>{const q=G.current;return l&&l!=="button"&&!(q.tagName==="A"&&q.href)},st=Pt(q=>{h&&!q.repeat&&O&&q.key===" "&&W.stop(q,()=>{W.start(q)}),q.target===q.currentTarget&&Oe()&&q.key===" "&&q.preventDefault(),w&&w(q),q.target===q.currentTarget&&Oe()&&q.key==="Enter"&&!c&&(q.preventDefault(),x&&x(q))}),Ot=Pt(q=>{h&&q.key===" "&&O&&!q.defaultPrevented&&W.stop(q,()=>{W.pulsate(q)}),v&&v(q),x&&q.target===q.currentTarget&&Oe()&&q.key===" "&&!q.defaultPrevented&&x(q)});let Me=l;Me==="button"&&(V.href||V.to)&&(Me=g);const Ue={};Me==="button"?(Ue.type=k===void 0?"button":k,Ue.disabled=c):(!V.href&&!V.to&&(Ue.role="button"),c&&(Ue["aria-disabled"]=c));const kt=Bn(n,G),bt={...r,centerRipple:s,component:l,disabled:c,disableRipple:p,disableTouchRipple:f,focusRipple:h,tabIndex:A,focusVisible:O},Lt=Su(bt);return H.jsxs(wu,{as:Me,className:we(Lt.root,a),ownerState:bt,onBlur:D,onClick:x,onContextMenu:re,onFocus:he,onKeyDown:st,onKeyUp:Ot,onMouseDown:K,onMouseLeave:J,onMouseUp:Z,onDragLeave:Q,onTouchEnd:ee,onTouchMove:ve,onTouchStart:oe,ref:kt,tabIndex:c?-1:A,type:k,...Ue,...V,children:[i,X?H.jsx(Ks,{ref:I,center:s,...E}):null]})});function rt(t,e,n,r=!1){return Pt(o=>(n&&n(o),r||t[e](o),!0))}process.env.NODE_ENV!=="production"&&(qs.propTypes={action:Qc,centerRipple:m.bool,children:m.node,classes:m.object,className:m.string,component:eu,disabled:m.bool,disableRipple:m.bool,disableTouchRipple:m.bool,focusRipple:m.bool,focusVisibleClassName:m.string,href:m.any,LinkComponent:m.elementType,onBlur:m.func,onClick:m.func,onContextMenu:m.func,onDragLeave:m.func,onFocus:m.func,onFocusVisible:m.func,onKeyDown:m.func,onKeyUp:m.func,onMouseDown:m.func,onMouseLeave:m.func,onMouseUp:m.func,onTouchEnd:m.func,onTouchMove:m.func,onTouchStart:m.func,sx:m.oneOfType([m.arrayOf(m.oneOfType([m.func,m.object,m.bool])),m.func,m.object]),tabIndex:m.number,TouchRippleProps:m.object,touchRippleRef:m.oneOfType([m.func,m.shape({current:m.shape({pulsate:m.func.isRequired,start:m.func.isRequired,stop:m.func.isRequired})})]),type:m.oneOfType([m.oneOf(["button","reset","submit"]),m.string])});function Eu(t){return typeof t.main=="string"}function Cu(t,e=[]){if(!Eu(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function ht(t=[]){return([,e])=>e&&Cu(e,t)}function _u(t){return gt("MuiCircularProgress",t)}yt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const lt=44,Dr=Ge.keyframes`
369
+ `,Bs=f.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:i,...a}=Ho({props:e,name:`MuiTouchRipple`}),[o,s]=f.useState([]),c=f.useRef(0),l=f.useRef(null);f.useEffect(()=>{l.current&&=(l.current(),null)},[o]);let u=f.useRef(!1),d=js(),p=f.useRef(null),h=f.useRef(null),g=f.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:i,rippleSize:a,cb:o}=e;s(e=>[...e,(0,m.jsx)(zs,{classes:{ripple:U(r.ripple,Ns.ripple),rippleVisible:U(r.rippleVisible,Ns.rippleVisible),ripplePulsate:U(r.ripplePulsate,Ns.ripplePulsate),child:U(r.child,Ns.child),childLeaving:U(r.childLeaving,Ns.childLeaving),childPulsate:U(r.childPulsate,Ns.childPulsate)},timeout:Ps,pulsate:t,rippleX:n,rippleY:i,rippleSize:a},c.current)]),c.current+=1,l.current=o},[r]),_=f.useCallback((e={},t={},r=()=>{})=>{let{pulsate:i=!1,center:a=n||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&u.current){u.current=!1;return}e?.type===`touchstart`&&(u.current=!0);let s=o?null:h.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0},l,f,m;if(a||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)l=Math.round(c.width/2),f=Math.round(c.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),f=Math.round(n-c.top)}if(a)m=Math.sqrt((2*c.width**2+c.height**2)/3),m%2==0&&(m+=1);else{let e=Math.max(Math.abs((s?s.clientWidth:0)-l),l)*2+2,t=Math.max(Math.abs((s?s.clientHeight:0)-f),f)*2+2;m=Math.sqrt(e**2+t**2)}e?.touches?p.current===null&&(p.current=()=>{g({pulsate:i,rippleX:l,rippleY:f,rippleSize:m,cb:r})},d.start(80,()=>{p.current&&=(p.current(),null)})):g({pulsate:i,rippleX:l,rippleY:f,rippleSize:m,cb:r})},[n,g,d]),v=f.useCallback(()=>{_({},{pulsate:!0})},[_]),y=f.useCallback((e,t)=>{if(d.clear(),e?.type===`touchend`&&p.current){p.current(),p.current=null,d.start(0,()=>{y(e,t)});return}p.current=null,s(e=>e.length>0?e.slice(1):e),l.current=t},[d]);return f.useImperativeHandle(t,()=>({pulsate:v,start:_,stop:y}),[v,_,y]),(0,m.jsx)(Rs,{className:U(Ns.root,r.root,i),ref:h,...a,children:(0,m.jsx)(Ds,{component:null,exit:!0,children:o})})});process.env.NODE_ENV!==`production`&&(Bs.propTypes={center:W.default.bool,classes:W.default.object,className:W.default.string});function Vs(e){return Na(`MuiButtonBase`,e)}var Hs=Uo(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),Us=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,o=Sn({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},Vs,a);return n&&!i&&r&&(o.root+=` ${r}`),o},Ws=Q(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${Hs.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),Gs=f.forwardRef(function(e,t){let n=Ho({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:p,focusableWhenDisabled:h,suppressFocusVisible:g=!1,internalNativeButton:_,LinkComponent:v=`a`,nativeButton:y,onBlur:b,onClick:x,onContextMenu:S,onDragLeave:C,onFocus:ee,onFocusVisible:w,onKeyDown:T,onKeyUp:te,onMouseDown:E,onMouseLeave:D,onMouseUp:O,onTouchEnd:ne,onTouchMove:k,onTouchStart:A,tabIndex:j=0,TouchRippleProps:M,touchRippleRef:re,type:N,...P}=n,ie=!!(P.href||P.to),F=!!P.formAction,ae=s;ae===`button`&&ie&&(ae=v);let oe=typeof ae==`string`?ae===`button`:_??!1,I=y??oe,L=fs(),se=Qo(L.ref,re),[ce,R]=f.useState(!1);(c||g)&&ce&&R(!1);let le=Xo(e=>{d&&!e.repeat&&ce&&e.key===` `&&L.stop(e,()=>{L.start(e)})}),ue=Xo(e=>{d&&e.key===` `&&ce&&!e.defaultPrevented&&L.stop(e,()=>{L.pulsate(e)})}),{getButtonProps:de,rootRef:z}=cs({nativeButton:I,nativeButtonProp:y,internalNativeButton:oe,allowInferredHostMismatch:ie||typeof ae==`string`,disabled:c,type:N,hasFormAction:F,tabIndex:j,onBeforeKeyDown:le,onBeforeKeyUp:ue}),{onClick:fe,onKeyDown:pe,onKeyUp:me,...he}=de({onClick:x,onKeyDown:T,onKeyUp:te});f.useImperativeHandle(r,()=>({focusVisible:()=>{R(!0),z.current.focus()}}),[z]);let ge=L.shouldMount&&!l&&!c;f.useEffect(()=>{ce&&d&&!l&&L.pulsate()},[l,d,ce,L]);let _e=Ks(L,`start`,E,u),ve=Ks(L,`stop`,S,u),ye=Ks(L,`stop`,C,u),be=Ks(L,`stop`,O,u),xe=Ks(L,`stop`,e=>{ce&&e.preventDefault(),D&&D(e)},u),Se=Ks(L,`start`,A,u),Ce=Ks(L,`stop`,ne,u),we=Ks(L,`stop`,k,u),Te=Ks(L,`stop`,e=>{as(e.target)||R(!1),b&&b(e)},!1),Ee=Xo(e=>{z.current||=e.currentTarget,!g&&as(e.target)&&(R(!0),w&&w(e)),ee&&ee(e)}),De={};ie&&(De.tabIndex=c?-1:j,c&&(De[`aria-disabled`]=c),De.type=N);let Oe=Qo(t,z),ke={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,suppressFocusVisible:g,tabIndex:j,focusVisible:ce},Ae=Us(ke);return(0,m.jsxs)(Ws,{as:ae,className:U(Ae.root,o),ownerState:ke,onBlur:Te,onClick:fe,onContextMenu:ve,onFocus:Ee,onKeyDown:pe,onKeyUp:me,onMouseDown:_e,onMouseLeave:xe,onMouseUp:be,onDragLeave:ye,onTouchEnd:Ce,onTouchMove:we,onTouchStart:Se,ref:Oe,...ie?De:he,...P,children:[a,ge?(0,m.jsx)(Bs,{ref:se,center:i,...M}):null]})});function Ks(e,t,n,r=!1){return Xo(i=>(n&&n(i),r||e[t](i),!0))}process.env.NODE_ENV!==`production`&&(Gs.propTypes={action:es,centerRipple:W.default.bool,children:W.default.node,classes:W.default.object,className:W.default.string,component:is,disabled:W.default.bool,disableRipple:W.default.bool,disableTouchRipple:W.default.bool,focusRipple:W.default.bool,focusVisibleClassName:W.default.string,formAction:W.default.oneOfType([W.default.func,W.default.string]),href:W.default.any,LinkComponent:W.default.elementType,nativeButton:W.default.bool,onBlur:W.default.func,onClick:W.default.func,onContextMenu:W.default.func,onDragLeave:W.default.func,onFocus:W.default.func,onFocusVisible:W.default.func,onKeyDown:W.default.func,onKeyUp:W.default.func,onMouseDown:W.default.func,onMouseLeave:W.default.func,onMouseUp:W.default.func,onTouchEnd:W.default.func,onTouchMove:W.default.func,onTouchStart:W.default.func,sx:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.func,W.default.object,W.default.bool])),W.default.func,W.default.object]),tabIndex:W.default.number,TouchRippleProps:W.default.object,touchRippleRef:W.default.oneOfType([W.default.func,W.default.shape({current:W.default.shape({pulsate:W.default.func.isRequired,start:W.default.func.isRequired,stop:W.default.func.isRequired})})]),type:W.default.string});function qs(e){return typeof e.main==`string`}function Js(e,t=[]){if(!qs(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Ys(e=[]){return([,t])=>t&&Js(t,e)}function Xs(e){return Na(`MuiCircularProgress`,e)}Uo(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var Zs=44,Qs=h.keyframes`
431
370
  0% {
432
371
  transform: rotate(0deg);
433
372
  }
@@ -435,7 +374,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${e}Chann
435
374
  100% {
436
375
  transform: rotate(360deg);
437
376
  }
438
- `,$r=Ge.keyframes`
377
+ `,$s=h.keyframes`
439
378
  0% {
440
379
  stroke-dasharray: 1px, 200px;
441
380
  stroke-dashoffset: 0;
@@ -450,8 +389,8 @@ To suppress this warning, you need to explicitly provide the \`palette.${e}Chann
450
389
  stroke-dasharray: 1px, 200px;
451
390
  stroke-dashoffset: -126px;
452
391
  }
453
- `,Mu=typeof Dr!="string"?Ge.css`
454
- animation: ${Dr} 1.4s linear infinite;
455
- `:null,Ru=typeof $r!="string"?Ge.css`
456
- animation: ${$r} 1.4s ease-in-out infinite;
457
- `:null,Au=t=>{const{classes:e,variant:n,color:r,disableShrink:o}=t,s={root:["root",n,`color${ne(r)}`],svg:["svg"],circle:["circle",`circle${ne(n)}`,o&&"circleDisableShrink"]};return Kt(s,_u,e)},Pu=Ae("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${ne(n.color)}`]]}})(We(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Mu||{animation:`${Dr} 1.4s linear infinite`}},...Object.entries(t.palette).filter(ht()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),Iu=Ae("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),Ou=Ae("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${ne(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(We(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:Ru||{animation:`${$r} 1.4s ease-in-out infinite`}}]}))),Qs=z.forwardRef(function(e,n){const r=It({props:e,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:i=!1,size:a=40,style:l,thickness:c=3.6,value:p=0,variant:f="indeterminate",...h}=r,b={...r,color:s,disableShrink:i,size:a,thickness:c,value:p,variant:f},g=Au(b),d={},x={},T={};if(f==="determinate"){const C=2*Math.PI*((lt-c)/2);d.strokeDasharray=C.toFixed(3),T["aria-valuenow"]=Math.round(p),d.strokeDashoffset=`${((100-p)/100*C).toFixed(3)}px`,x.transform="rotate(-90deg)"}return H.jsx(Pu,{className:we(g.root,o),style:{width:a,height:a,...x,...l},ownerState:b,ref:n,role:"progressbar",...T,...h,children:H.jsx(Iu,{className:g.svg,ownerState:b,viewBox:`${lt/2} ${lt/2} ${lt} ${lt}`,children:H.jsx(Ou,{className:g.circle,style:d,ownerState:b,cx:lt,cy:lt,r:(lt-c)/2,fill:"none",strokeWidth:c})})})});process.env.NODE_ENV!=="production"&&(Qs.propTypes={classes:m.object,className:m.string,color:m.oneOfType([m.oneOf(["inherit","primary","secondary","error","info","success","warning"]),m.string]),disableShrink:zn(m.bool,t=>t.disableShrink&&t.variant&&t.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:m.oneOfType([m.number,m.string]),style:m.object,sx:m.oneOfType([m.arrayOf(m.oneOfType([m.func,m.object,m.bool])),m.func,m.object]),thickness:m.number,value:m.number,variant:m.oneOf(["determinate","indeterminate"])});function ku(t){return gt("MuiButton",t)}const St=yt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Qr=z.createContext({});process.env.NODE_ENV!=="production"&&(Qr.displayName="ButtonGroupContext");const Zr=z.createContext(void 0);process.env.NODE_ENV!=="production"&&(Zr.displayName="ButtonGroupButtonContext");const Lu=t=>{const{color:e,disableElevation:n,fullWidth:r,size:o,variant:s,loading:i,loadingPosition:a,classes:l}=t,c={root:["root",i&&"loading",s,`${s}${ne(e)}`,`size${ne(o)}`,`${s}Size${ne(o)}`,`color${ne(e)}`,n&&"disableElevation",r&&"fullWidth",i&&`loadingPosition${ne(a)}`],startIcon:["icon","startIcon",`iconSize${ne(o)}`],endIcon:["icon","endIcon",`iconSize${ne(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},p=Kt(c,ku,l);return{...l,...p}},Zs=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Nu=Ae(qs,{shouldForwardProp:t=>Gs(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${ne(n.color)}`],e[`size${ne(n.size)}`],e[`${n.variant}Size${ne(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(We(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],n=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${St.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${St.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${St.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${St.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(ht()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(t.vars||t).palette[r].main,"--variant-outlinedColor":(t.vars||t).palette[r].main,"--variant-outlinedBorder":t.alpha((t.vars||t).palette[r].main,.5),"--variant-containedColor":(t.vars||t).palette[r].contrastText,"--variant-containedBg":(t.vars||t).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[r].dark,"--variant-textBg":t.alpha((t.vars||t).palette[r].main,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[r].main,"--variant-outlinedBg":t.alpha((t.vars||t).palette[r].main,(t.vars||t).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${St.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${St.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${St.loading}`]:{color:"transparent"}}}]}})),Du=Ae("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${ne(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Zs]})),$u=Ae("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${ne(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Zs]})),Bu=Ae("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),ls=Ae("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Ut=z.forwardRef(function(e,n){const r=z.useContext(Qr),o=z.useContext(Zr),s=Es(r,e),i=It({props:s,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:p,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:b=!1,endIcon:g,focusVisibleClassName:d,fullWidth:x=!1,id:T,loading:C=null,loadingIndicator:M,loadingPosition:S="center",size:w="medium",startIcon:v,type:R,variant:P="text",...N}=i,$=Kc(T),B=M??H.jsx(Qs,{"aria-labelledby":$,color:"inherit",size:16}),y={...i,color:l,component:c,disabled:f,disableElevation:h,disableFocusRipple:b,fullWidth:x,loading:C,loadingIndicator:B,loadingPosition:S,size:w,type:R,variant:P},A=Lu(y),E=(v||C&&S==="start")&&H.jsx(Du,{className:A.startIcon,ownerState:y,children:v||H.jsx(ls,{className:A.loadingIconPlaceholder,ownerState:y})}),L=(g||C&&S==="end")&&H.jsx($u,{className:A.endIcon,ownerState:y,children:g||H.jsx(ls,{className:A.loadingIconPlaceholder,ownerState:y})}),k=o||"",V=typeof C=="boolean"?H.jsx("span",{className:A.loadingWrapper,style:{display:"contents"},children:C&&H.jsx(Bu,{className:A.loadingIndicator,ownerState:y,children:B})}):null;return H.jsxs(Nu,{ownerState:y,className:we(r.className,A.root,p,k),component:c,disabled:f||C,focusRipple:!b,focusVisibleClassName:we(A.focusVisible,d),ref:n,type:R,id:C?$:T,...N,classes:A,children:[E,S!=="end"&&V,a,S==="end"&&V,L]})});process.env.NODE_ENV!=="production"&&(Ut.propTypes={children:m.node,classes:m.object,className:m.string,color:m.oneOfType([m.oneOf(["inherit","primary","secondary","success","error","info","warning"]),m.string]),component:m.elementType,disabled:m.bool,disableElevation:m.bool,disableFocusRipple:m.bool,disableRipple:m.bool,endIcon:m.node,focusVisibleClassName:m.string,fullWidth:m.bool,href:m.string,id:m.string,loading:m.bool,loadingIndicator:m.node,loadingPosition:m.oneOf(["center","end","start"]),size:m.oneOfType([m.oneOf(["small","medium","large"]),m.string]),startIcon:m.node,sx:m.oneOfType([m.arrayOf(m.oneOfType([m.func,m.object,m.bool])),m.func,m.object]),type:m.oneOfType([m.oneOf(["button","reset","submit"]),m.string]),variant:m.oneOfType([m.oneOf(["contained","outlined","text"]),m.string])});function zu(t){return z.Children.toArray(t).filter(e=>z.isValidElement(e))}function Fu(t){return gt("MuiButtonGroup",t)}const te=yt("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),Vu=(t,e)=>{const{ownerState:n}=t;return[{[`& .${te.grouped}`]:e.grouped},{[`& .${te.grouped}`]:e[`grouped${ne(n.orientation)}`]},{[`& .${te.grouped}`]:e[`grouped${ne(n.variant)}`]},{[`& .${te.grouped}`]:e[`grouped${ne(n.variant)}${ne(n.orientation)}`]},{[`& .${te.grouped}`]:e[`grouped${ne(n.variant)}${ne(n.color)}`]},{[`& .${te.firstButton}`]:e.firstButton},{[`& .${te.lastButton}`]:e.lastButton},{[`& .${te.middleButton}`]:e.middleButton},e.root,e[n.variant],n.disableElevation===!0&&e.disableElevation,n.fullWidth&&e.fullWidth,n.orientation==="vertical"&&e.vertical]},ju=t=>{const{classes:e,color:n,disabled:r,disableElevation:o,fullWidth:s,orientation:i,variant:a}=t,l={root:["root",a,i,s&&"fullWidth",o&&"disableElevation",`color${ne(n)}`],grouped:["grouped",`grouped${ne(i)}`,`grouped${ne(a)}`,`grouped${ne(a)}${ne(i)}`,`grouped${ne(a)}${ne(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Kt(l,Fu,e)},Hu=Ae("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:Vu})(We(({theme:t})=>({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(t.vars||t).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${te.lastButton},& .${te.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${te.firstButton},& .${te.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${te.firstButton},& .${te.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${te.lastButton},& .${te.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${te.firstButton},& .${te.middleButton}`]:{borderRight:t.vars?`1px solid ${t.alpha(t.vars.palette.common.onBackground,.23)}`:`1px solid ${t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${te.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${te.firstButton},& .${te.middleButton}`]:{borderBottom:t.vars?`1px solid ${t.alpha(t.vars.palette.common.onBackground,.23)}`:`1px solid ${t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${te.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},...Object.entries(t.palette).filter(ht()).flatMap(([e])=>[{props:{variant:"text",color:e},style:{[`& .${te.firstButton},& .${te.middleButton}`]:{borderColor:t.alpha((t.vars||t).palette[e].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${te.firstButton},& .${te.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${te.lastButton},& .${te.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${te.firstButton},& .${te.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${te.lastButton},& .${te.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${te.firstButton},& .${te.middleButton}`]:{borderRight:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${te.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${te.firstButton},& .${te.middleButton}`]:{borderBottom:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${te.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},...Object.entries(t.palette).filter(ht(["dark"])).map(([e])=>({props:{variant:"contained",color:e},style:{[`& .${te.firstButton},& .${te.middleButton}`]:{borderColor:(t.vars||t).palette[e].dark}}}))],[`& .${te.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),Js=z.forwardRef(function(e,n){const r=It({props:e,name:"MuiButtonGroup"}),{children:o,className:s,color:i="primary",component:a="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:p=!1,disableRipple:f=!1,fullWidth:h=!1,orientation:b="horizontal",size:g="medium",variant:d="outlined",...x}=r,T={...r,color:i,component:a,disabled:l,disableElevation:c,disableFocusRipple:p,disableRipple:f,fullWidth:h,orientation:b,size:g,variant:d},C=ju(T),M=z.useMemo(()=>({className:C.grouped,color:i,disabled:l,disableElevation:c,disableFocusRipple:p,disableRipple:f,fullWidth:h,size:g,variant:d}),[i,l,c,p,f,h,g,d,C.grouped]),S=zu(o),w=S.length,v=R=>{const P=R===0,N=R===w-1;return P&&N?"":P?C.firstButton:N?C.lastButton:C.middleButton};return H.jsx(Hu,{as:a,role:"group",className:we(C.root,s),ref:n,ownerState:T,...x,children:H.jsx(Qr.Provider,{value:M,children:S.map((R,P)=>H.jsx(Zr.Provider,{value:v(P),children:R},P))})})});process.env.NODE_ENV!=="production"&&(Js.propTypes={children:m.node,classes:m.object,className:m.string,color:m.oneOfType([m.oneOf(["inherit","primary","secondary","error","info","success","warning"]),m.string]),component:m.elementType,disabled:m.bool,disableElevation:m.bool,disableFocusRipple:m.bool,disableRipple:m.bool,fullWidth:m.bool,orientation:m.oneOf(["horizontal","vertical"]),size:m.oneOfType([m.oneOf(["small","medium","large"]),m.string]),sx:m.oneOfType([m.arrayOf(m.oneOfType([m.func,m.object,m.bool])),m.func,m.object]),variant:m.oneOfType([m.oneOf(["contained","outlined","text"]),m.string])});function ln(t){return typeof t=="string"}function Uu(t,e,n){return t===void 0||ln(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function kn(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function cs(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function Gu(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=t;if(!e){const b=we(n?.className,s,o?.className,r?.className),g={...n?.style,...o?.style,...r?.style},d={...n,...o,...r};return b.length>0&&(d.className=b),Object.keys(g).length>0&&(d.style=g),{props:d,internalRef:void 0}}const i=kn({...o,...r}),a=cs(r),l=cs(o),c=e(i),p=we(c?.className,n?.className,s,o?.className,r?.className),f={...c?.style,...n?.style,...o?.style,...r?.style},h={...c,...n,...l,...a};return p.length>0&&(h.className=p),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function Wu(t,e,n){return typeof t=="function"?t(e,n):t}function ct(t){const{elementType:e,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...s}=t,i=o?{}:Wu(n,r),{props:a,internalRef:l}=Gu({...s,externalSlotProps:i}),c=Bn(l,i?.ref,t.additionalProps?.ref);return Uu(e,{...a,ref:c},r)}const Yu={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function tn(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function Xu(t,e,n=(r,o)=>r===o){return t.length===e.length&&t.every((r,o)=>n(r,e[o]))}const Ku=2;function Ht(t,e,n,r,o){return n===1?Math.min(t+e,o):Math.max(t-e,r)}function ei(t,e){return t-e}function us(t,e){const{index:n}=t.reduce((r,o,s)=>{const i=Math.abs(e-o);return r===null||i<r.distance||i===r.distance?{distance:i,index:s}:r},null)??{};return n}function _n(t,e){if(e.current!==void 0&&t.changedTouches){const n=t;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===e.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function jn(t,e,n){return(t-e)*100/(n-e)}function qu(t,e,n){return(n-e)*t+e}function Qu(t){if(Math.abs(t)<1){const n=t.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const e=t.toString().split(".")[1];return e?e.length:0}function Zu(t,e,n){const r=Math.round((t-n)/e)*e+n;return Number(r.toFixed(Qu(e)))}function ds({values:t,newValue:e,index:n}){const r=t.slice();return r[n]=e,r.sort(ei)}function Mn({sliderRef:t,activeIndex:e,setActive:n}){const r=On(t.current);(!t.current?.contains(r.activeElement)||Number(r?.activeElement?.getAttribute("data-index"))!==e)&&t.current?.querySelector(`[type="range"][data-index="${e}"]`).focus(),n&&n(e)}function Rn(t,e){return typeof t=="number"&&typeof e=="number"?t===e:typeof t=="object"&&typeof e=="object"?Xu(t,e):!1}const Ju={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},ed=t=>t;let An;function fs(){return An===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?An=CSS.supports("touch-action","none"):An=!0),An}function td(t){const{"aria-labelledby":e,defaultValue:n,disabled:r=!1,disableSwap:o=!1,isRtl:s=!1,marks:i=!1,max:a=100,min:l=0,name:c,onChange:p,onChangeCommitted:f,orientation:h="horizontal",rootRef:b,scale:g=ed,step:d=1,shiftStep:x=10,tabIndex:T,value:C}=t,M=z.useRef(void 0),[S,w]=z.useState(-1),[v,R]=z.useState(-1),[P,N]=z.useState(!1),$=z.useRef(0),B=z.useRef(null),[y,A]=qc({controlled:C,default:n??l,name:"Slider"}),E=p&&((j,F,se)=>{const ce=j.nativeEvent||j,le=new ce.constructor(ce.type,ce);Object.defineProperty(le,"target",{writable:!0,value:{value:F,name:c}}),B.current=F,p(le,F,se)}),L=Array.isArray(y);let k=L?y.slice().sort(ei):[y];k=k.map(j=>j==null?l:tn(j,l,a));const V=i===!0&&d!==null?[...Array(Math.floor((a-l)/d)+1)].map((j,F)=>({value:l+d*F})):i||[],G=V.map(j=>j.value),[W,I]=z.useState(-1),O=z.useRef(null),U=Bn(b,O),X=j=>F=>{const se=Number(F.currentTarget.getAttribute("data-index"));Fn(F.target)&&I(se),R(se),j?.onFocus?.(F)},K=j=>F=>{Fn(F.target)||I(-1),R(-1),j?.onBlur?.(F)},re=(j,F)=>{const se=Number(j.currentTarget.getAttribute("data-index")),ce=k[se],le=G.indexOf(ce);let ae=F;if(V&&d==null){const Ne=G[G.length-1];ae>=Ne?ae=Ne:ae<=G[0]?ae=G[0]:ae=ae<ce?G[le-1]:G[le+1]}if(ae=tn(ae,l,a),L){o&&(ae=tn(ae,k[se-1]||-1/0,k[se+1]||1/0));const Ne=ae;ae=ds({values:k,newValue:ae,index:se});let $e=se;o||($e=ae.indexOf(Ne)),Mn({sliderRef:O,activeIndex:$e})}A(ae),I(se),E&&!Rn(ae,y)&&E(j,ae,se),f&&f(j,B.current??ae)},Q=j=>F=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(F.key)){F.preventDefault();const se=Number(F.currentTarget.getAttribute("data-index")),ce=k[se];let le=null;if(d!=null){const ae=F.shiftKey?x:d;switch(F.key){case"ArrowUp":le=Ht(ce,ae,1,l,a);break;case"ArrowRight":le=Ht(ce,ae,s?-1:1,l,a);break;case"ArrowDown":le=Ht(ce,ae,-1,l,a);break;case"ArrowLeft":le=Ht(ce,ae,s?1:-1,l,a);break;case"PageUp":le=Ht(ce,x,1,l,a);break;case"PageDown":le=Ht(ce,x,-1,l,a);break;case"Home":le=l;break;case"End":le=a;break}}else if(V){const ae=G[G.length-1],Ne=G.indexOf(ce),$e=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],Pe=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];$e.includes(F.key)?Ne===0?le=G[0]:le=G[Ne-1]:Pe.includes(F.key)&&(Ne===G.length-1?le=ae:le=G[Ne+1])}le!=null&&re(F,le)}j?.onKeyDown?.(F)};Ws(()=>{r&&O.current.contains(document.activeElement)&&document.activeElement?.blur()},[r]),r&&S!==-1&&w(-1),r&&W!==-1&&I(-1);const Z=j=>F=>{j.onChange?.(F),re(F,F.target.valueAsNumber)},J=z.useRef(void 0);let oe=h;s&&h==="horizontal"&&(oe+="-reverse");const ee=({finger:j,move:F=!1})=>{const{current:se}=O,{width:ce,height:le,bottom:ae,left:Ne}=se.getBoundingClientRect();let $e;oe.startsWith("vertical")?$e=(ae-j.y)/le:$e=(j.x-Ne)/ce,oe.includes("-reverse")&&($e=1-$e);let Pe;if(Pe=qu($e,l,a),d)Pe=Zu(Pe,d,l);else{const qt=us(G,Pe);Pe=G[qt]}Pe=tn(Pe,l,a);let Ye=0;if(L){F?Ye=J.current:Ye=us(k,Pe),o&&(Pe=tn(Pe,k[Ye-1]||-1/0,k[Ye+1]||1/0));const qt=Pe;Pe=ds({values:k,newValue:Pe,index:Ye}),o&&F||(Ye=Pe.indexOf(qt),J.current=Ye)}return{newValue:Pe,activeIndex:Ye}},ve=Pt(j=>{const F=_n(j,M);if(!F)return;if($.current+=1,j.type==="mousemove"&&j.buttons===0){D(j);return}const{newValue:se,activeIndex:ce}=ee({finger:F,move:!0});Mn({sliderRef:O,activeIndex:ce,setActive:w}),A(se),!P&&$.current>Ku&&N(!0),E&&!Rn(se,y)&&E(j,se,ce)}),D=Pt(j=>{const F=_n(j,M);if(N(!1),!F)return;const{newValue:se}=ee({finger:F,move:!0});w(-1),j.type==="touchend"&&R(-1),f&&f(j,B.current??se),M.current=void 0,Oe()}),he=Pt(j=>{if(r)return;fs()||j.preventDefault();const F=j.changedTouches[0];F!=null&&(M.current=F.identifier);const se=_n(j,M);if(se!==!1){const{newValue:le,activeIndex:ae}=ee({finger:se});Mn({sliderRef:O,activeIndex:ae,setActive:w}),A(le),E&&!Rn(le,y)&&E(j,le,ae)}$.current=0;const ce=On(O.current);ce.addEventListener("touchmove",ve,{passive:!0}),ce.addEventListener("touchend",D,{passive:!0})}),Oe=z.useCallback(()=>{const j=On(O.current);j.removeEventListener("mousemove",ve),j.removeEventListener("mouseup",D),j.removeEventListener("touchmove",ve),j.removeEventListener("touchend",D)},[D,ve]);z.useEffect(()=>{const{current:j}=O;return j.addEventListener("touchstart",he,{passive:fs()}),()=>{j.removeEventListener("touchstart",he),Oe()}},[Oe,he]),z.useEffect(()=>{r&&Oe()},[r,Oe]);const st=j=>F=>{if(j.onMouseDown?.(F),r||F.defaultPrevented||F.button!==0)return;F.preventDefault();const se=_n(F,M);if(se!==!1){const{newValue:le,activeIndex:ae}=ee({finger:se});Mn({sliderRef:O,activeIndex:ae,setActive:w}),A(le),E&&!Rn(le,y)&&E(F,le,ae)}$.current=0;const ce=On(O.current);ce.addEventListener("mousemove",ve,{passive:!0}),ce.addEventListener("mouseup",D)},Ot=jn(L?k[0]:l,l,a),Me=jn(k[k.length-1],l,a)-Ot,Ue=(j={})=>{const F=kn(j),se={onMouseDown:st(F||{})},ce={...F,...se};return{...j,ref:U,...ce}},kt=j=>F=>{j.onMouseOver?.(F);const se=Number(F.currentTarget.getAttribute("data-index"));R(se)},bt=j=>F=>{j.onMouseLeave?.(F),R(-1)},Lt=(j={})=>{const F=kn(j),se={onMouseOver:kt(F||{}),onMouseLeave:bt(F||{})};return{...j,...F,...se}},q=j=>({pointerEvents:S!==-1&&S!==j?"none":void 0});let Nt;return h==="vertical"&&(Nt=s?"vertical-rl":"vertical-lr"),{active:S,axis:oe,axisProps:Ju,dragging:P,focusedThumbIndex:W,getHiddenInputProps:(j={})=>{const F=kn(j),se={onChange:Z(F||{}),onFocus:X(F||{}),onBlur:K(F||{}),onKeyDown:Q(F||{})},ce={...F,...se};return{tabIndex:T,"aria-labelledby":e,"aria-orientation":h,"aria-valuemax":g(a),"aria-valuemin":g(l),name:c,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":t.step??void 0,disabled:r,...j,...ce,style:{...Yu,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:Nt}}},getRootProps:Ue,getThumbProps:Lt,marks:V,open:v,range:L,rootRef:U,trackLeap:Me,trackOffset:Ot,values:k,getThumbStyle:q}}const nd=t=>!t||!ln(t);function rd(t){return gt("MuiSlider",t)}const je=yt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),od=t=>{const{open:e}=t;return{offset:we(e&&je.valueLabelOpen),circle:je.valueLabelCircle,label:je.valueLabelLabel}};function ti(t){const{children:e,className:n,value:r}=t,o=od(t);return e?z.cloneElement(e,{className:e.props.className},H.jsxs(z.Fragment,{children:[e.props.children,H.jsx("span",{className:we(o.offset,n),"aria-hidden":!0,children:H.jsx("span",{className:o.circle,children:H.jsx("span",{className:o.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(ti.propTypes={children:m.element.isRequired,className:m.string,value:m.node});function ps(t){return t}const sd=Ae("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`color${ne(n.color)}`],n.size!=="medium"&&e[`size${ne(n.size)}`],n.marked&&e.marked,n.orientation==="vertical"&&e.vertical,n.track==="inverted"&&e.trackInverted,n.track===!1&&e.trackFalse]}})(We(({theme:t})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${je.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${je.dragging}`]:{[`& .${je.thumb}, & .${je.track}`]:{transition:"none"}},variants:[...Object.entries(t.palette).filter(ht()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),id=Ae("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),ad=Ae("span",{name:"MuiSlider",slot:"Track"})(We(({theme:t})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(t.palette).filter(ht()).map(([e])=>({props:{color:e,track:"inverted"},style:{...t.vars?{backgroundColor:t.vars.palette.Slider[`${e}Track`],borderColor:t.vars.palette.Slider[`${e}Track`]}:{backgroundColor:t.lighten(t.palette[e].main,.62),borderColor:t.lighten(t.palette[e].main,.62),...t.applyStyles("dark",{backgroundColor:t.darken(t.palette[e].main,.5)}),...t.applyStyles("dark",{borderColor:t.darken(t.palette[e].main,.5)})}}}))]}))),ld=Ae("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.thumb,e[`thumbColor${ne(n.color)}`],n.size!=="medium"&&e[`thumbSize${ne(n.size)}`]]}})(We(({theme:t})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${je.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(t.palette).filter(ht()).map(([e])=>({props:{color:e},style:{[`&:hover, &.${je.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${t.alpha((t.vars||t).palette[e].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${je.active}`]:{boxShadow:`0px 0px 0px 14px ${t.alpha((t.vars||t).palette[e].main,.16)}`}}}))]}))),ni=Ae(ti,{name:"MuiSlider",slot:"ValueLabel"})(We(({theme:t})=>({zIndex:1,whiteSpace:"nowrap",...t.typography.body2,fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${je.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${je.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(ni.propTypes={children:m.element.isRequired,index:m.number.isRequired,open:m.bool.isRequired,value:m.node});const cd=Ae("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>Yr(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:n}=t;return[e.mark,n&&e.markActive]}})(We(({theme:t})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]}))),ud=Ae("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>Yr(t)&&t!=="markLabelActive"})(We(({theme:t})=>({...t.typography.body2,color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]}))),dd=t=>{const{disabled:e,dragging:n,marked:r,orientation:o,track:s,classes:i,color:a,size:l}=t,c={root:["root",e&&"disabled",n&&"dragging",r&&"marked",o==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",a&&`color${ne(a)}`,l&&`size${ne(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled",l&&`thumbSize${ne(l)}`,a&&`thumbColor${ne(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Kt(c,rd,i)},fd=({children:t})=>t,qe=z.forwardRef(function(e,n){const r=It({props:e,name:"MuiSlider"}),o=Kl(),{"aria-label":s,"aria-valuetext":i,"aria-labelledby":a,component:l="span",components:c={},componentsProps:p={},color:f="primary",classes:h,className:b,disableSwap:g=!1,disabled:d=!1,getAriaLabel:x,getAriaValueText:T,marks:C=!1,max:M=100,min:S=0,name:w,onChange:v,onChangeCommitted:R,orientation:P="horizontal",shiftStep:N=10,size:$="medium",step:B=1,scale:y=ps,slotProps:A,slots:E,tabIndex:L,track:k="normal",value:V,valueLabelDisplay:G="off",valueLabelFormat:W=ps,...I}=r,O={...r,isRtl:o,max:M,min:S,classes:h,disabled:d,disableSwap:g,orientation:P,marks:C,color:f,size:$,step:B,shiftStep:N,scale:y,track:k,valueLabelDisplay:G,valueLabelFormat:W},{axisProps:U,getRootProps:X,getHiddenInputProps:K,getThumbProps:re,open:Q,active:Z,axis:J,focusedThumbIndex:oe,range:ee,dragging:ve,marks:D,values:he,trackOffset:Oe,trackLeap:st,getThumbStyle:Ot}=td({...O,rootRef:n});O.marked=D.length>0&&D.some(Re=>Re.label),O.dragging=ve,O.focusedThumbIndex=oe;const Me=dd(O),Ue=E?.root??c.Root??sd,kt=E?.rail??c.Rail??id,bt=E?.track??c.Track??ad,Lt=E?.thumb??c.Thumb??ld,q=E?.valueLabel??c.ValueLabel??ni,Nt=E?.mark??c.Mark??cd,hn=E?.markLabel??c.MarkLabel??ud,j=E?.input??c.Input??"input",F=A?.root??p.root,se=A?.rail??p.rail,ce=A?.track??p.track,le=A?.thumb??p.thumb,ae=A?.valueLabel??p.valueLabel,Ne=A?.mark??p.mark,$e=A?.markLabel??p.markLabel,Pe=A?.input??p.input,Ye=ct({elementType:Ue,getSlotProps:X,externalSlotProps:F,externalForwardedProps:I,additionalProps:{...nd(Ue)&&{as:l}},ownerState:{...O,...F?.ownerState},className:[Me.root,b]}),qt=ct({elementType:kt,externalSlotProps:se,ownerState:O,className:Me.rail}),ri=ct({elementType:bt,externalSlotProps:ce,additionalProps:{style:{...U[J].offset(Oe),...U[J].leap(st)}},ownerState:{...O,...ce?.ownerState},className:Me.track}),nr=ct({elementType:Lt,getSlotProps:re,externalSlotProps:le,ownerState:{...O,...le?.ownerState},className:Me.thumb}),oi=ct({elementType:q,externalSlotProps:ae,ownerState:{...O,...ae?.ownerState},className:Me.valueLabel}),rr=ct({elementType:Nt,externalSlotProps:Ne,ownerState:O,className:Me.mark}),or=ct({elementType:hn,externalSlotProps:$e,ownerState:O,className:Me.markLabel}),si=ct({elementType:j,getSlotProps:K,externalSlotProps:Pe,ownerState:O});return H.jsxs(Ue,{...Ye,children:[H.jsx(kt,{...qt}),H.jsx(bt,{...ri}),D.filter(Re=>Re.value>=S&&Re.value<=M).map((Re,Ie)=>{const sr=jn(Re.value,S,M),mn=U[J].offset(sr);let tt;return k===!1?tt=he.includes(Re.value):tt=k==="normal"&&(ee?Re.value>=he[0]&&Re.value<=he[he.length-1]:Re.value<=he[0])||k==="inverted"&&(ee?Re.value<=he[0]||Re.value>=he[he.length-1]:Re.value>=he[0]),H.jsxs(z.Fragment,{children:[H.jsx(Nt,{"data-index":Ie,...rr,...!ln(Nt)&&{markActive:tt},style:{...mn,...rr.style},className:we(rr.className,tt&&Me.markActive)}),Re.label!=null?H.jsx(hn,{"aria-hidden":!0,"data-index":Ie,...or,...!ln(hn)&&{markLabelActive:tt},style:{...mn,...or.style},className:we(Me.markLabel,or.className,tt&&Me.markLabelActive),children:Re.label}):null]},Ie)}),he.map((Re,Ie)=>{const sr=jn(Re,S,M),mn=U[J].offset(sr),tt=G==="off"?fd:q;return H.jsx(tt,{...!ln(tt)&&{valueLabelFormat:W,valueLabelDisplay:G,value:typeof W=="function"?W(y(Re),Ie):W,index:Ie,open:Q===Ie||Z===Ie||G==="on",disabled:d},...oi,children:H.jsx(Lt,{"data-index":Ie,...nr,className:we(Me.thumb,nr.className,Z===Ie&&Me.active,oe===Ie&&Me.focusVisible),style:{...mn,...Ot(Ie),...nr.style},children:H.jsx(j,{"data-index":Ie,"aria-label":x?x(Ie):s,"aria-valuenow":y(Re),"aria-labelledby":a,"aria-valuetext":T?T(y(Re),Ie):i,value:he[Ie],...si})})},Ie)})]})});process.env.NODE_ENV!=="production"&&(qe.propTypes={"aria-label":zn(m.string,t=>Array.isArray(t.value||t.defaultValue)&&t["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":m.string,"aria-valuetext":zn(m.string,t=>Array.isArray(t.value||t.defaultValue)&&t["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:m.node,classes:m.object,className:m.string,color:m.oneOfType([m.oneOf(["primary","secondary","error","info","success","warning"]),m.string]),components:m.shape({Input:m.elementType,Mark:m.elementType,MarkLabel:m.elementType,Rail:m.elementType,Root:m.elementType,Thumb:m.elementType,Track:m.elementType,ValueLabel:m.elementType}),componentsProps:m.shape({input:m.oneOfType([m.func,m.object]),mark:m.oneOfType([m.func,m.object]),markLabel:m.oneOfType([m.func,m.object]),rail:m.oneOfType([m.func,m.object]),root:m.oneOfType([m.func,m.object]),thumb:m.oneOfType([m.func,m.object]),track:m.oneOfType([m.func,m.object]),valueLabel:m.oneOfType([m.func,m.shape({children:m.element,className:m.string,open:m.bool,style:m.object,value:m.node,valueLabelDisplay:m.oneOf(["auto","off","on"])})])}),defaultValue:m.oneOfType([m.arrayOf(m.number),m.number]),disabled:m.bool,disableSwap:m.bool,getAriaLabel:m.func,getAriaValueText:m.func,marks:m.oneOfType([m.arrayOf(m.shape({label:m.node,value:m.number.isRequired})),m.bool]),max:m.number,min:m.number,name:m.string,onChange:m.func,onChangeCommitted:m.func,orientation:m.oneOf(["horizontal","vertical"]),scale:m.func,shiftStep:m.number,size:m.oneOfType([m.oneOf(["small","medium"]),m.string]),slotProps:m.shape({input:m.oneOfType([m.func,m.object]),mark:m.oneOfType([m.func,m.object]),markLabel:m.oneOfType([m.func,m.object]),rail:m.oneOfType([m.func,m.object]),root:m.oneOfType([m.func,m.object]),thumb:m.oneOfType([m.func,m.object]),track:m.oneOfType([m.func,m.object]),valueLabel:m.oneOfType([m.func,m.shape({children:m.element,className:m.string,open:m.bool,style:m.object,value:m.node,valueLabelDisplay:m.oneOf(["auto","off","on"])})])}),slots:m.shape({input:m.elementType,mark:m.elementType,markLabel:m.elementType,rail:m.elementType,root:m.elementType,thumb:m.elementType,track:m.elementType,valueLabel:m.elementType}),step:m.number,sx:m.oneOfType([m.arrayOf(m.oneOfType([m.func,m.object,m.bool])),m.func,m.object]),tabIndex:m.number,track:m.oneOf(["inverted","normal",!1]),value:m.oneOfType([m.arrayOf(m.number),m.number]),valueLabelDisplay:m.oneOf(["auto","off","on"]),valueLabelFormat:m.oneOfType([m.func,m.string])});function pd(t){return gt("MuiTypography",t)}yt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const hd={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},md=Wc(),gd=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:s,classes:i}=t,a={root:["root",s,t.align!=="inherit"&&`align${ne(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Kt(a,pd,i)},yd=Ae("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${ne(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(We(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,n])=>e!=="inherit"&&n&&typeof n=="object").map(([e,n])=>({props:{variant:e},style:n})),...Object.entries(t.palette).filter(ht()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${ne(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),hs={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Qe=z.forwardRef(function(e,n){const{color:r,...o}=It({props:e,name:"MuiTypography"}),s=!hd[r],i=md({...o,...s&&{color:r}}),{align:a="inherit",className:l,component:c,gutterBottom:p=!1,noWrap:f=!1,paragraph:h=!1,variant:b="body1",variantMapping:g=hs,...d}=i,x={...i,align:a,color:r,className:l,component:c,gutterBottom:p,noWrap:f,paragraph:h,variant:b,variantMapping:g},T=c||(h?"p":g[b]||hs[b])||"span",C=gd(x);return H.jsx(yd,{as:T,ref:n,className:we(C.root,l),...d,ownerState:x,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...d.style}})});process.env.NODE_ENV!=="production"&&(Qe.propTypes={align:m.oneOf(["center","inherit","justify","left","right"]),children:m.node,classes:m.object,className:m.string,color:m.oneOfType([m.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),m.string]),component:m.elementType,gutterBottom:m.bool,noWrap:m.bool,paragraph:m.bool,style:m.object,sx:m.oneOfType([m.arrayOf(m.oneOfType([m.func,m.object,m.bool])),m.func,m.object]),variant:m.oneOfType([m.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),m.string]),variantMapping:m.object});const bd=yt("MuiBox",["root"]),xd=Fs(),Ln=Ge.createBox({themeId:Vs,defaultTheme:xd,defaultClassName:bd.root,generateClassName:Cs.generate});process.env.NODE_ENV!=="production"&&(Ln.propTypes={children:m.node,component:m.elementType,sx:m.oneOfType([m.arrayOf(m.oneOfType([m.func,m.object,m.bool])),m.func,m.object])});const vd=({showLayer:t,setShowLayer:e,scale:n,setScale:r,rotation:o,setRotation:s,mapPosition:i,setMapPosition:a,position:l,setPosition:c,enableTransformControls:p,setEnableTransformControls:f,transformMode:h,setTransformMode:b,layerName:g="Layer"})=>{const{scene:d,worldMatrixInv:x}=Hn(),T=Y.useRef(void 0),[C,M]=Y.useState(!1);Y.useLayoutEffect(()=>{if(!d||!x||!p){T.current&&(d?.remove(T.current),T.current.geometry.dispose(),T.current.material.dispose(),T.current=void 0,M(!1));return}const w=new ar.BoxGeometry(1,1,1),v=new ar.MeshBasicMaterial({visible:!1}),R=new ar.Mesh(w,v),P=_t.toScenePosition(x,[i.lng,i.lat],0);return R.position.set(P.x+l.x,P.y+l.y,P.z+l.z),R.rotation.set(o.x*Math.PI/180,o.y*Math.PI/180,o.z*Math.PI/180),R.scale.set(n,n,n),d.add(R),T.current=R,M(!0),()=>{T.current&&(d.remove(T.current),T.current.geometry.dispose(),T.current.material.dispose(),T.current=void 0,M(!1))}},[d,x,p]),Y.useLayoutEffect(()=>{if(!T.current||!x)return;const w=_t.toScenePosition(x,[i.lng,i.lat],0);T.current.position.set(w.x+l.x,w.y+l.y,w.z+l.z),T.current.rotation.set(o.x*Math.PI/180,o.y*Math.PI/180,o.z*Math.PI/180),T.current.scale.set(n,n,n),T.current.updateMatrixWorld(!0)},[l,o,n,i,x]);const S=w=>{if(!x)return;const v=_t.toScenePosition(x,[i.lng,i.lat],0);c({x:w.position.x-v.x,y:w.position.y-v.y,z:w.position.z-v.z}),s({x:w.rotation.x*180/Math.PI,y:w.rotation.y*180/Math.PI,z:w.rotation.z*180/Math.PI}),r(w.scale.x)};return H.jsxs(H.Fragment,{children:[C&&T.current&&p&&H.jsx(vs,{target:T.current,mode:h||"translate",enabled:p,onObjectChange:S}),H.jsxs(Ln,{sx:{padding:"10px"},children:[H.jsxs(Ln,{sx:{display:"flex",gap:1,flexWrap:"wrap",marginBottom:2},children:[H.jsxs(Ut,{color:"primary",variant:t?"contained":"outlined",onClick:()=>e(!t),size:"small",children:[t?"Hide":"Show"," ",g]}),f&&H.jsx(Ut,{color:"info",variant:p?"contained":"outlined",onClick:()=>f(!p),size:"small",children:"3D Gizmo"})]}),b&&p&&H.jsx(Ln,{sx:{marginBottom:2},children:H.jsxs(Js,{variant:"outlined",size:"small",fullWidth:!0,"aria-label":"transform mode",children:[H.jsx(Ut,{variant:h==="translate"?"contained":"outlined",onClick:()=>b("translate"),children:"Move"}),H.jsx(Ut,{variant:h==="rotate"?"contained":"outlined",onClick:()=>b("rotate"),children:"Rotate"}),H.jsx(Ut,{variant:h==="scale"?"contained":"outlined",onClick:()=>b("scale"),children:"Scale"})]})}),H.jsxs(Qe,{gutterBottom:!0,children:["Scale: ",n.toFixed(2)]}),H.jsx(qe,{value:n,onChange:(w,v)=>r(v),min:.01,max:150,step:.01,valueLabelDisplay:"auto"}),H.jsxs(Qe,{gutterBottom:!0,children:["Rotation X: ",o.x,"°"]}),H.jsx(qe,{value:o.x,onChange:(w,v)=>s({...o,x:v}),min:0,max:360,valueLabelDisplay:"auto"}),H.jsxs(Qe,{gutterBottom:!0,children:["Rotation Y: ",o.y,"°"]}),H.jsx(qe,{value:o.y,onChange:(w,v)=>s({...o,y:v}),min:0,max:360,valueLabelDisplay:"auto"}),H.jsxs(Qe,{gutterBottom:!0,children:["Rotation Z: ",o.z,"°"]}),H.jsx(qe,{value:o.z,onChange:(w,v)=>s({...o,z:v}),min:0,max:360,valueLabelDisplay:"auto"}),H.jsxs(Qe,{gutterBottom:!0,children:["Longitude: ",i.lng.toFixed(6)]}),H.jsx(qe,{value:i.lng,onChange:(w,v)=>a({...i,lng:v}),min:7.09,max:7.11,step:1e-4,valueLabelDisplay:"auto"}),H.jsxs(Qe,{gutterBottom:!0,children:["Latitude: ",i.lat.toFixed(6)]}),H.jsx(qe,{value:i.lat,onChange:(w,v)=>a({...i,lat:v}),min:50.73,max:50.74,step:1e-4,valueLabelDisplay:"auto"}),H.jsxs(Qe,{gutterBottom:!0,children:["Position X: ",l.x]}),H.jsx(qe,{value:l.x,onChange:(w,v)=>c({...l,x:v}),min:-100,max:100,valueLabelDisplay:"auto"}),H.jsxs(Qe,{gutterBottom:!0,children:["Position Y: ",l.y]}),H.jsx(qe,{value:l.y,onChange:(w,v)=>c({...l,y:v}),min:-100,max:100,valueLabelDisplay:"auto"}),H.jsxs(Qe,{gutterBottom:!0,children:["Position Z: ",l.z]}),H.jsx(qe,{value:l.z,onChange:(w,v)=>c({...l,z:v}),min:-500,max:100,valueLabelDisplay:"auto"})]})]})};exports.MlThreeGizmo=vs;exports.MlThreeModelLayer=ta;exports.MlThreeObjectControls=vd;exports.MlThreeSplatLayer=la;exports.ThreeContext=Br;exports.ThreeProvider=hi;exports.useThree=Hn;
392
+ `,ec=typeof Qs==`string`?null:h.css`
393
+ animation: ${Qs} 1.4s linear infinite;
394
+ `,tc=typeof $s==`string`?null:h.css`
395
+ animation: ${$s} 1.4s ease-in-out infinite;
396
+ `,nc=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return Sn({root:[`root`,n,`color${Dn(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},Xs,t)},rc=Q(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Dn(n.color)}`]]}})(Bo(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:ec||{animation:`${Qs} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Ys()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),ic=Q(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),ac=Q(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(Bo(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:tc||{animation:`${$s} 1.4s ease-in-out infinite`}}]}))),oc=Q(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Bo(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),sc=f.forwardRef(function(e,t){let n=Ho({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,min:s,max:c,size:l=40,style:u,thickness:d=3.6,value:f=n.min??0,variant:p=`indeterminate`,...h}=n;process.env.NODE_ENV!==`production`&&p===`indeterminate`&&(s!==void 0||c!==void 0)&&console.warn("MUI: You have provided the `min` or `max` props with an 'indeterminate' variant. These props will have no effect.");let g=s??0,_=c??100,v={...n,color:i,disableShrink:a,size:l,thickness:d,value:f,variant:p,enableTrackSlot:o},y=nc(v),b={},x={},S={};if(p===`determinate`){let e=2*Math.PI*((Zs-d)/2);process.env.NODE_ENV!==`production`&&(f<g||f>_||g>=_)&&console.error(`MUI: The min, max, and value props in CircularProgress should be numbers where min < max and min <= value <= max. Received min=${g}, max=${_}, value=${f}.`);let t=_-g;b.strokeDasharray=e.toFixed(3),b.strokeDashoffset=t>0?`${((_-f)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,x.transform=`rotate(-90deg)`,S[`aria-valuenow`]=f,S[`aria-valuemin`]=g,S[`aria-valuemax`]=_}return(0,m.jsx)(rc,{className:U(y.root,r),style:{width:l,height:l,...x,...u},ownerState:v,ref:t,role:`progressbar`,...S,...h,children:(0,m.jsxs)(ic,{className:y.svg,ownerState:v,viewBox:`${Zs/2} ${Zs/2} ${Zs} ${Zs}`,children:[o?(0,m.jsx)(oc,{className:y.track,ownerState:v,cx:Zs,cy:Zs,r:(Zs-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,m.jsx)(ac,{className:y.circle,style:b,ownerState:v,cx:Zs,cy:Zs,r:(Zs-d)/2,fill:`none`,strokeWidth:d})]})})});process.env.NODE_ENV!==`production`&&(sc.propTypes={classes:W.default.object,className:W.default.string,color:W.default.oneOfType([W.default.oneOf([`inherit`,`primary`,`secondary`,`error`,`info`,`success`,`warning`]),W.default.string]),disableShrink:ts(W.default.bool,e=>e.disableShrink&&e.variant&&e.variant!==`indeterminate`?Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),enableTrackSlot:W.default.bool,max:W.default.number,min:W.default.number,size:W.default.oneOfType([W.default.number,W.default.string]),style:W.default.object,sx:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.func,W.default.object,W.default.bool])),W.default.func,W.default.object]),thickness:W.default.number,value:W.default.number,variant:W.default.oneOf([`determinate`,`indeterminate`])});function cc(e){return Na(`MuiButton`,e)}var lc=Uo(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),uc=f.createContext({});process.env.NODE_ENV!==`production`&&(uc.displayName=`ButtonGroupContext`);var dc=f.createContext(void 0);process.env.NODE_ENV!==`production`&&(dc.displayName=`ButtonGroupButtonContext`);var fc=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=Sn({root:[`root`,o&&`loading`,a,`size${Dn(i)}`,`color${Dn(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${Dn(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},cc,c);return{...c,...l}},pc=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],mc=Q(Gs,{shouldForwardProp:e=>zo(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Dn(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Bo(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${lc.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${lc.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${lc.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${lc.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Ys()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${lc.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${lc.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${lc.loading}`]:{color:`transparent`}}}]}})),hc=Q(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...pc]})),gc=Q(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...pc]})),_c=Q(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),vc=Q(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),yc=f.forwardRef(function(e,t){let n=f.useContext(uc),r=f.useContext(dc),i=Ho({props:xn(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:p,focusVisibleClassName:h,fullWidth:g=!1,id:_,loading:v=null,loadingIndicator:y,loadingPosition:b=`center`,size:x=`medium`,startIcon:S,type:C,variant:ee=`text`,...w}=i,T=qo(_),te=y??(0,m.jsx)(sc,{"aria-labelledby":T,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:g,loading:v,loadingIndicator:te,loadingPosition:b,size:x,type:C,variant:ee},D=fc(E),O=(S||v&&b===`start`)&&(0,m.jsx)(hc,{className:D.startIcon,ownerState:E,children:S||(0,m.jsx)(vc,{className:D.loadingIconPlaceholder,ownerState:E})}),ne=(p||v&&b===`end`)&&(0,m.jsx)(gc,{className:D.endIcon,ownerState:E,children:p||(0,m.jsx)(vc,{className:D.loadingIconPlaceholder,ownerState:E})}),k=r||``,A=typeof v==`boolean`?(0,m.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:v&&(0,m.jsx)(_c,{className:D.loadingIndicator,ownerState:E,children:te})}):null,{root:j,...M}=D;return(0,m.jsxs)(mc,{ownerState:E,className:U(n.className,D.root,c,k),component:s,disabled:l||v,focusRipple:!d,focusVisibleClassName:U(D.focusVisible,h),ref:t,internalNativeButton:!0,type:C,id:v?T:_,...w,classes:M,children:[O,b!==`end`&&A,a,b===`end`&&A,ne]})});process.env.NODE_ENV!==`production`&&(yc.propTypes={children:W.default.node,classes:W.default.object,className:W.default.string,color:W.default.oneOfType([W.default.oneOf([`inherit`,`primary`,`secondary`,`success`,`error`,`info`,`warning`]),W.default.string]),component:W.default.elementType,disabled:W.default.bool,disableElevation:W.default.bool,disableFocusRipple:W.default.bool,disableRipple:W.default.bool,endIcon:W.default.node,focusVisibleClassName:W.default.string,fullWidth:W.default.bool,href:W.default.string,id:W.default.string,loading:W.default.bool,loadingIndicator:W.default.node,loadingPosition:W.default.oneOf([`center`,`end`,`start`]),size:W.default.oneOfType([W.default.oneOf([`small`,`medium`,`large`]),W.default.string]),startIcon:W.default.node,sx:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.func,W.default.object,W.default.bool])),W.default.func,W.default.object]),type:W.default.string,variant:W.default.oneOfType([W.default.oneOf([`contained`,`outlined`,`text`]),W.default.string])});function bc(e){return f.Children.toArray(e).filter(e=>f.isValidElement(e))}function xc(e){return Na(`MuiButtonGroup`,e)}var $=Uo(`MuiButtonGroup`,[`root`,`contained`,`outlined`,`text`,`disableElevation`,`disabled`,`firstButton`,`fullWidth`,`horizontal`,`vertical`,`colorPrimary`,`colorSecondary`,`grouped`,`lastButton`,`middleButton`]),Sc=(e,t)=>{let{ownerState:n}=e;return[{[`& .${$.grouped}`]:t.grouped},{[`& .${$.firstButton}`]:t.firstButton},{[`& .${$.lastButton}`]:t.lastButton},{[`& .${$.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation===`vertical`&&t.vertical]},Cc=e=>{let{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:a,orientation:o,variant:s}=e;return Sn({root:[`root`,s,o,a&&`fullWidth`,i&&`disableElevation`,`color${Dn(n)}`],grouped:[`grouped`,r&&`disabled`],firstButton:[`firstButton`],lastButton:[`lastButton`],middleButton:[`middleButton`]},xc,t)},wc=Q(`div`,{name:`MuiButtonGroup`,slot:`Root`,overridesResolver:Sc})(Bo(({theme:e})=>({display:`inline-flex`,borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:`contained`},style:{boxShadow:(e.vars||e).shadows[2],[`& .${$.grouped}`]:{boxShadow:`none`,"&:hover":{boxShadow:`none`}}}},{props:{disableElevation:!0},style:{boxShadow:`none`}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{orientation:`vertical`},style:{flexDirection:`column`,[`& .${$.lastButton},& .${$.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${$.firstButton},& .${$.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:`horizontal`},style:{[`& .${$.firstButton},& .${$.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${$.lastButton},& .${$.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:`text`,orientation:`horizontal`},style:{[`& .${$.firstButton},& .${$.middleButton}`]:{borderRight:e.vars?`1px solid ${e.alpha(e.vars.palette.common.onBackground,.23)}`:`1px solid ${e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`}`,[`&.${$.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:`text`,orientation:`vertical`},style:{[`& .${$.firstButton},& .${$.middleButton}`]:{borderBottom:e.vars?`1px solid ${e.alpha(e.vars.palette.common.onBackground,.23)}`:`1px solid ${e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`}`,[`&.${$.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Ys()).flatMap(([t])=>[{props:{variant:`text`,color:t},style:{[`& .${$.firstButton},& .${$.middleButton}`]:{borderColor:e.alpha((e.vars||e).palette[t].main,.5)}}}]),{props:{variant:`outlined`,orientation:`horizontal`},style:{[`& .${$.firstButton},& .${$.middleButton}`]:{borderRightColor:`transparent`,"&:hover":{borderRightColor:`currentColor`}},[`& .${$.lastButton},& .${$.middleButton}`]:{marginLeft:-1}}},{props:{variant:`outlined`,orientation:`vertical`},style:{[`& .${$.firstButton},& .${$.middleButton}`]:{borderBottomColor:`transparent`,"&:hover":{borderBottomColor:`currentColor`}},[`& .${$.lastButton},& .${$.middleButton}`]:{marginTop:-1}}},{props:{variant:`contained`,orientation:`horizontal`},style:{[`& .${$.firstButton},& .${$.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${$.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:`contained`,orientation:`vertical`},style:{[`& .${$.firstButton},& .${$.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${$.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Ys([`dark`])).map(([t])=>({props:{variant:`contained`,color:t},style:{[`& .${$.firstButton},& .${$.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${$.grouped}`]:{minWidth:40}}))),Tc=f.forwardRef(function(e,t){let n=Ho({props:e,name:`MuiButtonGroup`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,disableElevation:c=!1,disableFocusRipple:l=!1,disableRipple:u=!1,fullWidth:d=!1,orientation:p=`horizontal`,size:h=`medium`,variant:g=`outlined`,..._}=n,v={...n,color:a,component:o,disabled:s,disableElevation:c,disableFocusRipple:l,disableRipple:u,fullWidth:d,orientation:p,size:h,variant:g},y=Cc(v),b=f.useMemo(()=>({className:y.grouped,color:a,disabled:s,disableElevation:c,disableFocusRipple:l,disableRipple:u,fullWidth:d,size:h,variant:g}),[a,s,c,l,u,d,h,g,y.grouped]),x=bc(r),S=x.length,C=e=>{let t=e===0,n=e===S-1;return t&&n?``:t?y.firstButton:n?y.lastButton:y.middleButton};return(0,m.jsx)(wc,{as:o,role:`group`,className:U(y.root,i),ref:t,ownerState:v,..._,children:(0,m.jsx)(uc.Provider,{value:b,children:x.map((e,t)=>(0,m.jsx)(dc.Provider,{value:C(t),children:e},t))})})});process.env.NODE_ENV!==`production`&&(Tc.propTypes={children:W.default.node,classes:W.default.object,className:W.default.string,color:W.default.oneOfType([W.default.oneOf([`inherit`,`primary`,`secondary`,`error`,`info`,`success`,`warning`]),W.default.string]),component:W.default.elementType,disabled:W.default.bool,disableElevation:W.default.bool,disableFocusRipple:W.default.bool,disableRipple:W.default.bool,fullWidth:W.default.bool,orientation:W.default.oneOf([`horizontal`,`vertical`]),size:W.default.oneOfType([W.default.oneOf([`small`,`medium`,`large`]),W.default.string]),sx:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.func,W.default.object,W.default.bool])),W.default.func,W.default.object]),variant:W.default.oneOfType([W.default.oneOf([`contained`,`outlined`,`text`]),W.default.string])});function Ec(e){return typeof e==`string`}var Dc={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:`1px`};function Oc(e){if(e===void 0)return{};let t={};for(let n of Object.keys(e))$o(n,e[n])&&(t[n]=e[n]);return t}function kc(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function Ac(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var jc=Ac,Mc=2,Nc=[],Pc={};function Fc(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function Ic(e,t){return e-t}function Lc(e,t,n=-1){let{index:r}=e.reduce((e,n,r)=>{let i=Math.abs(t-n);return e==null||i<=e.distance?{distance:i,index:r}:e},null)??Pc;return r==null?r:n>=0&&e[n]===e[r]?n:r}function Rc(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function zc(e,t,n){return(e-t)*100/(n-t)}function Bc(e,t,n){return(n-t)*e+t}function Vc(e){if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function Hc(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Vc(t)))}function Uc(e,t,n){let r=e.slice();return r[n]=t,r.sort(Ic)}function Wc(e,t,n,r){let i=Go(Ko(e.current));if(!jc(e.current,i)||Number(i?.getAttribute(`data-index`))!==t){let n=e.current?.querySelector(`[type="range"][data-index="${t}"]`);n!=null&&(r==null?n.focus({preventScroll:!0}):n.focus({preventScroll:!0,focusVisible:r}))}n&&n(t)}function Gc(e,t){return typeof e==`number`&&typeof t==`number`?e===t:typeof e==`object`&&typeof t==`object`?kc(e,t):!1}var Kc={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},qc=e=>e;function Jc(e){let{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:o=!1,max:s=100,min:c=0,name:l,onChange:u,onChangeCommitted:d,orientation:p=`horizontal`,rootRef:m,scale:h=qc,step:g=1,shiftStep:_=10,tabIndex:v,value:y}=e,b=f.useRef(void 0),x=f.useRef(null),[S,C]=f.useState(-1),[ee,w]=f.useState(-1),[T,te]=f.useState(!1),E=f.useRef(0),D=f.useRef(-1),O=f.useRef(!1),ne=f.useRef(-1),k=Yo(()=>{x.current!=null&&(cancelAnimationFrame(x.current),x.current=null)}),A=f.useRef(null),[j,M]=Jo({controlled:y,default:n??c,name:`Slider`}),re=Yo((e,t,n)=>{let r=`nativeEvent`in e?e.nativeEvent:e,i=new r.constructor(r.type,r);Object.defineProperty(i,`target`,{writable:!0,value:{value:t,name:l}}),A.current=t,u?.(i,t,n)}),N=Array.isArray(j),P=f.useMemo(()=>{if(typeof j==`number`)return[ai(j,c,s)];if(j==null)return[c];let e=j.slice().sort(Ic);for(let t=0;t<e.length;t+=1){let n=e[t];e[t]=n==null?c:ai(n,c,s)}return e},[j,c,s]),ie=f.useMemo(()=>{if(o===!0&&g!=null){let e=Array(Math.floor((s-c)/g)+1);for(let t=0;t<e.length;t+=1)e[t]={value:c+g*t};return e}return Array.isArray(o)?o:Nc},[o,g,c,s]),F=f.useMemo(()=>{let e=Array(ie.length);for(let t=0;t<ie.length;t+=1)e[t]=ie[t].value;return e},[ie]),[ae,oe]=f.useState(-1),I=f.useRef(null),L=Zo(m,I),se=e=>t=>{let n=Number(t.currentTarget.getAttribute(`data-index`));as(t.target)&&oe(n),w(n),e?.onFocus?.(t)},ce=e=>t=>{as(t.target)||oe(-1),w(-1),e?.onBlur?.(t)},R=(e,t)=>{let n=Number(e.currentTarget.getAttribute(`data-index`)),r=P[n],a=F.indexOf(r),o=t;if(ie&&g==null){let e=F[F.length-1];o=o>=e?e:o<=F[0]?F[0]:o<r?F[a-1]:F[a+1]}if(o=ai(o,c,s),N){i&&(o=ai(o,P[n-1]||-1/0,P[n+1]||1/0));let e=o;o=Uc(P,o,n);let t=n;i||(t=o.indexOf(e)),Wc(I,t)}M(o),oe(n),u&&!Gc(o,j)&&re(e,o,n),d&&d(e,A.current??o)},le=e=>t=>{if([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`].includes(t.key)){t.preventDefault();let e=P[Number(t.currentTarget.getAttribute(`data-index`))],n=null;if(g!=null){let r=t.shiftKey?_:g;switch(t.key){case`ArrowUp`:n=Fc(e,r,1,c,s);break;case`ArrowRight`:n=Fc(e,r,a?-1:1,c,s);break;case`ArrowDown`:n=Fc(e,r,-1,c,s);break;case`ArrowLeft`:n=Fc(e,r,a?1:-1,c,s);break;case`PageUp`:n=Fc(e,_,1,c,s);break;case`PageDown`:n=Fc(e,_,-1,c,s);break;case`Home`:n=c;break;case`End`:n=s;break;default:break}}else if(ie){let r=F[F.length-1],i=F.indexOf(e),o=[a?`ArrowRight`:`ArrowLeft`,`ArrowDown`,`PageDown`,`Home`],s=[a?`ArrowLeft`:`ArrowRight`,`ArrowUp`,`PageUp`,`End`];o.includes(t.key)?n=i===0?F[0]:F[i-1]:s.includes(t.key)&&(n=i===F.length-1?r:F[i+1])}n!=null&&R(t,n)}e?.onKeyDown?.(t)};la(()=>{let e=Go(Ko(I.current));r&&jc(I.current,e)&&e!=null&&`blur`in e&&e.blur()},[r]),r&&S!==-1&&C(-1),r&&ae!==-1&&oe(-1);let ue=e=>t=>{e.onChange?.(t),R(t,t.currentTarget.valueAsNumber)},de=f.useRef(void 0),z=p;a&&p===`horizontal`&&(z+=`-reverse`);let fe=e=>{let{current:t}=I;if(!t)return null;let{width:n,height:r,bottom:a,left:o}=t.getBoundingClientRect(),l;l=z.startsWith(`vertical`)?(a-e.y)/r:(e.x-o)/n,z.includes(`-reverse`)&&(l=1-l);let u;u=Bc(l,c,s),u=g?Hc(u,g,c):F[Lc(F,u)],u=ai(u,c,s);let d=0;if(N){let e=de.current!==-1;d=e?de.current:Lc(P,u,D.current),i&&(u=ai(u,P[d-1]||-1/0,P[d+1]||1/0));let t=u;u=Uc(P,u,d),i&&e||(d=u.indexOf(t),de.current=d)}return{newValue:u,activeIndex:d}},pe=Yo(e=>{if(`pointerId`in e&&e.pointerId!==ne.current)return;let t=Rc(e,b);if(!t)return;if(E.current+=1,e.type===`pointermove`&&e.buttons===0){me(e);return}let n=fe(t);n&&(Wc(I,n.activeIndex,C,!1),D.current=n.activeIndex,M(n.newValue),!T&&E.current>Mc&&te(!0),u&&!Gc(n.newValue,j)&&re(e,n.newValue,n.activeIndex))}),me=Yo(e=>{if(`pointerId`in e&&e.pointerId!==ne.current)return;let t=Rc(e,b);if(te(!1),!t)return;let n=fe(t);C(-1),e.type===`touchend`&&w(-1),n&&d&&d(e,A.current??n.newValue),`pointerType`in e&&I.current?.hasPointerCapture(e.pointerId)&&I.current.releasePointerCapture(e.pointerId),b.current=void 0,ne.current=-1,ge()}),he=Yo(e=>{if(r)return;if(O.current){O.current=!1;let t=e.changedTouches[0];t!=null&&(b.current=t.identifier);return}let t=e.changedTouches[0];t!=null&&(b.current=t.identifier);let n=Rc(e,b);if(n!==!1){de.current=-1;let t=fe(n);t&&(Wc(I,t.activeIndex,C,!1),D.current=t.activeIndex,M(t.newValue),u&&!Gc(t.newValue,j)&&re(e,t.newValue,t.activeIndex))}E.current=0;let i=Ko(I.current);i.addEventListener(`touchmove`,pe,{passive:!0}),i.addEventListener(`touchend`,me,{passive:!0})}),ge=f.useCallback(()=>{let e=Ko(I.current);e.removeEventListener(`pointermove`,pe),e.removeEventListener(`pointerup`,me),e.removeEventListener(`touchmove`,pe),e.removeEventListener(`touchend`,me)},[me,pe]);f.useEffect(()=>{let e=I.current;if(e)return e.addEventListener(`touchstart`,he,{passive:!0}),()=>{e.removeEventListener(`touchstart`,he),k(),ge()}},[ge,he,k]),f.useEffect(()=>{r&&(ge(),k())},[r,ge,k]);let _e=e=>t=>{if(e.onPointerDown?.(t),t.pointerType===`touch`&&(O.current=!0),r||t.defaultPrevented||t.button!==0)return;let n=Rc(t,b);if(n!==!1){de.current=-1;let e=fe(n);if(e){let n=I.current?.querySelector(`input[type="range"][data-index="${e.activeIndex}"]`),r=Ko(I.current),i=n!=null&&n===Go(r);C(e.activeIndex),D.current=e.activeIndex,i?t.preventDefault():(k(),x.current=requestAnimationFrame(()=>{x.current=null,Wc(I,e.activeIndex,void 0,!1)})),M(e.newValue),u&&!Gc(e.newValue,j)&&re(t,e.newValue,e.activeIndex)}}E.current=0,ne.current=t.pointerId;let i=Ko(I.current);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}i.addEventListener(`pointermove`,pe,{passive:!0}),i.addEventListener(`pointerup`,me)},ve=zc(N?P[0]:c,c,s),ye=zc(P[P.length-1],c,s)-ve,be=(e=Pc)=>{let t=Oc(e),n={onPointerDown:_e(t)},r={...t,...n};return{...e,ref:L,...r}},xe=e=>t=>{e.onMouseOver?.(t),w(Number(t.currentTarget.getAttribute(`data-index`)))},Se=e=>t=>{e.onMouseLeave?.(t),w(-1)},Ce=(e=Pc)=>{let t=Oc(e),n={onMouseOver:xe(t),onMouseLeave:Se(t)};return{...e,...t,...n}},we=e=>{let t;return N?S===e?t=2:D.current===e&&(t=1):S===e&&(t=1),{pointerEvents:S!==-1&&S!==e?`none`:void 0,zIndex:t}},Te;return p===`vertical`&&(Te=a?`vertical-rl`:`vertical-lr`),{active:S,axis:z,axisProps:Kc,dragging:T,focusedThumbIndex:ae,getHiddenInputProps:(n=Pc)=>{let i=Oc(n),o={onChange:ue(i),onFocus:se(i),onBlur:ce(i),onKeyDown:le(i)},u={...i,...o};return{tabIndex:v,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":h(s),"aria-valuemin":h(c),name:l,type:`range`,min:e.min,max:e.max,step:e.step===null&&e.marks?`any`:e.step??void 0,disabled:r,...n,...u,style:{...Dc,direction:a?`rtl`:`ltr`,width:`100%`,height:`100%`,writingMode:Te}}},getRootProps:be,getThumbProps:Ce,marks:ie,open:ee,range:N,rootRef:L,trackLeap:ye,trackOffset:ve,values:P,getThumbStyle:we}}function Yc(e,t,n){return e===void 0||Ec(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Xc(e,t,n){return typeof e==`function`?e(t,n):e}function Zc(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function Qc(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=U(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=Oc({...i,...r}),s=Zc(r),c=Zc(i),l=t(o),u=U(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function $c(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=Xc(d[e],i),{props:{component:h,...g},internalRef:_}=Qc({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=Zo(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,Yc(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}function el(e){return Na(`MuiSlider`,e)}var tl=Uo(`MuiSlider`,`root.active.colorPrimary.colorSecondary.colorError.colorInfo.colorSuccess.colorWarning.disabled.dragging.focusVisible.mark.markActive.marked.markLabel.markLabelActive.rail.sizeSmall.thumb.track.trackInverted.trackFalse.valueLabel.valueLabelOpen.valueLabelCircle.valueLabelLabel.vertical`.split(`.`)),nl=e=>{let{open:t}=e;return{offset:U(t&&tl.valueLabelOpen),circle:tl.valueLabelCircle,label:tl.valueLabelLabel}};function rl(e){let{children:t,className:n,value:r}=e,i=nl(e);return t?f.cloneElement(t,{className:t.props.className},(0,m.jsxs)(f.Fragment,{children:[t.props.children,(0,m.jsx)(`span`,{className:U(i.offset,n),"aria-hidden":!0,children:(0,m.jsx)(`span`,{className:i.circle,children:(0,m.jsx)(`span`,{className:i.label,children:r})})})]})):null}process.env.NODE_ENV!==`production`&&(rl.propTypes={children:W.default.element.isRequired,className:W.default.string,value:W.default.node});function il(e){return e}var al=Q(`span`,{name:`MuiSlider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${Dn(n.color)}`],n.size!==`medium`&&t[`size${Dn(n.size)}`],n.marked&&t.marked,n.orientation===`vertical`&&t.vertical,n.track===`inverted`&&t.trackInverted,n.track===!1&&t.trackFalse]}})(Bo(({theme:e})=>({borderRadius:12,boxSizing:`content-box`,display:`inline-block`,position:`relative`,cursor:`pointer`,touchAction:`none`,WebkitTapHighlightColor:`transparent`,"@media print":{colorAdjust:`exact`},[`&.${tl.disabled}`]:{pointerEvents:`none`,cursor:`default`,color:(e.vars||e).palette.grey[400]},[`&.${tl.dragging}`]:{[`& .${tl.thumb}, & .${tl.track}`]:{transition:`none`}},variants:[...Object.entries(e.palette).filter(Ys()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:`horizontal`},style:{height:4,width:`100%`,padding:`13px 0`,"@media (pointer: coarse)":{padding:`20px 0`}}},{props:{orientation:`horizontal`,size:`small`},style:{height:2}},{props:{orientation:`horizontal`,marked:!0},style:{marginBottom:20}},{props:{orientation:`vertical`},style:{height:`100%`,width:4,padding:`0 13px`,"@media (pointer: coarse)":{padding:`0 20px`}}},{props:{orientation:`vertical`,size:`small`},style:{width:2}},{props:{orientation:`vertical`,marked:!0},style:{marginRight:44}}]}))),ol=Q(`span`,{name:`MuiSlider`,slot:`Rail`})({display:`block`,position:`absolute`,borderRadius:`inherit`,backgroundColor:`currentColor`,opacity:.38,"@media (forced-colors: active)":{border:`1px solid transparent`,boxSizing:`border-box`},variants:[{props:{orientation:`horizontal`},style:{width:`100%`,height:`inherit`,top:`50%`,transform:`translateY(-50%)`}},{props:{orientation:`vertical`},style:{height:`100%`,width:`inherit`,left:`50%`,transform:`translateX(-50%)`}},{props:{track:`inverted`},style:{opacity:1}}]}),sl=Q(`span`,{name:`MuiSlider`,slot:`Track`})(Bo(({theme:e})=>({display:`block`,position:`absolute`,borderRadius:`inherit`,border:`1px solid currentColor`,backgroundColor:`currentColor`,transition:e.transitions.create([`left`,`width`,`bottom`,`height`],{duration:e.transitions.duration.shortest}),variants:[{props:{size:`small`},style:{"@media (forced-colors: none)":{border:`none`}}},{props:{orientation:`horizontal`},style:{height:`inherit`,top:`50%`,transform:`translateY(-50%)`}},{props:{orientation:`vertical`},style:{width:`inherit`,left:`50%`,transform:`translateX(-50%)`}},{props:{track:!1},style:{display:`none`}},...Object.entries(e.palette).filter(Ys()).map(([t])=>({props:{color:t,track:`inverted`},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles(`dark`,{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles(`dark`,{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),cl=Q(`span`,{name:`MuiSlider`,slot:`Thumb`})(Bo(({theme:e})=>({position:`absolute`,width:20,height:20,boxSizing:`border-box`,borderRadius:`50%`,outline:0,backgroundColor:`currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:e.transitions.create([`box-shadow`,`left`,`bottom`],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},"&::before":{position:`absolute`,content:`""`,borderRadius:`inherit`,width:`100%`,height:`100%`,boxShadow:(e.vars||e).shadows[2]},"&::after":{position:`absolute`,content:`""`,borderRadius:`50%`,width:42,height:42,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`},[`&.${tl.disabled}`]:{"&:hover":{boxShadow:`none`}},variants:[{props:{size:`small`},style:{width:12,height:12,"&::before":{boxShadow:`none`}}},{props:{orientation:`horizontal`},style:{top:`50%`,transform:`translate(-50%, -50%)`}},{props:{orientation:`vertical`},style:{left:`50%`,transform:`translate(-50%, 50%)`}},...Object.entries(e.palette).filter(Ys()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${tl.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}},[`&.${tl.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),ll=Q(rl,{name:`MuiSlider`,slot:`ValueLabel`})(Bo(({theme:e})=>({zIndex:1,whiteSpace:`nowrap`,...e.typography.body2,fontWeight:500,transition:e.transitions.create([`transform`],{duration:e.transitions.duration.shortest}),position:`absolute`,backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`0.25rem 0.75rem`,variants:[{props:{orientation:`horizontal`},style:{transform:`translateY(-100%) scale(0)`,top:`-10px`,transformOrigin:`bottom center`,"&::before":{position:`absolute`,content:`""`,width:8,height:8,transform:`translate(-50%, 50%) rotate(45deg)`,backgroundColor:`inherit`,bottom:0,left:`50%`},[`&.${tl.valueLabelOpen}`]:{transform:`translateY(-100%) scale(1)`}}},{props:{orientation:`vertical`},style:{transform:`translateY(-50%) scale(0)`,right:`30px`,top:`50%`,transformOrigin:`right center`,"&::before":{position:`absolute`,content:`""`,width:8,height:8,transform:`translate(-50%, -50%) rotate(45deg)`,backgroundColor:`inherit`,right:-8,top:`50%`},[`&.${tl.valueLabelOpen}`]:{transform:`translateY(-50%) scale(1)`}}},{props:{size:`small`},style:{fontSize:e.typography.pxToRem(12),padding:`0.25rem 0.5rem`}},{props:{orientation:`vertical`,size:`small`},style:{right:`20px`}}]})));process.env.NODE_ENV!==`production`&&(ll.propTypes={children:W.default.element.isRequired,index:W.default.number.isRequired,open:W.default.bool.isRequired,value:W.default.node});var ul=Q(`span`,{name:`MuiSlider`,slot:`Mark`,shouldForwardProp:e=>Ro(e)&&e!==`markActive`,overridesResolver:(e,t)=>{let{markActive:n}=e;return[t.mark,n&&t.markActive]}})(Bo(({theme:e})=>({position:`absolute`,width:2,height:2,borderRadius:1,backgroundColor:`currentColor`,variants:[{props:{orientation:`horizontal`},style:{top:`50%`,transform:`translate(-1px, -50%)`}},{props:{orientation:`vertical`},style:{left:`50%`,transform:`translate(-50%, 1px)`}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),dl=Q(`span`,{name:`MuiSlider`,slot:`MarkLabel`,shouldForwardProp:e=>Ro(e)&&e!==`markLabelActive`})(Bo(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:`absolute`,whiteSpace:`nowrap`,variants:[{props:{orientation:`horizontal`},style:{top:30,transform:`translateX(-50%)`,"@media (pointer: coarse)":{top:40}}},{props:{orientation:`vertical`},style:{left:36,transform:`translateY(50%)`,"@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),fl=e=>{let{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:c}=e;return Sn({root:[`root`,t&&`disabled`,n&&`dragging`,r&&`marked`,i===`vertical`&&`vertical`,a===`inverted`&&`trackInverted`,a===!1&&`trackFalse`,s&&`color${Dn(s)}`,c&&`size${Dn(c)}`],rail:[`rail`],track:[`track`],mark:[`mark`],markActive:[`markActive`],markLabel:[`markLabel`],markLabelActive:[`markLabelActive`],valueLabel:[`valueLabel`],thumb:[`thumb`,t&&`disabled`],active:[`active`],disabled:[`disabled`],focusVisible:[`focusVisible`]},el,o)},pl=({children:e})=>e,ml=f.forwardRef(function(e,t){let n=Ho({props:e,name:`MuiSlider`}),r=fa(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":o,color:s=`primary`,classes:c,className:l,disableSwap:u=!1,disabled:d=!1,getAriaLabel:p,getAriaValueText:h,marks:g=!1,max:_=100,min:v=0,name:y,onChange:b,onChangeCommitted:x,orientation:S=`horizontal`,shiftStep:C=10,size:ee=`medium`,step:w=1,scale:T=il,slotProps:te={},slots:E={},tabIndex:D,track:O=`normal`,value:ne,valueLabelDisplay:k=`off`,valueLabelFormat:A=il,...j}=n,M={...n,isRtl:r,max:_,min:v,classes:c,disabled:d,disableSwap:u,orientation:S,marks:g,color:s,size:ee,step:w,shiftStep:C,scale:T,track:O,valueLabelDisplay:k,valueLabelFormat:A},{axisProps:re,getRootProps:N,getHiddenInputProps:P,getThumbProps:ie,open:F,active:ae,axis:oe,focusedThumbIndex:I,range:L,dragging:se,marks:ce,values:R,trackOffset:le,trackLeap:ue,getThumbStyle:de}=Jc({...M,rootRef:t});M.marked=ce.length>0&&ce.some(e=>e.label),M.dragging=se,M.focusedThumbIndex=I;let z=fl(M),fe={slots:E,slotProps:te},[pe,me]=$c(`root`,{elementType:al,getSlotProps:N,externalForwardedProps:{...fe,...j},ownerState:M,className:[z.root,l]}),[he,ge]=$c(`rail`,{elementType:ol,externalForwardedProps:fe,ownerState:M,className:z.rail}),[_e,ve]=$c(`track`,{elementType:sl,externalForwardedProps:fe,additionalProps:{style:{...re[oe].offset(le),...re[oe].leap(ue)}},ownerState:M,className:z.track}),[ye,be]=$c(`thumb`,{elementType:cl,getSlotProps:ie,externalForwardedProps:fe,ownerState:M,className:z.thumb}),[xe,Se]=$c(`valueLabel`,{elementType:ll,externalForwardedProps:fe,ownerState:M,className:z.valueLabel}),[Ce,we]=$c(`mark`,{elementType:ul,externalForwardedProps:fe,ownerState:M,className:z.mark}),[Te,Ee]=$c(`markLabel`,{elementType:dl,externalForwardedProps:fe,ownerState:M,className:z.markLabel}),[De,Oe]=$c(`input`,{elementType:`input`,getSlotProps:P,externalForwardedProps:fe,ownerState:M});return(0,m.jsxs)(pe,{...me,children:[(0,m.jsx)(he,{...ge}),(0,m.jsx)(_e,{...ve}),ce.filter(e=>e.value>=v&&e.value<=_).map((e,t)=>{let n=zc(e.value,v,_),r=re[oe].offset(n),i;return i=O===!1?R.includes(e.value):O===`normal`&&(L?e.value>=R[0]&&e.value<=R[R.length-1]:e.value<=R[0])||O===`inverted`&&(L?e.value<=R[0]||e.value>=R[R.length-1]:e.value>=R[0]),(0,m.jsxs)(f.Fragment,{children:[(0,m.jsx)(Ce,{"data-index":t,...we,...!Ec(Ce)&&{markActive:i},style:{...r,...we.style},className:U(we.className,i&&z.markActive)}),e.label==null?null:(0,m.jsx)(Te,{"aria-hidden":!0,"data-index":t,...Ee,...!Ec(Te)&&{markLabelActive:i},style:{...r,...Ee.style},className:U(z.markLabel,Ee.className,i&&z.markLabelActive),children:e.label})]},t)}),R.map((e,t)=>{let n=zc(e,v,_),r=re[oe].offset(n),s=k===`off`?pl:xe;return(0,m.jsx)(s,{...!Ec(s)&&{valueLabelFormat:A,valueLabelDisplay:k,value:typeof A==`function`?A(T(e),t):A,index:t,open:F===t||ae===t||k===`on`,disabled:d},...Se,children:(0,m.jsx)(ye,{"data-index":t,...be,className:U(z.thumb,be.className,ae===t&&z.active,I===t&&z.focusVisible),style:{...r,...de(t),...be.style},children:(0,m.jsx)(De,{"data-index":t,"aria-label":p?p(t):i,"aria-valuenow":T(e),"aria-labelledby":o,"aria-valuetext":h?h(T(e),t):a,value:R[t],...Oe})})},t)})]})});process.env.NODE_ENV!==`production`&&(ml.propTypes={"aria-label":ts(W.default.string,e=>Array.isArray(e.value||e.defaultValue)&&e[`aria-label`]!=null?Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":W.default.string,"aria-valuetext":ts(W.default.string,e=>Array.isArray(e.value||e.defaultValue)&&e[`aria-valuetext`]!=null?Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:W.default.node,classes:W.default.object,className:W.default.string,color:W.default.oneOfType([W.default.oneOf([`primary`,`secondary`,`error`,`info`,`success`,`warning`]),W.default.string]),defaultValue:W.default.oneOfType([W.default.arrayOf(W.default.number),W.default.number]),disabled:W.default.bool,disableSwap:W.default.bool,getAriaLabel:W.default.func,getAriaValueText:W.default.func,marks:W.default.oneOfType([W.default.arrayOf(W.default.shape({label:W.default.node,value:W.default.number.isRequired})),W.default.bool]),max:W.default.number,min:W.default.number,name:W.default.string,onChange:W.default.func,onChangeCommitted:W.default.func,orientation:W.default.oneOf([`horizontal`,`vertical`]),scale:W.default.func,shiftStep:W.default.number,size:W.default.oneOfType([W.default.oneOf([`small`,`medium`]),W.default.string]),slotProps:W.default.shape({input:W.default.oneOfType([W.default.func,W.default.object]),mark:W.default.oneOfType([W.default.func,W.default.object]),markLabel:W.default.oneOfType([W.default.func,W.default.object]),rail:W.default.oneOfType([W.default.func,W.default.object]),root:W.default.oneOfType([W.default.func,W.default.object]),thumb:W.default.oneOfType([W.default.func,W.default.object]),track:W.default.oneOfType([W.default.func,W.default.object]),valueLabel:W.default.oneOfType([W.default.func,W.default.shape({children:W.default.element,className:W.default.string,open:W.default.bool,style:W.default.object,value:W.default.node,valueLabelDisplay:W.default.oneOf([`auto`,`off`,`on`])})])}),slots:W.default.shape({input:W.default.elementType,mark:W.default.elementType,markLabel:W.default.elementType,rail:W.default.elementType,root:W.default.elementType,thumb:W.default.elementType,track:W.default.elementType,valueLabel:W.default.elementType}),step:W.default.number,sx:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.func,W.default.object,W.default.bool])),W.default.func,W.default.object]),tabIndex:W.default.number,track:W.default.oneOf([`inverted`,`normal`,!1]),value:W.default.oneOfType([W.default.arrayOf(W.default.number),W.default.number]),valueLabelDisplay:W.default.oneOf([`auto`,`off`,`on`]),valueLabelFormat:W.default.oneOfType([W.default.func,W.default.string])});function hl(e){return Na(`MuiTypography`,e)}Uo(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]);var gl=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return Sn({root:[`root`,i,e.align!==`inherit`&&`align${Dn(t)}`,n&&`gutterBottom`,r&&`noWrap`]},hl,a)},_l=Q(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${Dn(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(Bo(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(Ys()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${Dn(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}}]}))),vl={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},yl=f.forwardRef(function(e,t){let n=Ho({props:e,name:`MuiTypography`}),{color:r,align:i=`inherit`,className:a,component:o,gutterBottom:s=!1,noWrap:c=!1,variant:l=`body1`,variantMapping:u=vl,...d}=n,f={...n,align:i,color:r,className:a,component:o,gutterBottom:s,noWrap:c,variant:l,variantMapping:u};return(0,m.jsx)(_l,{as:o||u[l]||vl[l]||`span`,ref:t,className:U(gl(f).root,a),...d,ownerState:f,style:{...i!==`inherit`&&{"--Typography-textAlign":i},...d.style}})});process.env.NODE_ENV!==`production`&&(yl.propTypes={align:W.default.oneOf([`center`,`inherit`,`justify`,`left`,`right`]),children:W.default.node,classes:W.default.object,className:W.default.string,color:W.default.oneOfType([W.default.oneOf([`primary`,`secondary`,`success`,`error`,`info`,`warning`,`textPrimary`,`textSecondary`,`textDisabled`]),W.default.string]),component:W.default.elementType,gutterBottom:W.default.bool,noWrap:W.default.bool,style:W.default.object,sx:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.func,W.default.object,W.default.bool])),W.default.func,W.default.object]),variant:W.default.oneOfType([W.default.oneOf([`body1`,`body2`,`button`,`caption`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`inherit`,`overline`,`subtitle1`,`subtitle2`]),W.default.string]),variantMapping:W.default.object});var bl=Uo(`MuiBox`,[`root`]),xl=(0,h.createBox)({themeId:xo,defaultTheme:yo(),defaultClassName:bl.root,generateClassName:wn.generate});process.env.NODE_ENV!==`production`&&(xl.propTypes={children:W.default.node,component:W.default.elementType,sx:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.func,W.default.object,W.default.bool])),W.default.func,W.default.object])});var Sl=({showLayer:e,setShowLayer:t,scale:n,setScale:r,rotation:i,setRotation:a,mapPosition:o,setMapPosition:s,position:c,setPosition:l,enableTransformControls:f,setEnableTransformControls:p,transformMode:h,setTransformMode:g,layerName:_=`Layer`})=>{let{scene:v,worldMatrixInv:b}=O(),x=(0,d.useRef)(void 0),[S,C]=(0,d.useState)(!1);return(0,d.useLayoutEffect)(()=>{if(!v||!b||!f){x.current&&(v?.remove(x.current),x.current.geometry.dispose(),x.current.material.dispose(),x.current=void 0,C(!1));return}let e=new u.BoxGeometry(1,1,1),t=new u.MeshBasicMaterial({visible:!1}),r=new u.Mesh(e,t),a=y.toScenePosition(b,[o.lng,o.lat],0);return r.position.set(a.x+c.x,a.y+c.y,a.z+c.z),r.rotation.set(i.x*Math.PI/180,i.y*Math.PI/180,i.z*Math.PI/180),r.scale.set(n,n,n),v.add(r),x.current=r,C(!0),()=>{x.current&&(v.remove(x.current),x.current.geometry.dispose(),x.current.material.dispose(),x.current=void 0,C(!1))}},[v,b,f]),(0,d.useLayoutEffect)(()=>{if(!x.current||!b)return;let e=y.toScenePosition(b,[o.lng,o.lat],0);x.current.position.set(e.x+c.x,e.y+c.y,e.z+c.z),x.current.rotation.set(i.x*Math.PI/180,i.y*Math.PI/180,i.z*Math.PI/180),x.current.scale.set(n,n,n),x.current.updateMatrixWorld(!0)},[c,i,n,o,b]),(0,m.jsxs)(m.Fragment,{children:[S&&x.current&&f&&(0,m.jsx)(ln,{target:x.current,mode:h||`translate`,enabled:f,onObjectChange:e=>{if(!b)return;let t=y.toScenePosition(b,[o.lng,o.lat],0);l({x:e.position.x-t.x,y:e.position.y-t.y,z:e.position.z-t.z}),a({x:e.rotation.x*180/Math.PI,y:e.rotation.y*180/Math.PI,z:e.rotation.z*180/Math.PI}),r(e.scale.x)}}),(0,m.jsxs)(xl,{sx:{padding:`10px`},children:[(0,m.jsxs)(xl,{sx:{display:`flex`,gap:1,flexWrap:`wrap`,marginBottom:2},children:[(0,m.jsxs)(yc,{color:`primary`,variant:e?`contained`:`outlined`,onClick:()=>t(!e),size:`small`,children:[e?`Hide`:`Show`,` `,_]}),p&&(0,m.jsx)(yc,{color:`info`,variant:f?`contained`:`outlined`,onClick:()=>p(!f),size:`small`,children:`3D Gizmo`})]}),g&&f&&(0,m.jsx)(xl,{sx:{marginBottom:2},children:(0,m.jsxs)(Tc,{variant:`outlined`,size:`small`,fullWidth:!0,"aria-label":`transform mode`,children:[(0,m.jsx)(yc,{variant:h===`translate`?`contained`:`outlined`,onClick:()=>g(`translate`),children:`Move`}),(0,m.jsx)(yc,{variant:h===`rotate`?`contained`:`outlined`,onClick:()=>g(`rotate`),children:`Rotate`}),(0,m.jsx)(yc,{variant:h===`scale`?`contained`:`outlined`,onClick:()=>g(`scale`),children:`Scale`})]})}),(0,m.jsxs)(yl,{gutterBottom:!0,children:[`Scale: `,n.toFixed(2)]}),(0,m.jsx)(ml,{value:n,onChange:(e,t)=>r(t),min:.01,max:150,step:.01,valueLabelDisplay:`auto`}),(0,m.jsxs)(yl,{gutterBottom:!0,children:[`Rotation X: `,i.x,`°`]}),(0,m.jsx)(ml,{value:i.x,onChange:(e,t)=>a({...i,x:t}),min:0,max:360,valueLabelDisplay:`auto`}),(0,m.jsxs)(yl,{gutterBottom:!0,children:[`Rotation Y: `,i.y,`°`]}),(0,m.jsx)(ml,{value:i.y,onChange:(e,t)=>a({...i,y:t}),min:0,max:360,valueLabelDisplay:`auto`}),(0,m.jsxs)(yl,{gutterBottom:!0,children:[`Rotation Z: `,i.z,`°`]}),(0,m.jsx)(ml,{value:i.z,onChange:(e,t)=>a({...i,z:t}),min:0,max:360,valueLabelDisplay:`auto`}),(0,m.jsxs)(yl,{gutterBottom:!0,children:[`Longitude: `,o.lng.toFixed(6)]}),(0,m.jsx)(ml,{value:o.lng,onChange:(e,t)=>s({...o,lng:t}),min:7.09,max:7.11,step:1e-4,valueLabelDisplay:`auto`}),(0,m.jsxs)(yl,{gutterBottom:!0,children:[`Latitude: `,o.lat.toFixed(6)]}),(0,m.jsx)(ml,{value:o.lat,onChange:(e,t)=>s({...o,lat:t}),min:50.73,max:50.74,step:1e-4,valueLabelDisplay:`auto`}),(0,m.jsxs)(yl,{gutterBottom:!0,children:[`Position X: `,c.x]}),(0,m.jsx)(ml,{value:c.x,onChange:(e,t)=>l({...c,x:t}),min:-100,max:100,valueLabelDisplay:`auto`}),(0,m.jsxs)(yl,{gutterBottom:!0,children:[`Position Y: `,c.y]}),(0,m.jsx)(ml,{value:c.y,onChange:(e,t)=>l({...c,y:t}),min:-100,max:100,valueLabelDisplay:`auto`}),(0,m.jsxs)(yl,{gutterBottom:!0,children:[`Position Z: `,c.z]}),(0,m.jsx)(ml,{value:c.z,onChange:(e,t)=>l({...c,z:t}),min:-500,max:100,valueLabelDisplay:`auto`})]})]})};exports.MlThreeGizmo=ln,exports.MlThreeModelLayer=ut,exports.MlThreeObjectControls=Sl,exports.MlThreeSplatLayer=At,exports.ThreeContext=D,exports.ThreeProvider=ne,exports.useThree=O;