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))&&(iF.copy(a).invert(),_d.copy(e.ray).applyMatrix4(iF),!(i.boundingBox!==null&&_d.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,_d)))}_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:by.clone(),object:t}}function _y(t,e,n,i,r,a,s,o,l,c){t.getVertexPosition(o,gy),t.getVertexPosition(l,xy),t.getVertexPosition(c,vy);const d=foe(t,e,n,i,gy,xy,vy,aF);if(d){const f=new Ge;vg.getBarycoord(aF,gy,xy,vy,f),r&&(d.uv=vg.getInterpolatedAttribute(r,o,l,c,f,new en)),a&&(d.uv1=vg.getInterpolatedAttribute(a,o,l,c,f,new en)),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(gy,xy,vy,p.normal),d.face=p,d.barycoord=f}return d}let cP=class l$ 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,g,M,w,A,E,P,N,F,R){const O=A/N,B=E/F,I=A/2,G=E/2,L=P/2,H=N+1,q=F+1;let W=0,K=0;const J=new Ge;for(let se=0;se0?1:-1,d.push(J.x,J.y,J.z),f.push(X/N),f.push(1-se/F),W+=1}}for(let se=0;se to .`)}let p=Xu(),m;if(e){let M=typeof e=="string"?em(e):e;hi(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 y=KV(t,{pathname:b});go(f||y!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),go(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.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 g=gte(y&&y.map(M=>Object.assign({},M,{params:Object.assign({},l,M.params),pathname:Xl([d,a.encodeLocation?a.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?d:Xl([d,a.encodeLocation?a.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),s,n,i,r);return e&&g?T.createElement(ax.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},g):g}function fte(){let t=_te(),e=ite(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=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:a},"ErrorBoundary")," or"," ",T.createElement("code",{style:a},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),n?T.createElement("pre",{style:r},n):null,s)}var hte=T.createElement(fte,null),pte=class extends T.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?T.createElement(Qo.Provider,{value:this.props.routeContext},T.createElement(I3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function mte({routeContext:t,match:e,children:n}){let i=T.useContext(tm);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),T.createElement(Qo.Provider,{value:t},n)}function gte(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);hi(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,y=null;n&&(m=s&&f.route.id?s[f.route.id]:void 0,b=f.route.errorElement||hte,o&&(l<0&&p===0?(sG("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,y=null):l===p&&(_=!0,y=f.route.hydrateFallbackElement||null)));let g=e.concat(a.slice(0,p+1)),M=()=>{let w;return m?w=b:_?w=y:f.route.Component?w=T.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,T.createElement(mte,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?T.createElement(pte,{location:n.location,revalidation:n.revalidation,component:b,error:m,children:M(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:c}):M()},null)}function U3(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xte(t){let e=T.useContext(tm);return hi(e,U3(t)),e}function vte(t){let e=T.useContext(fS);return hi(e,U3(t)),e}function yte(t){let e=T.useContext(Qo);return hi(e,U3(t)),e}function F3(t){let e=yte(t),n=e.matches[e.matches.length-1];return hi(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function bte(){return F3("useRouteId")}function _te(){let t=T.useContext(I3),e=vte("useRouteError"),n=F3("useRouteError");return t!==void 0?t:e.errors?.[n]}function Ste(){let{router:t}=xte("useNavigate"),e=F3("useNavigate"),n=T.useRef(!1);return iG(()=>{n.current=!0}),T.useCallback(async(r,a={})=>{go(n.current,nG),n.current&&(typeof r=="number"?t.navigate(r):await t.navigate(r,{fromRouteId:e,...a}))},[t,e])}var m4={};function sG(t,e,n){!e&&!m4[t]&&(m4[t]=!0,go(!1,n))}T.memo(wte);function wte({routes:t,future:e,state:n,unstable_onError:i}){return aG(t,void 0,n,i,e)}function Mte(t){return ute(t.context)}function au(t){hi(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Ete({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:r,static:a=!1}){hi(!sx(),"You cannot render a inside another . You should never have more than one in your app.");let s=t.replace(/^\/*/,"/"),o=T.useMemo(()=>({basename:s,navigator:r,static:a,future:{}}),[s,r,a]);typeof n=="string"&&(n=em(n));let{pathname:l="/",search:c="",hash:d="",state:f=null,key:p="default"}=n,m=T.useMemo(()=>{let _=nc(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 go(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:T.createElement(Zo.Provider,{value:o},T.createElement(ax.Provider,{children:e,value:m}))}function Ate({children:t,location:e}){return dte(DC(t),e)}function DC(t,e=[]){let n=[];return T.Children.forEach(t,(i,r)=>{if(!T.isValidElement(i))return;let a=[...e,r];if(i.type===T.Fragment){n.push.apply(n,DC(i.props.children,a));return}hi(i.type===au,`[${typeof i.type=="string"?i.type:i.type.name}] is not a component. All component children of must be a or `),hi(!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=DC(i.props.children,a)),n.push(s)}),n}var Lb="get",Ib="application/x-www-form-urlencoded";function hS(t){return t!=null&&typeof t.tagName=="string"}function Tte(t){return hS(t)&&t.tagName.toLowerCase()==="button"}function Cte(t){return hS(t)&&t.tagName.toLowerCase()==="form"}function Nte(t){return hS(t)&&t.tagName.toLowerCase()==="input"}function Rte(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Pte(t,e){return t.button===0&&(!e||e==="_self")&&!Rte(t)}var iy=null;function Dte(){if(iy===null)try{new FormData(document.createElement("form"),0),iy=!1}catch{iy=!0}return iy}var Ote=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function KE(t){return t!=null&&!Ote.has(t)?(go(!1,`"${t}" is not a valid \`encType\` for \`