0&&(i[c]=u,s=!0)}s&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const l=this.boundingSphere;return l!==null&&(e.data.boundingSphere=l.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 r=e.index;r!==null&&this.setIndex(r.clone());const i=e.attributes;for(const d in i){const u=i[d];this.setAttribute(d,u.clone(n))}const s=e.morphAttributes;for(const d in s){const u=[],h=s[d];for(let f=0,p=h.length;f0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s(e.far-e.near)**2))&&(u8.copy(s).invert(),Mm.copy(e.ray).applyMatrix4(u8),!(r.boundingBox!==null&&Mm.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,Mm)))}_computeIntersections(e,n,r){let i;const s=this.geometry,o=this.material,l=s.index,c=s.attributes.position,d=s.attributes.uv,u=s.attributes.uv1,h=s.attributes.normal,f=s.groups,p=s.drawRange;if(l!==null)if(Array.isArray(o))for(let x=0,v=f.length;xn.far?null:{distance:d,point:xS.clone(),object:t}}function yS(t,e,n,r,i,s,o,l,c,d){t.getVertexPosition(l,fS),t.getVertexPosition(c,pS),t.getVertexPosition(d,gS);const u=Kbe(t,e,n,r,fS,pS,gS,m8);if(u){const h=new pt;ay.getBarycoord(m8,fS,pS,gS,h),i&&(u.uv=ay.getInterpolatedAttribute(i,l,c,d,h,new In)),s&&(u.uv1=ay.getInterpolatedAttribute(s,l,c,d,h,new In)),o&&(u.normal=ay.getInterpolatedAttribute(o,l,c,d,h,new pt),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const f={a:l,b:c,c:d,normal:new pt,materialIndex:0};ay.getNormal(fS,pS,gS,f.normal),u.face=f,u.barycoord=h}return u}let KF=class oY extends _l{constructor(e=1,n=1,r=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:s,depthSegments:o};const l=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);const c=[],d=[],u=[],h=[];let f=0,p=0;x("z","y","x",-1,-1,r,n,e,o,s,0),x("z","y","x",1,-1,r,n,-e,o,s,1),x("x","z","y",1,1,e,r,n,i,o,2),x("x","z","y",1,-1,e,r,-n,i,o,3),x("x","y","z",1,-1,e,n,r,i,s,4),x("x","y","z",-1,-1,e,n,-r,i,s,5),this.setIndex(c),this.setAttribute("position",new Eo(d,3)),this.setAttribute("normal",new Eo(u,3)),this.setAttribute("uv",new Eo(h,2));function x(v,g,y,_,N,A,k,P,C,E,M){const j=A/C,B=k/E,L=A/2,U=k/2,D=P/2,$=C+1,G=E+1;let z=0,W=0;const K=new pt;for(let te=0;te0?1:-1,u.push(K.x,K.y,K.z),h.push(Y/C),h.push(1-te/E),z+=1}}for(let te=0;te to .`)}let f=qc(),p;if(e){let _=typeof e=="string"?Ub(e):e;pa(u==="/"||_.pathname?.startsWith(u),`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 "${u}" but pathname "${_.pathname}" was given in the \`location\` prop.`),p=_}else p=f;let x=p.pathname||"/",v=x;if(u!=="/"){let _=u.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(_.length).join("/")}let g=RK(t,{pathname:v});vl(h||g!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),vl(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.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 y=fde(g&&g.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Vd([u,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?u:Vd([u,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),o,n,r,i);return e&&y?w.createElement(iv.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},y):y}function dde(){let t=yde(),e=Yce(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:s},"ErrorBoundary")," or"," ",w.createElement("code",{style:s},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},e),n?w.createElement("pre",{style:i},n):null,o)}var ude=w.createElement(dde,null),GK=class extends w.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(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=ide(t.digest);n&&(t=n)}let e=t!==void 0?w.createElement(Tl.Provider,{value:this.props.routeContext},w.createElement(hF.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?w.createElement(hde,{error:t},e):e}};GK.contextType=Jce;var IM=new WeakMap;function hde({children:t,error:e}){let{basename:n}=w.useContext(Io);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=ade(e.digest);if(r){let i=IM.get(e);if(i)throw i;let s=IK(r.location,n);if(OK&&!IM.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw IM.set(e,o),o}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function mde({routeContext:t,match:e,children:n}){let r=w.useContext(Bb);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),w.createElement(Tl.Provider,{value:t},n)}function fde(t,e=[],n=null,r=null,i=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 s=t,o=n?.errors;if(o!=null){let u=s.findIndex(h=>h.route.id&&o?.[h.route.id]!==void 0);pa(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}let d=n&&r?(u,h)=>{r(u,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Qce(n.matches),errorInfo:h})}:void 0;return s.reduceRight((u,h,f)=>{let p,x=!1,v=null,g=null;n&&(p=o&&h.route.id?o[h.route.id]:void 0,v=h.route.errorElement||ude,l&&(c<0&&f===0?(WK("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,g=null):c===f&&(x=!0,g=h.route.hydrateFallbackElement||null)));let y=e.concat(s.slice(0,f+1)),_=()=>{let N;return p?N=v:x?N=g:h.route.Component?N=w.createElement(h.route.Component,null):h.route.element?N=h.route.element:N=u,w.createElement(mde,{match:h,routeContext:{outlet:u,matches:y,isDataRoute:n!=null},children:N})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?w.createElement(GK,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:d}):_()},null)}function fF(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pde(t){let e=w.useContext(Bb);return pa(e,fF(t)),e}function gde(t){let e=w.useContext(zC);return pa(e,fF(t)),e}function bde(t){let e=w.useContext(Tl);return pa(e,fF(t)),e}function pF(t){let e=bde(t),n=e.matches[e.matches.length-1];return pa(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function xde(){return pF("useRouteId")}function yde(){let t=w.useContext(hF),e=gde("useRouteError"),n=pF("useRouteError");return t!==void 0?t:e.errors?.[n]}function vde(){let{router:t}=pde("useNavigate"),e=pF("useNavigate"),n=w.useRef(!1);return $K(()=>{n.current=!0}),w.useCallback(async(i,s={})=>{vl(n.current,HK),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var _B={};function WK(t,e,n){!e&&!_B[t]&&(_B[t]=!0,vl(!1,n))}w.memo(wde);function wde({routes:t,future:e,state:n,onError:r}){return qK(t,void 0,n,r,e)}function lb({to:t,replace:e,state:n,relative:r}){pa(Hb()," may be used only in the context of a component.");let{static:i}=w.useContext(Io);vl(!i," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:s}=w.useContext(Tl),{pathname:o}=qc(),l=Ml(),c=uF(t,dF(s),o,r==="path"),d=JSON.stringify(c);return w.useEffect(()=>{l(JSON.parse(d),{replace:e,state:n,relative:r})},[l,d,r,e,n]),null}function KK(t){return lde(t.context)}function Ir(t){pa(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Sde({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){pa(!Hb(),"You cannot render a inside another . You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=w.useMemo(()=>({basename:l,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[l,i,s,o]);typeof n=="string"&&(n=Ub(n));let{pathname:d="/",search:u="",hash:h="",state:f=null,key:p="default"}=n,x=w.useMemo(()=>{let v=Jd(d,l);return v==null?null:{location:{pathname:v,search:u,hash:h,state:f,key:p},navigationType:r}},[l,d,u,h,f,p,r]);return vl(x!=null,` is not able to match the URL "${d}${u}${h}" because it does not start with the basename, so the won't render anything.`),x==null?null:w.createElement(Io.Provider,{value:c},w.createElement(iv.Provider,{children:e,value:x}))}function _de({children:t,location:e}){return cde(WE(t),e)}function WE(t,e=[]){let n=[];return w.Children.forEach(t,(r,i)=>{if(!w.isValidElement(r))return;let s=[...e,i];if(r.type===w.Fragment){n.push.apply(n,WE(r.props.children,s));return}pa(r.type===Ir,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),pa(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=WE(r.props.children,s)),n.push(o)}),n}var I_="get",z_="application/x-www-form-urlencoded";function UC(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Nde(t){return UC(t)&&t.tagName.toLowerCase()==="button"}function Cde(t){return UC(t)&&t.tagName.toLowerCase()==="form"}function kde(t){return UC(t)&&t.tagName.toLowerCase()==="input"}function Ade(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Tde(t,e){return t.button===0&&(!e||e==="_self")&&!Ade(t)}function KE(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function Mde(t,e){let n=KE(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}var Jw=null;function Pde(){if(Jw===null)try{new FormData(document.createElement("form"),0),Jw=!1}catch{Jw=!0}return Jw}var jde=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zM(t){return t!=null&&!jde.has(t)?(vl(!1,`"${t}" is not a valid \`encType\` for \`