0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const r={};let a=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],d=[];for(let f=0,p=c.length;f0&&(r[l]=d,a=!0)}a&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const r=e.attributes;for(const c in r){const d=r[c];this.setAttribute(c,d.clone(n))}const a=e.morphAttributes;for(const c in a){const d=[],f=a[c];for(let p=0,m=f.length;p0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,s=r.length;a(e.far-e.near)**2))&&(lj.copy(a).invert(),Md.copy(e.ray).applyMatrix4(lj),!(i.boundingBox!==null&&Md.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,Md)))}_computeIntersections(e,n,i){let r;const a=this.geometry,s=this.material,o=a.index,l=a.attributes.position,c=a.attributes.uv,d=a.attributes.uv1,f=a.attributes.normal,p=a.groups,m=a.drawRange;if(o!==null)if(Array.isArray(s))for(let _=0,b=p.length;_n.far?null:{distance:c,point:_y.clone(),object:t}}function Sy(t,e,n,i,r,a,s,o,l,c){t.getVertexPosition(o,xy),t.getVertexPosition(l,vy),t.getVertexPosition(c,yy);const d=Soe(t,e,n,i,xy,vy,yy,uj);if(d){const f=new Ge;vg.getBarycoord(uj,xy,vy,yy,f),r&&(d.uv=vg.getInterpolatedAttribute(r,o,l,c,f,new nn)),a&&(d.uv1=vg.getInterpolatedAttribute(a,o,l,c,f,new nn)),s&&(d.normal=vg.getInterpolatedAttribute(s,o,l,c,f,new Ge),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));const p={a:o,b:l,c,normal:new Ge,materialIndex:0};vg.getNormal(xy,vy,yy,p.normal),d.face=p,d.barycoord=f}return d}let dP=class f$ extends el{constructor(e=1,n=1,i=1,r=1,a=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:r,heightSegments:a,depthSegments:s};const o=this;r=Math.floor(r),a=Math.floor(a),s=Math.floor(s);const l=[],c=[],d=[],f=[];let p=0,m=0;_("z","y","x",-1,-1,i,n,e,s,a,0),_("z","y","x",1,-1,i,n,-e,s,a,1),_("x","z","y",1,1,e,i,n,r,s,2),_("x","z","y",1,-1,e,i,-n,r,s,3),_("x","y","z",1,-1,e,n,i,r,a,4),_("x","y","z",-1,-1,e,n,-i,r,a,5),this.setIndex(l),this.setAttribute("position",new po(c,3)),this.setAttribute("normal",new po(d,3)),this.setAttribute("uv",new po(f,2));function _(b,y,x,M,w,E,T,P,N,U,R){const O=E/N,z=T/U,I=E/2,$=T/2,L=P/2,B=N+1,q=U+1;let W=0,X=0;const Q=new Ge;for(let ie=0;ie0?1:-1,d.push(Q.x,Q.y,Q.z),f.push(Y/N),f.push(1-ie/U),W+=1}}for(let ie=0;ie to .`)}let p=Ju(),m;if(e){let M=typeof e=="string"?nm(e):e;pi(d==="/"||M.pathname?.startsWith(d),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${M.pathname}" was given in the \`location\` prop.`),m=M}else m=p;let _=m.pathname||"/",b=_;if(d!=="/"){let M=d.replace(/^\//,"").split("/");b="/"+_.replace(/^\//,"").split("/").slice(M.length).join("/")}let v=a$(t,{pathname:b});vo(f||v!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),vo(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let x=Cte(v&&v.map(M=>Object.assign({},M,{params:Object.assign({},l,M.params),pathname:Zl([d,a.encodeLocation?a.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?d:Zl([d,a.encodeLocation?a.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),s,n,i,r);return e&&x?A.createElement(dx.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},x):x}function Mte(){let t=Ote(),e=mte(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:a},"ErrorBoundary")," or"," ",A.createElement("code",{style:a},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},e),n?A.createElement("pre",{style:r},n):null,s)}var Ete=A.createElement(Mte,null),Ate=class extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?A.createElement(el.Provider,{value:this.props.routeContext},A.createElement($R.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Tte({routeContext:t,match:e,children:n}){let i=A.useContext(im);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),A.createElement(el.Provider,{value:t},n)}function Cte(t,e=[],n=null,i=null,r=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let a=t,s=n?.errors;if(s!=null){let d=a.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);pi(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let o=!1,l=-1;if(n)for(let d=0;d=0?a=a.slice(0,l+1):a=[a[0]];break}}}let c=n&&i?(d,f)=>{i(d,{location:n.location,params:n.matches?.[0]?.params??{},errorInfo:f})}:void 0;return a.reduceRight((d,f,p)=>{let m,_=!1,b=null,v=null;n&&(m=s&&f.route.id?s[f.route.id]:void 0,b=f.route.errorElement||Ete,o&&(l<0&&p===0?(m$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,v=null):l===p&&(_=!0,v=f.route.hydrateFallbackElement||null)));let x=e.concat(a.slice(0,p+1)),M=()=>{let w;return m?w=b:_?w=v:f.route.Component?w=A.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,A.createElement(Tte,{match:f,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?A.createElement(Ate,{location:n.location,revalidation:n.revalidation,component:b,error:m,children:M(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:c}):M()},null)}function WR(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Nte(t){let e=A.useContext(im);return pi(e,WR(t)),e}function Rte(t){let e=A.useContext(gS);return pi(e,WR(t)),e}function Pte(t){let e=A.useContext(el);return pi(e,WR(t)),e}function qR(t){let e=Pte(t),n=e.matches[e.matches.length-1];return pi(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function Dte(){return qR("useRouteId")}function Ote(){let t=A.useContext($R),e=Rte("useRouteError"),n=qR("useRouteError");return t!==void 0?t:e.errors?.[n]}function kte(){let{router:t}=Nte("useNavigate"),e=qR("useNavigate"),n=A.useRef(!1);return h$(()=>{n.current=!0}),A.useCallback(async(r,a={})=>{vo(n.current,f$),n.current&&(typeof r=="number"?t.navigate(r):await t.navigate(r,{fromRouteId:e,...a}))},[t,e])}var S4={};function m$(t,e,n){!e&&!S4[t]&&(S4[t]=!0,vo(!1,n))}A.memo(Lte);function Lte({routes:t,future:e,state:n,unstable_onError:i}){return p$(t,void 0,n,i,e)}function Ite(t){return Ste(t.context)}function kl(t){pi(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Ute({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:r,static:a=!1}){pi(!fx(),"You cannot render a inside another . You should never have more than one in your app.");let s=t.replace(/^\/*/,"/"),o=A.useMemo(()=>({basename:s,navigator:r,static:a,future:{}}),[s,r,a]);typeof n=="string"&&(n=nm(n));let{pathname:l="/",search:c="",hash:d="",state:f=null,key:p="default"}=n,m=A.useMemo(()=>{let _=ac(l,s);return _==null?null:{location:{pathname:_,search:c,hash:d,state:f,key:p},navigationType:i}},[s,l,c,d,f,p,i]);return vo(m!=null,` is not able to match the URL "${l}${c}${d}" because it does not start with the basename, so the won't render anything.`),m==null?null:A.createElement(Jo.Provider,{value:o},A.createElement(dx.Provider,{children:e,value:m}))}function jte({children:t,location:e}){return wte(FC(t),e)}function FC(t,e=[]){let n=[];return A.Children.forEach(t,(i,r)=>{if(!A.isValidElement(i))return;let a=[...e,r];if(i.type===A.Fragment){n.push.apply(n,FC(i.props.children,a));return}pi(i.type===kl,`[${typeof i.type=="string"?i.type:i.type.name}] is not a component. All component children of must be a or `),pi(!i.props.index||!i.props.children,"An index route cannot have child routes.");let s={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(s.children=FC(i.props.children,a)),n.push(s)}),n}var Bb="get",Hb="application/x-www-form-urlencoded";function xS(t){return t!=null&&typeof t.tagName=="string"}function Fte(t){return xS(t)&&t.tagName.toLowerCase()==="button"}function zte(t){return xS(t)&&t.tagName.toLowerCase()==="form"}function Bte(t){return xS(t)&&t.tagName.toLowerCase()==="input"}function Hte(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Vte(t,e){return t.button===0&&(!e||e==="_self")&&!Hte(t)}var cy=null;function $te(){if(cy===null)try{new FormData(document.createElement("form"),0),cy=!1}catch{cy=!0}return cy}var Gte=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function nA(t){return t!=null&&!Gte.has(t)?(vo(!1,`"${t}" is not a valid \`encType\` for \`