diff --git a/backend/main.py b/backend/main.py index b4c82c7b86a9dbc4b5d8e070c57673d1f04fb4c8..8a7968288c29ab3ef6bd3c38d8ba7c16e638a028 100644 --- a/backend/main.py +++ b/backend/main.py @@ -68,34 +68,35 @@ api_router.include_router(assessment_router) api_router.include_router(application_router) app.include_router(api_router) -# ---------------------------- -# Mount React static files -# ---------------------------- react_build_path = Path("static") if react_build_path.exists(): - # Serve actual static files (JS/CSS/images) + # Serve actual static files (JS/CSS/images) under /static app.mount("/static", StaticFiles(directory=react_build_path / "assets"), name="static_assets") - # Serve index.html at root - app.mount("/", StaticFiles(directory=react_build_path, html=True), name="react_root") else: logger.warning("React build not found in /static. Make sure to build frontend.") # ---------------------------- -# SPA fallback for non-API routes +# SPA fallback for non-API routes (this will handle all non-API routes) +# NOTE: This must be defined LAST to avoid catching other routes # ---------------------------- @app.get("/{full_path:path}") async def serve_spa(full_path: str, request: Request): """ Serve React SPA for any non-API path that doesn't match a real file. + This handles client-side routing for React Router. """ + # If it's an API route, return 404 since we already handled API routes separately if request.url.path.startswith("/api"): - return {"detail": "API route not found."} + from fastapi.responses import JSONResponse + return JSONResponse({"detail": "API route not found."}, status_code=404) + # For all other routes, serve the SPA index.html so React Router can handle it index_file = react_build_path / "index.html" if index_file.exists(): return FileResponse(index_file) - - return {"detail": "SPA not found, build your frontend first."} + + from fastapi.responses import JSONResponse + return JSONResponse({"detail": "SPA not found, build your frontend first."}, status_code=500) logger.info("Application routes registered") diff --git a/backend/static/assets/HTTPManager-b3lsNrys.js b/backend/static/assets/HTTPManager-b3lsNrys.js new file mode 100644 index 0000000000000000000000000000000000000000..40d6045d5da9b4874b6367d702804587136b53b0 --- /dev/null +++ b/backend/static/assets/HTTPManager-b3lsNrys.js @@ -0,0 +1,7 @@ +import{r as ze,a as C,c as O}from"./chunk-EPOLDU6W-hzVvDaQR.js";function ue(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:i;return At.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:c,At}var Wt;function He(){return Wt||(Wt=1,Ot.exports=qe()),Ot.exports}var ar=He();function Ve(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}Ve(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}} +`);var st=t=>typeof t=="number"&&!isNaN(t),G=t=>typeof t=="string",V=t=>typeof t=="function",Je=t=>G(t)||st(t),Nt=t=>G(t)||V(t)?t:null,We=(t,e)=>t===!1||st(t)&&t>0?t:e,Pt=t=>C.isValidElement(t)||G(t)||V(t)||st(t);function Xe(t,e,n=300){let{scrollHeight:o,style:r}=t;requestAnimationFrame(()=>{r.minHeight="initial",r.height=o+"px",r.transition=`all ${n}ms`,requestAnimationFrame(()=>{r.height="0",r.padding="0",r.margin="0",setTimeout(e,n)})})}function Ke({enter:t,exit:e,appendPosition:n=!1,collapse:o=!0,collapseDuration:r=300}){return function({children:a,position:s,preventExitTransition:i,done:d,nodeRef:f,isIn:c,playToast:m}){let b=n?`${t}--${s}`:t,v=n?`${e}--${s}`:e,u=C.useRef(0);return C.useLayoutEffect(()=>{let y=f.current,p=b.split(" "),_=g=>{g.target===f.current&&(m(),y.removeEventListener("animationend",_),y.removeEventListener("animationcancel",_),u.current===0&&g.type!=="animationcancel"&&y.classList.remove(...p))};y.classList.add(...p),y.addEventListener("animationend",_),y.addEventListener("animationcancel",_)},[]),C.useEffect(()=>{let y=f.current,p=()=>{y.removeEventListener("animationend",p),o?Xe(y,d,r):d()};c||(i?p():(u.current=1,y.className+=` ${v}`,y.addEventListener("animationend",p)))},[c]),O.createElement(O.Fragment,null,a)}}function Xt(t,e){return{content:de(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:e}}function de(t,e,n=!1){return C.isValidElement(t)&&!G(t.type)?C.cloneElement(t,{closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:n}):V(t)?t({closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:n}):t}function Ge({closeToast:t,theme:e,ariaLabel:n="close"}){return O.createElement("button",{className:`Toastify__close-button Toastify__close-button--${e}`,type:"button",onClick:o=>{o.stopPropagation(),t(!0)},"aria-label":n},O.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},O.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Qe({delay:t,isRunning:e,closeToast:n,type:o="default",hide:r,className:a,controlledProgress:s,progress:i,rtl:d,isIn:f,theme:c}){let m=r||s&&i===0,b={animationDuration:`${t}ms`,animationPlayState:e?"running":"paused"};s&&(b.transform=`scaleX(${i})`);let v=X("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":d}),u=V(a)?a({rtl:d,type:o,defaultClassName:v}):X(v,a),y={[s&&i>=1?"onTransitionEnd":"onAnimationEnd"]:s&&i<1?null:()=>{f&&n()}};return O.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},O.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${o}`}),O.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:u,style:b,...y}))}var Ye=1,pe=()=>`${Ye++}`;function Ze(t,e,n){let o=1,r=0,a=[],s=[],i=e,d=new Map,f=new Set,c=g=>(f.add(g),()=>f.delete(g)),m=()=>{s=Array.from(d.values()),f.forEach(g=>g())},b=({containerId:g,toastId:h,updateId:T})=>{let x=g?g!==t:t!==1,A=d.has(h)&&T==null;return x||A},v=(g,h)=>{d.forEach(T=>{var x;(h==null||h===T.props.toastId)&&((x=T.toggle)==null||x.call(T,g))})},u=g=>{var h,T;(T=(h=g.props)==null?void 0:h.onClose)==null||T.call(h,g.removalReason),g.isActive=!1},y=g=>{if(g==null)d.forEach(u);else{let h=d.get(g);h&&u(h)}m()},p=()=>{r-=a.length,a=[]},_=g=>{var h,T;let{toastId:x,updateId:A}=g.props,w=A==null;g.staleId&&d.delete(g.staleId),g.isActive=!0,d.set(x,g),m(),n(Xt(g,w?"added":"updated")),w&&((T=(h=g.props).onOpen)==null||T.call(h))};return{id:t,props:i,observe:c,toggle:v,removeToast:y,toasts:d,clearQueue:p,buildToast:(g,h)=>{if(b(h))return;let{toastId:T,updateId:x,data:A,staleId:w,delay:R}=h,L=x==null;L&&r++;let j={...i,style:i.toastStyle,key:o++,...Object.fromEntries(Object.entries(h).filter(([$,z])=>z!=null)),toastId:T,updateId:x,data:A,isIn:!1,className:Nt(h.className||i.toastClassName),progressClassName:Nt(h.progressClassName||i.progressClassName),autoClose:h.isLoading?!1:We(h.autoClose,i.autoClose),closeToast($){d.get(T).removalReason=$,y(T)},deleteToast(){let $=d.get(T);if($!=null){if(n(Xt($,"removed")),d.delete(T),r--,r<0&&(r=0),a.length>0){_(a.shift());return}m()}}};j.closeButton=i.closeButton,h.closeButton===!1||Pt(h.closeButton)?j.closeButton=h.closeButton:h.closeButton===!0&&(j.closeButton=Pt(i.closeButton)?i.closeButton:!0);let F={content:g,props:j,staleId:w};i.limit&&i.limit>0&&r>i.limit&&L?a.push(F):st(R)?setTimeout(()=>{_(F)},R):_(F)},setProps(g){i=g},setToggle:(g,h)=>{let T=d.get(g);T&&(T.toggle=h)},isToastActive:g=>{var h;return(h=d.get(g))==null?void 0:h.isActive},getSnapshot:()=>s}}var P=new Map,rt=[],It=new Set,tn=t=>It.forEach(e=>e(t)),me=()=>P.size>0;function en(){rt.forEach(t=>he(t.content,t.options)),rt=[]}var nn=(t,{containerId:e})=>{var n;return(n=P.get(e||1))==null?void 0:n.toasts.get(t)};function ye(t,e){var n;if(e)return!!((n=P.get(e))!=null&&n.isToastActive(t));let o=!1;return P.forEach(r=>{r.isToastActive(t)&&(o=!0)}),o}function on(t){if(!me()){rt=rt.filter(e=>t!=null&&e.options.toastId!==t);return}if(t==null||Je(t))P.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=P.get(t.containerId);e?e.removeToast(t.id):P.forEach(n=>{n.removeToast(t.id)})}}var rn=(t={})=>{P.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})};function he(t,e){Pt(t)&&(me()||rt.push({content:t,options:e}),P.forEach(n=>{n.buildToast(t,e)}))}function sn(t){var e;(e=P.get(t.containerId||1))==null||e.setToggle(t.id,t.fn)}function ge(t,e){P.forEach(n=>{(e==null||!(e!=null&&e.containerId)||e?.containerId===n.id)&&n.toggle(t,e?.id)})}function an(t){let e=t.containerId||1;return{subscribe(n){let o=Ze(e,t,tn);P.set(e,o);let r=o.observe(n);return en(),()=>{r(),P.delete(e)}},setProps(n){var o;(o=P.get(e))==null||o.setProps(n)},getSnapshot(){var n;return(n=P.get(e))==null?void 0:n.getSnapshot()}}}function ln(t){return It.add(t),()=>{It.delete(t)}}function cn(t){return t&&(G(t.toastId)||st(t.toastId))?t.toastId:pe()}function at(t,e){return he(t,e),e.toastId}function bt(t,e){return{...e,type:e&&e.type||t,toastId:cn(e)}}function _t(t){return(e,n)=>at(e,bt(t,n))}function S(t,e){return at(t,bt("default",e))}S.loading=(t,e)=>at(t,bt("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e}));function fn(t,{pending:e,error:n,success:o},r){let a;e&&(a=G(e)?S.loading(e,r):S.loading(e.render,{...r,...e}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},i=(f,c,m)=>{if(c==null){S.dismiss(a);return}let b={type:f,...s,...r,data:m},v=G(c)?{render:c}:c;return a?S.update(a,{...b,...v}):S(v.render,{...b,...v}),m},d=V(t)?t():t;return d.then(f=>i("success",o,f)).catch(f=>i("error",n,f)),d}S.promise=fn;S.success=_t("success");S.info=_t("info");S.error=_t("error");S.warning=_t("warning");S.warn=S.warning;S.dark=(t,e)=>at(t,bt("default",{theme:"dark",...e}));function un(t){on(t)}S.dismiss=un;S.clearWaitingQueue=rn;S.isActive=ye;S.update=(t,e={})=>{let n=nn(t,e);if(n){let{props:o,content:r}=n,a={delay:100,...o,...e,toastId:e.toastId||t,updateId:pe()};a.toastId!==t&&(a.staleId=t);let s=a.render||r;delete a.render,at(s,a)}};S.done=t=>{S.update(t,{progress:1})};S.onChange=ln;S.play=t=>ge(!0,t);S.pause=t=>ge(!1,t);function dn(t){var e;let{subscribe:n,getSnapshot:o,setProps:r}=C.useRef(an(t)).current;r(t);let a=(e=C.useSyncExternalStore(n,o,o))==null?void 0:e.slice();function s(i){if(!a)return[];let d=new Map;return t.newestOnTop&&a.reverse(),a.forEach(f=>{let{position:c}=f.props;d.has(c)||d.set(c,[]),d.get(c).push(f)}),Array.from(d,f=>i(f[0],f[1]))}return{getToastToRender:s,isToastActive:ye,count:a?.length}}function pn(t){let[e,n]=C.useState(!1),[o,r]=C.useState(!1),a=C.useRef(null),s=C.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:d,closeToast:f,onClick:c,closeOnClick:m}=t;sn({id:t.toastId,containerId:t.containerId,fn:n}),C.useEffect(()=>{if(t.pauseOnFocusLoss)return b(),()=>{v()}},[t.pauseOnFocusLoss]);function b(){document.hasFocus()||_(),window.addEventListener("focus",p),window.addEventListener("blur",_)}function v(){window.removeEventListener("focus",p),window.removeEventListener("blur",_)}function u(w){if(t.draggable===!0||t.draggable===w.pointerType){g();let R=a.current;s.canCloseOnClick=!0,s.canDrag=!0,R.style.transition="none",t.draggableDirection==="x"?(s.start=w.clientX,s.removalDistance=R.offsetWidth*(t.draggablePercent/100)):(s.start=w.clientY,s.removalDistance=R.offsetHeight*(t.draggablePercent===80?t.draggablePercent*1.5:t.draggablePercent)/100)}}function y(w){let{top:R,bottom:L,left:j,right:F}=a.current.getBoundingClientRect();w.nativeEvent.type!=="touchend"&&t.pauseOnHover&&w.clientX>=j&&w.clientX<=F&&w.clientY>=R&&w.clientY<=L?_():p()}function p(){n(!0)}function _(){n(!1)}function g(){s.didMove=!1,document.addEventListener("pointermove",T),document.addEventListener("pointerup",x)}function h(){document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",x)}function T(w){let R=a.current;if(s.canDrag&&R){s.didMove=!0,e&&_(),t.draggableDirection==="x"?s.delta=w.clientX-s.start:s.delta=w.clientY-s.start,s.start!==w.clientX&&(s.canCloseOnClick=!1);let L=t.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;R.style.transform=`translate3d(${L},0)`,R.style.opacity=`${1-Math.abs(s.delta/s.removalDistance)}`}}function x(){h();let w=a.current;if(s.canDrag&&s.didMove&&w){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){r(!0),t.closeToast(!0),t.collapseAll();return}w.style.transition="transform 0.2s, opacity 0.2s",w.style.removeProperty("transform"),w.style.removeProperty("opacity")}}let A={onPointerDown:u,onPointerUp:y};return i&&d&&(A.onMouseEnter=_,t.stacked||(A.onMouseLeave=p)),m&&(A.onClick=w=>{c&&c(w),s.canCloseOnClick&&f(!0)}),{playToast:p,pauseToast:_,isRunning:e,preventExitTransition:o,toastRef:a,eventHandlers:A}}var mn=typeof window<"u"?C.useLayoutEffect:C.useEffect,Tt=({theme:t,type:e,isLoading:n,...o})=>O.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${e})`,...o});function yn(t){return O.createElement(Tt,{...t},O.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function hn(t){return O.createElement(Tt,{...t},O.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function gn(t){return O.createElement(Tt,{...t},O.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function bn(t){return O.createElement(Tt,{...t},O.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function _n(){return O.createElement("div",{className:"Toastify__spinner"})}var Dt={info:hn,warning:yn,success:gn,error:bn,spinner:_n},Tn=t=>t in Dt;function En({theme:t,type:e,isLoading:n,icon:o}){let r=null,a={theme:t,type:e};return o===!1||(V(o)?r=o({...a,isLoading:n}):C.isValidElement(o)?r=C.cloneElement(o,a):n?r=Dt.spinner():Tn(e)&&(r=Dt[e](a))),r}var wn=t=>{let{isRunning:e,preventExitTransition:n,toastRef:o,eventHandlers:r,playToast:a}=pn(t),{closeButton:s,children:i,autoClose:d,onClick:f,type:c,hideProgressBar:m,closeToast:b,transition:v,position:u,className:y,style:p,progressClassName:_,updateId:g,role:h,progress:T,rtl:x,toastId:A,deleteToast:w,isIn:R,isLoading:L,closeOnClick:j,theme:F,ariaLabel:$}=t,z=X("Toastify__toast",`Toastify__toast-theme--${F}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":x},{"Toastify__toast--close-on-click":j}),H=V(y)?y({rtl:x,position:u,type:c,defaultClassName:z}):X(z,y),nt=En(t),U=!!T||!d,Y={closeToast:b,type:c,theme:F},B=null;return s===!1||(V(s)?B=s(Y):C.isValidElement(s)?B=C.cloneElement(s,Y):B=Ge(Y)),O.createElement(v,{isIn:R,done:w,position:u,preventExitTransition:n,nodeRef:o,playToast:a},O.createElement("div",{id:A,tabIndex:0,onClick:f,"data-in":R,className:H,...r,style:p,ref:o,...R&&{role:h,"aria-label":$}},nt!=null&&O.createElement("div",{className:X("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!L})},nt),de(i,t,!e),B,!t.customProgressBar&&O.createElement(Qe,{...g&&!U?{key:`p-${g}`}:{},rtl:x,theme:F,delay:d,isRunning:e,isIn:R,closeToast:b,hide:m,type:c,className:_,controlledProgress:U,progress:T||0})))},vn=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),xn=Ke(vn("bounce",!0)),Rn={position:"top-right",transition:xn,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&t.code==="KeyT"};function ir(t){let e={...Rn,...t},n=t.stacked,[o,r]=C.useState(!0),a=C.useRef(null),{getToastToRender:s,isToastActive:i,count:d}=dn(e),{className:f,style:c,rtl:m,containerId:b,hotKeys:v}=e;function u(p){let _=X("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":m});return V(f)?f({position:p,rtl:m,defaultClassName:_}):X(_,Nt(f))}function y(){n&&(r(!0),S.play())}return mn(()=>{var p;if(n){let _=a.current.querySelectorAll('[data-in="true"]'),g=12,h=(p=e.position)==null?void 0:p.includes("top"),T=0,x=0;Array.from(_).reverse().forEach((A,w)=>{let R=A;R.classList.add("Toastify__toast--stacked"),w>0&&(R.dataset.collapsed=`${o}`),R.dataset.pos||(R.dataset.pos=h?"top":"bot");let L=T*(o?.2:1)+(o?0:g*w);R.style.setProperty("--y",`${h?L:L*-1}px`),R.style.setProperty("--g",`${g}`),R.style.setProperty("--s",`${1-(o?x:0)}`),T+=R.offsetHeight,x+=.025})}},[o,d,n]),C.useEffect(()=>{function p(_){var g;let h=a.current;v(_)&&((g=h.querySelector('[tabIndex="0"]'))==null||g.focus(),r(!1),S.pause()),_.key==="Escape"&&(document.activeElement===h||h!=null&&h.contains(document.activeElement))&&(r(!0),S.play())}return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[v]),O.createElement("section",{ref:a,className:"Toastify",id:b,onMouseEnter:()=>{n&&(r(!1),S.pause())},onMouseLeave:y,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":e["aria-label"]},s((p,_)=>{let g=_.length?{...c}:{...c,pointerEvents:"none"};return O.createElement("div",{tabIndex:-1,className:u(p),"data-stacked":n,style:g,key:`c-${p}`},_.map(({content:h,props:T})=>O.createElement(wn,{...T,stacked:n,collapseAll:y,isIn:i(T.toastId,T.containerId),key:`t-${T.key}`},h)))}))}function be(t,e){return function(){return t.apply(e,arguments)}}const{toString:Sn}=Object.prototype,{getPrototypeOf:jt}=Object,{iterator:Et,toStringTag:_e}=Symbol,wt=(t=>e=>{const n=Sn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),M=t=>(t=t.toLowerCase(),e=>wt(e)===t),vt=t=>e=>typeof e===t,{isArray:et}=Array,tt=vt("undefined");function it(t){return t!==null&&!tt(t)&&t.constructor!==null&&!tt(t.constructor)&&I(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Te=M("ArrayBuffer");function On(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Te(t.buffer),e}const An=vt("string"),I=vt("function"),Ee=vt("number"),lt=t=>t!==null&&typeof t=="object",Cn=t=>t===!0||t===!1,mt=t=>{if(wt(t)!=="object")return!1;const e=jt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(_e in t)&&!(Et in t)},kn=t=>{if(!lt(t)||it(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Ln=M("Date"),Nn=M("File"),Pn=M("Blob"),In=M("FileList"),Dn=t=>lt(t)&&I(t.pipe),Un=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||I(t.append)&&((e=wt(t))==="formdata"||e==="object"&&I(t.toString)&&t.toString()==="[object FormData]"))},Bn=M("URLSearchParams"),[Fn,$n,jn,Mn]=["ReadableStream","Request","Response","Headers"].map(M),zn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ct(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),et(t))for(o=0,r=t.length;o0;)if(r=n[o],e===r.toLowerCase())return r;return null}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ve=t=>!tt(t)&&t!==W;function Ut(){const{caseless:t,skipUndefined:e}=ve(this)&&this||{},n={},o=(r,a)=>{const s=t&&we(n,a)||a;mt(n[s])&&mt(r)?n[s]=Ut(n[s],r):mt(r)?n[s]=Ut({},r):et(r)?n[s]=r.slice():(!e||!tt(r))&&(n[s]=r)};for(let r=0,a=arguments.length;r(ct(e,(r,a)=>{n&&I(r)?Object.defineProperty(t,a,{value:be(r,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,a,{value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),t),Hn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vn=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Jn=(t,e,n,o)=>{let r,a,s;const i={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),a=r.length;a-- >0;)s=r[a],(!o||o(s,t,e))&&!i[s]&&(e[s]=t[s],i[s]=!0);t=n!==!1&&jt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Wn=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},Xn=t=>{if(!t)return null;if(et(t))return t;let e=t.length;if(!Ee(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Kn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&jt(Uint8Array)),Gn=(t,e)=>{const o=(t&&t[Et]).call(t);let r;for(;(r=o.next())&&!r.done;){const a=r.value;e.call(t,a[0],a[1])}},Qn=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},Yn=M("HTMLFormElement"),Zn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Kt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),to=M("RegExp"),xe=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};ct(n,(r,a)=>{let s;(s=e(r,a,t))!==!1&&(o[a]=s||r)}),Object.defineProperties(t,o)},eo=t=>{xe(t,(e,n)=>{if(I(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(I(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},no=(t,e)=>{const n={},o=r=>{r.forEach(a=>{n[a]=!0})};return et(t)?o(t):o(String(t).split(e)),n},oo=()=>{},ro=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function so(t){return!!(t&&I(t.append)&&t[_e]==="FormData"&&t[Et])}const ao=t=>{const e=new Array(10),n=(o,r)=>{if(lt(o)){if(e.indexOf(o)>=0)return;if(it(o))return o;if(!("toJSON"in o)){e[r]=o;const a=et(o)?[]:{};return ct(o,(s,i)=>{const d=n(s,r+1);!tt(d)&&(a[i]=d)}),e[r]=void 0,a}}return o};return n(t,0)},io=M("AsyncFunction"),lo=t=>t&&(lt(t)||I(t))&&I(t.then)&&I(t.catch),Re=((t,e)=>t?setImmediate:e?((n,o)=>(W.addEventListener("message",({source:r,data:a})=>{r===W&&a===n&&o.length&&o.shift()()},!1),r=>{o.push(r),W.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",I(W.postMessage)),co=typeof queueMicrotask<"u"?queueMicrotask.bind(W):typeof process<"u"&&process.nextTick||Re,fo=t=>t!=null&&I(t[Et]),l={isArray:et,isArrayBuffer:Te,isBuffer:it,isFormData:Un,isArrayBufferView:On,isString:An,isNumber:Ee,isBoolean:Cn,isObject:lt,isPlainObject:mt,isEmptyObject:kn,isReadableStream:Fn,isRequest:$n,isResponse:jn,isHeaders:Mn,isUndefined:tt,isDate:Ln,isFile:Nn,isBlob:Pn,isRegExp:to,isFunction:I,isStream:Dn,isURLSearchParams:Bn,isTypedArray:Kn,isFileList:In,forEach:ct,merge:Ut,extend:qn,trim:zn,stripBOM:Hn,inherits:Vn,toFlatObject:Jn,kindOf:wt,kindOfTest:M,endsWith:Wn,toArray:Xn,forEachEntry:Gn,matchAll:Qn,isHTMLForm:Yn,hasOwnProperty:Kt,hasOwnProp:Kt,reduceDescriptors:xe,freezeMethods:eo,toObjectSet:no,toCamelCase:Zn,noop:oo,toFiniteNumber:ro,findKey:we,global:W,isContextDefined:ve,isSpecCompliantForm:so,toJSONObject:ao,isAsyncFn:io,isThenable:lo,setImmediate:Re,asap:co,isIterable:fo};let E=class Se extends Error{static from(e,n,o,r,a,s){const i=new Se(e.message,n||e.code,o,r,a);return i.cause=e,i.name=e.name,s&&Object.assign(i,s),i}constructor(e,n,o,r,a){super(e),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),o&&(this.config=o),r&&(this.request=r),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}};E.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";E.ERR_BAD_OPTION="ERR_BAD_OPTION";E.ECONNABORTED="ECONNABORTED";E.ETIMEDOUT="ETIMEDOUT";E.ERR_NETWORK="ERR_NETWORK";E.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";E.ERR_DEPRECATED="ERR_DEPRECATED";E.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";E.ERR_BAD_REQUEST="ERR_BAD_REQUEST";E.ERR_CANCELED="ERR_CANCELED";E.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";E.ERR_INVALID_URL="ERR_INVALID_URL";const uo=null;function Bt(t){return l.isPlainObject(t)||l.isArray(t)}function Oe(t){return l.endsWith(t,"[]")?t.slice(0,-2):t}function Gt(t,e,n){return t?t.concat(e).map(function(r,a){return r=Oe(r),!n&&a?"["+r+"]":r}).join(n?".":""):e}function po(t){return l.isArray(t)&&!t.some(Bt)}const mo=l.toFlatObject(l,{},null,function(e){return/^is[A-Z]/.test(e)});function xt(t,e,n){if(!l.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!l.isUndefined(p[y])});const o=n.metaTokens,r=n.visitor||c,a=n.dots,s=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(e);if(!l.isFunction(r))throw new TypeError("visitor must be a function");function f(u){if(u===null)return"";if(l.isDate(u))return u.toISOString();if(l.isBoolean(u))return u.toString();if(!d&&l.isBlob(u))throw new E("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(u)||l.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function c(u,y,p){let _=u;if(u&&!p&&typeof u=="object"){if(l.endsWith(y,"{}"))y=o?y:y.slice(0,-2),u=JSON.stringify(u);else if(l.isArray(u)&&po(u)||(l.isFileList(u)||l.endsWith(y,"[]"))&&(_=l.toArray(u)))return y=Oe(y),_.forEach(function(h,T){!(l.isUndefined(h)||h===null)&&e.append(s===!0?Gt([y],T,a):s===null?y:y+"[]",f(h))}),!1}return Bt(u)?!0:(e.append(Gt(p,y,a),f(u)),!1)}const m=[],b=Object.assign(mo,{defaultVisitor:c,convertValue:f,isVisitable:Bt});function v(u,y){if(!l.isUndefined(u)){if(m.indexOf(u)!==-1)throw Error("Circular reference detected in "+y.join("."));m.push(u),l.forEach(u,function(_,g){(!(l.isUndefined(_)||_===null)&&r.call(e,_,l.isString(g)?g.trim():g,y,b))===!0&&v(_,y?y.concat(g):[g])}),m.pop()}}if(!l.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Qt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Mt(t,e){this._pairs=[],t&&xt(t,this,e)}const Ae=Mt.prototype;Ae.append=function(e,n){this._pairs.push([e,n])};Ae.toString=function(e){const n=e?function(o){return e.call(this,o,Qt)}:Qt;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function yo(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ce(t,e,n){if(!e)return t;const o=n&&n.encode||yo,r=l.isFunction(n)?{serialize:n}:n,a=r&&r.serialize;let s;if(a?s=a(e,r):s=l.isURLSearchParams(e)?e.toString():new Mt(e,r).toString(o),s){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Yt{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){l.forEach(this.handlers,function(o){o!==null&&e(o)})}}const ke={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ho=typeof URLSearchParams<"u"?URLSearchParams:Mt,go=typeof FormData<"u"?FormData:null,bo=typeof Blob<"u"?Blob:null,_o={isBrowser:!0,classes:{URLSearchParams:ho,FormData:go,Blob:bo},protocols:["http","https","file","blob","url","data"]},zt=typeof window<"u"&&typeof document<"u",Ft=typeof navigator=="object"&&navigator||void 0,To=zt&&(!Ft||["ReactNative","NativeScript","NS"].indexOf(Ft.product)<0),Eo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wo=zt&&window.location.href||"http://localhost",vo=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zt,hasStandardBrowserEnv:To,hasStandardBrowserWebWorkerEnv:Eo,navigator:Ft,origin:wo},Symbol.toStringTag,{value:"Module"})),N={...vo,..._o};function xo(t,e){return xt(t,new N.classes.URLSearchParams,{visitor:function(n,o,r,a){return N.isNode&&l.isBuffer(n)?(this.append(o,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function Ro(t){return l.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function So(t){const e={},n=Object.keys(t);let o;const r=n.length;let a;for(o=0;o=n.length;return s=!s&&l.isArray(r)?r.length:s,d?(l.hasOwnProp(r,s)?r[s]=[r[s],o]:r[s]=o,!i):((!r[s]||!l.isObject(r[s]))&&(r[s]=[]),e(n,o,r[s],a)&&l.isArray(r[s])&&(r[s]=So(r[s])),!i)}if(l.isFormData(t)&&l.isFunction(t.entries)){const n={};return l.forEachEntry(t,(o,r)=>{e(Ro(o),r,n,0)}),n}return null}function Oo(t,e,n){if(l.isString(t))try{return(e||JSON.parse)(t),l.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(t)}const ft={transitional:ke,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,a=l.isObject(e);if(a&&l.isHTMLForm(e)&&(e=new FormData(e)),l.isFormData(e))return r?JSON.stringify(Le(e)):e;if(l.isArrayBuffer(e)||l.isBuffer(e)||l.isStream(e)||l.isFile(e)||l.isBlob(e)||l.isReadableStream(e))return e;if(l.isArrayBufferView(e))return e.buffer;if(l.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(a){if(o.indexOf("application/x-www-form-urlencoded")>-1)return xo(e,this.formSerializer).toString();if((i=l.isFileList(e))||o.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return xt(i?{"files[]":e}:e,d&&new d,this.formSerializer)}}return a||r?(n.setContentType("application/json",!1),Oo(e)):e}],transformResponse:[function(e){const n=this.transitional||ft.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(l.isResponse(e)||l.isReadableStream(e))return e;if(e&&l.isString(e)&&(o&&!this.responseType||r)){const s=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(i){if(s)throw i.name==="SyntaxError"?E.from(i,E.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],t=>{ft.headers[t]={}});const Ao=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Co=t=>{const e={};let n,o,r;return t&&t.split(` +`).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),o=s.substring(r+1).trim(),!(!n||e[n]&&Ao[n])&&(n==="set-cookie"?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)}),e},Zt=Symbol("internals");function ot(t){return t&&String(t).trim().toLowerCase()}function yt(t){return t===!1||t==null?t:l.isArray(t)?t.map(yt):String(t)}function ko(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}const Lo=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ct(t,e,n,o,r){if(l.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!l.isString(e)){if(l.isString(o))return e.indexOf(o)!==-1;if(l.isRegExp(o))return o.test(e)}}function No(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function Po(t,e){const n=l.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,a,s){return this[o].call(this,e,r,a,s)},configurable:!0})})}let D=class{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function a(i,d,f){const c=ot(d);if(!c)throw new Error("header name must be a non-empty string");const m=l.findKey(r,c);(!m||r[m]===void 0||f===!0||f===void 0&&r[m]!==!1)&&(r[m||d]=yt(i))}const s=(i,d)=>l.forEach(i,(f,c)=>a(f,c,d));if(l.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(l.isString(e)&&(e=e.trim())&&!Lo(e))s(Co(e),n);else if(l.isObject(e)&&l.isIterable(e)){let i={},d,f;for(const c of e){if(!l.isArray(c))throw TypeError("Object iterator must return a key-value pair");i[f=c[0]]=(d=i[f])?l.isArray(d)?[...d,c[1]]:[d,c[1]]:c[1]}s(i,n)}else e!=null&&a(n,e,o);return this}get(e,n){if(e=ot(e),e){const o=l.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return ko(r);if(l.isFunction(n))return n.call(this,r,o);if(l.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ot(e),e){const o=l.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||Ct(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function a(s){if(s=ot(s),s){const i=l.findKey(o,s);i&&(!n||Ct(o,o[i],i,n))&&(delete o[i],r=!0)}}return l.isArray(e)?e.forEach(a):a(e),r}clear(e){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const a=n[o];(!e||Ct(this,this[a],a,e,!0))&&(delete this[a],r=!0)}return r}normalize(e){const n=this,o={};return l.forEach(this,(r,a)=>{const s=l.findKey(o,a);if(s){n[s]=yt(r),delete n[a];return}const i=e?No(a):String(a).trim();i!==a&&delete n[a],n[i]=yt(r),o[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return l.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&l.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const o=new this(e);return n.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[Zt]=this[Zt]={accessors:{}}).accessors,r=this.prototype;function a(s){const i=ot(s);o[i]||(Po(r,s),o[i]=!0)}return l.isArray(e)?e.forEach(a):a(e),this}};D.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);l.reduceDescriptors(D.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}});l.freezeMethods(D);function kt(t,e){const n=this||ft,o=e||n,r=D.from(o.headers);let a=o.data;return l.forEach(t,function(i){a=i.call(n,a,r.normalize(),e?e.status:void 0)}),r.normalize(),a}function Ne(t){return!!(t&&t.__CANCEL__)}let ut=class extends E{constructor(e,n,o){super(e??"canceled",E.ERR_CANCELED,n,o),this.name="CanceledError",this.__CANCEL__=!0}};function Pe(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new E("Request failed with status code "+n.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Io(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Do(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,a=0,s;return e=e!==void 0?e:1e3,function(d){const f=Date.now(),c=o[a];s||(s=f),n[r]=d,o[r]=f;let m=a,b=0;for(;m!==r;)b+=n[m++],m=m%t;if(r=(r+1)%t,r===a&&(a=(a+1)%t),f-s{n=c,r=null,a&&(clearTimeout(a),a=null),t(...f)};return[(...f)=>{const c=Date.now(),m=c-n;m>=o?s(f,c):(r=f,a||(a=setTimeout(()=>{a=null,s(r)},o-m)))},()=>r&&s(r)]}const gt=(t,e,n=3)=>{let o=0;const r=Do(50,250);return Uo(a=>{const s=a.loaded,i=a.lengthComputable?a.total:void 0,d=s-o,f=r(d),c=s<=i;o=s;const m={loaded:s,total:i,progress:i?s/i:void 0,bytes:d,rate:f||void 0,estimated:f&&i&&c?(i-s)/f:void 0,event:a,lengthComputable:i!=null,[e?"download":"upload"]:!0};t(m)},n)},te=(t,e)=>{const n=t!=null;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]},ee=t=>(...e)=>l.asap(()=>t(...e)),Bo=N.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,N.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(N.origin),N.navigator&&/(msie|trident)/i.test(N.navigator.userAgent)):()=>!0,Fo=N.hasStandardBrowserEnv?{write(t,e,n,o,r,a,s){if(typeof document>"u")return;const i=[`${t}=${encodeURIComponent(e)}`];l.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),l.isString(o)&&i.push(`path=${o}`),l.isString(r)&&i.push(`domain=${r}`),a===!0&&i.push("secure"),l.isString(s)&&i.push(`SameSite=${s}`),document.cookie=i.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function $o(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function jo(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ie(t,e,n){let o=!$o(e);return t&&(o||n==!1)?jo(t,e):e}const ne=t=>t instanceof D?{...t}:t;function Q(t,e){e=e||{};const n={};function o(f,c,m,b){return l.isPlainObject(f)&&l.isPlainObject(c)?l.merge.call({caseless:b},f,c):l.isPlainObject(c)?l.merge({},c):l.isArray(c)?c.slice():c}function r(f,c,m,b){if(l.isUndefined(c)){if(!l.isUndefined(f))return o(void 0,f,m,b)}else return o(f,c,m,b)}function a(f,c){if(!l.isUndefined(c))return o(void 0,c)}function s(f,c){if(l.isUndefined(c)){if(!l.isUndefined(f))return o(void 0,f)}else return o(void 0,c)}function i(f,c,m){if(m in e)return o(f,c);if(m in t)return o(void 0,f)}const d={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(f,c,m)=>r(ne(f),ne(c),m,!0)};return l.forEach(Object.keys({...t,...e}),function(c){const m=d[c]||r,b=m(t[c],e[c],c);l.isUndefined(b)&&m!==i||(n[c]=b)}),n}const De=t=>{const e=Q({},t);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:a,headers:s,auth:i}=e;if(e.headers=s=D.from(s),e.url=Ce(Ie(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),l.isFormData(n)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(l.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([c,m])=>{f.includes(c.toLowerCase())&&s.set(c,m)})}}if(N.hasStandardBrowserEnv&&(o&&l.isFunction(o)&&(o=o(e)),o||o!==!1&&Bo(e.url))){const d=r&&a&&Fo.read(a);d&&s.set(r,d)}return e},Mo=typeof XMLHttpRequest<"u",zo=Mo&&function(t){return new Promise(function(n,o){const r=De(t);let a=r.data;const s=D.from(r.headers).normalize();let{responseType:i,onUploadProgress:d,onDownloadProgress:f}=r,c,m,b,v,u;function y(){v&&v(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(r.method.toUpperCase(),r.url,!0),p.timeout=r.timeout;function _(){if(!p)return;const h=D.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),x={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:h,config:t,request:p};Pe(function(w){n(w),y()},function(w){o(w),y()},x),p=null}"onloadend"in p?p.onloadend=_:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(_)},p.onabort=function(){p&&(o(new E("Request aborted",E.ECONNABORTED,t,p)),p=null)},p.onerror=function(T){const x=T&&T.message?T.message:"Network Error",A=new E(x,E.ERR_NETWORK,t,p);A.event=T||null,o(A),p=null},p.ontimeout=function(){let T=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const x=r.transitional||ke;r.timeoutErrorMessage&&(T=r.timeoutErrorMessage),o(new E(T,x.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,t,p)),p=null},a===void 0&&s.setContentType(null),"setRequestHeader"in p&&l.forEach(s.toJSON(),function(T,x){p.setRequestHeader(x,T)}),l.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),i&&i!=="json"&&(p.responseType=r.responseType),f&&([b,u]=gt(f,!0),p.addEventListener("progress",b)),d&&p.upload&&([m,v]=gt(d),p.upload.addEventListener("progress",m),p.upload.addEventListener("loadend",v)),(r.cancelToken||r.signal)&&(c=h=>{p&&(o(!h||h.type?new ut(null,t,p):h),p.abort(),p=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const g=Io(r.url);if(g&&N.protocols.indexOf(g)===-1){o(new E("Unsupported protocol "+g+":",E.ERR_BAD_REQUEST,t));return}p.send(a||null)})},qo=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let o=new AbortController,r;const a=function(f){if(!r){r=!0,i();const c=f instanceof Error?f:this.reason;o.abort(c instanceof E?c:new ut(c instanceof Error?c.message:c))}};let s=e&&setTimeout(()=>{s=null,a(new E(`timeout of ${e}ms exceeded`,E.ETIMEDOUT))},e);const i=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),t=null)};t.forEach(f=>f.addEventListener("abort",a));const{signal:d}=o;return d.unsubscribe=()=>l.asap(i),d}},Ho=function*(t,e){let n=t.byteLength;if(n{const r=Vo(t,e);let a=0,s,i=d=>{s||(s=!0,o&&o(d))};return new ReadableStream({async pull(d){try{const{done:f,value:c}=await r.next();if(f){i(),d.close();return}let m=c.byteLength;if(n){let b=a+=m;n(b)}d.enqueue(new Uint8Array(c))}catch(f){throw i(f),f}},cancel(d){return i(d),r.return()}},{highWaterMark:2})},re=64*1024,{isFunction:pt}=l,Wo=(({Request:t,Response:e})=>({Request:t,Response:e}))(l.global),{ReadableStream:se,TextEncoder:ae}=l.global,ie=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Xo=t=>{t=l.merge.call({skipUndefined:!0},Wo,t);const{fetch:e,Request:n,Response:o}=t,r=e?pt(e):typeof fetch=="function",a=pt(n),s=pt(o);if(!r)return!1;const i=r&&pt(se),d=r&&(typeof ae=="function"?(u=>y=>u.encode(y))(new ae):async u=>new Uint8Array(await new n(u).arrayBuffer())),f=a&&i&&ie(()=>{let u=!1;const y=new n(N.origin,{body:new se,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!y}),c=s&&i&&ie(()=>l.isReadableStream(new o("").body)),m={stream:c&&(u=>u.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!m[u]&&(m[u]=(y,p)=>{let _=y&&y[u];if(_)return _.call(y);throw new E(`Response type '${u}' is not supported`,E.ERR_NOT_SUPPORT,p)})});const b=async u=>{if(u==null)return 0;if(l.isBlob(u))return u.size;if(l.isSpecCompliantForm(u))return(await new n(N.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(l.isArrayBufferView(u)||l.isArrayBuffer(u))return u.byteLength;if(l.isURLSearchParams(u)&&(u=u+""),l.isString(u))return(await d(u)).byteLength},v=async(u,y)=>{const p=l.toFiniteNumber(u.getContentLength());return p??b(y)};return async u=>{let{url:y,method:p,data:_,signal:g,cancelToken:h,timeout:T,onDownloadProgress:x,onUploadProgress:A,responseType:w,headers:R,withCredentials:L="same-origin",fetchOptions:j}=De(u),F=e||fetch;w=w?(w+"").toLowerCase():"text";let $=qo([g,h&&h.toAbortSignal()],T),z=null;const H=$&&$.unsubscribe&&(()=>{$.unsubscribe()});let nt;try{if(A&&f&&p!=="get"&&p!=="head"&&(nt=await v(R,_))!==0){let J=new n(y,{method:"POST",body:_,duplex:"half"}),Z;if(l.isFormData(_)&&(Z=J.headers.get("content-type"))&&R.setContentType(Z),J.body){const[St,dt]=te(nt,gt(ee(A)));_=oe(J.body,re,St,dt)}}l.isString(L)||(L=L?"include":"omit");const U=a&&"credentials"in n.prototype,Y={...j,signal:$,method:p.toUpperCase(),headers:R.normalize().toJSON(),body:_,duplex:"half",credentials:U?L:void 0};z=a&&new n(y,Y);let B=await(a?F(z,j):F(y,Y));const Ht=c&&(w==="stream"||w==="response");if(c&&(x||Ht&&H)){const J={};["status","statusText","headers"].forEach(Vt=>{J[Vt]=B[Vt]});const Z=l.toFiniteNumber(B.headers.get("content-length")),[St,dt]=x&&te(Z,gt(ee(x),!0))||[];B=new o(oe(B.body,re,St,()=>{dt&&dt(),H&&H()}),J)}w=w||"text";let Me=await m[l.findKey(m,w)||"text"](B,u);return!Ht&&H&&H(),await new Promise((J,Z)=>{Pe(J,Z,{data:Me,headers:D.from(B.headers),status:B.status,statusText:B.statusText,config:u,request:z})})}catch(U){throw H&&H(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,u,z),{cause:U.cause||U}):E.from(U,U&&U.code,u,z)}}},Ko=new Map,Ue=t=>{let e=t&&t.env||{};const{fetch:n,Request:o,Response:r}=e,a=[o,r,n];let s=a.length,i=s,d,f,c=Ko;for(;i--;)d=a[i],f=c.get(d),f===void 0&&c.set(d,f=i?new Map:Xo(e)),c=f;return f};Ue();const qt={http:uo,xhr:zo,fetch:{get:Ue}};l.forEach(qt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const le=t=>`- ${t}`,Go=t=>l.isFunction(t)||t===null||t===!1;function Qo(t,e){t=l.isArray(t)?t:[t];const{length:n}=t;let o,r;const a={};for(let s=0;s`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=n?s.length>1?`since : +`+s.map(le).join(` +`):" "+le(s[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r}const Be={getAdapter:Qo,adapters:qt};function Lt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ut(null,t)}function ce(t){return Lt(t),t.headers=D.from(t.headers),t.data=kt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Be.getAdapter(t.adapter||ft.adapter,t)(t).then(function(o){return Lt(t),o.data=kt.call(t,t.transformResponse,o),o.headers=D.from(o.headers),o},function(o){return Ne(o)||(Lt(t),o&&o.response&&(o.response.data=kt.call(t,t.transformResponse,o.response),o.response.headers=D.from(o.response.headers))),Promise.reject(o)})}const Fe="1.13.4",Rt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Rt[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const fe={};Rt.transitional=function(e,n,o){function r(a,s){return"[Axios v"+Fe+"] Transitional option '"+a+"'"+s+(o?". "+o:"")}return(a,s,i)=>{if(e===!1)throw new E(r(s," has been removed"+(n?" in "+n:"")),E.ERR_DEPRECATED);return n&&!fe[s]&&(fe[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(a,s,i):!0}};Rt.spelling=function(e){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${e}`),!0)};function Yo(t,e,n){if(typeof t!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const a=o[r],s=e[a];if(s){const i=t[a],d=i===void 0||s(i,a,t);if(d!==!0)throw new E("option "+a+" must be "+d,E.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new E("Unknown option "+a,E.ERR_BAD_OPTION)}}const ht={assertOptions:Yo,validators:Rt},q=ht.validators;let K=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Yt,response:new Yt}}async request(e,n){try{return await this._request(e,n)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";try{o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=` +`+a):o.stack=a}catch{}}throw o}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Q(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&ht.assertOptions(o,{silentJSONParsing:q.transitional(q.boolean),forcedJSONParsing:q.transitional(q.boolean),clarifyTimeoutError:q.transitional(q.boolean)},!1),r!=null&&(l.isFunction(r)?n.paramsSerializer={serialize:r}:ht.assertOptions(r,{encode:q.function,serialize:q.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ht.assertOptions(n,{baseUrl:q.spelling("baseURL"),withXsrfToken:q.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&l.merge(a.common,a[n.method]);a&&l.forEach(["delete","get","head","post","put","patch","common"],u=>{delete a[u]}),n.headers=D.concat(s,a);const i=[];let d=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(d=d&&y.synchronous,i.unshift(y.fulfilled,y.rejected))});const f=[];this.interceptors.response.forEach(function(y){f.push(y.fulfilled,y.rejected)});let c,m=0,b;if(!d){const u=[ce.bind(this),void 0];for(u.unshift(...i),u.push(...f),b=u.length,c=Promise.resolve(n);m{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const s=new Promise(i=>{o.subscribe(i),a=i}).then(r);return s.cancel=function(){o.unsubscribe(a)},s},e(function(a,s,i){o.reason||(o.reason=new ut(a,s,i),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=o=>{e.abort(o)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new $e(function(r){e=r}),cancel:e}}};function tr(t){return function(n){return t.apply(null,n)}}function er(t){return l.isObject(t)&&t.isAxiosError===!0}const $t={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries($t).forEach(([t,e])=>{$t[e]=t});function je(t){const e=new K(t),n=be(K.prototype.request,e);return l.extend(n,K.prototype,e,{allOwnKeys:!0}),l.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return je(Q(t,r))},n}const k=je(ft);k.Axios=K;k.CanceledError=ut;k.CancelToken=Zo;k.isCancel=Ne;k.VERSION=Fe;k.toFormData=xt;k.AxiosError=E;k.Cancel=k.CanceledError;k.all=function(e){return Promise.all(e)};k.spread=tr;k.isAxiosError=er;k.mergeConfig=Q;k.AxiosHeaders=D;k.formToJSON=t=>Le(l.isHTMLForm(t)?new FormData(t):t);k.getAdapter=Be.getAdapter;k.HttpStatusCode=$t;k.default=k;const{Axios:ur,AxiosError:dr,CanceledError:pr,isCancel:mr,CancelToken:yr,VERSION:hr,all:gr,Cancel:br,isAxiosError:_r,spread:Tr,toFormData:Er,AxiosHeaders:wr,HttpStatusCode:vr,formToJSON:xr,getAdapter:Rr,mergeConfig:Sr}=k,nr=()=>typeof window<"u"&&window.APP_CONFIG?.API_BASE_URL?window.APP_CONFIG.API_BASE_URL:"/api",or=nr(),rr=k.create({baseURL:or,headers:{"Content-Type":"application/json",Accept:"application/json"}});rr.interceptors.request.use(t=>{const e=localStorage.getItem("token");return e&&(t.headers.Authorization=`Bearer ${e}`),t},t=>(S.error("Request error: "+t.message),Promise.reject(t)));export{rr as H,ir as L,X as c,He as r,ar as s,S as y}; diff --git a/backend/static/assets/application-card-CCEmFW4A.js b/backend/static/assets/application-card-CCEmFW4A.js new file mode 100644 index 0000000000000000000000000000000000000000..5dc491a41e87e9f15c450f902320a3180101eaa4 --- /dev/null +++ b/backend/static/assets/application-card-CCEmFW4A.js @@ -0,0 +1 @@ +import{j as s}from"./jsx-runtime-u17CrQMm.js";import{d as a}from"./createLucideIcon-Dz8DJ3je.js";import{x as n}from"./chunk-EPOLDU6W-hzVvDaQR.js";import{A as i,a as x}from"./index-BY3h9UIJ.js";function h({application:e,aid:l,jid:d,isStatic:r=!1,safeRoute:t=!1}){const o=n();return s.jsxs("div",{tabIndex:r?-1:0,className:a("p-4 flex flex-wrap justify-between gap-4 place-items-center",r?"":"border rounded bg-indigo-100 dark:bg-gray-700 [:is(:hover,:focus)]:shadow-lg [:is(:hover,:focus)]:scale-101 transition-all cursor-pointer"),onClick:()=>r||o(t?`/my-applications/${e.id}`:`/jobs/${d}/assessments/${l}/applications/${e.id}`),children:[s.jsxs("header",{className:"flex flex-col gap-2 w-full grow",children:[s.jsx("h1",{className:a("font-bold",r?"text-3xl":"text-xl"),children:e.assessment_details.title}),e.job&&s.jsx("p",{className:"text-gray-500 dark:text-gray-200",children:e.job.title})]}),s.jsxs("div",{className:"group-data-[collapsible=icon]:-mx-4 flex gap-2",children:[s.jsx(i,{className:"shrink-0 cursor-pointer",tabIndex:0,children:s.jsx(x,{className:"rounded-full bg-indigo-200 dark:bg-gray-800 size-10 group-data-[collapsible=icon]:size-8 flex items-center justify-center",children:e.user?`${e.user.first_name[0]}${e.user.last_name[0]}`:"U"})}),s.jsxs("div",{className:"overflow-hidden group-data-[collapsible=icon]:hidden",children:[s.jsxs("p",{className:"font-bold whitespace-nowrap text-ellipsis overflow-hidden text-start",children:[e.user.first_name," ",e.user.last_name]}),s.jsx("p",{className:"whitespace-nowrap text-ellipsis overflow-hidden",children:e.user.email})]})]}),s.jsxs("div",{className:a("flex flex-col place-items-end rounded-md p-1",e.score>=e.passing_score?"bg-green-600 text-green-100 dark:bg-green-700 dark:text-green-300":"bg-red-600 text-red-100 dark:bg-red-700 dark:text-red-300"),children:[s.jsxs("p",{children:["Score: ",e.score,"%"]}),s.jsxs("p",{children:["(",e.passing_score,"% to pass)"]})]})]})}export{h as A}; diff --git a/backend/static/assets/assessment-card-9n_nDBr9.js b/backend/static/assets/assessment-card-9n_nDBr9.js new file mode 100644 index 0000000000000000000000000000000000000000..f70eb0cc7505b047f52be256b1eb1debdf3f6de9 --- /dev/null +++ b/backend/static/assets/assessment-card-9n_nDBr9.js @@ -0,0 +1 @@ +import{j as e}from"./jsx-runtime-u17CrQMm.js";import{b as c,d as n}from"./createLucideIcon-Dz8DJ3je.js";import{x as d}from"./chunk-EPOLDU6W-hzVvDaQR.js";const t=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["line",{x1:"12",x2:"12.01",y1:"17",y2:"17",key:"io3f8k"}]],x=c("badge-question-mark",t);const p=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],h=c("circle-check",p);const g=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],y=c("circle-dot",g);const m=[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]],k=c("hourglass",m);const f=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],j=c("percent",f);const u=[["path",{d:"M15 5h6",key:"1pr8yx"}],["path",{d:"M15 12h6",key:"upa0zy"}],["path",{d:"M3 19h18",key:"awlh7x"}],["path",{d:"m3 12 3.553-7.724a.5.5 0 0 1 .894 0L11 12",key:"6lvno8"}],["path",{d:"M3.92 10h6.16",key:"1tl8ex"}]],N=c("text-initial",u);function M({jid:i,assessment:s,isStatic:a=!1}){const o=d();return e.jsxs("div",{tabIndex:a?-1:0,className:n("flex flex-col gap-4",a?"":"border p-4 rounded bg-indigo-100 dark:bg-gray-800 [:is(:hover,:focus)]:shadow-lg [:is(:hover,:focus)]:scale-101 transition-all cursor-pointer"),onClick:()=>a||o(`/jobs/${i}/assessments/${s.id}`),children:[e.jsx("h4",{className:n("font-semibold",a?"text-4xl":"text-2xl"),children:s.title}),e.jsxs("footer",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"grow flex flex-col gap-2 mt-2",children:[e.jsx("h5",{className:"font-semibold",children:"Question Types"}),e.jsx("div",{className:"grow flex flex-wrap gap-2",children:[...new Set(s.questions.map(l=>l.type))].map((l,r)=>e.jsxs("span",{className:"inline-flex gap-2 place-items-center px-3 py-1.5 rounded-xl bg-indigo-50 dark:bg-gray-700",children:[{text_based:e.jsx(N,{}),choose_one:e.jsx(y,{}),choose_many:e.jsx(h,{})}[l],e.jsx("p",{children:l.replace("_"," ")})]},r))})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h5",{className:"font-semibold",children:"Assessment's Details"}),e.jsxs("div",{className:"grow flex flex-wrap gap-2",children:[e.jsxs("span",{className:"inline-flex gap-2 place-items-center px-3 py-1.5 rounded-xl bg-indigo-50 dark:bg-gray-700",children:[e.jsx(k,{}),e.jsxs("p",{children:[s.duration/60," minutes"]})]}),e.jsxs("span",{className:"inline-flex gap-2 place-items-center px-3 py-1.5 rounded-xl bg-indigo-50 dark:bg-gray-700",children:[e.jsx(j,{}),e.jsxs("p",{children:[s.passing_score," passing score"]})]}),e.jsxs("span",{className:"inline-flex gap-2 place-items-center px-3 py-1.5 rounded-xl bg-indigo-50 dark:bg-gray-700",children:[e.jsx(x,{}),e.jsxs("p",{children:[s.questions_count," questions"]})]})]})]})]})]})}export{M as A,k as H}; diff --git a/backend/static/assets/button-C6iMGSdy.js b/backend/static/assets/button-C6iMGSdy.js new file mode 100644 index 0000000000000000000000000000000000000000..507d2f5fb65da5a57c2f34830ed2f326df8e8fd9 --- /dev/null +++ b/backend/static/assets/button-C6iMGSdy.js @@ -0,0 +1 @@ +import{j as y}from"./jsx-runtime-u17CrQMm.js";import"./chunk-EPOLDU6W-hzVvDaQR.js";import{c as k}from"./HTTPManager-b3lsNrys.js";import{S as p,d as z}from"./createLucideIcon-Dz8DJ3je.js";const g=i=>typeof i=="boolean"?`${i}`:i===0?"0":i,m=k,V=(i,t)=>e=>{var o;if(t?.variants==null)return m(i,e?.class,e?.className);const{variants:u,defaultVariants:r}=t,b=Object.keys(u).map(n=>{const s=e?.[n],d=r?.[n];if(s===null)return null;const a=g(s)||g(d);return u[n][a]}),c=e&&Object.entries(e).reduce((n,s)=>{let[d,a]=s;return a===void 0||(n[d]=a),n},{}),f=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((n,s)=>{let{class:d,className:a,...x}=s;return Object.entries(x).every(h=>{let[v,l]=h;return Array.isArray(l)?l.includes({...r,...c}[v]):{...r,...c}[v]===l})?[...n,d,a]:n},[]);return m(i,b,f,e?.class,e?.className)},j=V("inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function O({className:i,variant:t="default",size:e="default",asChild:o=!1,...u}){const r=o?p:"button";return y.jsx(r,{"data-slot":"button","data-variant":t,"data-size":e,className:z(j({variant:t,size:e,className:i})),...u})}export{O as B,V as c}; diff --git a/backend/static/assets/check-k27QSh5h.js b/backend/static/assets/check-k27QSh5h.js new file mode 100644 index 0000000000000000000000000000000000000000..8399cb202dc096f022c9e2b4dd277220c9398bf0 --- /dev/null +++ b/backend/static/assets/check-k27QSh5h.js @@ -0,0 +1 @@ +import{b as c}from"./createLucideIcon-Dz8DJ3je.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C}; diff --git a/backend/static/assets/checkbox-CQHFQHv5.js b/backend/static/assets/checkbox-CQHFQHv5.js new file mode 100644 index 0000000000000000000000000000000000000000..b7a2b400245825ad7528b4fd81ae9588320f646c --- /dev/null +++ b/backend/static/assets/checkbox-CQHFQHv5.js @@ -0,0 +1 @@ +import{a}from"./chunk-EPOLDU6W-hzVvDaQR.js";import{P as y,c as F}from"./index-Cg_y7ad_.js";import{j as n}from"./jsx-runtime-u17CrQMm.js";import{u as w,d as O}from"./createLucideIcon-Dz8DJ3je.js";import{C as H}from"./check-k27QSh5h.js";import{P as G,u as K,c as j,a as U}from"./index-B3LvHnEJ.js";function X(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var E="Checkbox",[$]=F(E),[J,_]=$(E);function Q(e){const{__scopeCheckbox:t,checked:o,children:d,defaultChecked:c,disabled:r,form:p,name:b,onCheckedChange:u,required:k,value:m="on",internal_do_not_use_render:l}=e,[f,v]=K({prop:o,defaultProp:c??!1,onChange:u,caller:E}),[x,C]=a.useState(null),[g,s]=a.useState(null),i=a.useRef(!1),R=x?!!p||!!x.closest("form"):!0,P={checked:f,disabled:r,setChecked:v,control:x,setControl:C,name:b,form:p,value:m,hasConsumerStoppedPropagationRef:i,required:k,defaultChecked:h(c)?!1:c,isFormControl:R,bubbleInput:g,setBubbleInput:s};return n.jsx(J,{scope:t,...P,children:V(l)?l(P):d})}var N="CheckboxTrigger",S=a.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...d},c)=>{const{control:r,value:p,disabled:b,checked:u,required:k,setControl:m,setChecked:l,hasConsumerStoppedPropagationRef:f,isFormControl:v,bubbleInput:x}=_(N,e),C=w(c,m),g=a.useRef(u);return a.useEffect(()=>{const s=r?.form;if(s){const i=()=>l(g.current);return s.addEventListener("reset",i),()=>s.removeEventListener("reset",i)}},[r,l]),n.jsx(y.button,{type:"button",role:"checkbox","aria-checked":h(u)?"mixed":u,"aria-required":k,"data-state":T(u),"data-disabled":b?"":void 0,disabled:b,value:p,...d,ref:C,onKeyDown:j(t,s=>{s.key==="Enter"&&s.preventDefault()}),onClick:j(o,s=>{l(i=>h(i)?!0:!i),x&&v&&(f.current=s.isPropagationStopped(),f.current||s.stopPropagation())})})});S.displayName=N;var M=a.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:d,checked:c,defaultChecked:r,required:p,disabled:b,value:u,onCheckedChange:k,form:m,...l}=e;return n.jsx(Q,{__scopeCheckbox:o,checked:c,defaultChecked:r,disabled:b,required:p,onCheckedChange:k,name:d,form:m,value:u,internal_do_not_use_render:({isFormControl:f})=>n.jsxs(n.Fragment,{children:[n.jsx(S,{...l,ref:t,__scopeCheckbox:o}),f&&n.jsx(A,{__scopeCheckbox:o})]})})});M.displayName=E;var B="CheckboxIndicator",D=a.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:d,...c}=e,r=_(B,o);return n.jsx(G,{present:d||h(r.checked)||r.checked===!0,children:n.jsx(y.span,{"data-state":T(r.checked),"data-disabled":r.disabled?"":void 0,...c,ref:t,style:{pointerEvents:"none",...e.style}})})});D.displayName=B;var L="CheckboxBubbleInput",A=a.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:d,hasConsumerStoppedPropagationRef:c,checked:r,defaultChecked:p,required:b,disabled:u,name:k,value:m,form:l,bubbleInput:f,setBubbleInput:v}=_(L,e),x=w(o,v),C=X(r),g=U(d);a.useEffect(()=>{const i=f;if(!i)return;const R=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(R,"checked").set,q=!c.current;if(C!==r&&I){const z=new Event("click",{bubbles:q});i.indeterminate=h(r),I.call(i,h(r)?!1:r),i.dispatchEvent(z)}},[f,C,r,c]);const s=a.useRef(h(r)?!1:r);return n.jsx(y.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??s.current,required:b,disabled:u,name:k,value:m,form:l,...t,tabIndex:-1,ref:x,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});A.displayName=L;function V(e){return typeof e=="function"}function h(e){return e==="indeterminate"}function T(e){return h(e)?"indeterminate":e?"checked":"unchecked"}var W="Label",Y=a.forwardRef((e,t)=>n.jsx(y.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));Y.displayName=W;function ae({className:e,...t}){return n.jsx(M,{"data-slot":"checkbox",className:O("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:n.jsx(D,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:n.jsx(H,{className:"size-3.5"})})})}export{ae as C,Y as L,X as u}; diff --git a/backend/static/assets/chunk-EPOLDU6W-hzVvDaQR.js b/backend/static/assets/chunk-EPOLDU6W-hzVvDaQR.js new file mode 100644 index 0000000000000000000000000000000000000000..ad16a5f292fbc7800bc1fec96cb03204cd15a074 --- /dev/null +++ b/backend/static/assets/chunk-EPOLDU6W-hzVvDaQR.js @@ -0,0 +1,26 @@ +function ja(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Fa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gt={exports:{}},W={};var Vr;function Ua(){if(Vr)return W;Vr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),p=Symbol.iterator;function g(m){return m===null||typeof m!="object"?null:(m=p&&m[p]||m["@@iterator"],typeof m=="function"?m:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function P(m,C,j){this.props=m,this.context=C,this.refs=E,this.updater=j||b}P.prototype.isReactComponent={},P.prototype.setState=function(m,C){if(typeof m!="object"&&typeof m!="function"&&m!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,C,"setState")},P.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function R(){}R.prototype=P.prototype;function M(m,C,j){this.props=m,this.context=C,this.refs=E,this.updater=j||b}var T=M.prototype=new R;T.constructor=M,S(T,P.prototype),T.isPureReactComponent=!0;var D=Array.isArray;function N(){}var v={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function z(m,C,j){var I=j.ref;return{$$typeof:e,type:m,key:C,ref:I!==void 0?I:null,props:j}}function K(m,C){return z(m.type,C,m.props)}function V(m){return typeof m=="object"&&m!==null&&m.$$typeof===e}function ae(m){var C={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(j){return C[j]})}var se=/\/+/g;function ne(m,C){return typeof m=="object"&&m!==null&&m.key!=null?ae(""+m.key):C.toString(36)}function Z(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(N,N):(m.status="pending",m.then(function(C){m.status==="pending"&&(m.status="fulfilled",m.value=C)},function(C){m.status==="pending"&&(m.status="rejected",m.reason=C)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function G(m,C,j,I,B){var J=typeof m;(J==="undefined"||J==="boolean")&&(m=null);var te=!1;if(m===null)te=!0;else switch(J){case"bigint":case"string":case"number":te=!0;break;case"object":switch(m.$$typeof){case e:case t:te=!0;break;case h:return te=m._init,G(te(m._payload),C,j,I,B)}}if(te)return B=B(m),te=I===""?"."+ne(m,0):I,D(B)?(j="",te!=null&&(j=te.replace(se,"$&/")+"/"),G(B,C,j,"",function(Bt){return Bt})):B!=null&&(V(B)&&(B=K(B,j+(B.key==null||m&&m.key===B.key?"":(""+B.key).replace(se,"$&/")+"/")+te)),C.push(B)),1;te=0;var he=I===""?".":I+":";if(D(m))for(var me=0;me{throw TypeError(e)},Wa=(e,t,r)=>t.has(e)||Ln("Cannot "+r),Kt=(e,t,r)=>(Wa(e,t,"read from private field"),r?r.call(e):t.get(e)),Ya=(e,t,r)=>t.has(e)?Ln("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Gr="popstate";function as(e={}){function t(n,a){let{pathname:o,search:i,hash:l}=n.location;return ct("",{pathname:o,search:i,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Te(a)}return Ja(t,r,null,e)}function Y(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function oe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Va(){return Math.random().toString(36).substring(2,10)}function Kr(e,t){return{usr:e.state,key:e.key,idx:t}}function ct(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?je(t):t,state:r,key:t&&t.key||n||Va()}}function Te({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function je(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Ja(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l="POP",s=null,u=h();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function h(){return(i.state||{idx:null}).idx}function c(){l="POP";let E=h(),P=E==null?null:E-u;u=E,s&&s({action:l,location:S.location,delta:P})}function p(E,P){l="PUSH";let R=ct(S.location,E,P);u=h()+1;let M=Kr(R,u),T=S.createHref(R);try{i.pushState(M,"",T)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;a.location.assign(T)}o&&s&&s({action:l,location:S.location,delta:1})}function g(E,P){l="REPLACE";let R=ct(S.location,E,P);u=h();let M=Kr(R,u),T=S.createHref(R);i.replaceState(M,"",T),o&&s&&s({action:l,location:S.location,delta:0})}function b(E){return Pn(E)}let S={get action(){return l},get location(){return e(a,i)},listen(E){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(Gr,c),s=E,()=>{a.removeEventListener(Gr,c),s=null}},createHref(E){return t(a,E)},createURL:b,encodeLocation(E){let P=b(E);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:p,replace:g,go(E){return i.go(E)}};return S}function Pn(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Y(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Te(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var lt,Xr=class{constructor(e){if(Ya(this,lt,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Kt(this,lt).has(e))return Kt(this,lt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Kt(this,lt).set(e,t)}};lt=new WeakMap;var Ga=new Set(["lazy","caseSensitive","path","id","index","children"]);function Ka(e){return Ga.has(e)}var Xa=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function qa(e){return Xa.has(e)}function Qa(e){return e.index===!0}function dt(e,t,r=[],n={},a=!1){return e.map((o,i)=>{let l=[...r,String(i)],s=typeof o.id=="string"?o.id:l.join("-");if(Y(o.index!==!0||!o.children,"Cannot specify children on an index route"),Y(a||!n[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),Qa(o)){let u={...o,id:s};return n[s]=qr(u,t(u)),u}else{let u={...o,id:s,children:void 0};return n[s]=qr(u,t(u)),o.children&&(u.children=dt(o.children,t,l,n,a)),u}})}function qr(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ne(e,t,r="/"){return st(e,t,r,!1)}function st(e,t,r,n){let a=typeof t=="string"?je(t):t,o=be(a.pathname||"/",r);if(o==null)return null;let i=Mn(e);Za(i);let l=null;for(let s=0;l==null&&s{let h={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(n)&&s)return;Y(h.relativePath.startsWith(n),`Absolute route path "${h.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(n.length)}let c=Me([n,h.relativePath]),p=r.concat(h);i.children&&i.children.length>0&&(Y(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Mn(i.children,t,p,c,s)),!(i.path==null&&!i.index)&&t.push({path:c,score:io(c,i.index),routesMeta:p})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of Tn(i.path))o(i,l,!0,s)}),t}function Tn(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=Tn(n.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function Za(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:lo(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var eo=/^:[\w-]+$/,to=3,ro=2,no=1,ao=10,oo=-2,Qr=e=>e==="*";function io(e,t){let r=e.split("/"),n=r.length;return r.some(Qr)&&(n+=oo),t&&(n+=ro),r.filter(a=>!Qr(a)).reduce((a,o)=>a+(eo.test(o)?to:o===""?no:ao),n)}function lo(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function so(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let l=0;l{if(h==="*"){let b=l[p]||"";i=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const g=l[p];return c&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Dn(e,t=!1,r=!0){oe(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s)=>(n.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function uo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return oe(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function be(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function co({basename:e,pathname:t}){return t==="/"?e:Me([e,t])}var _n=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kt=e=>_n.test(e);function fo(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?je(e):e,o;if(r)if(kt(r))o=r;else{if(r.includes("//")){let i=r;r=r.replace(/\/\/+/g,"/"),oe(!1,`Pathnames cannot have embedded double slashes - normalizing ${i} -> ${r}`)}r.startsWith("/")?o=Zr(r.substring(1),"/"):o=Zr(r,t)}else o=t;return{pathname:o,search:mo(n),hash:po(a)}}function Zr(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Xt(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function On(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function vr(e){let t=On(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function gr(e,t,r,n=!1){let a;typeof e=="string"?a=je(e):(a={...e},Y(!a.pathname||!a.pathname.includes("?"),Xt("?","pathname","search",a)),Y(!a.pathname||!a.pathname.includes("#"),Xt("#","pathname","hash",a)),Y(!a.search||!a.search.includes("#"),Xt("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,l;if(i==null)l=r;else{let c=t.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),c-=1;a.pathname=p.join("/")}l=c>=0?t[c]:"/"}let s=fo(a,l),u=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||h)&&(s.pathname+="/"),s}var Me=e=>e.join("/").replace(/\/\/+/g,"/"),ho=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,po=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,yo=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function vo(e,t){return new yo(e,typeof t=="number"?{status:t}:t)}var go=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},Fe=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Ve(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ht(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var An=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nn(e,t){let r=e;if(typeof r!="string"||!_n.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(An)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),l=be(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:a=!0}catch{oe(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var ke=Symbol("Uninstrumented");function wo(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(a=>a({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let l of i)o[l]&&r[l].push(o[l])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let a=qe(r.lazy,t.lazy,()=>{});a&&(n.lazy=a)}if(typeof t.lazy=="object"){let a=t.lazy;["middleware","loader","action"].forEach(o=>{let i=a[o],l=r[`lazy.${o}`];if(typeof i=="function"&&l.length>0){let s=qe(l,i,()=>{});s&&(n.lazy=Object.assign(n.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(a=>{let o=t[a];if(typeof o=="function"&&r[a].length>0){let i=o[ke]??o,l=qe(r[a],i,(...s)=>en(s[0]));l&&(a==="loader"&&i.hydrate===!0&&(l.hydrate=!0),l[ke]=i,n[a]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(a=>{let o=a[ke]??a,i=qe(r.middleware,o,(...l)=>en(l[0]));return i?(i[ke]=o,i):a})),n}function Eo(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(a){let o=Object.keys(a);for(let i of o)a[i]&&r[i].push(a[i])}})),r.navigate.length>0){let n=e.navigate[ke]??e.navigate,a=qe(r.navigate,n,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Te(i):".",...tn(e,l??{})}});a&&(a[ke]=n,e.navigate=a)}if(r.fetch.length>0){let n=e.fetch[ke]??e.fetch,a=qe(r.fetch,n,(...o)=>{let[i,,l,s]=o;return{href:l??".",fetcherKey:i,...tn(e,s??{})}});a&&(a[ke]=n,e.fetch=a)}return e}function qe(e,t,r){return e.length===0?null:async(...n)=>{let a=await In(e,r(...n),()=>t(...n),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function In(e,t,r,n){let a=e[n],o;if(a){let i,l=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=In(e,t,r,n-1),o=await i,Y(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await a(l,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await l(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function en(e){let{request:t,context:r,params:n,unstable_pattern:a}=e;return{request:Ro(t),params:{...n},unstable_pattern:a,context:bo(r)}}function tn(e,t){return{currentUrl:Te(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Ro(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function bo(e){if(Co(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var So=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Co(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===So}var $n=["POST","PUT","PATCH","DELETE"],Lo=new Set($n),Po=["GET",...$n],xo=new Set(Po),kn=new Set([301,302,303,307,308]),Mo=new Set([307,308]),qt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},To={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},at={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Do=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),jn="remix-router-transitions",Fn=Symbol("ResetLoaderData");function os(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Y(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||Do,o=a;if(e.unstable_instrumentations){let d=e.unstable_instrumentations;o=y=>({...a(y),...wo(d.map(w=>w.route).filter(Boolean),y)})}let i={},l=dt(e.routes,o,void 0,i),s,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let h=e.dataStrategy||Io,c={...e.future},p=null,g=new Set,b=null,S=null,E=null,P=e.hydrationData!=null,R=Ne(l,e.history.location,u),M=!1,T=null,D;if(R==null&&!e.patchRoutesOnNavigation){let d=Ce(404,{pathname:e.history.location.pathname}),{matches:y,route:w}=Ct(l);D=!0,R=y,T={[w.id]:d}}else if(R&&!e.hydrationData&&wt(R,l,e.history.location.pathname).active&&(R=null),R)if(R.some(d=>d.route.lazy))D=!1;else if(!R.some(d=>wr(d.route)))D=!0;else{let d=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null;if(y){let w=R.findIndex(L=>y[L.route.id]!==void 0);D=R.slice(0,w+1).every(L=>!or(L.route,d,y))}else D=R.every(w=>!or(w.route,d,y))}else{D=!1,R=[];let d=wt(null,l,e.history.location.pathname);d.active&&d.matches&&(M=!0,R=d.matches)}let N,v={historyAction:e.history.action,location:e.history.location,matches:R,initialized:D,navigation:qt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||T,fetchers:new Map,blockers:new Map},_="POP",z=null,K=!1,V,ae=!1,se=new Map,ne=null,Z=!1,G=!1,ce=new Set,ee=new Map,le=0,fe=-1,m=new Map,C=new Set,j=new Map,I=new Map,B=new Set,J=new Map,te,he=null;function me(){if(p=e.history.listen(({action:d,location:y,delta:w})=>{if(te){te(),te=void 0;return}oe(J.size===0||w!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let L=Hr({currentLocation:v.location,nextLocation:y,historyAction:d});if(L&&w!=null){let x=new Promise($=>{te=$});e.history.go(w*-1),gt(L,{state:"blocked",location:y,proceed(){gt(L,{state:"proceeding",proceed:void 0,reset:void 0,location:y}),x.then(()=>e.history.go(w))},reset(){let $=new Map(v.blockers);$.set(L,at),pe({blockers:$})}}),z?.resolve(),z=null;return}return Ue(d,y)}),r){Zo(t,se);let d=()=>ei(t,se);t.addEventListener("pagehide",d),ne=()=>t.removeEventListener("pagehide",d)}return v.initialized||Ue("POP",v.location,{initialHydration:!0}),N}function Bt(){p&&p(),ne&&ne(),g.clear(),V&&V.abort(),v.fetchers.forEach((d,y)=>Yt(y)),v.blockers.forEach((d,y)=>Ur(y))}function ba(d){return g.add(d),()=>g.delete(d)}function pe(d,y={}){d.matches&&(d.matches=d.matches.map(x=>{let $=i[x.route.id],O=x.route;return O.element!==$.element||O.errorElement!==$.errorElement||O.hydrateFallbackElement!==$.hydrateFallbackElement?{...x,route:$}:x})),v={...v,...d};let w=[],L=[];v.fetchers.forEach((x,$)=>{x.state==="idle"&&(B.has($)?w.push($):L.push($))}),B.forEach(x=>{!v.fetchers.has(x)&&!ee.has(x)&&w.push(x)}),[...g].forEach(x=>x(v,{deletedFetchers:w,newErrors:d.errors??null,viewTransitionOpts:y.viewTransitionOpts,flushSync:y.flushSync===!0})),w.forEach(x=>Yt(x)),L.forEach(x=>v.fetchers.delete(x))}function Ge(d,y,{flushSync:w}={}){let L=v.actionData!=null&&v.navigation.formMethod!=null&&ve(v.navigation.formMethod)&&v.navigation.state==="loading"&&d.state?._isRedirect!==!0,x;y.actionData?Object.keys(y.actionData).length>0?x=y.actionData:x=null:L?x=v.actionData:x=null;let $=y.loaderData?fn(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,O=v.blockers;O.size>0&&(O=new Map(O),O.forEach((H,F)=>O.set(F,at)));let A=Z?!1:Br(d,y.matches||v.matches),k=K===!0||v.navigation.formMethod!=null&&ve(v.navigation.formMethod)&&d.state?._isRedirect!==!0;s&&(l=s,s=void 0),Z||_==="POP"||(_==="PUSH"?e.history.push(d,d.state):_==="REPLACE"&&e.history.replace(d,d.state));let U;if(_==="POP"){let H=se.get(v.location.pathname);H&&H.has(d.pathname)?U={currentLocation:v.location,nextLocation:d}:se.has(d.pathname)&&(U={currentLocation:d,nextLocation:v.location})}else if(ae){let H=se.get(v.location.pathname);H?H.add(d.pathname):(H=new Set([d.pathname]),se.set(v.location.pathname,H)),U={currentLocation:v.location,nextLocation:d}}pe({...y,actionData:x,loaderData:$,historyAction:_,location:d,initialized:!0,navigation:qt,revalidation:"idle",restoreScrollPosition:A,preventScrollReset:k,blockers:O},{viewTransitionOpts:U,flushSync:w===!0}),_="POP",K=!1,ae=!1,Z=!1,G=!1,z?.resolve(),z=null,he?.resolve(),he=null}async function Ar(d,y){if(z?.resolve(),z=null,typeof d=="number"){z||(z=pn());let Q=z.promise;return e.history.go(d),Q}let w=ar(v.location,v.matches,u,d,y?.fromRouteId,y?.relative),{path:L,submission:x,error:$}=rn(!1,w,y),O=v.location,A=ct(v.location,L,y&&y.state);A={...A,...e.history.encodeLocation(A)};let k=y&&y.replace!=null?y.replace:void 0,U="PUSH";k===!0?U="REPLACE":k===!1||x!=null&&ve(x.formMethod)&&x.formAction===v.location.pathname+v.location.search&&(U="REPLACE");let H=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,F=(y&&y.flushSync)===!0,q=Hr({currentLocation:O,nextLocation:A,historyAction:U});if(q){gt(q,{state:"blocked",location:A,proceed(){gt(q,{state:"proceeding",proceed:void 0,reset:void 0,location:A}),Ar(d,y)},reset(){let Q=new Map(v.blockers);Q.set(q,at),pe({blockers:Q})}});return}await Ue(U,A,{submission:x,pendingError:$,preventScrollReset:H,replace:y&&y.replace,enableViewTransition:y&&y.viewTransition,flushSync:F,callSiteDefaultShouldRevalidate:y&&y.unstable_defaultShouldRevalidate})}function Sa(){he||(he=pn()),Wt(),pe({revalidation:"loading"});let d=he.promise;return v.navigation.state==="submitting"?d:v.navigation.state==="idle"?(Ue(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),d):(Ue(_||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:ae===!0}),d)}async function Ue(d,y,w){V&&V.abort(),V=null,_=d,Z=(w&&w.startUninterruptedRevalidation)===!0,Na(v.location,v.matches),K=(w&&w.preventScrollReset)===!0,ae=(w&&w.enableViewTransition)===!0;let L=s||l,x=w&&w.overrideNavigation,$=w?.initialHydration&&v.matches&&v.matches.length>0&&!M?v.matches:Ne(L,y,u),O=(w&&w.flushSync)===!0;if($&&v.initialized&&!G&&Bo(v.location,y)&&!(w&&w.submission&&ve(w.submission.formMethod))){Ge(y,{matches:$},{flushSync:O});return}let A=wt($,L,y.pathname);if(A.active&&A.matches&&($=A.matches),!$){let{error:ue,notFoundMatches:ge,route:re}=Vt(y.pathname);Ge(y,{matches:ge,loaderData:{},errors:{[re.id]:ue}},{flushSync:O});return}V=new AbortController;let k=Xe(e.history,y,V.signal,w&&w.submission),U=e.getContext?await e.getContext():new Xr,H;if(w&&w.pendingError)H=[$e($).route.id,{type:"error",error:w.pendingError}];else if(w&&w.submission&&ve(w.submission.formMethod)){let ue=await Ca(k,y,w.submission,$,U,A.active,w&&w.initialHydration===!0,{replace:w.replace,flushSync:O});if(ue.shortCircuited)return;if(ue.pendingActionResult){let[ge,re]=ue.pendingActionResult;if(Re(re)&&Ve(re.error)&&re.error.status===404){V=null,Ge(y,{matches:ue.matches,loaderData:{},errors:{[ge]:re.error}});return}}$=ue.matches||$,H=ue.pendingActionResult,x=Qt(y,w.submission),O=!1,A.active=!1,k=Xe(e.history,k.url,k.signal)}let{shortCircuited:F,matches:q,loaderData:Q,errors:de}=await La(k,y,$,U,A.active,x,w&&w.submission,w&&w.fetcherSubmission,w&&w.replace,w&&w.initialHydration===!0,O,H,w&&w.callSiteDefaultShouldRevalidate);F||(V=null,Ge(y,{matches:q||$,...hn(H),loaderData:Q,errors:de}))}async function Ca(d,y,w,L,x,$,O,A={}){Wt();let k=qo(y,w);if(pe({navigation:k},{flushSync:A.flushSync===!0}),$){let F=await Et(L,y.pathname,d.signal);if(F.type==="aborted")return{shortCircuited:!0};if(F.type==="error"){if(F.partialMatches.length===0){let{matches:Q,route:de}=Ct(l);return{matches:Q,pendingActionResult:[de.id,{type:"error",error:F.error}]}}let q=$e(F.partialMatches).route.id;return{matches:F.partialMatches,pendingActionResult:[q,{type:"error",error:F.error}]}}else if(F.matches)L=F.matches;else{let{notFoundMatches:q,error:Q,route:de}=Vt(y.pathname);return{matches:q,pendingActionResult:[de.id,{type:"error",error:Q}]}}}let U,H=Dt(L,y);if(!H.route.action&&!H.route.lazy)U={type:"error",error:Ce(405,{method:d.method,pathname:y.pathname,routeId:H.route.id})};else{let F=Qe(o,i,d,L,H,O?[]:n,x),q=await tt(d,F,x,null);if(U=q[H.route.id],!U){for(let Q of L)if(q[Q.route.id]){U=q[Q.route.id];break}}if(d.signal.aborted)return{shortCircuited:!0}}if(Ye(U)){let F;return A&&A.replace!=null?F=A.replace:F=un(U.response.headers.get("Location"),new URL(d.url),u,e.history)===v.location.pathname+v.location.search,await He(d,U,!0,{submission:w,replace:F}),{shortCircuited:!0}}if(Re(U)){let F=$e(L,H.route.id);return(A&&A.replace)!==!0&&(_="PUSH"),{matches:L,pendingActionResult:[F.route.id,U,H.route.id]}}return{matches:L,pendingActionResult:[H.route.id,U]}}async function La(d,y,w,L,x,$,O,A,k,U,H,F,q){let Q=$||Qt(y,O),de=O||A||mn(Q),ue=!Z&&!U;if(x){if(ue){let ye=Nr(F);pe({navigation:Q,...ye!==void 0?{actionData:ye}:{}},{flushSync:H})}let X=await Et(w,y.pathname,d.signal);if(X.type==="aborted")return{shortCircuited:!0};if(X.type==="error"){if(X.partialMatches.length===0){let{matches:Ke,route:We}=Ct(l);return{matches:Ke,loaderData:{},errors:{[We.id]:X.error}}}let ye=$e(X.partialMatches).route.id;return{matches:X.partialMatches,loaderData:{},errors:{[ye]:X.error}}}else if(X.matches)w=X.matches;else{let{error:ye,notFoundMatches:Ke,route:We}=Vt(y.pathname);return{matches:Ke,loaderData:{},errors:{[We.id]:ye}}}}let ge=s||l,{dsMatches:re,revalidatingFetchers:Se}=nn(d,L,o,i,e.history,v,w,de,y,U?[]:n,U===!0,G,ce,B,j,C,ge,u,e.patchRoutesOnNavigation!=null,F,q);if(fe=++le,!e.dataStrategy&&!re.some(X=>X.shouldLoad)&&!re.some(X=>X.route.middleware&&X.route.middleware.length>0)&&Se.length===0){let X=jr();return Ge(y,{matches:w,loaderData:{},errors:F&&Re(F[1])?{[F[0]]:F[1].error}:null,...hn(F),...X?{fetchers:new Map(v.fetchers)}:{}},{flushSync:H}),{shortCircuited:!0}}if(ue){let X={};if(!x){X.navigation=Q;let ye=Nr(F);ye!==void 0&&(X.actionData=ye)}Se.length>0&&(X.fetchers=Pa(Se)),pe(X,{flushSync:H})}Se.forEach(X=>{Oe(X.key),X.controller&&ee.set(X.key,X.controller)});let ze=()=>Se.forEach(X=>Oe(X.key));V&&V.signal.addEventListener("abort",ze);let{loaderResults:rt,fetcherResults:Ie}=await Ir(re,Se,d,L);if(d.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",ze),Se.forEach(X=>ee.delete(X.key));let xe=Lt(rt);if(xe)return await He(d,xe.result,!0,{replace:k}),{shortCircuited:!0};if(xe=Lt(Ie),xe)return C.add(xe.key),await He(d,xe.result,!0,{replace:k}),{shortCircuited:!0};let{loaderData:Jt,errors:nt}=dn(v,w,rt,F,Se,Ie);U&&v.errors&&(nt={...v.errors,...nt});let Be=jr(),Rt=Fr(fe),bt=Be||Rt||Se.length>0;return{matches:w,loaderData:Jt,errors:nt,...bt?{fetchers:new Map(v.fetchers)}:{}}}function Nr(d){if(d&&!Re(d[1]))return{[d[0]]:d[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function Pa(d){return d.forEach(y=>{let w=v.fetchers.get(y.key),L=ot(void 0,w?w.data:void 0);v.fetchers.set(y.key,L)}),new Map(v.fetchers)}async function xa(d,y,w,L){Oe(d);let x=(L&&L.flushSync)===!0,$=s||l,O=ar(v.location,v.matches,u,w,y,L?.relative),A=Ne($,O,u),k=wt(A,$,O);if(k.active&&k.matches&&(A=k.matches),!A){_e(d,y,Ce(404,{pathname:O}),{flushSync:x});return}let{path:U,submission:H,error:F}=rn(!0,O,L);if(F){_e(d,y,F,{flushSync:x});return}let q=e.getContext?await e.getContext():new Xr,Q=(L&&L.preventScrollReset)===!0;if(H&&ve(H.formMethod)){await Ma(d,y,U,A,q,k.active,x,Q,H,L&&L.unstable_defaultShouldRevalidate);return}j.set(d,{routeId:y,path:U}),await Ta(d,y,U,A,q,k.active,x,Q,H)}async function Ma(d,y,w,L,x,$,O,A,k,U){Wt(),j.delete(d);let H=v.fetchers.get(d);De(d,Qo(k,H),{flushSync:O});let F=new AbortController,q=Xe(e.history,w,F.signal,k);if($){let ie=await Et(L,new URL(q.url).pathname,q.signal,d);if(ie.type==="aborted")return;if(ie.type==="error"){_e(d,y,ie.error,{flushSync:O});return}else if(ie.matches)L=ie.matches;else{_e(d,y,Ce(404,{pathname:w}),{flushSync:O});return}}let Q=Dt(L,w);if(!Q.route.action&&!Q.route.lazy){let ie=Ce(405,{method:k.formMethod,pathname:w,routeId:y});_e(d,y,ie,{flushSync:O});return}ee.set(d,F);let de=le,ue=Qe(o,i,q,L,Q,n,x),ge=await tt(q,ue,x,d),re=ge[Q.route.id];if(!re){for(let ie of ue)if(ge[ie.route.id]){re=ge[ie.route.id];break}}if(q.signal.aborted){ee.get(d)===F&&ee.delete(d);return}if(B.has(d)){if(Ye(re)||Re(re)){De(d,Ae(void 0));return}}else{if(Ye(re))if(ee.delete(d),fe>de){De(d,Ae(void 0));return}else return C.add(d),De(d,ot(k)),He(q,re,!1,{fetcherSubmission:k,preventScrollReset:A});if(Re(re)){_e(d,y,re.error);return}}let Se=v.navigation.location||v.location,ze=Xe(e.history,Se,F.signal),rt=s||l,Ie=v.navigation.state!=="idle"?Ne(rt,v.navigation.location,u):v.matches;Y(Ie,"Didn't find any matches after fetcher action");let xe=++le;m.set(d,xe);let Jt=ot(k,re.data);v.fetchers.set(d,Jt);let{dsMatches:nt,revalidatingFetchers:Be}=nn(ze,x,o,i,e.history,v,Ie,k,Se,n,!1,G,ce,B,j,C,rt,u,e.patchRoutesOnNavigation!=null,[Q.route.id,re],U);Be.filter(ie=>ie.key!==d).forEach(ie=>{let St=ie.key,Yr=v.fetchers.get(St),ka=ot(void 0,Yr?Yr.data:void 0);v.fetchers.set(St,ka),Oe(St),ie.controller&&ee.set(St,ie.controller)}),pe({fetchers:new Map(v.fetchers)});let Rt=()=>Be.forEach(ie=>Oe(ie.key));F.signal.addEventListener("abort",Rt);let{loaderResults:bt,fetcherResults:X}=await Ir(nt,Be,ze,x);if(F.signal.aborted)return;if(F.signal.removeEventListener("abort",Rt),m.delete(d),ee.delete(d),Be.forEach(ie=>ee.delete(ie.key)),v.fetchers.has(d)){let ie=Ae(re.data);v.fetchers.set(d,ie)}let ye=Lt(bt);if(ye)return He(ze,ye.result,!1,{preventScrollReset:A});if(ye=Lt(X),ye)return C.add(ye.key),He(ze,ye.result,!1,{preventScrollReset:A});let{loaderData:Ke,errors:We}=dn(v,Ie,bt,void 0,Be,X);Fr(xe),v.navigation.state==="loading"&&xe>fe?(Y(_,"Expected pending action"),V&&V.abort(),Ge(v.navigation.location,{matches:Ie,loaderData:Ke,errors:We,fetchers:new Map(v.fetchers)})):(pe({errors:We,loaderData:fn(v.loaderData,Ke,Ie,We),fetchers:new Map(v.fetchers)}),G=!1)}async function Ta(d,y,w,L,x,$,O,A,k){let U=v.fetchers.get(d);De(d,ot(k,U?U.data:void 0),{flushSync:O});let H=new AbortController,F=Xe(e.history,w,H.signal);if($){let re=await Et(L,new URL(F.url).pathname,F.signal,d);if(re.type==="aborted")return;if(re.type==="error"){_e(d,y,re.error,{flushSync:O});return}else if(re.matches)L=re.matches;else{_e(d,y,Ce(404,{pathname:w}),{flushSync:O});return}}let q=Dt(L,w);ee.set(d,H);let Q=le,de=Qe(o,i,F,L,q,n,x),ge=(await tt(F,de,x,d))[q.route.id];if(ee.get(d)===H&&ee.delete(d),!F.signal.aborted){if(B.has(d)){De(d,Ae(void 0));return}if(Ye(ge))if(fe>Q){De(d,Ae(void 0));return}else{C.add(d),await He(F,ge,!1,{preventScrollReset:A});return}if(Re(ge)){_e(d,y,ge.error);return}De(d,Ae(ge.data))}}async function He(d,y,w,{submission:L,fetcherSubmission:x,preventScrollReset:$,replace:O}={}){w||(z?.resolve(),z=null),y.response.headers.has("X-Remix-Revalidate")&&(G=!0);let A=y.response.headers.get("Location");Y(A,"Expected a Location header on the redirect Response"),A=un(A,new URL(d.url),u,e.history);let k=ct(v.location,A,{_isRedirect:!0});if(r){let de=!1;if(y.response.headers.has("X-Remix-Reload-Document"))de=!0;else if(kt(A)){const ue=Pn(A,!0);de=ue.origin!==t.location.origin||be(ue.pathname,u)==null}if(de){O?t.location.replace(A):t.location.assign(A);return}}V=null;let U=O===!0||y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:H,formAction:F,formEncType:q}=v.navigation;!L&&!x&&H&&F&&q&&(L=mn(v.navigation));let Q=L||x;if(Mo.has(y.response.status)&&Q&&ve(Q.formMethod))await Ue(U,k,{submission:{...Q,formAction:A},preventScrollReset:$||K,enableViewTransition:w?ae:void 0});else{let de=Qt(k,L);await Ue(U,k,{overrideNavigation:de,fetcherSubmission:x,preventScrollReset:$||K,enableViewTransition:w?ae:void 0})}}async function tt(d,y,w,L){let x,$={};try{x=await ko(h,d,y,L,w,!1)}catch(O){return y.filter(A=>A.shouldLoad).forEach(A=>{$[A.route.id]={type:"error",error:O}}),$}if(d.signal.aborted)return $;if(!ve(d.method))for(let O of y){if(x[O.route.id]?.type==="error")break;!x.hasOwnProperty(O.route.id)&&!v.loaderData.hasOwnProperty(O.route.id)&&(!v.errors||!v.errors.hasOwnProperty(O.route.id))&&O.shouldCallHandler()&&(x[O.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${O.route.id}`)})}for(let[O,A]of Object.entries(x))if(Jo(A)){let k=A.result;$[O]={type:"redirect",response:Ho(k,d,O,y,u)}}else $[O]=await Uo(A);return $}async function Ir(d,y,w,L){let x=tt(w,d,L,null),$=Promise.all(y.map(async k=>{if(k.matches&&k.match&&k.request&&k.controller){let H=(await tt(k.request,k.matches,L,k.key))[k.match.route.id];return{[k.key]:H}}else return Promise.resolve({[k.key]:{type:"error",error:Ce(404,{pathname:k.path})}})})),O=await x,A=(await $).reduce((k,U)=>Object.assign(k,U),{});return{loaderResults:O,fetcherResults:A}}function Wt(){G=!0,j.forEach((d,y)=>{ee.has(y)&&ce.add(y),Oe(y)})}function De(d,y,w={}){v.fetchers.set(d,y),pe({fetchers:new Map(v.fetchers)},{flushSync:(w&&w.flushSync)===!0})}function _e(d,y,w,L={}){let x=$e(v.matches,y);Yt(d),pe({errors:{[x.route.id]:w},fetchers:new Map(v.fetchers)},{flushSync:(L&&L.flushSync)===!0})}function $r(d){return I.set(d,(I.get(d)||0)+1),B.has(d)&&B.delete(d),v.fetchers.get(d)||To}function Da(d,y){Oe(d,y?.reason),De(d,Ae(null))}function Yt(d){let y=v.fetchers.get(d);ee.has(d)&&!(y&&y.state==="loading"&&m.has(d))&&Oe(d),j.delete(d),m.delete(d),C.delete(d),B.delete(d),ce.delete(d),v.fetchers.delete(d)}function _a(d){let y=(I.get(d)||0)-1;y<=0?(I.delete(d),B.add(d)):I.set(d,y),pe({fetchers:new Map(v.fetchers)})}function Oe(d,y){let w=ee.get(d);w&&(w.abort(y),ee.delete(d))}function kr(d){for(let y of d){let w=$r(y),L=Ae(w.data);v.fetchers.set(y,L)}}function jr(){let d=[],y=!1;for(let w of C){let L=v.fetchers.get(w);Y(L,`Expected fetcher: ${w}`),L.state==="loading"&&(C.delete(w),d.push(w),y=!0)}return kr(d),y}function Fr(d){let y=[];for(let[w,L]of m)if(L0}function Oa(d,y){let w=v.blockers.get(d)||at;return J.get(d)!==y&&J.set(d,y),w}function Ur(d){v.blockers.delete(d),J.delete(d)}function gt(d,y){let w=v.blockers.get(d)||at;Y(w.state==="unblocked"&&y.state==="blocked"||w.state==="blocked"&&y.state==="blocked"||w.state==="blocked"&&y.state==="proceeding"||w.state==="blocked"&&y.state==="unblocked"||w.state==="proceeding"&&y.state==="unblocked",`Invalid blocker state transition: ${w.state} -> ${y.state}`);let L=new Map(v.blockers);L.set(d,y),pe({blockers:L})}function Hr({currentLocation:d,nextLocation:y,historyAction:w}){if(J.size===0)return;J.size>1&&oe(!1,"A router only supports one blocker at a time");let L=Array.from(J.entries()),[x,$]=L[L.length-1],O=v.blockers.get(x);if(!(O&&O.state==="proceeding")&&$({currentLocation:d,nextLocation:y,historyAction:w}))return x}function Vt(d){let y=Ce(404,{pathname:d}),w=s||l,{matches:L,route:x}=Ct(w);return{notFoundMatches:L,route:x,error:y}}function Aa(d,y,w){if(b=d,E=y,S=w||null,!P&&v.navigation===qt){P=!0;let L=Br(v.location,v.matches);L!=null&&pe({restoreScrollPosition:L})}return()=>{b=null,E=null,S=null}}function zr(d,y){return S&&S(d,y.map(L=>xn(L,v.loaderData)))||d.key}function Na(d,y){if(b&&E){let w=zr(d,y);b[w]=E()}}function Br(d,y){if(b){let w=zr(d,y),L=b[w];if(typeof L=="number")return L}return null}function wt(d,y,w){if(e.patchRoutesOnNavigation)if(d){if(Object.keys(d[0].params).length>0)return{active:!0,matches:st(y,w,u,!0)}}else return{active:!0,matches:st(y,w,u,!0)||[]};return{active:!1,matches:null}}async function Et(d,y,w,L){if(!e.patchRoutesOnNavigation)return{type:"success",matches:d};let x=d;for(;;){let $=s==null,O=s||l,A=i;try{await e.patchRoutesOnNavigation({signal:w,path:y,matches:x,fetcherKey:L,patch:(H,F)=>{w.aborted||an(H,F,O,A,o,!1)}})}catch(H){return{type:"error",error:H,partialMatches:x}}finally{$&&!w.aborted&&(l=[...l])}if(w.aborted)return{type:"aborted"};let k=Ne(O,y,u),U=null;if(k){if(Object.keys(k[0].params).length===0)return{type:"success",matches:k};if(U=st(O,y,u,!0),!(U&&x.lengthw.route.id===y[L].route.id)}function Ia(d){i={},s=dt(d,o,void 0,i)}function $a(d,y,w=!1){let L=s==null;an(d,y,s||l,i,o,w),L&&(l=[...l],pe({}))}return N={get basename(){return u},get future(){return c},get state(){return v},get routes(){return l},get window(){return t},initialize:me,subscribe:ba,enableScrollRestoration:Aa,navigate:Ar,fetch:xa,revalidate:Sa,createHref:d=>e.history.createHref(d),encodeLocation:d=>e.history.encodeLocation(d),getFetcher:$r,resetFetcher:Da,deleteFetcher:_a,dispose:Bt,getBlocker:Oa,deleteBlocker:Ur,patchRoutes:$a,_internalFetchControllers:ee,_internalSetRoutes:Ia,_internalSetStateDoNotUseOrYouWillBreakYourApp(d){pe(d)}},e.unstable_instrumentations&&(N=Eo(N,e.unstable_instrumentations.map(d=>d.router).filter(Boolean))),N}function _o(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ar(e,t,r,n,a,o){let i,l;if(a){i=[];for(let u of t)if(i.push(u),u.route.id===a){l=u;break}}else i=t,l=t[t.length-1];let s=gr(n||".",vr(i),be(e.pathname,r)||e.pathname,o==="path");if(n==null&&(s.search=e.search,s.hash=e.hash),(n==null||n===""||n===".")&&l){let u=Er(s.search);if(l.route.index&&!u)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let h=new URLSearchParams(s.search),c=h.getAll("index");h.delete("index"),c.filter(g=>g).forEach(g=>h.append("index",g));let p=h.toString();s.search=p?`?${p}`:""}}return r!=="/"&&(s.pathname=co({basename:r,pathname:s.pathname})),Te(s)}function rn(e,t,r){if(!r||!_o(r))return{path:t};if(r.formMethod&&!Xo(r.formMethod))return{path:t,error:Ce(405,{method:r.formMethod})};let n=()=>({path:t,error:Ce(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=Yn(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ve(o))return n();let c=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,[g,b])=>`${p}${g}=${b} +`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:c}}}else if(r.formEncType==="application/json"){if(!ve(o))return n();try{let c=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:c,text:void 0}}}catch{return n()}}}Y(typeof FormData=="function","FormData is not available in this environment");let l,s;if(r.formData)l=lr(r.formData),s=r.formData;else if(r.body instanceof FormData)l=lr(r.body),s=r.body;else if(r.body instanceof URLSearchParams)l=r.body,s=cn(l);else if(r.body==null)l=new URLSearchParams,s=new FormData;else try{l=new URLSearchParams(r.body),s=cn(l)}catch{return n()}let u={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ve(u.formMethod))return{path:t,submission:u};let h=je(t);return e&&h.search&&Er(h.search)&&l.append("index",""),h.search=`?${l}`,{path:Te(h),submission:u}}function nn(e,t,r,n,a,o,i,l,s,u,h,c,p,g,b,S,E,P,R,M,T){let D=M?Re(M[1])?M[1].error:M[1].data:void 0,N=a.createURL(o.location),v=a.createURL(s),_;if(h&&o.errors){let Z=Object.keys(o.errors)[0];_=i.findIndex(G=>G.route.id===Z)}else if(M&&Re(M[1])){let Z=M[0];_=i.findIndex(G=>G.route.id===Z)-1}let z=M?M[1].statusCode:void 0,K=z&&z>=400,V={currentUrl:N,currentParams:o.matches[0]?.params||{},nextUrl:v,nextParams:i[0].params,...l,actionResult:D,actionStatus:z},ae=ht(i),se=i.map((Z,G)=>{let{route:ce}=Z,ee=null;if(_!=null&&G>_?ee=!1:ce.lazy?ee=!0:wr(ce)?h?ee=or(ce,o.loaderData,o.errors):Oo(o.loaderData,o.matches[G],Z)&&(ee=!0):ee=!1,ee!==null)return ir(r,n,e,ae,Z,u,t,ee);let le=!1;typeof T=="boolean"?le=T:K?le=!1:(c||N.pathname+N.search===v.pathname+v.search||N.search!==v.search||Ao(o.matches[G],Z))&&(le=!0);let fe={...V,defaultShouldRevalidate:le},m=ut(Z,fe);return ir(r,n,e,ae,Z,u,t,m,fe,T)}),ne=[];return b.forEach((Z,G)=>{if(h||!i.some(I=>I.route.id===Z.routeId)||g.has(G))return;let ce=o.fetchers.get(G),ee=ce&&ce.state!=="idle"&&ce.data===void 0,le=Ne(E,Z.path,P);if(!le){if(R&&ee)return;ne.push({key:G,routeId:Z.routeId,path:Z.path,matches:null,match:null,request:null,controller:null});return}if(S.has(G))return;let fe=Dt(le,Z.path),m=new AbortController,C=Xe(a,Z.path,m.signal),j=null;if(p.has(G))p.delete(G),j=Qe(r,n,C,le,fe,u,t);else if(ee)c&&(j=Qe(r,n,C,le,fe,u,t));else{let I;typeof T=="boolean"?I=T:K?I=!1:I=c;let B={...V,defaultShouldRevalidate:I};ut(fe,B)&&(j=Qe(r,n,C,le,fe,u,t,B))}j&&ne.push({key:G,routeId:Z.routeId,path:Z.path,matches:j,match:fe,request:C,controller:m})}),{dsMatches:se,revalidatingFetchers:ne}}function wr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function or(e,t,r){if(e.lazy)return!0;if(!wr(e))return!1;let n=t!=null&&e.id in t,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function Oo(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function Ao(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ut(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function an(e,t,r,n,a,o){let i;if(e){let u=n[e];Y(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),i=u.children}else i=r;let l=[],s=[];if(t.forEach(u=>{let h=i.find(c=>Un(u,c));h?s.push({existingRoute:h,newRoute:u}):l.push(u)}),l.length>0){let u=dt(l,a,[e||"_","patch",String(i?.length||"0")],n);i.push(...u)}if(o&&s.length>0)for(let u=0;ut.children?.some(a=>Un(r,a))):!1}var on=new WeakMap,Hn=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(Y(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let i=on.get(a);i||(i={},on.set(a,i));let l=i[e];if(l)return l;let s=(async()=>{let u=Ka(e),c=a[e]!==void 0&&e!=="hasErrorBoundary";if(u)oe(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(c)oe(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let p=await o();p!=null&&(Object.assign(a,{[e]:p}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(p=>p===void 0)&&(a.lazy=void 0))})();return i[e]=s,s},ln=new WeakMap;function No(e,t,r,n,a){let o=r[e.id];if(Y(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=ln.get(o);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let c=(async()=>{Y(typeof e.lazy=="function","No lazy route function found");let p=await e.lazy(),g={};for(let b in p){let S=p[b];if(S===void 0)continue;let E=qa(b),R=o[b]!==void 0&&b!=="hasErrorBoundary";E?oe(!E,"Route property "+b+" is not a supported property to be returned from a lazy route function. This property will be ignored."):R?oe(!R,`Route "${o.id}" has a static property "${b}" defined but its lazy function is also returning a value for this property. The lazy route property "${b}" will be ignored.`):g[b]=S}Object.assign(o,g),Object.assign(o,{...n(o),lazy:void 0})})();return ln.set(o,c),c.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:c}}let i=Object.keys(e.lazy),l=[],s;for(let h of i){if(a&&a.includes(h))continue;let c=Hn({key:h,route:e,manifest:r,mapRouteProperties:n});c&&(l.push(c),h===t&&(s=c))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u?.catch(()=>{}),s?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:s}}async function sn(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>a.resolve()))).forEach((a,o)=>{r[t[o].route.id]=a}),r}async function Io(e){return e.matches.some(t=>t.route.middleware)?zn(e,()=>sn(e)):sn(e)}function zn(e,t){return $o(e,t,n=>{if(Ko(n))throw n;return n},Yo,r);function r(n,a,o){if(o)return Promise.resolve(Object.assign(o.value,{[a]:{type:"error",result:n}}));{let{matches:i}=e,l=Math.min(Math.max(i.findIndex(u=>u.route.id===a),0),Math.max(i.findIndex(u=>u.shouldCallHandler()),0)),s=$e(i,i[l].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:n}})}}}async function $o(e,t,r,n,a){let{matches:o,request:i,params:l,context:s,unstable_pattern:u}=e,h=o.flatMap(p=>p.route.middleware?p.route.middleware.map(g=>[p.route.id,g]):[]);return await Bn({request:i,params:l,context:s,unstable_pattern:u},h,t,r,n,a)}async function Bn(e,t,r,n,a,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s)return await r();let[u,h]=s,c,p=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");try{return c={value:await Bn(e,t,r,n,a,o,i+1)},c.value}catch(g){return c={value:await o(g,u,c)},c.value}};try{let g=await h(e,p),b=g!=null?n(g):void 0;return a(b)?b:c?b??c.value:(c={value:await p()},c.value)}catch(g){return await o(g,u,c)}}function Wn(e,t,r,n,a){let o=Hn({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=No(n.route,ve(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function ir(e,t,r,n,a,o,i,l,s=null,u){let h=!1,c=Wn(e,t,r,a,o);return{...a,_lazyPromises:c,shouldLoad:l,shouldRevalidateArgs:s,shouldCallHandler(p){return h=!0,s?typeof u=="boolean"?ut(a,{...s,defaultShouldRevalidate:u}):typeof p=="boolean"?ut(a,{...s,defaultShouldRevalidate:p}):ut(a,s):l},resolve(p){let{lazy:g,loader:b,middleware:S}=a.route,E=h||l||p&&!ve(r.method)&&(g||b),P=S&&S.length>0&&!b&&!g;return E&&(ve(r.method)||!P)?jo({request:r,unstable_pattern:n,match:a,lazyHandlerPromise:c?.handler,lazyRoutePromise:c?.route,handlerOverride:p,scopedContext:i}):Promise.resolve({type:"data",result:void 0})}}}function Qe(e,t,r,n,a,o,i,l=null){return n.map(s=>s.route.id!==a.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:Wn(e,t,r,s,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:ir(e,t,r,ht(n),s,o,i,!0,l))}async function ko(e,t,r,n,a,o){r.some(u=>u._lazyPromises?.middleware)&&await Promise.all(r.map(u=>u._lazyPromises?.middleware));let i={request:t,unstable_pattern:ht(r),params:r[0].params,context:a,matches:r},s=await e({...i,fetcherKey:n,runClientMiddleware:u=>{let h=i;return zn(h,()=>u({...h,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return s}async function jo({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:n,lazyRoutePromise:a,handlerOverride:o,scopedContext:i}){let l,s,u=ve(e.method),h=u?"action":"loader",c=p=>{let g,b=new Promise((P,R)=>g=R);s=()=>g(),e.signal.addEventListener("abort",s);let S=P=>typeof p!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${r.route.id}]`)):p({request:e,unstable_pattern:t,params:r.params,context:i},...P!==void 0?[P]:[]),E=(async()=>{try{return{type:"data",result:await(o?o(R=>S(R)):S())}}catch(P){return{type:"error",result:P}}})();return Promise.race([E,b])};try{let p=u?r.route.action:r.route.loader;if(n||a)if(p){let g,[b]=await Promise.all([c(p).catch(S=>{g=S}),n,a]);if(g!==void 0)throw g;l=b}else{await n;let g=u?r.route.action:r.route.loader;if(g)[l]=await Promise.all([c(g),a]);else if(h==="action"){let b=new URL(e.url),S=b.pathname+b.search;throw Ce(405,{method:e.method,pathname:S,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(p)l=await c(p);else{let g=new URL(e.url),b=g.pathname+g.search;throw Ce(404,{pathname:b})}}catch(p){return{type:"error",result:p}}finally{s&&e.signal.removeEventListener("abort",s)}return l}async function Fo(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Uo(e){let{result:t,type:r}=e;if(jt(t)){let n;try{n=await Fo(t)}catch(a){return{type:"error",error:a}}return r==="error"?{type:"error",error:new Fe(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?sr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Wo(t),statusCode:Ve(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Ve(t)?t.status:void 0}:sr(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Ho(e,t,r,n,a){let o=e.headers.get("Location");if(Y(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!kt(o)){let i=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=ar(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}function un(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(kt(e)){let o=e,i=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(a.includes(i.protocol))throw new Error("Invalid redirect location");let l=be(i.pathname,r)!=null;if(i.origin===t.origin&&l)return i.pathname+i.search+i.hash}try{let o=n.createURL(e);if(a.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Xe(e,t,r,n){let a=e.createURL(Yn(t)).toString(),o={signal:r};if(n&&ve(n.formMethod)){let{formMethod:i,formEncType:l}=n;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(n.json)):l==="text/plain"?o.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?o.body=lr(n.formData):o.body=n.formData}return new Request(a,o)}function lr(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function cn(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function zo(e,t,r,n=!1,a=!1){let o={},i=null,l,s=!1,u={},h=r&&Re(r[1])?r[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let p=c.route.id,g=t[p];if(Y(!Ye(g),"Cannot handle redirect results in processLoaderData"),Re(g)){let b=g.error;if(h!==void 0&&(b=h,h=void 0),i=i||{},a)i[p]=b;else{let S=$e(e,p);i[S.route.id]==null&&(i[S.route.id]=b)}n||(o[p]=Fn),s||(s=!0,l=Ve(g.error)?g.error.status:500),g.headers&&(u[p]=g.headers)}else o[p]=g.data,g.statusCode&&g.statusCode!==200&&!s&&(l=g.statusCode),g.headers&&(u[p]=g.headers)}),h!==void 0&&r&&(i={[r[0]]:h},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function dn(e,t,r,n,a,o){let{loaderData:i,errors:l}=zo(t,r,n);return a.filter(s=>!s.matches||s.matches.some(u=>u.shouldLoad)).forEach(s=>{let{key:u,match:h,controller:c}=s;if(c&&c.signal.aborted)return;let p=o[u];if(Y(p,"Did not find corresponding fetcher result"),Re(p)){let g=$e(e.matches,h?.route.id);l&&l[g.route.id]||(l={...l,[g.route.id]:p.error}),e.fetchers.delete(u)}else if(Ye(p))Y(!1,"Unhandled fetcher revalidation redirect");else{let g=Ae(p.data);e.fetchers.set(u,g)}}),{loaderData:i,errors:l}}function fn(e,t,r,n){let a=Object.entries(t).filter(([,o])=>o!==Fn).reduce((o,[i,l])=>(o[i]=l,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function hn(e){return e?Re(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function $e(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Ct(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ce(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",n&&t&&r?l=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:a==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",l=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",n&&t&&r?l=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(l=`Invalid request method "${n.toUpperCase()}"`)),new Fe(e||500,i,new Error(l),!0)}function Lt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Ye(a))return{key:n,result:a}}}function Yn(e){let t=typeof e=="string"?je(e):e;return Te({...t,hash:""})}function Bo(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Wo(e){return new Fe(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Yo(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&Vo(r))}function Vo(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Jo(e){return jt(e.result)&&kn.has(e.result.status)}function Re(e){return e.type==="error"}function Ye(e){return(e&&e.type)==="redirect"}function sr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function jt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Go(e){return kn.has(e)}function Ko(e){return jt(e)&&Go(e.status)&&e.headers.has("Location")}function Xo(e){return xo.has(e.toUpperCase())}function ve(e){return Lo.has(e.toUpperCase())}function Er(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Dt(e,t){let r=typeof t=="string"?je(t).search:t.search;if(e[e.length-1].route.index&&Er(r||""))return e[e.length-1];let n=On(e);return n[n.length-1]}function mn(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function Qt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function qo(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ot(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Qo(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ae(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Zo(e,t){try{let r=e.sessionStorage.getItem(jn);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function ei(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(jn,JSON.stringify(r))}catch(n){oe(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function pn(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Je=f.createContext(null);Je.displayName="DataRouter";var Ze=f.createContext(null);Ze.displayName="DataRouterState";var Vn=f.createContext(!1);function Jn(){return f.useContext(Vn)}var Rr=f.createContext({isTransitioning:!1});Rr.displayName="ViewTransition";var Gn=f.createContext(new Map);Gn.displayName="Fetchers";var ti=f.createContext(null);ti.displayName="Await";var Ee=f.createContext(null);Ee.displayName="Navigation";var Ft=f.createContext(null);Ft.displayName="Location";var Le=f.createContext({outlet:null,matches:[],isDataRoute:!1});Le.displayName="Route";var br=f.createContext(null);br.displayName="RouteError";var Kn="REACT_ROUTER_ERROR",ri="REDIRECT",ni="ROUTE_ERROR_RESPONSE";function ai(e){if(e.startsWith(`${Kn}:${ri}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function oi(e){if(e.startsWith(`${Kn}:${ni}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Fe(t.status,t.statusText,t.data)}catch{}}function ii(e,{relative:t}={}){Y(mt(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:n}=f.useContext(Ee),{hash:a,pathname:o,search:i}=pt(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:Me([r,o])),n.createHref({pathname:l,search:i,hash:a})}function mt(){return f.useContext(Ft)!=null}function Pe(){return Y(mt(),"useLocation() may be used only in the context of a component."),f.useContext(Ft).location}var Xn="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qn(e){f.useContext(Ee).static||f.useLayoutEffect(e)}function Qn(){let{isDataRoute:e}=f.useContext(Le);return e?Ei():li()}function li(){Y(mt(),"useNavigate() may be used only in the context of a component.");let e=f.useContext(Je),{basename:t,navigator:r}=f.useContext(Ee),{matches:n}=f.useContext(Le),{pathname:a}=Pe(),o=JSON.stringify(vr(n)),i=f.useRef(!1);return qn(()=>{i.current=!0}),f.useCallback((s,u={})=>{if(oe(i.current,Xn),!i.current)return;if(typeof s=="number"){r.go(s);return}let h=gr(s,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Me([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,o,a,e])}var si=f.createContext(null);function ui(e){let t=f.useContext(Le).outlet;return f.useMemo(()=>t&&f.createElement(si.Provider,{value:e},t),[t,e])}function Zn(){let{matches:e}=f.useContext(Le),t=e[e.length-1];return t?t.params:{}}function pt(e,{relative:t}={}){let{matches:r}=f.useContext(Le),{pathname:n}=Pe(),a=JSON.stringify(vr(r));return f.useMemo(()=>gr(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function ci(e,t,r,n,a){Y(mt(),"useRoutes() may be used only in the context of a component.");let{navigator:o}=f.useContext(Ee),{matches:i}=f.useContext(Le),l=i[i.length-1],s=l?l.params:{},u=l?l.pathname:"/",h=l?l.pathnameBase:"/",c=l&&l.route;{let R=c&&c.path||"";na(u,!c||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${u}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let p=Pe(),g;g=p;let b=g.pathname||"/",S=b;if(h!=="/"){let R=h.replace(/^\//,"").split("/");S="/"+b.replace(/^\//,"").split("/").slice(R.length).join("/")}let E=Ne(e,{pathname:S});return oe(c||E!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),oe(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.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.`),pi(E&&E.map(R=>Object.assign({},R,{params:Object.assign({},s,R.params),pathname:Me([h,o.encodeLocation?o.encodeLocation(R.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?h:Me([h,o.encodeLocation?o.encodeLocation(R.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),i,r,n,a)}function di(){let e=Lr(),t=Ve(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=f.createElement(f.Fragment,null,f.createElement("p",null,"💿 Hey developer 👋"),f.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",f.createElement("code",{style:o},"ErrorBoundary")," or"," ",f.createElement("code",{style:o},"errorElement")," prop on your route.")),f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),r?f.createElement("pre",{style:a},r):null,i)}var fi=f.createElement(di,null),ea=class extends f.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=oi(e.digest);r&&(e=r)}let t=e!==void 0?f.createElement(Le.Provider,{value:this.props.routeContext},f.createElement(br.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?f.createElement(hi,{error:e},t):t}};ea.contextType=Vn;var Zt=new WeakMap;function hi({children:e,error:t}){let{basename:r}=f.useContext(Ee);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=ai(t.digest);if(n){let a=Zt.get(t);if(a)throw a;let o=Nn(n.location,r);if(An&&!Zt.get(t))if(o.isExternal||n.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw Zt.set(t,i),i}return f.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function mi({routeContext:e,match:t,children:r}){let n=f.useContext(Je);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),f.createElement(Le.Provider,{value:e},r)}function pi(e,t=[],r=null,n=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r?.errors;if(i!=null){let h=o.findIndex(c=>c.route.id&&i?.[c.route.id]!==void 0);Y(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let l=!1,s=-1;if(r)for(let h=0;h=0?o=o.slice(0,s+1):o=[o[0]];break}}}let u=r&&n?(h,c)=>{n(h,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:ht(r.matches),errorInfo:c})}:void 0;return o.reduceRight((h,c,p)=>{let g,b=!1,S=null,E=null;r&&(g=i&&c.route.id?i[c.route.id]:void 0,S=c.route.errorElement||fi,l&&(s<0&&p===0?(na("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,E=null):s===p&&(b=!0,E=c.route.hydrateFallbackElement||null)));let P=t.concat(o.slice(0,p+1)),R=()=>{let M;return g?M=S:b?M=E:c.route.Component?M=f.createElement(c.route.Component,null):c.route.element?M=c.route.element:M=h,f.createElement(mi,{match:c,routeContext:{outlet:h,matches:P,isDataRoute:r!=null},children:M})};return r&&(c.route.ErrorBoundary||c.route.errorElement||p===0)?f.createElement(ea,{location:r.location,revalidation:r.revalidation,component:S,error:g,children:R(),routeContext:{outlet:null,matches:P,isDataRoute:!0},onError:u}):R()},null)}function Sr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yi(e){let t=f.useContext(Je);return Y(t,Sr(e)),t}function yt(e){let t=f.useContext(Ze);return Y(t,Sr(e)),t}function vi(e){let t=f.useContext(Le);return Y(t,Sr(e)),t}function vt(e){let t=vi(e),r=t.matches[t.matches.length-1];return Y(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function gi(){return vt("useRouteId")}function wi(){return yt("useNavigation").navigation}function Cr(){let{matches:e,loaderData:t}=yt("useMatches");return f.useMemo(()=>e.map(r=>xn(r,t)),[e,t])}function ta(){let e=yt("useLoaderData"),t=vt("useLoaderData");return e.loaderData[t]}function ra(){let e=yt("useActionData"),t=vt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Lr(){let e=f.useContext(br),t=yt("useRouteError"),r=vt("useRouteError");return e!==void 0?e:t.errors?.[r]}function Ei(){let{router:e}=yi("useNavigate"),t=vt("useNavigate"),r=f.useRef(!1);return qn(()=>{r.current=!0}),f.useCallback(async(a,o={})=>{oe(r.current,Xn),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var yn={};function na(e,t,r){!t&&!yn[e]&&(yn[e]=!0,oe(!1,r))}var vn={};function ur(e,t){!e&&!vn[t]&&(vn[t]=!0,console.warn(t))}var Ri="useOptimistic",gn=Ba[Ri],bi=()=>{};function Si(e){return gn?gn(e):[e,bi]}function is(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&oe(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:f.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&oe(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:f.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&oe(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:f.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ls=["HydrateFallback","hydrateFallbackElement"],Ci=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function ss({router:e,flushSync:t,onError:r,unstable_useTransitions:n}){n=Jn()||n;let[o,i]=f.useState(e.state),[l,s]=Si(o),[u,h]=f.useState(),[c,p]=f.useState({isTransitioning:!1}),[g,b]=f.useState(),[S,E]=f.useState(),[P,R]=f.useState(),M=f.useRef(new Map),T=f.useCallback((_,{deletedFetchers:z,newErrors:K,flushSync:V,viewTransitionOpts:ae})=>{K&&r&&Object.values(K).forEach(ne=>r(ne,{location:_.location,params:_.matches[0]?.params??{},unstable_pattern:ht(_.matches)})),_.fetchers.forEach((ne,Z)=>{ne.data!==void 0&&M.current.set(Z,ne.data)}),z.forEach(ne=>M.current.delete(ne)),ur(V===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let se=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(ur(ae==null||se,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!ae||!se){t&&V?t(()=>i(_)):n===!1?i(_):f.startTransition(()=>{n===!0&&s(ne=>wn(ne,_)),i(_)});return}if(t&&V){t(()=>{S&&(g?.resolve(),S.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:ae.currentLocation,nextLocation:ae.nextLocation})});let ne=e.window.document.startViewTransition(()=>{t(()=>i(_))});ne.finished.finally(()=>{t(()=>{b(void 0),E(void 0),h(void 0),p({isTransitioning:!1})})}),t(()=>E(ne));return}S?(g?.resolve(),S.skipTransition(),R({state:_,currentLocation:ae.currentLocation,nextLocation:ae.nextLocation})):(h(_),p({isTransitioning:!0,flushSync:!1,currentLocation:ae.currentLocation,nextLocation:ae.nextLocation}))},[e.window,t,S,g,n,s,r]);f.useLayoutEffect(()=>e.subscribe(T),[e,T]),f.useEffect(()=>{c.isTransitioning&&!c.flushSync&&b(new Ci)},[c]),f.useEffect(()=>{if(g&&u&&e.window){let _=u,z=g.promise,K=e.window.document.startViewTransition(async()=>{n===!1?i(_):f.startTransition(()=>{n===!0&&s(V=>wn(V,_)),i(_)}),await z});K.finished.finally(()=>{b(void 0),E(void 0),h(void 0),p({isTransitioning:!1})}),E(K)}},[u,g,e.window,n,s]),f.useEffect(()=>{g&&u&&l.location.key===u.location.key&&g.resolve()},[g,S,l.location,u]),f.useEffect(()=>{!c.isTransitioning&&P&&(h(P.state),p({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}),R(void 0))},[c.isTransitioning,P]);let D=f.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:_=>e.navigate(_),push:(_,z,K)=>e.navigate(_,{state:z,preventScrollReset:K?.preventScrollReset}),replace:(_,z,K)=>e.navigate(_,{replace:!0,state:z,preventScrollReset:K?.preventScrollReset})}),[e]),N=e.basename||"/",v=f.useMemo(()=>({router:e,navigator:D,static:!1,basename:N,onError:r}),[e,D,N,r]);return f.createElement(f.Fragment,null,f.createElement(Je.Provider,{value:v},f.createElement(Ze.Provider,{value:l},f.createElement(Gn.Provider,{value:M.current},f.createElement(Rr.Provider,{value:c},f.createElement(xi,{basename:N,location:l.location,navigationType:l.historyAction,navigator:D,unstable_useTransitions:n},f.createElement(Li,{routes:e.routes,future:e.future,state:l,onError:r})))))),null)}function wn(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var Li=f.memo(Pi);function Pi({routes:e,future:t,state:r,onError:n}){return ci(e,void 0,r,n,t)}function us(e){return ui(e.context)}function xi({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:i}){Y(!mt(),"You cannot render a inside another . You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=f.useMemo(()=>({basename:l,navigator:a,static:o,unstable_useTransitions:i,future:{}}),[l,a,o,i]);typeof r=="string"&&(r=je(r));let{pathname:u="/",search:h="",hash:c="",state:p=null,key:g="default"}=r,b=f.useMemo(()=>{let S=be(u,l);return S==null?null:{location:{pathname:S,search:h,hash:c,state:p,key:g},navigationType:n}},[l,u,h,c,p,g,n]);return oe(b!=null,` is not able to match the URL "${u}${h}${c}" because it does not start with the basename, so the won't render anything.`),b==null?null:f.createElement(Ee.Provider,{value:s},f.createElement(Ft.Provider,{children:t,value:b}))}function Mi(){return{params:Zn(),loaderData:ta(),actionData:ra(),matches:Cr()}}function cs(e){return function(){const r=Mi();return f.createElement(e,r)}}function Ti(){return{params:Zn(),loaderData:ta(),actionData:ra(),error:Lr()}}function ds(e){return function(){const r=Ti();return f.createElement(e,r)}}var _t="get",Ot="application/x-www-form-urlencoded";function Ut(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Di(e){return Ut(e)&&e.tagName.toLowerCase()==="button"}function _i(e){return Ut(e)&&e.tagName.toLowerCase()==="form"}function Oi(e){return Ut(e)&&e.tagName.toLowerCase()==="input"}function Ai(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ni(e,t){return e.button===0&&(!t||t==="_self")&&!Ai(e)}function cr(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Ii(e,t){let r=cr(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}var Pt=null;function $i(){if(Pt===null)try{new FormData(document.createElement("form"),0),Pt=!1}catch{Pt=!0}return Pt}var ki=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function er(e){return e!=null&&!ki.has(e)?(oe(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Ot}"`),null):e}function ji(e,t){let r,n,a,o,i;if(_i(e)){let l=e.getAttribute("action");n=l?be(l,t):null,r=e.getAttribute("method")||_t,a=er(e.getAttribute("enctype"))||Ot,o=new FormData(e)}else if(Di(e)||Oi(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a
\ No newline at end of file