From 6add14f0c54545cba2a2d7fd63ecd90aeaba5d35 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 5 Mar 2026 01:06:40 +0000 Subject: [PATCH 1/3] Initial plan From 60656a370e098f2328b21fb467822a2a8ca3b5f1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 5 Mar 2026 01:12:27 +0000 Subject: [PATCH 2/3] Add quiz preparation feature with AI-generated questions Co-authored-by: MansiPatil21 <86612618+MansiPatil21@users.noreply.github.com> --- backend/main.py | 104 ++++ frontend/build/asset-manifest.json | 6 +- frontend/build/index.html | 2 +- .../js/{main.924ed23b.js => main.798d63d4.js} | 6 +- ...CENSE.txt => main.798d63d4.js.LICENSE.txt} | 0 frontend/build/static/js/main.798d63d4.js.map | 1 + frontend/build/static/js/main.924ed23b.js.map | 1 - frontend/src/App.tsx | 2 + frontend/src/pages/QuizView.tsx | 585 ++++++++++++++++++ frontend/src/pages/RoadmapView.tsx | 13 + 10 files changed, 712 insertions(+), 8 deletions(-) rename frontend/build/static/js/{main.924ed23b.js => main.798d63d4.js} (67%) rename frontend/build/static/js/{main.924ed23b.js.LICENSE.txt => main.798d63d4.js.LICENSE.txt} (100%) create mode 100644 frontend/build/static/js/main.798d63d4.js.map delete mode 100644 frontend/build/static/js/main.924ed23b.js.map create mode 100644 frontend/src/pages/QuizView.tsx diff --git a/backend/main.py b/backend/main.py index 1bf9cc9..02a76fe 100644 --- a/backend/main.py +++ b/backend/main.py @@ -73,6 +73,10 @@ class AddTopicRequest(BaseModel): difficulty: Optional[str] = "medium" weightage: Optional[str] = "" +class GenerateQuizRequest(BaseModel): + num_questions: Optional[int] = 5 + difficulty: Optional[str] = None # "easy", "medium", "hard", or None for all + # Auth Utilities def get_password_hash(password: str) -> str: return bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt()).decode('utf-8') @@ -705,6 +709,106 @@ def get_risk_analysis(current_user: dict = Depends(get_current_user)): traceback.print_exc() raise HTTPException(status_code=500, detail="Failed to calculate risk analysis") +# Quiz Generation +@app.post("/api/roadmaps/{roadmap_id}/quiz") +async def generate_quiz(roadmap_id: str, req: GenerateQuizRequest, current_user: dict = Depends(get_current_user)): + response = roadmaps_table.get_item(Key={'roadmap_id': roadmap_id}) + if 'Item' not in response: + raise HTTPException(status_code=404, detail="Roadmap not found") + + roadmap = response['Item'] + if roadmap.get('user_email') != current_user['email']: + raise HTTPException(status_code=403, detail="Not authorized to access this roadmap") + + topics = roadmap.get('topics', []) + if not topics: + raise HTTPException(status_code=400, detail="Roadmap has no topics to quiz on") + + # Filter by difficulty if requested + candidate_topics = topics + if req.difficulty: + filtered = [t for t in topics if t.get('difficulty') == req.difficulty] + if filtered: + candidate_topics = filtered + + # Limit to a reasonable number of questions + num_questions = max(1, min(req.num_questions or 5, 20)) + + # Build a concise summary of topics for the AI + topic_lines = [] + for t in candidate_topics: + line = f"- {t.get('name', 'Unknown')} (type: {t.get('type', 'lecture')}, difficulty: {t.get('difficulty', 'medium')})" + if t.get('description'): + line += f": {t['description']}" + topic_lines.append(line) + topics_text = "\n".join(topic_lines) + + course_name = roadmap.get('name', 'this course') + + groq_api_key = os.getenv("GROQ_API_KEY") + if not groq_api_key: + raise HTTPException(status_code=503, detail="AI service is not configured") + + try: + client = groq.Groq(api_key=groq_api_key) + prompt = f"""You are an expert academic quiz creator for the course: {course_name}. + +Based on the following course topics, generate exactly {num_questions} multiple-choice quiz questions to help a student prepare for their exam or quiz. + +Course Topics: +{topics_text} + +Requirements: +- Each question must test understanding of one of the topics listed above. +- Each question must have exactly 4 answer options labeled A, B, C, D. +- Only one option is correct. +- Include a brief explanation for why the correct answer is right. +- Questions should vary in difficulty and cover different topics. +- Questions should be clear, concise, and academically appropriate. + +Return a JSON object with this EXACT structure: +{{ + "questions": [ + {{ + "question": "What is the time complexity of binary search?", + "options": ["O(n)", "O(log n)", "O(n^2)", "O(1)"], + "correct_index": 1, + "explanation": "Binary search repeatedly halves the search space, resulting in O(log n) time complexity.", + "topic": "Binary Search" + }} + ] +}} + +Only return the JSON object. No markdown, no extra text.""" + + completion = client.chat.completions.create( + model="openai/gpt-oss-120b", + messages=[{"role": "user", "content": prompt}], + temperature=0.4, + max_completion_tokens=4096, + response_format={"type": "json_object"} + ) + + quiz_data = json.loads(completion.choices[0].message.content) + questions = quiz_data.get("questions", []) + + # Validate and clamp correct_index to be within [0, 3] + for q in questions: + if not isinstance(q.get("correct_index"), int): + q["correct_index"] = 0 + q["correct_index"] = max(0, min(q["correct_index"], len(q.get("options", [""])) - 1)) + + print(f"✅ Generated {len(questions)} quiz questions for roadmap {roadmap_id}") + return { + "roadmap_id": roadmap_id, + "roadmap_name": course_name, + "num_questions": len(questions), + "questions": questions + } + except Exception as e: + print(f"Error generating quiz: {e}") + raise HTTPException(status_code=500, detail="Failed to generate quiz questions") + # Health and Startup @app.get("/api/health") def health_check(): diff --git a/frontend/build/asset-manifest.json b/frontend/build/asset-manifest.json index 558e785..e4d57cd 100644 --- a/frontend/build/asset-manifest.json +++ b/frontend/build/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "/static/css/main.e995b3ee.css", - "main.js": "/static/js/main.924ed23b.js", + "main.js": "/static/js/main.798d63d4.js", "static/js/453.20359781.chunk.js": "/static/js/453.20359781.chunk.js", "index.html": "/index.html", "main.e995b3ee.css.map": "/static/css/main.e995b3ee.css.map", - "main.924ed23b.js.map": "/static/js/main.924ed23b.js.map", + "main.798d63d4.js.map": "/static/js/main.798d63d4.js.map", "453.20359781.chunk.js.map": "/static/js/453.20359781.chunk.js.map" }, "entrypoints": [ "static/css/main.e995b3ee.css", - "static/js/main.924ed23b.js" + "static/js/main.798d63d4.js" ] } \ No newline at end of file diff --git a/frontend/build/index.html b/frontend/build/index.html index 6b7b000..33a010e 100644 --- a/frontend/build/index.html +++ b/frontend/build/index.html @@ -1 +1 @@ -React App
\ No newline at end of file +React App
\ No newline at end of file diff --git a/frontend/build/static/js/main.924ed23b.js b/frontend/build/static/js/main.798d63d4.js similarity index 67% rename from frontend/build/static/js/main.924ed23b.js rename to frontend/build/static/js/main.798d63d4.js index 972d621..ab4c6b0 100644 --- a/frontend/build/static/js/main.924ed23b.js +++ b/frontend/build/static/js/main.798d63d4.js @@ -1,3 +1,3 @@ -/*! For license information please see main.924ed23b.js.LICENSE.txt */ -(()=>{"use strict";var e={4(e,t,n){var r=n(853),a=n(43),o=n(950);function l(e){var t="https://react.dev/errors/"+e;if(1O||(e.current=D[O],D[O]=null,O--)}function B(e,t){O++,D[O]=e.current,e.current=t}var H,U,$=W(null),V=W(null),q=W(null),Q=W(null);function Y(e,t){switch(B(q,t),B(V,e),B($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=yd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F($),B($,e)}function K(){F($),F(V),F(q)}function G(e){null!==e.memoizedState&&B(Q,e);var t=$.current,n=bd(t,e.type);t!==n&&(B(V,e),B($,n))}function J(e){V.current===e&&(F($),F(V)),Q.current===e&&(F(Q),df._currentValue=A)}function X(e){if(void 0===H)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",U=-1)":-1--a||s[r]!==c[a]){var u="\n"+s[r].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}}while(1<=r&&0<=a);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?X(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return X(e.type);case 16:return X("Lazy");case 13:return e.child!==t&&null!==t?X("Suspense Fallback"):X("Suspense");case 19:return X("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return X("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var re=Object.prototype.hasOwnProperty,ae=r.unstable_scheduleCallback,oe=r.unstable_cancelCallback,le=r.unstable_shouldYield,ie=r.unstable_requestPaint,se=r.unstable_now,ce=r.unstable_getCurrentPriorityLevel,ue=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,fe=r.unstable_NormalPriority,pe=r.unstable_LowPriority,he=r.unstable_IdlePriority,ge=r.log,me=r.unstable_setDisableYieldValue,ye=null,be=null;function ve(e){if("function"===typeof ge&&me(e),be&&"function"===typeof be.setStrictMode)try{be.setStrictMode(ye,e)}catch(t){}}var xe=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ke(e)/we|0)|0},ke=Math.log,we=Math.LN2;var Se=256,je=262144,Ce=4194304;function ze(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,o=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var i=134217727&r;return 0!==i?0!==(r=i&~o)?a=ze(r):0!==(l&=i)?a=ze(l):n||0!==(n=i&~e)&&(a=ze(n)):0!==(i=r&~o)?a=ze(i):0!==l?a=ze(l):n||0!==(n=r&~e)&&(a=ze(n)),0===a?0:0!==t&&t!==a&&0===(t&o)&&((o=a&-a)>=(n=t&-t)||32===o&&0!==(4194048&n))?t:a}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Re(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function _e(){var e=Ce;return 0===(62914560&(Ce<<=1))&&(Ce=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Le(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ie(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Ne(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),a=1<=zn),Rn=String.fromCharCode(32),_n=!1;function Pn(e,t){switch(e){case"keyup":return-1!==jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ln(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var In=!1;var Nn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function An(e,t,n,r){Mt?At?At.push(r):At=[r]:Mt=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dn=null,On=null;function Wn(e){Ku(e,0)}function Fn(e){if(ht(Xe(e)))return e}function Bn(e,t){if("change"===e)return t}var Hn=!1;if(Bt){var Un;if(Bt){var $n="oninput"in document;if(!$n){var Vn=document.createElement("div");Vn.setAttribute("oninput","return;"),$n="function"===typeof Vn.oninput}Un=$n}else Un=!1;Hn=Un&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Bt&&"documentMode"in document&&11>=document.documentMode,lr=null,ir=null,sr=null,cr=!1;function ur(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;cr||null==lr||lr!==gt(r)||("selectionStart"in(r=lr)&&ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sr&&Zn(sr,r)||(sr=r,0<(r=rd(ir,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=lr)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},pr={},hr={};function gr(e){if(pr[e])return pr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in hr)return pr[e]=n[t];return e}Bt&&(hr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var mr=gr("animationend"),yr=gr("animationiteration"),br=gr("animationstart"),vr=gr("transitionrun"),xr=gr("transitionstart"),kr=gr("transitioncancel"),wr=gr("transitionend"),Sr=new Map,jr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Cr(e,t){Sr.set(e,t),rt(t,[e])}jr.push("scrollEnd");var zr="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Er=[],Tr=0,Rr=0;function _r(){for(var e=Tr,t=Rr=Tr=0;t>=l,a-=l,na=1<<32-xe(t)+a|n<g?(m=d,d=null):m=d.sibling;var y=p(a,d,i[g],s);if(null===y){null===d&&(d=m);break}e&&d&&null===y.alternate&&t(a,d),l=o(y,l,g),null===u?c=y:u.sibling=y,u=y,d=m}if(g===i.length)return n(a,d),da&&aa(a,g),c;if(null===d){for(;gm?(y=g,g=null):y=g.sibling;var v=p(a,g,b.value,c);if(null===v){null===g&&(g=y);break}e&&g&&null===v.alternate&&t(a,g),i=o(v,i,m),null===d?u=v:d.sibling=v,d=v,g=y}if(b.done)return n(a,g),da&&aa(a,m),u;if(null===g){for(;!b.done;m++,b=s.next())null!==(b=f(a,b.value,c))&&(i=o(b,i,m),null===d?u=b:d.sibling=b,d=b);return da&&aa(a,m),u}for(g=r(g);!b.done;m++,b=s.next())null!==(b=h(g,a,m,b.value,c))&&(e&&null!==b.alternate&&g.delete(null===b.key?m:b.key),i=o(b,i,m),null===d?u=b:d.sibling=b,d=b);return e&&g.forEach(function(e){return t(a,e)}),da&&aa(a,m),u}(s,c,u=v.call(u),d)}if("function"===typeof u.then)return b(s,c,co(u),d);if(u.$$typeof===k)return b(s,c,Ia(s,u),d);fo(s,u)}return"string"===typeof u&&""!==u||"number"===typeof u||"bigint"===typeof u?(u=""+u,null!==c&&6===c.tag?(n(s,c.sibling),(d=a(c,u)).return=s,s=d):(n(s,c),(d=$r(u,s.mode,d)).return=s,s=d),i(s)):n(s,c)}return function(e,t,n,r){try{so=0;var a=b(e,t,n,r);return io=null,a}catch(l){if(l===Ja||l===Za)throw l;var o=Or(29,l,null,e.mode);return o.lanes=r,o.return=e,o}}}var ho=po(!0),go=po(!1),mo=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&pc)){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Mr(e),Nr(e,null,n),t}return Pr(e,r,t,n),Mr(e)}function ko(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194048&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ne(e,n)}}function wo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?a=o=l:o=o.next=l,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var So=!1;function jo(){if(So){if(null!==$a)throw $a}}function Co(e,t,n,r){So=!1;var a=e.updateQueue;mo=!1;var o=a.firstBaseUpdate,l=a.lastBaseUpdate,i=a.shared.pending;if(null!==i){a.shared.pending=null;var s=i,c=s.next;s.next=null,null===l?o=c:l.next=c,l=s;var u=e.alternate;null!==u&&((i=(u=u.updateQueue).lastBaseUpdate)!==l&&(null===i?u.firstBaseUpdate=c:i.next=c,u.lastBaseUpdate=s))}if(null!==o){var d=a.baseState;for(l=0,u=c=s=null,i=o;;){var f=-536870913&i.lane,h=f!==i.lane;if(h?(mc&f)===f:(r&f)===f){0!==f&&f===Ua&&(So=!0),null!==u&&(u=u.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var g=e,m=i;f=t;var y=n;switch(m.tag){case 1:if("function"===typeof(g=m.payload)){d=g.call(y,d,f);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null===(f="function"===typeof(g=m.payload)?g.call(y,d,f):g)||void 0===f)break e;d=p({},d,f);break e;case 2:mo=!0}}null!==(f=i.callback)&&(e.flags|=64,h&&(e.flags|=8192),null===(h=a.callbacks)?a.callbacks=[f]:h.push(f))}else h={lane:f,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===u?(c=u=h,s=d):u=u.next=h,l|=f;if(null===(i=i.next)){if(null===(i=a.shared.pending))break;i=(h=i).next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}null===u&&(s=d),a.baseState=s,a.firstBaseUpdate=c,a.lastBaseUpdate=u,null===o&&(a.shared.lanes=0),jc|=l,e.lanes=l,e.memoizedState=d}}function zo(e,t){if("function"!==typeof e)throw Error(l(191,e));e.call(t)}function Eo(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;eo?o:8;var l=N.T,i={};N.T=i,di(e,!1,t,n);try{var s=a(),c=N.S;if(null!==c&&c(i,s),null!==s&&"object"===typeof s&&"function"===typeof s.then)ui(e,t,function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var e=0;e<\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"===typeof r.is?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"===typeof r.is?i.createElement(a,{is:r.is}):i.createElement(a)}}o[Be]=t,o[He]=r;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)o.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=o;e:switch(fd(o,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&is(t)}}return fs(t),ss(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&is(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(l(166));if(e=q.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=ca))switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Be]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||cd(e.nodeValue,n)))||ga(t,!0)}else(e=md(e).createTextNode(r))[Be]=t,t.stateNode=e}return fs(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=ba(t),null!==n){if(null===e){if(!r)throw Error(l(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(l(557));e[Be]=t}else va(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),e=!1}else n=xa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Wo(t),t):(Wo(t),null);if(0!==(128&t.flags))throw Error(l(558))}return fs(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=ba(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(l(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(l(317));a[Be]=t}else va(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),a=!1}else a=xa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(Wo(t),t):(Wo(t),null)}return Wo(t),0!==(128&t.flags)?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),us(t,t.updateQueue),fs(t),null);case 4:return K(),null===e&&Zu(t.stateNode.containerInfo),fs(t),null;case 10:return za(t.type),fs(t),null;case 19:if(F(Fo),null===(r=t.memoizedState))return fs(t),null;if(a=0!==(128&t.flags),null===(o=r.rendering))if(a)ds(r,!1);else{if(0!==Sc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=Bo(e))){for(t.flags|=128,ds(r,!1),e=o.updateQueue,t.updateQueue=e,us(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Br(n,e),n=n.sibling;return B(Fo,1&Fo.current|2),da&&aa(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&se()>Nc&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Bo(o))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,us(t,e),ds(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!da)return fs(t),null}else 2*se()-r.renderingStartTime>Nc&&536870912!==n&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=se(),e.sibling=null,n=Fo.current,B(Fo,a?1&n|2:1&n),da&&aa(t,r.treeForkCount),e):(fs(t),null);case 22:case 23:return Wo(t),Lo(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(fs(t),6&t.subtreeFlags&&(t.flags|=8192)):fs(t),null!==(n=t.updateQueue)&&us(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&F(Qa),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),za(Oa),fs(t),null;case 25:case 30:return null}throw Error(l(156,t.tag))}function hs(e,t){switch(ia(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return za(Oa),K(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return J(t),null;case 31:if(null!==t.memoizedState){if(Wo(t),null===t.alternate)throw Error(l(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Wo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(l(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return F(Fo),null;case 4:return K(),null;case 10:return za(t.type),null;case 22:case 23:return Wo(t),Lo(),null!==e&&F(Qa),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return za(Oa),null;default:return null}}function gs(e,t){switch(ia(t),t.tag){case 3:za(Oa),K();break;case 26:case 27:case 5:J(t);break;case 4:K();break;case 31:null!==t.memoizedState&&Wo(t);break;case 13:Wo(t);break;case 19:F(Fo);break;case 10:za(t.type);break;case 22:case 23:Wo(t),Lo(),null!==e&&F(Qa);break;case 24:za(Oa)}}function ms(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var o=n.create,l=n.inst;r=o(),l.destroy=r}n=n.next}while(n!==a)}}catch(i){Su(t,t.return,i)}}function ys(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var o=a.next;r=o;do{if((r.tag&e)===e){var l=r.inst,i=l.destroy;if(void 0!==i){l.destroy=void 0,a=t;var s=n,c=i;try{c()}catch(u){Su(a,s,u)}}}r=r.next}while(r!==o)}}catch(u){Su(t,t.return,u)}}function bs(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Eo(t,n)}catch(r){Su(e,e.return,r)}}}function vs(e,t,n){n.props=Si(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Su(e,t,r)}}function xs(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"===typeof n?e.refCleanup=n(r):n.current=r}}catch(a){Su(e,t,a)}}function ks(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"===typeof r)try{r()}catch(a){Su(e,t,a)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"===typeof n)try{n(null)}catch(o){Su(e,t,o)}else n.current=null}function ws(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Su(e,e.return,a)}}function Ss(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,o=null,i=null,s=null,c=null,u=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&null!=f)switch(h){case"checked":case"value":break;case"defaultValue":c=f;default:r.hasOwnProperty(h)||ud(e,t,h,null,r,f)}}for(var p in r){var h=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=h||null!=f))switch(p){case"type":o=h;break;case"name":a=h;break;case"checked":u=h;break;case"defaultChecked":d=h;break;case"value":i=h;break;case"defaultValue":s=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(l(137,t));break;default:h!==f&&ud(e,t,p,h,r,f)}}return void bt(e,i,s,c,u,d,o,a);case"select":for(o in h=i=s=p=null,n)if(c=n[o],n.hasOwnProperty(o)&&null!=c)switch(o){case"value":break;case"multiple":h=c;default:r.hasOwnProperty(o)||ud(e,t,o,null,r,c)}for(a in r)if(o=r[a],c=n[a],r.hasOwnProperty(a)&&(null!=o||null!=c))switch(a){case"value":p=o;break;case"defaultValue":s=o;break;case"multiple":i=o;default:o!==c&&ud(e,t,a,o,r,c)}return t=s,n=i,r=h,void(null!=p?kt(e,!!n,p,!1):!!r!==!!n&&(null!=t?kt(e,!!n,t,!0):kt(e,!!n,n?[]:"",!1)));case"textarea":for(s in h=p=null,n)if(a=n[s],n.hasOwnProperty(s)&&null!=a&&!r.hasOwnProperty(s))switch(s){case"value":case"children":break;default:ud(e,t,s,null,r,a)}for(i in r)if(a=r[i],o=n[i],r.hasOwnProperty(i)&&(null!=a||null!=o))switch(i){case"value":p=a;break;case"defaultValue":h=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(l(91));break;default:a!==o&&ud(e,t,i,a,r,o)}return void wt(e,p,h);case"option":for(var g in n)if(p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g))if("selected"===g)e.selected=!1;else ud(e,t,g,null,r,p);for(c in r)if(p=r[c],h=n[c],r.hasOwnProperty(c)&&p!==h&&(null!=p||null!=h))if("selected"===c)e.selected=p&&"function"!==typeof p&&"symbol"!==typeof p;else ud(e,t,c,p,r,h);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in n)p=n[m],n.hasOwnProperty(m)&&null!=p&&!r.hasOwnProperty(m)&&ud(e,t,m,null,r,p);for(u in r)if(p=r[u],h=n[u],r.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(l(137,t));break;default:ud(e,t,u,p,r,h)}return;default:if(Tt(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!r.hasOwnProperty(y)&&dd(e,t,y,void 0,r,p);for(d in r)p=r[d],h=n[d],!r.hasOwnProperty(d)||p===h||void 0===p&&void 0===h||dd(e,t,d,p,r,h);return}}for(var b in n)p=n[b],n.hasOwnProperty(b)&&null!=p&&!r.hasOwnProperty(b)&&ud(e,t,b,null,r,p);for(f in r)p=r[f],h=n[f],!r.hasOwnProperty(f)||p===h||null==p&&null==h||ud(e,t,f,p,r,h)}(r,e.type,n,t),r[He]=t}catch(a){Su(e,e.return,a)}}function js(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&zd(e.type)||4===e.tag}function Cs(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||js(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&zd(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function zs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Lt));else if(4!==r&&(27===r&&zd(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(zs(e,t,n),e=e.sibling;null!==e;)zs(e,t,n),e=e.sibling}function Es(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&zd(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Es(e,t,n),e=e.sibling;null!==e;)Es(e,t,n),e=e.sibling}function Ts(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);fd(t,r,n),t[Be]=e,t[He]=n}catch(o){Su(e,e.return,o)}}var Rs=!1,_s=!1,Ps=!1,Ls="function"===typeof WeakSet?WeakSet:Set,Is=null;function Ns(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ys(e,n),4&r&&ms(5,n);break;case 1:if(Ys(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(l){Su(n,n.return,l)}else{var a=Si(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){Su(n,n.return,i)}}64&r&&bs(n),512&r&&xs(n,n.return);break;case 3:if(Ys(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Eo(e,t)}catch(l){Su(n,n.return,l)}}break;case 27:null===t&&4&r&&Ts(n);case 26:case 5:Ys(e,n),null===t&&4&r&&ws(n),512&r&&xs(n,n.return);break;case 12:Ys(e,n);break;case 31:Ys(e,n),4&r&&Fs(e,n);break;case 13:Ys(e,n),4&r&&Bs(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Eu.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Rs)){t=null!==t&&null!==t.memoizedState||_s,a=Rs;var o=_s;Rs=r,(_s=t)&&!o?Gs(e,n,0!==(8772&n.subtreeFlags)):Ys(e,n),Rs=a,_s=o}break;case 30:break;default:Ys(e,n)}}function Ms(e){var t=e.alternate;null!==t&&(e.alternate=null,Ms(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ke(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var As=null,Ds=!1;function Os(e,t,n){for(n=n.child;null!==n;)Ws(e,t,n),n=n.sibling}function Ws(e,t,n){if(be&&"function"===typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(ye,n)}catch(o){}switch(n.tag){case 26:_s||ks(n,t),Os(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:_s||ks(n,t);var r=As,a=Ds;zd(n.type)&&(As=n.stateNode,Ds=!1),Os(e,t,n),Od(n.stateNode),As=r,Ds=a;break;case 5:_s||ks(n,t);case 6:if(r=As,a=Ds,As=null,Os(e,t,n),Ds=a,null!==(As=r))if(Ds)try{(9===As.nodeType?As.body:"HTML"===As.nodeName?As.ownerDocument.body:As).removeChild(n.stateNode)}catch(l){Su(n,t,l)}else try{As.removeChild(n.stateNode)}catch(l){Su(n,t,l)}break;case 18:null!==As&&(Ds?(Ed(9===(e=As).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Vf(e)):Ed(As,n.stateNode));break;case 4:r=As,a=Ds,As=n.stateNode.containerInfo,Ds=!0,Os(e,t,n),As=r,Ds=a;break;case 0:case 11:case 14:case 15:ys(2,n,t),_s||ys(4,n,t),Os(e,t,n);break;case 1:_s||(ks(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount&&vs(n,t,r)),Os(e,t,n);break;case 21:Os(e,t,n);break;case 22:_s=(r=_s)||null!==n.memoizedState,Os(e,t,n),_s=r;break;default:Os(e,t,n)}}function Fs(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Vf(e)}catch(n){Su(t,t.return,n)}}}function Bs(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Vf(e)}catch(n){Su(t,t.return,n)}}function Hs(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ls),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ls),t;default:throw Error(l(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tu.bind(null,e,t);t.then(r,r)}})}function Us(e,t){var n=t.deletions;if(null!==n)for(var r=0;r title"))),fd(o,r,n),o[Be]=e,et(o),r=o;break e;case"link":var i=nf("link","href",a).get(r+(n.href||""));if(i)for(var s=0;si)break;var u=s.transferSize,d=s.initiatorType;u&&pd(d)&&(l+=u*((s=s.responseEnd)of?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}(d,h)))return Fc=o,e.cancelPendingCommit=h(gu.bind(null,e,t,o,n,r,a,l,i,s,u,d,null,f,p)),void Xc(e,o,l,!c)}gu(e,t,o,n,r,a,l,i,s)}function Jc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;rm&&(l=m,m=g,g=l);var y=tr(i,g),b=tr(i,m);if(y&&b&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==b.node||p.focusOffset!==b.offset)){var v=d.createRange();v.setStart(y.node,y.offset),p.removeAllRanges(),g>m?(p.addRange(v),p.extend(b.node,b.offset)):(v.setEnd(b.node,b.offset),p.addRange(v))}}}}for(d=[],p=i;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"===typeof i.focus&&i.focus(),i=0;in?32:n,N.T=null,n=Hc,Hc=null;var o=Oc,i=Fc;if(Dc=0,Wc=Oc=null,Fc=0,0!==(6&pc))throw Error(l(331));var s=pc;if(pc|=4,sc(o.current),ec(o,o.current,i,n),pc=s,Au(0,!1),be&&"function"===typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(ye,o)}catch(c){}return!0}finally{M.p=a,N.T=r,vu(e,t)}}function wu(e,t,n){t=Yr(n,t),null!==(e=xo(e,t=Ri(e.stateNode,t,2),2))&&(Le(e,2),Mu(e))}function Su(e,t,n){if(3===e.tag)wu(e,e,n);else for(;null!==t;){if(3===t.tag){wu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ac||!Ac.has(r))){e=Yr(n,e),null!==(r=xo(t,n=_i(2),2))&&(Pi(n,r,t,e),Le(r,2),Mu(r));break}}t=t.return}}function ju(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fc;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(kc=!0,a.add(n),e=Cu.bind(null,e,t,n),t.then(e,e))}function Cu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,hc===e&&(mc&n)===n&&(4===Sc||3===Sc&&(62914560&mc)===mc&&300>se()-Lc?0===(2&pc)&&tu(e,0):zc|=n,Tc===mc&&(Tc=0)),Mu(e)}function zu(e,t){0===t&&(t=_e()),null!==(e=Ir(e,t))&&(Le(e,t),Mu(e))}function Eu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),zu(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(l(314))}null!==r&&r.delete(t),zu(e,n)}var Ru=null,_u=null,Pu=!1,Lu=!1,Iu=!1,Nu=0;function Mu(e){e!==_u&&null===e.next&&(null===_u?Ru=_u=e:_u=_u.next=e),Lu=!0,Pu||(Pu=!0,jd(function(){0!==(6&pc)?ae(ue,Du):Ou()}))}function Au(e,t){if(!Iu&&Lu){Iu=!0;do{for(var n=!1,r=Ru;null!==r;){if(!t)if(0!==e){var a=r.pendingLanes;if(0===a)var o=0;else{var l=r.suspendedLanes,i=r.pingedLanes;o=(1<<31-xe(42|e)+1)-1,o=201326741&(o&=a&~(l&~i))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Bu(r,o))}else o=mc,0===(3&(o=Ee(r,r===hc?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,o)||(n=!0,Bu(r,o));r=r.next}}while(n);Iu=!1}}function Du(){Ou()}function Ou(){Lu=Pu=!1;var e=0;0!==Nu&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==xd&&(xd=e,!0);return xd=null,!1}()&&(e=Nu);for(var t=se(),n=null,r=Ru;null!==r;){var a=r.next,o=Wu(r,t);0===o?(r.next=null,null===n?Ru=a:n.next=a,null===a&&(_u=n)):(n=r,(0!==e||0!==(3&o))&&(Lu=!0)),r=a}0!==Dc&&5!==Dc||Au(e,!1),0!==Nu&&(Nu=0)}function Wu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=-62914561&e.pendingLanes;0 title"):null)}function af(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var of=0;function lf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)cf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var sf=null;function cf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sf=new Map,t.forEach(uf,e),sf=null,lf.call(e))}function uf(e,t){if(!(4&t.state.loading)){var n=sf.get(e);if(n)var r=n.get(null);else{n=new Map,sf.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o>>1,a=e[r];if(!(0>>1;ro(s,n))co(u,s)?(e[r]=u,e[c]=n,r=c):(e[r]=s,e[i]=n,r=i);else{if(!(co(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var l=performance;t.unstable_now=function(){return l.now()}}else{var i=Date,s=i.now();t.unstable_now=function(){return i.now()-s}}var c=[],u=[],d=1,f=null,p=3,h=!1,g=!1,m=!1,y=!1,b="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,x="undefined"!==typeof setImmediate?setImmediate:null;function k(e){for(var t=r(u);null!==t;){if(null===t.callback)a(u);else{if(!(t.startTime<=e))break;a(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(m=!1,k(e),!g)if(null!==r(c))g=!0,j||(j=!0,S());else{var t=r(u);null!==t&&L(w,t.startTime-e)}}var S,j=!1,C=-1,z=5,E=-1;function T(){return!!y||!(t.unstable_now()-Ee&&T());){var l=f.callback;if("function"===typeof l){f.callback=null,p=f.priorityLevel;var i=l(f.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof i){f.callback=i,k(e),n=!0;break t}f===r(c)&&a(c),k(e)}else a(c);f=r(c)}if(null!==f)n=!0;else{var s=r(u);null!==s&&L(w,s.startTime-e),n=!1}}break e}finally{f=null,p=o,h=!1}n=void 0}}finally{n?S():j=!1}}}if("function"===typeof x)S=function(){x(R)};else if("undefined"!==typeof MessageChannel){var _=new MessageChannel,P=_.port2;_.port1.onmessage=R,S=function(){P.postMessage(null)}}else S=function(){b(R,0)};function L(e,n){C=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125l?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(m?(v(C),C=-1):m=!0,L(w,o-l))):(e.sortIndex=i,n(c,e),g||h||(g=!0,j||(j=!0,S()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},853(e,t,n){e.exports=n(896)}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.m=e,(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,a){if(1&a&&(r=this(r)),8&a)return r;if("object"===typeof r&&r){if(4&a&&r.__esModule)return r;if(16&a&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var l={};e=e||[null,t({}),t([]),t(t)];for(var i=2&a&&r;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(e=>l[e]=()=>r[e]);return l.default=()=>r,n.d(o,l),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>"static/js/"+e+".20359781.chunk.js",n.miniCssF=e=>{},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="frontend:";n.l=(r,a,o,l)=>{if(e[r])e[r].push(a);else{var i,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{i.onerror=i.onload=null,clearTimeout(p);var a=e[r];if(delete e[r],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(n)),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var o=new Promise((n,r)=>a=e[t]=[n,r]);r.push(a[2]=o);var l=n.p+n.u(t),i=new Error;n.l(l,r=>{if(n.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),l=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+o+": "+l+")",i.name="ChunkLoadError",i.type=o,i.request=l,a[1](i)}},"chunk-"+t,t)}};var t=(t,r)=>{var a,o,[l,i,s]=r,c=0;if(l.some(t=>0!==e[t])){for(a in i)n.o(i,a)&&(n.m[a]=i[a]);if(s)s(n)}for(t&&t(r);c0&&void 0!==arguments[0]?arguments[0]:{})}function x(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function k(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function w(e,t){return{usr:e.state,key:e.key,idx:t}}function S(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return d(d({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?C(t):t),{},{state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)})}function j(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function C(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function z(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,i="POP",s=null,c=u();function u(){return(l.state||{idx:null}).idx}function f(){i="POP";let e=u(),t=null==e?null:e-c;c=e,s&&s({action:i,location:h.location,delta:t})}function p(e){return E(e)}null==c&&(c=0,l.replaceState(d(d({},l.state),{},{idx:c}),""));let h={get action(){return i},get location(){return e(a,l)},listen(e){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(b,f),s=e,()=>{a.removeEventListener(b,f),s=null}},createHref:e=>t(a,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){i="PUSH";let r=S(h.location,e,t);n&&n(r,e),c=u()+1;let d=w(r,c),f=h.createHref(r);try{l.pushState(d,"",f)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;a.location.assign(f)}o&&s&&s({action:i,location:h.location,delta:1})},replace:function(e,t){i="REPLACE";let r=S(h.location,e,t);n&&n(r,e),c=u();let a=w(r,c),d=h.createHref(r);l.replaceState(a,"",d),o&&s&&s({action:i,location:h.location,delta:0})},go:e=>l.go(e)};return h}function E(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="http://localhost";"undefined"!==typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),x(n,"No window.location.(origin|href) available to create URL");let r="string"===typeof e?e:j(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}new WeakMap;function T(e,t){return R(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function R(e,t,n,r){let a=$(("string"===typeof t?C(t):t).pathname||"/",n);if(null==a)return null;let o=_(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let l=null;for(let i=0;null==l&&i1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function(e,o){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,i=arguments.length>3?arguments[3]:void 0,s={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&l)return;x(s.relativePath.startsWith(r),'Absolute route path "'.concat(s.relativePath,'" nested under path "').concat(r,'" is not valid. An absolute child route path must start with the combined path of all its parent routes.')),s.relativePath=s.relativePath.slice(r.length)}let c=J([r,s.relativePath]),u=n.concat(s);e.children&&e.children.length>0&&(x(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(c,'".')),_(e.children,t,u,c,l)),(null!=e.path||e.index)&&t.push({path:c,score:W(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!==(n=e.path)&&void 0!==n&&n.includes("?"))for(let r of P(e.path))o(e,t,!0,r);else o(e,t)}),t}function P(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let l=P(r.join("/")),i=[];return i.push(...l.map(e=>""===e?o:[o,e].join("/"))),a&&i.push(...l),i.map(t=>e.startsWith("/")&&""===t?"/":t)}var L=/^:[\w-]+$/,I=3,N=2,M=1,A=10,D=-2,O=e=>"*"===e;function W(e,t){let n=e.split("/"),r=n.length;return n.some(O)&&(r+=D),t&&(r+=N),n.filter(e=>!O(e)).reduce((e,t)=>e+(L.test(t)?I:""===t?M:A),r)}function F(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{routesMeta:r}=e,a={},o="/",l=[];for(let i=0;i{let{paramName:r,isOptional:a}=t;if("*"===r){let e=i[n]||"";l=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const s=i[n];return e[r]=a&&!s?void 0:(s||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:l,pattern:e}}function H(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];k("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function U(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return k(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}function $(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var V=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function q(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function Q(e,t,n,r){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(r),"]. Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.')}function Y(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function K(e){let t=Y(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function G(e,t,n){let r,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"===typeof e?r=C(e):(r=d({},e),x(!r.pathname||!r.pathname.includes("?"),Q("?","pathname","search",r)),x(!r.pathname||!r.pathname.includes("#"),Q("#","pathname","hash",r)),x(!r.search||!r.search.includes("#"),Q("#","search","hash",r)));let o,l=""===e||""===r.pathname,i=l?"/":r.pathname;if(null==i)o=n;else{let e=t.length-1;if(!a&&i.startsWith("..")){let t=i.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",{pathname:r,search:a="",hash:o=""}="string"===typeof e?C(e):e;return r?(r=r.replace(/\/\/+/g,"/"),t=r.startsWith("/")?q(r.substring(1),"/"):q(r,n)):t=n,{pathname:t,search:Z(a),hash:ee(o)}}(r,o),c=i&&"/"!==i&&i.endsWith("/"),u=(l||"."===i)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}var J=e=>e.join("/").replace(/\/\/+/g,"/"),X=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Z=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ee=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var te=class{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ne(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}function re(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ae="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function oe(e,t){let n=e;if("string"!==typeof n||!V.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(ae)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=$(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:a=!0}catch(o){k(!1,' contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}return{absoluteURL:r,isExternal:a,to:n}}Symbol("Uninstrumented");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var le=["POST","PUT","PATCH","DELETE"],ie=(new Set(le),["GET",...le]);new Set(ie),Symbol("ResetLoaderData");var se=r.createContext(null);se.displayName="DataRouter";var ce=r.createContext(null);ce.displayName="DataRouterState";var ue=r.createContext(!1);function de(){return r.useContext(ue)}var fe=r.createContext({isTransitioning:!1});fe.displayName="ViewTransition";var pe=r.createContext(new Map);pe.displayName="Fetchers";var he=r.createContext(null);he.displayName="Await";var ge=r.createContext(null);ge.displayName="Navigation";var me=r.createContext(null);me.displayName="Location";var ye=r.createContext({outlet:null,matches:[],isDataRoute:!1});ye.displayName="Route";var be=r.createContext(null);be.displayName="RouteError";var ve="REACT_ROUTER_ERROR";function xe(){return null!=r.useContext(me)}function ke(){return x(xe(),"useLocation() may be used only in the context of a component."),r.useContext(me).location}var we="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Se(e){r.useContext(ge).static||r.useLayoutEffect(e)}function je(){let{isDataRoute:e}=r.useContext(ye);return e?function(){let{router:e}=Ae("useNavigate"),t=Oe("useNavigate"),n=r.useRef(!1);Se(()=>{n.current=!0});let a=r.useCallback(async function(r){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k(n.current,we),n.current&&("number"===typeof r?await e.navigate(r):await e.navigate(r,d({fromRouteId:t},a)))},[e,t]);return a}():function(){x(xe(),"useNavigate() may be used only in the context of a component.");let e=r.useContext(se),{basename:t,navigator:n}=r.useContext(ge),{matches:a}=r.useContext(ye),{pathname:o}=ke(),l=JSON.stringify(K(a)),i=r.useRef(!1);Se(()=>{i.current=!0});let s=r.useCallback(function(r){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(k(i.current,we),!i.current)return;if("number"===typeof r)return void n.go(r);let s=G(r,JSON.parse(l),o,"path"===a.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:J([t,s.pathname])),(a.replace?n.replace:n.push)(s,a.state,a)},[t,n,l,o,e]);return s}()}r.createContext(null);function Ce(){let{matches:e}=r.useContext(ye),t=e[e.length-1];return t?t.params:{}}function ze(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{matches:n}=r.useContext(ye),{pathname:a}=ke(),o=JSON.stringify(K(n));return r.useMemo(()=>G(e,JSON.parse(o),a,"path"===t),[e,o,a,t])}function Ee(e,t,n,a,o){x(xe(),"useRoutes() may be used only in the context of a component.");let{navigator:l}=r.useContext(ge),{matches:i}=r.useContext(ye),s=i[i.length-1],c=s?s.params:{},u=s?s.pathname:"/",f=s?s.pathnameBase:"/",p=s&&s.route;{let e=p&&p.path||"";Be(u,!p||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant (or called `useRoutes()`) at "'.concat(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.\n\nPlease change the parent to .'))}let h,g=ke();if(t){var m;let e="string"===typeof t?C(t):t;x("/"===f||(null===(m=e.pathname)||void 0===m?void 0:m.startsWith(f)),'When overriding the location using `` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "'.concat(f,'" but pathname "').concat(e.pathname,'" was given in the `location` prop.')),h=e}else h=g;let y=h.pathname||"/",b=y;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=T(e,{pathname:b});k(p||null!=v,'No routes matched location "'.concat(h.pathname).concat(h.search).concat(h.hash,'" ')),k(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,'Matched leaf route at location "'.concat(h.pathname).concat(h.search).concat(h.hash,'" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.'));let w=Ne(v&&v.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:J([f,l.encodeLocation?l.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:J([f,l.encodeLocation?l.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),i,n,a,o);return t&&w?r.createElement(me.Provider,{value:{location:d({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:"POP"}},w):w}function Te(){let e=We(),t=ne(e)?"".concat(e.status," ").concat(e.statusText):e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=r.createElement(r.Fragment,null,r.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:l},"ErrorBoundary")," or"," ",r.createElement("code",{style:l},"errorElement")," prop on your route.")),r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:o},n):null,i)}var Re=r.createElement(Te,null),_e=class extends r.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||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?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&&"object"===typeof e&&e&&"digest"in e&&"string"===typeof e.digest){const t=function(e){if(e.startsWith("".concat(ve,":").concat("ROUTE_ERROR_RESPONSE",":{")))try{let t=JSON.parse(e.slice(40));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText)return new te(t.status,t.statusText,t.data)}catch(t){}}(e.digest);t&&(e=t)}let t=void 0!==e?r.createElement(ye.Provider,{value:this.props.routeContext},r.createElement(be.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?r.createElement(Le,{error:e},t):t}};_e.contextType=ue;var Pe=new WeakMap;function Le(e){let{children:t,error:n}=e,{basename:a}=r.useContext(ge);if("object"===typeof n&&n&&"digest"in n&&"string"===typeof n.digest){let e=function(e){if(e.startsWith("".concat(ve,":").concat("REDIRECT",":{")))try{let t=JSON.parse(e.slice(28));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText&&"string"===typeof t.location&&"boolean"===typeof t.reloadDocument&&"boolean"===typeof t.replace)return t}catch(t){}}(n.digest);if(e){let t=Pe.get(n);if(t)throw t;let o=oe(e.location,a);if(ae&&!Pe.get(n)){if(!o.isExternal&&!e.reloadDocument){const t=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace}));throw Pe.set(n,t),t}window.location.href=o.absoluteURL||o.to}return r.createElement("meta",{httpEquiv:"refresh",content:"0;url=".concat(o.absoluteURL||o.to)})}}return t}function Ie(e){let{routeContext:t,match:n,children:a}=e,o=r.useContext(se);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(ye.Provider,{value:t},a)}function Ne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let o=e,l=null===n||void 0===n?void 0:n.errors;if(null!=l){let e=o.findIndex(e=>e.route.id&&void 0!==(null===l||void 0===l?void 0:l[e.route.id]));x(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(l).join(","))),o=o.slice(0,Math.min(o.length,e+1))}let i=!1,s=-1;if(n)for(let r=0;r=0?o.slice(0,s+1):[o[0]];break}}}let c=n&&a?(e,t)=>{var r,o;a(e,{location:n.location,params:null!==(r=null===(o=n.matches)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.params)&&void 0!==r?r:{},unstable_pattern:re(n.matches),errorInfo:t})}:void 0;return o.reduceRight((e,a,u)=>{let d,f=!1,p=null,h=null;n&&(d=l&&a.route.id?l[a.route.id]:void 0,p=a.route.errorElement||Re,i&&(s<0&&0===u?(Be("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,h=null):s===u&&(f=!0,h=a.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,u+1)),m=()=>{let t;return t=d?p:f?h:a.route.Component?r.createElement(a.route.Component,null):a.route.element?a.route.element:e,r.createElement(Ie,{match:a,routeContext:{outlet:e,matches:g,isDataRoute:null!=n},children:t})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===u)?r.createElement(_e,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:c}):m()},null)}function Me(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}function Ae(e){let t=r.useContext(se);return x(t,Me(e)),t}function De(e){let t=r.useContext(ce);return x(t,Me(e)),t}function Oe(e){let t=function(e){let t=r.useContext(ye);return x(t,Me(e)),t}(e),n=t.matches[t.matches.length-1];return x(n.route.id,"".concat(e,' can only be used on routes that contain a unique "id"')),n.route.id}function We(){var e;let t=r.useContext(be),n=De("useRouteError"),a=Oe("useRouteError");return void 0!==t?t:null===(e=n.errors)||void 0===e?void 0:e[a]}var Fe={};function Be(e,t,n){t||Fe[e]||(Fe[e]=!0,k(!1,n))}var He={};function Ue(e,t){e||He[t]||(He[t]=!0,console.warn(t))}a.useOptimistic;r.memo(function(e){let{routes:t,future:n,state:r,onError:a}=e;return Ee(t,void 0,r,a,n)});function $e(e){x(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Ve(e){let{basename:t="/",children:n=null,location:a,navigationType:o="POP",navigator:l,static:i=!1,unstable_useTransitions:s}=e;x(!xe(),"You cannot render a inside another . You should never have more than one in your app.");let c=t.replace(/^\/*/,"/"),u=r.useMemo(()=>({basename:c,navigator:l,static:i,unstable_useTransitions:s,future:{}}),[c,l,i,s]);"string"===typeof a&&(a=C(a));let{pathname:d="/",search:f="",hash:p="",state:h=null,key:g="default"}=a,m=r.useMemo(()=>{let e=$(d,c);return null==e?null:{location:{pathname:e,search:f,hash:p,state:h,key:g},navigationType:o}},[c,d,f,p,h,g,o]);return k(null!=m,' is not able to match the URL "').concat(d).concat(f).concat(p,"\" because it does not start with the basename, so the won't render anything.")),null==m?null:r.createElement(ge.Provider,{value:u},r.createElement(me.Provider,{children:n,value:m}))}function qe(e){let{children:t,location:n}=e;return Ee(Qe(t),n)}r.Component;function Qe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return r.Children.forEach(e,(e,a)=>{if(!r.isValidElement(e))return;let o=[...t,a];if(e.type===r.Fragment)return void n.push.apply(n,Qe(e.props.children,o));x(e.type===$e,"[".concat("string"===typeof e.type?e.type:e.type.name,"] is not a component. All component children of must be a or ")),x(!e.props.index||!e.props.children,"An index route cannot have child routes.");let l={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(l.children=Qe(e.props.children,o)),n.push(l)}),n}var Ye="get",Ke="application/x-www-form-urlencoded";function Ge(e){return"undefined"!==typeof HTMLElement&&e instanceof HTMLElement}var Je=null;var Xe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ze(e){return null==e||Xe.has(e)?e:(k(!1,'"'.concat(e,'" is not a valid `encType` for `
`/`` and will default to "').concat(Ke,'"')),null)}function et(e,t){let n,r,a,o,l;if(Ge(i=e)&&"form"===i.tagName.toLowerCase()){let l=e.getAttribute("action");r=l?$(l,t):null,n=e.getAttribute("method")||Ye,a=Ze(e.getAttribute("enctype"))||Ke,o=new FormData(e)}else if(function(e){return Ge(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Ge(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let l=e.form;if(null==l)throw new Error('Cannot submit a