@agent-plan/pi-adapter 0.2.12 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,191 @@
1
+ function gy(n,r){for(var s=0;s<r.length;s++){const o=r[s];if(typeof o!="string"&&!Array.isArray(o)){for(const f in o)if(f!=="default"&&!(f in n)){const d=Object.getOwnPropertyDescriptor(o,f);d&&Object.defineProperty(n,f,d.get?d:{enumerable:!0,get:()=>o[f]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();function yy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Vo={exports:{}},ji={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Sv;function by(){if(Sv)return ji;Sv=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,f,d){var h=null;if(d!==void 0&&(h=""+d),f.key!==void 0&&(h=""+f.key),"key"in f){d={};for(var x in f)x!=="key"&&(d[x]=f[x])}else d=f;return f=d.ref,{$$typeof:n,type:o,key:h,ref:f!==void 0?f:null,props:d}}return ji.Fragment=r,ji.jsx=s,ji.jsxs=s,ji}var jv;function Sy(){return jv||(jv=1,Vo.exports=by()),Vo.exports}var c=Sy(),Xo={exports:{}},Ee={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Nv;function jy(){if(Nv)return Ee;Nv=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),j=Symbol.iterator;function N(R){return R===null||typeof R!="object"?null:(R=j&&R[j]||R["@@iterator"],typeof R=="function"?R:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,k={};function Z(R,q,K){this.props=R,this.context=q,this.refs=k,this.updater=K||z}Z.prototype.isReactComponent={},Z.prototype.setState=function(R,q){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,q,"setState")},Z.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function J(){}J.prototype=Z.prototype;function W(R,q,K){this.props=R,this.context=q,this.refs=k,this.updater=K||z}var ee=W.prototype=new J;ee.constructor=W,B(ee,Z.prototype),ee.isPureReactComponent=!0;var ie=Array.isArray;function se(){}var le={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function Re(R,q,K){var F=K.ref;return{$$typeof:n,type:R,key:q,ref:F!==void 0?F:null,props:K}}function xe(R,q){return Re(R.type,q,R.props)}function Ke(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function ve(R){var q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(K){return q[K]})}var st=/\/+/g;function Te(R,q){return typeof R=="object"&&R!==null&&R.key!=null?ve(""+R.key):q.toString(36)}function ke(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(se,se):(R.status="pending",R.then(function(q){R.status==="pending"&&(R.status="fulfilled",R.value=q)},function(q){R.status==="pending"&&(R.status="rejected",R.reason=q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function H(R,q,K,F,he){var fe=typeof R;(fe==="undefined"||fe==="boolean")&&(R=null);var Se=!1;if(R===null)Se=!0;else switch(fe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(R.$$typeof){case n:case r:Se=!0;break;case b:return Se=R._init,H(Se(R._payload),q,K,F,he)}}if(Se)return he=he(R),Se=F===""?"."+Te(R,0):F,ie(he)?(K="",Se!=null&&(K=Se.replace(st,"$&/")+"/"),H(he,q,K,"",function(nl){return nl})):he!=null&&(Ke(he)&&(he=xe(he,K+(he.key==null||R&&R.key===he.key?"":(""+he.key).replace(st,"$&/")+"/")+Se)),q.push(he)),1;Se=0;var We=F===""?".":F+":";if(ie(R))for(var Qe=0;Qe<R.length;Qe++)F=R[Qe],fe=We+Te(F,Qe),Se+=H(F,q,K,fe,he);else if(Qe=N(R),typeof Qe=="function")for(R=Qe.call(R),Qe=0;!(F=R.next()).done;)F=F.value,fe=We+Te(F,Qe++),Se+=H(F,q,K,fe,he);else if(fe==="object"){if(typeof R.then=="function")return H(ke(R),q,K,F,he);throw q=String(R),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Se}function X(R,q,K){if(R==null)return R;var F=[],he=0;return H(R,F,"","",function(fe){return q.call(K,fe,he++)}),F}function te(R){if(R._status===-1){var q=R._result;q=q(),q.then(function(K){(R._status===0||R._status===-1)&&(R._status=1,R._result=K)},function(K){(R._status===0||R._status===-1)&&(R._status=2,R._result=K)}),R._status===-1&&(R._status=0,R._result=q)}if(R._status===1)return R._result.default;throw R._result}var me=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},be={map:X,forEach:function(R,q,K){X(R,function(){q.apply(this,arguments)},K)},count:function(R){var q=0;return X(R,function(){q++}),q},toArray:function(R){return X(R,function(q){return q})||[]},only:function(R){if(!Ke(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Ee.Activity=y,Ee.Children=be,Ee.Component=Z,Ee.Fragment=s,Ee.Profiler=f,Ee.PureComponent=W,Ee.StrictMode=o,Ee.Suspense=v,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=le,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(R){return le.H.useMemoCache(R)}},Ee.cache=function(R){return function(){return R.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(R,q,K){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var F=B({},R.props),he=R.key;if(q!=null)for(fe in q.key!==void 0&&(he=""+q.key),q)!M.call(q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&q.ref===void 0||(F[fe]=q[fe]);var fe=arguments.length-2;if(fe===1)F.children=K;else if(1<fe){for(var Se=Array(fe),We=0;We<fe;We++)Se[We]=arguments[We+2];F.children=Se}return Re(R.type,he,F)},Ee.createContext=function(R){return R={$$typeof:h,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:d,_context:R},R},Ee.createElement=function(R,q,K){var F,he={},fe=null;if(q!=null)for(F in q.key!==void 0&&(fe=""+q.key),q)M.call(q,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(he[F]=q[F]);var Se=arguments.length-2;if(Se===1)he.children=K;else if(1<Se){for(var We=Array(Se),Qe=0;Qe<Se;Qe++)We[Qe]=arguments[Qe+2];he.children=We}if(R&&R.defaultProps)for(F in Se=R.defaultProps,Se)he[F]===void 0&&(he[F]=Se[F]);return Re(R,fe,he)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(R){return{$$typeof:x,render:R}},Ee.isValidElement=Ke,Ee.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:te}},Ee.memo=function(R,q){return{$$typeof:p,type:R,compare:q===void 0?null:q}},Ee.startTransition=function(R){var q=le.T,K={};le.T=K;try{var F=R(),he=le.S;he!==null&&he(K,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(se,me)}catch(fe){me(fe)}finally{q!==null&&K.types!==null&&(q.types=K.types),le.T=q}},Ee.unstable_useCacheRefresh=function(){return le.H.useCacheRefresh()},Ee.use=function(R){return le.H.use(R)},Ee.useActionState=function(R,q,K){return le.H.useActionState(R,q,K)},Ee.useCallback=function(R,q){return le.H.useCallback(R,q)},Ee.useContext=function(R){return le.H.useContext(R)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(R,q){return le.H.useDeferredValue(R,q)},Ee.useEffect=function(R,q){return le.H.useEffect(R,q)},Ee.useEffectEvent=function(R){return le.H.useEffectEvent(R)},Ee.useId=function(){return le.H.useId()},Ee.useImperativeHandle=function(R,q,K){return le.H.useImperativeHandle(R,q,K)},Ee.useInsertionEffect=function(R,q){return le.H.useInsertionEffect(R,q)},Ee.useLayoutEffect=function(R,q){return le.H.useLayoutEffect(R,q)},Ee.useMemo=function(R,q){return le.H.useMemo(R,q)},Ee.useOptimistic=function(R,q){return le.H.useOptimistic(R,q)},Ee.useReducer=function(R,q,K){return le.H.useReducer(R,q,K)},Ee.useRef=function(R){return le.H.useRef(R)},Ee.useState=function(R){return le.H.useState(R)},Ee.useSyncExternalStore=function(R,q,K){return le.H.useSyncExternalStore(R,q,K)},Ee.useTransition=function(){return le.H.useTransition()},Ee.version="19.2.7",Ee}var Ev;function hf(){return Ev||(Ev=1,Xo.exports=jy()),Xo.exports}var S=hf();const Ny=yy(S),Ey=gy({__proto__:null,default:Ny},[S]);var Qo={exports:{}},Ni={},Zo={exports:{}},Ko={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var wv;function wy(){return wv||(wv=1,(function(n){function r(H,X){var te=H.length;H.push(X);e:for(;0<te;){var me=te-1>>>1,be=H[me];if(0<f(be,X))H[me]=X,H[te]=be,te=me;else break e}}function s(H){return H.length===0?null:H[0]}function o(H){if(H.length===0)return null;var X=H[0],te=H.pop();if(te!==X){H[0]=te;e:for(var me=0,be=H.length,R=be>>>1;me<R;){var q=2*(me+1)-1,K=H[q],F=q+1,he=H[F];if(0>f(K,te))F<be&&0>f(he,K)?(H[me]=he,H[F]=te,me=F):(H[me]=K,H[q]=te,me=q);else if(F<be&&0>f(he,te))H[me]=he,H[F]=te,me=F;else break e}}return X}function f(H,X){var te=H.sortIndex-X.sortIndex;return te!==0?te:H.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,x=h.now();n.unstable_now=function(){return h.now()-x}}var v=[],p=[],b=1,y=null,j=3,N=!1,z=!1,B=!1,k=!1,Z=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function ee(H){for(var X=s(p);X!==null;){if(X.callback===null)o(p);else if(X.startTime<=H)o(p),X.sortIndex=X.expirationTime,r(v,X);else break;X=s(p)}}function ie(H){if(B=!1,ee(H),!z)if(s(v)!==null)z=!0,se||(se=!0,ve());else{var X=s(p);X!==null&&ke(ie,X.startTime-H)}}var se=!1,le=-1,M=5,Re=-1;function xe(){return k?!0:!(n.unstable_now()-Re<M)}function Ke(){if(k=!1,se){var H=n.unstable_now();Re=H;var X=!0;try{e:{z=!1,B&&(B=!1,J(le),le=-1),N=!0;var te=j;try{t:{for(ee(H),y=s(v);y!==null&&!(y.expirationTime>H&&xe());){var me=y.callback;if(typeof me=="function"){y.callback=null,j=y.priorityLevel;var be=me(y.expirationTime<=H);if(H=n.unstable_now(),typeof be=="function"){y.callback=be,ee(H),X=!0;break t}y===s(v)&&o(v),ee(H)}else o(v);y=s(v)}if(y!==null)X=!0;else{var R=s(p);R!==null&&ke(ie,R.startTime-H),X=!1}}break e}finally{y=null,j=te,N=!1}X=void 0}}finally{X?ve():se=!1}}}var ve;if(typeof W=="function")ve=function(){W(Ke)};else if(typeof MessageChannel<"u"){var st=new MessageChannel,Te=st.port2;st.port1.onmessage=Ke,ve=function(){Te.postMessage(null)}}else ve=function(){Z(Ke,0)};function ke(H,X){le=Z(function(){H(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return j},n.unstable_next=function(H){switch(j){case 1:case 2:case 3:var X=3;break;default:X=j}var te=j;j=X;try{return H()}finally{j=te}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function(H,X){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var te=j;j=H;try{return X()}finally{j=te}},n.unstable_scheduleCallback=function(H,X,te){var me=n.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?me+te:me):te=me,H){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=te+be,H={id:b++,callback:X,priorityLevel:H,startTime:te,expirationTime:be,sortIndex:-1},te>me?(H.sortIndex=te,r(p,H),s(v)===null&&H===s(p)&&(B?(J(le),le=-1):B=!0,ke(ie,te-me))):(H.sortIndex=be,r(v,H),z||N||(z=!0,se||(se=!0,ve()))),H},n.unstable_shouldYield=xe,n.unstable_wrapCallback=function(H){var X=j;return function(){var te=j;j=X;try{return H.apply(this,arguments)}finally{j=te}}}})(Ko)),Ko}var Rv;function Ry(){return Rv||(Rv=1,Zo.exports=wy()),Zo.exports}var Jo={exports:{}},Yt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Tv;function Ty(){if(Tv)return Yt;Tv=1;var n=hf();function r(v){var p="https://react.dev/errors/"+v;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+v+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(v,p,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:y==null?null:""+y,children:v,containerInfo:p,implementation:b}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(v,p){if(v==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Yt.createPortal=function(v,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return d(v,p,null,b)},Yt.flushSync=function(v){var p=h.T,b=o.p;try{if(h.T=null,o.p=2,v)return v()}finally{h.T=p,o.p=b,o.d.f()}},Yt.preconnect=function(v,p){typeof v=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(v,p))},Yt.prefetchDNS=function(v){typeof v=="string"&&o.d.D(v)},Yt.preinit=function(v,p){if(typeof v=="string"&&p&&typeof p.as=="string"){var b=p.as,y=x(b,p.crossOrigin),j=typeof p.integrity=="string"?p.integrity:void 0,N=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?o.d.S(v,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:j,fetchPriority:N}):b==="script"&&o.d.X(v,{crossOrigin:y,integrity:j,fetchPriority:N,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Yt.preinitModule=function(v,p){if(typeof v=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=x(p.as,p.crossOrigin);o.d.M(v,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(v)},Yt.preload=function(v,p){if(typeof v=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,y=x(b,p.crossOrigin);o.d.L(v,b,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Yt.preloadModule=function(v,p){if(typeof v=="string")if(p){var b=x(p.as,p.crossOrigin);o.d.m(v,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(v)},Yt.requestFormReset=function(v){o.d.r(v)},Yt.unstable_batchedUpdates=function(v,p){return v(p)},Yt.useFormState=function(v,p,b){return h.H.useFormState(v,p,b)},Yt.useFormStatus=function(){return h.H.useHostTransitionStatus()},Yt.version="19.2.7",Yt}var Dv;function mp(){if(Dv)return Jo.exports;Dv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Jo.exports=Ty(),Jo.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Cv;function Dy(){if(Cv)return Ni;Cv=1;var n=Ry(),r=hf(),s=mp();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(d(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,l=t;;){var i=a.return;if(i===null)break;var u=i.alternate;if(u===null){if(l=i.return,l!==null){a=l;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===a)return v(i),e;if(u===l)return v(i),t;u=u.sibling}throw Error(o(188))}if(a.return!==l.return)a=i,l=u;else{for(var m=!1,g=i.child;g;){if(g===a){m=!0,a=i,l=u;break}if(g===l){m=!0,l=i,a=u;break}g=g.sibling}if(!m){for(g=u.child;g;){if(g===a){m=!0,a=u,l=i;break}if(g===l){m=!0,l=u,a=i;break}g=g.sibling}if(!m)throw Error(o(189))}}if(a.alternate!==l)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,j=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),W=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),Re=Symbol.for("react.activity"),xe=Symbol.for("react.memo_cache_sentinel"),Ke=Symbol.iterator;function ve(e){return e===null||typeof e!="object"?null:(e=Ke&&e[Ke]||e["@@iterator"],typeof e=="function"?e:null)}var st=Symbol.for("react.client.reference");function Te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===st?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case Z:return"Profiler";case k:return"StrictMode";case ie:return"Suspense";case se:return"SuspenseList";case Re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case W:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case le:return t=e.displayName||null,t!==null?t:Te(e.type)||"Memo";case M:t=e._payload,e=e._init;try{return Te(e(t))}catch{}}return null}var ke=Array.isArray,H=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},me=[],be=-1;function R(e){return{current:e}}function q(e){0>be||(e.current=me[be],me[be]=null,be--)}function K(e,t){be++,me[be]=e.current,e.current=t}var F=R(null),he=R(null),fe=R(null),Se=R(null);function We(e,t){switch(K(fe,t),K(he,e),K(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vh(t),e=Xh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(F),K(F,e)}function Qe(){q(F),q(he),q(fe)}function nl(e){e.memoizedState!==null&&K(Se,e);var t=F.current,a=Xh(t,e.type);t!==a&&(K(he,e),K(F,a))}function Cl(e){he.current===e&&(q(F),q(he)),Se.current===e&&(q(Se),gi._currentValue=te)}var kn,Nt;function Xt(e){if(kn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);kn=t&&t[1]||"",Nt=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+kn+e+Nt}var cn=!1;function ae(e,t){if(!e||cn)return"";cn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(L){var U=L}Reflect.construct(e,[],G)}else{try{G.call()}catch(L){U=L}e.call(G.prototype)}}else{try{throw Error()}catch(L){U=L}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(L){if(L&&U&&typeof L.stack=="string")return[L.stack,U.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),m=u[0],g=u[1];if(m&&g){var E=m.split(`
44
+ `),O=g.split(`
45
+ `);for(i=l=0;l<E.length&&!E[l].includes("DetermineComponentFrameRoot");)l++;for(;i<O.length&&!O[i].includes("DetermineComponentFrameRoot");)i++;if(l===E.length||i===O.length)for(l=E.length-1,i=O.length-1;1<=l&&0<=i&&E[l]!==O[i];)i--;for(;1<=l&&0<=i;l--,i--)if(E[l]!==O[i]){if(l!==1||i!==1)do if(l--,i--,0>i||E[l]!==O[i]){var $=`
46
+ `+E[l].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=l&&0<=i);break}}}finally{cn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Xt(a):""}function je(e,t){switch(e.tag){case 26:case 27:case 5:return Xt(e.type);case 16:return Xt("Lazy");case 13:return e.child!==t&&t!==null?Xt("Suspense Fallback"):Xt("Suspense");case 19:return Xt("SuspenseList");case 0:case 15:return ae(e.type,!1);case 11:return ae(e.type.render,!1);case 1:return ae(e.type,!0);case 31:return Xt("Activity");default:return""}}function Ae(e){try{var t="",a=null;do t+=je(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var tt=Object.prototype.hasOwnProperty,ut=n.unstable_scheduleCallback,Qt=n.unstable_cancelCallback,ka=n.unstable_shouldYield,rl=n.unstable_requestPaint,dt=n.unstable_now,ea=n.unstable_getCurrentPriorityLevel,Ua=n.unstable_ImmediatePriority,Zt=n.unstable_UserBlockingPriority,kt=n.unstable_NormalPriority,Dt=n.unstable_LowPriority,ya=n.unstable_IdlePriority,Ou=n.log,ku=n.unstable_setDisableYieldValue,il=null,Kt=null;function Mt(e){if(typeof Ou=="function"&&ku(e),Kt&&typeof Kt.setStrictMode=="function")try{Kt.setStrictMode(il,e)}catch{}}var $t=Math.clz32?Math.clz32:Uu,Ji=Math.log,Fi=Math.LN2;function Uu(e){return e>>>=0,e===0?32:31-(Ji(e)/Fi|0)|0}var on=256,sl=262144,fn=4194304;function La(e){var t=e&42;if(t!==0)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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Un(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var i=0,u=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var g=l&134217727;return g!==0?(l=g&~u,l!==0?i=La(l):(m&=g,m!==0?i=La(m):a||(a=g&~e,a!==0&&(i=La(a))))):(g=l&~u,g!==0?i=La(g):m!==0?i=La(m):a||(a=l&~e,a!==0&&(i=La(a)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:i}function Ml(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Lu(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;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function _r(){var e=fn;return fn<<=1,(fn&62914560)===0&&(fn=4194304),e}function zl(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Qa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wi(e,t,a,l,i,u){var m=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var g=e.entanglements,E=e.expirationTimes,O=e.hiddenUpdates;for(a=m&~a;0<a;){var $=31-$t(a),G=1<<$;g[$]=0,E[$]=-1;var U=O[$];if(U!==null)for(O[$]=null,$=0;$<U.length;$++){var L=U[$];L!==null&&(L.lane&=-536870913)}a&=~G}l!==0&&Ii(e,l,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(m&~t))}function Ii(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-$t(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Pi(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-$t(a),i=1<<l;i&t|e[l]&t&&(e[l]|=t),a&=~i}}function w(e,t){var a=t&-t;return a=(a&42)!==0?1:D(a),(a&(e.suspendedLanes|t))!==0?0:a}function D(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function A(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function V(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:hv(e.type))}function Q(e,t){var a=X.p;try{return X.p=e,t()}finally{X.p=a}}var ne=Math.random().toString(36).slice(2),P="__reactFiber$"+ne,oe="__reactProps$"+ne,I="__reactContainer$"+ne,ce="__reactEvents$"+ne,ye="__reactListeners$"+ne,De="__reactHandles$"+ne,de="__reactResources$"+ne,ze="__reactMarker$"+ne;function Ge(e){delete e[P],delete e[oe],delete e[ce],delete e[ye],delete e[De]}function ct(e){var t=e[P];if(t)return t;for(var a=e.parentNode;a;){if(t=a[I]||a[P]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Ih(e);e!==null;){if(a=e[P])return a;e=Ih(e)}return t}e=a,a=e.parentNode}return null}function Je(e){if(e=e[P]||e[I]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function qe(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function xt(e){var t=e[de];return t||(t=e[de]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function $e(e){e[ze]=!0}var Al=new Set,Ha={};function ta(e,t){Jt(e,t),Jt(e+"Capture",t)}function Jt(e,t){for(Ha[e]=t,e=0;e<t.length;e++)Al.add(t[e])}var ba=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ln={},Ba={};function Hn(e){return tt.call(Ba,e)?!0:tt.call(Ln,e)?!1:ba.test(e)?Ba[e]=!0:(Ln[e]=!0,!1)}function ul(e,t,a){if(Hn(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function cl(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Ne(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function rt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ua(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qa(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var i=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(m){a=""+m,u.call(this,m)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(m){a=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bn(e){if(!e._valueTracker){var t=ua(e)?"checked":"value";e._valueTracker=qa(e,t,""+e[t])}}function qn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=ua(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Ie(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ol=/[\n"\\]/g;function Ft(e){return e.replace(ol,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Or(e,t,a,l,i,u,m,g){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+rt(t)):e.value!==""+rt(t)&&(e.value=""+rt(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?Hu(e,m,rt(t)):a!=null?Hu(e,m,rt(a)):l!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+rt(g):e.removeAttribute("name")}function Hf(e,t,a,l,i,u,m,g){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Bn(e);return}a=a!=null?""+rt(a):"",t=t!=null?""+rt(t):a,g||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=g?e.checked:!!l,e.defaultChecked=!!l,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),Bn(e)}function Hu(e,t,a){t==="number"&&Ie(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function $n(e,t,a,l){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&l&&(e[a].defaultSelected=!0)}else{for(a=""+rt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Bf(e,t,a){if(t!=null&&(t=""+rt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+rt(a):""}function qf(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(o(92));if(ke(l)){if(1<l.length)throw Error(o(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=rt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Bn(e)}function Yn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var mx=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $f(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||mx.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Yf(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var i in t)l=t[i],t.hasOwnProperty(i)&&a[i]!==l&&$f(e,i,l)}else for(var u in t)t.hasOwnProperty(u)&&$f(e,u,t[u])}function Bu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hx=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),vx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function es(e){return vx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function fl(){}var qu=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gn=null,Vn=null;function Gf(e){var t=Je(e);if(t&&(e=t.stateNode)){var a=e[oe]||null;e:switch(e=t.stateNode,t.type){case"input":if(Or(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ft(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var i=l[oe]||null;if(!i)throw Error(o(90));Or(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&qn(l)}break e;case"textarea":Bf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&$n(e,!!a.multiple,t,!1)}}}var Yu=!1;function Vf(e,t,a){if(Yu)return e(t,a);Yu=!0;try{var l=e(t);return l}finally{if(Yu=!1,(Gn!==null||Vn!==null)&&($s(),Gn&&(t=Gn,e=Vn,Vn=Gn=null,Gf(t),e)))for(t=0;t<e.length;t++)Gf(e[t])}}function kr(e,t){var a=e.stateNode;if(a===null)return null;var l=a[oe]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var dl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gu=!1;if(dl)try{var Ur={};Object.defineProperty(Ur,"passive",{get:function(){Gu=!0}}),window.addEventListener("test",Ur,Ur),window.removeEventListener("test",Ur,Ur)}catch{Gu=!1}var _l=null,Vu=null,ts=null;function Xf(){if(ts)return ts;var e,t=Vu,a=t.length,l,i="value"in _l?_l.value:_l.textContent,u=i.length;for(e=0;e<a&&t[e]===i[e];e++);var m=a-e;for(l=1;l<=m&&t[a-l]===i[u-l];l++);return ts=i.slice(e,1<l?1-l:void 0)}function as(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ls(){return!0}function Qf(){return!1}function aa(e){function t(a,l,i,u,m){this._reactName=a,this._targetInst=i,this.type=l,this.nativeEvent=u,this.target=m,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(a=e[g],this[g]=a?a(u):u[g]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ls:Qf,this.isPropagationStopped=Qf,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ls)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ls)},persist:function(){},isPersistent:ls}),t}var dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ns=aa(dn),Lr=y({},dn,{view:0,detail:0}),px=aa(Lr),Xu,Qu,Hr,rs=y({},Lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ku,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hr&&(Hr&&e.type==="mousemove"?(Xu=e.screenX-Hr.screenX,Qu=e.screenY-Hr.screenY):Qu=Xu=0,Hr=e),Xu)},movementY:function(e){return"movementY"in e?e.movementY:Qu}}),Zf=aa(rs),xx=y({},rs,{dataTransfer:0}),gx=aa(xx),yx=y({},Lr,{relatedTarget:0}),Zu=aa(yx),bx=y({},dn,{animationName:0,elapsedTime:0,pseudoElement:0}),Sx=aa(bx),jx=y({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Nx=aa(jx),Ex=y({},dn,{data:0}),Kf=aa(Ex),wx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rx={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Tx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Tx[e])?!!t[e]:!1}function Ku(){return Dx}var Cx=y({},Lr,{key:function(e){if(e.key){var t=wx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=as(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Rx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ku,charCode:function(e){return e.type==="keypress"?as(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?as(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mx=aa(Cx),zx=y({},rs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jf=aa(zx),Ax=y({},Lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ku}),_x=aa(Ax),Ox=y({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0}),kx=aa(Ox),Ux=y({},rs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Lx=aa(Ux),Hx=y({},dn,{newState:0,oldState:0}),Bx=aa(Hx),qx=[9,13,27,32],Ju=dl&&"CompositionEvent"in window,Br=null;dl&&"documentMode"in document&&(Br=document.documentMode);var $x=dl&&"TextEvent"in window&&!Br,Ff=dl&&(!Ju||Br&&8<Br&&11>=Br),Wf=" ",If=!1;function Pf(e,t){switch(e){case"keyup":return qx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ed(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function Yx(e,t){switch(e){case"compositionend":return ed(t);case"keypress":return t.which!==32?null:(If=!0,Wf);case"textInput":return e=t.data,e===Wf&&If?null:e;default:return null}}function Gx(e,t){if(Xn)return e==="compositionend"||!Ju&&Pf(e,t)?(e=Xf(),ts=Vu=_l=null,Xn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ff&&t.locale!=="ko"?null:t.data;default:return null}}var Vx={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 td(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Vx[e.type]:t==="textarea"}function ad(e,t,a,l){Gn?Vn?Vn.push(l):Vn=[l]:Gn=l,t=Ks(t,"onChange"),0<t.length&&(a=new ns("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var qr=null,$r=null;function Xx(e){Hh(e,0)}function is(e){var t=qe(e);if(qn(t))return e}function ld(e,t){if(e==="change")return t}var nd=!1;if(dl){var Fu;if(dl){var Wu="oninput"in document;if(!Wu){var rd=document.createElement("div");rd.setAttribute("oninput","return;"),Wu=typeof rd.oninput=="function"}Fu=Wu}else Fu=!1;nd=Fu&&(!document.documentMode||9<document.documentMode)}function id(){qr&&(qr.detachEvent("onpropertychange",sd),$r=qr=null)}function sd(e){if(e.propertyName==="value"&&is($r)){var t=[];ad(t,$r,e,$u(e)),Vf(Xx,t)}}function Qx(e,t,a){e==="focusin"?(id(),qr=t,$r=a,qr.attachEvent("onpropertychange",sd)):e==="focusout"&&id()}function Zx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return is($r)}function Kx(e,t){if(e==="click")return is(t)}function Jx(e,t){if(e==="input"||e==="change")return is(t)}function Fx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ca=typeof Object.is=="function"?Object.is:Fx;function Yr(e,t){if(ca(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var i=a[l];if(!tt.call(t,i)||!ca(e[i],t[i]))return!1}return!0}function ud(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cd(e,t){var a=ud(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=ud(a)}}function od(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?od(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ie(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Ie(e.document)}return t}function Iu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Wx=dl&&"documentMode"in document&&11>=document.documentMode,Qn=null,Pu=null,Gr=null,ec=!1;function dd(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ec||Qn==null||Qn!==Ie(l)||(l=Qn,"selectionStart"in l&&Iu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Gr&&Yr(Gr,l)||(Gr=l,l=Ks(Pu,"onSelect"),0<l.length&&(t=new ns("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Qn)))}function mn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Zn={animationend:mn("Animation","AnimationEnd"),animationiteration:mn("Animation","AnimationIteration"),animationstart:mn("Animation","AnimationStart"),transitionrun:mn("Transition","TransitionRun"),transitionstart:mn("Transition","TransitionStart"),transitioncancel:mn("Transition","TransitionCancel"),transitionend:mn("Transition","TransitionEnd")},tc={},md={};dl&&(md=document.createElement("div").style,"AnimationEvent"in window||(delete Zn.animationend.animation,delete Zn.animationiteration.animation,delete Zn.animationstart.animation),"TransitionEvent"in window||delete Zn.transitionend.transition);function hn(e){if(tc[e])return tc[e];if(!Zn[e])return e;var t=Zn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in md)return tc[e]=t[a];return e}var hd=hn("animationend"),vd=hn("animationiteration"),pd=hn("animationstart"),Ix=hn("transitionrun"),Px=hn("transitionstart"),eg=hn("transitioncancel"),xd=hn("transitionend"),gd=new Map,ac="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(" ");ac.push("scrollEnd");function $a(e,t){gd.set(e,t),ta(t,[e])}var ss=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Sa=[],Kn=0,lc=0;function us(){for(var e=Kn,t=lc=Kn=0;t<e;){var a=Sa[t];Sa[t++]=null;var l=Sa[t];Sa[t++]=null;var i=Sa[t];Sa[t++]=null;var u=Sa[t];if(Sa[t++]=null,l!==null&&i!==null){var m=l.pending;m===null?i.next=i:(i.next=m.next,m.next=i),l.pending=i}u!==0&&yd(a,i,u)}}function cs(e,t,a,l){Sa[Kn++]=e,Sa[Kn++]=t,Sa[Kn++]=a,Sa[Kn++]=l,lc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function nc(e,t,a,l){return cs(e,t,a,l),os(e)}function vn(e,t){return cs(e,null,null,t),os(e)}function yd(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var i=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-$t(a),e=u.hiddenUpdates,l=e[i],l===null?e[i]=[t]:l.push(t),t.lane=a|536870912),u):null}function os(e){if(50<fi)throw fi=0,ho=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Jn={};function tg(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oa(e,t,a,l){return new tg(e,t,a,l)}function rc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ml(e,t){var a=e.alternate;return a===null?(a=oa(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function bd(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fs(e,t,a,l,i,u){var m=0;if(l=e,typeof e=="function")rc(e)&&(m=1);else if(typeof e=="string")m=iy(e,a,F.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Re:return e=oa(31,a,t,i),e.elementType=Re,e.lanes=u,e;case B:return pn(a.children,i,u,t);case k:m=8,i|=24;break;case Z:return e=oa(12,a,t,i|2),e.elementType=Z,e.lanes=u,e;case ie:return e=oa(13,a,t,i),e.elementType=ie,e.lanes=u,e;case se:return e=oa(19,a,t,i),e.elementType=se,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:m=10;break e;case J:m=9;break e;case ee:m=11;break e;case le:m=14;break e;case M:m=16,l=null;break e}m=29,a=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=oa(m,a,t,i),t.elementType=e,t.type=l,t.lanes=u,t}function pn(e,t,a,l){return e=oa(7,e,l,t),e.lanes=a,e}function ic(e,t,a){return e=oa(6,e,null,t),e.lanes=a,e}function Sd(e){var t=oa(18,null,null,0);return t.stateNode=e,t}function sc(e,t,a){return t=oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var jd=new WeakMap;function ja(e,t){if(typeof e=="object"&&e!==null){var a=jd.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ae(t)},jd.set(e,t),t)}return{value:e,source:t,stack:Ae(t)}}var Fn=[],Wn=0,ds=null,Vr=0,Na=[],Ea=0,Ol=null,Za=1,Ka="";function hl(e,t){Fn[Wn++]=Vr,Fn[Wn++]=ds,ds=e,Vr=t}function Nd(e,t,a){Na[Ea++]=Za,Na[Ea++]=Ka,Na[Ea++]=Ol,Ol=e;var l=Za;e=Ka;var i=32-$t(l)-1;l&=~(1<<i),a+=1;var u=32-$t(t)+i;if(30<u){var m=i-i%5;u=(l&(1<<m)-1).toString(32),l>>=m,i-=m,Za=1<<32-$t(t)+i|a<<i|l,Ka=u+e}else Za=1<<u|a<<i|l,Ka=e}function uc(e){e.return!==null&&(hl(e,1),Nd(e,1,0))}function cc(e){for(;e===ds;)ds=Fn[--Wn],Fn[Wn]=null,Vr=Fn[--Wn],Fn[Wn]=null;for(;e===Ol;)Ol=Na[--Ea],Na[Ea]=null,Ka=Na[--Ea],Na[Ea]=null,Za=Na[--Ea],Na[Ea]=null}function Ed(e,t){Na[Ea++]=Za,Na[Ea++]=Ka,Na[Ea++]=Ol,Za=t.id,Ka=t.overflow,Ol=e}var Ut=null,ot=null,Be=!1,kl=null,wa=!1,oc=Error(o(519));function Ul(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xr(ja(t,e)),oc}function wd(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[P]=e,t[oe]=l,a){case"dialog":Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":case"embed":Oe("load",t);break;case"video":case"audio":for(a=0;a<mi.length;a++)Oe(mi[a],t);break;case"source":Oe("error",t);break;case"img":case"image":case"link":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"input":Oe("invalid",t),Hf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Oe("invalid",t);break;case"textarea":Oe("invalid",t),qf(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Yh(t.textContent,a)?(l.popover!=null&&(Oe("beforetoggle",t),Oe("toggle",t)),l.onScroll!=null&&Oe("scroll",t),l.onScrollEnd!=null&&Oe("scrollend",t),l.onClick!=null&&(t.onclick=fl),t=!0):t=!1,t||Ul(e,!0)}function Rd(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:wa=!1;return;case 27:case 3:wa=!0;return;default:Ut=Ut.return}}function In(e){if(e!==Ut)return!1;if(!Be)return Rd(e),Be=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Co(e.type,e.memoizedProps)),a=!a),a&&ot&&Ul(e),Rd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ot=Wh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ot=Wh(e)}else t===27?(t=ot,Fl(e.type)?(e=Oo,Oo=null,ot=e):ot=t):ot=Ut?Ta(e.stateNode.nextSibling):null;return!0}function xn(){ot=Ut=null,Be=!1}function fc(){var e=kl;return e!==null&&(ia===null?ia=e:ia.push.apply(ia,e),kl=null),e}function Xr(e){kl===null?kl=[e]:kl.push(e)}var dc=R(null),gn=null,vl=null;function Ll(e,t,a){K(dc,t._currentValue),t._currentValue=a}function pl(e){e._currentValue=dc.current,q(dc)}function mc(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function hc(e,t,a,l){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var m=i.child;u=u.firstContext;e:for(;u!==null;){var g=u;u=i;for(var E=0;E<t.length;E++)if(g.context===t[E]){u.lanes|=a,g=u.alternate,g!==null&&(g.lanes|=a),mc(u.return,a,e),l||(m=null);break e}u=g.next}}else if(i.tag===18){if(m=i.return,m===null)throw Error(o(341));m.lanes|=a,u=m.alternate,u!==null&&(u.lanes|=a),mc(m,a,e),m=null}else m=i.child;if(m!==null)m.return=i;else for(m=i;m!==null;){if(m===e){m=null;break}if(i=m.sibling,i!==null){i.return=m.return,m=i;break}m=m.return}i=m}}function Pn(e,t,a,l){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var m=i.alternate;if(m===null)throw Error(o(387));if(m=m.memoizedProps,m!==null){var g=i.type;ca(i.pendingProps.value,m.value)||(e!==null?e.push(g):e=[g])}}else if(i===Se.current){if(m=i.alternate,m===null)throw Error(o(387));m.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(gi):e=[gi])}i=i.return}e!==null&&hc(t,e,a,l),t.flags|=262144}function ms(e){for(e=e.firstContext;e!==null;){if(!ca(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yn(e){gn=e,vl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return Td(gn,e)}function hs(e,t){return gn===null&&yn(e),Td(e,t)}function Td(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},vl===null){if(e===null)throw Error(o(308));vl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vl=vl.next=t;return a}var ag=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},lg=n.unstable_scheduleCallback,ng=n.unstable_NormalPriority,Et={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vc(){return{controller:new ag,data:new Map,refCount:0}}function Qr(e){e.refCount--,e.refCount===0&&lg(ng,function(){e.controller.abort()})}var Zr=null,pc=0,er=0,tr=null;function rg(e,t){if(Zr===null){var a=Zr=[];pc=0,er=bo(),tr={status:"pending",value:void 0,then:function(l){a.push(l)}}}return pc++,t.then(Dd,Dd),t}function Dd(){if(--pc===0&&Zr!==null){tr!==null&&(tr.status="fulfilled");var e=Zr;Zr=null,er=0,tr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ig(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(l.status="rejected",l.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),l}var Cd=H.S;H.S=function(e,t){dh=dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&rg(e,t),Cd!==null&&Cd(e,t)};var bn=R(null);function xc(){var e=bn.current;return e!==null?e:it.pooledCache}function vs(e,t){t===null?K(bn,bn.current):K(bn,t.pool)}function Md(){var e=xc();return e===null?null:{parent:Et._currentValue,pool:e}}var ar=Error(o(460)),gc=Error(o(474)),ps=Error(o(542)),xs={then:function(){}};function zd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ad(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(fl,fl),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Od(e),e;default:if(typeof t.status=="string")t.then(fl,fl);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=l}},function(l){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Od(e),e}throw jn=t,ar}}function Sn(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(jn=a,ar):a}}var jn=null;function _d(){if(jn===null)throw Error(o(459));var e=jn;return jn=null,e}function Od(e){if(e===ar||e===ps)throw Error(o(483))}var lr=null,Kr=0;function gs(e){var t=Kr;return Kr+=1,lr===null&&(lr=[]),Ad(lr,e,t)}function Jr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ys(e,t){throw t.$$typeof===j?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function kd(e){function t(C,T){if(e){var _=C.deletions;_===null?(C.deletions=[T],C.flags|=16):_.push(T)}}function a(C,T){if(!e)return null;for(;T!==null;)t(C,T),T=T.sibling;return null}function l(C){for(var T=new Map;C!==null;)C.key!==null?T.set(C.key,C):T.set(C.index,C),C=C.sibling;return T}function i(C,T){return C=ml(C,T),C.index=0,C.sibling=null,C}function u(C,T,_){return C.index=_,e?(_=C.alternate,_!==null?(_=_.index,_<T?(C.flags|=67108866,T):_):(C.flags|=67108866,T)):(C.flags|=1048576,T)}function m(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function g(C,T,_,Y){return T===null||T.tag!==6?(T=ic(_,C.mode,Y),T.return=C,T):(T=i(T,_),T.return=C,T)}function E(C,T,_,Y){var pe=_.type;return pe===B?$(C,T,_.props.children,Y,_.key):T!==null&&(T.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===M&&Sn(pe)===T.type)?(T=i(T,_.props),Jr(T,_),T.return=C,T):(T=fs(_.type,_.key,_.props,null,C.mode,Y),Jr(T,_),T.return=C,T)}function O(C,T,_,Y){return T===null||T.tag!==4||T.stateNode.containerInfo!==_.containerInfo||T.stateNode.implementation!==_.implementation?(T=sc(_,C.mode,Y),T.return=C,T):(T=i(T,_.children||[]),T.return=C,T)}function $(C,T,_,Y,pe){return T===null||T.tag!==7?(T=pn(_,C.mode,Y,pe),T.return=C,T):(T=i(T,_),T.return=C,T)}function G(C,T,_){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=ic(""+T,C.mode,_),T.return=C,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case N:return _=fs(T.type,T.key,T.props,null,C.mode,_),Jr(_,T),_.return=C,_;case z:return T=sc(T,C.mode,_),T.return=C,T;case M:return T=Sn(T),G(C,T,_)}if(ke(T)||ve(T))return T=pn(T,C.mode,_,null),T.return=C,T;if(typeof T.then=="function")return G(C,gs(T),_);if(T.$$typeof===W)return G(C,hs(C,T),_);ys(C,T)}return null}function U(C,T,_,Y){var pe=T!==null?T.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return pe!==null?null:g(C,T,""+_,Y);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case N:return _.key===pe?E(C,T,_,Y):null;case z:return _.key===pe?O(C,T,_,Y):null;case M:return _=Sn(_),U(C,T,_,Y)}if(ke(_)||ve(_))return pe!==null?null:$(C,T,_,Y,null);if(typeof _.then=="function")return U(C,T,gs(_),Y);if(_.$$typeof===W)return U(C,T,hs(C,_),Y);ys(C,_)}return null}function L(C,T,_,Y,pe){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return C=C.get(_)||null,g(T,C,""+Y,pe);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case N:return C=C.get(Y.key===null?_:Y.key)||null,E(T,C,Y,pe);case z:return C=C.get(Y.key===null?_:Y.key)||null,O(T,C,Y,pe);case M:return Y=Sn(Y),L(C,T,_,Y,pe)}if(ke(Y)||ve(Y))return C=C.get(_)||null,$(T,C,Y,pe,null);if(typeof Y.then=="function")return L(C,T,_,gs(Y),pe);if(Y.$$typeof===W)return L(C,T,_,hs(T,Y),pe);ys(T,Y)}return null}function re(C,T,_,Y){for(var pe=null,Ve=null,ue=T,Me=T=0,Le=null;ue!==null&&Me<_.length;Me++){ue.index>Me?(Le=ue,ue=null):Le=ue.sibling;var Xe=U(C,ue,_[Me],Y);if(Xe===null){ue===null&&(ue=Le);break}e&&ue&&Xe.alternate===null&&t(C,ue),T=u(Xe,T,Me),Ve===null?pe=Xe:Ve.sibling=Xe,Ve=Xe,ue=Le}if(Me===_.length)return a(C,ue),Be&&hl(C,Me),pe;if(ue===null){for(;Me<_.length;Me++)ue=G(C,_[Me],Y),ue!==null&&(T=u(ue,T,Me),Ve===null?pe=ue:Ve.sibling=ue,Ve=ue);return Be&&hl(C,Me),pe}for(ue=l(ue);Me<_.length;Me++)Le=L(ue,C,Me,_[Me],Y),Le!==null&&(e&&Le.alternate!==null&&ue.delete(Le.key===null?Me:Le.key),T=u(Le,T,Me),Ve===null?pe=Le:Ve.sibling=Le,Ve=Le);return e&&ue.forEach(function(tn){return t(C,tn)}),Be&&hl(C,Me),pe}function ge(C,T,_,Y){if(_==null)throw Error(o(151));for(var pe=null,Ve=null,ue=T,Me=T=0,Le=null,Xe=_.next();ue!==null&&!Xe.done;Me++,Xe=_.next()){ue.index>Me?(Le=ue,ue=null):Le=ue.sibling;var tn=U(C,ue,Xe.value,Y);if(tn===null){ue===null&&(ue=Le);break}e&&ue&&tn.alternate===null&&t(C,ue),T=u(tn,T,Me),Ve===null?pe=tn:Ve.sibling=tn,Ve=tn,ue=Le}if(Xe.done)return a(C,ue),Be&&hl(C,Me),pe;if(ue===null){for(;!Xe.done;Me++,Xe=_.next())Xe=G(C,Xe.value,Y),Xe!==null&&(T=u(Xe,T,Me),Ve===null?pe=Xe:Ve.sibling=Xe,Ve=Xe);return Be&&hl(C,Me),pe}for(ue=l(ue);!Xe.done;Me++,Xe=_.next())Xe=L(ue,C,Me,Xe.value,Y),Xe!==null&&(e&&Xe.alternate!==null&&ue.delete(Xe.key===null?Me:Xe.key),T=u(Xe,T,Me),Ve===null?pe=Xe:Ve.sibling=Xe,Ve=Xe);return e&&ue.forEach(function(xy){return t(C,xy)}),Be&&hl(C,Me),pe}function nt(C,T,_,Y){if(typeof _=="object"&&_!==null&&_.type===B&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case N:e:{for(var pe=_.key;T!==null;){if(T.key===pe){if(pe=_.type,pe===B){if(T.tag===7){a(C,T.sibling),Y=i(T,_.props.children),Y.return=C,C=Y;break e}}else if(T.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===M&&Sn(pe)===T.type){a(C,T.sibling),Y=i(T,_.props),Jr(Y,_),Y.return=C,C=Y;break e}a(C,T);break}else t(C,T);T=T.sibling}_.type===B?(Y=pn(_.props.children,C.mode,Y,_.key),Y.return=C,C=Y):(Y=fs(_.type,_.key,_.props,null,C.mode,Y),Jr(Y,_),Y.return=C,C=Y)}return m(C);case z:e:{for(pe=_.key;T!==null;){if(T.key===pe)if(T.tag===4&&T.stateNode.containerInfo===_.containerInfo&&T.stateNode.implementation===_.implementation){a(C,T.sibling),Y=i(T,_.children||[]),Y.return=C,C=Y;break e}else{a(C,T);break}else t(C,T);T=T.sibling}Y=sc(_,C.mode,Y),Y.return=C,C=Y}return m(C);case M:return _=Sn(_),nt(C,T,_,Y)}if(ke(_))return re(C,T,_,Y);if(ve(_)){if(pe=ve(_),typeof pe!="function")throw Error(o(150));return _=pe.call(_),ge(C,T,_,Y)}if(typeof _.then=="function")return nt(C,T,gs(_),Y);if(_.$$typeof===W)return nt(C,T,hs(C,_),Y);ys(C,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,T!==null&&T.tag===6?(a(C,T.sibling),Y=i(T,_),Y.return=C,C=Y):(a(C,T),Y=ic(_,C.mode,Y),Y.return=C,C=Y),m(C)):a(C,T)}return function(C,T,_,Y){try{Kr=0;var pe=nt(C,T,_,Y);return lr=null,pe}catch(ue){if(ue===ar||ue===ps)throw ue;var Ve=oa(29,ue,null,C.mode);return Ve.lanes=Y,Ve.return=C,Ve}finally{}}}var Nn=kd(!0),Ud=kd(!1),Hl=!1;function yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(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 Bl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ql(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=os(e),yd(e,null,a),t}return cs(e,l,t,a),os(e)}function Fr(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Pi(e,a)}}function Sc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var i=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var m={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?i=u=m:u=u.next=m,a=a.next}while(a!==null);u===null?i=u=t:u=u.next=t}else i=u=t;a={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var jc=!1;function Wr(){if(jc){var e=tr;if(e!==null)throw e}}function Ir(e,t,a,l){jc=!1;var i=e.updateQueue;Hl=!1;var u=i.firstBaseUpdate,m=i.lastBaseUpdate,g=i.shared.pending;if(g!==null){i.shared.pending=null;var E=g,O=E.next;E.next=null,m===null?u=O:m.next=O,m=E;var $=e.alternate;$!==null&&($=$.updateQueue,g=$.lastBaseUpdate,g!==m&&(g===null?$.firstBaseUpdate=O:g.next=O,$.lastBaseUpdate=E))}if(u!==null){var G=i.baseState;m=0,$=O=E=null,g=u;do{var U=g.lane&-536870913,L=U!==g.lane;if(L?(Ue&U)===U:(l&U)===U){U!==0&&U===er&&(jc=!0),$!==null&&($=$.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var re=e,ge=g;U=t;var nt=a;switch(ge.tag){case 1:if(re=ge.payload,typeof re=="function"){G=re.call(nt,G,U);break e}G=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=ge.payload,U=typeof re=="function"?re.call(nt,G,U):re,U==null)break e;G=y({},G,U);break e;case 2:Hl=!0}}U=g.callback,U!==null&&(e.flags|=64,L&&(e.flags|=8192),L=i.callbacks,L===null?i.callbacks=[U]:L.push(U))}else L={lane:U,tag:g.tag,payload:g.payload,callback:g.callback,next:null},$===null?(O=$=L,E=G):$=$.next=L,m|=U;if(g=g.next,g===null){if(g=i.shared.pending,g===null)break;L=g,g=L.next,L.next=null,i.lastBaseUpdate=L,i.shared.pending=null}}while(!0);$===null&&(E=G),i.baseState=E,i.firstBaseUpdate=O,i.lastBaseUpdate=$,u===null&&(i.shared.lanes=0),Xl|=m,e.lanes=m,e.memoizedState=G}}function Ld(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Hd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Ld(a[e],t)}var nr=R(null),bs=R(0);function Bd(e,t){e=wl,K(bs,e),K(nr,t),wl=e|t.baseLanes}function Nc(){K(bs,wl),K(nr,nr.current)}function Ec(){wl=bs.current,q(nr),q(bs)}var fa=R(null),Ra=null;function $l(e){var t=e.alternate;K(gt,gt.current&1),K(fa,e),Ra===null&&(t===null||nr.current!==null||t.memoizedState!==null)&&(Ra=e)}function wc(e){K(gt,gt.current),K(fa,e),Ra===null&&(Ra=e)}function qd(e){e.tag===22?(K(gt,gt.current),K(fa,e),Ra===null&&(Ra=e)):Yl()}function Yl(){K(gt,gt.current),K(fa,fa.current)}function da(e){q(fa),Ra===e&&(Ra=null),q(gt)}var gt=R(0);function Ss(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Ao(a)||_o(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var xl=0,Ce=null,at=null,wt=null,js=!1,rr=!1,En=!1,Ns=0,Pr=0,ir=null,sg=0;function vt(){throw Error(o(321))}function Rc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ca(e[a],t[a]))return!1;return!0}function Tc(e,t,a,l,i,u){return xl=u,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?Nm:Yc,En=!1,u=a(l,i),En=!1,rr&&(u=Yd(t,a,l,i)),$d(e),u}function $d(e){H.H=ai;var t=at!==null&&at.next!==null;if(xl=0,wt=at=Ce=null,js=!1,Pr=0,ir=null,t)throw Error(o(300));e===null||Rt||(e=e.dependencies,e!==null&&ms(e)&&(Rt=!0))}function Yd(e,t,a,l){Ce=e;var i=0;do{if(rr&&(ir=null),Pr=0,rr=!1,25<=i)throw Error(o(301));if(i+=1,wt=at=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}H.H=Em,u=t(a,l)}while(rr);return u}function ug(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?ei(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Ce.flags|=1024),t}function Dc(){var e=Ns!==0;return Ns=0,e}function Cc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Mc(e){if(js){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}js=!1}xl=0,wt=at=Ce=null,rr=!1,Pr=Ns=0,ir=null}function Wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Ce.memoizedState=wt=e:wt=wt.next=e,wt}function yt(){if(at===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=wt===null?Ce.memoizedState:wt.next;if(t!==null)wt=t,at=e;else{if(e===null)throw Ce.alternate===null?Error(o(467)):Error(o(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},wt===null?Ce.memoizedState=wt=e:wt=wt.next=e}return wt}function Es(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ei(e){var t=Pr;return Pr+=1,ir===null&&(ir=[]),e=Ad(ir,e,t),t=Ce,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?Nm:Yc),e}function ws(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ei(e);if(e.$$typeof===W)return Lt(e)}throw Error(o(438,String(e)))}function zc(e){var t=null,a=Ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Ce.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Es(),Ce.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=xe;return t.index++,a}function gl(e,t){return typeof t=="function"?t(e):t}function Rs(e){var t=yt();return Ac(t,at,e)}function Ac(e,t,a){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=a;var i=e.baseQueue,u=l.pending;if(u!==null){if(i!==null){var m=i.next;i.next=u.next,u.next=m}t.baseQueue=i=u,l.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var g=m=null,E=null,O=t,$=!1;do{var G=O.lane&-536870913;if(G!==O.lane?(Ue&G)===G:(xl&G)===G){var U=O.revertLane;if(U===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),G===er&&($=!0);else if((xl&U)===U){O=O.next,U===er&&($=!0);continue}else G={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(g=E=G,m=u):E=E.next=G,Ce.lanes|=U,Xl|=U;G=O.action,En&&a(u,G),u=O.hasEagerState?O.eagerState:a(u,G)}else U={lane:G,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(g=E=U,m=u):E=E.next=U,Ce.lanes|=G,Xl|=G;O=O.next}while(O!==null&&O!==t);if(E===null?m=u:E.next=g,!ca(u,e.memoizedState)&&(Rt=!0,$&&(a=tr,a!==null)))throw a;e.memoizedState=u,e.baseState=m,e.baseQueue=E,l.lastRenderedState=u}return i===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function _c(e){var t=yt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var l=a.dispatch,i=a.pending,u=t.memoizedState;if(i!==null){a.pending=null;var m=i=i.next;do u=e(u,m.action),m=m.next;while(m!==i);ca(u,t.memoizedState)||(Rt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function Gd(e,t,a){var l=Ce,i=yt(),u=Be;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var m=!ca((at||i).memoizedState,a);if(m&&(i.memoizedState=a,Rt=!0),i=i.queue,Uc(Qd.bind(null,l,i,e),[e]),i.getSnapshot!==t||m||wt!==null&&wt.memoizedState.tag&1){if(l.flags|=2048,sr(9,{destroy:void 0},Xd.bind(null,l,i,a,t),null),it===null)throw Error(o(349));u||(xl&127)!==0||Vd(l,t,a)}return a}function Vd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ce.updateQueue,t===null?(t=Es(),Ce.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Xd(e,t,a,l){t.value=a,t.getSnapshot=l,Zd(t)&&Kd(e)}function Qd(e,t,a){return a(function(){Zd(t)&&Kd(e)})}function Zd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ca(e,a)}catch{return!0}}function Kd(e){var t=vn(e,2);t!==null&&sa(t,e,2)}function Oc(e){var t=Wt();if(typeof e=="function"){var a=e;if(e=a(),En){Mt(!0);try{a()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:e},t}function Jd(e,t,a,l){return e.baseState=a,Ac(e,at,typeof l=="function"?l:gl)}function cg(e,t,a,l,i){if(Cs(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){u.listeners.push(m)}};H.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,Fd(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Fd(e,t){var a=t.action,l=t.payload,i=e.state;if(t.isTransition){var u=H.T,m={};H.T=m;try{var g=a(i,l),E=H.S;E!==null&&E(m,g),Wd(e,t,g)}catch(O){kc(e,t,O)}finally{u!==null&&m.types!==null&&(u.types=m.types),H.T=u}}else try{u=a(i,l),Wd(e,t,u)}catch(O){kc(e,t,O)}}function Wd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Id(e,t,l)},function(l){return kc(e,t,l)}):Id(e,t,a)}function Id(e,t,a){t.status="fulfilled",t.value=a,Pd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Fd(e,a)))}function kc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Pd(t),t=t.next;while(t!==l)}e.action=null}function Pd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function em(e,t){return t}function tm(e,t){if(Be){var a=it.formState;if(a!==null){e:{var l=Ce;if(Be){if(ot){t:{for(var i=ot,u=wa;i.nodeType!==8;){if(!u){i=null;break t}if(i=Ta(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){ot=Ta(i.nextSibling),l=i.data==="F!";break e}}Ul(l)}l=!1}l&&(t=a[0])}}return a=Wt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:em,lastRenderedState:t},a.queue=l,a=bm.bind(null,Ce,l),l.dispatch=a,l=Oc(!1),u=$c.bind(null,Ce,!1,l.queue),l=Wt(),i={state:t,dispatch:null,action:e,pending:null},l.queue=i,a=cg.bind(null,Ce,i,u,a),i.dispatch=a,l.memoizedState=e,[t,a,!1]}function am(e){var t=yt();return lm(t,at,e)}function lm(e,t,a){if(t=Ac(e,t,em)[0],e=Rs(gl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ei(t)}catch(m){throw m===ar?ps:m}else l=t;t=yt();var i=t.queue,u=i.dispatch;return a!==t.memoizedState&&(Ce.flags|=2048,sr(9,{destroy:void 0},og.bind(null,i,a),null)),[l,u,e]}function og(e,t){e.action=t}function nm(e){var t=yt(),a=at;if(a!==null)return lm(t,a,e);yt(),t=t.memoizedState,a=yt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function sr(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Ce.updateQueue,t===null&&(t=Es(),Ce.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function rm(){return yt().memoizedState}function Ts(e,t,a,l){var i=Wt();Ce.flags|=e,i.memoizedState=sr(1|t,{destroy:void 0},a,l===void 0?null:l)}function Ds(e,t,a,l){var i=yt();l=l===void 0?null:l;var u=i.memoizedState.inst;at!==null&&l!==null&&Rc(l,at.memoizedState.deps)?i.memoizedState=sr(t,u,a,l):(Ce.flags|=e,i.memoizedState=sr(1|t,u,a,l))}function im(e,t){Ts(8390656,8,e,t)}function Uc(e,t){Ds(2048,8,e,t)}function fg(e){Ce.flags|=4;var t=Ce.updateQueue;if(t===null)t=Es(),Ce.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function sm(e){var t=yt().memoizedState;return fg({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function um(e,t){return Ds(4,2,e,t)}function cm(e,t){return Ds(4,4,e,t)}function om(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fm(e,t,a){a=a!=null?a.concat([e]):null,Ds(4,4,om.bind(null,t,e),a)}function Lc(){}function dm(e,t){var a=yt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Rc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function mm(e,t){var a=yt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Rc(t,l[1]))return l[0];if(l=e(),En){Mt(!0);try{e()}finally{Mt(!1)}}return a.memoizedState=[l,t],l}function Hc(e,t,a){return a===void 0||(xl&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=hh(),Ce.lanes|=e,Xl|=e,a)}function hm(e,t,a,l){return ca(a,t)?a:nr.current!==null?(e=Hc(e,a,l),ca(e,t)||(Rt=!0),e):(xl&42)===0||(xl&1073741824)!==0&&(Ue&261930)===0?(Rt=!0,e.memoizedState=a):(e=hh(),Ce.lanes|=e,Xl|=e,t)}function vm(e,t,a,l,i){var u=X.p;X.p=u!==0&&8>u?u:8;var m=H.T,g={};H.T=g,$c(e,!1,t,a);try{var E=i(),O=H.S;if(O!==null&&O(g,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var $=ig(E,l);ti(e,t,$,va(e))}else ti(e,t,l,va(e))}catch(G){ti(e,t,{then:function(){},status:"rejected",reason:G},va())}finally{X.p=u,m!==null&&g.types!==null&&(m.types=g.types),H.T=m}}function dg(){}function Bc(e,t,a,l){if(e.tag!==5)throw Error(o(476));var i=pm(e).queue;vm(e,i,t,te,a===null?dg:function(){return xm(e),a(l)})}function pm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:te},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xm(e){var t=pm(e);t.next===null&&(t=e.alternate.memoizedState),ti(e,t.next.queue,{},va())}function qc(){return Lt(gi)}function gm(){return yt().memoizedState}function ym(){return yt().memoizedState}function mg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=va();e=Bl(a);var l=ql(t,e,a);l!==null&&(sa(l,t,a),Fr(l,t,a)),t={cache:vc()},e.payload=t;return}t=t.return}}function hg(e,t,a){var l=va();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Cs(e)?Sm(t,a):(a=nc(e,t,a,l),a!==null&&(sa(a,e,l),jm(a,t,l)))}function bm(e,t,a){var l=va();ti(e,t,a,l)}function ti(e,t,a,l){var i={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Cs(e))Sm(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var m=t.lastRenderedState,g=u(m,a);if(i.hasEagerState=!0,i.eagerState=g,ca(g,m))return cs(e,t,i,0),it===null&&us(),!1}catch{}finally{}if(a=nc(e,t,i,l),a!==null)return sa(a,e,l),jm(a,t,l),!0}return!1}function $c(e,t,a,l){if(l={lane:2,revertLane:bo(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Cs(e)){if(t)throw Error(o(479))}else t=nc(e,a,l,2),t!==null&&sa(t,e,2)}function Cs(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function Sm(e,t){rr=js=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function jm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Pi(e,a)}}var ai={readContext:Lt,use:ws,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt};ai.useEffectEvent=vt;var Nm={readContext:Lt,use:ws,useCallback:function(e,t){return Wt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:im,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ts(4194308,4,om.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ts(4194308,4,e,t)},useInsertionEffect:function(e,t){Ts(4,2,e,t)},useMemo:function(e,t){var a=Wt();t=t===void 0?null:t;var l=e();if(En){Mt(!0);try{e()}finally{Mt(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Wt();if(a!==void 0){var i=a(t);if(En){Mt(!0);try{a(t)}finally{Mt(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=hg.bind(null,Ce,e),[l.memoizedState,e]},useRef:function(e){var t=Wt();return e={current:e},t.memoizedState=e},useState:function(e){e=Oc(e);var t=e.queue,a=bm.bind(null,Ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Lc,useDeferredValue:function(e,t){var a=Wt();return Hc(a,e,t)},useTransition:function(){var e=Oc(!1);return e=vm.bind(null,Ce,e.queue,!0,!1),Wt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Ce,i=Wt();if(Be){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),it===null)throw Error(o(349));(Ue&127)!==0||Vd(l,t,a)}i.memoizedState=a;var u={value:a,getSnapshot:t};return i.queue=u,im(Qd.bind(null,l,u,e),[e]),l.flags|=2048,sr(9,{destroy:void 0},Xd.bind(null,l,u,a,t),null),a},useId:function(){var e=Wt(),t=it.identifierPrefix;if(Be){var a=Ka,l=Za;a=(l&~(1<<32-$t(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ns++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=sg++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qc,useFormState:tm,useActionState:tm,useOptimistic:function(e){var t=Wt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=$c.bind(null,Ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:zc,useCacheRefresh:function(){return Wt().memoizedState=mg.bind(null,Ce)},useEffectEvent:function(e){var t=Wt(),a={impl:e};return t.memoizedState=a,function(){if((Ze&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Yc={readContext:Lt,use:ws,useCallback:dm,useContext:Lt,useEffect:Uc,useImperativeHandle:fm,useInsertionEffect:um,useLayoutEffect:cm,useMemo:mm,useReducer:Rs,useRef:rm,useState:function(){return Rs(gl)},useDebugValue:Lc,useDeferredValue:function(e,t){var a=yt();return hm(a,at.memoizedState,e,t)},useTransition:function(){var e=Rs(gl)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:Gd,useId:gm,useHostTransitionStatus:qc,useFormState:am,useActionState:am,useOptimistic:function(e,t){var a=yt();return Jd(a,at,e,t)},useMemoCache:zc,useCacheRefresh:ym};Yc.useEffectEvent=sm;var Em={readContext:Lt,use:ws,useCallback:dm,useContext:Lt,useEffect:Uc,useImperativeHandle:fm,useInsertionEffect:um,useLayoutEffect:cm,useMemo:mm,useReducer:_c,useRef:rm,useState:function(){return _c(gl)},useDebugValue:Lc,useDeferredValue:function(e,t){var a=yt();return at===null?Hc(a,e,t):hm(a,at.memoizedState,e,t)},useTransition:function(){var e=_c(gl)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:Gd,useId:gm,useHostTransitionStatus:qc,useFormState:nm,useActionState:nm,useOptimistic:function(e,t){var a=yt();return at!==null?Jd(a,at,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:zc,useCacheRefresh:ym};Em.useEffectEvent=sm;function Gc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Vc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=va(),i=Bl(l);i.payload=t,a!=null&&(i.callback=a),t=ql(e,i,l),t!==null&&(sa(t,e,l),Fr(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=va(),i=Bl(l);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=ql(e,i,l),t!==null&&(sa(t,e,l),Fr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=va(),l=Bl(a);l.tag=2,t!=null&&(l.callback=t),t=ql(e,l,a),t!==null&&(sa(t,e,a),Fr(t,e,a))}};function wm(e,t,a,l,i,u,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,m):t.prototype&&t.prototype.isPureReactComponent?!Yr(a,l)||!Yr(i,u):!0}function Rm(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Vc.enqueueReplaceState(t,t.state,null)}function wn(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Tm(e){ss(e)}function Dm(e){console.error(e)}function Cm(e){ss(e)}function Ms(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Mm(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Xc(e,t,a){return a=Bl(a),a.tag=3,a.payload={element:null},a.callback=function(){Ms(e,t)},a}function zm(e){return e=Bl(e),e.tag=3,e}function Am(e,t,a,l){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var u=l.value;e.payload=function(){return i(u)},e.callback=function(){Mm(t,a,l)}}var m=a.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){Mm(t,a,l),typeof i!="function"&&(Ql===null?Ql=new Set([this]):Ql.add(this));var g=l.stack;this.componentDidCatch(l.value,{componentStack:g!==null?g:""})})}function vg(e,t,a,l,i){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Pn(t,a,i,!0),a=fa.current,a!==null){switch(a.tag){case 31:case 13:return Ra===null?Ys():a.alternate===null&&pt===0&&(pt=3),a.flags&=-257,a.flags|=65536,a.lanes=i,l===xs?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),xo(e,l,i)),!1;case 22:return a.flags|=65536,l===xs?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),xo(e,l,i)),!1}throw Error(o(435,a.tag))}return xo(e,l,i),Ys(),!1}if(Be)return t=fa.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,l!==oc&&(e=Error(o(422),{cause:l}),Xr(ja(e,a)))):(l!==oc&&(t=Error(o(423),{cause:l}),Xr(ja(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,l=ja(l,a),i=Xc(e.stateNode,l,i),Sc(e,i),pt!==4&&(pt=2)),!1;var u=Error(o(520),{cause:l});if(u=ja(u,a),oi===null?oi=[u]:oi.push(u),pt!==4&&(pt=2),t===null)return!0;l=ja(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=Xc(a.stateNode,l,e),Sc(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ql===null||!Ql.has(u))))return a.flags|=65536,i&=-i,a.lanes|=i,i=zm(i),Am(i,e,a,l),Sc(a,i),!1}a=a.return}while(a!==null);return!1}var Qc=Error(o(461)),Rt=!1;function Ht(e,t,a,l){t.child=e===null?Ud(t,null,a,l):Nn(t,e.child,a,l)}function _m(e,t,a,l,i){a=a.render;var u=t.ref;if("ref"in l){var m={};for(var g in l)g!=="ref"&&(m[g]=l[g])}else m=l;return yn(t),l=Tc(e,t,a,m,u,i),g=Dc(),e!==null&&!Rt?(Cc(e,t,i),yl(e,t,i)):(Be&&g&&uc(t),t.flags|=1,Ht(e,t,l,i),t.child)}function Om(e,t,a,l,i){if(e===null){var u=a.type;return typeof u=="function"&&!rc(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,km(e,t,u,l,i)):(e=fs(a.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!eo(e,i)){var m=u.memoizedProps;if(a=a.compare,a=a!==null?a:Yr,a(m,l)&&e.ref===t.ref)return yl(e,t,i)}return t.flags|=1,e=ml(u,l),e.ref=t.ref,e.return=t,t.child=e}function km(e,t,a,l,i){if(e!==null){var u=e.memoizedProps;if(Yr(u,l)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=l=u,eo(e,i))(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,yl(e,t,i)}return Zc(e,t,a,l,i)}function Um(e,t,a,l){var i=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,i=0;l!==null;)i=i|l.lanes|l.childLanes,l=l.sibling;l=i&~u}else l=0,t.child=null;return Lm(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vs(t,u!==null?u.cachePool:null),u!==null?Bd(t,u):Nc(),qd(t);else return l=t.lanes=536870912,Lm(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(vs(t,u.cachePool),Bd(t,u),Yl(),t.memoizedState=null):(e!==null&&vs(t,null),Nc(),Yl());return Ht(e,t,i,a),t.child}function li(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Lm(e,t,a,l,i){var u=xc();return u=u===null?null:{parent:Et._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&vs(t,null),Nc(),qd(t),e!==null&&Pn(e,t,l,!0),t.childLanes=i,null}function zs(e,t){return t=_s({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hm(e,t,a){return Nn(t,e.child,null,a),e=zs(t,t.pendingProps),e.flags|=2,da(t),t.memoizedState=null,e}function pg(e,t,a){var l=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(l.mode==="hidden")return e=zs(t,l),t.lanes=536870912,li(null,e);if(wc(t),(e=ot)?(e=Fh(e,wa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ol!==null?{id:Za,overflow:Ka}:null,retryLane:536870912,hydrationErrors:null},a=Sd(e),a.return=t,t.child=a,Ut=t,ot=null)):e=null,e===null)throw Ul(t);return t.lanes=536870912,null}return zs(t,l)}var u=e.memoizedState;if(u!==null){var m=u.dehydrated;if(wc(t),i)if(t.flags&256)t.flags&=-257,t=Hm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Rt||Pn(e,t,a,!1),i=(a&e.childLanes)!==0,Rt||i){if(l=it,l!==null&&(m=w(l,a),m!==0&&m!==u.retryLane))throw u.retryLane=m,vn(e,m),sa(l,e,m),Qc;Ys(),t=Hm(e,t,a)}else e=u.treeContext,ot=Ta(m.nextSibling),Ut=t,Be=!0,kl=null,wa=!1,e!==null&&Ed(t,e),t=zs(t,l),t.flags|=4096;return t}return e=ml(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function As(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Zc(e,t,a,l,i){return yn(t),a=Tc(e,t,a,l,void 0,i),l=Dc(),e!==null&&!Rt?(Cc(e,t,i),yl(e,t,i)):(Be&&l&&uc(t),t.flags|=1,Ht(e,t,a,i),t.child)}function Bm(e,t,a,l,i,u){return yn(t),t.updateQueue=null,a=Yd(t,l,a,i),$d(e),l=Dc(),e!==null&&!Rt?(Cc(e,t,u),yl(e,t,u)):(Be&&l&&uc(t),t.flags|=1,Ht(e,t,a,u),t.child)}function qm(e,t,a,l,i){if(yn(t),t.stateNode===null){var u=Jn,m=a.contextType;typeof m=="object"&&m!==null&&(u=Lt(m)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Vc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},yc(t),m=a.contextType,u.context=typeof m=="object"&&m!==null?Lt(m):Jn,u.state=t.memoizedState,m=a.getDerivedStateFromProps,typeof m=="function"&&(Gc(t,a,m,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(m=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),m!==u.state&&Vc.enqueueReplaceState(u,u.state,null),Ir(t,l,u,i),Wr(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var g=t.memoizedProps,E=wn(a,g);u.props=E;var O=u.context,$=a.contextType;m=Jn,typeof $=="object"&&$!==null&&(m=Lt($));var G=a.getDerivedStateFromProps;$=typeof G=="function"||typeof u.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,$||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g||O!==m)&&Rm(t,u,l,m),Hl=!1;var U=t.memoizedState;u.state=U,Ir(t,l,u,i),Wr(),O=t.memoizedState,g||U!==O||Hl?(typeof G=="function"&&(Gc(t,a,G,l),O=t.memoizedState),(E=Hl||wm(t,a,E,l,U,O,m))?($||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=O),u.props=l,u.state=O,u.context=m,l=E):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,bc(e,t),m=t.memoizedProps,$=wn(a,m),u.props=$,G=t.pendingProps,U=u.context,O=a.contextType,E=Jn,typeof O=="object"&&O!==null&&(E=Lt(O)),g=a.getDerivedStateFromProps,(O=typeof g=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m!==G||U!==E)&&Rm(t,u,l,E),Hl=!1,U=t.memoizedState,u.state=U,Ir(t,l,u,i),Wr();var L=t.memoizedState;m!==G||U!==L||Hl||e!==null&&e.dependencies!==null&&ms(e.dependencies)?(typeof g=="function"&&(Gc(t,a,g,l),L=t.memoizedState),($=Hl||wm(t,a,$,l,U,L,E)||e!==null&&e.dependencies!==null&&ms(e.dependencies))?(O||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,L,E),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,L,E)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||m===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=L),u.props=l,u.state=L,u.context=E,l=$):(typeof u.componentDidUpdate!="function"||m===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,As(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=Nn(t,e.child,null,i),t.child=Nn(t,null,a,i)):Ht(e,t,a,i),t.memoizedState=u.state,e=t.child):e=yl(e,t,i),e}function $m(e,t,a,l){return xn(),t.flags|=256,Ht(e,t,a,l),t.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Md()}}function Fc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ha),e}function Ym(e,t,a){var l=t.pendingProps,i=!1,u=(t.flags&128)!==0,m;if((m=u)||(m=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),m&&(i=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(i?$l(t):Yl(),(e=ot)?(e=Fh(e,wa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ol!==null?{id:Za,overflow:Ka}:null,retryLane:536870912,hydrationErrors:null},a=Sd(e),a.return=t,t.child=a,Ut=t,ot=null)):e=null,e===null)throw Ul(t);return _o(e)?t.lanes=32:t.lanes=536870912,null}var g=l.children;return l=l.fallback,i?(Yl(),i=t.mode,g=_s({mode:"hidden",children:g},i),l=pn(l,i,a,null),g.return=t,l.return=t,g.sibling=l,t.child=g,l=t.child,l.memoizedState=Jc(a),l.childLanes=Fc(e,m,a),t.memoizedState=Kc,li(null,l)):($l(t),Wc(t,g))}var E=e.memoizedState;if(E!==null&&(g=E.dehydrated,g!==null)){if(u)t.flags&256?($l(t),t.flags&=-257,t=Ic(e,t,a)):t.memoizedState!==null?(Yl(),t.child=e.child,t.flags|=128,t=null):(Yl(),g=l.fallback,i=t.mode,l=_s({mode:"visible",children:l.children},i),g=pn(g,i,a,null),g.flags|=2,l.return=t,g.return=t,l.sibling=g,t.child=l,Nn(t,e.child,null,a),l=t.child,l.memoizedState=Jc(a),l.childLanes=Fc(e,m,a),t.memoizedState=Kc,t=li(null,l));else if($l(t),_o(g)){if(m=g.nextSibling&&g.nextSibling.dataset,m)var O=m.dgst;m=O,l=Error(o(419)),l.stack="",l.digest=m,Xr({value:l,source:null,stack:null}),t=Ic(e,t,a)}else if(Rt||Pn(e,t,a,!1),m=(a&e.childLanes)!==0,Rt||m){if(m=it,m!==null&&(l=w(m,a),l!==0&&l!==E.retryLane))throw E.retryLane=l,vn(e,l),sa(m,e,l),Qc;Ao(g)||Ys(),t=Ic(e,t,a)}else Ao(g)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,ot=Ta(g.nextSibling),Ut=t,Be=!0,kl=null,wa=!1,e!==null&&Ed(t,e),t=Wc(t,l.children),t.flags|=4096);return t}return i?(Yl(),g=l.fallback,i=t.mode,E=e.child,O=E.sibling,l=ml(E,{mode:"hidden",children:l.children}),l.subtreeFlags=E.subtreeFlags&65011712,O!==null?g=ml(O,g):(g=pn(g,i,a,null),g.flags|=2),g.return=t,l.return=t,l.sibling=g,t.child=l,li(null,l),l=t.child,g=e.child.memoizedState,g===null?g=Jc(a):(i=g.cachePool,i!==null?(E=Et._currentValue,i=i.parent!==E?{parent:E,pool:E}:i):i=Md(),g={baseLanes:g.baseLanes|a,cachePool:i}),l.memoizedState=g,l.childLanes=Fc(e,m,a),t.memoizedState=Kc,li(e.child,l)):($l(t),a=e.child,e=a.sibling,a=ml(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=a,t.memoizedState=null,a)}function Wc(e,t){return t=_s({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function _s(e,t){return e=oa(22,e,null,t),e.lanes=0,e}function Ic(e,t,a){return Nn(t,e.child,null,a),e=Wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gm(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),mc(e.return,t,a)}function Pc(e,t,a,l,i,u){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:i,treeForkCount:u}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=a,m.tailMode=i,m.treeForkCount=u)}function Vm(e,t,a){var l=t.pendingProps,i=l.revealOrder,u=l.tail;l=l.children;var m=gt.current,g=(m&2)!==0;if(g?(m=m&1|2,t.flags|=128):m&=1,K(gt,m),Ht(e,t,l,a),l=Be?Vr:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gm(e,a,t);else if(e.tag===19)Gm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Ss(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),Pc(t,!1,i,a,u,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ss(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}Pc(t,!0,a,null,u,l);break;case"together":Pc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function yl(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Pn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=ml(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ml(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function eo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ms(e)))}function xg(e,t,a){switch(t.tag){case 3:We(t,t.stateNode.containerInfo),Ll(t,Et,e.memoizedState.cache),xn();break;case 27:case 5:nl(t);break;case 4:We(t,t.stateNode.containerInfo);break;case 10:Ll(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,wc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?($l(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Ym(e,t,a):($l(t),e=yl(e,t,a),e!==null?e.sibling:null);$l(t);break;case 19:var i=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Pn(e,t,a,!1),l=(a&t.childLanes)!==0),i){if(l)return Vm(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),K(gt,gt.current),l)break;return null;case 22:return t.lanes=0,Um(e,t,a,t.pendingProps);case 24:Ll(t,Et,e.memoizedState.cache)}return yl(e,t,a)}function Xm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Rt=!0;else{if(!eo(e,a)&&(t.flags&128)===0)return Rt=!1,xg(e,t,a);Rt=(e.flags&131072)!==0}else Rt=!1,Be&&(t.flags&1048576)!==0&&Nd(t,Vr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Sn(t.elementType),t.type=e,typeof e=="function")rc(e)?(l=wn(e,l),t.tag=1,t=qm(null,t,e,l,a)):(t.tag=0,t=Zc(null,t,e,l,a));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=_m(null,t,e,l,a);break e}else if(i===le){t.tag=14,t=Om(null,t,e,l,a);break e}}throw t=Te(e)||e,Error(o(306,t,""))}}return t;case 0:return Zc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,i=wn(l,t.pendingProps),qm(e,t,l,i,a);case 3:e:{if(We(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var u=t.memoizedState;i=u.element,bc(e,t),Ir(t,l,null,a);var m=t.memoizedState;if(l=m.cache,Ll(t,Et,l),l!==u.cache&&hc(t,[Et],a,!0),Wr(),l=m.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=$m(e,t,l,a);break e}else if(l!==i){i=ja(Error(o(424)),t),Xr(i),t=$m(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ot=Ta(e.firstChild),Ut=t,Be=!0,kl=null,wa=!0,a=Ud(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(xn(),l===i){t=yl(e,t,a);break e}Ht(e,t,l,a)}t=t.child}return t;case 26:return As(e,t),e===null?(a=av(t.type,null,t.pendingProps,null))?t.memoizedState=a:Be||(a=t.type,e=t.pendingProps,l=Js(fe.current).createElement(a),l[P]=t,l[oe]=e,Bt(l,a,e),$e(l),t.stateNode=l):t.memoizedState=av(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return nl(t),e===null&&Be&&(l=t.stateNode=Ph(t.type,t.pendingProps,fe.current),Ut=t,wa=!0,i=ot,Fl(t.type)?(Oo=i,ot=Ta(l.firstChild)):ot=i),Ht(e,t,t.pendingProps.children,a),As(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((i=l=ot)&&(l=Zg(l,t.type,t.pendingProps,wa),l!==null?(t.stateNode=l,Ut=t,ot=Ta(l.firstChild),wa=!1,i=!0):i=!1),i||Ul(t)),nl(t),i=t.type,u=t.pendingProps,m=e!==null?e.memoizedProps:null,l=u.children,Co(i,u)?l=null:m!==null&&Co(i,m)&&(t.flags|=32),t.memoizedState!==null&&(i=Tc(e,t,ug,null,null,a),gi._currentValue=i),As(e,t),Ht(e,t,l,a),t.child;case 6:return e===null&&Be&&((e=a=ot)&&(a=Kg(a,t.pendingProps,wa),a!==null?(t.stateNode=a,Ut=t,ot=null,e=!0):e=!1),e||Ul(t)),null;case 13:return Ym(e,t,a);case 4:return We(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Nn(t,null,l,a):Ht(e,t,l,a),t.child;case 11:return _m(e,t,t.type,t.pendingProps,a);case 7:return Ht(e,t,t.pendingProps,a),t.child;case 8:return Ht(e,t,t.pendingProps.children,a),t.child;case 12:return Ht(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Ll(t,t.type,l.value),Ht(e,t,l.children,a),t.child;case 9:return i=t.type._context,l=t.pendingProps.children,yn(t),i=Lt(i),l=l(i),t.flags|=1,Ht(e,t,l,a),t.child;case 14:return Om(e,t,t.type,t.pendingProps,a);case 15:return km(e,t,t.type,t.pendingProps,a);case 19:return Vm(e,t,a);case 31:return pg(e,t,a);case 22:return Um(e,t,a,t.pendingProps);case 24:return yn(t),l=Lt(Et),e===null?(i=xc(),i===null&&(i=it,u=vc(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=a),i=u),t.memoizedState={parent:l,cache:i},yc(t),Ll(t,Et,i)):((e.lanes&a)!==0&&(bc(e,t),Ir(t,null,null,a),Wr()),i=e.memoizedState,u=t.memoizedState,i.parent!==l?(i={parent:l,cache:l},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ll(t,Et,l)):(l=u.cache,Ll(t,Et,l),l!==i.cache&&hc(t,[Et],a,!0))),Ht(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function bl(e){e.flags|=4}function to(e,t,a,l,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(gh())e.flags|=8192;else throw jn=xs,gc}else e.flags&=-16777217}function Qm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!sv(t))if(gh())e.flags|=8192;else throw jn=xs,gc}function Os(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?_r():536870912,e.lanes|=t,fr|=t)}function ni(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ft(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,l|=i.subtreeFlags&65011712,l|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function gg(e,t,a){var l=t.pendingProps;switch(cc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return ft(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),pl(Et),Qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(In(t)?bl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fc())),ft(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(bl(t),u!==null?(ft(t),Qm(t,u)):(ft(t),to(t,i,null,l,a))):u?u!==e.memoizedState?(bl(t),ft(t),Qm(t,u)):(ft(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&bl(t),ft(t),to(t,i,e,l,a)),null;case 27:if(Cl(t),a=fe.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&bl(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ft(t),null}e=F.current,In(t)?wd(t):(e=Ph(i,l,a),t.stateNode=e,bl(t))}return ft(t),null;case 5:if(Cl(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&bl(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ft(t),null}if(u=F.current,In(t))wd(t);else{var m=Js(fe.current);switch(u){case 1:u=m.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=m.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=m.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=m.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=m.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?m.createElement("select",{is:l.is}):m.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?m.createElement(i,{is:l.is}):m.createElement(i)}}u[P]=t,u[oe]=l;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)u.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=u;e:switch(Bt(u,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&bl(t)}}return ft(t),to(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&bl(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=fe.current,In(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,i=Ut,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[P]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Yh(e.nodeValue,a)),e||Ul(t,!0)}else e=Js(e).createTextNode(l),e[P]=t,t.stateNode=e}return ft(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=In(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[P]=t}else xn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),e=!1}else a=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(da(t),t):(da(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ft(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=In(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[P]=t}else xn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),i=!1}else i=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(da(t),t):(da(t),null)}return da(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==i&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Os(t,t.updateQueue),ft(t),null);case 4:return Qe(),e===null&&Eo(t.stateNode.containerInfo),ft(t),null;case 10:return pl(t.type),ft(t),null;case 19:if(q(gt),l=t.memoizedState,l===null)return ft(t),null;if(i=(t.flags&128)!==0,u=l.rendering,u===null)if(i)ni(l,!1);else{if(pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ss(e),u!==null){for(t.flags|=128,ni(l,!1),e=u.updateQueue,t.updateQueue=e,Os(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)bd(a,e),a=a.sibling;return K(gt,gt.current&1|2),Be&&hl(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&dt()>Bs&&(t.flags|=128,i=!0,ni(l,!1),t.lanes=4194304)}else{if(!i)if(e=Ss(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Os(t,e),ni(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Be)return ft(t),null}else 2*dt()-l.renderingStartTime>Bs&&a!==536870912&&(t.flags|=128,i=!0,ni(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=dt(),e.sibling=null,a=gt.current,K(gt,i?a&1|2:a&1),Be&&hl(t,l.treeForkCount),e):(ft(t),null);case 22:case 23:return da(t),Ec(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),a=t.updateQueue,a!==null&&Os(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&q(bn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),pl(Et),ft(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function yg(e,t){switch(cc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pl(Et),Qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Cl(t),null;case 31:if(t.memoizedState!==null){if(da(t),t.alternate===null)throw Error(o(340));xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(gt),null;case 4:return Qe(),null;case 10:return pl(t.type),null;case 22:case 23:return da(t),Ec(),e!==null&&q(bn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pl(Et),null;case 25:return null;default:return null}}function Zm(e,t){switch(cc(t),t.tag){case 3:pl(Et),Qe();break;case 26:case 27:case 5:Cl(t);break;case 4:Qe();break;case 31:t.memoizedState!==null&&da(t);break;case 13:da(t);break;case 19:q(gt);break;case 10:pl(t.type);break;case 22:case 23:da(t),Ec(),e!==null&&q(bn);break;case 24:pl(Et)}}function ri(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){l=void 0;var u=a.create,m=a.inst;l=u(),m.destroy=l}a=a.next}while(a!==i)}}catch(g){et(t,t.return,g)}}function Gl(e,t,a){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var u=i.next;l=u;do{if((l.tag&e)===e){var m=l.inst,g=m.destroy;if(g!==void 0){m.destroy=void 0,i=t;var E=a,O=g;try{O()}catch($){et(i,E,$)}}}l=l.next}while(l!==u)}}catch($){et(t,t.return,$)}}function Km(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Hd(t,a)}catch(l){et(e,e.return,l)}}}function Jm(e,t,a){a.props=wn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){et(e,t,l)}}function ii(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(i){et(e,t,i)}}function Ja(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(i){et(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){et(e,t,i)}else a.current=null}function Fm(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(i){et(e,e.return,i)}}function ao(e,t,a){try{var l=e.stateNode;$g(l,e.type,a,t),l[oe]=t}catch(i){et(e,e.return,i)}}function Wm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fl(e.type)||e.tag===4}function lo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Fl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function no(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=fl));else if(l!==4&&(l===27&&Fl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(no(e,t,a),e=e.sibling;e!==null;)no(e,t,a),e=e.sibling}function ks(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Fl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ks(e,t,a),e=e.sibling;e!==null;)ks(e,t,a),e=e.sibling}function Im(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Bt(t,l,a),t[P]=e,t[oe]=a}catch(u){et(e,e.return,u)}}var Sl=!1,Tt=!1,ro=!1,Pm=typeof WeakSet=="function"?WeakSet:Set,zt=null;function bg(e,t){if(e=e.containerInfo,To=au,e=fd(e),Iu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var i=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var m=0,g=-1,E=-1,O=0,$=0,G=e,U=null;t:for(;;){for(var L;G!==a||i!==0&&G.nodeType!==3||(g=m+i),G!==u||l!==0&&G.nodeType!==3||(E=m+l),G.nodeType===3&&(m+=G.nodeValue.length),(L=G.firstChild)!==null;)U=G,G=L;for(;;){if(G===e)break t;if(U===a&&++O===i&&(g=m),U===u&&++$===l&&(E=m),(L=G.nextSibling)!==null)break;G=U,U=G.parentNode}G=L}a=g===-1||E===-1?null:{start:g,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(Do={focusedElem:e,selectionRange:a},au=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,i=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var re=wn(a.type,i);e=l.getSnapshotBeforeUpdate(re,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(ge){et(a,a.return,ge)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)zo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,zt=e;break}zt=t.return}}function eh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Nl(e,a),l&4&&ri(5,a);break;case 1:if(Nl(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(m){et(a,a.return,m)}else{var i=wn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){et(a,a.return,m)}}l&64&&Km(a),l&512&&ii(a,a.return);break;case 3:if(Nl(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Hd(e,t)}catch(m){et(a,a.return,m)}}break;case 27:t===null&&l&4&&Im(a);case 26:case 5:Nl(e,a),t===null&&l&4&&Fm(a),l&512&&ii(a,a.return);break;case 12:Nl(e,a);break;case 31:Nl(e,a),l&4&&lh(e,a);break;case 13:Nl(e,a),l&4&&nh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Cg.bind(null,a),Jg(e,a))));break;case 22:if(l=a.memoizedState!==null||Sl,!l){t=t!==null&&t.memoizedState!==null||Tt,i=Sl;var u=Tt;Sl=l,(Tt=t)&&!u?El(e,a,(a.subtreeFlags&8772)!==0):Nl(e,a),Sl=i,Tt=u}break;case 30:break;default:Nl(e,a)}}function th(e){var t=e.alternate;t!==null&&(e.alternate=null,th(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ge(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 mt=null,la=!1;function jl(e,t,a){for(a=a.child;a!==null;)ah(e,t,a),a=a.sibling}function ah(e,t,a){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(il,a)}catch{}switch(a.tag){case 26:Tt||Ja(a,t),jl(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Tt||Ja(a,t);var l=mt,i=la;Fl(a.type)&&(mt=a.stateNode,la=!1),jl(e,t,a),vi(a.stateNode),mt=l,la=i;break;case 5:Tt||Ja(a,t);case 6:if(l=mt,i=la,mt=null,jl(e,t,a),mt=l,la=i,mt!==null)if(la)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(u){et(a,t,u)}else try{mt.removeChild(a.stateNode)}catch(u){et(a,t,u)}break;case 18:mt!==null&&(la?(e=mt,Kh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),yr(e)):Kh(mt,a.stateNode));break;case 4:l=mt,i=la,mt=a.stateNode.containerInfo,la=!0,jl(e,t,a),mt=l,la=i;break;case 0:case 11:case 14:case 15:Gl(2,a,t),Tt||Gl(4,a,t),jl(e,t,a);break;case 1:Tt||(Ja(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Jm(a,t,l)),jl(e,t,a);break;case 21:jl(e,t,a);break;case 22:Tt=(l=Tt)||a.memoizedState!==null,jl(e,t,a),Tt=l;break;default:jl(e,t,a)}}function lh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{yr(e)}catch(a){et(t,t.return,a)}}}function nh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{yr(e)}catch(a){et(t,t.return,a)}}function Sg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Pm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Pm),t;default:throw Error(o(435,e.tag))}}function Us(e,t){var a=Sg(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var i=Mg.bind(null,e,l);l.then(i,i)}})}function na(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var i=a[l],u=e,m=t,g=m;e:for(;g!==null;){switch(g.tag){case 27:if(Fl(g.type)){mt=g.stateNode,la=!1;break e}break;case 5:mt=g.stateNode,la=!1;break e;case 3:case 4:mt=g.stateNode.containerInfo,la=!0;break e}g=g.return}if(mt===null)throw Error(o(160));ah(u,m,i),mt=null,la=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)rh(t,e),t=t.sibling}var Ya=null;function rh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:na(t,e),ra(e),l&4&&(Gl(3,e,e.return),ri(3,e),Gl(5,e,e.return));break;case 1:na(t,e),ra(e),l&512&&(Tt||a===null||Ja(a,a.return)),l&64&&Sl&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var i=Ya;if(na(t,e),ra(e),l&512&&(Tt||a===null||Ja(a,a.return)),l&4){var u=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,i=i.ownerDocument||i;t:switch(l){case"title":u=i.getElementsByTagName("title")[0],(!u||u[ze]||u[P]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(l),i.head.insertBefore(u,i.querySelector("head > title"))),Bt(u,l,a),u[P]=e,$e(u),l=u;break e;case"link":var m=rv("link","href",i).get(l+(a.href||""));if(m){for(var g=0;g<m.length;g++)if(u=m[g],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){m.splice(g,1);break t}}u=i.createElement(l),Bt(u,l,a),i.head.appendChild(u);break;case"meta":if(m=rv("meta","content",i).get(l+(a.content||""))){for(g=0;g<m.length;g++)if(u=m[g],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){m.splice(g,1);break t}}u=i.createElement(l),Bt(u,l,a),i.head.appendChild(u);break;default:throw Error(o(468,l))}u[P]=e,$e(u),l=u}e.stateNode=l}else iv(i,e.type,e.stateNode);else e.stateNode=nv(i,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?iv(i,e.type,e.stateNode):nv(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ao(e,e.memoizedProps,a.memoizedProps)}break;case 27:na(t,e),ra(e),l&512&&(Tt||a===null||Ja(a,a.return)),a!==null&&l&4&&ao(e,e.memoizedProps,a.memoizedProps);break;case 5:if(na(t,e),ra(e),l&512&&(Tt||a===null||Ja(a,a.return)),e.flags&32){i=e.stateNode;try{Yn(i,"")}catch(re){et(e,e.return,re)}}l&4&&e.stateNode!=null&&(i=e.memoizedProps,ao(e,i,a!==null?a.memoizedProps:i)),l&1024&&(ro=!0);break;case 6:if(na(t,e),ra(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(re){et(e,e.return,re)}}break;case 3:if(Is=null,i=Ya,Ya=Fs(t.containerInfo),na(t,e),Ya=i,ra(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{yr(t.containerInfo)}catch(re){et(e,e.return,re)}ro&&(ro=!1,ih(e));break;case 4:l=Ya,Ya=Fs(e.stateNode.containerInfo),na(t,e),ra(e),Ya=l;break;case 12:na(t,e),ra(e);break;case 31:na(t,e),ra(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Us(e,l)));break;case 13:na(t,e),ra(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Hs=dt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Us(e,l)));break;case 22:i=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,O=Sl,$=Tt;if(Sl=O||i,Tt=$||E,na(t,e),Tt=$,Sl=O,ra(e),l&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||E||Sl||Tt||Rn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(u=E.stateNode,i)m=u.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{g=E.stateNode;var G=E.memoizedProps.style,U=G!=null&&G.hasOwnProperty("display")?G.display:null;g.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(re){et(E,E.return,re)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=i?"":E.memoizedProps}catch(re){et(E,E.return,re)}}}else if(t.tag===18){if(a===null){E=t;try{var L=E.stateNode;i?Jh(L,!0):Jh(E.stateNode,!1)}catch(re){et(E,E.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Us(e,a))));break;case 19:na(t,e),ra(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Us(e,l)));break;case 30:break;case 21:break;default:na(t,e),ra(e)}}function ra(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Wm(l)){a=l;break}l=l.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,u=lo(e);ks(e,u,i);break;case 5:var m=a.stateNode;a.flags&32&&(Yn(m,""),a.flags&=-33);var g=lo(e);ks(e,g,m);break;case 3:case 4:var E=a.stateNode.containerInfo,O=lo(e);no(e,O,E);break;default:throw Error(o(161))}}catch($){et(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ih(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ih(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Nl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)eh(e,t.alternate,t),t=t.sibling}function Rn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gl(4,t,t.return),Rn(t);break;case 1:Ja(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Jm(t,t.return,a),Rn(t);break;case 27:vi(t.stateNode);case 26:case 5:Ja(t,t.return),Rn(t);break;case 22:t.memoizedState===null&&Rn(t);break;case 30:Rn(t);break;default:Rn(t)}e=e.sibling}}function El(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,i=e,u=t,m=u.flags;switch(u.tag){case 0:case 11:case 15:El(i,u,a),ri(4,u);break;case 1:if(El(i,u,a),l=u,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(O){et(l,l.return,O)}if(l=u,i=l.updateQueue,i!==null){var g=l.stateNode;try{var E=i.shared.hiddenCallbacks;if(E!==null)for(i.shared.hiddenCallbacks=null,i=0;i<E.length;i++)Ld(E[i],g)}catch(O){et(l,l.return,O)}}a&&m&64&&Km(u),ii(u,u.return);break;case 27:Im(u);case 26:case 5:El(i,u,a),a&&l===null&&m&4&&Fm(u),ii(u,u.return);break;case 12:El(i,u,a);break;case 31:El(i,u,a),a&&m&4&&lh(i,u);break;case 13:El(i,u,a),a&&m&4&&nh(i,u);break;case 22:u.memoizedState===null&&El(i,u,a),ii(u,u.return);break;case 30:break;default:El(i,u,a)}t=t.sibling}}function io(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Qr(a))}function so(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qr(e))}function Ga(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)sh(e,t,a,l),t=t.sibling}function sh(e,t,a,l){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ga(e,t,a,l),i&2048&&ri(9,t);break;case 1:Ga(e,t,a,l);break;case 3:Ga(e,t,a,l),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qr(e)));break;case 12:if(i&2048){Ga(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,m=u.id,g=u.onPostCommit;typeof g=="function"&&g(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){et(t,t.return,E)}}else Ga(e,t,a,l);break;case 31:Ga(e,t,a,l);break;case 13:Ga(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,m=t.alternate,t.memoizedState!==null?u._visibility&2?Ga(e,t,a,l):si(e,t):u._visibility&2?Ga(e,t,a,l):(u._visibility|=2,ur(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),i&2048&&io(m,t);break;case 24:Ga(e,t,a,l),i&2048&&so(t.alternate,t);break;default:Ga(e,t,a,l)}}function ur(e,t,a,l,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,m=t,g=a,E=l,O=m.flags;switch(m.tag){case 0:case 11:case 15:ur(u,m,g,E,i),ri(8,m);break;case 23:break;case 22:var $=m.stateNode;m.memoizedState!==null?$._visibility&2?ur(u,m,g,E,i):si(u,m):($._visibility|=2,ur(u,m,g,E,i)),i&&O&2048&&io(m.alternate,m);break;case 24:ur(u,m,g,E,i),i&&O&2048&&so(m.alternate,m);break;default:ur(u,m,g,E,i)}t=t.sibling}}function si(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,i=l.flags;switch(l.tag){case 22:si(a,l),i&2048&&io(l.alternate,l);break;case 24:si(a,l),i&2048&&so(l.alternate,l);break;default:si(a,l)}t=t.sibling}}var ui=8192;function cr(e,t,a){if(e.subtreeFlags&ui)for(e=e.child;e!==null;)uh(e,t,a),e=e.sibling}function uh(e,t,a){switch(e.tag){case 26:cr(e,t,a),e.flags&ui&&e.memoizedState!==null&&sy(a,Ya,e.memoizedState,e.memoizedProps);break;case 5:cr(e,t,a);break;case 3:case 4:var l=Ya;Ya=Fs(e.stateNode.containerInfo),cr(e,t,a),Ya=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=ui,ui=16777216,cr(e,t,a),ui=l):cr(e,t,a));break;default:cr(e,t,a)}}function ch(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ci(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];zt=l,fh(l,e)}ch(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)oh(e),e=e.sibling}function oh(e){switch(e.tag){case 0:case 11:case 15:ci(e),e.flags&2048&&Gl(9,e,e.return);break;case 3:ci(e);break;case 12:ci(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ls(e)):ci(e);break;default:ci(e)}}function Ls(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];zt=l,fh(l,e)}ch(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gl(8,t,t.return),Ls(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Ls(t));break;default:Ls(t)}e=e.sibling}}function fh(e,t){for(;zt!==null;){var a=zt;switch(a.tag){case 0:case 11:case 15:Gl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Qr(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,zt=l;else e:for(a=e;zt!==null;){l=zt;var i=l.sibling,u=l.return;if(th(l),l===a){zt=null;break e}if(i!==null){i.return=u,zt=i;break e}zt=u}}}var jg={getCacheForType:function(e){var t=Lt(Et),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Lt(Et).controller.signal}},Ng=typeof WeakMap=="function"?WeakMap:Map,Ze=0,it=null,_e=null,Ue=0,Pe=0,ma=null,Vl=!1,or=!1,uo=!1,wl=0,pt=0,Xl=0,Tn=0,co=0,ha=0,fr=0,oi=null,ia=null,oo=!1,Hs=0,dh=0,Bs=1/0,qs=null,Ql=null,Ct=0,Zl=null,dr=null,Rl=0,fo=0,mo=null,mh=null,fi=0,ho=null;function va(){return(Ze&2)!==0&&Ue!==0?Ue&-Ue:H.T!==null?bo():V()}function hh(){if(ha===0)if((Ue&536870912)===0||Be){var e=sl;sl<<=1,(sl&3932160)===0&&(sl=262144),ha=e}else ha=536870912;return e=fa.current,e!==null&&(e.flags|=32),ha}function sa(e,t,a){(e===it&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)&&(mr(e,0),Kl(e,Ue,ha,!1)),Qa(e,a),((Ze&2)===0||e!==it)&&(e===it&&((Ze&2)===0&&(Tn|=a),pt===4&&Kl(e,Ue,ha,!1)),Fa(e))}function vh(e,t,a){if((Ze&6)!==0)throw Error(o(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ml(e,t),i=l?Rg(e,t):po(e,t,!0),u=l;do{if(i===0){or&&!l&&Kl(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Eg(a)){i=po(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var g=e;i=oi;var E=g.current.memoizedState.isDehydrated;if(E&&(mr(g,m).flags|=256),m=po(g,m,!1),m!==2){if(uo&&!E){g.errorRecoveryDisabledLanes|=u,Tn|=u,i=4;break e}u=ia,ia=i,u!==null&&(ia===null?ia=u:ia.push.apply(ia,u))}i=m}if(u=!1,i!==2)continue}}if(i===1){mr(e,0),Kl(e,t,0,!0);break}e:{switch(l=e,u=i,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Kl(l,t,ha,!Vl);break e;case 2:ia=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=Hs+300-dt(),10<i)){if(Kl(l,t,ha,!Vl),Un(l,0,!0)!==0)break e;Rl=t,l.timeoutHandle=Qh(ph.bind(null,l,a,ia,qs,oo,t,ha,Tn,fr,Vl,u,"Throttled",-0,0),i);break e}ph(l,a,ia,qs,oo,t,ha,Tn,fr,Vl,u,null,-0,0)}}break}while(!0);Fa(e)}function ph(e,t,a,l,i,u,m,g,E,O,$,G,U,L){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fl},uh(t,u,G);var re=(u&62914560)===u?Hs-dt():(u&4194048)===u?dh-dt():0;if(re=uy(G,re),re!==null){Rl=u,e.cancelPendingCommit=re(Eh.bind(null,e,t,u,a,l,i,m,g,E,$,G,null,U,L)),Kl(e,u,m,!O);return}}Eh(e,t,u,a,l,i,m,g,E)}function Eg(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var i=a[l],u=i.getSnapshot;i=i.value;try{if(!ca(u(),i))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Kl(e,t,a,l){t&=~co,t&=~Tn,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var i=t;0<i;){var u=31-$t(i),m=1<<u;l[u]=-1,i&=~m}a!==0&&Ii(e,a,t)}function $s(){return(Ze&6)===0?(di(0),!1):!0}function vo(){if(_e!==null){if(Pe===0)var e=_e.return;else e=_e,vl=gn=null,Mc(e),lr=null,Kr=0,e=_e;for(;e!==null;)Zm(e.alternate,e),e=e.return;_e=null}}function mr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Vg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Rl=0,vo(),it=e,_e=a=ml(e.current,null),Ue=t,Pe=0,ma=null,Vl=!1,or=Ml(e,t),uo=!1,fr=ha=co=Tn=Xl=pt=0,ia=oi=null,oo=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var i=31-$t(l),u=1<<i;t|=e[i],l&=~u}return wl=t,us(),a}function xh(e,t){Ce=null,H.H=ai,t===ar||t===ps?(t=_d(),Pe=3):t===gc?(t=_d(),Pe=4):Pe=t===Qc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ma=t,_e===null&&(pt=1,Ms(e,ja(t,e.current)))}function gh(){var e=fa.current;return e===null?!0:(Ue&4194048)===Ue?Ra===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===Ra:!1}function yh(){var e=H.H;return H.H=ai,e===null?ai:e}function bh(){var e=H.A;return H.A=jg,e}function Ys(){pt=4,Vl||(Ue&4194048)!==Ue&&fa.current!==null||(or=!0),(Xl&134217727)===0&&(Tn&134217727)===0||it===null||Kl(it,Ue,ha,!1)}function po(e,t,a){var l=Ze;Ze|=2;var i=yh(),u=bh();(it!==e||Ue!==t)&&(qs=null,mr(e,t)),t=!1;var m=pt;e:do try{if(Pe!==0&&_e!==null){var g=_e,E=ma;switch(Pe){case 8:vo(),m=6;break e;case 3:case 2:case 9:case 6:fa.current===null&&(t=!0);var O=Pe;if(Pe=0,ma=null,hr(e,g,E,O),a&&or){m=0;break e}break;default:O=Pe,Pe=0,ma=null,hr(e,g,E,O)}}wg(),m=pt;break}catch($){xh(e,$)}while(!0);return t&&e.shellSuspendCounter++,vl=gn=null,Ze=l,H.H=i,H.A=u,_e===null&&(it=null,Ue=0,us()),m}function wg(){for(;_e!==null;)Sh(_e)}function Rg(e,t){var a=Ze;Ze|=2;var l=yh(),i=bh();it!==e||Ue!==t?(qs=null,Bs=dt()+500,mr(e,t)):or=Ml(e,t);e:do try{if(Pe!==0&&_e!==null){t=_e;var u=ma;t:switch(Pe){case 1:Pe=0,ma=null,hr(e,t,u,1);break;case 2:case 9:if(zd(u)){Pe=0,ma=null,jh(t);break}t=function(){Pe!==2&&Pe!==9||it!==e||(Pe=7),Fa(e)},u.then(t,t);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:zd(u)?(Pe=0,ma=null,jh(t)):(Pe=0,ma=null,hr(e,t,u,7));break;case 5:var m=null;switch(_e.tag){case 26:m=_e.memoizedState;case 5:case 27:var g=_e;if(m?sv(m):g.stateNode.complete){Pe=0,ma=null;var E=g.sibling;if(E!==null)_e=E;else{var O=g.return;O!==null?(_e=O,Gs(O)):_e=null}break t}}Pe=0,ma=null,hr(e,t,u,5);break;case 6:Pe=0,ma=null,hr(e,t,u,6);break;case 8:vo(),pt=6;break e;default:throw Error(o(462))}}Tg();break}catch($){xh(e,$)}while(!0);return vl=gn=null,H.H=l,H.A=i,Ze=a,_e!==null?0:(it=null,Ue=0,us(),pt)}function Tg(){for(;_e!==null&&!ka();)Sh(_e)}function Sh(e){var t=Xm(e.alternate,e,wl);e.memoizedProps=e.pendingProps,t===null?Gs(e):_e=t}function jh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Bm(a,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=Bm(a,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Mc(t);default:Zm(a,t),t=_e=bd(t,wl),t=Xm(a,t,wl)}e.memoizedProps=e.pendingProps,t===null?Gs(e):_e=t}function hr(e,t,a,l){vl=gn=null,Mc(t),lr=null,Kr=0;var i=t.return;try{if(vg(e,i,t,a,Ue)){pt=1,Ms(e,ja(a,e.current)),_e=null;return}}catch(u){if(i!==null)throw _e=i,u;pt=1,Ms(e,ja(a,e.current)),_e=null;return}t.flags&32768?(Be||l===1?e=!0:or||(Ue&536870912)!==0?e=!1:(Vl=e=!0,(l===2||l===9||l===3||l===6)&&(l=fa.current,l!==null&&l.tag===13&&(l.flags|=16384))),Nh(t,e)):Gs(t)}function Gs(e){var t=e;do{if((t.flags&32768)!==0){Nh(t,Vl);return}e=t.return;var a=gg(t.alternate,t,wl);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);pt===0&&(pt=5)}function Nh(e,t){do{var a=yg(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);pt=6,_e=null}function Eh(e,t,a,l,i,u,m,g,E){e.cancelPendingCommit=null;do Vs();while(Ct!==0);if((Ze&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=lc,Wi(e,a,u,m,g,E),e===it&&(_e=it=null,Ue=0),dr=t,Zl=e,Rl=a,fo=u,mo=i,mh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zg(kt,function(){return Ch(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=H.T,H.T=null,i=X.p,X.p=2,m=Ze,Ze|=4;try{bg(e,t,a)}finally{Ze=m,X.p=i,H.T=l}}Ct=1,wh(),Rh(),Th()}}function wh(){if(Ct===1){Ct=0;var e=Zl,t=dr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var l=X.p;X.p=2;var i=Ze;Ze|=4;try{rh(t,e);var u=Do,m=fd(e.containerInfo),g=u.focusedElem,E=u.selectionRange;if(m!==g&&g&&g.ownerDocument&&od(g.ownerDocument.documentElement,g)){if(E!==null&&Iu(g)){var O=E.start,$=E.end;if($===void 0&&($=O),"selectionStart"in g)g.selectionStart=O,g.selectionEnd=Math.min($,g.value.length);else{var G=g.ownerDocument||document,U=G&&G.defaultView||window;if(U.getSelection){var L=U.getSelection(),re=g.textContent.length,ge=Math.min(E.start,re),nt=E.end===void 0?ge:Math.min(E.end,re);!L.extend&&ge>nt&&(m=nt,nt=ge,ge=m);var C=cd(g,ge),T=cd(g,nt);if(C&&T&&(L.rangeCount!==1||L.anchorNode!==C.node||L.anchorOffset!==C.offset||L.focusNode!==T.node||L.focusOffset!==T.offset)){var _=G.createRange();_.setStart(C.node,C.offset),L.removeAllRanges(),ge>nt?(L.addRange(_),L.extend(T.node,T.offset)):(_.setEnd(T.node,T.offset),L.addRange(_))}}}}for(G=[],L=g;L=L.parentNode;)L.nodeType===1&&G.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<G.length;g++){var Y=G[g];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}au=!!To,Do=To=null}finally{Ze=i,X.p=l,H.T=a}}e.current=t,Ct=2}}function Rh(){if(Ct===2){Ct=0;var e=Zl,t=dr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var l=X.p;X.p=2;var i=Ze;Ze|=4;try{eh(e,t.alternate,t)}finally{Ze=i,X.p=l,H.T=a}}Ct=3}}function Th(){if(Ct===4||Ct===3){Ct=0,rl();var e=Zl,t=dr,a=Rl,l=mh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ct=5:(Ct=0,dr=Zl=null,Dh(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ql=null),A(a),t=t.stateNode,Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(il,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=H.T,i=X.p,X.p=2,H.T=null;try{for(var u=e.onRecoverableError,m=0;m<l.length;m++){var g=l[m];u(g.value,{componentStack:g.stack})}}finally{H.T=t,X.p=i}}(Rl&3)!==0&&Vs(),Fa(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===ho?fi++:(fi=0,ho=e):fi=0,di(0)}}function Dh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Qr(t)))}function Vs(){return wh(),Rh(),Th(),Ch()}function Ch(){if(Ct!==5)return!1;var e=Zl,t=fo;fo=0;var a=A(Rl),l=H.T,i=X.p;try{X.p=32>a?32:a,H.T=null,a=mo,mo=null;var u=Zl,m=Rl;if(Ct=0,dr=Zl=null,Rl=0,(Ze&6)!==0)throw Error(o(331));var g=Ze;if(Ze|=4,oh(u.current),sh(u,u.current,m,a),Ze=g,di(0,!1),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(il,u)}catch{}return!0}finally{X.p=i,H.T=l,Dh(e,t)}}function Mh(e,t,a){t=ja(a,t),t=Xc(e.stateNode,t,2),e=ql(e,t,2),e!==null&&(Qa(e,2),Fa(e))}function et(e,t,a){if(e.tag===3)Mh(e,e,a);else for(;t!==null;){if(t.tag===3){Mh(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ql===null||!Ql.has(l))){e=ja(a,e),a=zm(2),l=ql(t,a,2),l!==null&&(Am(a,l,t,e),Qa(l,2),Fa(l));break}}t=t.return}}function xo(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Ng;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(a)||(uo=!0,i.add(a),e=Dg.bind(null,e,t,a),t.then(e,e))}function Dg(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,it===e&&(Ue&a)===a&&(pt===4||pt===3&&(Ue&62914560)===Ue&&300>dt()-Hs?(Ze&2)===0&&mr(e,0):co|=a,fr===Ue&&(fr=0)),Fa(e)}function zh(e,t){t===0&&(t=_r()),e=vn(e,t),e!==null&&(Qa(e,t),Fa(e))}function Cg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),zh(e,a)}function Mg(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),zh(e,a)}function zg(e,t){return ut(e,t)}var Xs=null,vr=null,go=!1,Qs=!1,yo=!1,Jl=0;function Fa(e){e!==vr&&e.next===null&&(vr===null?Xs=vr=e:vr=vr.next=e),Qs=!0,go||(go=!0,_g())}function di(e,t){if(!yo&&Qs){yo=!0;do for(var a=!1,l=Xs;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var u=0;else{var m=l.suspendedLanes,g=l.pingedLanes;u=(1<<31-$t(42|e)+1)-1,u&=i&~(m&~g),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,kh(l,u))}else u=Ue,u=Un(l,l===it?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||Ml(l,u)||(a=!0,kh(l,u));l=l.next}while(a);yo=!1}}function Ag(){Ah()}function Ah(){Qs=go=!1;var e=0;Jl!==0&&Gg()&&(e=Jl);for(var t=dt(),a=null,l=Xs;l!==null;){var i=l.next,u=_h(l,t);u===0?(l.next=null,a===null?Xs=i:a.next=i,i===null&&(vr=a)):(a=l,(e!==0||(u&3)!==0)&&(Qs=!0)),l=i}Ct!==0&&Ct!==5||di(e),Jl!==0&&(Jl=0)}function _h(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var m=31-$t(u),g=1<<m,E=i[m];E===-1?((g&a)===0||(g&l)!==0)&&(i[m]=Lu(g,t)):E<=t&&(e.expiredLanes|=g),u&=~g}if(t=it,a=Ue,a=Un(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qt(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ml(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Qt(l),A(a)){case 2:case 8:a=Zt;break;case 32:a=kt;break;case 268435456:a=ya;break;default:a=kt}return l=Oh.bind(null,e),a=ut(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Qt(l),e.callbackPriority=2,e.callbackNode=null,2}function Oh(e,t){if(Ct!==0&&Ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Vs()&&e.callbackNode!==a)return null;var l=Ue;return l=Un(e,e===it?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(vh(e,l,t),_h(e,dt()),e.callbackNode!=null&&e.callbackNode===a?Oh.bind(null,e):null)}function kh(e,t){if(Vs())return null;vh(e,t,!0)}function _g(){Xg(function(){(Ze&6)!==0?ut(Ua,Ag):Ah()})}function bo(){if(Jl===0){var e=er;e===0&&(e=on,on<<=1,(on&261888)===0&&(on=256)),Jl=e}return Jl}function Uh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:es(""+e)}function Lh(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Og(e,t,a,l,i){if(t==="submit"&&a&&a.stateNode===i){var u=Uh((i[oe]||null).action),m=l.submitter;m&&(t=(t=m[oe]||null)?Uh(t.formAction):m.getAttribute("formAction"),t!==null&&(u=t,m=null));var g=new ns("action","action",null,l,i);e.push({event:g,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Jl!==0){var E=m?Lh(i,m):new FormData(i);Bc(a,{pending:!0,data:E,method:i.method,action:u},null,E)}}else typeof u=="function"&&(g.preventDefault(),E=m?Lh(i,m):new FormData(i),Bc(a,{pending:!0,data:E,method:i.method,action:u},u,E))},currentTarget:i}]})}}for(var So=0;So<ac.length;So++){var jo=ac[So],kg=jo.toLowerCase(),Ug=jo[0].toUpperCase()+jo.slice(1);$a(kg,"on"+Ug)}$a(hd,"onAnimationEnd"),$a(vd,"onAnimationIteration"),$a(pd,"onAnimationStart"),$a("dblclick","onDoubleClick"),$a("focusin","onFocus"),$a("focusout","onBlur"),$a(Ix,"onTransitionRun"),$a(Px,"onTransitionStart"),$a(eg,"onTransitionCancel"),$a(xd,"onTransitionEnd"),Jt("onMouseEnter",["mouseout","mouseover"]),Jt("onMouseLeave",["mouseout","mouseover"]),Jt("onPointerEnter",["pointerout","pointerover"]),Jt("onPointerLeave",["pointerout","pointerover"]),ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ta("onBeforeInput",["compositionend","keypress","textInput","paste"]),ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mi));function Hh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],i=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var m=l.length-1;0<=m;m--){var g=l[m],E=g.instance,O=g.currentTarget;if(g=g.listener,E!==u&&i.isPropagationStopped())break e;u=g,i.currentTarget=O;try{u(i)}catch($){ss($)}i.currentTarget=null,u=E}else for(m=0;m<l.length;m++){if(g=l[m],E=g.instance,O=g.currentTarget,g=g.listener,E!==u&&i.isPropagationStopped())break e;u=g,i.currentTarget=O;try{u(i)}catch($){ss($)}i.currentTarget=null,u=E}}}}function Oe(e,t){var a=t[ce];a===void 0&&(a=t[ce]=new Set);var l=e+"__bubble";a.has(l)||(Bh(t,e,2,!1),a.add(l))}function No(e,t,a){var l=0;t&&(l|=4),Bh(a,e,l,t)}var Zs="_reactListening"+Math.random().toString(36).slice(2);function Eo(e){if(!e[Zs]){e[Zs]=!0,Al.forEach(function(a){a!=="selectionchange"&&(Lg.has(a)||No(a,!1,e),No(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zs]||(t[Zs]=!0,No("selectionchange",!1,t))}}function Bh(e,t,a,l){switch(hv(t)){case 2:var i=fy;break;case 8:i=dy;break;default:i=Bo}a=i.bind(null,t,a,e),i=void 0,!Gu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function wo(e,t,a,l,i){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var g=l.stateNode.containerInfo;if(g===i)break;if(m===4)for(m=l.return;m!==null;){var E=m.tag;if((E===3||E===4)&&m.stateNode.containerInfo===i)return;m=m.return}for(;g!==null;){if(m=ct(g),m===null)return;if(E=m.tag,E===5||E===6||E===26||E===27){l=u=m;continue e}g=g.parentNode}}l=l.return}Vf(function(){var O=u,$=$u(a),G=[];e:{var U=gd.get(e);if(U!==void 0){var L=ns,re=e;switch(e){case"keypress":if(as(a)===0)break e;case"keydown":case"keyup":L=Mx;break;case"focusin":re="focus",L=Zu;break;case"focusout":re="blur",L=Zu;break;case"beforeblur":case"afterblur":L=Zu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=Zf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=gx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=_x;break;case hd:case vd:case pd:L=Sx;break;case xd:L=kx;break;case"scroll":case"scrollend":L=px;break;case"wheel":L=Lx;break;case"copy":case"cut":case"paste":L=Nx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=Jf;break;case"toggle":case"beforetoggle":L=Bx}var ge=(t&4)!==0,nt=!ge&&(e==="scroll"||e==="scrollend"),C=ge?U!==null?U+"Capture":null:U;ge=[];for(var T=O,_;T!==null;){var Y=T;if(_=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||_===null||C===null||(Y=kr(T,C),Y!=null&&ge.push(hi(T,Y,_))),nt)break;T=T.return}0<ge.length&&(U=new L(U,re,null,a,$),G.push({event:U,listeners:ge}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",U&&a!==qu&&(re=a.relatedTarget||a.fromElement)&&(ct(re)||re[I]))break e;if((L||U)&&(U=$.window===$?$:(U=$.ownerDocument)?U.defaultView||U.parentWindow:window,L?(re=a.relatedTarget||a.toElement,L=O,re=re?ct(re):null,re!==null&&(nt=d(re),ge=re.tag,re!==nt||ge!==5&&ge!==27&&ge!==6)&&(re=null)):(L=null,re=O),L!==re)){if(ge=Zf,Y="onMouseLeave",C="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(ge=Jf,Y="onPointerLeave",C="onPointerEnter",T="pointer"),nt=L==null?U:qe(L),_=re==null?U:qe(re),U=new ge(Y,T+"leave",L,a,$),U.target=nt,U.relatedTarget=_,Y=null,ct($)===O&&(ge=new ge(C,T+"enter",re,a,$),ge.target=_,ge.relatedTarget=nt,Y=ge),nt=Y,L&&re)t:{for(ge=Hg,C=L,T=re,_=0,Y=C;Y;Y=ge(Y))_++;Y=0;for(var pe=T;pe;pe=ge(pe))Y++;for(;0<_-Y;)C=ge(C),_--;for(;0<Y-_;)T=ge(T),Y--;for(;_--;){if(C===T||T!==null&&C===T.alternate){ge=C;break t}C=ge(C),T=ge(T)}ge=null}else ge=null;L!==null&&qh(G,U,L,ge,!1),re!==null&&nt!==null&&qh(G,nt,re,ge,!0)}}e:{if(U=O?qe(O):window,L=U.nodeName&&U.nodeName.toLowerCase(),L==="select"||L==="input"&&U.type==="file")var Ve=ld;else if(td(U))if(nd)Ve=Jx;else{Ve=Zx;var ue=Qx}else L=U.nodeName,!L||L.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?O&&Bu(O.elementType)&&(Ve=ld):Ve=Kx;if(Ve&&(Ve=Ve(e,O))){ad(G,Ve,a,$);break e}ue&&ue(e,U,O),e==="focusout"&&O&&U.type==="number"&&O.memoizedProps.value!=null&&Hu(U,"number",U.value)}switch(ue=O?qe(O):window,e){case"focusin":(td(ue)||ue.contentEditable==="true")&&(Qn=ue,Pu=O,Gr=null);break;case"focusout":Gr=Pu=Qn=null;break;case"mousedown":ec=!0;break;case"contextmenu":case"mouseup":case"dragend":ec=!1,dd(G,a,$);break;case"selectionchange":if(Wx)break;case"keydown":case"keyup":dd(G,a,$)}var Me;if(Ju)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Xn?Pf(e,a)&&(Le="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Le="onCompositionStart");Le&&(Ff&&a.locale!=="ko"&&(Xn||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Xn&&(Me=Xf()):(_l=$,Vu="value"in _l?_l.value:_l.textContent,Xn=!0)),ue=Ks(O,Le),0<ue.length&&(Le=new Kf(Le,e,null,a,$),G.push({event:Le,listeners:ue}),Me?Le.data=Me:(Me=ed(a),Me!==null&&(Le.data=Me)))),(Me=$x?Yx(e,a):Gx(e,a))&&(Le=Ks(O,"onBeforeInput"),0<Le.length&&(ue=new Kf("onBeforeInput","beforeinput",null,a,$),G.push({event:ue,listeners:Le}),ue.data=Me)),Og(G,e,O,a,$)}Hh(G,t)})}function hi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ks(e,t){for(var a=t+"Capture",l=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=kr(e,a),i!=null&&l.unshift(hi(e,i,u)),i=kr(e,t),i!=null&&l.push(hi(e,i,u))),e.tag===3)return l;e=e.return}return[]}function Hg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function qh(e,t,a,l,i){for(var u=t._reactName,m=[];a!==null&&a!==l;){var g=a,E=g.alternate,O=g.stateNode;if(g=g.tag,E!==null&&E===l)break;g!==5&&g!==26&&g!==27||O===null||(E=O,i?(O=kr(a,u),O!=null&&m.unshift(hi(a,O,E))):i||(O=kr(a,u),O!=null&&m.push(hi(a,O,E)))),a=a.return}m.length!==0&&e.push({event:t,listeners:m})}var Bg=/\r\n?/g,qg=/\u0000|\uFFFD/g;function $h(e){return(typeof e=="string"?e:""+e).replace(Bg,`
49
+ `).replace(qg,"")}function Yh(e,t){return t=$h(t),$h(e)===t}function lt(e,t,a,l,i,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Yn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Yn(e,""+l);break;case"className":cl(e,"class",l);break;case"tabIndex":cl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":cl(e,a,l);break;case"style":Yf(e,l,u);break;case"data":if(t!=="object"){cl(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=es(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&lt(e,t,"name",i.name,i,null),lt(e,t,"formEncType",i.formEncType,i,null),lt(e,t,"formMethod",i.formMethod,i,null),lt(e,t,"formTarget",i.formTarget,i,null)):(lt(e,t,"encType",i.encType,i,null),lt(e,t,"method",i.method,i,null),lt(e,t,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=es(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=fl);break;case"onScroll":l!=null&&Oe("scroll",e);break;case"onScrollEnd":l!=null&&Oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=es(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Oe("beforetoggle",e),Oe("toggle",e),ul(e,"popover",l);break;case"xlinkActuate":Ne(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ne(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ne(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ne(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ne(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ne(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ne(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ne(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ne(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ul(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=hx.get(a)||a,ul(e,a,l))}}function Ro(e,t,a,l,i,u){switch(a){case"style":Yf(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Yn(e,l):(typeof l=="number"||typeof l=="bigint")&&Yn(e,""+l);break;case"onScroll":l!=null&&Oe("scroll",e);break;case"onScrollEnd":l!=null&&Oe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=fl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ha.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),u=e[oe]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof l=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,i);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ul(e,a,l)}}}function Bt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var l=!1,i=!1,u;for(u in a)if(a.hasOwnProperty(u)){var m=a[u];if(m!=null)switch(u){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:lt(e,t,u,m,a,null)}}i&&lt(e,t,"srcSet",a.srcSet,a,null),l&&lt(e,t,"src",a.src,a,null);return;case"input":Oe("invalid",e);var g=u=m=i=null,E=null,O=null;for(l in a)if(a.hasOwnProperty(l)){var $=a[l];if($!=null)switch(l){case"name":i=$;break;case"type":m=$;break;case"checked":E=$;break;case"defaultChecked":O=$;break;case"value":u=$;break;case"defaultValue":g=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(o(137,t));break;default:lt(e,t,l,$,a,null)}}Hf(e,u,g,E,O,m,i,!1);return;case"select":Oe("invalid",e),l=m=u=null;for(i in a)if(a.hasOwnProperty(i)&&(g=a[i],g!=null))switch(i){case"value":u=g;break;case"defaultValue":m=g;break;case"multiple":l=g;default:lt(e,t,i,g,a,null)}t=u,a=m,e.multiple=!!l,t!=null?$n(e,!!l,t,!1):a!=null&&$n(e,!!l,a,!0);return;case"textarea":Oe("invalid",e),u=i=l=null;for(m in a)if(a.hasOwnProperty(m)&&(g=a[m],g!=null))switch(m){case"value":l=g;break;case"defaultValue":i=g;break;case"children":u=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(o(91));break;default:lt(e,t,m,g,a,null)}qf(e,l,i,u);return;case"option":for(E in a)if(a.hasOwnProperty(E)&&(l=a[E],l!=null))switch(E){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:lt(e,t,E,l,a,null)}return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(l=0;l<mi.length;l++)Oe(mi[l],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(O in a)if(a.hasOwnProperty(O)&&(l=a[O],l!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:lt(e,t,O,l,a,null)}return;default:if(Bu(t)){for($ in a)a.hasOwnProperty($)&&(l=a[$],l!==void 0&&Ro(e,t,$,l,a,void 0));return}}for(g in a)a.hasOwnProperty(g)&&(l=a[g],l!=null&&lt(e,t,g,l,a,null))}function $g(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,u=null,m=null,g=null,E=null,O=null,$=null;for(L in a){var G=a[L];if(a.hasOwnProperty(L)&&G!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":E=G;default:l.hasOwnProperty(L)||lt(e,t,L,null,l,G)}}for(var U in l){var L=l[U];if(G=a[U],l.hasOwnProperty(U)&&(L!=null||G!=null))switch(U){case"type":u=L;break;case"name":i=L;break;case"checked":O=L;break;case"defaultChecked":$=L;break;case"value":m=L;break;case"defaultValue":g=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:L!==G&&lt(e,t,U,L,l,G)}}Or(e,m,g,E,O,$,u,i);return;case"select":L=m=g=U=null;for(u in a)if(E=a[u],a.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":L=E;default:l.hasOwnProperty(u)||lt(e,t,u,null,l,E)}for(i in l)if(u=l[i],E=a[i],l.hasOwnProperty(i)&&(u!=null||E!=null))switch(i){case"value":U=u;break;case"defaultValue":g=u;break;case"multiple":m=u;default:u!==E&&lt(e,t,i,u,l,E)}t=g,a=m,l=L,U!=null?$n(e,!!a,U,!1):!!l!=!!a&&(t!=null?$n(e,!!a,t,!0):$n(e,!!a,a?[]:"",!1));return;case"textarea":L=U=null;for(g in a)if(i=a[g],a.hasOwnProperty(g)&&i!=null&&!l.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:lt(e,t,g,null,l,i)}for(m in l)if(i=l[m],u=a[m],l.hasOwnProperty(m)&&(i!=null||u!=null))switch(m){case"value":U=i;break;case"defaultValue":L=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==u&&lt(e,t,m,i,l,u)}Bf(e,U,L);return;case"option":for(var re in a)if(U=a[re],a.hasOwnProperty(re)&&U!=null&&!l.hasOwnProperty(re))switch(re){case"selected":e.selected=!1;break;default:lt(e,t,re,null,l,U)}for(E in l)if(U=l[E],L=a[E],l.hasOwnProperty(E)&&U!==L&&(U!=null||L!=null))switch(E){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:lt(e,t,E,U,l,L)}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 ge in a)U=a[ge],a.hasOwnProperty(ge)&&U!=null&&!l.hasOwnProperty(ge)&&lt(e,t,ge,null,l,U);for(O in l)if(U=l[O],L=a[O],l.hasOwnProperty(O)&&U!==L&&(U!=null||L!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:lt(e,t,O,U,l,L)}return;default:if(Bu(t)){for(var nt in a)U=a[nt],a.hasOwnProperty(nt)&&U!==void 0&&!l.hasOwnProperty(nt)&&Ro(e,t,nt,void 0,l,U);for($ in l)U=l[$],L=a[$],!l.hasOwnProperty($)||U===L||U===void 0&&L===void 0||Ro(e,t,$,U,l,L);return}}for(var C in a)U=a[C],a.hasOwnProperty(C)&&U!=null&&!l.hasOwnProperty(C)&&lt(e,t,C,null,l,U);for(G in l)U=l[G],L=a[G],!l.hasOwnProperty(G)||U===L||U==null&&L==null||lt(e,t,G,U,l,L)}function Gh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Yg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var i=a[l],u=i.transferSize,m=i.initiatorType,g=i.duration;if(u&&g&&Gh(m)){for(m=0,g=i.responseEnd,l+=1;l<a.length;l++){var E=a[l],O=E.startTime;if(O>g)break;var $=E.transferSize,G=E.initiatorType;$&&Gh(G)&&(E=E.responseEnd,m+=$*(E<g?1:(g-O)/(E-O)))}if(--l,t+=8*(u+m)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var To=null,Do=null;function Js(e){return e.nodeType===9?e:e.ownerDocument}function Vh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Xh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Co(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Mo=null;function Gg(){var e=window.event;return e&&e.type==="popstate"?e===Mo?!1:(Mo=e,!0):(Mo=null,!1)}var Qh=typeof setTimeout=="function"?setTimeout:void 0,Vg=typeof clearTimeout=="function"?clearTimeout:void 0,Zh=typeof Promise=="function"?Promise:void 0,Xg=typeof queueMicrotask=="function"?queueMicrotask:typeof Zh<"u"?function(e){return Zh.resolve(null).then(e).catch(Qg)}:Qh;function Qg(e){setTimeout(function(){throw e})}function Fl(e){return e==="head"}function Kh(e,t){var a=t,l=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(i),yr(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")vi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,vi(a);for(var u=a.firstChild;u;){var m=u.nextSibling,g=u.nodeName;u[ze]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=m}}else a==="body"&&vi(e.ownerDocument.body);a=i}while(a);yr(t)}function Jh(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function zo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":zo(a),Ge(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Zg(e,t,a,l){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ze])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Ta(e.nextSibling),e===null)break}return null}function Kg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ta(e.nextSibling),e===null))return null;return e}function Fh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ta(e.nextSibling),e===null))return null;return e}function Ao(e){return e.data==="$?"||e.data==="$~"}function _o(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Jg(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ta(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Oo=null;function Wh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ta(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Ih(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Ph(e,t,a){switch(t=Js(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function vi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ge(e)}var Da=new Map,ev=new Set;function Fs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tl=X.d;X.d={f:Fg,r:Wg,D:Ig,C:Pg,L:ey,m:ty,X:ly,S:ay,M:ny};function Fg(){var e=Tl.f(),t=$s();return e||t}function Wg(e){var t=Je(e);t!==null&&t.tag===5&&t.type==="form"?xm(t):Tl.r(e)}var pr=typeof document>"u"?null:document;function tv(e,t,a){var l=pr;if(l&&typeof t=="string"&&t){var i=Ft(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),ev.has(i)||(ev.add(i),e={rel:e,crossOrigin:a,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),Bt(t,"link",e),$e(t),l.head.appendChild(t)))}}function Ig(e){Tl.D(e),tv("dns-prefetch",e,null)}function Pg(e,t){Tl.C(e,t),tv("preconnect",e,t)}function ey(e,t,a){Tl.L(e,t,a);var l=pr;if(l&&e&&t){var i='link[rel="preload"][as="'+Ft(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Ft(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Ft(a.imageSizes)+'"]')):i+='[href="'+Ft(e)+'"]';var u=i;switch(t){case"style":u=xr(e);break;case"script":u=gr(e)}Da.has(u)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Da.set(u,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(pi(u))||t==="script"&&l.querySelector(xi(u))||(t=l.createElement("link"),Bt(t,"link",e),$e(t),l.head.appendChild(t)))}}function ty(e,t){Tl.m(e,t);var a=pr;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Ft(l)+'"][href="'+Ft(e)+'"]',u=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=gr(e)}if(!Da.has(u)&&(e=y({rel:"modulepreload",href:e},t),Da.set(u,e),a.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(xi(u)))return}l=a.createElement("link"),Bt(l,"link",e),$e(l),a.head.appendChild(l)}}}function ay(e,t,a){Tl.S(e,t,a);var l=pr;if(l&&e){var i=xt(l).hoistableStyles,u=xr(e);t=t||"default";var m=i.get(u);if(!m){var g={loading:0,preload:null};if(m=l.querySelector(pi(u)))g.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Da.get(u))&&ko(e,a);var E=m=l.createElement("link");$e(E),Bt(E,"link",e),E._p=new Promise(function(O,$){E.onload=O,E.onerror=$}),E.addEventListener("load",function(){g.loading|=1}),E.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Ws(m,t,l)}m={type:"stylesheet",instance:m,count:1,state:g},i.set(u,m)}}}function ly(e,t){Tl.X(e,t);var a=pr;if(a&&e){var l=xt(a).hoistableScripts,i=gr(e),u=l.get(i);u||(u=a.querySelector(xi(i)),u||(e=y({src:e,async:!0},t),(t=Da.get(i))&&Uo(e,t),u=a.createElement("script"),$e(u),Bt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(i,u))}}function ny(e,t){Tl.M(e,t);var a=pr;if(a&&e){var l=xt(a).hoistableScripts,i=gr(e),u=l.get(i);u||(u=a.querySelector(xi(i)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Da.get(i))&&Uo(e,t),u=a.createElement("script"),$e(u),Bt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(i,u))}}function av(e,t,a,l){var i=(i=fe.current)?Fs(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=xr(a.href),a=xt(i).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=xr(a.href);var u=xt(i).hoistableStyles,m=u.get(e);if(m||(i=i.ownerDocument||i,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,m),(u=i.querySelector(pi(e)))&&!u._p&&(m.instance=u,m.state.loading=5),Da.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Da.set(e,a),u||ry(i,e,a,m.state))),t&&l===null)throw Error(o(528,""));return m}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=gr(a),a=xt(i).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function xr(e){return'href="'+Ft(e)+'"'}function pi(e){return'link[rel="stylesheet"]['+e+"]"}function lv(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function ry(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Bt(t,"link",a),$e(t),e.head.appendChild(t))}function gr(e){return'[src="'+Ft(e)+'"]'}function xi(e){return"script[async]"+e}function nv(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ft(a.href)+'"]');if(l)return t.instance=l,$e(l),l;var i=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),$e(l),Bt(l,"style",i),Ws(l,a.precedence,e),t.instance=l;case"stylesheet":i=xr(a.href);var u=e.querySelector(pi(i));if(u)return t.state.loading|=4,t.instance=u,$e(u),u;l=lv(a),(i=Da.get(i))&&ko(l,i),u=(e.ownerDocument||e).createElement("link"),$e(u);var m=u;return m._p=new Promise(function(g,E){m.onload=g,m.onerror=E}),Bt(u,"link",l),t.state.loading|=4,Ws(u,a.precedence,e),t.instance=u;case"script":return u=gr(a.src),(i=e.querySelector(xi(u)))?(t.instance=i,$e(i),i):(l=a,(i=Da.get(u))&&(l=y({},a),Uo(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),$e(i),Bt(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Ws(l,a.precedence,e));return t.instance}function Ws(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,u=i,m=0;m<l.length;m++){var g=l[m];if(g.dataset.precedence===t)u=g;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function ko(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Uo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Is=null;function rv(e,t,a){if(Is===null){var l=new Map,i=Is=new Map;i.set(a,l)}else i=Is,l=i.get(a),l||(l=new Map,i.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var u=a[i];if(!(u[ze]||u[P]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var m=u.getAttribute(t)||"";m=e+m;var g=l.get(m);g?g.push(u):l.set(m,[u])}}return l}function iv(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function iy(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function sv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function sy(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=xr(l.href),u=t.querySelector(pi(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ps.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,$e(u);return}u=t.ownerDocument||t,l=lv(l),(i=Da.get(i))&&ko(l,i),u=u.createElement("link"),$e(u);var m=u;m._p=new Promise(function(g,E){m.onload=g,m.onerror=E}),Bt(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ps.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Lo=0;function uy(e,t){return e.stylesheets&&e.count===0&&tu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&tu(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Lo===0&&(Lo=62500*Yg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&tu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Lo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function Ps(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var eu=null;function tu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,eu=new Map,t.forEach(cy,e),eu=null,Ps.call(e))}function cy(e,t){if(!(t.state.loading&4)){var a=eu.get(e);if(a)var l=a.get(null);else{a=new Map,eu.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var m=i[u];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(a.set(m.dataset.precedence,m),l=m)}l&&a.set(null,l)}i=t.instance,m=i.getAttribute("data-precedence"),u=a.get(m)||l,u===l&&a.set(null,i),a.set(m,i),this.count++,l=Ps.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var gi={$$typeof:W,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function oy(e,t,a,l,i,u,m,g,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zl(0),this.hiddenUpdates=zl(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function uv(e,t,a,l,i,u,m,g,E,O,$,G){return e=new oy(e,t,a,m,E,O,$,G,g),t=1,u===!0&&(t|=24),u=oa(3,null,null,t),e.current=u,u.stateNode=e,t=vc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},yc(u),e}function cv(e){return e?(e=Jn,e):Jn}function ov(e,t,a,l,i,u){i=cv(i),l.context===null?l.context=i:l.pendingContext=i,l=Bl(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=ql(e,l,t),a!==null&&(sa(a,e,t),Fr(a,e,t))}function fv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Ho(e,t){fv(e,t),(e=e.alternate)&&fv(e,t)}function dv(e){if(e.tag===13||e.tag===31){var t=vn(e,67108864);t!==null&&sa(t,e,67108864),Ho(e,67108864)}}function mv(e){if(e.tag===13||e.tag===31){var t=va();t=D(t);var a=vn(e,t);a!==null&&sa(a,e,t),Ho(e,t)}}var au=!0;function fy(e,t,a,l){var i=H.T;H.T=null;var u=X.p;try{X.p=2,Bo(e,t,a,l)}finally{X.p=u,H.T=i}}function dy(e,t,a,l){var i=H.T;H.T=null;var u=X.p;try{X.p=8,Bo(e,t,a,l)}finally{X.p=u,H.T=i}}function Bo(e,t,a,l){if(au){var i=qo(l);if(i===null)wo(e,t,l,lu,a),vv(e,l);else if(hy(i,e,t,a,l))l.stopPropagation();else if(vv(e,l),t&4&&-1<my.indexOf(e)){for(;i!==null;){var u=Je(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var m=La(u.pendingLanes);if(m!==0){var g=u;for(g.pendingLanes|=2,g.entangledLanes|=2;m;){var E=1<<31-$t(m);g.entanglements[1]|=E,m&=~E}Fa(u),(Ze&6)===0&&(Bs=dt()+500,di(0))}}break;case 31:case 13:g=vn(u,2),g!==null&&sa(g,u,2),$s(),Ho(u,2)}if(u=qo(l),u===null&&wo(e,t,l,lu,a),u===i)break;i=u}i!==null&&l.stopPropagation()}else wo(e,t,l,null,a)}}function qo(e){return e=$u(e),$o(e)}var lu=null;function $o(e){if(lu=null,e=ct(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=x(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return lu=e,null}function hv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ea()){case Ua:return 2;case Zt:return 8;case kt:case Dt:return 32;case ya:return 268435456;default:return 32}default:return 32}}var Yo=!1,Wl=null,Il=null,Pl=null,yi=new Map,bi=new Map,en=[],my="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function vv(e,t){switch(e){case"focusin":case"focusout":Wl=null;break;case"dragenter":case"dragleave":Il=null;break;case"mouseover":case"mouseout":Pl=null;break;case"pointerover":case"pointerout":yi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bi.delete(t.pointerId)}}function Si(e,t,a,l,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[i]},t!==null&&(t=Je(t),t!==null&&dv(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function hy(e,t,a,l,i){switch(t){case"focusin":return Wl=Si(Wl,e,t,a,l,i),!0;case"dragenter":return Il=Si(Il,e,t,a,l,i),!0;case"mouseover":return Pl=Si(Pl,e,t,a,l,i),!0;case"pointerover":var u=i.pointerId;return yi.set(u,Si(yi.get(u)||null,e,t,a,l,i)),!0;case"gotpointercapture":return u=i.pointerId,bi.set(u,Si(bi.get(u)||null,e,t,a,l,i)),!0}return!1}function pv(e){var t=ct(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Q(e.priority,function(){mv(a)});return}}else if(t===31){if(t=x(a),t!==null){e.blockedOn=t,Q(e.priority,function(){mv(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function nu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=qo(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);qu=l,a.target.dispatchEvent(l),qu=null}else return t=Je(a),t!==null&&dv(t),e.blockedOn=a,!1;t.shift()}return!0}function xv(e,t,a){nu(e)&&a.delete(t)}function vy(){Yo=!1,Wl!==null&&nu(Wl)&&(Wl=null),Il!==null&&nu(Il)&&(Il=null),Pl!==null&&nu(Pl)&&(Pl=null),yi.forEach(xv),bi.forEach(xv)}function ru(e,t){e.blockedOn===t&&(e.blockedOn=null,Yo||(Yo=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,vy)))}var iu=null;function gv(e){iu!==e&&(iu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){iu===e&&(iu=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],i=e[t+2];if(typeof l!="function"){if($o(l||a)===null)continue;break}var u=Je(a);u!==null&&(e.splice(t,3),t-=3,Bc(u,{pending:!0,data:i,method:a.method,action:l},l,i))}}))}function yr(e){function t(E){return ru(E,e)}Wl!==null&&ru(Wl,e),Il!==null&&ru(Il,e),Pl!==null&&ru(Pl,e),yi.forEach(t),bi.forEach(t);for(var a=0;a<en.length;a++){var l=en[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<en.length&&(a=en[0],a.blockedOn===null);)pv(a),a.blockedOn===null&&en.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var i=a[l],u=a[l+1],m=i[oe]||null;if(typeof u=="function")m||gv(a);else if(m){var g=null;if(u&&u.hasAttribute("formAction")){if(i=u,m=u[oe]||null)g=m.formAction;else if($o(i)!==null)continue}else g=m.action;typeof g=="function"?a[l+1]=g:(a.splice(l,3),l-=3),gv(a)}}}function yv(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(m){return i=m})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Go(e){this._internalRoot=e}su.prototype.render=Go.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,l=va();ov(a,l,e,t,null,null)},su.prototype.unmount=Go.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ov(e.current,2,null,e,null,null),$s(),t[I]=null}};function su(e){this._internalRoot=e}su.prototype.unstable_scheduleHydration=function(e){if(e){var t=V();e={blockedOn:null,target:e,priority:t};for(var a=0;a<en.length&&t!==0&&t<en[a].priority;a++);en.splice(a,0,e),a===0&&pv(e)}};var bv=r.version;if(bv!=="19.2.7")throw Error(o(527,bv,"19.2.7"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var py={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var uu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uu.isDisabled&&uu.supportsFiber)try{il=uu.inject(py),Kt=uu}catch{}}return Ni.createRoot=function(e,t){if(!f(e))throw Error(o(299));var a=!1,l="",i=Tm,u=Dm,m=Cm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=uv(e,1,!1,null,null,a,l,null,i,u,m,yv),e[I]=t.current,Eo(e),new Go(t)},Ni.hydrateRoot=function(e,t,a){if(!f(e))throw Error(o(299));var l=!1,i="",u=Tm,m=Dm,g=Cm,E=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(g=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=uv(e,1,!0,t,a??null,l,i,E,u,m,g,yv),t.context=cv(null),a=t.current,l=va(),l=D(l),i=Bl(l),i.callback=null,ql(a,i,l),a=l,t.current.lanes=a,Qa(t,a),Fa(t),e[I]=t.current,Eo(e),new su(t)},Ni.version="19.2.7",Ni}var Mv;function Cy(){if(Mv)return Qo.exports;Mv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Qo.exports=Dy(),Qo.exports}var My=Cy();/**
50
+ * react-router v7.18.0
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var hp=n=>{throw TypeError(n)},vp=(n,r,s)=>r.has(n)||hp("Cannot "+s),Ca=(n,r,s)=>(vp(n,r,"read from private field"),s?s.call(n):r.get(n)),zi=(n,r,s)=>r.has(n)?hp("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,s),Wa=(n,r,s,o)=>(vp(n,r,"write to private field"),r.set(n,s),s),ju=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,vf=/^[\\/]{2}/;function pp(n,r){return r+n.replace(/\\/g,"/")}var zv="popstate";function Av(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function zy(n={}){function r(o,f){var p;let d=(p=f.state)==null?void 0:p.masked,{pathname:h,search:x,hash:v}=d||o.location;return ki("",{pathname:h,search:x,hash:v},f.state&&f.state.usr||null,f.state&&f.state.key||"default",d?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function s(o,f){return typeof f=="string"?f:el(f)}return _y(r,s,null,n)}function we(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function St(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Ay(){return Math.random().toString(36).substring(2,10)}function _v(n,r){return{usr:n.state,key:n.key,idx:r,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function ki(n,r,s=null,o,f){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?tl(r):r,state:s,key:r&&r.key||o||Ay(),mask:f}}function el({pathname:n="/",search:r="",hash:s=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function tl(n){let r={};if(n){let s=n.indexOf("#");s>=0&&(r.hash=n.substring(s),n=n.substring(0,s));let o=n.indexOf("?");o>=0&&(r.search=n.substring(o),n=n.substring(0,o)),n&&(r.pathname=n)}return r}function _y(n,r,s,o={}){let{window:f=document.defaultView,v5Compat:d=!1}=o,h=f.history,x="POP",v=null,p=b();p==null&&(p=0,h.replaceState({...h.state,idx:p},""));function b(){return(h.state||{idx:null}).idx}function y(){x="POP";let k=b(),Z=k==null?null:k-p;p=k,v&&v({action:x,location:B.location,delta:Z})}function j(k,Z){x="PUSH";let J=Av(k)?k:ki(B.location,k,Z);p=b()+1;let W=_v(J,p),ee=B.createHref(J.mask||J);try{h.pushState(W,"",ee)}catch(ie){if(ie instanceof DOMException&&ie.name==="DataCloneError")throw ie;f.location.assign(ee)}d&&v&&v({action:x,location:B.location,delta:1})}function N(k,Z){x="REPLACE";let J=Av(k)?k:ki(B.location,k,Z);p=b();let W=_v(J,p),ee=B.createHref(J.mask||J);h.replaceState(W,"",ee),d&&v&&v({action:x,location:B.location,delta:0})}function z(k){return xp(f,k)}let B={get action(){return x},get location(){return n(f,h)},listen(k){if(v)throw new Error("A history only accepts one active listener");return f.addEventListener(zv,y),v=k,()=>{f.removeEventListener(zv,y),v=null}},createHref(k){return r(f,k)},createURL:z,encodeLocation(k){let Z=z(k);return{pathname:Z.pathname,search:Z.search,hash:Z.hash}},push:j,replace:N,go(k){return h.go(k)}};return B}function xp(n,r,s=!1){let o="http://localhost";n&&(o=n.location.origin!=="null"?n.location.origin:n.location.href),we(o,"No window.location.(origin|href) available to create URL");let f=typeof r=="string"?r:el(r);return f=f.replace(/ $/,"%20"),!s&&vf.test(f)&&(f=o+f),new URL(f,o)}var Ai,Ov=class{constructor(n){if(zi(this,Ai,new Map),n)for(let[r,s]of n)this.set(r,s)}get(n){if(Ca(this,Ai).has(n))return Ca(this,Ai).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,r){Ca(this,Ai).set(n,r)}};Ai=new WeakMap;var Oy=new Set(["lazy","caseSensitive","path","id","index","children"]);function ky(n){return Oy.has(n)}var Uy=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Ly(n){return Uy.has(n)}function Hy(n){return n.index===!0}function Ui(n,r,s=[],o={},f=!1){return n.map((d,h)=>{let x=[...s,String(h)],v=typeof d.id=="string"?d.id:x.join("-");if(we(d.index!==!0||!d.children,"Cannot specify children on an index route"),we(f||!o[v],`Found a route id collision on id "${v}". Route id's must be globally unique within Data Router usages`),Hy(d)){let p={...d,id:v};return o[v]=kv(p,r(p)),p}else{let p={...d,id:v,children:void 0};return o[v]=kv(p,r(p)),d.children&&(p.children=Ui(d.children,r,x,o,f)),p}})}function kv(n,r){return Object.assign(n,{...r,...typeof r.lazy=="object"&&r.lazy!=null?{lazy:{...n.lazy,...r.lazy}}:{}})}function gp(n,r,s="/"){return Va(n,r,s,!1)}function Va(n,r,s,o,f){let d=typeof r=="string"?tl(r):r,h=Aa(d.pathname||"/",s);if(h==null)return null;let x=f??mu(n),v=null,p=Fy(h);for(let b=0;v==null&&b<x.length;++b)v=Jy(x[b],p,o);return v}function By(n,r){let{route:s,pathname:o,params:f}=n;return{id:s.id,pathname:o,params:f,data:r[s.id],loaderData:r[s.id],handle:s.handle}}function mu(n){let r=yp(n);return qy(r),r}function yp(n,r=[],s=[],o="",f=!1){let d=(h,x,v=f,p)=>{let b={relativePath:p===void 0?h.path||"":p,caseSensitive:h.caseSensitive===!0,childrenIndex:x,route:h};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(o)&&v)return;we(b.relativePath.startsWith(o),`Absolute route path "${b.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(o.length)}let y=za([o,b.relativePath]),j=s.concat(b);h.children&&h.children.length>0&&(we(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),yp(h.children,r,j,y,v)),!(h.path==null&&!h.index)&&r.push({path:y,score:Zy(y,h.index),routesMeta:j.map((N,z)=>{let[B,k]=jp(N.relativePath,N.caseSensitive,z===j.length-1);return{...N,matcher:B,compiledParams:k}})})};return n.forEach((h,x)=>{var v;if(h.path===""||!((v=h.path)!=null&&v.includes("?")))d(h,x);else for(let p of bp(h.path))d(h,x,!0,p)}),r}function bp(n){let r=n.split("/");if(r.length===0)return[];let[s,...o]=r,f=s.endsWith("?"),d=s.replace(/\?$/,"");if(o.length===0)return f?[d,""]:[d];let h=bp(o.join("/")),x=[];return x.push(...h.map(v=>v===""?d:[d,v].join("/"))),f&&x.push(...h),x.map(v=>n.startsWith("/")&&v===""?"/":v)}function qy(n){n.sort((r,s)=>r.score!==s.score?s.score-r.score:Ky(r.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}var $y=/^:[\w-]+$/,Yy=3,Gy=2,Vy=1,Xy=10,Qy=-2,Uv=n=>n==="*";function Zy(n,r){let s=n.split("/"),o=s.length;return s.some(Uv)&&(o+=Qy),r&&(o+=Gy),s.filter(f=>!Uv(f)).reduce((f,d)=>f+($y.test(d)?Yy:d===""?Vy:Xy),o)}function Ky(n,r){return n.length===r.length&&n.slice(0,-1).every((o,f)=>o===r[f])?n[n.length-1]-r[r.length-1]:0}function Jy(n,r,s=!1){let{routesMeta:o}=n,f={},d="/",h=[];for(let x=0;x<o.length;++x){let v=o[x],p=x===o.length-1,b=d==="/"?r:r.slice(d.length)||"/",y={path:v.relativePath,caseSensitive:v.caseSensitive,end:p},j=v.matcher&&v.compiledParams?Sp(y,b,v.matcher,v.compiledParams):gu(y,b),N=v.route;if(!j&&p&&s&&!o[o.length-1].route.index&&(j=gu({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},b)),!j)return null;Object.assign(f,j.params),h.push({params:f,pathname:za([d,j.pathname]),pathnameBase:Py(za([d,j.pathnameBase])),route:N}),j.pathnameBase!=="/"&&(d=za([d,j.pathnameBase]))}return h}function gu(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,o]=jp(n.path,n.caseSensitive,n.end);return Sp(n,r,s,o)}function Sp(n,r,s,o){let f=r.match(s);if(!f)return null;let d=f[0],h=d.replace(/(.)\/+$/,"$1"),x=f.slice(1);return{params:o.reduce((p,{paramName:b,isOptional:y},j)=>{if(b==="*"){let z=x[j]||"";h=d.slice(0,d.length-z.length).replace(/(.)\/+$/,"$1")}const N=x[j];return y&&!N?p[b]=void 0:p[b]=(N||"").replace(/%2F/g,"/"),p},{}),pathname:d,pathnameBase:h,pattern:n}}function jp(n,r=!1,s=!0){St(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],f="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,x,v,p,b)=>{if(o.push({paramName:x,isOptional:v!=null}),v){let y=b.charAt(p+h.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),f+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?f+="\\/*$":n!==""&&n!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),o]}function Fy(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return St(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function Aa(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let s=r.endsWith("/")?r.length-1:r.length,o=n.charAt(s);return o&&o!=="/"?null:n.slice(s)||"/"}function Wy({basename:n,pathname:r}){return r==="/"?n:za([n,r])}var pf=n=>ju.test(n);function Iy(n,r="/"){let{pathname:s,search:o="",hash:f=""}=typeof n=="string"?tl(n):n,d;return s?(s=gf(s),s.startsWith("/")?d=Lv(s.substring(1),"/"):d=Lv(s,r)):d=r,{pathname:d,search:eb(o),hash:tb(f)}}function Lv(n,r){let s=yu(r).split("/");return n.split("/").forEach(f=>{f===".."?s.length>1&&s.pop():f!=="."&&s.push(f)}),s.length>1?s.join("/"):"/"}function Fo(n,r,s,o){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Np(n){return n.filter((r,s)=>s===0||r.route.path&&r.route.path.length>0)}function xf(n){let r=Np(n);return r.map((s,o)=>o===r.length-1?s.pathname:s.pathnameBase)}function Nu(n,r,s,o=!1){let f;typeof n=="string"?f=tl(n):(f={...n},we(!f.pathname||!f.pathname.includes("?"),Fo("?","pathname","search",f)),we(!f.pathname||!f.pathname.includes("#"),Fo("#","pathname","hash",f)),we(!f.search||!f.search.includes("#"),Fo("#","search","hash",f)));let d=n===""||f.pathname==="",h=d?"/":f.pathname,x;if(h==null)x=s;else{let y=r.length-1;if(!o&&h.startsWith("..")){let j=h.split("/");for(;j[0]==="..";)j.shift(),y-=1;f.pathname=j.join("/")}x=y>=0?r[y]:"/"}let v=Iy(f,x),p=h&&h!=="/"&&h.endsWith("/"),b=(d||h===".")&&s.endsWith("/");return!v.pathname.endsWith("/")&&(p||b)&&(v.pathname+="/"),v}var gf=n=>n.replace(/[\\/]{2,}/g,"/"),za=n=>gf(n.join("/")),yu=n=>n.replace(/\/+$/,""),Py=n=>yu(n).replace(/^\/*/,"/"),eb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,tb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,al=(n,r=302)=>{let s=r;typeof s=="number"?s={status:s}:typeof s.status>"u"&&(s.status=302);let o=new Headers(s.headers);return o.set("Location",n),new Response(null,{...s,headers:o})},ab=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Hi=class{constructor(n,r,s,o=!1){this.status=n,this.statusText=r||"",this.internal=o,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function Rr(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Bi(n){let r=n.map(s=>s.route.path).filter(Boolean);return za(r)||"/"}var Ep=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wp(n,r){let s=n;if(typeof s!="string"||!ju.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let o=s,f=!1;if(Ep)try{let d=new URL(window.location.href),h=vf.test(s)?new URL(pp(s,d.protocol)):new URL(s),x=Aa(h.pathname,r);h.origin===d.origin&&x!=null?s=x+h.search+h.hash:f=!0}catch{St(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:s}}var nn=Symbol("Uninstrumented");function lb(n,r){let s={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(f=>f({id:r.id,index:r.index,path:r.path,instrument(d){let h=Object.keys(s);for(let x of h)d[x]&&s[x].push(d[x])}}));let o={};if(typeof r.lazy=="function"&&s.lazy.length>0){let f=Er(s.lazy,r.lazy,()=>{});f&&(o.lazy=f)}if(typeof r.lazy=="object"){let f=r.lazy;["middleware","loader","action"].forEach(d=>{let h=f[d],x=s[`lazy.${d}`];if(typeof h=="function"&&x.length>0){let v=Er(x,h,()=>{});v&&(o.lazy=Object.assign(o.lazy||{},{[d]:v}))}})}return["loader","action"].forEach(f=>{let d=r[f];if(typeof d=="function"&&s[f].length>0){let h=d[nn]??d,x=Er(s[f],h,(...v)=>Hv(v[0]));x&&(f==="loader"&&h.hydrate===!0&&(x.hydrate=!0),x[nn]=h,o[f]=x)}}),r.middleware&&r.middleware.length>0&&s.middleware.length>0&&(o.middleware=r.middleware.map(f=>{let d=f[nn]??f,h=Er(s.middleware,d,(...x)=>Hv(x[0]));return h?(h[nn]=d,h):f})),o}function nb(n,r){let s={navigate:[],fetch:[]};if(r.forEach(o=>o({instrument(f){let d=Object.keys(f);for(let h of d)f[h]&&s[h].push(f[h])}})),s.navigate.length>0){let o=n.navigate[nn]??n.navigate,f=Er(s.navigate,o,(...d)=>{let[h,x]=d;return{to:typeof h=="number"||typeof h=="string"?h:h?el(h):".",...Bv(n,x??{})}});f&&(f[nn]=o,n.navigate=f)}if(s.fetch.length>0){let o=n.fetch[nn]??n.fetch,f=Er(s.fetch,o,(...d)=>{let[h,,x,v]=d;return{href:x??".",fetcherKey:h,...Bv(n,v??{})}});f&&(f[nn]=o,n.fetch=f)}return n}function Er(n,r,s){return n.length===0?null:async(...o)=>{let f=await Rp(n,s(...o),()=>r(...o),n.length-1);if(f.type==="error")throw f.value;return f.value}}async function Rp(n,r,s,o){let f=n[o],d;if(f){let h,x=async()=>(h?console.error("You cannot call instrumented handlers more than once"):h=Rp(n,r,s,o-1),d=await h,we(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.value}:{status:"success",error:void 0});try{await f(x,r)}catch(v){console.error("An instrumentation function threw an error:",v)}h||await x(),await h}else try{d={type:"success",value:await s()}}catch(h){d={type:"error",value:h}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Hv(n){let{request:r,context:s,params:o,pattern:f}=n;return{request:rb(r),params:{...o},pattern:f,context:ib(s)}}function Bv(n,r){return{currentUrl:el(n.state.location),..."formMethod"in r?{formMethod:r.formMethod}:{},..."formEncType"in r?{formEncType:r.formEncType}:{},..."formData"in r?{formData:r.formData}:{},..."body"in r?{body:r.body}:{}}}function rb(n){return{method:n.method,url:n.url,headers:{get:(...r)=>n.headers.get(...r)}}}function ib(n){if(ub(n)){let r={...n};return Object.freeze(r),r}else return{get:r=>n.get(r)}}var sb=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ub(n){if(n===null||typeof n!="object")return!1;const r=Object.getPrototypeOf(n);return r===Object.prototype||r===null||Object.getOwnPropertyNames(r).sort().join("\0")===sb}var Tp=["POST","PUT","PATCH","DELETE"],cb=new Set(Tp),ob=["GET",...Tp],fb=new Set(ob),Dp=new Set([301,302,303,307,308]),db=new Set([307,308]),Wo={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Cp={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ei={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},mb=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Mp="remix-router-transitions",zp=Symbol("ResetLoaderData"),Dn,Sr,an,jr,hb=class{constructor(n){zi(this,Dn),zi(this,Sr),zi(this,an),zi(this,jr),Wa(this,Dn,n),Wa(this,Sr,mu(n))}get stableRoutes(){return Ca(this,Dn)}get activeRoutes(){return Ca(this,an)??Ca(this,Dn)}get branches(){return Ca(this,jr)??Ca(this,Sr)}get hasHMRRoutes(){return Ca(this,an)!=null}setRoutes(n){Wa(this,Dn,n),Wa(this,Sr,mu(n))}setHmrRoutes(n){Wa(this,an,n),Wa(this,jr,mu(n))}commitHmrRoutes(){Ca(this,an)&&(Wa(this,Dn,Ca(this,an)),Wa(this,Sr,Ca(this,jr)),Wa(this,an,void 0),Wa(this,jr,void 0))}};Dn=new WeakMap;Sr=new WeakMap;an=new WeakMap;jr=new WeakMap;function vb(n){const r=n.window?n.window:typeof window<"u"?window:void 0,s=typeof r<"u"&&typeof r.document<"u"&&typeof r.document.createElement<"u";we(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=n.hydrationRouteProperties||[],f=n.mapRouteProperties||mb,d=f;if(n.instrumentations){let w=n.instrumentations;d=D=>({...f(D),...lb(w.map(A=>A.route).filter(Boolean),D)})}let h={},x=new hb(Ui(n.routes,d,void 0,h)),v=n.basename||"/";v.startsWith("/")||(v=`/${v}`);let p=n.dataStrategy||bb,b={...n.future},y=null,j=new Set,N=null,z=null,B=null,k=null,Z=n.hydrationData!=null,J=Va(x.activeRoutes,n.history.location,v,!1,x.branches),W=!1,ee=null,ie,se;if(J==null&&!n.patchRoutesOnNavigation){let w=Ma(404,{pathname:n.history.location.pathname}),{matches:D,route:A}=cu(x.activeRoutes);ie=!0,se=!ie,J=D,ee={[A.id]:w}}else if(J&&!n.hydrationData&&zl(J,x.activeRoutes,n.history.location.pathname).active&&(J=null),J)if(J.some(w=>w.route.lazy))ie=!1,se=!ie;else if(!J.some(w=>yf(w.route)))ie=!0,se=!ie;else{let w=n.hydrationData?n.hydrationData.loaderData:null,D=n.hydrationData?n.hydrationData.errors:null,A=J;if(D){let V=J.findIndex(Q=>D[Q.route.id]!==void 0);A=A.slice(0,V+1)}se=!1,ie=!0,A.forEach(V=>{let Q=Ap(V.route,w,D);se=se||Q.renderFallback,ie=ie&&!Q.shouldLoad})}else{ie=!1,se=!ie,J=[];let w=zl(null,x.activeRoutes,n.history.location.pathname);w.active&&w.matches&&(W=!0,J=w.matches)}let le,M={historyAction:n.history.action,location:n.history.location,matches:J,initialized:ie,renderFallback:se,navigation:Wo,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||ee,fetchers:new Map,blockers:new Map},Re="POP",xe=null,Ke=!1,ve,st=!1,Te=new Map,ke=null,H=!1,X=!1,te=new Set,me=new Map,be=0,R=-1,q=new Map,K=new Set,F=new Map,he=new Map,fe=new Set,Se=new Map,We,Qe=null;function nl(){if(y=n.history.listen(({action:w,location:D,delta:A})=>{if(We){We(),We=void 0;return}St(Se.size===0||A!=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 V=fn({currentLocation:M.location,nextLocation:D,historyAction:w});if(V&&A!=null){let Q=new Promise(ne=>{We=ne});n.history.go(A*-1),sl(V,{state:"blocked",location:D,proceed(){sl(V,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),Q.then(()=>n.history.go(A))},reset(){let ne=new Map(M.blockers);ne.set(V,Ei),Nt({blockers:ne})}}),xe==null||xe.resolve(),xe=null;return}return je(w,D)}),s){Bb(r,Te);let w=()=>qb(r,Te);r.addEventListener("pagehide",w),ke=()=>r.removeEventListener("pagehide",w)}return M.initialized||je("POP",M.location,{initialHydration:!0}),le}function Cl(){y&&y(),ke&&ke(),j.clear(),ve&&ve.abort(),M.fetchers.forEach((w,D)=>il(M.fetchers,D)),M.blockers.forEach((w,D)=>on(D))}function kn(w){if(j.add(w),N){let{newErrors:D}=N;N=null,w(M,{deletedFetchers:[],newErrors:D,viewTransitionOpts:void 0,flushSync:!1})}return()=>j.delete(w)}function Nt(w,D={}){w.matches&&(w.matches=w.matches.map(Q=>{let ne=h[Q.route.id],P=Q.route;return P.element!==ne.element||P.errorElement!==ne.errorElement||P.hydrateFallbackElement!==ne.hydrateFallbackElement?{...Q,route:ne}:Q})),M={...M,...w};let A=[],V=[];M.fetchers.forEach((Q,ne)=>{Q.state==="idle"&&(fe.has(ne)?A.push(ne):V.push(ne))}),fe.forEach(Q=>{!M.fetchers.has(Q)&&!me.has(Q)&&A.push(Q)}),j.size===0&&(N={newErrors:w.errors??null}),[...j].forEach(Q=>Q(M,{deletedFetchers:A,newErrors:w.errors??null,viewTransitionOpts:D.viewTransitionOpts,flushSync:D.flushSync===!0})),A.forEach(Q=>il(M.fetchers,Q)),V.forEach(Q=>M.fetchers.delete(Q))}function Xt(w,D,{flushSync:A}={}){var ye,De;let V=M.actionData!=null&&M.navigation.formMethod!=null&&Gt(M.navigation.formMethod)&&M.navigation.state==="loading"&&((ye=w.state)==null?void 0:ye._isRedirect)!==!0,Q;D.actionData?Object.keys(D.actionData).length>0?Q=D.actionData:Q=null:V?Q=M.actionData:Q=null;let ne=D.loaderData?Jv(M.loaderData,D.loaderData,D.matches||[],D.errors):M.loaderData,P=M.blockers;P.size>0&&(P=new Map(P),P.forEach((de,ze)=>P.set(ze,Ei)));let oe=H?!1:_r(w,D.matches||M.matches),I=Ke===!0||M.navigation.formMethod!=null&&Gt(M.navigation.formMethod)&&((De=w.state)==null?void 0:De._isRedirect)!==!0;x.commitHmrRoutes(),H||Re==="POP"||(Re==="PUSH"?n.history.push(w,w.state):Re==="REPLACE"&&n.history.replace(w,w.state));let ce;if(Re==="POP"){let de=Te.get(M.location.pathname);de&&de.has(w.pathname)?ce={currentLocation:M.location,nextLocation:w}:Te.has(w.pathname)&&(ce={currentLocation:w,nextLocation:M.location})}else if(st){let de=Te.get(M.location.pathname);de?de.add(w.pathname):(de=new Set([w.pathname]),Te.set(M.location.pathname,de)),ce={currentLocation:M.location,nextLocation:w}}Nt({...D,actionData:Q,loaderData:ne,historyAction:Re,location:w,initialized:!0,renderFallback:!1,navigation:Wo,revalidation:"idle",restoreScrollPosition:oe,preventScrollReset:I,blockers:P},{viewTransitionOpts:ce,flushSync:A===!0}),Re="POP",Ke=!1,st=!1,H=!1,X=!1,xe==null||xe.resolve(),xe=null,Qe==null||Qe.resolve(),Qe=null}async function cn(w,D){if(xe==null||xe.resolve(),xe=null,typeof w=="number"){xe||(xe=Pv());let Ge=xe.promise;return n.history.go(w),Ge}let A=cf(M.location,M.matches,v,w,D==null?void 0:D.fromRouteId,D==null?void 0:D.relative),{path:V,submission:Q,error:ne}=qv(!1,A,D),P;D!=null&&D.mask&&(P={pathname:"",search:"",hash:"",...typeof D.mask=="string"?tl(D.mask):{...M.location.mask,...D.mask}});let oe=M.location,I=ki(oe,V,D&&D.state,void 0,P);I={...I,...n.history.encodeLocation(I)};let ce=D&&D.replace!=null?D.replace:void 0,ye="PUSH";ce===!0?ye="REPLACE":ce===!1||Q!=null&&Gt(Q.formMethod)&&Q.formAction===M.location.pathname+M.location.search&&(ye="REPLACE");let De=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,de=(D&&D.flushSync)===!0,ze=fn({currentLocation:oe,nextLocation:I,historyAction:ye});if(ze){sl(ze,{state:"blocked",location:I,proceed(){sl(ze,{state:"proceeding",proceed:void 0,reset:void 0,location:I}),cn(w,D)},reset(){let Ge=new Map(M.blockers);Ge.set(ze,Ei),Nt({blockers:Ge})}});return}await je(ye,I,{submission:Q,pendingError:ne,preventScrollReset:De,replace:D&&D.replace,enableViewTransition:D&&D.viewTransition,flushSync:de,callSiteDefaultShouldRevalidate:D&&D.defaultShouldRevalidate})}function ae(){Qe||(Qe=Pv()),kt(),Nt({revalidation:"loading"});let w=Qe.promise;return M.navigation.state==="submitting"?w:M.navigation.state==="idle"?(je(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),w):(je(Re||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:st===!0}),w)}async function je(w,D,A){ve&&ve.abort(),ve=null,Re=w,H=(A&&A.startUninterruptedRevalidation)===!0,Lu(M.location,M.matches),Ke=(A&&A.preventScrollReset)===!0,st=(A&&A.enableViewTransition)===!0;let V=x.activeRoutes,Q=A!=null&&A.initialHydration&&M.matches&&M.matches.length>0&&!W?M.matches:Va(V,D,v,!1,x.branches),ne=(A&&A.flushSync)===!0;if(Q&&M.initialized&&!X&&Cb(M.location,D)&&!(A&&A.submission&&Gt(A.submission.formMethod))){Xt(D,{matches:Q},{flushSync:ne});return}let P=zl(Q,V,D.pathname);if(P.active&&P.matches&&(Q=P.matches),!Q){let{error:Je,notFoundMatches:qe,route:xt}=La(D.pathname);Xt(D,{matches:qe,loaderData:{},errors:{[xt.id]:Je}},{flushSync:ne});return}let oe=A&&A.overrideNavigation?{...A.overrideNavigation,matches:Q,historyAction:w}:void 0;ve=new AbortController;let I=Nr(n.history,D,ve.signal,A&&A.submission),ce=n.getContext?await n.getContext():new Ov,ye;if(A&&A.pendingError)ye=[ln(Q).route.id,{type:"error",error:A.pendingError}];else if(A&&A.submission&&Gt(A.submission.formMethod)){let Je=await Ae(I,D,A.submission,Q,w,ce,P.active,A&&A.initialHydration===!0,{replace:A.replace,flushSync:ne});if(Je.shortCircuited)return;if(Je.pendingActionResult){let[qe,xt]=Je.pendingActionResult;if(pa(xt)&&Rr(xt.error)&&xt.error.status===404){ve=null,Xt(D,{matches:Je.matches,loaderData:{},errors:{[qe]:xt.error}});return}}Q=Je.matches||Q,ye=Je.pendingActionResult,oe=Io(D,Q,w,A.submission),ne=!1,P.active=!1,I=Nr(n.history,I.url,I.signal)}let{shortCircuited:De,matches:de,loaderData:ze,errors:Ge,workingFetchers:ct}=await tt(I,D,Q,w,ce,P.active,oe,A&&A.submission,A&&A.fetcherSubmission,A&&A.replace,A&&A.initialHydration===!0,ne,ye,A&&A.callSiteDefaultShouldRevalidate);De||(ve=null,Xt(D,{matches:de||Q,...Fv(ye),loaderData:ze,errors:Ge,...ct?{fetchers:ct}:{}}))}async function Ae(w,D,A,V,Q,ne,P,oe,I={}){kt();let ce=Lb(D,V,Q,A);if(Nt({navigation:ce},{flushSync:I.flushSync===!0}),P){let de=await Qa(V,D.pathname,w.signal);if(de.type==="aborted")return{shortCircuited:!0};if(de.type==="error"){if(de.partialMatches.length===0){let{matches:Ge,route:ct}=cu(x.activeRoutes);return{matches:Ge,pendingActionResult:[ct.id,{type:"error",error:de.error}]}}let ze=ln(de.partialMatches).route.id;return{matches:de.partialMatches,pendingActionResult:[ze,{type:"error",error:de.error}]}}else if(de.matches)V=de.matches;else{let{notFoundMatches:ze,error:Ge,route:ct}=La(D.pathname);return{matches:ze,pendingActionResult:[ct.id,{type:"error",error:Ge}]}}}let ye,De=hu(V,D);if(!De.route.action&&!De.route.lazy)ye={type:"error",error:Ma(405,{method:w.method,pathname:D.pathname,routeId:De.route.id})};else{let de=wr(d,h,w,D,V,De,oe?[]:o,ne),ze=await Ua(w,D,de,ne,null);if(ye=ze[De.route.id],!ye){for(let Ge of V)if(ze[Ge.route.id]){ye=ze[Ge.route.id];break}}if(w.signal.aborted)return{shortCircuited:!0}}if(Mn(ye)){let de;return I&&I.replace!=null?de=I.replace:de=Qv(ye.response.headers.get("Location"),new URL(w.url),v,n.history)===M.location.pathname+M.location.search,await ea(w,ye,!0,{submission:A,replace:de}),{shortCircuited:!0}}if(pa(ye)){let de=ln(V,De.route.id);return(I&&I.replace)!==!0&&(Re="PUSH"),{matches:V,pendingActionResult:[de.route.id,ye,De.route.id]}}return{matches:V,pendingActionResult:[De.route.id,ye]}}async function tt(w,D,A,V,Q,ne,P,oe,I,ce,ye,De,de,ze){let Ge=P||Io(D,A,V,oe),ct=oe||I||Iv(Ge),Je=!H&&!ye;if(ne){if(Je){let rt=ut(de);Nt({navigation:Ge,...rt!==void 0?{actionData:rt}:{}},{flushSync:De})}let Ne=await Qa(A,D.pathname,w.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){if(Ne.partialMatches.length===0){let{matches:ua,route:qa}=cu(x.activeRoutes);return{matches:ua,loaderData:{},errors:{[qa.id]:Ne.error}}}let rt=ln(Ne.partialMatches).route.id;return{matches:Ne.partialMatches,loaderData:{},errors:{[rt]:Ne.error}}}else if(Ne.matches)A=Ne.matches;else{let{error:rt,notFoundMatches:ua,route:qa}=La(D.pathname);return{matches:ua,loaderData:{},errors:{[qa.id]:rt}}}}let qe=x.activeRoutes,{dsMatches:xt,revalidatingFetchers:$e}=$v(w,Q,d,h,n.history,M,A,ct,D,ye?[]:o,ye===!0,X,te,fe,F,K,qe,v,n.patchRoutesOnNavigation!=null,x.branches,de,ze);if(R=++be,!n.dataStrategy&&!xt.some(Ne=>Ne.shouldLoad)&&!xt.some(Ne=>Ne.route.middleware&&Ne.route.middleware.length>0)&&$e.length===0){let Ne=new Map(M.fetchers),rt=Ji(Ne);return Xt(D,{matches:A,loaderData:{},errors:de&&pa(de[1])?{[de[0]]:de[1].error}:null,...Fv(de),...rt?{fetchers:Ne}:{}},{flushSync:De}),{shortCircuited:!0}}if(Je){let Ne={};if(!ne){Ne.navigation=Ge;let rt=ut(de);rt!==void 0&&(Ne.actionData=rt)}$e.length>0&&(Ne.fetchers=Qt($e)),Nt(Ne,{flushSync:De})}$e.forEach(Ne=>{Mt(Ne.key),Ne.controller&&me.set(Ne.key,Ne.controller)});let Al=()=>$e.forEach(Ne=>Mt(Ne.key));ve&&ve.signal.addEventListener("abort",Al);let{loaderResults:Ha,fetcherResults:ta}=await Zt(xt,$e,w,D,Q);if(w.signal.aborted)return{shortCircuited:!0};ve&&ve.signal.removeEventListener("abort",Al),$e.forEach(Ne=>me.delete(Ne.key));let Jt=ou(Ha);if(Jt)return await ea(w,Jt.result,!0,{replace:ce}),{shortCircuited:!0};if(Jt=ou(ta),Jt)return K.add(Jt.key),await ea(w,Jt.result,!0,{replace:ce}),{shortCircuited:!0};let ba=new Map(M.fetchers),{loaderData:Ln,errors:Ba}=Kv(M,A,Ha,de,$e,ta,ba);ye&&M.errors&&(Ba={...M.errors,...Ba});let Hn=Ji(ba),ul=Fi(R,ba),cl=Hn||ul||$e.length>0;return{matches:A,loaderData:Ln,errors:Ba,...cl?{workingFetchers:ba}:{}}}function ut(w){if(w&&!pa(w[1]))return{[w[0]]:w[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function Qt(w){let D=new Map(M.fetchers);return w.forEach(A=>{let V=D.get(A.key),Q=wi(void 0,V?V.data:void 0);D.set(A.key,Q)}),D}async function ka(w,D,A,V){Mt(w);let Q=(V&&V.flushSync)===!0,ne=x.activeRoutes,P=cf(M.location,M.matches,v,A,D,V==null?void 0:V.relative),oe=Va(ne,P,v,!1,x.branches),I=zl(oe,ne,P);if(I.active&&I.matches&&(oe=I.matches),!oe){ya(w,D,Ma(404,{pathname:P}),{flushSync:Q});return}let{path:ce,submission:ye,error:De}=qv(!0,P,V);if(De){ya(w,D,De,{flushSync:Q});return}let de=n.getContext?await n.getContext():new Ov,ze=(V&&V.preventScrollReset)===!0;if(ye&&Gt(ye.formMethod)){await rl(w,D,ce,oe,de,I.active,Q,ze,ye,V&&V.defaultShouldRevalidate);return}F.set(w,{routeId:D,path:ce}),await dt(w,D,ce,oe,de,I.active,Q,ze,ye)}async function rl(w,D,A,V,Q,ne,P,oe,I,ce){kt(),F.delete(w);let ye=M.fetchers.get(w);Dt(w,Hb(I,ye),{flushSync:P});let De=new AbortController,de=Nr(n.history,A,De.signal,I);if(ne){let Ie=await Qa(V,new URL(de.url).pathname,de.signal,w);if(Ie.type==="aborted")return;if(Ie.type==="error"){ya(w,D,Ie.error,{flushSync:P});return}else if(Ie.matches)V=Ie.matches;else{ya(w,D,Ma(404,{pathname:A}),{flushSync:P});return}}let ze=hu(V,A);if(!ze.route.action&&!ze.route.lazy){let Ie=Ma(405,{method:I.formMethod,pathname:A,routeId:D});ya(w,D,Ie,{flushSync:P});return}me.set(w,De);let Ge=be,ct=wr(d,h,de,A,V,ze,o,Q),Je=await Ua(de,A,ct,Q,w),qe=Je[ze.route.id];if(!qe){for(let Ie of ct)if(Je[Ie.route.id]){qe=Je[Ie.route.id];break}}if(de.signal.aborted){me.get(w)===De&&me.delete(w);return}if(fe.has(w)){if(Mn(qe)||pa(qe)){Dt(w,Pa(void 0));return}}else{if(Mn(qe))if(me.delete(w),R>Ge){Dt(w,Pa(void 0));return}else return K.add(w),Dt(w,wi(I)),ea(de,qe,!1,{fetcherSubmission:I,preventScrollReset:oe});if(pa(qe)){ya(w,D,qe.error);return}}let xt=M.navigation.location||M.location,$e=Nr(n.history,xt,De.signal),Al=x.activeRoutes,Ha=M.navigation.state!=="idle"?Va(Al,M.navigation.location,v,!1,x.branches):M.matches;we(Ha,"Didn't find any matches after fetcher action");let ta=++be;q.set(w,ta);let{dsMatches:Jt,revalidatingFetchers:ba}=$v($e,Q,d,h,n.history,M,Ha,I,xt,o,!1,X,te,fe,F,K,Al,v,n.patchRoutesOnNavigation!=null,x.branches,[ze.route.id,qe],ce),Ln=wi(I,qe.data),Ba=new Map(M.fetchers);Ba.set(w,Ln),ba.filter(Ie=>Ie.key!==w).forEach(Ie=>{let ol=Ie.key,Ft=Ba.get(ol),Or=wi(void 0,Ft?Ft.data:void 0);Ba.set(ol,Or),Mt(ol),Ie.controller&&me.set(ol,Ie.controller)}),Nt({fetchers:Ba});let Hn=()=>ba.forEach(Ie=>Mt(Ie.key));De.signal.addEventListener("abort",Hn);let{loaderResults:ul,fetcherResults:cl}=await Zt(Jt,ba,$e,xt,Q);if(De.signal.aborted)return;De.signal.removeEventListener("abort",Hn),q.delete(w),me.delete(w),ba.forEach(Ie=>me.delete(Ie.key));let Ne=M.fetchers.has(w),rt=Ie=>{if(!Ne)return Ie;let ol=new Map(Ie.fetchers);return ol.set(w,Pa(qe.data)),{...Ie,fetchers:ol}},ua=ou(ul);if(ua)return M=rt(M),ea($e,ua.result,!1,{preventScrollReset:oe});if(ua=ou(cl),ua)return K.add(ua.key),M=rt(M),ea($e,ua.result,!1,{preventScrollReset:oe});let qa=new Map(M.fetchers);Ne&&qa.set(w,Pa(qe.data));let{loaderData:Bn,errors:qn}=Kv(M,Ha,ul,void 0,ba,cl,qa);Fi(ta,qa),M.navigation.state==="loading"&&ta>R?(we(Re,"Expected pending action"),ve&&ve.abort(),Xt(M.navigation.location,{matches:Ha,loaderData:Bn,errors:qn,fetchers:qa})):(Nt({errors:qn,loaderData:Jv(M.loaderData,Bn,Ha,qn),fetchers:qa}),X=!1)}async function dt(w,D,A,V,Q,ne,P,oe,I){let ce=M.fetchers.get(w);Dt(w,wi(I,ce?ce.data:void 0),{flushSync:P});let ye=new AbortController,De=Nr(n.history,A,ye.signal);if(ne){let qe=await Qa(V,new URL(De.url).pathname,De.signal,w);if(qe.type==="aborted")return;if(qe.type==="error"){ya(w,D,qe.error,{flushSync:P});return}else if(qe.matches)V=qe.matches;else{ya(w,D,Ma(404,{pathname:A}),{flushSync:P});return}}let de=hu(V,A);me.set(w,ye);let ze=be,Ge=wr(d,h,De,A,V,de,o,Q),ct=await Ua(De,A,Ge,Q,w),Je=ct[de.route.id];if(!Je){for(let qe of V)if(ct[qe.route.id]){Je=ct[qe.route.id];break}}if(me.get(w)===ye&&me.delete(w),!De.signal.aborted){if(fe.has(w)){Dt(w,Pa(void 0));return}if(Mn(Je))if(R>ze){Dt(w,Pa(void 0));return}else{K.add(w),await ea(De,Je,!1,{preventScrollReset:oe});return}if(pa(Je)){ya(w,D,Je.error);return}Dt(w,Pa(Je.data))}}async function ea(w,D,A,{submission:V,fetcherSubmission:Q,preventScrollReset:ne,replace:P}={}){A||(xe==null||xe.resolve(),xe=null),D.response.headers.has("X-Remix-Revalidate")&&(X=!0);let oe=D.response.headers.get("Location");we(oe,"Expected a Location header on the redirect Response"),oe=Qv(oe,new URL(w.url),v,n.history);let I=ki(M.location,oe,{_isRedirect:!0});if(s){let Ge=!1;if(D.response.headers.has("X-Remix-Reload-Document"))Ge=!0;else if(pf(oe)){const ct=xp(r,oe,!0);Ge=ct.origin!==r.location.origin||Aa(ct.pathname,v)==null}if(Ge){P?r.location.replace(oe):r.location.assign(oe);return}}ve=null;let ce=P===!0||D.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ye,formAction:De,formEncType:de}=M.navigation;!V&&!Q&&ye&&De&&de&&(V=Iv(M.navigation));let ze=V||Q;if(db.has(D.response.status)&&ze&&Gt(ze.formMethod))await je(ce,I,{submission:{...ze,formAction:oe},preventScrollReset:ne||Ke,enableViewTransition:A?st:void 0});else{let Ge=Io(I,[],ce,V);await je(ce,I,{overrideNavigation:Ge,fetcherSubmission:Q,preventScrollReset:ne||Ke,enableViewTransition:A?st:void 0})}}async function Ua(w,D,A,V,Q){var oe;let ne,P={};try{ne=await jb(p,w,D,A,Q,V,!1)}catch(I){return A.filter(ce=>ce.shouldLoad).forEach(ce=>{P[ce.route.id]={type:"error",error:I}}),P}if(w.signal.aborted)return P;if(!Gt(w.method))for(let I of A){if(((oe=ne[I.route.id])==null?void 0:oe.type)==="error")break;!ne.hasOwnProperty(I.route.id)&&!M.loaderData.hasOwnProperty(I.route.id)&&(!M.errors||!M.errors.hasOwnProperty(I.route.id))&&I.shouldCallHandler()&&(ne[I.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${I.route.id}`)})}for(let[I,ce]of Object.entries(ne))if(_b(ce)){let ye=ce.result;P[I]={type:"redirect",response:Rb(ye,w,I,A,v)}}else P[I]=await wb(ce);return P}async function Zt(w,D,A,V,Q){let ne=Ua(A,V,w,Q,null),P=Promise.all(D.map(async ce=>{if(ce.matches&&ce.match&&ce.request&&ce.controller){let De=(await Ua(ce.request,ce.path,ce.matches,Q,ce.key))[ce.match.route.id];return{[ce.key]:De}}else return Promise.resolve({[ce.key]:{type:"error",error:Ma(404,{pathname:ce.path})}})})),oe=await ne,I=(await P).reduce((ce,ye)=>Object.assign(ce,ye),{});return{loaderResults:oe,fetcherResults:I}}function kt(){X=!0,F.forEach((w,D)=>{me.has(D)&&te.add(D),Mt(D)})}function Dt(w,D,A={}){let V=new Map(M.fetchers);V.set(w,D),Nt({fetchers:V},{flushSync:(A&&A.flushSync)===!0})}function ya(w,D,A,V={}){let Q=ln(M.matches,D),ne=new Map(M.fetchers);il(ne,w),Nt({errors:{[Q.route.id]:A},fetchers:ne},{flushSync:(V&&V.flushSync)===!0})}function Ou(w){return he.set(w,(he.get(w)||0)+1),fe.has(w)&&fe.delete(w),M.fetchers.get(w)||Cp}function ku(w,D){Mt(w,D==null?void 0:D.reason),Dt(w,Pa(null))}function il(w,D){let A=M.fetchers.get(D);me.has(D)&&!(A&&A.state==="loading"&&q.has(D))&&Mt(D),F.delete(D),q.delete(D),K.delete(D),fe.delete(D),te.delete(D),w.delete(D)}function Kt(w){let D=(he.get(w)||0)-1;D<=0?(he.delete(w),fe.add(w)):he.set(w,D),Nt({fetchers:new Map(M.fetchers)})}function Mt(w,D){let A=me.get(w);A&&(A.abort(D),me.delete(w))}function $t(w,D){for(let A of w){let V=D.get(A);we(V,`Expected fetcher: ${A}`);let Q=Pa(V.data);D.set(A,Q)}}function Ji(w){let D=[],A=!1;for(let V of K){let Q=w.get(V);we(Q,`Expected fetcher: ${V}`),Q.state==="loading"&&(K.delete(V),D.push(V),A=!0)}return $t(D,w),A}function Fi(w,D){let A=[];for(let[V,Q]of q)if(Q<w){let ne=D.get(V);we(ne,`Expected fetcher: ${V}`),ne.state==="loading"&&(Mt(V),q.delete(V),A.push(V))}return $t(A,D),A.length>0}function Uu(w,D){let A=M.blockers.get(w)||Ei;return Se.get(w)!==D&&Se.set(w,D),A}function on(w){M.blockers.delete(w),Se.delete(w)}function sl(w,D){let A=M.blockers.get(w)||Ei;we(A.state==="unblocked"&&D.state==="blocked"||A.state==="blocked"&&D.state==="blocked"||A.state==="blocked"&&D.state==="proceeding"||A.state==="blocked"&&D.state==="unblocked"||A.state==="proceeding"&&D.state==="unblocked",`Invalid blocker state transition: ${A.state} -> ${D.state}`);let V=new Map(M.blockers);V.set(w,D),Nt({blockers:V})}function fn({currentLocation:w,nextLocation:D,historyAction:A}){if(Se.size===0)return;Se.size>1&&St(!1,"A router only supports one blocker at a time");let V=Array.from(Se.entries()),[Q,ne]=V[V.length-1],P=M.blockers.get(Q);if(!(P&&P.state==="proceeding")&&ne({currentLocation:w,nextLocation:D,historyAction:A}))return Q}function La(w){let D=Ma(404,{pathname:w}),A=x.activeRoutes,{matches:V,route:Q}=cu(A);return{notFoundMatches:V,route:Q,error:D}}function Un(w,D,A){if(z=w,k=D,B=A||null,!Z&&M.navigation===Wo){Z=!0;let V=_r(M.location,M.matches);V!=null&&Nt({restoreScrollPosition:V})}return()=>{z=null,k=null,B=null}}function Ml(w,D){return B&&B(w,D.map(V=>By(V,M.loaderData)))||w.key}function Lu(w,D){if(z&&k){let A=Ml(w,D);z[A]=k()}}function _r(w,D){if(z){let A=Ml(w,D),V=z[A];if(typeof V=="number")return V}return null}function zl(w,D,A){if(n.patchRoutesOnNavigation){let V=x.branches;if(w){if(Object.keys(w[0].params).length>0)return{active:!0,matches:Va(D,A,v,!0,V)}}else return{active:!0,matches:Va(D,A,v,!0,V)||[]}}return{active:!1,matches:null}}async function Qa(w,D,A,V){if(!n.patchRoutesOnNavigation)return{type:"success",matches:w};let Q=w;for(;;){let ne=h;try{await n.patchRoutesOnNavigation({signal:A,path:D,matches:Q,fetcherKey:V,patch:(ce,ye)=>{A.aborted||Yv(ce,ye,x,ne,d,!1)}})}catch(ce){return{type:"error",error:ce,partialMatches:Q}}if(A.aborted)return{type:"aborted"};let P=x.branches,oe=Va(x.activeRoutes,D,v,!1,P),I=null;if(oe){if(Object.keys(oe[0].params).length===0)return{type:"success",matches:oe};if(I=Va(x.activeRoutes,D,v,!0,P),!(I&&Q.length<I.length&&Wi(Q,I.slice(0,Q.length))))return{type:"success",matches:oe}}if(I||(I=Va(x.activeRoutes,D,v,!0,P)),!I||Wi(Q,I))return{type:"success",matches:null};Q=I}}function Wi(w,D){return w.length===D.length&&w.every((A,V)=>A.route.id===D[V].route.id)}function Ii(w){h={},x.setHmrRoutes(Ui(w,d,void 0,h))}function Pi(w,D,A=!1){Yv(w,D,x,h,d,A),x.hasHMRRoutes||Nt({})}return le={get basename(){return v},get future(){return b},get state(){return M},get routes(){return x.stableRoutes},get branches(){return x.branches},get manifest(){return h},get window(){return r},initialize:nl,subscribe:kn,enableScrollRestoration:Un,navigate:cn,fetch:ka,revalidate:ae,createHref:w=>n.history.createHref(w),encodeLocation:w=>n.history.encodeLocation(w),getFetcher:Ou,resetFetcher:ku,deleteFetcher:Kt,dispose:Cl,getBlocker:Uu,deleteBlocker:on,patchRoutes:Pi,_internalFetchControllers:me,_internalSetRoutes:Ii,_internalSetStateDoNotUseOrYouWillBreakYourApp(w){Nt(w)}},n.instrumentations&&(le=nb(le,n.instrumentations.map(w=>w.router).filter(Boolean))),le}function pb(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function cf(n,r,s,o,f,d){let h,x;if(f){h=[];for(let p of r)if(h.push(p),p.route.id===f){x=p;break}}else h=r,x=r[r.length-1];let v=Nu(o||".",xf(h),Aa(n.pathname,s)||n.pathname,d==="path");if(o==null&&(v.search=n.search,v.hash=n.hash),(o==null||o===""||o===".")&&x){let p=Sf(v.search);if(x.route.index&&!p)v.search=v.search?v.search.replace(/^\?/,"?index&"):"?index";else if(!x.route.index&&p){let b=new URLSearchParams(v.search),y=b.getAll("index");b.delete("index"),y.filter(N=>N).forEach(N=>b.append("index",N));let j=b.toString();v.search=j?`?${j}`:""}}return s!=="/"&&(v.pathname=Wy({basename:s,pathname:v.pathname})),el(v)}function qv(n,r,s){if(!s||!pb(s))return{path:r};if(s.formMethod&&!Ub(s.formMethod))return{path:r,error:Ma(405,{method:s.formMethod})};let o=()=>({path:r,error:Ma(400,{type:"invalid-body"})}),d=(s.formMethod||"get").toUpperCase(),h=Bp(r);if(s.body!==void 0){if(s.formEncType==="text/plain"){if(!Gt(d))return o();let y=typeof s.body=="string"?s.body:s.body instanceof FormData||s.body instanceof URLSearchParams?Array.from(s.body.entries()).reduce((j,[N,z])=>`${j}${N}=${z}
59
+ `,""):String(s.body);return{path:r,submission:{formMethod:d,formAction:h,formEncType:s.formEncType,formData:void 0,json:void 0,text:y}}}else if(s.formEncType==="application/json"){if(!Gt(d))return o();try{let y=typeof s.body=="string"?JSON.parse(s.body):s.body;return{path:r,submission:{formMethod:d,formAction:h,formEncType:s.formEncType,formData:void 0,json:y,text:void 0}}}catch{return o()}}}we(typeof FormData=="function","FormData is not available in this environment");let x,v;if(s.formData)x=df(s.formData),v=s.formData;else if(s.body instanceof FormData)x=df(s.body),v=s.body;else if(s.body instanceof URLSearchParams)x=s.body,v=Zv(x);else if(s.body==null)x=new URLSearchParams,v=new FormData;else try{x=new URLSearchParams(s.body),v=Zv(x)}catch{return o()}let p={formMethod:d,formAction:h,formEncType:s&&s.formEncType||"application/x-www-form-urlencoded",formData:v,json:void 0,text:void 0};if(Gt(p.formMethod))return{path:r,submission:p};let b=tl(r);return n&&b.search&&Sf(b.search)&&x.append("index",""),b.search=`?${x}`,{path:el(b),submission:p}}function $v(n,r,s,o,f,d,h,x,v,p,b,y,j,N,z,B,k,Z,J,W,ee,ie){var H;let se=ee?pa(ee[1])?ee[1].error:ee[1].data:void 0,le=f.createURL(d.location),M=f.createURL(v),Re;if(b&&d.errors){let X=Object.keys(d.errors)[0];Re=h.findIndex(te=>te.route.id===X)}else if(ee&&pa(ee[1])){let X=ee[0];Re=h.findIndex(te=>te.route.id===X)-1}let xe=ee?ee[1].statusCode:void 0,Ke=xe&&xe>=400,ve={currentUrl:le,currentParams:((H=d.matches[0])==null?void 0:H.params)||{},nextUrl:M,nextParams:h[0].params,...x,actionResult:se,actionStatus:xe},st=Bi(h),Te=h.map((X,te)=>{let{route:me}=X,be=null;if(Re!=null&&te>Re)be=!1;else if(me.lazy)be=!0;else if(!yf(me))be=!1;else if(b){let{shouldLoad:F}=Ap(me,d.loaderData,d.errors);be=F}else xb(d.loaderData,d.matches[te],X)&&(be=!0);if(be!==null)return of(s,o,n,v,st,X,p,r,be);let R=!1;typeof ie=="boolean"?R=ie:Ke?R=!1:(y||le.pathname+le.search===M.pathname+M.search||le.search!==M.search||gb(d.matches[te],X))&&(R=!0);let q={...ve,defaultShouldRevalidate:R},K=Oi(X,q);return of(s,o,n,v,st,X,p,r,K,q,ie)}),ke=[];return z.forEach((X,te)=>{if(b||!h.some(fe=>fe.route.id===X.routeId)||N.has(te))return;let me=d.fetchers.get(te),be=me&&me.state!=="idle"&&me.data===void 0,R=Va(k,X.path,Z??"/",!1,W);if(!R){if(J&&be)return;ke.push({key:te,routeId:X.routeId,path:X.path,matches:null,match:null,request:null,controller:null});return}if(B.has(te))return;let q=hu(R,X.path),K=new AbortController,F=Nr(f,X.path,K.signal),he=null;if(j.has(te))j.delete(te),he=wr(s,o,F,X.path,R,q,p,r);else if(be)y&&(he=wr(s,o,F,X.path,R,q,p,r));else{let fe;typeof ie=="boolean"?fe=ie:Ke?fe=!1:fe=y;let Se={...ve,defaultShouldRevalidate:fe};Oi(q,Se)&&(he=wr(s,o,F,X.path,R,q,p,r,Se))}he&&ke.push({key:te,routeId:X.routeId,path:X.path,matches:he,match:q,request:F,controller:K})}),{dsMatches:Te,revalidatingFetchers:ke}}function yf(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function Ap(n,r,s){if(n.lazy)return{shouldLoad:!0,renderFallback:!0};if(!yf(n))return{shouldLoad:!1,renderFallback:!1};let o=r!=null&&n.id in r,f=s!=null&&s[n.id]!==void 0;if(!o&&f)return{shouldLoad:!1,renderFallback:!1};if(typeof n.loader=="function"&&n.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!o};let d=!o&&!f;return{shouldLoad:d,renderFallback:d}}function xb(n,r,s){let o=!r||s.route.id!==r.route.id,f=!n.hasOwnProperty(s.route.id);return o||f}function gb(n,r){let s=n.route.path;return n.pathname!==r.pathname||s!=null&&s.endsWith("*")&&n.params["*"]!==r.params["*"]}function Oi(n,r){if(n.route.shouldRevalidate){let s=n.route.shouldRevalidate(r);if(typeof s=="boolean")return s}return r.defaultShouldRevalidate}function Yv(n,r,s,o,f,d){let h;if(n){let p=o[n];we(p,`No route found to patch children into: routeId = ${n}`),p.children||(p.children=[]),h=p.children}else h=s.activeRoutes;let x=[],v=[];if(r.forEach(p=>{let b=h.find(y=>_p(p,y));b?v.push({existingRoute:b,newRoute:p}):x.push(p)}),x.length>0){let p=Ui(x,f,[n||"_","patch",String((h==null?void 0:h.length)||"0")],o);h.push(...p)}if(d&&v.length>0)for(let p=0;p<v.length;p++){let{existingRoute:b,newRoute:y}=v[p],j=b,[N]=Ui([y],f,[],{},!0);Object.assign(j,{element:N.element?N.element:j.element,errorElement:N.errorElement?N.errorElement:j.errorElement,hydrateFallbackElement:N.hydrateFallbackElement?N.hydrateFallbackElement:j.hydrateFallbackElement})}s.hasHMRRoutes||s.setRoutes([...s.activeRoutes])}function _p(n,r){var s;return"id"in n&&"id"in r&&n.id===r.id?!0:n.index===r.index&&n.path===r.path&&n.caseSensitive===r.caseSensitive?(!n.children||n.children.length===0)&&(!r.children||r.children.length===0)?!0:((s=n.children)==null?void 0:s.every((o,f)=>{var d;return(d=r.children)==null?void 0:d.some(h=>_p(o,h))}))??!1:!1}var Gv=new WeakMap,Op=({key:n,route:r,manifest:s,mapRouteProperties:o})=>{let f=s[r.id];if(we(f,"No route found in manifest"),!f.lazy||typeof f.lazy!="object")return;let d=f.lazy[n];if(!d)return;let h=Gv.get(f);h||(h={},Gv.set(f,h));let x=h[n];if(x)return x;let v=(async()=>{let p=ky(n),y=f[n]!==void 0&&n!=="hasErrorBoundary";if(p)St(!p,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),h[n]=Promise.resolve();else if(y)St(!1,`Route "${f.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let j=await d();j!=null&&(Object.assign(f,{[n]:j}),Object.assign(f,o(f)))}typeof f.lazy=="object"&&(f.lazy[n]=void 0,Object.values(f.lazy).every(j=>j===void 0)&&(f.lazy=void 0))})();return h[n]=v,v},Vv=new WeakMap;function yb(n,r,s,o,f){let d=s[n.id];if(we(d,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let b=Vv.get(d);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let y=(async()=>{we(typeof n.lazy=="function","No lazy route function found");let j=await n.lazy(),N={};for(let z in j){let B=j[z];if(B===void 0)continue;let k=Ly(z),J=d[z]!==void 0&&z!=="hasErrorBoundary";k?St(!k,"Route property "+z+" is not a supported property to be returned from a lazy route function. This property will be ignored."):J?St(!J,`Route "${d.id}" has a static property "${z}" defined but its lazy function is also returning a value for this property. The lazy route property "${z}" will be ignored.`):N[z]=B}Object.assign(d,N),Object.assign(d,{...o(d),lazy:void 0})})();return Vv.set(d,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let h=Object.keys(n.lazy),x=[],v;for(let b of h){if(f&&f.includes(b))continue;let y=Op({key:b,route:n,manifest:s,mapRouteProperties:o});y&&(x.push(y),b===r&&(v=y))}let p=x.length>0?Promise.all(x).then(()=>{}):void 0;return p==null||p.catch(()=>{}),v==null||v.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:v}}async function Xv(n){let r=n.matches.filter(f=>f.shouldLoad),s={};return(await Promise.all(r.map(f=>f.resolve()))).forEach((f,d)=>{s[r[d].route.id]=f}),s}async function bb(n){return n.matches.some(r=>r.route.middleware)?kp(n,()=>Xv(n)):Xv(n)}function kp(n,r){return Sb(n,r,o=>{if(kb(o))throw o;return o},zb,s);function s(o,f,d){if(d)return Promise.resolve(Object.assign(d.value,{[f]:{type:"error",result:o}}));{let{matches:h}=n,x=Math.min(Math.max(h.findIndex(p=>p.route.id===f),0),Math.max(h.findIndex(p=>p.shouldCallHandler()),0)),v=ln(h,h[x].route.id).route.id;return Promise.resolve({[v]:{type:"error",result:o}})}}}async function Sb(n,r,s,o,f){let{matches:d,...h}=n,x=d.flatMap(p=>p.route.middleware?p.route.middleware.map(b=>[p.route.id,b]):[]);return await Up(h,x,r,s,o,f)}async function Up(n,r,s,o,f,d,h=0){let{request:x}=n;if(x.signal.aborted)throw x.signal.reason??new Error(`Request aborted: ${x.method} ${x.url}`);let v=r[h];if(!v)return await s();let[p,b]=v,y,j=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await Up(n,r,s,o,f,d,h+1)},y.value}catch(N){return y={value:await d(N,p,y)},y.value}};try{let N=await b(n,j),z=N!=null?o(N):void 0;return f(z)?z:y?z??y.value:(y={value:await j()},y.value)}catch(N){return await d(N,p,y)}}function Lp(n,r,s,o,f){let d=Op({key:"middleware",route:o.route,manifest:r,mapRouteProperties:n}),h=yb(o.route,Gt(s.method)?"action":"loader",r,n,f);return{middleware:d,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function of(n,r,s,o,f,d,h,x,v,p=null,b){let y=!1,j=Lp(n,r,s,d,h);return{...d,_lazyPromises:j,shouldLoad:v,shouldRevalidateArgs:p,shouldCallHandler(N){return y=!0,p?typeof b=="boolean"?Oi(d,{...p,defaultShouldRevalidate:b}):typeof N=="boolean"?Oi(d,{...p,defaultShouldRevalidate:N}):Oi(d,p):v},resolve(N){let{lazy:z,loader:B,middleware:k}=d.route,Z=y||v||N&&!Gt(s.method)&&(z||B),J=k&&k.length>0&&!B&&!z;return Z&&(Gt(s.method)||!J)?Nb({request:s,path:o,pattern:f,match:d,lazyHandlerPromise:j==null?void 0:j.handler,lazyRoutePromise:j==null?void 0:j.route,handlerOverride:N,scopedContext:x}):Promise.resolve({type:"data",result:void 0})}}}function wr(n,r,s,o,f,d,h,x,v=null){return f.map(p=>p.route.id!==d.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:v,shouldCallHandler:()=>!1,_lazyPromises:Lp(n,r,s,p,h),resolve:()=>Promise.resolve({type:"data",result:void 0})}:of(n,r,s,o,Bi(f),p,h,x,!0,v))}async function jb(n,r,s,o,f,d,h){o.some(b=>{var y;return(y=b._lazyPromises)==null?void 0:y.middleware})&&await Promise.all(o.map(b=>{var y;return(y=b._lazyPromises)==null?void 0:y.middleware}));let x={request:r,url:Hp(r,s),pattern:Bi(o),params:o[0].params,context:d,matches:o},p=await n({...x,fetcherKey:f,runClientMiddleware:b=>{let y=x;return kp(y,()=>b({...y,fetcherKey:f,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(o.flatMap(b=>{var y,j;return[(y=b._lazyPromises)==null?void 0:y.handler,(j=b._lazyPromises)==null?void 0:j.route]}))}catch{}return p}async function Nb({request:n,path:r,pattern:s,match:o,lazyHandlerPromise:f,lazyRoutePromise:d,handlerOverride:h,scopedContext:x}){let v,p,b=Gt(n.method),y=b?"action":"loader",j=N=>{let z,B=new Promise((J,W)=>z=W);p=()=>z(),n.signal.addEventListener("abort",p);let k=J=>typeof N!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${o.route.id}]`)):N({request:n,url:Hp(n,r),pattern:s,params:o.params,context:x},...J!==void 0?[J]:[]),Z=(async()=>{try{return{type:"data",result:await(h?h(W=>k(W)):k())}}catch(J){return{type:"error",result:J}}})();return Promise.race([Z,B])};try{let N=b?o.route.action:o.route.loader;if(f||d)if(N){let z,[B]=await Promise.all([j(N).catch(k=>{z=k}),f,d]);if(z!==void 0)throw z;v=B}else{await f;let z=b?o.route.action:o.route.loader;if(z)[v]=await Promise.all([j(z),d]);else if(y==="action"){let B=new URL(n.url),k=B.pathname+B.search;throw Ma(405,{method:n.method,pathname:k,routeId:o.route.id})}else return{type:"data",result:void 0}}else if(N)v=await j(N);else{let z=new URL(n.url),B=z.pathname+z.search;throw Ma(404,{pathname:B})}}catch(N){return{type:"error",result:N}}finally{p&&n.signal.removeEventListener("abort",p)}return v}async function Eb(n){let r=n.headers.get("Content-Type");return r&&/\bapplication\/json\b/.test(r)?n.body==null?null:n.json():n.text()}async function wb(n){var o,f,d,h,x;let{result:r,type:s}=n;if(bf(r)){let v;try{v=await Eb(r)}catch(p){return{type:"error",error:p}}return s==="error"?{type:"error",error:new Hi(r.status,r.statusText,v),statusCode:r.status,headers:r.headers}:{type:"data",data:v,statusCode:r.status,headers:r.headers}}return s==="error"?Wv(r)?r.data instanceof Error?{type:"error",error:r.data,statusCode:(o=r.init)==null?void 0:o.status,headers:(f=r.init)!=null&&f.headers?new Headers(r.init.headers):void 0}:{type:"error",error:Mb(r),statusCode:Rr(r)?r.status:void 0,headers:(d=r.init)!=null&&d.headers?new Headers(r.init.headers):void 0}:{type:"error",error:r,statusCode:Rr(r)?r.status:void 0}:Wv(r)?{type:"data",data:r.data,statusCode:(h=r.init)==null?void 0:h.status,headers:(x=r.init)!=null&&x.headers?new Headers(r.init.headers):void 0}:{type:"data",data:r}}function Rb(n,r,s,o,f){let d=n.headers.get("Location");if(we(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!pf(d)){let h=o.slice(0,o.findIndex(x=>x.route.id===s)+1);d=cf(new URL(r.url),h,f,d),n.headers.set("Location",d)}return n}var Tb=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ff(n){try{return Tb.includes(new URL(n).protocol)}catch{return!1}}function Qv(n,r,s,o){if(pf(n)){let f=n,d=vf.test(f)?new URL(pp(f,r.protocol)):new URL(f);if(ff(d.toString()))throw new Error("Invalid redirect location");let h=Aa(d.pathname,s)!=null;if(d.origin===r.origin&&h)return gf(d.pathname)+d.search+d.hash}try{let f=o.createURL(n);if(ff(f.toString()))throw new Error("Invalid redirect location")}catch{}return n}function Nr(n,r,s,o){let f=n.createURL(Bp(r)).toString(),d={signal:s};if(o&&Gt(o.formMethod)){let{formMethod:h,formEncType:x}=o;d.method=h.toUpperCase(),x==="application/json"?(d.headers=new Headers({"Content-Type":x}),d.body=JSON.stringify(o.json)):x==="text/plain"?d.body=o.text:x==="application/x-www-form-urlencoded"&&o.formData?d.body=df(o.formData):d.body=o.formData}return new Request(f,d)}function Hp(n,r){let s=new URL(n.url),o=typeof r=="string"?tl(r):r;if(s.pathname=o.pathname||"/",o.search){let f=new URLSearchParams(o.search),d=f.getAll("index");f.delete("index");for(let h of d.filter(Boolean))f.append("index",h);s.search=f.size?`?${f.toString()}`:""}else s.search="";return s.hash=o.hash||"",s}function df(n){let r=new URLSearchParams;for(let[s,o]of n.entries())r.append(s,typeof o=="string"?o:o.name);return r}function Zv(n){let r=new FormData;for(let[s,o]of n.entries())r.append(s,o);return r}function Db(n,r,s,o=!1,f=!1){let d={},h=null,x,v=!1,p={},b=s&&pa(s[1])?s[1].error:void 0;return n.forEach(y=>{if(!(y.route.id in r))return;let j=y.route.id,N=r[j];if(we(!Mn(N),"Cannot handle redirect results in processLoaderData"),pa(N)){let z=N.error;if(b!==void 0&&(z=b,b=void 0),h=h||{},f)h[j]=z;else{let B=ln(n,j);h[B.route.id]==null&&(h[B.route.id]=z)}o||(d[j]=zp),v||(v=!0,x=Rr(N.error)?N.error.status:500),N.headers&&(p[j]=N.headers)}else d[j]=N.data,N.statusCode&&N.statusCode!==200&&!v&&(x=N.statusCode),N.headers&&(p[j]=N.headers)}),b!==void 0&&s&&(h={[s[0]]:b},s[2]&&(d[s[2]]=void 0)),{loaderData:d,errors:h,statusCode:x||200,loaderHeaders:p}}function Kv(n,r,s,o,f,d,h){let{loaderData:x,errors:v}=Db(r,s,o);return f.filter(p=>!p.matches||p.matches.some(b=>b.shouldLoad)).forEach(p=>{let{key:b,match:y,controller:j}=p;if(j&&j.signal.aborted)return;let N=d[b];if(we(N,"Did not find corresponding fetcher result"),pa(N)){let z=ln(n.matches,y==null?void 0:y.route.id);v&&v[z.route.id]||(v={...v,[z.route.id]:N.error}),h.delete(b)}else if(Mn(N))we(!1,"Unhandled fetcher revalidation redirect");else{let z=Pa(N.data);h.set(b,z)}}),{loaderData:x,errors:v}}function Jv(n,r,s,o){let f=Object.entries(r).filter(([,d])=>d!==zp).reduce((d,[h,x])=>(d[h]=x,d),{});for(let d of s){let h=d.route.id;if(!r.hasOwnProperty(h)&&n.hasOwnProperty(h)&&d.route.loader&&(f[h]=n[h]),o&&o.hasOwnProperty(h))break}return f}function Fv(n){return n?pa(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function ln(n,r){return(r?n.slice(0,n.findIndex(o=>o.route.id===r)+1):[...n]).reverse().find(o=>o.route.hasErrorBoundary===!0)||n[0]}function cu(n){let r=n.length===1?n[0]:n.find(s=>s.index||!s.path||s.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:r}],route:r}}function Ma(n,{pathname:r,routeId:s,method:o,type:f,message:d}={}){let h="Unknown Server Error",x="Unknown @remix-run/router error";return n===400?(h="Bad Request",o&&r&&s?x=`You made a ${o} request to "${r}" but did not provide a \`loader\` for route "${s}", so there is no way to handle the request.`:f==="invalid-body"&&(x="Unable to encode submission body")):n===403?(h="Forbidden",x=`Route "${s}" does not match URL "${r}"`):n===404?(h="Not Found",x=`No route matches URL "${r}"`):n===405&&(h="Method Not Allowed",o&&r&&s?x=`You made a ${o.toUpperCase()} request to "${r}" but did not provide an \`action\` for route "${s}", so there is no way to handle the request.`:o&&(x=`Invalid request method "${o.toUpperCase()}"`)),new Hi(n||500,h,new Error(x),!0)}function ou(n){let r=Object.entries(n);for(let s=r.length-1;s>=0;s--){let[o,f]=r[s];if(Mn(f))return{key:o,result:f}}}function Bp(n){let r=typeof n=="string"?tl(n):n;return el({...r,hash:""})}function Cb(n,r){return n.pathname!==r.pathname||n.search!==r.search?!1:n.hash===""?r.hash!=="":n.hash===r.hash?!0:r.hash!==""}function Mb(n){var r,s;return new Hi(((r=n.init)==null?void 0:r.status)??500,((s=n.init)==null?void 0:s.statusText)??"Internal Server Error",n.data)}function zb(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([r,s])=>typeof r=="string"&&Ab(s))}function Ab(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function _b(n){return bf(n.result)&&Dp.has(n.result.status)}function pa(n){return n.type==="error"}function Mn(n){return(n&&n.type)==="redirect"}function Wv(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function bf(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function Ob(n){return Dp.has(n)}function kb(n){return bf(n)&&Ob(n.status)&&n.headers.has("Location")}function Ub(n){return fb.has(n.toUpperCase())}function Gt(n){return cb.has(n.toUpperCase())}function Sf(n){return new URLSearchParams(n).getAll("index").some(r=>r==="")}function hu(n,r){let s=typeof r=="string"?tl(r).search:r.search;if(n[n.length-1].route.index&&Sf(s||""))return n[n.length-1];let o=Np(n);return o[o.length-1]}function Iv(n){let{formMethod:r,formAction:s,formEncType:o,text:f,formData:d,json:h}=n;if(!(!r||!s||!o)){if(f!=null)return{formMethod:r,formAction:s,formEncType:o,formData:void 0,json:void 0,text:f};if(d!=null)return{formMethod:r,formAction:s,formEncType:o,formData:d,json:void 0,text:void 0};if(h!==void 0)return{formMethod:r,formAction:s,formEncType:o,formData:void 0,json:h,text:void 0}}}function Io(n,r,s,o){return o?{state:"loading",location:n,matches:r,historyAction:s,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:n,matches:r,historyAction:s,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Lb(n,r,s,o){return{state:"submitting",location:n,matches:r,historyAction:s,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function wi(n,r){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:r}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function Hb(n,r){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:r?r.data:void 0}}function Pa(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function Bb(n,r){try{let s=n.sessionStorage.getItem(Mp);if(s){let o=JSON.parse(s);for(let[f,d]of Object.entries(o||{}))d&&Array.isArray(d)&&r.set(f,new Set(d||[]))}}catch{}}function qb(n,r){if(r.size>0){let s={};for(let[o,f]of r)s[o]=[...f];try{n.sessionStorage.setItem(Mp,JSON.stringify(s))}catch(o){St(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Pv(){let n,r,s=new Promise((o,f)=>{n=async d=>{o(d);try{await s}catch{}},r=async d=>{f(d);try{await s}catch{}}});return{promise:s,resolve:n,reject:r}}var _n=S.createContext(null);_n.displayName="DataRouter";var Cr=S.createContext(null);Cr.displayName="DataRouterState";var qp=S.createContext(!1);function $p(){return S.useContext(qp)}var jf=S.createContext({isTransitioning:!1});jf.displayName="ViewTransition";var Nf=S.createContext(new Map);Nf.displayName="Fetchers";var $b=S.createContext(null);$b.displayName="Await";var Oa=S.createContext(null);Oa.displayName="Navigation";var Eu=S.createContext(null);Eu.displayName="Location";var Xa=S.createContext({outlet:null,matches:[],isDataRoute:!1});Xa.displayName="Route";var Ef=S.createContext(null);Ef.displayName="RouteError";var Yp="REACT_ROUTER_ERROR",Yb="REDIRECT",Gb="ROUTE_ERROR_RESPONSE";function Vb(n){if(n.startsWith(`${Yp}:${Yb}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Xb(n){if(n.startsWith(`${Yp}:${Gb}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Hi(r.status,r.statusText,r.data)}catch{}}function Qb(n,{relative:r}={}){we(qi(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:o}=S.useContext(Oa),{hash:f,pathname:d,search:h}=$i(n,{relative:r}),x=d;return s!=="/"&&(x=d==="/"?s:za([s,d])),o.createHref({pathname:x,search:h,hash:f})}function qi(){return S.useContext(Eu)!=null}function ll(){return we(qi(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Eu).location}var Gp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Vp(n){S.useContext(Oa).static||S.useLayoutEffect(n)}function sn(){let{isDataRoute:n}=S.useContext(Xa);return n?r0():Zb()}function Zb(){we(qi(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(_n),{basename:r,navigator:s}=S.useContext(Oa),{matches:o}=S.useContext(Xa),{pathname:f}=ll(),d=JSON.stringify(xf(o)),h=S.useRef(!1);return Vp(()=>{h.current=!0}),S.useCallback((v,p={})=>{if(St(h.current,Gp),!h.current)return;if(typeof v=="number"){s.go(v);return}let b=Nu(v,JSON.parse(d),f,p.relative==="path");n==null&&r!=="/"&&(b.pathname=b.pathname==="/"?r:za([r,b.pathname])),(p.replace?s.replace:s.push)(b,p.state,p)},[r,s,d,f,n])}var Kb=S.createContext(null);function Jb(n){let r=S.useContext(Xa).outlet;return S.useMemo(()=>r&&S.createElement(Kb.Provider,{value:n},r),[r,n])}function $i(n,{relative:r}={}){let{matches:s}=S.useContext(Xa),{pathname:o}=ll(),f=JSON.stringify(xf(s));return S.useMemo(()=>Nu(n,JSON.parse(f),o,r==="path"),[n,f,o,r])}function Fb(n,r,s){we(qi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(Oa),{matches:f}=S.useContext(Xa),d=f[f.length-1],h=d?d.params:{},x=d?d.pathname:"/",v=d?d.pathnameBase:"/",p=d&&d.route;{let k=p&&p.path||"";Kp(x,!p||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${k}">) 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.
60
+
61
+ Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let b=ll(),y;y=b;let j=y.pathname||"/",N=j;if(v!=="/"){let k=v.replace(/^\//,"").split("/");N="/"+j.replace(/^\//,"").split("/").slice(k.length).join("/")}let z=s&&s.state.matches.length?s.state.matches.map(k=>Object.assign(k,{route:s.manifest[k.route.id]||k.route})):gp(n,{pathname:N});return St(p||z!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),St(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),t0(z&&z.map(k=>Object.assign({},k,{params:Object.assign({},h,k.params),pathname:za([v,o.encodeLocation?o.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?v:za([v,o.encodeLocation?o.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),f,s)}function Wb(){let n=Zp(),r=Rr(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},r),s?S.createElement("pre",{style:f},s):null,h)}var Ib=S.createElement(Wb,null),Xp=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=Xb(n.digest);s&&(n=s)}let r=n!==void 0?S.createElement(Xa.Provider,{value:this.props.routeContext},S.createElement(Ef.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(Pb,{error:n},r):r}};Xp.contextType=qp;var Po=new WeakMap;function Pb({children:n,error:r}){let{basename:s}=S.useContext(Oa);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=Vb(r.digest);if(o){let f=Po.get(r);if(f)throw f;let d=wp(o.location,s),h=d.absoluteURL||d.to;if(ff(h))throw new Error("Invalid redirect location");if(Ep&&!Po.get(r))if(d.isExternal||o.reloadDocument)window.location.href=h;else{const x=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:o.replace}));throw Po.set(r,x),x}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h}`})}}return n}function e0({routeContext:n,match:r,children:s}){let o=S.useContext(_n);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),S.createElement(Xa.Provider,{value:n},s)}function t0(n,r=[],s){let o=s==null?void 0:s.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let f=n,d=o==null?void 0:o.errors;if(d!=null){let b=f.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);we(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,b+1))}let h=!1,x=-1;if(s&&o){h=o.renderFallback;for(let b=0;b<f.length;b++){let y=f[b];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(x=b),y.route.id){let{loaderData:j,errors:N}=o,z=y.route.loader&&!j.hasOwnProperty(y.route.id)&&(!N||N[y.route.id]===void 0);if(y.route.lazy||z){s.isStatic&&(h=!0),x>=0?f=f.slice(0,x+1):f=[f[0]];break}}}}let v=s==null?void 0:s.onError,p=o&&v?(b,y)=>{var j,N;v(b,{location:o.location,params:((N=(j=o.matches)==null?void 0:j[0])==null?void 0:N.params)??{},pattern:Bi(o.matches),errorInfo:y})}:void 0;return f.reduceRight((b,y,j)=>{let N,z=!1,B=null,k=null;o&&(N=d&&y.route.id?d[y.route.id]:void 0,B=y.route.errorElement||Ib,h&&(x<0&&j===0?(Kp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,k=null):x===j&&(z=!0,k=y.route.hydrateFallbackElement||null)));let Z=r.concat(f.slice(0,j+1)),J=()=>{let W;return N?W=B:z?W=k:y.route.Component?W=S.createElement(y.route.Component,null):y.route.element?W=y.route.element:W=b,S.createElement(e0,{match:y,routeContext:{outlet:b,matches:Z,isDataRoute:o!=null},children:W})};return o&&(y.route.ErrorBoundary||y.route.errorElement||j===0)?S.createElement(Xp,{location:o.location,revalidation:o.revalidation,component:B,error:N,children:J(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:p}):J()},null)}function wf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qp(n){let r=S.useContext(_n);return we(r,wf(n)),r}function Yi(n){let r=S.useContext(Cr);return we(r,wf(n)),r}function a0(n){let r=S.useContext(Xa);return we(r,wf(n)),r}function wu(n){let r=a0(n),s=r.matches[r.matches.length-1];return we(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function l0(){return wu("useRouteId")}function un(){let n=Yi("useNavigation");return S.useMemo(()=>{let{matches:r,historyAction:s,...o}=n.navigation;return o},[n.navigation])}function n0(){let n=Qp("useRevalidator"),r=Yi("useRevalidator"),s=S.useCallback(async()=>{await n.router.revalidate()},[n.router]);return S.useMemo(()=>({revalidate:s,state:r.revalidation}),[s,r.revalidation])}function On(){let n=Yi("useLoaderData"),r=wu("useLoaderData");return n.loaderData[r]}function Gi(n){return Yi("useRouteLoaderData").loaderData[n]}function Zp(){var o;let n=S.useContext(Ef),r=Yi("useRouteError"),s=wu("useRouteError");return n!==void 0?n:(o=r.errors)==null?void 0:o[s]}function r0(){let{router:n}=Qp("useNavigate"),r=wu("useNavigate"),s=S.useRef(!1);return Vp(()=>{s.current=!0}),S.useCallback(async(f,d={})=>{St(s.current,Gp),s.current&&(typeof f=="number"?await n.navigate(f):await n.navigate(f,{fromRouteId:r,...d}))},[n,r])}var ep={};function Kp(n,r,s){!r&&!ep[n]&&(ep[n]=!0,St(!1,s))}var tp={};function ap(n,r){!n&&!tp[r]&&(tp[r]=!0,console.warn(r))}var i0="useOptimistic",lp=Ey[i0],s0=()=>{};function u0(n){return lp?lp(n):[n,s0]}function c0(n){let r={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&St(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(r,{element:S.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&St(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(r,{hydrateFallbackElement:S.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&St(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(r,{errorElement:S.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),r}var o0=["HydrateFallback","hydrateFallbackElement"],f0=class{constructor(){this.status="pending",this.promise=new Promise((n,r)=>{this.resolve=s=>{this.status==="pending"&&(this.status="resolved",n(s))},this.reject=s=>{this.status==="pending"&&(this.status="rejected",r(s))}})}};function d0({router:n,flushSync:r,onError:s,useTransitions:o}){o=$p()||o;let[d,h]=S.useState(n.state),[x,v]=u0(d),[p,b]=S.useState(),[y,j]=S.useState({isTransitioning:!1}),[N,z]=S.useState(),[B,k]=S.useState(),[Z,J]=S.useState(),W=S.useRef(new Map),ee=S.useCallback((M,{deletedFetchers:Re,newErrors:xe,flushSync:Ke,viewTransitionOpts:ve})=>{xe&&s&&Object.values(xe).forEach(Te=>{var ke;return s(Te,{location:M.location,params:((ke=M.matches[0])==null?void 0:ke.params)??{},pattern:Bi(M.matches)})}),M.fetchers.forEach((Te,ke)=>{Te.data!==void 0&&W.current.set(ke,Te.data)}),Re.forEach(Te=>W.current.delete(Te)),ap(Ke===!1||r!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` 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 st=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(ap(ve==null||st,"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."),!ve||!st){r&&Ke?r(()=>h(M)):o===!1?h(M):S.startTransition(()=>{o===!0&&v(Te=>np(Te,M)),h(M)});return}if(r&&Ke){r(()=>{B&&(N==null||N.resolve(),B.skipTransition()),j({isTransitioning:!0,flushSync:!0,currentLocation:ve.currentLocation,nextLocation:ve.nextLocation})});let Te=n.window.document.startViewTransition(()=>{r(()=>h(M))});Te.finished.finally(()=>{r(()=>{z(void 0),k(void 0),b(void 0),j({isTransitioning:!1})})}),r(()=>k(Te));return}B?(N==null||N.resolve(),B.skipTransition(),J({state:M,currentLocation:ve.currentLocation,nextLocation:ve.nextLocation})):(b(M),j({isTransitioning:!0,flushSync:!1,currentLocation:ve.currentLocation,nextLocation:ve.nextLocation}))},[n.window,r,B,N,o,v,s]);S.useLayoutEffect(()=>n.subscribe(ee),[n,ee]),S.useEffect(()=>{y.isTransitioning&&!y.flushSync&&z(new f0)},[y]),S.useEffect(()=>{if(N&&p&&n.window){let M=p,Re=N.promise,xe=n.window.document.startViewTransition(async()=>{o===!1?h(M):S.startTransition(()=>{o===!0&&v(Ke=>np(Ke,M)),h(M)}),await Re});xe.finished.finally(()=>{z(void 0),k(void 0),b(void 0),j({isTransitioning:!1})}),k(xe)}},[p,N,n.window,o,v]),S.useEffect(()=>{N&&p&&x.location.key===p.location.key&&N.resolve()},[N,B,x.location,p]),S.useEffect(()=>{!y.isTransitioning&&Z&&(b(Z.state),j({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}),J(void 0))},[y.isTransitioning,Z]);let ie=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:M=>n.navigate(M),push:(M,Re,xe)=>n.navigate(M,{state:Re,preventScrollReset:xe==null?void 0:xe.preventScrollReset}),replace:(M,Re,xe)=>n.navigate(M,{replace:!0,state:Re,preventScrollReset:xe==null?void 0:xe.preventScrollReset})}),[n]),se=n.basename||"/",le=S.useMemo(()=>({router:n,navigator:ie,static:!1,basename:se,onError:s}),[n,ie,se,s]);return S.createElement(S.Fragment,null,S.createElement(_n.Provider,{value:le},S.createElement(Cr.Provider,{value:x},S.createElement(Nf.Provider,{value:W.current},S.createElement(jf.Provider,{value:y},S.createElement(v0,{basename:se,location:x.location,navigationType:x.historyAction,navigator:ie,useTransitions:o},S.createElement(m0,{routes:n.routes,manifest:n.manifest,future:n.future,state:x,isStatic:!1,onError:s})))))),null)}function np(n,r){return{...n,navigation:r.navigation.state!=="idle"?r.navigation:n.navigation,revalidation:r.revalidation!=="idle"?r.revalidation:n.revalidation,actionData:r.navigation.state!=="submitting"?r.actionData:n.actionData,fetchers:r.fetchers}}var m0=S.memo(h0);function h0({routes:n,manifest:r,future:s,state:o,isStatic:f,onError:d}){return Fb(n,void 0,{manifest:r,state:o,isStatic:f,onError:d})}function Vi(n){return Jb(n.context)}function v0({basename:n="/",children:r=null,location:s,navigationType:o="POP",navigator:f,static:d=!1,useTransitions:h}){we(!qi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=n.replace(/^\/*/,"/"),v=S.useMemo(()=>({basename:x,navigator:f,static:d,useTransitions:h,future:{}}),[x,f,d,h]);typeof s=="string"&&(s=tl(s));let{pathname:p="/",search:b="",hash:y="",state:j=null,key:N="default",mask:z}=s,B=S.useMemo(()=>{let k=Aa(p,x);return k==null?null:{location:{pathname:k,search:b,hash:y,state:j,key:N,mask:z},navigationType:o}},[x,p,b,y,j,N,o,z]);return St(B!=null,`<Router basename="${x}"> is not able to match the URL "${p}${b}${y}" because it does not start with the basename, so the <Router> won't render anything.`),B==null?null:S.createElement(Oa.Provider,{value:v},S.createElement(Eu.Provider,{children:r,value:B}))}var vu="get",pu="application/x-www-form-urlencoded";function Ru(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function p0(n){return Ru(n)&&n.tagName.toLowerCase()==="button"}function x0(n){return Ru(n)&&n.tagName.toLowerCase()==="form"}function g0(n){return Ru(n)&&n.tagName.toLowerCase()==="input"}function y0(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function b0(n,r){return n.button===0&&(!r||r==="_self")&&!y0(n)}function mf(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((r,s)=>{let o=n[s];return r.concat(Array.isArray(o)?o.map(f=>[s,f]):[[s,o]])},[]))}function S0(n,r){let s=mf(n);return r&&r.forEach((o,f)=>{s.has(f)||r.getAll(f).forEach(d=>{s.append(f,d)})}),s}var fu=null;function j0(){if(fu===null)try{new FormData(document.createElement("form"),0),fu=!1}catch{fu=!0}return fu}var N0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ef(n){return n!=null&&!N0.has(n)?(St(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pu}"`),null):n}function E0(n,r){let s,o,f,d,h;if(x0(n)){let x=n.getAttribute("action");o=x?Aa(x,r):null,s=n.getAttribute("method")||vu,f=ef(n.getAttribute("enctype"))||pu,d=new FormData(n)}else if(p0(n)||g0(n)&&(n.type==="submit"||n.type==="image")){let x=n.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=n.getAttribute("formaction")||x.getAttribute("action");if(o=v?Aa(v,r):null,s=n.getAttribute("formmethod")||x.getAttribute("method")||vu,f=ef(n.getAttribute("formenctype"))||ef(x.getAttribute("enctype"))||pu,d=new FormData(x,n),!j0()){let{name:p,type:b,value:y}=n;if(b==="image"){let j=p?`${p}.`:"";d.append(`${j}x`,"0"),d.append(`${j}y`,"0")}else p&&d.append(p,y)}}else{if(Ru(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=vu,o=null,f=pu,h=n}return d&&f==="text/plain"&&(h=d,d=void 0),{action:o,method:s.toLowerCase(),encType:f,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Rf(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Jp(n,r,s,o){let f=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:r&&Aa(f.pathname,r)==="/"?f.pathname=`${yu(r)}/_root.${o}`:f.pathname=`${yu(f.pathname)}.${o}`,f}async function w0(n,r){if(n.id in r)return r[n.id];try{let s=await import(n.module);return r[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function R0(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function T0(n,r,s){let o=await Promise.all(n.map(async f=>{let d=r.routes[f.route.id];if(d){let h=await w0(d,s);return h.links?h.links():[]}return[]}));return z0(o.flat(1).filter(R0).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function rp(n,r,s,o,f,d){let h=(v,p)=>s[p]?v.route.id!==s[p].route.id:!0,x=(v,p)=>{var b;return s[p].pathname!==v.pathname||((b=s[p].route.path)==null?void 0:b.endsWith("*"))&&s[p].params["*"]!==v.params["*"]};return d==="assets"?r.filter((v,p)=>h(v,p)||x(v,p)):d==="data"?r.filter((v,p)=>{var y;let b=o.routes[v.route.id];if(!b||!b.hasLoader)return!1;if(h(v,p)||x(v,p))return!0;if(v.route.shouldRevalidate){let j=v.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((y=s[0])==null?void 0:y.params)||{},nextUrl:new URL(n,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof j=="boolean")return j}return!0}):[]}function D0(n,r,{includeHydrateFallback:s}={}){return C0(n.map(o=>{let f=r.routes[o.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),s&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function C0(n){return[...new Set(n)]}function M0(n){let r={},s=Object.keys(n).sort();for(let o of s)r[o]=n[o];return r}function z0(n,r){let s=new Set;return new Set(r),n.reduce((o,f)=>{let d=JSON.stringify(M0(f));return s.has(d)||(s.add(d),o.push({key:d,link:f})),o},[])}function Tf(){let n=S.useContext(_n);return Rf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function A0(){let n=S.useContext(Cr);return Rf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Df=S.createContext(void 0);Df.displayName="FrameworkContext";function Tu(){let n=S.useContext(Df);return Rf(n,"You must render this element inside a <HydratedRouter> element"),n}function _0(n,r){let s=S.useContext(Df),[o,f]=S.useState(!1),[d,h]=S.useState(!1),{onFocus:x,onBlur:v,onMouseEnter:p,onMouseLeave:b,onTouchStart:y}=r,j=S.useRef(null);S.useEffect(()=>{if(n==="render"&&h(!0),n==="viewport"){let B=Z=>{Z.forEach(J=>{h(J.isIntersecting)})},k=new IntersectionObserver(B,{threshold:.5});return j.current&&k.observe(j.current),()=>{k.disconnect()}}},[n]),S.useEffect(()=>{if(o){let B=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(B)}}},[o]);let N=()=>{f(!0)},z=()=>{f(!1),h(!1)};return s?n!=="intent"?[d,j,{}]:[d,j,{onFocus:Ri(x,N),onBlur:Ri(v,z),onMouseEnter:Ri(p,N),onMouseLeave:Ri(b,z),onTouchStart:Ri(y,N)}]:[!1,j,{}]}function Ri(n,r){return s=>{n&&n(s),s.defaultPrevented||r(s)}}function O0({page:n,...r}){let s=$p(),{nonce:o}=Tu(),{router:f}=Tf(),d=S.useMemo(()=>gp(f.routes,n,f.basename),[f.routes,n,f.basename]);return d?(r.nonce==null&&o&&(r={...r,nonce:o}),s?S.createElement(U0,{page:n,matches:d,...r}):S.createElement(L0,{page:n,matches:d,...r})):null}function k0(n){let{manifest:r,routeModules:s}=Tu(),[o,f]=S.useState([]);return S.useEffect(()=>{let d=!1;return T0(n,r,s).then(h=>{d||f(h)}),()=>{d=!0}},[n,r,s]),o}function U0({page:n,matches:r,...s}){let o=ll(),{future:f}=Tu(),{basename:d}=Tf(),h=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let x=Jp(n,d,f.v8_trailingSlashAwareDataRequests,"rsc"),v=!1,p=[];for(let b of r)typeof b.route.shouldRevalidate=="function"?v=!0:p.push(b.route.id);return v&&p.length>0&&x.searchParams.set("_routes",p.join(",")),[x.pathname+x.search]},[d,f.v8_trailingSlashAwareDataRequests,n,o,r]);return S.createElement(S.Fragment,null,h.map(x=>S.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...s})))}function L0({page:n,matches:r,...s}){let o=ll(),{future:f,manifest:d,routeModules:h}=Tu(),{basename:x}=Tf(),{loaderData:v,matches:p}=A0(),b=S.useMemo(()=>rp(n,r,p,d,o,"data"),[n,r,p,d,o]),y=S.useMemo(()=>rp(n,r,p,d,o,"assets"),[n,r,p,d,o]),j=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let B=new Set,k=!1;if(r.forEach(J=>{var ee;let W=d.routes[J.route.id];!W||!W.hasLoader||(!b.some(ie=>ie.route.id===J.route.id)&&J.route.id in v&&((ee=h[J.route.id])!=null&&ee.shouldRevalidate)||W.hasClientLoader?k=!0:B.add(J.route.id))}),B.size===0)return[];let Z=Jp(n,x,f.v8_trailingSlashAwareDataRequests,"data");return k&&B.size>0&&Z.searchParams.set("_routes",r.filter(J=>B.has(J.route.id)).map(J=>J.route.id).join(",")),[Z.pathname+Z.search]},[x,f.v8_trailingSlashAwareDataRequests,v,o,d,b,r,n,h]),N=S.useMemo(()=>D0(y,d),[y,d]),z=k0(y);return S.createElement(S.Fragment,null,j.map(B=>S.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...s})),N.map(B=>S.createElement("link",{key:B,rel:"modulepreload",href:B,...s})),z.map(({key:B,link:k})=>S.createElement("link",{key:B,nonce:s.nonce,...k,crossOrigin:k.crossOrigin??s.crossOrigin})))}function H0(...n){return r=>{n.forEach(s=>{typeof s=="function"?s(r):s!=null&&(s.current=r)})}}var B0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{B0&&(window.__reactRouterVersion="7.18.0")}catch{}function q0(n,r){return vb({basename:r==null?void 0:r.basename,getContext:r==null?void 0:r.getContext,future:r==null?void 0:r.future,history:zy({window:r==null?void 0:r.window}),hydrationData:$0(),routes:n,mapRouteProperties:c0,hydrationRouteProperties:o0,dataStrategy:r==null?void 0:r.dataStrategy,patchRoutesOnNavigation:r==null?void 0:r.patchRoutesOnNavigation,window:r==null?void 0:r.window,instrumentations:r==null?void 0:r.instrumentations}).initialize()}function $0(){let n=window==null?void 0:window.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:Y0(n.errors)}),n}function Y0(n){if(!n)return null;let r=Object.entries(n),s={};for(let[o,f]of r)if(f&&f.__type==="RouteErrorResponse")s[o]=new Hi(f.status,f.statusText,f.data,f.internal===!0);else if(f&&f.__type==="Error"){if(typeof f.__subType=="string"&&ab.includes(f.__subType)){let d=window[f.__subType];if(typeof d=="function")try{let h=new d(f.message);h.stack="",s[o]=h}catch{}}if(s[o]==null){let d=new Error(f.message);d.stack="",s[o]=d}}else s[o]=f;return s}var Ye=S.forwardRef(function({onClick:r,discover:s="render",prefetch:o="none",relative:f,reloadDocument:d,replace:h,mask:x,state:v,target:p,to:b,preventScrollReset:y,viewTransition:j,defaultShouldRevalidate:N,...z},B){let{basename:k,navigator:Z,useTransitions:J}=S.useContext(Oa),W=typeof b=="string"&&ju.test(b),ee=wp(b,k);b=ee.to;let ie=Qb(b,{relative:f}),se=ll(),le=null;if(x){let ke=Nu(x,[],se.mask?se.mask.pathname:"/",!0);k!=="/"&&(ke.pathname=ke.pathname==="/"?k:za([k,ke.pathname])),le=Z.createHref(ke)}let[M,Re,xe]=_0(o,z),Ke=V0(b,{replace:h,mask:x,state:v,target:p,preventScrollReset:y,relative:f,viewTransition:j,defaultShouldRevalidate:N,useTransitions:J});function ve(ke){r&&r(ke),ke.defaultPrevented||Ke(ke)}let st=!(ee.isExternal||d),Te=S.createElement("a",{...z,...xe,href:(st?le:void 0)||ee.absoluteURL||ie,onClick:st?ve:r,ref:H0(B,Re),target:p,"data-discover":!W&&s==="render"?"true":void 0});return M&&!W?S.createElement(S.Fragment,null,Te,S.createElement(O0,{page:ie})):Te});Ye.displayName="Link";var Fp=S.forwardRef(function({"aria-current":r="page",caseSensitive:s=!1,className:o="",end:f=!1,style:d,to:h,viewTransition:x,children:v,...p},b){let y=$i(h,{relative:p.relative}),j=ll(),N=S.useContext(Cr),{navigator:z,basename:B}=S.useContext(Oa),k=N!=null&&K0(y)&&x===!0,Z=z.encodeLocation?z.encodeLocation(y).pathname:y.pathname,J=j.pathname,W=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;s||(J=J.toLowerCase(),W=W?W.toLowerCase():null,Z=Z.toLowerCase()),W&&B&&(W=Aa(W,B)||W);const ee=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let ie=J===Z||!f&&J.startsWith(Z)&&J.charAt(ee)==="/",se=W!=null&&(W===Z||!f&&W.startsWith(Z)&&W.charAt(Z.length)==="/"),le={isActive:ie,isPending:se,isTransitioning:k},M=ie?r:void 0,Re;typeof o=="function"?Re=o(le):Re=[o,ie?"active":null,se?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let xe=typeof d=="function"?d(le):d;return S.createElement(Ye,{...p,"aria-current":M,className:Re,ref:b,style:xe,to:h,viewTransition:x},typeof v=="function"?v(le):v)});Fp.displayName="NavLink";var ga=S.forwardRef(({discover:n="render",fetcherKey:r,navigate:s,reloadDocument:o,replace:f,state:d,method:h=vu,action:x,onSubmit:v,relative:p,preventScrollReset:b,viewTransition:y,defaultShouldRevalidate:j,...N},z)=>{let{useTransitions:B}=S.useContext(Oa),k=zf(),Z=Z0(x,{relative:p}),J=h.toLowerCase()==="get"?"get":"post",W=typeof x=="string"&&ju.test(x),ee=ie=>{if(v&&v(ie),ie.defaultPrevented)return;ie.preventDefault();let se=ie.nativeEvent.submitter,le=(se==null?void 0:se.getAttribute("formmethod"))||h,M=()=>k(se||ie.currentTarget,{fetcherKey:r,method:le,navigate:s,replace:f,state:d,relative:p,preventScrollReset:b,viewTransition:y,defaultShouldRevalidate:j});B&&s!==!1?S.startTransition(()=>M()):M()};return S.createElement("form",{ref:z,method:J,action:Z,onSubmit:o?v:ee,...N,"data-discover":!W&&n==="render"?"true":void 0})});ga.displayName="Form";function Wp(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cf(n){let r=S.useContext(_n);return we(r,Wp(n)),r}function G0(n){let r=S.useContext(Cr);return we(r,Wp(n)),r}function V0(n,{target:r,replace:s,mask:o,state:f,preventScrollReset:d,relative:h,viewTransition:x,defaultShouldRevalidate:v,useTransitions:p}={}){let b=sn(),y=ll(),j=$i(n,{relative:h});return S.useCallback(N=>{if(b0(N,r)){N.preventDefault();let z=s!==void 0?s:el(y)===el(j),B=()=>b(n,{replace:z,mask:o,state:f,preventScrollReset:d,relative:h,viewTransition:x,defaultShouldRevalidate:v});p?S.startTransition(()=>B()):B()}},[y,b,j,s,o,f,r,n,d,h,x,v,p])}function Mf(n){St(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let r=S.useRef(mf(n)),s=S.useRef(!1),o=ll(),f=S.useMemo(()=>S0(o.search,s.current?null:r.current),[o.search]),d=sn(),h=S.useCallback((x,v)=>{const p=mf(typeof x=="function"?x(new URLSearchParams(f)):x);s.current=!0,d("?"+p,v)},[d,f]);return[f,h]}var X0=0,Q0=()=>`__${String(++X0)}__`;function zf(){let{router:n}=Cf("useSubmit"),{basename:r}=S.useContext(Oa),s=l0(),o=n.fetch,f=n.navigate;return S.useCallback(async(d,h={})=>{let{action:x,method:v,encType:p,formData:b,body:y}=E0(d,r);if(h.navigate===!1){let j=h.fetcherKey||Q0();await o(j,s,h.action||x,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:y,formMethod:h.method||v,formEncType:h.encType||p,flushSync:h.flushSync})}else await f(h.action||x,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:y,formMethod:h.method||v,formEncType:h.encType||p,replace:h.replace,state:h.state,fromRouteId:s,flushSync:h.flushSync,viewTransition:h.viewTransition})},[o,f,r,s])}function Z0(n,{relative:r}={}){let{basename:s}=S.useContext(Oa),o=S.useContext(Xa);we(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),d={...$i(n||".",{relative:r})},h=ll();if(n==null){d.search=h.search;let x=new URLSearchParams(d.search),v=x.getAll("index");if(v.some(b=>b==="")){x.delete("index"),v.filter(y=>y).forEach(y=>x.append("index",y));let b=x.toString();d.search=b?`?${b}`:""}}return(!n||n===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(d.pathname=d.pathname==="/"?s:za([s,d.pathname])),el(d)}function zn({key:n}={}){var ie;let{router:r}=Cf("useFetcher"),s=G0("useFetcher"),o=S.useContext(Nf),f=S.useContext(Xa),d=(ie=f.matches[f.matches.length-1])==null?void 0:ie.route.id;we(o,"useFetcher must be used inside a FetchersContext"),we(f,"useFetcher must be used inside a RouteContext"),we(d!=null,'useFetcher can only be used on routes that contain a unique "id"');let h=S.useId(),[x,v]=S.useState(n||h);n&&n!==x&&v(n);let{deleteFetcher:p,getFetcher:b,resetFetcher:y,fetch:j}=r;S.useEffect(()=>(b(x),()=>p(x)),[p,b,x]);let N=S.useCallback(async(se,le)=>{we(d,"No routeId available for fetcher.load()"),await j(x,d,se,le)},[x,d,j]),z=zf(),B=S.useCallback(async(se,le)=>{await z(se,{...le,navigate:!1,fetcherKey:x})},[x,z]),k=S.useCallback(se=>y(x,se),[y,x]),Z=S.useMemo(()=>{let se=S.forwardRef((le,M)=>S.createElement(ga,{...le,navigate:!1,fetcherKey:x,ref:M}));return se.displayName="fetcher.Form",se},[x]),J=s.fetchers.get(x)||Cp,W=o.get(x);return S.useMemo(()=>({Form:Z,submit:B,load:N,reset:k,...J,data:W}),[Z,B,N,k,J,W])}function K0(n,{relative:r}={}){let s=S.useContext(jf);we(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Cf("useViewTransitionState"),f=$i(n,{relative:r});if(!s.isTransitioning)return!1;let d=Aa(s.currentLocation.pathname,o)||s.currentLocation.pathname,h=Aa(s.nextLocation.pathname,o)||s.nextLocation.pathname;return gu(f.pathname,h)!=null||gu(f.pathname,d)!=null}var J0=mp();function F0(n){return S.createElement(d0,{flushSync:J0.flushSync,...n})}/**
62
+ * @license lucide-react v1.21.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const Ip=(...n)=>n.filter((r,s,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===s).join(" ").trim();/**
67
+ * @license lucide-react v1.21.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const W0=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
72
+ * @license lucide-react v1.21.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const I0=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,o)=>o?o.toUpperCase():s.toLowerCase());/**
77
+ * @license lucide-react v1.21.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const ip=n=>{const r=I0(n);return r.charAt(0).toUpperCase()+r.slice(1)};/**
82
+ * @license lucide-react v1.21.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */var tf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
87
+ * @license lucide-react v1.21.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const P0=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},e1=S.createContext({}),t1=()=>S.useContext(e1),a1=S.forwardRef(({color:n,size:r,strokeWidth:s,absoluteStrokeWidth:o,className:f="",children:d,iconNode:h,...x},v)=>{const{size:p=24,strokeWidth:b=2,absoluteStrokeWidth:y=!1,color:j="currentColor",className:N=""}=t1()??{},z=o??y?Number(s??b)*24/Number(r??p):s??b;return S.createElement("svg",{ref:v,...tf,width:r??p??tf.width,height:r??p??tf.height,stroke:n??j,strokeWidth:z,className:Ip("lucide",N,f),...!d&&!P0(x)&&{"aria-hidden":"true"},...x},[...h.map(([B,k])=>S.createElement(B,k)),...Array.isArray(d)?d:[d]])});/**
92
+ * @license lucide-react v1.21.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const Ot=(n,r)=>{const s=S.forwardRef(({className:o,...f},d)=>S.createElement(a1,{ref:d,iconNode:r,className:Ip(`lucide-${W0(ip(n))}`,`lucide-${n}`,o),...f}));return s.displayName=ip(n),s};/**
97
+ * @license lucide-react v1.21.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const l1=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Du=Ot("arrow-left",l1);/**
102
+ * @license lucide-react v1.21.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const n1=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],r1=Ot("chart-column",n1);/**
107
+ * @license lucide-react v1.21.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const i1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],s1=Ot("check",i1);/**
112
+ * @license lucide-react v1.21.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const u1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],An=Ot("chevron-down",u1);/**
117
+ * @license lucide-react v1.21.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const c1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pp=Ot("chevron-right",c1);/**
122
+ * @license lucide-react v1.21.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const o1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],f1=Ot("circle-check",o1);/**
127
+ * @license lucide-react v1.21.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const d1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],m1=Ot("copy",d1);/**
132
+ * @license lucide-react v1.21.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const h1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],v1=Ot("download",h1);/**
137
+ * @license lucide-react v1.21.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const p1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],x1=Ot("file-text",p1);/**
142
+ * @license lucide-react v1.21.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const g1=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],y1=Ot("git-branch",g1);/**
147
+ * @license lucide-react v1.21.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const b1=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],S1=Ot("house",b1);/**
152
+ * @license lucide-react v1.21.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const j1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],bu=Ot("layers",j1);/**
157
+ * @license lucide-react v1.21.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const N1=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],ex=Ot("list-todo",N1);/**
162
+ * @license lucide-react v1.21.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const E1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],w1=Ot("moon",E1);/**
167
+ * @license lucide-react v1.21.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const R1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Tr=Ot("pencil",R1);/**
172
+ * @license lucide-react v1.21.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const T1=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],D1=Ot("sun",T1);/**
177
+ * @license lucide-react v1.21.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const C1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Dr=Ot("trash-2",C1);/**
182
+ * @license lucide-react v1.21.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const M1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],z1=Ot("x",M1),A1="/api",_1=120,O1=40;function Cu(n){return{...n,number:n.number??0,decisions:n.decisions??[],acceptedDecisions:n.acceptedDecisions??[],checklist:n.checklist??[],subtasks:n.subtasks??[],startedAt:n.startedAt??"",completedAt:n.completedAt??""}}function Mu(n){return{...n,discussedAt:n.discussedAt??"",contextReady:n.contextReady??!1,contextReadyReason:n.contextReadyReason??"",notes:n.notes??"",goals:n.goals??[],nonGoals:n.nonGoals??[],dependencies:n.dependencies??[],risks:n.risks??[],openQuestions:n.openQuestions??[],decisions:n.decisions??[],acceptedDecisions:n.acceptedDecisions??[],completionCriteria:n.completionCriteria??[],taskIds:n.taskIds??[],tasks:(n.tasks??[]).map(Cu)}}function zu(n){return{...n,number:n.number??0,discussedAt:n.discussedAt??"",contextReady:n.contextReady??!1,contextReadyReason:n.contextReadyReason??"",acceptedDecisions:n.acceptedDecisions??[],phaseIds:n.phaseIds??[]}}function tx(n){var r,s,o;return{...n,scope:n.scope??[],outOfScope:n.outOfScope??[],decisions:n.decisions??[],globalRules:n.globalRules??[],technologies:n.technologies??[],tools:n.tools??[],acceptedDecisions:n.acceptedDecisions??[],planRoot:n.planRoot??"",projectRoot:n.projectRoot??"",workflowRules:{beforePhaseStart:((r=n.workflowRules)==null?void 0:r.beforePhaseStart)??[],beforeTaskStart:((s=n.workflowRules)==null?void 0:s.beforeTaskStart)??[],afterPhaseComplete:((o=n.workflowRules)==null?void 0:o.afterPhaseComplete)??[]}}}async function sp(n,r){try{return await fetch(`${A1}${n}`,{headers:{"Content-Type":"application/json"},...r})}catch{throw new Response("Planner web server unavailable. Pi or planner-web may have stopped. Restart the planner web UI or Pi, then reload this page.",{status:503,statusText:"Planner web server unavailable"})}}async function jt(n,r){let s=await sp(n,r),o=0;for(;s.status===503&&o<O1;)await new Promise(f=>setTimeout(f,_1)),o+=1,s=await sp(n,r);if(!s.ok){const f=await s.text().catch(()=>s.statusText);throw new Response(f||s.statusText,{status:s.status,statusText:s.statusText})}return s.json()}async function ax(){return tx(await jt("/project"))}async function k1(n){return tx(await jt("/project",{method:"PUT",body:JSON.stringify(n)}))}async function U1(){return jt("/ui-config")}async function lx(){return(await jt("/features")).map(zu)}async function Xi(n){return zu(await jt(`/features/${n}`))}async function L1(n){return zu(await jt("/features",{method:"POST",body:JSON.stringify(n)}))}async function nx(n){return zu(await jt(`/features/${n.id}`,{method:"PUT",body:JSON.stringify(n)}))}async function H1(n){return jt(`/features/${n}`,{method:"DELETE"})}async function Af(n){const r=n?`?featureId=${encodeURIComponent(n)}`:"";return(await jt(`/phases${r}`)).map(Mu)}async function Au(n){return Mu(await jt(`/phases/${n}`))}async function B1(n){return Mu(await jt("/phases",{method:"POST",body:JSON.stringify(n)}))}async function rx(n){return Mu(await jt(`/phases/${n.id}`,{method:"PUT",body:JSON.stringify(n)}))}async function q1(n){return jt(`/phases/${n}`,{method:"DELETE"})}async function $1(n,r){return Cu(await jt(`/phases/${n}/tasks`,{method:"POST",body:JSON.stringify(r)}))}async function _u(n){return Cu(await jt(`/tasks/${n}`))}async function _f(n){return Cu(await jt(`/tasks/${n.id}`,{method:"PUT",body:JSON.stringify(n)}))}async function Y1(n){return jt(`/tasks/${n}`,{method:"DELETE"})}async function ix(){return jt("/tasks/active")}async function sx(){return jt("/handoff")}async function G1(n=!1){return jt(`/export?full=${n?"true":"false"}`)}async function V1(){return jt("/repair",{method:"POST"})}function X1(){const[n,r]=S.useState(()=>{if(typeof window>"u")return"dark";const s=window.localStorage.getItem("plan-ui-theme");return s||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")});return S.useEffect(()=>{document.documentElement.setAttribute("data-theme",n),window.localStorage.setItem("plan-ui-theme",n)},[n]),{theme:n,toggleTheme:()=>r(s=>s==="dark"?"light":"dark")}}function Q1({liveStatus:n}){const r=n==="live"?{label:"Live",className:"border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",dotClassName:"bg-emerald-500"}:n==="reconnecting"?{label:"Reconnecting…",className:"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-400",dotClassName:"bg-amber-500 animate-pulse"}:n==="disconnected"?{label:"Disconnected",className:"border-rose-500/30 bg-rose-500/10 text-rose-700 dark:text-rose-400",dotClassName:"bg-rose-500"}:{label:"Connecting…",className:"border-sky-500/30 bg-sky-500/10 text-sky-700 dark:text-sky-400",dotClassName:"bg-sky-500 animate-pulse"};return c.jsxs("span",{className:`inline-flex min-h-11 items-center gap-2 rounded-[14px] border px-3 py-2 text-sm font-semibold ${r.className}`,children:[c.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${r.dotClassName}`}),r.label]})}function Z1({projectName:n,projectRoot:r,planRoot:s,handoffExists:o,liveStatus:f}){const{theme:d,toggleTheme:h}=X1(),[x,v]=S.useState(!1),[p,b]=S.useState(!1),[y,j]=S.useState(null),N=[{to:"/",label:"Dashboard",icon:S1},{to:"/features",label:"Features",icon:bu},...o?[{to:"/handoff",label:"Handoff",icon:x1}]:[]];async function z(B){j(B?"full":"summary");try{const Z=await G1(B),J=new Blob([Z.markdown],{type:"text/markdown;charset=utf-8"}),W=URL.createObjectURL(J),ee=document.createElement("a");ee.href=W,ee.download=B?"EXPORT-full.md":Z.filePath||"EXPORT.md",document.body.appendChild(ee),ee.click(),ee.remove(),URL.revokeObjectURL(W),b(!1)}catch(Z){window.alert(`Export failed: ${Z instanceof Error?Z.message:String(Z)}`)}finally{j(null)}}return c.jsx("div",{className:"border-b border-[var(--border)] bg-[var(--surface)]/90 backdrop-blur-xl",children:c.jsxs("div",{className:"page-container flex flex-col gap-4 py-3 md:flex-row md:items-center md:justify-between",children:[c.jsxs(Ye,{to:"/",className:"flex min-w-0 items-center gap-3",children:[c.jsx("div",{className:"surface-card flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl border border-[var(--border)] text-[var(--accent)]",children:c.jsx(bu,{className:"h-4 w-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"truncate text-sm font-black tracking-tight",children:n??"Agent Plan"}),s?c.jsx("span",{className:"shrink-0 rounded-full border border-[var(--border)] bg-[var(--surface-elevated)] px-2 py-0.5 text-[10px] font-semibold text-[var(--text-subtle)]",children:".planner/"}):null]}),r?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"truncate text-[11px] text-[var(--text-subtle)]",title:r,children:r}),c.jsx("button",{type:"button",onClick:async B=>{B.preventDefault(),B.stopPropagation(),r&&(await navigator.clipboard.writeText(r).catch(()=>{}),v(!0),window.setTimeout(()=>v(!1),1200))},className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-[var(--text-subtle)] transition hover:text-[var(--text)]",title:x?"Copied":"Copy project path","aria-label":x?"Copied":"Copy project path",children:x?c.jsx(s1,{className:"h-3.5 w-3.5"}):c.jsx(m1,{className:"h-3.5 w-3.5"})})]}):null]})]}),c.jsxs("div",{className:"flex items-center justify-between gap-3 md:justify-end",children:[c.jsx("div",{className:"flex flex-wrap items-center gap-2",children:c.jsx(Q1,{liveStatus:f})}),c.jsx("nav",{className:"flex flex-wrap items-center gap-2",children:N.map(B=>c.jsxs(Fp,{to:B.to,end:B.to==="/",className:({isActive:k})=>`inline-flex min-h-11 items-center gap-2 rounded-[14px] border px-4 py-2 text-sm font-semibold transition ${k?"border-transparent bg-[var(--accent-soft)] text-[var(--accent)]":"border-transparent text-[var(--text-muted)] hover:bg-[var(--accent-soft)] hover:text-[var(--text)]"}`,children:[c.jsx(B.icon,{className:"h-4 w-4"}),B.label]},B.to))}),c.jsxs("div",{className:"relative",children:[c.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":p,onClick:()=>b(B=>!B),className:"inline-flex min-h-11 items-center gap-2 rounded-[14px] border border-[var(--border-strong)] bg-[var(--surface-elevated)] px-4 py-2 text-sm font-semibold text-[var(--text-muted)] transition hover:text-[var(--text)]",children:[c.jsx(v1,{className:"h-4 w-4"}),"Export",c.jsx(An,{className:`h-4 w-4 transition-transform ${p?"rotate-180":""}`})]}),p?c.jsxs("div",{role:"menu",className:"absolute right-0 z-50 mt-2 min-w-44 overflow-hidden rounded-[14px] border border-[var(--border)] bg-[var(--surface-elevated)] p-1 shadow-xl",children:[c.jsxs("button",{type:"button",role:"menuitem",disabled:y!==null,onClick:()=>void z(!1),className:"flex w-full items-center justify-between rounded-[10px] px-3 py-2 text-left text-sm font-semibold text-[var(--text)] transition hover:bg-[var(--accent-soft)] disabled:cursor-wait disabled:opacity-60",children:["Summary",y==="summary"?c.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"…"}):null]}),c.jsxs("button",{type:"button",role:"menuitem",disabled:y!==null,onClick:()=>void z(!0),className:"flex w-full items-center justify-between rounded-[10px] px-3 py-2 text-left text-sm font-semibold text-[var(--text)] transition hover:bg-[var(--accent-soft)] disabled:cursor-wait disabled:opacity-60",children:["Full",y==="full"?c.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"…"}):null]})]}):null]}),c.jsx("button",{type:"button",onClick:h,className:"inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-[14px] border border-[var(--border-strong)] bg-[var(--surface-elevated)] text-[var(--text-muted)] transition hover:text-[var(--text)]",children:d==="dark"?c.jsx(D1,{className:"h-4 w-4"}):c.jsx(w1,{className:"h-4 w-4"})})]})]})})}function up(n,r,s){n.split(`
187
+ `).forEach((f,d)=>{d>0&&r.push(c.jsx("br",{},`${s}-br-${d}`)),f&&r.push(f)})}function Ti(n,r){const s=[],o=/(\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*)/g;let f=0,d=null,h=0;for(;(d=o.exec(n))!==null;)d.index>f&&up(n.slice(f,d.index),s,`${r}-${h}`),d[2]&&d[3]?s.push(c.jsx("a",{href:d[3],target:"_blank",rel:"noreferrer",className:"font-semibold text-[var(--accent)] underline-offset-4 hover:underline",children:d[2]},`${r}-link-${h}`)):d[4]?s.push(c.jsx("strong",{className:"font-semibold text-[var(--text)]",children:d[4]},`${r}-strong-${h}`)):d[5]?s.push(c.jsx("code",{className:"rounded-md border border-[var(--border)] px-1.5 py-0.5 font-mono text-[0.95em] text-[var(--text)]",children:d[5]},`${r}-code-${h}`)):d[6]&&s.push(c.jsx("em",{className:"italic",children:d[6]},`${r}-em-${h}`)),f=o.lastIndex,h+=1;return f<n.length&&up(n.slice(f),s,`${r}-tail`),s}function K1(n,r){var f;const s=n.split(`
188
+ `);if(n.startsWith("```")){const d=n.replace(/^```[a-zA-Z]*\n?/,"").replace(/```\s*$/,"");return c.jsx("pre",{className:"overflow-x-auto rounded-lg border border-[var(--border)] bg-[var(--surface-elevated)] p-3 text-sm font-mono text-[var(--text)]",children:c.jsx("code",{children:d})},`code-${r}`)}const o=n.match(/^(#{1,6})\s+(.+)$/);if(o&&o[2]){const d=((f=o[1])==null?void 0:f.length)??1,h=o[2],x=d<=2?"text-base font-bold text-[var(--text)]":"text-sm font-bold text-[var(--text)]";return c.jsx("p",{className:x,children:Ti(h,`h-${r}`)},`h-${r}`)}return s.every(d=>/^\s*>\s?/.test(d))?c.jsx("blockquote",{className:"border-l-2 border-[var(--accent)] pl-4 text-sm italic text-[var(--text-muted)]",children:s.map((d,h)=>c.jsx("div",{children:Ti(d.replace(/^\s*>\s?/,""),`bq-${r}-${h}`)},`bq-${r}-${h}`))},`bq-${r}`):/^\s*([-*_])\1{2,}\s*$/.test(n.trim())?c.jsx("hr",{className:"border-[var(--border)]"},`hr-${r}`):s.every(d=>/^\s*[-*]\s+/.test(d))?c.jsx("ul",{className:"grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:s.map((d,h)=>c.jsx("li",{className:"list-disc",children:Ti(d.replace(/^\s*[-*]\s+/,""),`ul-${r}-${h}`)},`ul-${r}-${h}`))},`ul-${r}`):s.every(d=>/^\s*\d+\.\s+/.test(d))?c.jsx("ol",{className:"grid gap-2 pl-5 text-sm text-[var(--text-muted)] list-decimal",children:s.map((d,h)=>c.jsx("li",{children:Ti(d.replace(/^\s*\d+\.\s+/,""),`ol-${r}-${h}`)},`ol-${r}-${h}`))},`ol-${r}`):c.jsx("p",{className:"text-sm leading-6 text-[var(--text-muted)] whitespace-pre-wrap",children:Ti(n,`p-${r}`)},`p-${r}`)}function _t({text:n,className:r=""}){if(!(n!=null&&n.trim()))return null;const s=n.trim().split(/\n\s*\n/).filter(Boolean);return c.jsx("div",{className:`grid gap-3 ${r}`,children:s.map((o,f)=>K1(o,f))})}const cp={feature:{soft:"rgba(139, 92, 246, 0.16)",strong:"var(--color-entity-feature)"},phase:{soft:"rgba(6, 182, 212, 0.16)",strong:"var(--color-entity-phase)"},task:{soft:"rgba(16, 185, 129, 0.16)",strong:"var(--color-entity-task)"}};function xu(n){return String(n&&n>0?n:0).padStart(3,"0")}function Pt({type:n,number:r}){const s=cp[n]||cp.task,o=(s==null?void 0:s.soft)||"transparent",f=(s==null?void 0:s.strong)||"inherit";return c.jsxs("span",{className:"inline-flex items-center justify-center font-mono text-[11px] font-bold leading-none px-2 py-1 rounded-md transition-colors",style:{backgroundColor:o,color:f},children:[n?n.charAt(0).toUpperCase():"?",xu(r)]})}function rn({type:n,phaseNum:r,featureNum:s}){return n==="feature"?null:n==="phase"?s===void 0?null:c.jsx("div",{className:"inline-flex items-stretch font-mono text-[10.5px] font-semibold rounded-md overflow-hidden border border-[var(--border)] bg-[var(--surface-elevated)]",children:c.jsxs("span",{className:"px-2 py-1 text-[var(--text-muted)]",children:["F",xu(s)]})}):n==="task"?r===void 0?null:c.jsxs("div",{className:"inline-flex items-stretch font-mono text-[10.5px] font-semibold rounded-md overflow-hidden border border-[var(--border)] bg-[var(--surface-elevated)]",children:[c.jsxs("span",{className:"px-2 py-1 text-[var(--text-muted)]",children:["P",xu(r)]}),s!==void 0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"w-[1px] bg-[var(--border)]"}),c.jsxs("span",{className:"px-2 py-1 text-[var(--text-subtle)]",children:["F",xu(s)]})]})]}):null}function J1({activeTasks:n}){const r=S.useMemo(()=>{const s=new Set;return n.filter(o=>{const f=`${o.id}-${o.title}-${o.phaseId}`;return s.has(f)?!1:(s.add(f),!0)})},[n]);return r.length===0?null:c.jsx("div",{className:"border-t border-[var(--border)] bg-[var(--surface-elevated)]/95 backdrop-blur-xl",children:c.jsx("div",{className:"page-container py-2.5",children:c.jsxs("div",{className:"grid gap-2",children:[c.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:["In-progress tasks (",r.length,")"]}),c.jsx("div",{className:"grid max-h-[35vh] gap-1.5 overflow-y-auto pr-1",children:r.map(s=>{const o=s.featureId?`/features/${s.featureId}/phases/${s.phaseId}/tasks/${s.id}`:"/features";return c.jsx(Ye,{to:o,className:"flex min-w-0 items-center gap-2 rounded-[10px] border border-[var(--border)] bg-[var(--surface-card)] px-3 py-2 text-sm text-[var(--text)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--accent-soft)] hover:text-[var(--accent)]",children:c.jsxs("div",{className:"flex items-center gap-2",children:[s.status==="in-progress"?c.jsx("span",{"aria-hidden":"true",className:"inline-block h-2 w-2 rounded-full bg-[var(--accent)]","aria-label":"In progress"}):null,c.jsx(Pt,{type:"task",number:s.number}),c.jsx(rn,{type:"task",phaseNum:s.phaseNumber,featureNum:s.featureNumber}),c.jsx("span",{className:"min-w-0 truncate font-medium",children:s.title})]})},s.id)})})]})})})}function F1({project:n,activeTasks:r,handoffExists:s,serverInfo:o}){const f=un(),[d,h]=S.useState("connecting");return S.useEffect(()=>{const x=v=>{var b;const p=(b=v.detail)==null?void 0:b.status;p&&h(p)};return window.addEventListener("agent-plan:ws-status",x),()=>window.removeEventListener("agent-plan:ws-status",x)},[]),c.jsxs("div",{className:"page-shell",children:[c.jsxs("header",{className:"sticky top-0 z-30",children:[c.jsx(Z1,{projectName:n==null?void 0:n.name,projectRoot:n==null?void 0:n.projectRoot,planRoot:n==null?void 0:n.planRoot,handoffExists:s,liveStatus:d}),c.jsx(J1,{activeTasks:r})]}),c.jsxs("div",{className:"page-container py-8",children:[c.jsxs("div",{className:"mb-8 flex flex-col gap-3 md:flex-row md:items-end md:justify-between md:gap-6",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-sm font-semibold uppercase tracking-[0.24em] text-[var(--text-subtle)]",children:"Current project"}),c.jsx("h1",{className:"text-2xl font-black tracking-tight text-[var(--text)] md:text-3xl",children:c.jsx(Ye,{to:"/",className:"hover:text-[var(--accent)]",children:(n==null?void 0:n.name)??"Agent Plan"})}),n!=null&&n.projectRoot?c.jsx("p",{className:"mt-2 truncate font-mono text-xs text-[var(--text-subtle)]",title:n.projectRoot,children:n.projectRoot}):null,o?c.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs",children:[c.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 font-semibold uppercase tracking-[0.12em] ${o.mode==="lan"?"bg-[color:color-mix(in_srgb,var(--accent)_16%,transparent)] text-[var(--accent)]":"bg-[var(--surface-elevated)] text-[var(--text-muted)]"}`,children:[c.jsx("span",{"aria-hidden":"true",className:"inline-block h-1.5 w-1.5 rounded-full bg-current"}),o.mode==="lan"?"LAN visible":"Local only"]}),c.jsx("a",{href:o.localUrl,target:"_blank",rel:"noreferrer",className:"font-mono text-[var(--text-subtle)] underline-offset-2 hover:text-[var(--accent)] hover:underline",children:o.localUrl}),o.lanUrl?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-[var(--text-subtle)]",children:"·"}),c.jsx("a",{href:o.lanUrl,target:"_blank",rel:"noreferrer",className:"font-mono text-[var(--text-subtle)] underline-offset-2 hover:text-[var(--accent)] hover:underline",children:o.lanUrl})]}):null]}):null,n!=null&&n.description?c.jsx(_t,{text:n.description,className:"mt-2 max-w-3xl"}):null]}),f.state!=="idle"?c.jsx("div",{className:"text-sm font-semibold text-[var(--accent)]",children:"Updating…"}):null]}),c.jsx(Vi,{})]})]})}const _i={create:{key:"n",meta:!0,ctrl:!0},edit:{key:"e",meta:!0,ctrl:!0},delete:{key:"d",meta:!0,ctrl:!0},submit:{key:"Enter",primary:!0}},ux=S.createContext(_i);function cx(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform)}function W1(n){return typeof n!="string"}function I1(n){return{create:(n==null?void 0:n.create)??_i.create,edit:(n==null?void 0:n.edit)??_i.edit,delete:(n==null?void 0:n.delete)??_i.delete,submit:(n==null?void 0:n.submit)??_i.submit}}function P1(n){const r=[],s=cx();n.primary&&r.push(s?"⌘":"Ctrl"),n.meta&&r.push(s?"⌘":"Meta"),n.ctrl&&r.push(s?"⌃":"Ctrl"),n.shift&&r.push(s?"⇧":"Shift"),n.alt&&r.push(s?"⌥":"Alt");const o=n.key==="Backspace"?s?"⌫":"Backspace":n.key==="Enter"?s?"↩":"Enter":n.key.length===1?n.key.toUpperCase():n.key;return r.push(o),s?r.join(""):r.join("+")}function e2(n){return n instanceof HTMLElement?!!n.closest("input, textarea, select, [contenteditable='true']"):!1}function t2(n,r){const s=r.key.length===1?r.key.toLowerCase():r.key,o=n.key.length===1?n.key.toLowerCase():n.key,f=cx(),d=r.meta??(r.primary?f:!1),h=r.ctrl??(r.primary?!f:!1);return o===s&&!!d===n.metaKey&&!!h===n.ctrlKey&&!!r.shift===n.shiftKey&&!!r.alt===n.altKey}function a2({shortcuts:n,children:r}){return S.createElement(ux.Provider,{value:I1(n)},r)}function ox(n){const r=S.useContext(ux);if(n)return W1(n)?n:r[n]}function qt(n,r,s){const o=ox(n);S.useEffect(()=>{if(!o||(s==null?void 0:s.enabled)===!1)return;const f=d=>{!(s!=null&&s.allowInEditable)&&e2(d.target)||t2(d,o)&&(d.preventDefault(),r())};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[r,s==null?void 0:s.allowInEditable,s==null?void 0:s.enabled,o])}const l2=1500,n2=80,r2=12e3,i2=5e3;function s2(){const{revalidate:n}=n0(),r=S.useRef(null),s=S.useRef(null),o=S.useRef(null),f=S.useRef(null),d=S.useRef(null);return S.useEffect(()=>{let h=!0;const x=ee=>{window.dispatchEvent(new CustomEvent("agent-plan:ws-status",{detail:{status:ee}}))},v=()=>{s.current!==null&&(window.clearTimeout(s.current),s.current=null)},p=()=>{o.current!==null&&(window.clearTimeout(o.current),o.current=null)},b=()=>{d.current!==null&&(window.clearTimeout(d.current),d.current=null)},y=()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},j=()=>{p(),o.current=window.setTimeout(()=>{n()},n2)},N=()=>{!h||s.current!==null||(x("reconnecting"),s.current=window.setTimeout(()=>{s.current=null,k()},l2))},z=()=>{y(),b();const ee=r.current;if(r.current=null,ee&&(ee.readyState===WebSocket.OPEN||ee.readyState===WebSocket.CONNECTING))try{ee.close()}catch{}},B=()=>{y(),b(),f.current=window.setInterval(()=>{const ee=r.current;if(!(!ee||ee.readyState!==WebSocket.OPEN)){try{ee.send(JSON.stringify({type:"ping"}))}catch{z(),N();return}b(),d.current=window.setTimeout(()=>{z(),N()},i2)}},r2)},k=()=>{if(!h)return;const ee=r.current;if(ee&&(ee.readyState===WebSocket.OPEN||ee.readyState===WebSocket.CONNECTING))return;x(s.current!==null?"reconnecting":"connecting"),v();const ie=window.location.protocol==="https:"?"wss":"ws",se=new WebSocket(`${ie}://${window.location.host}/ws`);r.current=se,se.onopen=()=>{v(),x("live"),B()},se.onmessage=le=>{b();try{const M=JSON.parse(le.data);if(!M.type||M.type==="pong"||M.type==="connected")return;switch(window.dispatchEvent(new CustomEvent("agent-plan:ws-event",{detail:M})),M.type){case"project-updated":case"features-updated":case"phases-updated":case"requirements-updated":case"plan-rendered":case"file-changed":j();break;default:break}}catch{}},se.onclose=()=>{y(),b(),r.current===se&&(r.current=null),h&&N()},se.onerror=()=>{try{se.close()}catch{}}},Z=()=>{const ee=r.current;(!ee||ee.readyState===WebSocket.CLOSED||ee.readyState===WebSocket.CLOSING)&&k()},J=()=>{document.visibilityState==="visible"&&Z()},W=()=>{Z()};return x("connecting"),k(),window.addEventListener("online",W),document.addEventListener("visibilitychange",J),()=>{h=!1,x("disconnected"),window.removeEventListener("online",W),document.removeEventListener("visibilitychange",J),v(),p(),y(),b(),z()}},[n]),null}async function u2(){const[n,r,s,o]=await Promise.all([ax(),U1(),ix(),sx()]);return{project:n,uiConfig:r,activeTasks:s,handoff:o}}function c2(){const{project:n,uiConfig:r,activeTasks:s,handoff:o}=On();return S.useEffect(()=>{var f;document.title=(f=n==null?void 0:n.name)!=null&&f.trim()?`${n.name} · Agent Plan`:"Agent Plan"},[n==null?void 0:n.name]),c.jsxs(a2,{shortcuts:r.shortcuts,children:[c.jsx(s2,{}),c.jsx(F1,{project:n,activeTasks:s,handoffExists:o.exists,serverInfo:r.server})]})}function o2(){const n=Zp(),r=Rr(n),s=r&&n.status===503,o=r?s?"Planner web UI disconnected":`Request failed (${n.status})`:"Planner web UI unavailable",f=r?n.data||n.statusText:n instanceof Error?n.message:"The planner web UI could not reach its local server.";return S.useEffect(()=>{document.title="Agent Plan"},[]),c.jsx("div",{className:"page-shell min-h-screen",children:c.jsx("div",{className:"page-container flex min-h-screen items-center justify-center py-12",children:c.jsxs("div",{className:"surface-card max-w-2xl rounded-[24px] px-8 py-8",children:[c.jsx("p",{className:"text-sm font-semibold uppercase tracking-[0.24em] text-[var(--text-subtle)]",children:"Agent Plan"}),c.jsx("h1",{className:"mt-2 text-2xl font-black tracking-tight text-[var(--text)] md:text-3xl",children:o}),c.jsx("p",{className:"mt-4 text-sm text-[var(--text-muted)]",children:String(f)}),c.jsx("div",{className:"mt-6 grid gap-2 text-sm text-[var(--text-muted)]",children:s?c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"Possible cause: Pi was closed or the local planner web server stopped."}),c.jsx("p",{children:"What to do:"}),c.jsxs("ul",{className:"grid gap-1 pl-5",children:[c.jsxs("li",{className:"list-disc",children:["restart Pi or run ",c.jsx("code",{children:"planner-web start"})]}),c.jsx("li",{className:"list-disc",children:"reopen this planner UI from the new session if needed"}),c.jsx("li",{className:"list-disc",children:"then reload this page"})]})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"The request reached the planner server, but the server rejected it."}),c.jsx("p",{children:"Fix the validation issue above, then try again."})]})}),c.jsx("div",{className:"mt-6 flex flex-wrap gap-3",children:c.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"inline-flex min-h-11 items-center rounded-[14px] bg-[var(--accent)] px-4 py-2 text-sm font-semibold text-white transition hover:opacity-90",children:"Reload page"})})]})})})}async function f2(){const[n,r,s]=await Promise.all([lx(),Af(),ix()]);return{features:n,phases:r,activeTasks:s}}function d2({shortcut:n}){const r=ox(n);return r?c.jsx("span",{className:"rounded-md border border-[var(--border-strong)] bg-[var(--surface-elevated)] px-2 py-0.5 text-[11px] font-bold tracking-wide text-[var(--text-muted)]",children:P1(r)}):null}const m2={primary:"border-transparent bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)]",secondary:"border-[var(--border-strong)] bg-[var(--surface-elevated)] text-[var(--text)] hover:bg-[var(--accent-soft)] hover:text-[var(--text)]",ghost:"border-transparent bg-transparent text-[var(--text-muted)] hover:bg-[var(--accent-soft)] hover:text-[var(--text)]",danger:"border-transparent bg-[var(--danger-soft)] text-[var(--color-status-blocked)] hover:bg-[color-mix(in_srgb,var(--danger-soft)_88%,black_12%)]"};function He({variant:n="secondary",className:r="",children:s,shortcut:o,...f}){return c.jsxs("button",{className:`inline-flex min-h-11 items-center justify-center gap-2 rounded-[14px] border px-4 py-2 text-sm font-semibold transition-colors motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--surface)] disabled:cursor-not-allowed disabled:opacity-60 ${m2[n]} ${r}`,...f,children:[c.jsx("span",{children:s}),o?c.jsx(d2,{shortcut:o}):null]})}function Vt({className:n="",children:r,...s}){return c.jsx("div",{className:`surface-card p-6 ${n}`,...s,children:r})}function h2({decisions:n}){return n.length===0?null:c.jsxs("details",{className:"group rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-4 py-4",children:[c.jsxs("summary",{className:"cursor-pointer select-none font-semibold text-[var(--text)]",children:["Accepted decisions (",n.length,")"]}),c.jsx("div",{className:"mt-4 grid gap-3",children:n.map(r=>c.jsxs("div",{className:"rounded-[14px] border border-[var(--border)] bg-[var(--surface-elevated)] px-4 py-3",children:[c.jsx("p",{className:"text-sm font-semibold text-[var(--text)]",children:r.title}),r.decision?c.jsxs("div",{className:"mt-2 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Decision:"})," ",c.jsx(_t,{text:r.decision})]}):null,r.rationale?c.jsxs("div",{className:"mt-1 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Rationale:"})," ",c.jsx(_t,{text:r.rationale})]}):null,r.implementationNotes?c.jsxs("div",{className:"mt-1 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Implementation:"})," ",c.jsx(_t,{text:r.implementationNotes})]}):null]},r.id))})]})}function v2({project:n}){var b,y,j;const r=n.scope??[],s=n.outOfScope??[],o=n.technologies??[],f=n.tools??[],d=n.globalRules??[],h=n.decisions??[],x=n.acceptedDecisions??[],v={beforePhaseStart:((b=n.workflowRules)==null?void 0:b.beforePhaseStart)??[],beforeTaskStart:((y=n.workflowRules)==null?void 0:y.beforeTaskStart)??[],afterPhaseComplete:((j=n.workflowRules)==null?void 0:j.afterPhaseComplete)??[]};return r.length>0||s.length>0||o.length>0||f.length>0||d.length>0||h.length>0||x.length>0||v.beforePhaseStart.length>0||v.beforeTaskStart.length>0||v.afterPhaseComplete.length>0?c.jsx(Vt,{className:"grid gap-4",children:c.jsxs("details",{className:"group",children:[c.jsx("summary",{className:"cursor-pointer select-none text-lg font-bold text-[var(--text)]",children:"AI Consolidated Context"}),c.jsxs("div",{className:"mt-4 grid gap-4",children:[r.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"In scope"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:r.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,s.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Out of scope"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:s.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,o.length>0||f.length>0?c.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[o.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Technologies"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:o.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,f.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Tools"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:f.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null]}):null,d.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Global rules"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:d.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,v.beforePhaseStart.length>0||v.beforeTaskStart.length>0||v.afterPhaseComplete.length>0?c.jsxs("details",{className:"group rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-4 py-4",children:[c.jsx("summary",{className:"cursor-pointer select-none font-semibold text-[var(--text)]",children:"Workflow rules"}),c.jsxs("div",{className:"mt-4 grid gap-4 text-sm text-[var(--text-muted)]",children:[v.beforePhaseStart.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-[var(--text)]",children:"Before phase start"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5",children:v.beforePhaseStart.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,v.beforeTaskStart.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-[var(--text)]",children:"Before task start"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5",children:v.beforeTaskStart.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,v.afterPhaseComplete.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-[var(--text)]",children:"After phase complete"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5",children:v.afterPhaseComplete.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null]})]}):null,h.length>0?c.jsxs("details",{className:"group rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-4 py-4",children:[c.jsxs("summary",{className:"cursor-pointer select-none font-semibold text-[var(--text)]",children:["Legacy decisions (",h.length,")"]}),c.jsx("ul",{className:"mt-4 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:h.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,c.jsx(h2,{decisions:x})]})]})}):null}function _a({status:n}){return c.jsx("span",{className:`status-chip status-${n}`,children:n})}function p2(n){try{return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(n))}catch{return n}}function x2({features:n,phases:r}){const s=S.useMemo(()=>{const o=new Map(n.map(f=>[f.id,f.name]));return r.flatMap(f=>f.tasks.filter(d=>d.status==="done").map(d=>({task:d,phase:f,feature:n.find(h=>h.id===f.featureId),featureName:f.featureId?o.get(f.featureId)??f.featureId:"Unlinked feature",completedAt:d.completedAt||d.updatedAt}))).sort((f,d)=>d.completedAt.localeCompare(f.completedAt)).slice(0,3)},[n,r]);return c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-bold text-[var(--text)]",children:"Latest completed tasks"}),c.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Most recently completed tasks, ordered by completion timestamp."})]}),c.jsx("div",{className:"grid gap-3",children:s.length>0?s.map(({task:o,phase:f,feature:d,featureName:h,completedAt:x})=>c.jsxs(Ye,{to:f.featureId?`/features/${f.featureId}/phases/${f.id}/tasks/${o.id}`:"/features",className:"surface-card grid gap-1 px-4 py-3 transition hover:border-[var(--accent)] hover:bg-[var(--accent-soft)]",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Pt,{type:"task",number:o.number}),c.jsx(rn,{type:"task",phaseNum:f.number,featureNum:d==null?void 0:d.number}),c.jsx("span",{className:"entity-link--task truncate text-sm font-semibold underline-offset-4 hover:underline",children:o.title})]}),c.jsx(_a,{status:o.status})]}),c.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--text-muted)]",children:[c.jsx(rn,{type:"phase",featureNum:d==null?void 0:d.number}),c.jsxs("span",{children:[h," · ",f.title]})]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-subtle)]",children:["Completed ",p2(x)]})]},o.id)):c.jsx("p",{className:"py-4 text-center text-sm text-[var(--text-muted)]",children:"No completed tasks yet."})})]})}const g2=4200;function y2(n){return n.reduce((r,s)=>r+s.tasks.length,0)}function b2(n){return n.reduce((r,s)=>r+s.tasks.filter(o=>o.status==="done").length,0)}function S2(n){return String(n&&n>0?n:0).padStart(3,"0")}function j2(n,r){const s=new Map;for(const o of r){if(!o.featureId)continue;const f=s.get(o.featureId)??[];f.push(o),s.set(o.featureId,f)}return n.map(o=>{const f=s.get(o.id)??[],d=f.reduce((p,b)=>p+b.tasks.length,0),h=f.reduce((p,b)=>p+b.tasks.filter(y=>y.status==="done").length,0),x=f.map(p=>{const b=[...p.tasks].sort((j,N)=>j.number-N.number||j.createdAt.localeCompare(N.createdAt)||j.title.localeCompare(N.title)),y=b.some(j=>j.status==="in-progress");return{phase:p,totalTasks:p.tasks.length,doneTasks:p.tasks.filter(j=>j.status==="done").length,allTasks:b,hasActiveTask:y}}),v=x.some(({phase:p,allTasks:b})=>p.status==="in-progress"||p.status==="discovery"||b.some(y=>y.status==="in-progress"));return{feature:o,totalTasks:d,doneTasks:h,allPhases:x.sort((p,b)=>p.phase.number-b.phase.number),hasActiveTask:x.some(p=>p.hasActiveTask),isActive:v}}).sort((o,f)=>o.feature.number-f.feature.number||o.feature.name.localeCompare(f.feature.name))}function du({title:n,value:r,valueSuffix:s,subtitle:o,icon:f,valueClassName:d,iconClassName:h}){return c.jsxs(Vt,{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:n}),c.jsxs("div",{className:"mt-2 flex items-end gap-2",children:[c.jsx("p",{className:`text-3xl font-black tracking-tight ${d??"text-[var(--text)]"}`,children:r}),s?c.jsx("span",{className:"pb-1 text-sm font-semibold text-[var(--text-muted)]",children:s}):null]}),c.jsx("p",{className:"mt-1 text-sm text-[var(--text-muted)]",children:o})]}),c.jsx("div",{className:`surface-card flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl border border-[var(--border)] bg-[var(--accent-soft)] ${h??"text-[var(--accent)]"}`,children:f})]})}function op(n){return n>=80?"text-emerald-600 dark:text-emerald-400":n>=30?"text-amber-600 dark:text-amber-400":"text-rose-600 dark:text-rose-400"}function N2({features:n,phases:r}){const s=n.filter(b=>b.status==="done").length,o=Math.max(n.length-s,0),f=r.filter(b=>b.status==="done").length,d=Math.max(r.length-f,0),h=y2(r),x=b2(r),v=Math.max(h-x,0),p=h>0?Math.round(x/h*100):0;return c.jsxs("div",{className:"grid gap-4 lg:grid-cols-4",children:[c.jsx(du,{title:"Features",value:String(n.length),valueSuffix:"total",subtitle:c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"font-semibold text-emerald-600 dark:text-emerald-400",children:[s," done"]}),c.jsx("span",{children:" · "}),c.jsxs("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:[o," left"]})]}),icon:c.jsx(bu,{className:"h-4 w-4"})}),c.jsx(du,{title:"Phases",value:String(r.length),valueSuffix:"total",subtitle:c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"font-semibold text-emerald-600 dark:text-emerald-400",children:[f," done"]}),c.jsx("span",{children:" · "}),c.jsxs("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:[d," left"]})]}),icon:c.jsx(r1,{className:"h-4 w-4"})}),c.jsx(du,{title:"Tasks",value:String(h),valueSuffix:"total",subtitle:c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"font-semibold text-emerald-600 dark:text-emerald-400",children:[x," done"]}),c.jsx("span",{children:" · "}),c.jsxs("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:[v," left"]})]}),icon:c.jsx(ex,{className:"h-4 w-4"})}),c.jsx(du,{title:"Completion",value:`${p}%`,subtitle:"Task completion rate",valueClassName:op(p),iconClassName:op(p),icon:c.jsx(f1,{className:"h-4 w-4"})})]})}const Qi=[{value:"planned",label:"Planned"},{value:"in-progress",label:"In progress"},{value:"done",label:"Done"},{value:"blocked",label:"Blocked"},{value:"canceled",label:"Canceled"},{value:"rejected",label:"Rejected"},{value:"deferred",label:"Deferred"},{value:"waiting",label:"Waiting"}],Zi=[{value:"draft",label:"Draft"},{value:"discovery",label:"Discovery"},{value:"planned",label:"Planned"},{value:"in-progress",label:"In progress"},{value:"done",label:"Done"},{value:"blocked",label:"Blocked"},{value:"canceled",label:"Canceled"},{value:"rejected",label:"Rejected"},{value:"deferred",label:"Deferred"},{value:"waiting",label:"Waiting"}],Mr=[{value:"planned",label:"Planned"},{value:"in-progress",label:"In progress"},{value:"done",label:"Done"},{value:"blocked",label:"Blocked"},{value:"canceled",label:"Canceled"},{value:"rejected",label:"Rejected"},{value:"deferred",label:"Deferred"},{value:"waiting",label:"Waiting"}],Di=Qi.map(n=>n.value),Ci=Zi.map(n=>n.value),Mi=Mr.map(n=>n.value);function af(n,r,s){if(n.includes(r)){const o=n.filter(f=>f!==r);return o.length===0?[...s]:o}return[...n,r]}function lf(n,r){return r.includes(n)}function Ia(n,r){return`agent-plan:dashboard:${n}:${r}`}function nf(n,r,s){if(typeof window>"u")return r;try{const o=window.localStorage.getItem(n);if(!o)return r;const f=JSON.parse(o);if(!Array.isArray(f))return r;const d=`${n}-schema`,h=s.slice().sort().join(",");if(window.localStorage.getItem(d)!==h)return window.localStorage.setItem(d,h),r;const v=f.filter(p=>typeof p=="string"&&s.includes(p));return v.length>0?v:r}catch{return r}}function rf(n,r,s){typeof window>"u"||(window.localStorage.setItem(n,JSON.stringify(r)),window.localStorage.setItem(`${n}-schema`,s.slice().sort().join(",")))}function sf(n,r){if(typeof window>"u")return r;const s=window.localStorage.getItem(n);return s===null?r:s==="true"}function E2({features:n,phases:r,projectStorageScope:s}){const o=Ia(s,"show-all-features"),f=Ia(s,"tree-open-mode"),d=Ia(s,"expanded-features"),h=Ia(s,"expanded-phases"),x=Ia(s,"feature-status-filters"),v=Ia(s,"phase-status-filters"),p=Ia(s,"task-status-filters"),b=Ia(s,"hide-done"),y=Ia(s,"hide-planned"),j=Ia(s,"only-active-branches"),N=S.useMemo(()=>j2(n,r),[n,r]),[z,B]=S.useState(()=>{if(typeof window>"u")return!0;const ae=window.localStorage.getItem(o);return ae===null?!0:ae==="true"}),[k,Z]=S.useState(()=>{if(typeof window>"u")return"all";const ae=window.localStorage.getItem(f);return ae==="smart"||ae==="none"||ae==="all"?ae:"all"}),[J,W]=S.useState(()=>{if(typeof window>"u")return[];try{const ae=window.localStorage.getItem(d);return ae?JSON.parse(ae):[]}catch{return[]}}),[ee,ie]=S.useState(()=>{if(typeof window>"u")return[];try{const ae=window.localStorage.getItem(h);return ae?JSON.parse(ae):[]}catch{return[]}}),[se,le]=S.useState(()=>nf(x,Di,Di)),[M,Re]=S.useState(()=>nf(v,Ci,Ci)),[xe,Ke]=S.useState(()=>nf(p,Mi,Mi)),[ve,st]=S.useState(()=>sf(b,!1)),[Te,ke]=S.useState(()=>sf(y,!1)),[H,X]=S.useState(()=>sf(j,!1)),[te,me]=S.useState([]),[be,R]=S.useState([]),[q,K]=S.useState([]),F=S.useRef({});S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(o,String(z))},[z,o]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(f,k)},[k,f]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(d,JSON.stringify(J))},[J,d]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(h,JSON.stringify(ee))},[ee,h]),S.useEffect(()=>{typeof window>"u"||rf(x,se,Di)},[se,x]),S.useEffect(()=>{typeof window>"u"||rf(v,M,Ci)},[M,v]),S.useEffect(()=>{typeof window>"u"||rf(p,xe,Mi)},[xe,p]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(b,String(ve))},[ve,b]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(y,String(Te))},[Te,y]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(j,String(H))},[H,j]),S.useEffect(()=>()=>{Object.values(F.current).forEach(ae=>window.clearTimeout(ae)),F.current={}},[]);const he=S.useMemo(()=>{let ae=[...se];return ve&&(ae=ae.filter(je=>je!=="done")),Te&&(ae=ae.filter(je=>je!=="planned")),ae},[se,ve,Te]),fe=S.useMemo(()=>{let ae=[...M];return ve&&(ae=ae.filter(je=>je!=="done")),Te&&(ae=ae.filter(je=>je!=="planned"&&je!=="draft")),ae},[M,ve,Te]),Se=S.useMemo(()=>{let ae=[...xe];return ve&&(ae=ae.filter(je=>je!=="done")),Te&&(ae=ae.filter(je=>je!=="planned")),ae},[xe,ve,Te]),We=S.useMemo(()=>{const ae=!z||H;return(z?N:N.filter(Ae=>Ae.isActive)).filter(({feature:Ae})=>lf(Ae.status,he)).map(Ae=>({...Ae,allPhases:Ae.allPhases.filter(({phase:tt,hasActiveTask:ut})=>lf(tt.status,fe)?ae?tt.status==="in-progress"||tt.status==="discovery"||ut:!0:!1).map(tt=>({...tt,allTasks:tt.allTasks.filter(ut=>!!lf(ut.status,Se))})).filter(tt=>tt.allTasks.length>0||z||!ae)})).filter(({hasActiveTask:Ae,allPhases:tt})=>ae?Ae||tt.some(ut=>ut.hasActiveTask):tt.length>0||z)},[he,fe,Se,H,z,N]);S.useEffect(()=>{if(k==="none"){W([]),ie([]);return}if(k==="all"){W(We.filter(({feature:Ae})=>Ae.status!=="done").map(({feature:Ae})=>Ae.id)),ie(We.flatMap(({allPhases:Ae})=>Ae.map(({phase:tt})=>tt.id)));return}const ae=new Set(We.map(({feature:Ae})=>Ae.id)),je=new Set(We.flatMap(({allPhases:Ae})=>Ae.map(({phase:tt})=>tt.id)));W(Ae=>Ae.filter(tt=>ae.has(tt))),ie(Ae=>Ae.filter(tt=>je.has(tt)))},[We,k]);const Qe=ae=>{Z("smart"),W(je=>je.includes(ae)?je.filter(Ae=>Ae!==ae):[...je,ae])},nl=ae=>{Z("smart"),ie(je=>je.includes(ae)?je.filter(Ae=>Ae!==ae):[...je,ae])},Cl=()=>{Z("smart"),W(We.map(({feature:ae})=>ae.id)),ie(We.flatMap(({allPhases:ae})=>ae.map(({phase:je})=>je.id)))};return S.useEffect(()=>{const ae=(Ae,tt)=>{const ut=tt.filter(Qt=>!!Qt);for(const Qt of ut){const ka=`${Ae}:${Qt}`,rl=Ae==="feature"?me:Ae==="phase"?R:K;rl(dt=>dt.includes(Qt)?dt:[...dt,Qt]),F.current[ka]!==void 0&&window.clearTimeout(F.current[ka]),F.current[ka]=window.setTimeout(()=>{rl(dt=>dt.filter(ea=>ea!==Qt)),delete F.current[ka]},g2)}},je=Ae=>{var Qt,ka,rl,dt,ea,Ua;const ut=Ae.detail;if(ut!=null&&ut.type){if(ut.type==="features-updated"){const Zt=((Qt=ut.data)==null?void 0:Qt.featureId)??((ka=ut.data)==null?void 0:ka.id);ae("feature",[Zt]),Zt&&(Z("smart"),W(kt=>kt.includes(Zt)?kt:[...kt,Zt]));return}if(ut.type==="phases-updated"){const Zt=(rl=ut.data)==null?void 0:rl.featureId,kt=((dt=ut.data)==null?void 0:dt.phaseId)??((ea=ut.data)==null?void 0:ea.id);ae("phase",[kt]),ae("feature",[Zt]),ae("task",[(Ua=ut.data)==null?void 0:Ua.taskId]),Z("smart"),Zt&&W(Dt=>Dt.includes(Zt)?Dt:[...Dt,Zt]),kt&&ie(Dt=>Dt.includes(kt)?Dt:[...Dt,kt])}}};return window.addEventListener("agent-plan:ws-event",je),()=>{window.removeEventListener("agent-plan:ws-event",je)}},[]),{workTree:N,displayedWorkTree:We,treeOpenMode:k,setTreeOpenMode:Z,expandAll:Cl,expandedFeatureIds:J,expandedPhaseIds:ee,toggleExpandedFeature:Qe,toggleExpandedPhase:nl,recentFeatureIds:te,recentPhaseIds:be,recentTaskIds:q,showAllFeatures:z,setShowAllFeatures:B,featureStatusFilters:se,phaseStatusFilters:M,taskStatusFilters:xe,hideDone:ve,setHideDone:st,hidePlanned:Te,setHidePlanned:ke,onlyActiveBranches:H,setOnlyActiveBranches:X,resetFilters:()=>{B(!0),st(!1),ke(!1),le(Di),Re(Ci),Ke(Mi),X(!1),Z("all")},toggleFeatureStatusFilter:ae=>le(je=>af(je,ae,Di)),togglePhaseStatusFilter:ae=>Re(je=>af(je,ae,Ci)),toggleTaskStatusFilter:ae=>Ke(je=>af(je,ae,Mi))}}function w2({entry:n,expanded:r,recentlyChanged:s,onToggle:o,isPhaseExpanded:f,onTogglePhase:d,isPhaseRecentlyChanged:h,isTaskRecentlyChanged:x}){const{feature:v,totalTasks:p,doneTasks:b,allPhases:y,hasActiveTask:j}=n;return c.jsxs("div",{className:`surface-card px-4 py-3 transition-colors ${v.status==="in-progress"?"ap-in-progress":j?"border-[color:var(--color-status-in-progress)]/40 bg-[color:color-mix(in_srgb,var(--color-status-in-progress)_7%,transparent)]":""} ${v.status==="done"?"!opacity-70 !bg-[color:color-mix(in_srgb,var(--color-status-done)_10%,transparent)] !border-[color:color-mix(in_srgb,var(--color-status-done)_35%,transparent)]":""} ${s?"ring-1 ring-[color:color-mix(in_srgb,var(--accent)_55%,transparent)] bg-[color:color-mix(in_srgb,var(--accent)_12%,transparent)]":""}`,children:[c.jsxs("div",{className:`flex items-start justify-between gap-3 rounded-[12px] px-1 py-1 transition-colors hover:bg-[var(--accent-soft)] ${s?"bg-[color:color-mix(in_srgb,var(--accent)_10%,transparent)]":""}`,children:[c.jsxs("div",{className:"flex min-w-0 items-start gap-2 font-mono text-sm font-semibold",children:[c.jsx("button",{type:"button",onClick:o,className:"mt-0.5 inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-[var(--text-subtle)] hover:bg-[var(--surface-elevated)] hover:text-[var(--text)]","aria-label":r?`Collapse feature ${v.name}`:`Expand feature ${v.name}`,"aria-expanded":r,children:c.jsx(Pp,{className:`h-4 w-4 transition ${r?"rotate-90":"rotate-0"}`})}),c.jsx("span",{className:"text-[var(--text-subtle)]",children:"└─"}),c.jsxs(Ye,{to:`/features/${v.id}`,className:"entity-link--feature inline-flex min-w-0 items-center gap-2 truncate underline-offset-4 hover:underline",children:[j?c.jsx("span",{"aria-hidden":"true",className:"ap-progress-dot"}):null,c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Pt,{type:"feature",number:v.number}),c.jsx("span",{className:"truncate",children:v.name})]})]})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s?c.jsx("span",{className:"rounded-full bg-[color:color-mix(in_srgb,var(--accent)_16%,transparent)] px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--accent)]",children:"Updated"}):null,c.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["(",b,"/",p||0,")"]}),c.jsx(_a,{status:v.status})]})]}),r&&y.length>0?c.jsx("div",{className:"mt-3 ml-4 grid gap-2 border-l border-[var(--border)] pl-4",children:y.map((N,z)=>c.jsx(R2,{feature:v,phaseEntry:N,phaseIndex:z,phaseCount:y.length,expanded:f(N.phase.id),recentlyChanged:h(N.phase.id),onToggle:()=>d(N.phase.id),isTaskRecentlyChanged:x},N.phase.id))}):null]})}function R2({feature:n,phaseEntry:r,phaseIndex:s,phaseCount:o,expanded:f,recentlyChanged:d,onToggle:h,isTaskRecentlyChanged:x}){const{phase:v,totalTasks:p,doneTasks:b,allTasks:y,hasActiveTask:j}=r,N=s===o-1?"└─":"├─";return c.jsxs("div",{className:`grid gap-2 transition-colors ${v.status==="in-progress"?"ap-in-progress rounded-[12px]":j?"rounded-[12px] border border-[color:color-mix(in_srgb,var(--color-status-in-progress)_35%,transparent)] bg-[color:color-mix(in_srgb,var(--color-status-in-progress)_6%,transparent)] px-2 py-2":""} ${v.status==="done"?"rounded-[12px] opacity-70 bg-[color:color-mix(in_srgb,var(--color-status-done)_6%,transparent)] px-2 py-2":""} ${d?"rounded-[12px] ring-1 ring-[color:color-mix(in_srgb,var(--accent)_55%,transparent)] bg-[color:color-mix(in_srgb,var(--accent)_12%,transparent)] px-2 py-2":""}`,children:[c.jsxs("div",{className:`flex items-start justify-between gap-3 rounded-[10px] px-1 py-1 transition-colors hover:bg-[var(--accent-soft)] ${d?"bg-[color:color-mix(in_srgb,var(--accent)_8%,transparent)]":""}`,children:[c.jsxs("div",{className:"flex min-w-0 items-start gap-2 font-mono text-sm",children:[c.jsx("button",{type:"button",onClick:h,className:"mt-0.5 inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-[var(--text-subtle)] hover:bg-[var(--surface-elevated)] hover:text-[var(--text)]","aria-label":f?`Collapse phase ${v.title}`:`Expand phase ${v.title}`,"aria-expanded":f,children:c.jsx(Pp,{className:`h-4 w-4 transition ${f?"rotate-90":"rotate-0"}`})}),c.jsx("span",{className:"text-[var(--text-subtle)]",children:N}),c.jsxs(Ye,{to:`/features/${n.id}/phases/${v.id}`,className:"entity-link--phase inline-flex min-w-0 items-center gap-2 truncate underline-offset-4 hover:underline",children:[j?c.jsx("span",{"aria-hidden":"true",className:"ap-progress-dot"}):null,c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Pt,{type:"phase",number:v.number}),c.jsx(rn,{type:"phase",featureNum:n==null?void 0:n.number}),c.jsx("span",{className:"truncate",children:v.title})]})]})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d?c.jsx("span",{className:"rounded-full bg-[color:color-mix(in_srgb,var(--accent)_16%,transparent)] px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--accent)]",children:"Updated"}):null,c.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["(",b,"/",p||0,")"]}),c.jsx(_a,{status:v.status})]})]}),f?y.length>0?c.jsx("div",{className:"ml-4 grid gap-1 border-l border-[var(--border)] pl-4",children:y.map((z,B)=>c.jsx(T2,{feature:n,phase:v,task:z,taskIndex:B,taskCount:y.length,recentlyChanged:x(z.id)},z.id))}):c.jsx("p",{className:"ml-4 font-mono text-xs text-[var(--text-subtle)]",children:"│ └─ no tasks"}):null]})}function T2({feature:n,phase:r,task:s,taskIndex:o,taskCount:f,recentlyChanged:d}){const h=o===f-1?"└─":"├─";return c.jsxs("div",{className:`flex items-start justify-between gap-3 rounded-[10px] px-1 py-1 font-mono text-sm transition-colors hover:bg-[var(--accent-soft)] ${s.status==="in-progress"?"ap-in-progress":""} ${s.status==="done"?"opacity-60 bg-[color:color-mix(in_srgb,var(--color-status-done)_6%,transparent)]":""} ${s.status==="done"?"text-[var(--text-muted)]":""} ${d?"ring-1 ring-[color:color-mix(in_srgb,var(--accent)_55%,transparent)] bg-[color:color-mix(in_srgb,var(--accent)_12%,transparent)]":""}`,children:[c.jsxs(Ye,{to:`/features/${n.id}/phases/${r.id}/tasks/${s.id}`,className:"min-w-0 text-[var(--text-muted)] transition hover:text-[var(--accent)]",children:[c.jsxs("span",{className:"text-[var(--text-subtle)]",children:["│ ",h," "]}),c.jsxs("span",{className:"inline-flex items-center gap-2",children:[s.status==="in-progress"?c.jsx("span",{"aria-hidden":"true",className:"ap-progress-dot"}):null,c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Pt,{type:"task",number:s.number}),c.jsx(rn,{type:"task",phaseNum:r.number,featureNum:n==null?void 0:n.number}),c.jsx("span",{className:"entity-link--task underline-offset-4 hover:underline",children:s.title})]})]})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d?c.jsx("span",{className:"rounded-full bg-[color:color-mix(in_srgb,var(--accent)_16%,transparent)] px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--accent)]",children:"Updated"}):null,c.jsx("span",{className:"shrink-0",children:c.jsx(_a,{status:s.status})})]})]})}function D2({features:n,phases:r,activeTasks:s,projectStorageScope:o}){const f=E2({features:n,phases:r,projectStorageScope:o}),[d,h]=S.useState(!1),[x,v]=S.useState(null),p=j=>f.expandedPhaseIds.includes(j),b=j=>f.recentPhaseIds.includes(j),y=j=>f.recentTaskIds.includes(j);return c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-bold text-[var(--text)]",children:"Work Tree"}),c.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Collapsible feature → phase → task tree. Click a feature or phase row to collapse/expand."})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(He,{type:"button",variant:"secondary",onClick:()=>f.expandAll(),children:"Expand all"}),c.jsx(He,{type:"button",variant:"secondary",onClick:()=>f.setTreeOpenMode("none"),children:"Collapse all"}),c.jsx(He,{type:"button",variant:"secondary",onClick:()=>f.setShowAllFeatures(j=>!j),children:f.showAllFeatures?"Show active only":"Show all features"})]})]}),c.jsxs("div",{className:"grid gap-3 rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-4 py-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("button",{type:"button",onClick:()=>f.setHideDone(j=>!j),className:`status-chip transition ${f.hideDone?"status-done":"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:"Hide done"}),c.jsx("button",{type:"button",onClick:()=>f.setHidePlanned(j=>!j),className:`status-chip transition ${f.hidePlanned?"status-planned":"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:"Hide planned"}),c.jsx("button",{type:"button",onClick:()=>f.setOnlyActiveBranches(j=>!j),className:`status-chip transition ${f.onlyActiveBranches?"status-in-progress":"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:"Only active branches"}),c.jsx(He,{type:"button",variant:"secondary",onClick:f.resetFilters,children:"Reset filters"}),c.jsx(He,{type:"button",variant:"secondary",disabled:d,onClick:async()=>{h(!0),v(null);try{const j=await V1(),N=j.migrated,z=j.integrity.duplicatePhaseIds.length,B=j.integrity.danglingPhaseIds.length;v(`Repair done: renamed ${N.renamed}, repaired ${N.repaired} refs, inferred ${N.inferred}. Integrity: ${z} duplicate, ${B} dangling.`)}catch(j){v(`Repair failed: ${j instanceof Error?j.message:String(j)}`)}finally{h(!1)}},children:d?"Repairing…":"Repair plan"}),x?c.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:x}):null]}),c.jsxs("div",{className:"grid gap-3 lg:grid-cols-3",children:[c.jsxs("div",{className:"grid gap-2",children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-[var(--text-subtle)]",children:"Feature status"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:Qi.map(j=>{const N=f.featureStatusFilters.includes(j.value);return c.jsx("button",{type:"button",onClick:()=>f.toggleFeatureStatusFilter(j.value),className:`status-chip transition ${N?`status-${j.value}`:"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:j.label},j.value)})})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-[var(--text-subtle)]",children:"Phase status"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:Zi.map(j=>{const N=f.phaseStatusFilters.includes(j.value);return c.jsx("button",{type:"button",onClick:()=>f.togglePhaseStatusFilter(j.value),className:`status-chip transition ${N?`status-${j.value}`:"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:j.label},j.value)})})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-[var(--text-subtle)]",children:"Task status"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:Mr.map(j=>{const N=f.taskStatusFilters.includes(j.value);return c.jsx("button",{type:"button",onClick:()=>f.toggleTaskStatusFilter(j.value),className:`status-chip transition ${N?`status-${j.value}`:"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:j.label},j.value)})})]})]})]}),c.jsx("div",{className:"grid gap-3",children:f.displayedWorkTree.length>0?f.displayedWorkTree.map(j=>c.jsx(w2,{entry:j,expanded:f.expandedFeatureIds.includes(j.feature.id),recentlyChanged:f.recentFeatureIds.includes(j.feature.id),onToggle:()=>f.toggleExpandedFeature(j.feature.id),isPhaseExpanded:p,onTogglePhase:f.toggleExpandedPhase,isPhaseRecentlyChanged:b,isTaskRecentlyChanged:y},j.feature.id)):s.length>0?s.map(j=>{const N=j.featureId?`/features/${j.featureId}/phases/${j.phaseId}/tasks/${j.id}`:"/features";return c.jsxs(Ye,{to:N,className:"surface-card grid gap-1 px-4 py-3 transition hover:border-[var(--accent)] hover:bg-[var(--accent-soft)]",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2 truncate text-sm font-semibold text-[var(--text)]",children:[j.status==="in-progress"?c.jsx("span",{"aria-hidden":"true",className:"ap-progress-dot"}):null,c.jsxs("span",{className:"truncate",children:["T",S2(j.number)," — ",j.title]})]}),c.jsx(_a,{status:j.status})]}),c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:j.phaseId})]},j.id)}):c.jsx("p",{className:"py-4 text-center text-sm text-[var(--text-muted)]",children:"No work items match the current filters."})})]})}function C2(){const{features:n,phases:r,activeTasks:s}=On(),{project:o}=Gi("root"),f=sn();qt("edit",()=>f("/project/edit"));const h=o.projectRoot||o.planRoot||o.name||"default";return c.jsxs("div",{className:"grid gap-8",children:[c.jsx(Vt,{className:"grid gap-4",children:c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-bold text-[var(--text)]",children:"Project Goal"}),o.goal?c.jsx(_t,{text:o.goal,className:"mt-2 max-w-4xl"}):c.jsx("p",{className:"mt-2 max-w-4xl text-sm text-[var(--text-muted)]",children:"Add a project goal to define the main objective."})]}),c.jsx(Ye,{to:"/project/edit",children:c.jsx(He,{type:"button",shortcut:"edit",children:"Edit project"})})]})}),c.jsx(v2,{project:o}),c.jsx(N2,{features:n,phases:r}),c.jsx(D2,{features:n,phases:r,activeTasks:s,projectStorageScope:h}),c.jsx(x2,{features:n,phases:r})]})}async function M2(){const[n,r]=await Promise.all([lx(),Af()]);return{features:n,phases:r}}function Li(){return{active:0,planned:0,done:0,blocked:0,canceled:0}}function Su(n){const r=[];return n.active&&r.push(`${n.active} active`),n.planned&&r.push(`${n.planned} planned`),n.done&&r.push(`${n.done} done`),n.blocked&&r.push(`${n.blocked} blocked`),n.canceled&&r.push(`${n.canceled} canceled`),r.join(" · ")}function z2(n){const r=Li();for(const s of n){if(s.status==="in-progress"||s.status==="discovery"){r.active+=1;continue}if(s.status==="planned"||s.status==="draft"){r.planned+=1;continue}if(s.status==="done"){r.done+=1;continue}if(s.status==="blocked"){r.blocked+=1;continue}s.status==="canceled"&&(r.canceled+=1)}return r}function fx(n){const r=Li();for(const s of n){if(s.status==="in-progress"){r.active+=1;continue}if(s.status==="planned"){r.planned+=1;continue}if(s.status==="done"){r.done+=1;continue}if(s.status==="blocked"){r.blocked+=1;continue}s.status==="canceled"&&(r.canceled+=1)}return r}function A2(n){const r=Li();for(const s of n){if(s.status==="in-progress"){r.active+=1;continue}if(s.status==="planned"){r.planned+=1;continue}if(s.status==="done"){r.done+=1;continue}if(s.status==="blocked"){r.blocked+=1;continue}s.status==="canceled"&&(r.canceled+=1)}return r}function _2({feature:n,phasesCount:r,tasksCount:s,phaseSummary:o,taskSummary:f,activity:d}){var B;const h=zn(),x=zn(),p=((B=h.formData)==null?void 0:B.get("status"))??n.status,b=h.state!=="idle",y=x.state!=="idle",j=Su(o),N=Su(f),z=n.description||(d?`${d.doneTasks}/${s} done · ${d.remainingTasks} left${d.blockedTasks?` · ${d.blockedTasks} blocked`:""}`:"");return c.jsxs("div",{className:"surface-card px-4 py-2",children:[c.jsxs("div",{className:"grid gap-2 xl:grid-cols-[minmax(0,1fr)_minmax(0,132px)_minmax(0,152px)_124px_44px_44px] xl:items-center",children:[c.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3 xl:contents",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.jsx(Pt,{type:"feature",number:n.number}),c.jsx(Ye,{to:`/features/${n.id}`,className:"entity-link--feature min-w-0 truncate text-sm font-semibold underline-offset-4 hover:underline",children:n.name}),c.jsx("span",{className:"shrink-0",children:c.jsx(_a,{status:p})})]}),c.jsxs("div",{className:"flex items-center gap-2 xl:hidden",children:[c.jsx(Ye,{to:`/features/${n.id}/edit`,"aria-label":`Edit feature ${n.name}`,children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Tr,{className:"h-3.5 w-3.5"})})}),c.jsx(x.Form,{method:"post",action:`/features/${n.id}/delete`,onSubmit:k=>{window.confirm(`Delete feature “${n.name}”? This cannot be undone.`)||k.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:y||b,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete feature ${n.name}`,children:c.jsx(Dr,{className:"h-4 w-4"})})})]})]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-muted)]",children:[c.jsxs("div",{className:"font-semibold text-[var(--text)]",children:[r," phases"]}),j?c.jsx("div",{className:"mt-0.5 break-words",children:j}):null]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-muted)]",children:[c.jsxs("div",{className:"font-semibold text-[var(--text)]",children:[s," tasks"]}),N?c.jsx("div",{className:"mt-0.5 break-words",children:N}):null]}),c.jsx(h.Form,{method:"post",action:`/features/${n.id}/status`,className:"w-full xl:w-auto",children:c.jsxs("div",{className:"relative",children:[c.jsx("select",{name:"status",value:p,disabled:b||y,"aria-busy":b,className:"field-control min-h-8 appearance-none py-1 pr-8 text-[11px]",onChange:k=>h.submit(k.currentTarget.form),children:Qi.map(k=>c.jsx("option",{value:k.value,children:k.label},k.value))}),c.jsx(An,{className:"pointer-events-none absolute right-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-[var(--text-muted)]"})]})}),c.jsx(Ye,{to:`/features/${n.id}/edit`,"aria-label":`Edit feature ${n.name}`,className:"hidden xl:block",children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Tr,{className:"h-3.5 w-3.5"})})}),c.jsx(x.Form,{method:"post",action:`/features/${n.id}/delete`,className:"hidden xl:block",onSubmit:k=>{window.confirm(`Delete feature “${n.name}”? This cannot be undone.`)||k.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:y||b,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete feature ${n.name}`,children:c.jsx(Dr,{className:"h-4 w-4"})})})]}),z?c.jsx("div",{className:"mt-1 min-w-0 break-words line-clamp-2 text-[11px] text-[var(--text-muted)]",children:z}):null]})}const O2={feature:{label:"Feature",Icon:bu},phase:{label:"Phase",Icon:y1},task:{label:"Task",Icon:ex}};function k2({kind:n,label:r}){const{Icon:s,label:o}=O2[n];return c.jsxs("span",{className:`entity-badge entity-badge--${n}`,children:[c.jsx(s,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:r??o})]})}function Dl({className:n="",...r}){return c.jsx("input",{className:`field-control ${n}`,...r})}function Ki({className:n="",...r}){return c.jsx("select",{className:`field-control ${n}`,...r})}function Of({query:n,status:r,statusOptions:s,placeholder:o,clearTo:f,resultsLabel:d}){const h=zf();return c.jsxs(ga,{method:"get",className:"surface-card grid gap-3 p-4 md:grid-cols-[minmax(0,1fr)_200px_auto_auto] md:items-end",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"list-filter-query",className:"mb-1 block text-xs font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Name"}),c.jsx(Dl,{id:"list-filter-query",name:"q",defaultValue:n,placeholder:o,className:"min-h-10 py-2.5",onChange:x=>h(x.currentTarget.form)})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"list-filter-status",className:"mb-1 block text-xs font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Status"}),c.jsxs("div",{className:"relative",children:[c.jsxs(Ki,{id:"list-filter-status",name:"status",defaultValue:r,className:"min-h-10 appearance-none py-2.5 pr-8",children:[c.jsx("option",{value:"",children:"All statuses"}),s.map(x=>c.jsx("option",{value:x.value,children:x.label},x.value))]}),c.jsx(An,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--text-muted)]"})]})]}),c.jsx(He,{type:"submit",variant:"secondary",className:"min-h-10",children:"Apply filters"}),c.jsx(Ye,{to:f,className:"inline-flex min-h-10 items-center justify-center rounded-[14px] px-3 text-sm font-semibold text-[var(--text-muted)] transition hover:bg-[var(--accent-soft)] hover:text-[var(--text)]",children:"Clear"}),c.jsx("div",{className:"text-xs text-[var(--text-muted)] md:col-span-4",children:d})]})}function kf(n,r){const s=n.trim().toLowerCase();return s?r.some(o=>o==null?void 0:o.toLowerCase().includes(s)):!0}function U2(n){const r=new Map,s=new Map,o=new Map,f=new Map,d=new Map;for(const h of n)h.featureId&&d.set(h.featureId,[...d.get(h.featureId)??[],h]);for(const[h,x]of d)r.set(h,x.length),s.set(h,x.reduce((v,p)=>v+p.tasks.length,0)),o.set(h,z2(x)),f.set(h,fx(x.flatMap(v=>v.tasks)));return{phasesByFeature:r,tasksByFeature:s,phaseSummaryByFeature:o,taskSummaryByFeature:f}}function L2(){var j,N;const{features:n,phases:r}=On(),{phasesByFeature:s,tasksByFeature:o,phaseSummaryByFeature:f,taskSummaryByFeature:d}=U2(r),h=sn(),[x]=Mf(),v=((j=x.get("q"))==null?void 0:j.trim())??"",p=((N=x.get("status"))==null?void 0:N.trim())??"",b=S.useCallback(()=>h("new"),[h]);qt("create",b);const y=S.useMemo(()=>n.filter(z=>(!p||z.status===p)&&kf(v,[z.name,z.id,z.description])),[n,v,p]);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Vt,{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[c.jsxs("div",{children:[c.jsx(k2,{kind:"feature",label:"Features"}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Filter by name or status, then inspect child phases and tasks directly from the rows."})]}),c.jsx(Ye,{to:"new",children:c.jsx(He,{type:"button",variant:"primary",shortcut:"create",children:"Create feature"})})]}),c.jsx(Of,{query:v,status:p,statusOptions:Qi,placeholder:"Search feature name, id, or description",clearTo:"/features",resultsLabel:y.length===n.length?`${n.length} features`:`${y.length} of ${n.length} features`}),c.jsx("div",{className:"grid gap-3",children:y.length>0?y.map(z=>c.jsx(_2,{feature:z,phasesCount:s.get(z.id)??0,tasksCount:o.get(z.id)??0,phaseSummary:f.get(z.id)??Li(),taskSummary:d.get(z.id)??Li()},z.id)):c.jsx(Vt,{className:"p-4 text-sm text-[var(--text-muted)]",children:"No features match the current filters."})})]}),c.jsx(Vi,{})]})}async function H2({params:n}){const r=n.featureId;if(!r)throw new Response("featureId required",{status:400});const[s,o]=await Promise.all([Xi(r),Af(r)]);return{feature:s,phases:o}}function B2({featureId:n,feature:r,phase:s}){var b;const o=zn(),f=zn(),h=((b=o.formData)==null?void 0:b.get("status"))??s.status,x=o.state!=="idle",v=f.state!=="idle",p=Su(fx(s.tasks));return c.jsxs("div",{className:"surface-card px-4 py-2",children:[c.jsxs("div",{className:"grid gap-2 lg:grid-cols-[minmax(0,1fr)_minmax(0,150px)_124px_44px_44px] lg:items-center",children:[c.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3 lg:contents",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.jsx(Pt,{type:"phase",number:s.number}),c.jsx(rn,{type:"phase",featureNum:r.number}),c.jsx(Ye,{to:`/features/${n}/phases/${s.id}`,className:"entity-link--phase min-w-0 truncate text-sm font-semibold underline-offset-4 hover:underline",children:s.title}),c.jsx("span",{className:"shrink-0",children:c.jsx(_a,{status:h})})]}),c.jsxs("div",{className:"flex items-center gap-2 lg:hidden",children:[c.jsx(Ye,{to:`/features/${n}/phases/${s.id}/edit`,"aria-label":`Edit phase ${s.title}`,children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Tr,{className:"h-3.5 w-3.5"})})}),c.jsx(f.Form,{method:"post",action:`/features/${n}/phases/${s.id}/delete`,onSubmit:y=>{window.confirm(`Delete phase “${s.title}”? This cannot be undone.`)||y.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:v||x,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete phase ${s.title}`,children:c.jsx(Dr,{className:"h-4 w-4"})})})]})]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-muted)]",children:[c.jsxs("div",{className:"font-semibold text-[var(--text)]",children:[s.tasks.length," tasks"]}),p?c.jsx("div",{className:"mt-0.5 break-words",children:p}):null]}),c.jsx(o.Form,{method:"post",action:`/features/${n}/phases/${s.id}/status`,className:"w-full lg:w-auto",children:c.jsxs("div",{className:"relative",children:[c.jsx("select",{name:"status",value:h,disabled:x||v,"aria-busy":x,className:"field-control min-h-8 appearance-none py-1 pr-8 text-[11px]",onChange:y=>o.submit(y.currentTarget.form),children:Zi.map(y=>c.jsx("option",{value:y.value,children:y.label},y.value))}),c.jsx(An,{className:"pointer-events-none absolute right-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-[var(--text-muted)]"})]})}),c.jsx(Ye,{to:`/features/${n}/phases/${s.id}/edit`,"aria-label":`Edit phase ${s.title}`,className:"hidden lg:block",children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Tr,{className:"h-3.5 w-3.5"})})}),c.jsx(f.Form,{method:"post",action:`/features/${n}/phases/${s.id}/delete`,className:"hidden lg:block",onSubmit:y=>{window.confirm(`Delete phase “${s.title}”? This cannot be undone.`)||y.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:v||x,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete phase ${s.title}`,children:c.jsx(Dr,{className:"h-4 w-4"})})})]}),s.summary?c.jsx("div",{className:"mt-1 min-w-0 break-words line-clamp-2 text-[11px] text-[var(--text-muted)]",children:s.summary}):null]})}function Uf({items:n,className:r=""}){return c.jsx("nav",{"aria-label":"Breadcrumb",className:`flex flex-wrap items-center gap-2 text-sm ${r}`,children:n.map((s,o)=>{const f=o===n.length-1,d=s.to&&!f?c.jsx(Ye,{to:s.to,className:"font-semibold text-[var(--accent)] hover:underline",children:s.label}):c.jsx("span",{className:f?"text-[var(--text)]":"text-[var(--text-muted)]",children:s.label});return c.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[o>0?c.jsx("span",{className:"text-[var(--text-subtle)]",children:"/"}):null,c.jsx("span",{className:"min-w-0 break-words",children:d})]},`${s.label}-${o}`)})})}function bt({className:n="",children:r,...s}){return c.jsx("div",{className:`surface-card p-4 ${n}`,...s,children:r})}function Lf({decisions:n}){return n.length===0?null:c.jsxs("details",{className:"group mt-4",children:[c.jsx("summary",{className:"flex cursor-pointer select-none items-center gap-2 font-semibold text-[var(--text)]",children:c.jsxs("span",{children:["Accepted decisions (",n.length,")"]})}),c.jsx("div",{className:"mt-2 grid gap-3",children:n.map(r=>c.jsxs("div",{className:"surface-card px-4 py-3",children:[c.jsx("p",{className:"text-sm font-semibold text-[var(--text)]",children:r.title}),r.decision?c.jsxs("div",{className:"mt-2 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Decision:"}),c.jsx(_t,{text:r.decision,className:"mt-1"})]}):null,r.rationale?c.jsxs("div",{className:"mt-1 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Rationale:"}),c.jsx(_t,{text:r.rationale,className:"mt-1"})]}):null,r.implementationNotes?c.jsxs("div",{className:"mt-1 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Implementation:"}),c.jsx(_t,{text:r.implementationNotes,className:"mt-1"})]}):null]},r.id))})]})}function q2(n){return n.reduce((r,s)=>r+s.tasks.length,0)}function $2(n){let r=0,s=0,o=0,f=0;for(const d of n)for(const h of d.tasks)h.status==="in-progress"&&(r+=1),h.status==="done"&&(s+=1),h.status==="blocked"&&(o+=1),["done","canceled"].includes(h.status)||(f+=1);return{inProgress:r,done:s,blocked:o,remaining:f}}function Y2(n){return n.find(r=>["in-progress","discovery","planned","draft"].includes(r.status))}function G2(){var B,k;const{feature:n,phases:r}=On(),s=n.acceptedDecisions??[],o=q2(r),f=$2(r),d=Y2(r),[h]=Mf(),x=((B=h.get("q"))==null?void 0:B.trim())??"",v=((k=h.get("status"))==null?void 0:k.trim())??"",p=S.useMemo(()=>r.filter(Z=>(!v||Z.status===v)&&kf(x,[Z.title,Z.id,Z.summary,Z.description])),[r,x,v]),b=sn(),y=S.useRef(null),j=S.useCallback(()=>b("edit"),[b]),N=S.useCallback(()=>b("phases/new"),[b]),z=S.useCallback(()=>{var Z;(Z=y.current)==null||Z.requestSubmit()},[]);return qt("edit",j),qt("create",N),qt("delete",z),c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Ye,{to:"/features",className:"inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] hover:underline",children:[c.jsx(Du,{className:"h-4 w-4"})," Back to features"]}),c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx(Uf,{items:[{label:"Features",to:"/features"},{label:n.name}]}),c.jsx("div",{className:"mt-2",children:c.jsx(Pt,{type:"feature",number:n.number})}),c.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-3",children:[c.jsx("h2",{className:"text-2xl font-black tracking-tight text-[var(--text)] break-words",children:n.name}),c.jsx(_a,{status:n.status})]}),n.description?c.jsx(_t,{text:n.description,className:"plan-description mt-3 max-w-4xl"}):null]}),c.jsx(ga,{ref:y,method:"post",action:`/features/${n.id}/delete`,onSubmit:Z=>{window.confirm(`Delete feature "${n.name}"?`)||Z.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",shortcut:"delete",children:"Delete feature"})})]}),c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{children:[c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(Pt,{type:"feature",number:n.number})}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Snapshot of this feature only."})]}),c.jsx(Ye,{to:"edit",children:c.jsx(He,{type:"button",shortcut:"edit",children:"Edit feature"})})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Current phase"}),c.jsx("p",{className:"mt-2 text-sm font-semibold text-[var(--text)] break-words",children:(d==null?void 0:d.title)||"No active phase"})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Phases"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:r.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Tasks"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:o})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Window"}),c.jsxs("p",{className:"mt-2 text-sm font-semibold text-[var(--text)]",children:[n.startDate||"Not set"," → ",n.endDate||"Not set"]})]})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"In progress"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.inProgress})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Remaining"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.remaining})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Done"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.done})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Blocked"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.blocked})]})]}),n.workDone||n.workRemaining?c.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[n.workDone?c.jsxs("div",{children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Work done:"}),c.jsx(_t,{text:n.workDone,className:"mt-2"})]}):null,n.workRemaining?c.jsxs("div",{children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Work remaining:"}),c.jsx(_t,{text:n.workRemaining,className:"mt-2"})]}):null]}):null,s.length>0?c.jsx(Lf,{decisions:s}):null]}),c.jsxs(Vt,{className:"grid gap-5",children:[c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[c.jsx(Pt,{type:"phase",number:0}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Filter this feature's phases by name or status."})]}),c.jsx(Ye,{to:"phases/new",children:c.jsx(He,{type:"button",variant:"primary",shortcut:"create",children:"Create phase"})})]}),c.jsx(Of,{query:x,status:v,statusOptions:Zi,placeholder:"Search phase title, id, or summary",clearTo:`/features/${n.id}`,resultsLabel:p.length===r.length?`${r.length} phases`:`${p.length} of ${r.length} phases`}),c.jsx("div",{className:"grid gap-3",children:p.length>0?p.map(Z=>c.jsx(B2,{featureId:n.id,feature:n,phase:Z},Z.id)):c.jsx(Vt,{className:"p-4 text-sm text-[var(--text-muted)]",children:"No phases match the current filters."})})]}),c.jsx(Vi,{})]})}async function V2({params:n}){const{featureId:r,phaseId:s}=n;if(!r||!s)throw new Response("featureId and phaseId required",{status:400});const[o,f]=await Promise.all([Xi(r),Au(s)]);return{feature:o,phase:f}}function fp(n){try{return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(n))}catch{return n}}function X2({featureId:n,phaseId:r,task:s}){var b;const o=zn(),f=zn(),h=((b=o.formData)==null?void 0:b.get("status"))??s.status,x=o.state!=="idle",v=f.state!=="idle",p=Su(A2(s.subtasks));return c.jsxs("div",{className:"surface-card px-4 py-2",children:[c.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-[0.14em] text-[var(--text-subtle)]",children:s.id}),c.jsxs("div",{className:"grid gap-2 lg:grid-cols-[minmax(0,1fr)_minmax(0,168px)_124px_44px_44px] lg:items-center",children:[c.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3 lg:contents",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.jsx(Ye,{to:`/features/${n}/phases/${r}/tasks/${s.id}`,className:"entity-link--task min-w-0 truncate text-sm font-semibold underline-offset-4 hover:underline",children:s.title}),c.jsx("span",{className:"shrink-0",children:c.jsx(_a,{status:h})})]}),c.jsxs("div",{className:"flex items-center gap-2 lg:hidden",children:[c.jsx(Ye,{to:`/features/${n}/phases/${r}/tasks/${s.id}/edit`,"aria-label":`Edit task ${s.title}`,children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Tr,{className:"h-3.5 w-3.5"})})}),c.jsx(f.Form,{method:"post",action:`/features/${n}/phases/${r}/tasks/${s.id}/delete`,onSubmit:y=>{window.confirm(`Delete task “${s.title}”? This cannot be undone.`)||y.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:v||x,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete task ${s.title}`,children:c.jsx(Dr,{className:"h-4 w-4"})})})]})]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-muted)]",children:[c.jsxs("div",{className:"font-semibold text-[var(--text)]",children:[s.subtasks.length," subtasks · ",s.checklist.length," checklist"]}),p?c.jsx("div",{className:"mt-0.5 break-words",children:p}):c.jsx("div",{className:"mt-0.5 break-words",children:"No subtask statuses yet"})]}),c.jsx(o.Form,{method:"post",action:`/features/${n}/phases/${r}/tasks/${s.id}/status`,className:"w-full lg:w-auto",children:c.jsxs("div",{className:"relative",children:[c.jsx("select",{name:"status",value:h,disabled:x||v,"aria-busy":x,className:"field-control min-h-8 appearance-none py-1 pr-8 text-[11px]",onChange:y=>o.submit(y.currentTarget.form),children:Mr.map(y=>c.jsx("option",{value:y.value,children:y.label},y.value))}),c.jsx(An,{className:"pointer-events-none absolute right-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-[var(--text-muted)]"})]})}),c.jsx(Ye,{to:`/features/${n}/phases/${r}/tasks/${s.id}/edit`,"aria-label":`Edit task ${s.title}`,className:"hidden lg:block",children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Tr,{className:"h-3.5 w-3.5"})})}),c.jsx(f.Form,{method:"post",action:`/features/${n}/phases/${r}/tasks/${s.id}/delete`,className:"hidden lg:block",onSubmit:y=>{window.confirm(`Delete task “${s.title}”? This cannot be undone.`)||y.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:v||x,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete task ${s.title}`,children:c.jsx(Dr,{className:"h-4 w-4"})})})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-[var(--text-subtle)]",children:[s.startedAt?c.jsxs("span",{children:["Started ",fp(s.startedAt)]}):null,s.completedAt?c.jsxs("span",{children:["Completed ",fp(s.completedAt)]}):null]}),s.description?c.jsx("div",{className:"mt-1 min-w-0 break-words line-clamp-2 text-[11px] text-[var(--text-muted)]",children:s.description}):null]})}function Q2(n){let r=0,s=0,o=0,f=0;for(const d of n.tasks)d.status==="in-progress"&&(r+=1),d.status==="done"&&(s+=1),d.status==="blocked"&&(o+=1),["done","canceled"].includes(d.status)||(f+=1);return{inProgress:r,done:s,blocked:o,remaining:f}}function Z2(){var z,B;const{feature:n,phase:r}=On(),s=r.decisions??[],o=r.acceptedDecisions??[],f=Q2(r),[d]=Mf(),h=((z=d.get("q"))==null?void 0:z.trim())??"",x=((B=d.get("status"))==null?void 0:B.trim())??"",v=S.useMemo(()=>r.tasks.filter(k=>(!x||k.status===x)&&kf(h,[k.title,k.id,k.description,k.shortName])),[r.tasks,h,x]),p=sn(),b=S.useRef(null),y=S.useCallback(()=>p("edit"),[p]),j=S.useCallback(()=>p("tasks/new"),[p]),N=S.useCallback(()=>{var k;(k=b.current)==null||k.requestSubmit()},[]);return qt("edit",y),qt("create",j),qt("delete",N),c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Ye,{to:`/features/${n.id}`,className:"inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] hover:underline",children:[c.jsx(Du,{className:"h-4 w-4"})," Back to feature"]}),c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx(Uf,{items:[{label:"Features",to:"/features"},{label:n.name,to:`/features/${n.id}`},{label:r.title}]}),c.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[c.jsx(Pt,{type:"phase",number:r.number}),c.jsx(rn,{type:"phase",featureNum:n.number})]}),c.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-3",children:[c.jsx("h2",{className:"text-2xl font-black tracking-tight text-[var(--text)] break-words",children:r.title}),c.jsx(_a,{status:r.status})]}),r.summary?c.jsx(_t,{text:r.summary,className:"mt-3 max-w-4xl"}):null]}),c.jsx(ga,{ref:b,method:"post",action:`/features/${n.id}/phases/${r.id}/delete`,onSubmit:k=>{window.confirm(`Delete phase "${r.title}"?`)||k.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",shortcut:"delete",children:"Delete phase"})})]}),c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{children:[c.jsx(Pt,{type:"phase",number:r.number}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Snapshot of this phase."})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ye,{to:"edit",children:c.jsx(He,{type:"button",shortcut:"edit",children:"Edit phase"})}),c.jsx(Ye,{to:"tasks/new",children:c.jsx(He,{type:"button",variant:"primary",shortcut:"create",children:"Create task"})})]})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Tasks"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:r.tasks.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"In progress"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.inProgress})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Remaining"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.remaining})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Done"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.done})]})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Blocked"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.blocked})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Goals"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:r.goals.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Dependencies"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:r.dependencies.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Completion criteria"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:r.completionCriteria.length})]})]}),r.description?c.jsxs("div",{children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Description:"}),c.jsx(_t,{text:r.description,className:"plan-description mt-2"})]}):null,s.length>0?c.jsxs("details",{className:"group mt-4",children:[c.jsx("summary",{className:"flex items-center gap-2 cursor-pointer font-semibold text-[var(--text)] select-none",children:c.jsxs("span",{children:["Decisions (",s.length,")"]})}),c.jsx("div",{className:"mt-2 ml-4 space-y-2 border-l-2 border-[var(--border)] pl-4",children:s.map((k,Z)=>c.jsx("div",{className:"text-sm text-[var(--text-muted)]",children:c.jsx(_t,{text:k})},Z))})]}):null,o.length>0?c.jsx(Lf,{decisions:o}):null]}),c.jsxs(Vt,{className:"grid gap-5",children:[c.jsxs("div",{children:[c.jsx(Pt,{type:"task",number:0}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Filter this phase's tasks by name or status."})]}),c.jsx(Of,{query:h,status:x,statusOptions:Mr,placeholder:"Search task title, id, or description",clearTo:`/features/${n.id}/phases/${r.id}`,resultsLabel:v.length===r.tasks.length?`${r.tasks.length} tasks`:`${v.length} of ${r.tasks.length} tasks`}),c.jsx("div",{className:"grid gap-3",children:v.length>0?v.map(k=>c.jsx(X2,{featureId:n.id,phaseId:r.id,task:k},k.id)):c.jsx(Vt,{className:"p-4 text-sm text-[var(--text-muted)]",children:"No tasks match the current filters."})})]}),c.jsx(Vi,{})]})}async function K2({params:n}){const{featureId:r,phaseId:s,taskId:o}=n;if(!r||!s||!o)throw new Response("featureId, phaseId and taskId required",{status:400});const[f,d,h]=await Promise.all([Xi(r),Au(s),_u(o)]);return{feature:f,phase:d,task:h}}function uf(n){try{return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(n))}catch{return n}}function J2({featureId:n,phaseId:r,taskId:s,item:o}){const f=zn(),d=f.formData?f.formData.get("checked")==="true":o.checked,h=f.state!=="idle";return c.jsxs("div",{className:"surface-card flex items-start gap-3 px-4 py-3",children:[c.jsx("input",{type:"checkbox",checked:d,onChange:()=>f.submit({checked:o.checked?"false":"true"},{method:"post",action:`/features/${n}/phases/${r}/tasks/${s}/checklist/${o.id}/toggle`}),disabled:h,className:"mt-0.5 h-4 w-4 shrink-0 accent-[var(--accent)]","aria-label":`Toggle checklist item ${o.title}`}),c.jsx("div",{className:"min-w-0",children:c.jsx("p",{className:`text-sm ${d?"text-[var(--text-muted)] line-through":"font-medium text-[var(--text)]"}`,children:o.title})})]})}function F2(){var b,y,j;const{feature:n,phase:r,task:s}=On(),o=s.decisions??[],f=s.acceptedDecisions??[],d=s.checklist??[],h=sn(),x=S.useRef(null),v=S.useCallback(()=>h("edit"),[h]),p=S.useCallback(()=>{var N;(N=x.current)==null||N.requestSubmit()},[]);return qt("edit",v),qt("delete",p),c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Ye,{to:`/features/${n.id}/phases/${r.id}`,className:"inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] hover:underline",children:[c.jsx(Du,{className:"h-4 w-4"})," Back to phase"]}),c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx(Uf,{items:[{label:"Features",to:"/features"},{label:n.name,to:`/features/${n.id}`},{label:r.title,to:`/features/${n.id}/phases/${r.id}`},{label:s.title}]}),c.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[c.jsx(Pt,{type:"task",number:s.number}),c.jsx(rn,{type:"task",phaseNum:r.number,featureNum:n.number})]}),c.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-3",children:[c.jsx("h2",{className:"text-2xl font-black tracking-tight text-[var(--text)] break-words",children:s.title}),c.jsx(_a,{status:s.status})]})]}),c.jsx(ga,{ref:x,method:"post",action:`/features/${n.id}/phases/${r.id}/tasks/${s.id}/delete`,onSubmit:N=>{window.confirm(`Delete task "${s.title}"?`)||N.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",shortcut:"delete",children:"Delete task"})})]}),c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{children:[c.jsx(Pt,{type:"task",number:s.number}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Single-focus task view. Editing opens in a modal route."})]}),c.jsx(Ye,{to:"edit",children:c.jsx(He,{type:"button",shortcut:"edit",children:"Edit task"})})]}),s.description?c.jsx(_t,{text:s.description,className:"plan-description"}):null,s.notes?c.jsxs("details",{className:"group mt-4 border border-[var(--border)] rounded-lg overflow-hidden",children:[c.jsxs("summary",{className:"flex items-center justify-between p-3 cursor-pointer font-semibold text-[var(--text)] bg-[var(--surface-elevated)] hover:bg-[var(--surface-strong)] transition-colors select-none",children:[c.jsx("div",{className:"flex items-center gap-2",children:c.jsx("span",{className:"text-sm",children:"Notes"})}),c.jsx(An,{className:"h-4 w-4 transition-transform group-open:rotate-180 text-[var(--text-muted)]"})]}),c.jsx("div",{className:"p-3 border-t border-[var(--border)] bg-[var(--surface)]",children:c.jsx(_t,{text:s.notes})})]}):c.jsx("p",{className:"mt-4 text-sm text-[var(--text-muted)]",children:"No notes"}),c.jsxs("details",{className:"group mt-4 border border-[var(--border)] rounded-lg overflow-hidden",open:s.statusLog&&s.statusLog.length>0,children:[c.jsxs("summary",{className:"flex items-center justify-between p-3 cursor-pointer font-semibold text-[var(--text)] bg-[var(--surface-elevated)] hover:bg-[var(--surface-strong)] transition-colors select-none",children:[c.jsx("div",{className:"flex items-center gap-2",children:c.jsxs("span",{className:"text-sm",children:["Status History (",((b=s.statusLog)==null?void 0:b.length)??0,")"]})}),c.jsx(An,{className:"h-4 w-4 transition-transform group-open:rotate-180 text-[var(--text-muted)]"})]}),c.jsx("div",{className:"p-3 border-t border-[var(--border)] bg-[var(--surface)]",children:s.statusLog&&s.statusLog.length>0?c.jsx("div",{className:"mt-3 ml-2 border-l-2 border-[var(--border)] pl-4 space-y-3",children:[...s.statusLog].reverse().map((N,z)=>c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"absolute -left-[21px] top-1.5 h-2.5 w-2.5 rounded-full border-2 border-[var(--border)] bg-[var(--surface)]"}),c.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[c.jsx("span",{className:"text-xs font-bold text-[var(--text-muted)]",children:uf(N.date)}),c.jsxs("span",{className:`text-xs font-bold px-1.5 py-0.5 rounded-full ${N.toStatus==="done"?"bg-[color:color-mix(in_srgb,var(--color-status-done)_16%,transparent)] text-[var(--color-status-done)]":N.toStatus==="blocked"?"bg-[color:color-mix(in_srgb,var(--color-status-blocked)_16%,transparent)] text-[var(--color-status-blocked)]":N.toStatus==="canceled"?"bg-[color:color-mix(in_srgb,var(--color-status-canceled)_16%,transparent)] text-[var(--color-status-canceled)]":N.toStatus==="in-progress"?"bg-[color:color-mix(in_srgb,var(--color-status-in-progress)_16%,transparent)] text-[var(--color-status-in-progress)]":"bg-[color:color-mix(in_srgb,var(--color-status-planned)_16%,transparent)] text-[var(--color-status-planned)]"}`,children:[N.fromStatus," → ",N.toStatus]})]}),N.title&&N.title!==`${N.fromStatus} → ${N.toStatus}`?c.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--text)]",children:N.title}):null,N.description?c.jsx("p",{className:"mt-0.5 text-sm text-[var(--text-muted)]",children:N.description}):null]},N.id))}):c.jsx("p",{className:"text-sm text-[var(--text-muted)] italic",children:"No status changes recorded."})})]}),o.length>0?c.jsxs("details",{className:"group mt-4",children:[c.jsx("summary",{className:"flex items-center gap-2 cursor-pointer font-semibold text-[var(--text)] select-none",children:c.jsxs("span",{children:["Decisions (",o.length,")"]})}),c.jsx("div",{className:"mt-2 ml-4 space-y-2 border-l-2 border-[var(--border)] pl-4",children:o.map((N,z)=>c.jsx("div",{className:"text-sm text-[var(--text-muted)]",children:c.jsx(_t,{text:N})},z))})]}):null,f.length>0?c.jsx(Lf,{decisions:f}):null,c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-5",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Checklist items"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:d.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Subtasks"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:((y=s.subtasks)==null?void 0:y.length)??0})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Started"}),c.jsx("p",{className:"mt-2 text-sm font-semibold text-[var(--text)] break-words",children:s.startedAt?uf(s.startedAt):"—"})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Completed"}),c.jsx("p",{className:"mt-2 text-sm font-semibold text-[var(--text)] break-words",children:s.completedAt?uf(s.completedAt):"—"})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Phase"}),c.jsx("p",{className:"mt-2 text-sm font-semibold text-[var(--text)] break-words",children:r.title})]})]}),d.length?c.jsxs("div",{className:"grid gap-3",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-bold text-[var(--text)]",children:"Checklist"}),c.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:"Always visible and linked to the real task checklist."})]}),c.jsx("div",{className:"grid gap-2",children:d.map(N=>c.jsx(J2,{featureId:n.id,phaseId:r.id,taskId:s.id,item:N},N.id))})]}):null,(j=s.subtasks)!=null&&j.length?c.jsxs("details",{className:"surface-card px-4 py-4",children:[c.jsx("summary",{className:"cursor-pointer list-none text-sm font-bold text-[var(--text)]",children:"Subtasks"}),c.jsx("div",{className:"mt-3 grid gap-2",children:s.subtasks.map(N=>c.jsxs("div",{className:"surface-card flex items-center justify-between gap-4 px-4 py-3",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-semibold text-[var(--text)]",children:N.title}),c.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:N.id})]}),c.jsx(_a,{status:N.status})]},N.id))})]}):null]}),c.jsx(Vi,{})]})}const W2=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function zr({title:n,description:r,children:s}){const o=sn(),f=S.useRef(null),d=S.useRef(null);return S.useEffect(()=>{var p;const h=f.current;if(!h)return;const x=document.activeElement;(p=d.current)==null||p.focus();const v=b=>{if(b.key==="Escape"){b.preventDefault(),o(-1);return}if(b.key!=="Tab")return;const y=Array.from(h.querySelectorAll(W2)).filter(B=>B.offsetParent!==null);if(y.length===0){b.preventDefault(),h.focus();return}const j=y[0],N=y[y.length-1],z=document.activeElement;b.shiftKey?(z===j||!h.contains(z))&&(b.preventDefault(),N.focus()):z===N&&(b.preventDefault(),j.focus())};return window.addEventListener("keydown",v),()=>{var b;window.removeEventListener("keydown",v),(b=x==null?void 0:x.focus)==null||b.call(x)}},[o]),c.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto p-4 md:p-6",children:[c.jsx("button",{type:"button",className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>o(-1),"aria-label":"Close modal",tabIndex:-1}),c.jsx("div",{className:"relative z-10 flex min-h-full items-start justify-center",children:c.jsxs("div",{ref:f,role:"dialog","aria-modal":"true","aria-label":n,tabIndex:-1,className:"surface-panel flex max-h-[calc(100vh-2rem)] w-full max-w-2xl flex-col overflow-hidden p-6 outline-none md:max-h-[calc(100vh-3rem)] md:p-8",children:[c.jsxs("div",{className:"mb-6 flex shrink-0 items-start justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-xl font-black tracking-tight text-[var(--text)]",children:n}),r?c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:r}):null]}),c.jsx("button",{ref:d,type:"button",onClick:()=>o(-1),className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[14px] border border-[var(--border-strong)] text-[var(--text-muted)] transition hover:text-[var(--text)]","aria-label":"Close modal",children:c.jsx(z1,{className:"h-4 w-4"})})]}),c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:s})]})})]})}function Ar({className:n="",children:r,...s}){return c.jsx("div",{className:`sticky bottom-0 mt-2 flex justify-end gap-3 border-t border-[var(--border)] bg-[var(--surface)] px-1 pt-4 pb-1 backdrop-blur-xl ${n}`,...s,children:r})}function Fe({label:n,children:r}){return c.jsxs("label",{className:"grid gap-2",children:[c.jsx("span",{className:"text-sm font-semibold text-[var(--text-muted)]",children:n}),r]})}function At(n){return c.jsx("textarea",{className:"field-control field-textarea",...n})}function I2(){const r=un().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var f;return(f=s.current)==null?void 0:f.requestSubmit()},[]);return qt("submit",o,{allowInEditable:!0}),c.jsx(zr,{title:"Create feature",description:"Top-level container for phases and tasks.",children:c.jsxs(ga,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Fe,{label:"Feature name",children:c.jsx(Dl,{name:"name",placeholder:"Realizzazione pagina prodotti",required:!0})}),c.jsx(Fe,{label:"Description",children:c.jsx(At,{name:"description",placeholder:"Short context for the feature"})}),c.jsx(Ar,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:r,shortcut:"submit",children:r?"Creating…":"Create feature"})})]})})}function P2(){const r=un().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var h;return(h=s.current)==null?void 0:h.requestSubmit()},[]);qt("submit",o,{allowInEditable:!0});const d=Gi("feature-detail").feature;return c.jsx(zr,{title:"Edit feature",description:"Update metadata, planning notes and timeline.",children:c.jsxs(ga,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Fe,{label:"Name",children:c.jsx(Dl,{name:"name",defaultValue:d.name,required:!0})}),c.jsx(Fe,{label:"Description",children:c.jsx(At,{name:"description",defaultValue:d.description})}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[c.jsx(Fe,{label:"Start date",children:c.jsx(Dl,{type:"date",name:"startDate",defaultValue:d.startDate})}),c.jsx(Fe,{label:"End date",children:c.jsx(Dl,{type:"date",name:"endDate",defaultValue:d.endDate})})]}),c.jsx(Fe,{label:"Status",children:c.jsx(Ki,{name:"status",defaultValue:d.status,children:Qi.map(h=>c.jsx("option",{value:h.value,children:h.label},h.value))})}),c.jsx(Fe,{label:"Work done",children:c.jsx(At,{name:"workDone",defaultValue:d.workDone})}),c.jsx(Fe,{label:"Work remaining",children:c.jsx(At,{name:"workRemaining",defaultValue:d.workRemaining})}),c.jsx(Ar,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:r,shortcut:"submit",children:r?"Saving…":"Save feature"})})]})})}function eS(){const r=un().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var f;return(f=s.current)==null?void 0:f.requestSubmit()},[]);return qt("submit",o,{allowInEditable:!0}),c.jsx(zr,{title:"Create phase",description:"A phase belongs to the current feature.",children:c.jsxs(ga,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Fe,{label:"Phase title",children:c.jsx(Dl,{name:"title",placeholder:"Creazione APIs",required:!0})}),c.jsx(Fe,{label:"Summary",children:c.jsx(At,{name:"summary",placeholder:"Brief phase summary"})}),c.jsx(Fe,{label:"Description",children:c.jsx(At,{name:"description",placeholder:"Initial implementation notes"})}),c.jsx(Ar,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:r,shortcut:"submit",children:r?"Creating…":"Create phase"})})]})})}function br(n){return n.join(`
189
+ `)}function tS(){const r=un().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var h;return(h=s.current)==null?void 0:h.requestSubmit()},[]);qt("submit",o,{allowInEditable:!0});const d=Gi("phase-detail").phase;return c.jsx(zr,{title:"Edit phase",description:"Update scope, constraints and delivery criteria.",children:c.jsxs(ga,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Fe,{label:"Title",children:c.jsx(Dl,{name:"title",defaultValue:d.title,required:!0})}),c.jsx(Fe,{label:"Status",children:c.jsx(Ki,{name:"status",defaultValue:d.status,children:Zi.map(h=>c.jsx("option",{value:h.value,children:h.label},h.value))})}),c.jsx(Fe,{label:"Summary",children:c.jsx(At,{name:"summary",defaultValue:d.summary})}),c.jsx(Fe,{label:"Description",children:c.jsx(At,{name:"description",defaultValue:d.description})}),c.jsx(Fe,{label:"Goals (one per line)",children:c.jsx(At,{name:"goals",defaultValue:br(d.goals)})}),c.jsx(Fe,{label:"Non-goals (one per line)",children:c.jsx(At,{name:"nonGoals",defaultValue:br(d.nonGoals)})}),c.jsx(Fe,{label:"Dependencies (one per line)",children:c.jsx(At,{name:"dependencies",defaultValue:br(d.dependencies)})}),c.jsx(Fe,{label:"Risks (one per line)",children:c.jsx(At,{name:"risks",defaultValue:br(d.risks)})}),c.jsx(Fe,{label:"Open questions (one per line)",children:c.jsx(At,{name:"openQuestions",defaultValue:br(d.openQuestions)})}),c.jsx(Fe,{label:"Completion criteria (one per line)",children:c.jsx(At,{name:"completionCriteria",defaultValue:br(d.completionCriteria)})}),c.jsx(Ar,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:r,shortcut:"submit",children:r?"Saving…":"Save phase"})})]})})}function aS(){const r=un().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var f;return(f=s.current)==null?void 0:f.requestSubmit()},[]);return qt("submit",o,{allowInEditable:!0}),c.jsx(zr,{title:"Create task",description:"A task belongs to the current phase.",children:c.jsxs(ga,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Fe,{label:"Task title",children:c.jsx(Dl,{name:"title",placeholder:"Integrazione custom fetcher",required:!0})}),c.jsx(Fe,{label:"Description",children:c.jsx(At,{name:"description",placeholder:"Initial task context"})}),c.jsx(Fe,{label:"Status",children:c.jsx(Ki,{name:"status",defaultValue:"planned",children:Mr.map(f=>c.jsx("option",{value:f.value,children:f.label},f.value))})}),c.jsx(Ar,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:r,shortcut:"submit",children:r?"Creating…":"Create task"})})]})})}function lS(n){return n.map(r=>r.title).join(`
190
+ `)}function nS(){const r=un().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var h;return(h=s.current)==null?void 0:h.requestSubmit()},[]);qt("submit",o,{allowInEditable:!0});const d=Gi("task-detail").task;return c.jsx(zr,{title:"Edit task",description:"Update execution details and checklist items.",children:c.jsxs(ga,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Fe,{label:"Title",children:c.jsx(Dl,{name:"title",defaultValue:d.title,required:!0})}),c.jsx(Fe,{label:"Status",children:c.jsx(Ki,{name:"status",defaultValue:d.status,children:Mr.map(h=>c.jsx("option",{value:h.value,children:h.label},h.value))})}),c.jsx(Fe,{label:"Description",children:c.jsx(At,{name:"description",defaultValue:d.description})}),c.jsx(Fe,{label:"Checklist (one per line)",children:c.jsx(At,{name:"checklist",defaultValue:lS(d.checklist)})}),c.jsx(Ar,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:r,shortcut:"submit",children:r?"Saving…":"Save task"})})]})})}function rS(){const r=un().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var d;return(d=s.current)==null?void 0:d.requestSubmit()},[]);qt("submit",o,{allowInEditable:!0});const{project:f}=Gi("root");return c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Ye,{to:"/",className:"inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] hover:underline",children:[c.jsx(Du,{className:"h-4 w-4"})," Back to dashboard"]}),c.jsxs(Vt,{className:"grid gap-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-black tracking-tight text-[var(--text)]",children:"Edit project goal"}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Define the main objective of the project. This long-form goal appears in the Project Goal card on the dashboard."})]}),c.jsxs(ga,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Fe,{label:"Project goal",children:c.jsx(At,{name:"goal",defaultValue:f.goal,placeholder:"Define the main objective, success criteria, and overall direction of the project"})}),c.jsxs("div",{className:"flex justify-end gap-3",children:[c.jsx(Ye,{to:"/",children:c.jsx(He,{type:"button",variant:"ghost",children:"Cancel"})}),c.jsx(He,{type:"submit",variant:"primary",disabled:r,shortcut:"submit",children:r?"Saving…":"Save goal"})]})]})]})]})}function xa(n,r){const s=n.get(r);if(typeof s!="string"||s.trim()==="")throw new Response(`Missing field: ${r}`,{status:400});return s.trim()}function It(n,r){const s=n.get(r);return typeof s=="string"?s.trim():""}function Cn(n,r){return It(n,r).split(`
191
+ `).map(s=>s.trim()).filter(Boolean)}function ht(n,r){const s=n[r];if(!s)throw new Response(`Missing route param: ${r}`,{status:400});return s}async function iS({request:n}){const r=await n.formData();return await L1({name:xa(r,"name"),description:It(r,"description")}),al("/features")}async function sS({request:n,params:r}){const s=ht(r,"featureId"),o=await Xi(s),f=await n.formData();return await nx({...o,name:xa(f,"name"),description:It(f,"description"),startDate:It(f,"startDate"),endDate:It(f,"endDate"),status:xa(f,"status"),workDone:It(f,"workDone"),workRemaining:It(f,"workRemaining")}),al(`/features/${s}`)}async function uS({params:n}){return await H1(ht(n,"featureId")),al("/features")}async function cS({request:n,params:r}){const s=ht(r,"featureId"),o=await Xi(s),f=await n.formData();return await nx({...o,status:xa(f,"status")}),null}async function oS({request:n,params:r}){const s=ht(r,"featureId"),o=await n.formData();return await B1({featureId:s,title:xa(o,"title"),summary:It(o,"summary"),description:It(o,"description")}),al(`/features/${s}`)}async function fS({request:n,params:r}){const s=ht(r,"featureId"),o=ht(r,"phaseId"),f=await Au(o),d=await n.formData();return await rx({...f,title:xa(d,"title"),status:xa(d,"status"),summary:It(d,"summary"),description:It(d,"description"),goals:Cn(d,"goals"),nonGoals:Cn(d,"nonGoals"),dependencies:Cn(d,"dependencies"),risks:Cn(d,"risks"),openQuestions:Cn(d,"openQuestions"),completionCriteria:Cn(d,"completionCriteria")}),al(`/features/${s}/phases/${o}`)}async function dS({params:n}){const r=ht(n,"featureId"),s=ht(n,"phaseId");return await q1(s),al(`/features/${r}`)}async function mS({request:n,params:r}){const s=ht(r,"phaseId"),o=await Au(s),f=await n.formData();return await rx({...o,status:xa(f,"status")}),null}async function hS({request:n,params:r}){const s=ht(r,"featureId"),o=ht(r,"phaseId"),f=await n.formData();return await $1(o,{title:xa(f,"title"),description:It(f,"description"),status:It(f,"status")||"planned"}),al(`/features/${s}/phases/${o}`)}function vS(n,r){const s=new Map(n.map(f=>[f.id,f])),o=new Map(n.map(f=>[f.title.trim().toLowerCase(),f]));return r.map((f,d)=>{var v;const h=f.trim().toLowerCase(),x=s.get(((v=n[d])==null?void 0:v.id)??"")??o.get(h);return x?{...x,title:f.trim()}:{id:`check-${d+1}-${h.replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"item"}`,title:f.trim(),checked:!1}})}async function pS({request:n,params:r}){const s=ht(r,"featureId"),o=ht(r,"phaseId"),f=ht(r,"taskId"),d=await _u(f),h=await n.formData();return await _f({...d,phaseId:o,title:xa(h,"title"),status:xa(h,"status"),description:It(h,"description"),checklist:vS(d.checklist,Cn(h,"checklist"))}),al(`/features/${s}/phases/${o}/tasks/${f}`)}async function xS({params:n}){const r=ht(n,"featureId"),s=ht(n,"phaseId"),o=ht(n,"taskId");return await Y1(o),al(`/features/${r}/phases/${s}`)}async function gS({request:n,params:r}){const s=ht(r,"phaseId"),o=ht(r,"taskId"),f=await _u(o),d=await n.formData();return await _f({...f,phaseId:s,status:xa(d,"status")}),null}async function yS({request:n}){const r=await ax(),s=await n.formData();return await k1({...r,goal:It(s,"goal")}),al("/")}function dp(n){try{return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(n))}catch{return n}}async function bS(){return sx()}function SS(){const n=On();return c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-bold text-[var(--text)]",children:"Handoff"}),c.jsxs("p",{className:"text-sm text-[var(--text-muted)]",children:["Canonical session handoff from ",c.jsx("code",{children:".planner/HANDOFF.md"}),"."]})]}),n.exists?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid gap-1 text-sm text-[var(--text-muted)] md:grid-cols-2",children:[c.jsxs("div",{children:["Created: ",c.jsx("span",{className:"text-[var(--text)]",children:dp(n.createdAt)})]}),c.jsxs("div",{children:["Updated: ",c.jsx("span",{className:"text-[var(--text)]",children:dp(n.updatedAt)})]})]}),c.jsx("div",{className:"rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-5 py-5",children:c.jsx(_t,{text:n.content,className:"max-w-none"})})]}):c.jsx("p",{className:"py-8 text-center text-sm text-[var(--text-muted)]",children:"No handoff file present."})]})}async function jS({request:n,params:r}){ht(r,"featureId");const s=ht(r,"phaseId"),o=ht(r,"taskId"),f=ht(r,"itemId"),d=await n.formData(),h=xa(d,"checked")==="true",x=await _u(o);return await _f({...x,phaseId:s,checklist:x.checklist.map(v=>v.id===f?{...v,checked:h}:v)}),Response.json({ok:!0,taskId:o,itemId:f,checked:h})}const NS=q0([{id:"root",path:"/",loader:u2,element:c.jsx(c2,{}),errorElement:c.jsx(o2,{}),children:[{index:!0,loader:f2,element:c.jsx(C2,{})},{path:"features",id:"features",loader:M2,element:c.jsx(L2,{}),children:[{path:"new",element:c.jsx(I2,{}),action:iS}]},{path:"features/:featureId",id:"feature-detail",loader:H2,element:c.jsx(G2,{}),children:[{path:"edit",element:c.jsx(P2,{}),action:sS},{path:"phases/new",element:c.jsx(eS,{}),action:oS}]},{path:"project/edit",element:c.jsx(rS,{}),action:yS},{path:"handoff",loader:bS,element:c.jsx(SS,{})},{path:"features/:featureId/delete",action:uS},{path:"features/:featureId/status",action:cS},{path:"features/:featureId/phases/:phaseId",id:"phase-detail",loader:V2,element:c.jsx(Z2,{}),children:[{path:"edit",element:c.jsx(tS,{}),action:fS},{path:"tasks/new",element:c.jsx(aS,{}),action:hS}]},{path:"features/:featureId/phases/:phaseId/delete",action:dS},{path:"features/:featureId/phases/:phaseId/status",action:mS},{path:"features/:featureId/phases/:phaseId/tasks/:taskId",id:"task-detail",loader:K2,element:c.jsx(F2,{}),children:[{path:"edit",element:c.jsx(nS,{}),action:pS}]},{path:"features/:featureId/phases/:phaseId/tasks/:taskId/delete",action:xS},{path:"features/:featureId/phases/:phaseId/tasks/:taskId/status",action:gS},{path:"features/:featureId/phases/:phaseId/tasks/:taskId/checklist/:itemId/toggle",action:jS}]}]),dx=document.getElementById("root");if(!dx)throw new Error("#root not found");My.createRoot(dx).render(c.jsx(S.StrictMode,{children:c.jsx(F0,{router:NS})}));