even-keel 0.2.0 → 0.2.1

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.
@@ -1,4 +1,4 @@
1
- import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";import{Br as n,En as r,Fr as i,Gr as a,Ir as o,Jr as s,Jt as c,Kn as l,Nn as u,Nr as d,Qn as f,Un as p,Wn as m,Xn as h,Xt as g,Yt as _,Zt as v,_r as y,an as b,ar as x,bn as S,cn as C,er as w,fn as T,ft as E,gt as D,in as O,ir as k,ln as A,lr as ee,mt as j,nn as te,nr as M,ot as ne,pt as re,s as ie,sn as ae,sr as oe,tr as se,u as ce,un as N,vr as le,yn as P}from"./Loader-DMdHADtQ.js";var ue=t((e=>{var t=s();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}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 r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=i.p;try{if(u.T=null,i.p=2,e)return e()}finally{u.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.0`})),de=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ue()})),fe=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,pe=/^[\\/]{2}/;function me(e,t){return t+e.replace(/\\/g,`/`)}var he=`popstate`;function ge(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function _e(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return be(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:xe(t)}return Ce(t,n,null,e)}function F(e,t){if(e===!1||e==null)throw Error(t)}function I(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ve(){return Math.random().toString(36).substring(2,10)}function ye(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function be(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Se(t):t,state:n,key:t&&t.key||r||ve(),mask:i}}function xe({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Se(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Ce(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=ge(e)?e:be(h.location,e,t);n&&n(r,e),l=u()+1;let d=ye(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=ge(e)?e:be(h.location,e,t);n&&n(r,e),l=u();let i=ye(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return we(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(he,d),c=e,()=>{i.removeEventListener(he,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function we(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),F(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:xe(t);return i=i.replace(/ $/,`%20`),!n&&pe.test(i)&&(i=r+i),new URL(i,r)}var L=e(s(),1);function Te(e,t,n=`/`){return Ee(e,t,n,!1)}function Ee(e,t,n,r,i){let a=R((typeof t==`string`?Se(t):t).pathname||`/`,n);if(a==null)return null;let o=i??De(e),s=null,c=Ke(a);for(let e=0;s==null&&e<o.length;++e)s=He(o[e],c,r);return s}function De(e){let t=Oe(e);return Ae(t),t}function Oe(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;F(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=z([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(F(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Oe(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Be(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Ge(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ke(e.path))a(e,t,!0,n)}),t}function ke(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ke(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Ae(e){e.sort((e,t)=>e.score===t.score?Ve(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var je=/^:[\w-]+$/,Me=/^:[\w-]+/,Ne=3.5,Pe=3,Fe=2,Ie=1,Le=10,Re=-2,ze=e=>e===`*`;function Be(e,t){let n=e.split(`/`),r=n.length;return n.some(ze)&&(r+=Re),t&&(r+=Fe),n.filter(e=>!ze(e)).reduce((e,t)=>e+(je.test(t)?Pe:Me.test(t)?Ne:t===``?Ie:Le),r)}function Ve(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function He(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?We(u,l,s.matcher,s.compiledParams):Ue(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:z([a,d.pathname]),pathnameBase:tt(z([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=z([a,d.pathnameBase]))}return o}function Ue(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ge(e.path,e.caseSensitive,e.end);return We(e,t,n,r)}function We(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=et(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=et(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Ge(e,t=!1,n=!0){I(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ke(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return I(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function R(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function qe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Se(e):e,a;return n?(n=$e(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Je(n.substring(1),`/`):Je(n,t)):a=t,{pathname:a,search:nt(r),hash:rt(i)}}function Je(e,t){let n=et(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ye(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Xe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ze(e){let t=Xe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Qe(e,t,n,r=!1){let i;typeof e==`string`?i=Se(e):(i={...e},F(!i.pathname||!i.pathname.includes(`?`),Ye(`?`,`pathname`,`search`,i)),F(!i.pathname||!i.pathname.includes(`#`),Ye(`#`,`pathname`,`hash`,i)),F(!i.search||!i.search.includes(`#`),Ye(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=qe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var $e=e=>e.replace(/[\\/]{2,}/g,`/`),z=e=>$e(e.join(`/`));function et(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var tt=e=>et(e).replace(/^\/*/,`/`),nt=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,rt=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,it=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function at(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ot(e){return z(e.map(e=>e.route.path).filter(Boolean))||`/`}var st=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ct(e,t){let n=e;if(typeof n!=`string`||!fe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(st)try{let e=new URL(window.location.href),r=pe.test(n)?new URL(me(n,e.protocol)):new URL(n),a=R(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{I(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var lt=new URL(`http://localhost`);function ut(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),lt)}catch{return lt}}function dt(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function ft(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function pt(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!dt(i,n),s=!dt(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!ft(e,i)||!dt(i,a)))throw Error(`External navigation is not allowed`)}var mt=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(mt);var ht=[`GET`,...mt];new Set(ht);var gt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function _t(e){try{return gt.includes(new URL(e).protocol)}catch{return!1}}var vt=L.createContext(null);vt.displayName=`DataRouter`;var yt=L.createContext(null);yt.displayName=`DataRouterState`;var bt=L.createContext(null);bt.displayName=`DataRouterData`;var xt=L.createContext(null);xt.displayName=`DataRouterNavigation`;var St=L.createContext(!1);function Ct(){return L.useContext(St)}var wt=L.createContext({isTransitioning:!1});wt.displayName=`ViewTransition`;var Tt=L.createContext(null);Tt.displayName=`Fetchers`;var Et=L.createContext(null);Et.displayName=`Await`;var B=L.createContext(null);B.displayName=`Navigation`;var Dt=L.createContext(null);Dt.displayName=`Location`;var V=L.createContext({outlet:null,matches:[],isDataRoute:!1});V.displayName=`Route`;var Ot=L.createContext(!1);Ot.displayName=`IsDataRoute`;var kt=L.createContext(void 0);kt.displayName=`RouteId`;var At=L.createContext(null);At.displayName=`RouteError`;var jt=`REACT_ROUTER_ERROR`,Mt=`REDIRECT`,Nt=`ROUTE_ERROR_RESPONSE`;function Pt(e){if(e.startsWith(`${jt}:${Mt}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ft(e){if(e.startsWith(`${jt}:${Nt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new it(t.status,t.statusText,t.data)}catch{}}function It(e,{relative:t}={}){F(Lt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=L.useContext(B),{hash:i,pathname:a,search:o}=Ut(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:z([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Lt(){return L.useContext(Dt)!=null}function H(){return F(Lt(),`useLocation() may be used only in the context of a <Router> component.`),L.useContext(Dt).location}function Rt(e){F(Lt(),`useMatch() may be used only in the context of a <Router> component.`);let{pathname:t}=H();return L.useMemo(()=>Ue(e,Ke(t)),[t,e])}var zt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Bt(){return L.useContext(Ot)?on():Vt()}function Vt(){F(Lt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=L.useContext(vt),{basename:t,navigator:n}=L.useContext(B),{matches:r}=L.useContext(V),{pathname:i}=H(),a=JSON.stringify(Ze(r)),o=L.useRef(!1);return L.useLayoutEffect(()=>{o.current=!0}),L.useCallback((r,s={})=>{if(I(o.current,zt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Qe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:z([t,c.pathname])),pt(typeof r==`string`?r:xe(r),n.createHref(c),ut(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}L.createContext(null);function Ht(){let{matches:e}=L.useContext(V);return e[e.length-1]?.params??{}}function Ut(e,{relative:t}={}){let{matches:n}=L.useContext(V),{pathname:r}=H(),i=JSON.stringify(Ze(n));return L.useMemo(()=>Qe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Wt(e,t){return Gt(e,t)}function Gt(e,t,n){F(Lt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=L.useContext(B),{matches:i}=L.useContext(V),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=H(),l;if(t){let e=typeof t==`string`?Se(t):t;F(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):Te(e,{pathname:d});let p=Qt(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:z([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:z([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?L.createElement(Dt.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function Kt(){let e=an(),t=at(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return L.createElement(L.Fragment,null,L.createElement(`h2`,null,`Unexpected Application Error!`),L.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?L.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var qt=L.createElement(Kt,null),Jt=class extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=St;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ft(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:L.createElement(V.Provider,{value:this.props.routeContext},L.createElement(Ot.Provider,{value:this.props.routeContext.isDataRoute},L.createElement(kt.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},L.createElement(At.Provider,{value:e,children:this.props.component}))));return this.context?L.createElement(Xt,{error:e},t):t}},Yt=new WeakMap;function Xt({children:e,error:t}){let{basename:n,navigator:r}=L.useContext(B);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Pt(t.digest);if(e){let i=Yt.get(t);if(i)throw i;let a=ct(e.location,n),o=a.absoluteURL||a.to;if(pt(e.location,o,ut(r),`allow-explicit`),_t(o))throw Error(`Invalid redirect location`);if(st&&!Yt.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Yt.set(t,n),n}}return L.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Zt({routeContext:e,match:t,children:n}){let r=L.useContext(vt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(V.Provider,{value:e},L.createElement(Ot.Provider,{value:e.isDataRoute},L.createElement(kt.Provider,{value:t.route.id},n)))}function Qt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);F(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ot(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||qt,o&&(s<0&&c===0?(cn(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?L.createElement(n.route.Component,null):n.route.element?n.route.element:e,L.createElement(Zt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?L.createElement(Jt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function $t(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function en(e){let t=L.useContext(vt);return F(t,$t(e)),t}function tn(e){let t=L.useContext(yt);return F(t,$t(e)),t}function nn(e){let t=L.useContext(bt);return F(t,$t(e)),t}function rn(e){let t=L.useContext(kt);return F(t,`${e} can only be used on routes that contain a unique "id"`),t}function an(){let e=L.useContext(At),t=nn(`useRouteError`),n=rn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function on(){let{router:e}=en(`useNavigate`),t=rn(`useNavigate`),n=L.useRef(!1);return L.useLayoutEffect(()=>{n.current=!0}),L.useCallback(async(r,i={})=>{I(n.current,zt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var sn={};function cn(e,t,n){!t&&!sn[e]&&(sn[e]=!0,I(!1,n))}L.memo(ln);function ln({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=L.useContext(vt);return F(a,`You must render this element inside a <DataRouterContext.Provider> element`),Gt(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function un({to:e,replace:t,state:n,relative:r}){F(Lt(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=L.useContext(B);I(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=L.useContext(V),{pathname:s}=H(),c=Bt(),l=Qe(e,Ze(o),s,r===`path`);pt(typeof e==`string`?e:xe(e),a.createHref(l),ut(a),`reject`);let u=JSON.stringify(l);return L.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function dn(e){F(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function fn({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){F(!Lt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=L.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Se(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=L.useMemo(()=>{let e=R(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return I(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:L.createElement(B.Provider,{value:c},L.createElement(Dt.Provider,{children:t,value:h}))}function pn({children:e,location:t}){return Wt(mn(e),t)}L.Component;function mn(e,t=[]){let n=[];return L.Children.forEach(e,(e,r)=>{if(!L.isValidElement(e))return;let i=[...t,r];if(e.type===L.Fragment){n.push.apply(n,mn(e.props.children,i));return}F(e.type===dn,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;F(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=mn(a.children,i)),n.push(o)}),n}var hn=`application/x-www-form-urlencoded`;function gn(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function _n(e){return gn(e)&&e.tagName.toLowerCase()===`button`}function vn(e){return gn(e)&&e.tagName.toLowerCase()===`form`}function yn(e){return gn(e)&&e.tagName.toLowerCase()===`input`}function bn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xn(e,t){return e.button===0&&(!t||t===`_self`)&&!bn(e)}function Sn(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Cn(e,t){let n=Sn(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var wn=null;function Tn(){if(wn===null)try{new FormData(document.createElement(`form`),0),wn=!1}catch{wn=!0}return wn}var En=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Dn(e){return e!=null&&!En.has(e)?(I(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hn}"`),null):e}function On(e,t){let n,r,i,a,o;if(vn(e)){let o=e.getAttribute(`action`);r=o?R(o,t):null,n=e.getAttribute(`method`)||`get`,i=Dn(e.getAttribute(`enctype`))||hn,a=new FormData(e)}else if(_n(e)||yn(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?R(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Dn(e.getAttribute(`formenctype`))||Dn(o.getAttribute(`enctype`))||hn,a=new FormData(o,e),!Tn()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(gn(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=hn,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function kn(e,t){if(e===!1||e==null)throw Error(t)}function An(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}async function jn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Mn(e){return e!=null&&typeof e.page==`string`}function Nn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Pn(e,t,n){return zn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await jn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Nn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Fn(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function In(e,t,{includeHydrateFallback:n}={}){return Ln(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Ln(e){return[...new Set(e)]}function Rn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function zn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Mn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Rn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var Bn=L.createContext(void 0);Bn.displayName=`FrameworkContext`;function Vn(){let e=L.useContext(Bn);return kn(e,`You must render this element inside a <HydratedRouter> element`),e}function Hn(e,t){let n=L.useContext(Bn),[r,i]=L.useState(!1),[a,o]=L.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=L.useRef(null);L.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),L.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Un(s,p),onBlur:Un(c,m),onMouseEnter:Un(l,p),onMouseLeave:Un(u,m),onTouchStart:Un(d,p)}]:[a,f,{}]:[!1,f,{}]}function Un(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Wn({page:e,...t}){let n=Ct(),{nonce:r}=Vn(),{router:i}=en(`PrefetchPageLinks`),a=L.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?L.createElement(Kn,{page:e,matches:a,...t}):L.createElement(qn,{page:e,matches:a,...t})):null}function Gn(e){let{manifest:t,routeModules:n}=Vn(),[r,i]=L.useState([]);return L.useEffect(()=>{let r=!1;return Pn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Kn({page:e,matches:t,...n}){let r=H(),i=L.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=An(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return L.createElement(L.Fragment,null,i.map(e=>L.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function qn({page:e,matches:t,...n}){let r=H(),{manifest:i,routeModules:a}=Vn(),{matches:o}=tn(`PrefetchPageLinks`),{loaderData:s}=nn(`PrefetchPageLinks`),c=L.useMemo(()=>Fn(e,t,o,i,r,`data`),[e,t,o,i,r]),l=L.useMemo(()=>Fn(e,t,o,i,r,`assets`),[e,t,o,i,r]),u=L.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let l=An(e,`data`);return o&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[s,r,i,c,t,e,a]),d=L.useMemo(()=>In(l,i),[l,i]),f=Gn(l);return L.createElement(L.Fragment,null,u.map(e=>L.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>L.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>L.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Jn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Yn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Yn&&(window.__reactRouterVersion=`8`)}catch{}function Xn({basename:e,children:t,useTransitions:n,window:r}){let i=L.useRef(null);i.current??=_e({window:r,v5Compat:!0});let a=i.current,[o,s]=L.useState({action:a.action,location:a.location}),c=L.useCallback(e=>{n===!1?s(e):L.startTransition(()=>s(e))},[n]);return L.useLayoutEffect(()=>a.listen(c),[a,c]),L.createElement(fn,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Zn=L.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=L.useContext(B),v=typeof l==`string`&&fe.test(l),y=ct(l,h);l=y.to;let b=It(l,{relative:r}),x=H(),S=null;if(o){let e=Qe(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:z([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=Hn(n,p),E=er(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let O=!(y.isExternal||i),k=L.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:Jn(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?L.createElement(L.Fragment,null,k,L.createElement(Wn,{page:b})):k});Zn.displayName=`Link`;var Qn=L.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Ut(a,{relative:c.relative}),d=H(),f=L.useContext(xt),{navigator:p,basename:m}=L.useContext(B),h=f!=null&&or(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f?.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=R(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return L.createElement(Zn,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Qn.displayName=`NavLink`;var $n=L.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=L.useContext(B),g=ir(),_=ar(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&fe.test(s);return L.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?L.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});$n.displayName=`Form`;function er(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Bt(),d=H(),f=Ut(e,{relative:o});return L.useCallback(p=>{if(xn(p,t)){p.preventDefault();let t=n===void 0?xe(d)===xe(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?L.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function tr(e){I(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 t=L.useRef(Sn(e)),n=L.useRef(!1),r=H(),i=L.useMemo(()=>Cn(r.search,n.current?null:t.current),[r.search]),a=Bt();return[i,L.useCallback((e,t)=>{let r=Sn(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var nr=0,rr=()=>`__${String(++nr)}__`;function ir(){let{router:e}=en(`useSubmit`),{basename:t}=L.useContext(B),n=rn(`useSubmit`),r=e.fetch,i=e.navigate;return L.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=On(e,t);a.navigate===!1?await r(a.fetcherKey||rr(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ar(e,{relative:t}={}){let{basename:n}=L.useContext(B),r=L.useContext(V);F(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Ut(e||`.`,{relative:t})},o=H();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:z([n,a.pathname])),xe(a)}function or(e,{relative:t}={}){let n=L.useContext(wt);F(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=en(`useViewTransitionState`),i=Ut(e,{relative:t});if(!n.isTransitioning)return!1;let a=R(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=R(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ue(i.pathname,o)!=null||Ue(i.pathname,a)!=null}var sr=de(),U=x(),cr=`/setup`,lr=[`language`,`git`,`agent`,`tracker`,`updates`,`stats`];function ur(e){return lr.find(t=>t===e.get(`step`))??lr[0]}var dr=e=>`${cr}?step=${e}`,fr=`${dr(`stats`)}&db=server`,pr=[`tracker`,`stats`];function mr(e,t){let n=`${t} · `;return e.startsWith(n)&&e.length>n.length?e.slice(n.length):e}function hr(e){let t=e.indexOf(`@`);return t>0?e.slice(0,t):e}function gr(e,t,n,r){return _r(e,t,n.missing)&&n.accounts.some(t=>t.key===r&&t.agent===e)}function _r(e,t,n){return t===void 0?!n.includes(e):t.source===`checked`?t.status===`ready`||t.status===`downloading`:t.system}function vr(e){return e!==void 0&&e.version!==null&&e.name!==null&&e.email!==null}function yr(e){return e===`win32`?[`winget install --id Git.Git -e`]:e===`darwin`?[`xcode-select --install`]:[`sudo apt install git`,`sudo dnf install git`]}function br(e,t){return lr[lr.indexOf(e)+t]??null}var W=(...e)=>e.filter(Boolean).join(` `);function xr({title:e,help:t,children:n,actions:r,className:i}){return(0,U.jsxs)(`header`,{className:W(`ui-page-head`,i),children:[(0,U.jsx)(`h1`,{className:`page__title`,children:e}),t,n,r!==void 0&&(0,U.jsx)(`div`,{className:`ui-page-head__actions`,children:r})]})}function Sr({title:e,titleId:t,actions:n,className:r,children:i,...a}){return(0,U.jsxs)(`section`,{className:W(`ui-card`,r),"aria-labelledby":e===void 0?void 0:t,...a,children:[e!==void 0&&(0,U.jsx)(Cr,{title:e,id:t,actions:n}),i]})}function Cr({title:e,id:t,children:n,actions:r,className:i,...a}){return(0,U.jsxs)(`header`,{className:W(`ui-card__head`,i),...a,children:[(0,U.jsx)(`h2`,{id:t,className:`ui-card__title`,children:e}),n,r!==void 0&&(0,U.jsx)(`div`,{className:`ui-card__actions`,children:r})]})}function wr({children:e,className:t}){return(0,U.jsx)(`h3`,{className:W(`ui-label`,t),children:e})}function Tr({children:e,className:t}){return(0,U.jsx)(`div`,{className:W(`ui-tiles`,t),children:e})}function Er({label:e,value:t,note:n,children:r}){return(0,U.jsxs)(`div`,{className:`ui-tile`,children:[(0,U.jsx)(`span`,{className:`ui-tile__label`,children:e}),(0,U.jsx)(`span`,{className:`ui-tile__value`,children:t}),n!==void 0&&(0,U.jsx)(`span`,{className:`ui-tile__note`,children:n}),r]})}function Dr({children:e,className:t}){return(0,U.jsx)(`dl`,{className:W(`ui-facts`,t),children:e})}function Or({label:e,children:t,tone:n=`ok`,wide:r=!1,className:i}){return(0,U.jsxs)(`div`,{className:W(`ui-fact`,r&&`ui-fact--wide`,n!==`ok`&&`ui-fact--${n}`,i),children:[(0,U.jsx)(`dt`,{children:e}),t]})}function kr({title:e,summary:t,action:n,children:r}){return(0,U.jsx)(T,{className:`ui-fold-band`,summaryClassName:`ui-fold-band__toggle`,summary:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`strong`,{children:e}),(0,U.jsx)(`span`,{className:`ui-fold-band__summary`,children:t})]}),header:e=>(0,U.jsx)(Ar,{tone:`warn`,action:n,children:e}),children:(0,U.jsx)(`div`,{className:`ui-fold-band__content`,children:r})})}function Ar({tone:e,action:t,children:n,className:r}){return(0,U.jsxs)(`div`,{className:W(`ui-band`,`ui-band--${e}`,r),children:[(0,U.jsx)(`div`,{className:`ui-band__text`,children:n}),t!==void 0&&(0,U.jsx)(`div`,{className:`ui-band__action`,children:t})]})}var jr=2e3;function Mr({command:e,className:t}){let[i,a]=(0,L.useState)(!1),o=typeof navigator<`u`&&navigator.clipboard!==void 0;(0,L.useEffect)(()=>{if(!i)return;let e=window.setTimeout(()=>a(!1),jr);return()=>window.clearTimeout(e)},[i]);let s=()=>{navigator.clipboard.writeText(e).then(()=>a(!0),()=>void 0)},c=i?n.common.commandCopied:n.common.copyCommand;return(0,U.jsxs)(`div`,{className:W(`ui-command`,o&&`ui-command--copy`,t),children:[(0,U.jsx)(`pre`,{className:`ui-command__text`,children:(0,U.jsx)(`code`,{children:e})}),o&&(0,U.jsx)(ae,{tip:c,className:`ui-command__copy`,children:(0,U.jsx)(`button`,{type:`button`,className:`ui-command__button`,"aria-label":c,onClick:s,children:i?(0,U.jsx)(P,{}):(0,U.jsx)(r,{})})})]})}function Nr({children:e,action:t,className:n}){return(0,U.jsxs)(`div`,{className:W(`ui-empty`,n),children:[(0,U.jsx)(`p`,{className:`ui-empty__text`,children:e}),t]})}var Pr=[`active`,`terminal`,`requiredLabels`,`excludedLabels`,`requiredMilestones`,`excludedMilestones`],Fr=[`protection`,`branch`,`prompt`,`tracker`,`brief`,`pullRequests`,`intakeLabel`,`mergeInto`,`carryAgent`,`fillMilestone`,`changelog`,`standards`,`provider`,`modelLabels`,`language`,`promptLanguage`,`contextHandoffs`,`context`,`stats`],Ir={models:b,accounts:b,execution:Object.keys(te),cli:O},Lr=/^([A-Z][A-Z0-9_]{0,4})\.(.+)$/,Rr={"config.parallel":`parallel`,"config.keepWarm":`keepWarm`,"config.modelPrompts":`modelPrompts`,"config.modelPromptEmpty":`modelPrompts`,"config.modelPromptPlaceholder":`modelPrompts`,"config.hiddenSkills":`hiddenSkills`,"config.cacheTtl":`cacheTtl`,"config.autoCompactWindow":`autoCompactWindow`,"config.allowedHosts":`allowedHosts`,"config.contextWindow":`context`,"config.contextPercents":`context`,"config.compareKey":`stats`,"config.compareValue":`stats`,"config.statsMove":`stats`,"config.otherBelow":`stats`,"config.checkpointTokens":`checkpointTokens`};function zr(e,t){let n=e.params,r=Rr[e.code];if(r!==void 0)return{project:null,field:r};if(e.code===`config.repoEmpty`)return{project:e.params.key,field:`repo`};if(e.code===`config.slot`)return{project:e.params.key,field:`slot`};if(e.code===`config.color`)return{project:e.params.key,field:`color`};if(e.code===`config.trackerLocked`)return{project:e.params.key,field:`tracker`};if(e.code===`config.statusBoth`)return{project:e.params.project,field:`chain.terminal`};if(e.code===`config.labelBoth`)return{project:e.params.project,field:`chain.excludedLabels`};if(e.code===`config.milestoneBoth`)return{project:e.params.project,field:`chain.excludedMilestones`};if(e.code===`config.trackerProjectShared`)return{project:e.params.project,field:`trackerProject`};if(e.code===`config.mergeInto`||e.code===`config.mergeIntoForeign`)return{project:e.params.project,field:`mergeInto`};if(e.code===`config.execution`||e.code===`config.executionCli`)return{project:null,field:`execution.${e.params.provider}`};if(e.code===`config.cli`)return{project:null,field:`cli.${e.params.provider}`};if(typeof n.where!=`string`)return null;let i=Lr.exec(n.where),a=i?.[1]??null,[o,s]=(i?.[2]??n.where).split(`.`);if(o===`chain`)return{project:a,field:`chain.${Pr.includes(String(n.key))?n.key:`active`}`};if(o===`commands`)return{project:a,field:s===`check`||s===`afterGreen`?s:`beforeStart`};if(o===`ci`)return{project:a,field:`ci`};if(o===`stats`&&s===`checkpointShares`)return{project:a,field:`checkpointShares`};let c=o===void 0?void 0:Ir[o];return c===void 0?o!==void 0&&t.includes(o)?{project:a,field:`trackerProject`}:o!==void 0&&Fr.includes(o)?{project:a,field:o}:null:{project:a,field:`${o}.${s!==void 0&&c.includes(s)?s:c[0]}`}}var Br={to:`shared`,tab:`trackers`},Vr={to:`shared`,tab:`page`},Hr={to:`accounts`},Ur={"agent.copyMissing":{to:`shared`,tab:`models`},"agent.copyFailed":{to:`shared`,tab:`models`},"copilot.binaryMissing":{to:`shared`,tab:`models`},"git.noBranch":{to:`project`,tab:`repo`},"git.wrongBranch":{to:`project`,tab:`repo`},"forward.foreign":{to:`project`,tab:`repo`},"chain.emptyLabels":{to:`project`,tab:`tracker`},"chain.emptyStatus":{to:`project`,tab:`tracker`},"prompt.empty":{to:`project`,tab:`sessions`},"chain.unknownModel":{to:`project`,tab:`sessions`},"chain.modelUnavailable":{to:`project`,tab:`sessions`},"chain.opencodeCopilot":{to:`project`,tab:`sessions`},"copilot.modelUnavailable":{to:`project`,tab:`sessions`},"copilot.notSignedIn":Hr,"chain.limitSpent":{to:`project`,tab:`sessions`},"account.signedOut":Hr,"account.loginExpired":Hr,"account.activeGone":Hr,"account.sharedPool":{to:`shared`,tab:`models`},"profiles.paused":Br,"task.relabelFailed":Br,"ci.noToken":Br,"ci.denied":Br,"review.denied":Br,"config.token":Vr,"config.tokenShape":Vr,"claude.untrusted":{to:`resume`},"git.missing":{to:`resume`},"git.noIdentity":{to:`git`},"chain.packagesNotReady":{to:`packages`}};function Wr(e){if(e==null)return null;if(e.code===`claude.untrusted`)return e.params;for(let t of e.items??[]){let e=Wr(t);if(e!==null)return e}return Wr(e.cause)}function Gr(e){if(e==null)return null;if(e.code===`tracker.completeRefused`){let{task:t,level:n}=e.params;return n===void 0?{to:`tracker`,task:t}:{to:`moves`,level:n,task:t}}if(e.code===`statusMove.refused`||e.code===`statusMove.outside`||e.code===`statusMove.notDone`)return{to:`moves`,level:e.params.level,task:e.params.task};let t=Ur[e.code];if(t!==void 0)return t;for(let t of e.items??[]){let e=Gr(t);if(e!==null)return e}return Gr(e.cause)}var Kr={repo:[`repo`,`branch`,`mergeInto`,`carryAgent`,`slot`,`changelog`,`color`],tracker:[`tracker`,`trackerProject`,`fillMilestone`,`chain`],sessions:[`provider`,`models`,`accounts`,`modelLabels`,`brief`,`prompt`,`beforeStart`,`promptLanguage`,`cacheTtl`,`autoCompactWindow`,`contextHandoffs`,`checkpointTokens`,`checkpointShares`],ci:[`check`,`afterGreen`,`ci`,`pullRequests`]},qr={chain:[`parallel`,`brief`,`fillMilestone`,`chain`],models:[`provider`,`models`,`accounts`,`execution`,`cli`,`cliCheck`,`modelLabels`,`modelPrompts`,`promptLanguage`],sessions:[`hiddenSkills`,`context`,`contextHandoffs`,`checkpointTokens`,`checkpointShares`,`cacheTtl`,`autoCompactWindow`,`keepWarm`],ci:[`ci`],page:[`language`,`allowedHosts`],stats:[`stats`]};function Jr({project:e,field:t}){let n=t.split(`.`)[0];if(e===null){let e=Object.keys(qr).find(e=>qr[e].includes(n));return e===void 0?null:{to:`shared`,tab:e}}let r=Object.keys(Kr).find(e=>Kr[e].includes(n));return r===void 0?null:{to:`project`,project:e,tab:r}}function Yr({config:e,configError:t}){if(t===null)return null;let n=zr(t,e.trackers.flatMap(e=>e.projectKey===null?[]:[e.projectKey.key]));return n===null?null:Jr(n)}function Xr(e,t,n){if(e===void 0)return{base:t,edit:t};let r={},i={};for(let[a,o]of Object.entries(t)){let t=e.base[a],s=e.edit[a];t===void 0||s===void 0?r[a]=i[a]=o:n(a,t,o)?(r[a]=t,i[a]=s):n(a,s,t)?r[a]=i[a]=o:(r[a]=n(a,s,o)?o:t,i[a]=s)}return{base:r,edit:i}}function Zr(e,t,n){if(e===void 0)return;let r=Xr(e,t,n),i=new Set([...Object.keys(e.base),...Object.keys(r.base)]),a=(e,t,r)=>t!==void 0&&r!==void 0&&n(e,t,r);return[...i].every(t=>a(t,e.base[t],r.base[t])&&a(t,e.edit[t],r.edit[t]))?void 0:r}var G=(e,t,n)=>({...e,edit:{...e.edit,[t]:n}});function Qr(e,t,n,r,i){let a=e.base[t];return G(e,t,i(t,n,a===``?r:a)?a:n)}function $r(e,t,n,r,i,a){let o=G(e.edit[t]===!0?e:Object.entries(n).reduce((e,[t,n])=>G(e,t,n),G(e,t,!0)),r,i);return e.base[t]===!1&&Object.entries(n).every(([e,t])=>a(e,o.edit[e],t))?Object.keys(n).reduce((t,n)=>G(t,n,e.base[n]),G(o,t,!1)):o}var ei=(e,t,n)=>t.filter(t=>!n(t,e.edit[t],e.base[t]));function ti(e,t,n){let r=Object.fromEntries(n.map(e=>[e,t[e]]));return{base:{...e.base,...r},edit:{...e.edit,...r}}}function ni(e,t){return{form:{...e.base,...Object.fromEntries(t.map(t=>[t,e.edit[t]]))},base:e.base}}var ri=new Map,ii=new Map,ai=new Set,oi=e=>(ai.add(e),()=>void ai.delete(e)),si=()=>ai.forEach(e=>e());function ci(e,t,n){let r=(0,L.useSyncExternalStore)(oi,()=>ri.get(e)),i=t=>{ri.set(e,t),si()},a=t===void 0?void 0:Zr(r,t,n);return(0,L.useEffect)(()=>{a!==void 0&&ri.set(e,a)}),[t===void 0?void 0:a??Xr(r,t,n),i]}var li=`shared`,ui=e=>`project:${e}`,di=`settings`;function fi(e,t){ii.set(e,t),si()}function pi(e,t){return[(0,L.useSyncExternalStore)(oi,()=>ii.get(e))??t,t=>fi(e,t)]}var mi={repo:``,branch:``,key:``,name:``,tracker:``,trackerProject:``,team:``,profile:``,place:`worktree`,slots:`2`,milestones:``,provider:``,typed:{key:!1,name:!1,trackerProject:!1}};function hi(e){return e?.projectKey==null?`key`:e.projectKey.alias?`alias`:e.projectKey.optional?`within`:`place`}var gi=e=>e!==`key`;function _i(e,t,n){return n===null?null:n.code===`wizard.trackerShared`?`milestones`:n.code===`wizard.keyShape`||n.code===`wizard.keyTaken`?e.key.trim()===``?null:gi(t)?`key`:`tracker`:n.code===`wizard.trackerPlace`&&(t===`key`?e.key:t===`within`?e.team:e.trackerProject).trim()===``?null:`tracker`}function vi(e,t){return e===`alias`?t.trackerProject.trim():e===`within`?t.team.trim():``}function yi(e){let t=e.team.trim();return t===``||t===e.key.trim()?e.trackerProject:`${t}/${e.trackerProject}`}var bi=/^([A-Z][A-Z0-9_]{0,6})\/(.*)$/;function xi(e,t){let n=e.trackerProject;if(t===`key`&&(n=e.key),t===`within`){let t=bi.exec(e.trackerProject);n=t===null?`${e.key}/${e.trackerProject}`:`${t[1]}/${t[2].trim()}`}return JSON.stringify([e.tracker,e.profile,n,e.milestones])}function Si(e,t,n){let r=e===`within`?bi.exec(n.trim()):null;return r===null||r[1]===t?{team:``,trackerProject:r?.[2]??n}:{team:r[1],trackerProject:r[2]}}var Ci=5;function wi(e,t=!1){let n=0;if(e.place===`slots`){let t=e.slots.trim();if(n=/^\d+$/.test(t)?Number(t):0,n<1)return}return{repo:e.repo.trim(),branch:e.branch.trim(),key:e.key.trim(),name:e.name.trim(),tracker:e.tracker,trackerProject:yi({...e,trackerProject:e.trackerProject.trim()}),profile:e.profile===``||t?null:e.profile,slot:n,milestones:e.milestones.split(`
1
+ import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";import{Br as n,En as r,Fr as i,Gr as a,Ir as o,Jr as s,Jt as c,Kn as l,Nn as u,Nr as d,Qn as f,Un as p,Wn as m,Xn as h,Xt as g,Yt as _,Zt as v,_r as y,an as b,ar as x,bn as S,cn as C,er as w,fn as T,ft as E,gt as D,in as O,ir as k,ln as A,lr as ee,mt as j,nn as te,nr as M,ot as ne,pt as re,s as ie,sn as ae,sr as oe,tr as se,u as ce,un as N,vr as le,yn as P}from"./Loader-CG5xzofh.js";var ue=t((e=>{var t=s();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}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 r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=i.p;try{if(u.T=null,i.p=2,e)return e()}finally{u.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.0`})),de=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ue()})),fe=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,pe=/^[\\/]{2}/;function me(e,t){return t+e.replace(/\\/g,`/`)}var he=`popstate`;function ge(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function _e(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return be(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:xe(t)}return Ce(t,n,null,e)}function F(e,t){if(e===!1||e==null)throw Error(t)}function I(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ve(){return Math.random().toString(36).substring(2,10)}function ye(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function be(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Se(t):t,state:n,key:t&&t.key||r||ve(),mask:i}}function xe({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Se(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Ce(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=ge(e)?e:be(h.location,e,t);n&&n(r,e),l=u()+1;let d=ye(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=ge(e)?e:be(h.location,e,t);n&&n(r,e),l=u();let i=ye(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return we(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(he,d),c=e,()=>{i.removeEventListener(he,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function we(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),F(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:xe(t);return i=i.replace(/ $/,`%20`),!n&&pe.test(i)&&(i=r+i),new URL(i,r)}var L=e(s(),1);function Te(e,t,n=`/`){return Ee(e,t,n,!1)}function Ee(e,t,n,r,i){let a=R((typeof t==`string`?Se(t):t).pathname||`/`,n);if(a==null)return null;let o=i??De(e),s=null,c=Ke(a);for(let e=0;s==null&&e<o.length;++e)s=He(o[e],c,r);return s}function De(e){let t=Oe(e);return Ae(t),t}function Oe(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;F(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=z([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(F(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Oe(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Be(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Ge(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ke(e.path))a(e,t,!0,n)}),t}function ke(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ke(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Ae(e){e.sort((e,t)=>e.score===t.score?Ve(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var je=/^:[\w-]+$/,Me=/^:[\w-]+/,Ne=3.5,Pe=3,Fe=2,Ie=1,Le=10,Re=-2,ze=e=>e===`*`;function Be(e,t){let n=e.split(`/`),r=n.length;return n.some(ze)&&(r+=Re),t&&(r+=Fe),n.filter(e=>!ze(e)).reduce((e,t)=>e+(je.test(t)?Pe:Me.test(t)?Ne:t===``?Ie:Le),r)}function Ve(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function He(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?We(u,l,s.matcher,s.compiledParams):Ue(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:z([a,d.pathname]),pathnameBase:tt(z([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=z([a,d.pathnameBase]))}return o}function Ue(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ge(e.path,e.caseSensitive,e.end);return We(e,t,n,r)}function We(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=et(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=et(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Ge(e,t=!1,n=!0){I(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ke(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return I(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function R(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function qe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Se(e):e,a;return n?(n=$e(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Je(n.substring(1),`/`):Je(n,t)):a=t,{pathname:a,search:nt(r),hash:rt(i)}}function Je(e,t){let n=et(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ye(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Xe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ze(e){let t=Xe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Qe(e,t,n,r=!1){let i;typeof e==`string`?i=Se(e):(i={...e},F(!i.pathname||!i.pathname.includes(`?`),Ye(`?`,`pathname`,`search`,i)),F(!i.pathname||!i.pathname.includes(`#`),Ye(`#`,`pathname`,`hash`,i)),F(!i.search||!i.search.includes(`#`),Ye(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=qe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var $e=e=>e.replace(/[\\/]{2,}/g,`/`),z=e=>$e(e.join(`/`));function et(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var tt=e=>et(e).replace(/^\/*/,`/`),nt=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,rt=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,it=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function at(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ot(e){return z(e.map(e=>e.route.path).filter(Boolean))||`/`}var st=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ct(e,t){let n=e;if(typeof n!=`string`||!fe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(st)try{let e=new URL(window.location.href),r=pe.test(n)?new URL(me(n,e.protocol)):new URL(n),a=R(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{I(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var lt=new URL(`http://localhost`);function ut(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),lt)}catch{return lt}}function dt(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function ft(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function pt(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!dt(i,n),s=!dt(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!ft(e,i)||!dt(i,a)))throw Error(`External navigation is not allowed`)}var mt=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(mt);var ht=[`GET`,...mt];new Set(ht);var gt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function _t(e){try{return gt.includes(new URL(e).protocol)}catch{return!1}}var vt=L.createContext(null);vt.displayName=`DataRouter`;var yt=L.createContext(null);yt.displayName=`DataRouterState`;var bt=L.createContext(null);bt.displayName=`DataRouterData`;var xt=L.createContext(null);xt.displayName=`DataRouterNavigation`;var St=L.createContext(!1);function Ct(){return L.useContext(St)}var wt=L.createContext({isTransitioning:!1});wt.displayName=`ViewTransition`;var Tt=L.createContext(null);Tt.displayName=`Fetchers`;var Et=L.createContext(null);Et.displayName=`Await`;var B=L.createContext(null);B.displayName=`Navigation`;var Dt=L.createContext(null);Dt.displayName=`Location`;var V=L.createContext({outlet:null,matches:[],isDataRoute:!1});V.displayName=`Route`;var Ot=L.createContext(!1);Ot.displayName=`IsDataRoute`;var kt=L.createContext(void 0);kt.displayName=`RouteId`;var At=L.createContext(null);At.displayName=`RouteError`;var jt=`REACT_ROUTER_ERROR`,Mt=`REDIRECT`,Nt=`ROUTE_ERROR_RESPONSE`;function Pt(e){if(e.startsWith(`${jt}:${Mt}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ft(e){if(e.startsWith(`${jt}:${Nt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new it(t.status,t.statusText,t.data)}catch{}}function It(e,{relative:t}={}){F(Lt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=L.useContext(B),{hash:i,pathname:a,search:o}=Ut(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:z([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Lt(){return L.useContext(Dt)!=null}function H(){return F(Lt(),`useLocation() may be used only in the context of a <Router> component.`),L.useContext(Dt).location}function Rt(e){F(Lt(),`useMatch() may be used only in the context of a <Router> component.`);let{pathname:t}=H();return L.useMemo(()=>Ue(e,Ke(t)),[t,e])}var zt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Bt(){return L.useContext(Ot)?on():Vt()}function Vt(){F(Lt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=L.useContext(vt),{basename:t,navigator:n}=L.useContext(B),{matches:r}=L.useContext(V),{pathname:i}=H(),a=JSON.stringify(Ze(r)),o=L.useRef(!1);return L.useLayoutEffect(()=>{o.current=!0}),L.useCallback((r,s={})=>{if(I(o.current,zt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Qe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:z([t,c.pathname])),pt(typeof r==`string`?r:xe(r),n.createHref(c),ut(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}L.createContext(null);function Ht(){let{matches:e}=L.useContext(V);return e[e.length-1]?.params??{}}function Ut(e,{relative:t}={}){let{matches:n}=L.useContext(V),{pathname:r}=H(),i=JSON.stringify(Ze(n));return L.useMemo(()=>Qe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Wt(e,t){return Gt(e,t)}function Gt(e,t,n){F(Lt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=L.useContext(B),{matches:i}=L.useContext(V),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=H(),l;if(t){let e=typeof t==`string`?Se(t):t;F(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):Te(e,{pathname:d});let p=Qt(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:z([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:z([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?L.createElement(Dt.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function Kt(){let e=an(),t=at(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return L.createElement(L.Fragment,null,L.createElement(`h2`,null,`Unexpected Application Error!`),L.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?L.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var qt=L.createElement(Kt,null),Jt=class extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=St;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ft(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:L.createElement(V.Provider,{value:this.props.routeContext},L.createElement(Ot.Provider,{value:this.props.routeContext.isDataRoute},L.createElement(kt.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},L.createElement(At.Provider,{value:e,children:this.props.component}))));return this.context?L.createElement(Xt,{error:e},t):t}},Yt=new WeakMap;function Xt({children:e,error:t}){let{basename:n,navigator:r}=L.useContext(B);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Pt(t.digest);if(e){let i=Yt.get(t);if(i)throw i;let a=ct(e.location,n),o=a.absoluteURL||a.to;if(pt(e.location,o,ut(r),`allow-explicit`),_t(o))throw Error(`Invalid redirect location`);if(st&&!Yt.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Yt.set(t,n),n}}return L.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Zt({routeContext:e,match:t,children:n}){let r=L.useContext(vt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(V.Provider,{value:e},L.createElement(Ot.Provider,{value:e.isDataRoute},L.createElement(kt.Provider,{value:t.route.id},n)))}function Qt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);F(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ot(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||qt,o&&(s<0&&c===0?(cn(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?L.createElement(n.route.Component,null):n.route.element?n.route.element:e,L.createElement(Zt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?L.createElement(Jt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function $t(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function en(e){let t=L.useContext(vt);return F(t,$t(e)),t}function tn(e){let t=L.useContext(yt);return F(t,$t(e)),t}function nn(e){let t=L.useContext(bt);return F(t,$t(e)),t}function rn(e){let t=L.useContext(kt);return F(t,`${e} can only be used on routes that contain a unique "id"`),t}function an(){let e=L.useContext(At),t=nn(`useRouteError`),n=rn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function on(){let{router:e}=en(`useNavigate`),t=rn(`useNavigate`),n=L.useRef(!1);return L.useLayoutEffect(()=>{n.current=!0}),L.useCallback(async(r,i={})=>{I(n.current,zt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var sn={};function cn(e,t,n){!t&&!sn[e]&&(sn[e]=!0,I(!1,n))}L.memo(ln);function ln({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=L.useContext(vt);return F(a,`You must render this element inside a <DataRouterContext.Provider> element`),Gt(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function un({to:e,replace:t,state:n,relative:r}){F(Lt(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=L.useContext(B);I(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=L.useContext(V),{pathname:s}=H(),c=Bt(),l=Qe(e,Ze(o),s,r===`path`);pt(typeof e==`string`?e:xe(e),a.createHref(l),ut(a),`reject`);let u=JSON.stringify(l);return L.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function dn(e){F(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function fn({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){F(!Lt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=L.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Se(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=L.useMemo(()=>{let e=R(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return I(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:L.createElement(B.Provider,{value:c},L.createElement(Dt.Provider,{children:t,value:h}))}function pn({children:e,location:t}){return Wt(mn(e),t)}L.Component;function mn(e,t=[]){let n=[];return L.Children.forEach(e,(e,r)=>{if(!L.isValidElement(e))return;let i=[...t,r];if(e.type===L.Fragment){n.push.apply(n,mn(e.props.children,i));return}F(e.type===dn,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;F(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=mn(a.children,i)),n.push(o)}),n}var hn=`application/x-www-form-urlencoded`;function gn(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function _n(e){return gn(e)&&e.tagName.toLowerCase()===`button`}function vn(e){return gn(e)&&e.tagName.toLowerCase()===`form`}function yn(e){return gn(e)&&e.tagName.toLowerCase()===`input`}function bn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xn(e,t){return e.button===0&&(!t||t===`_self`)&&!bn(e)}function Sn(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Cn(e,t){let n=Sn(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var wn=null;function Tn(){if(wn===null)try{new FormData(document.createElement(`form`),0),wn=!1}catch{wn=!0}return wn}var En=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Dn(e){return e!=null&&!En.has(e)?(I(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hn}"`),null):e}function On(e,t){let n,r,i,a,o;if(vn(e)){let o=e.getAttribute(`action`);r=o?R(o,t):null,n=e.getAttribute(`method`)||`get`,i=Dn(e.getAttribute(`enctype`))||hn,a=new FormData(e)}else if(_n(e)||yn(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?R(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Dn(e.getAttribute(`formenctype`))||Dn(o.getAttribute(`enctype`))||hn,a=new FormData(o,e),!Tn()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(gn(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=hn,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function kn(e,t){if(e===!1||e==null)throw Error(t)}function An(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}async function jn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Mn(e){return e!=null&&typeof e.page==`string`}function Nn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Pn(e,t,n){return zn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await jn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Nn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Fn(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function In(e,t,{includeHydrateFallback:n}={}){return Ln(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Ln(e){return[...new Set(e)]}function Rn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function zn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Mn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Rn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var Bn=L.createContext(void 0);Bn.displayName=`FrameworkContext`;function Vn(){let e=L.useContext(Bn);return kn(e,`You must render this element inside a <HydratedRouter> element`),e}function Hn(e,t){let n=L.useContext(Bn),[r,i]=L.useState(!1),[a,o]=L.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=L.useRef(null);L.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),L.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Un(s,p),onBlur:Un(c,m),onMouseEnter:Un(l,p),onMouseLeave:Un(u,m),onTouchStart:Un(d,p)}]:[a,f,{}]:[!1,f,{}]}function Un(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Wn({page:e,...t}){let n=Ct(),{nonce:r}=Vn(),{router:i}=en(`PrefetchPageLinks`),a=L.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?L.createElement(Kn,{page:e,matches:a,...t}):L.createElement(qn,{page:e,matches:a,...t})):null}function Gn(e){let{manifest:t,routeModules:n}=Vn(),[r,i]=L.useState([]);return L.useEffect(()=>{let r=!1;return Pn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Kn({page:e,matches:t,...n}){let r=H(),i=L.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=An(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return L.createElement(L.Fragment,null,i.map(e=>L.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function qn({page:e,matches:t,...n}){let r=H(),{manifest:i,routeModules:a}=Vn(),{matches:o}=tn(`PrefetchPageLinks`),{loaderData:s}=nn(`PrefetchPageLinks`),c=L.useMemo(()=>Fn(e,t,o,i,r,`data`),[e,t,o,i,r]),l=L.useMemo(()=>Fn(e,t,o,i,r,`assets`),[e,t,o,i,r]),u=L.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let l=An(e,`data`);return o&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[s,r,i,c,t,e,a]),d=L.useMemo(()=>In(l,i),[l,i]),f=Gn(l);return L.createElement(L.Fragment,null,u.map(e=>L.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>L.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>L.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Jn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Yn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Yn&&(window.__reactRouterVersion=`8`)}catch{}function Xn({basename:e,children:t,useTransitions:n,window:r}){let i=L.useRef(null);i.current??=_e({window:r,v5Compat:!0});let a=i.current,[o,s]=L.useState({action:a.action,location:a.location}),c=L.useCallback(e=>{n===!1?s(e):L.startTransition(()=>s(e))},[n]);return L.useLayoutEffect(()=>a.listen(c),[a,c]),L.createElement(fn,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Zn=L.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=L.useContext(B),v=typeof l==`string`&&fe.test(l),y=ct(l,h);l=y.to;let b=It(l,{relative:r}),x=H(),S=null;if(o){let e=Qe(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:z([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=Hn(n,p),E=er(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let O=!(y.isExternal||i),k=L.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:Jn(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?L.createElement(L.Fragment,null,k,L.createElement(Wn,{page:b})):k});Zn.displayName=`Link`;var Qn=L.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Ut(a,{relative:c.relative}),d=H(),f=L.useContext(xt),{navigator:p,basename:m}=L.useContext(B),h=f!=null&&or(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f?.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=R(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return L.createElement(Zn,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Qn.displayName=`NavLink`;var $n=L.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=L.useContext(B),g=ir(),_=ar(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&fe.test(s);return L.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?L.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});$n.displayName=`Form`;function er(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Bt(),d=H(),f=Ut(e,{relative:o});return L.useCallback(p=>{if(xn(p,t)){p.preventDefault();let t=n===void 0?xe(d)===xe(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?L.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function tr(e){I(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 t=L.useRef(Sn(e)),n=L.useRef(!1),r=H(),i=L.useMemo(()=>Cn(r.search,n.current?null:t.current),[r.search]),a=Bt();return[i,L.useCallback((e,t)=>{let r=Sn(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var nr=0,rr=()=>`__${String(++nr)}__`;function ir(){let{router:e}=en(`useSubmit`),{basename:t}=L.useContext(B),n=rn(`useSubmit`),r=e.fetch,i=e.navigate;return L.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=On(e,t);a.navigate===!1?await r(a.fetcherKey||rr(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ar(e,{relative:t}={}){let{basename:n}=L.useContext(B),r=L.useContext(V);F(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Ut(e||`.`,{relative:t})},o=H();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:z([n,a.pathname])),xe(a)}function or(e,{relative:t}={}){let n=L.useContext(wt);F(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=en(`useViewTransitionState`),i=Ut(e,{relative:t});if(!n.isTransitioning)return!1;let a=R(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=R(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ue(i.pathname,o)!=null||Ue(i.pathname,a)!=null}var sr=de(),U=x(),cr=`/setup`,lr=[`language`,`git`,`agent`,`tracker`,`updates`,`stats`];function ur(e){return lr.find(t=>t===e.get(`step`))??lr[0]}var dr=e=>`${cr}?step=${e}`,fr=`${dr(`stats`)}&db=server`,pr=[`tracker`,`stats`];function mr(e,t){let n=`${t} · `;return e.startsWith(n)&&e.length>n.length?e.slice(n.length):e}function hr(e){let t=e.indexOf(`@`);return t>0?e.slice(0,t):e}function gr(e,t,n,r){return _r(e,t,n.missing)&&n.accounts.some(t=>t.key===r&&t.agent===e)}function _r(e,t,n){return t===void 0?!n.includes(e):t.source===`checked`?t.status===`ready`||t.status===`downloading`:t.system}function vr(e){return e!==void 0&&e.version!==null&&e.name!==null&&e.email!==null}function yr(e){return e===`win32`?`https://git-scm.com/download/win`:e===`darwin`?`https://git-scm.com/download/mac`:`https://git-scm.com/download/linux`}function br(e,t){return lr[lr.indexOf(e)+t]??null}var W=(...e)=>e.filter(Boolean).join(` `);function xr({title:e,help:t,children:n,actions:r,className:i}){return(0,U.jsxs)(`header`,{className:W(`ui-page-head`,i),children:[(0,U.jsx)(`h1`,{className:`page__title`,children:e}),t,n,r!==void 0&&(0,U.jsx)(`div`,{className:`ui-page-head__actions`,children:r})]})}function Sr({title:e,titleId:t,actions:n,className:r,children:i,...a}){return(0,U.jsxs)(`section`,{className:W(`ui-card`,r),"aria-labelledby":e===void 0?void 0:t,...a,children:[e!==void 0&&(0,U.jsx)(Cr,{title:e,id:t,actions:n}),i]})}function Cr({title:e,id:t,children:n,actions:r,className:i,...a}){return(0,U.jsxs)(`header`,{className:W(`ui-card__head`,i),...a,children:[(0,U.jsx)(`h2`,{id:t,className:`ui-card__title`,children:e}),n,r!==void 0&&(0,U.jsx)(`div`,{className:`ui-card__actions`,children:r})]})}function wr({children:e,className:t}){return(0,U.jsx)(`h3`,{className:W(`ui-label`,t),children:e})}function Tr({children:e,className:t}){return(0,U.jsx)(`div`,{className:W(`ui-tiles`,t),children:e})}function Er({label:e,value:t,note:n,children:r}){return(0,U.jsxs)(`div`,{className:`ui-tile`,children:[(0,U.jsx)(`span`,{className:`ui-tile__label`,children:e}),(0,U.jsx)(`span`,{className:`ui-tile__value`,children:t}),n!==void 0&&(0,U.jsx)(`span`,{className:`ui-tile__note`,children:n}),r]})}function Dr({children:e,className:t}){return(0,U.jsx)(`dl`,{className:W(`ui-facts`,t),children:e})}function Or({label:e,children:t,tone:n=`ok`,wide:r=!1,className:i}){return(0,U.jsxs)(`div`,{className:W(`ui-fact`,r&&`ui-fact--wide`,n!==`ok`&&`ui-fact--${n}`,i),children:[(0,U.jsx)(`dt`,{children:e}),t]})}function kr({title:e,summary:t,action:n,children:r}){return(0,U.jsx)(T,{className:`ui-fold-band`,summaryClassName:`ui-fold-band__toggle`,summary:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`strong`,{children:e}),(0,U.jsx)(`span`,{className:`ui-fold-band__summary`,children:t})]}),header:e=>(0,U.jsx)(Ar,{tone:`warn`,action:n,children:e}),children:(0,U.jsx)(`div`,{className:`ui-fold-band__content`,children:r})})}function Ar({tone:e,action:t,children:n,className:r}){return(0,U.jsxs)(`div`,{className:W(`ui-band`,`ui-band--${e}`,r),children:[(0,U.jsx)(`div`,{className:`ui-band__text`,children:n}),t!==void 0&&(0,U.jsx)(`div`,{className:`ui-band__action`,children:t})]})}var jr=2e3;function Mr({command:e,className:t}){let[i,a]=(0,L.useState)(!1),o=typeof navigator<`u`&&navigator.clipboard!==void 0;(0,L.useEffect)(()=>{if(!i)return;let e=window.setTimeout(()=>a(!1),jr);return()=>window.clearTimeout(e)},[i]);let s=()=>{navigator.clipboard.writeText(e).then(()=>a(!0),()=>void 0)},c=i?n.common.commandCopied:n.common.copyCommand;return(0,U.jsxs)(`div`,{className:W(`ui-command`,o&&`ui-command--copy`,t),children:[(0,U.jsx)(`pre`,{className:`ui-command__text`,children:(0,U.jsx)(`code`,{children:e})}),o&&(0,U.jsx)(ae,{tip:c,className:`ui-command__copy`,children:(0,U.jsx)(`button`,{type:`button`,className:`ui-command__button`,"aria-label":c,onClick:s,children:i?(0,U.jsx)(P,{}):(0,U.jsx)(r,{})})})]})}function Nr({children:e,action:t,className:n}){return(0,U.jsxs)(`div`,{className:W(`ui-empty`,n),children:[(0,U.jsx)(`p`,{className:`ui-empty__text`,children:e}),t]})}var Pr=[`active`,`terminal`,`requiredLabels`,`excludedLabels`,`requiredMilestones`,`excludedMilestones`],Fr=[`protection`,`branch`,`prompt`,`tracker`,`brief`,`pullRequests`,`intakeLabel`,`mergeInto`,`carryAgent`,`fillMilestone`,`changelog`,`standards`,`provider`,`modelLabels`,`language`,`promptLanguage`,`contextHandoffs`,`context`,`stats`],Ir={models:b,accounts:b,execution:Object.keys(te),cli:O},Lr=/^([A-Z][A-Z0-9_]{0,4})\.(.+)$/,Rr={"config.parallel":`parallel`,"config.keepWarm":`keepWarm`,"config.modelPrompts":`modelPrompts`,"config.modelPromptEmpty":`modelPrompts`,"config.modelPromptPlaceholder":`modelPrompts`,"config.hiddenSkills":`hiddenSkills`,"config.cacheTtl":`cacheTtl`,"config.autoCompactWindow":`autoCompactWindow`,"config.allowedHosts":`allowedHosts`,"config.contextWindow":`context`,"config.contextPercents":`context`,"config.compareKey":`stats`,"config.compareValue":`stats`,"config.statsMove":`stats`,"config.otherBelow":`stats`,"config.checkpointTokens":`checkpointTokens`};function zr(e,t){let n=e.params,r=Rr[e.code];if(r!==void 0)return{project:null,field:r};if(e.code===`config.repoEmpty`)return{project:e.params.key,field:`repo`};if(e.code===`config.slot`)return{project:e.params.key,field:`slot`};if(e.code===`config.color`)return{project:e.params.key,field:`color`};if(e.code===`config.trackerLocked`)return{project:e.params.key,field:`tracker`};if(e.code===`config.statusBoth`)return{project:e.params.project,field:`chain.terminal`};if(e.code===`config.labelBoth`)return{project:e.params.project,field:`chain.excludedLabels`};if(e.code===`config.milestoneBoth`)return{project:e.params.project,field:`chain.excludedMilestones`};if(e.code===`config.trackerProjectShared`)return{project:e.params.project,field:`trackerProject`};if(e.code===`config.mergeInto`||e.code===`config.mergeIntoForeign`)return{project:e.params.project,field:`mergeInto`};if(e.code===`config.execution`||e.code===`config.executionCli`)return{project:null,field:`execution.${e.params.provider}`};if(e.code===`config.cli`)return{project:null,field:`cli.${e.params.provider}`};if(typeof n.where!=`string`)return null;let i=Lr.exec(n.where),a=i?.[1]??null,[o,s]=(i?.[2]??n.where).split(`.`);if(o===`chain`)return{project:a,field:`chain.${Pr.includes(String(n.key))?n.key:`active`}`};if(o===`commands`)return{project:a,field:s===`check`||s===`afterGreen`?s:`beforeStart`};if(o===`ci`)return{project:a,field:`ci`};if(o===`stats`&&s===`checkpointShares`)return{project:a,field:`checkpointShares`};let c=o===void 0?void 0:Ir[o];return c===void 0?o!==void 0&&t.includes(o)?{project:a,field:`trackerProject`}:o!==void 0&&Fr.includes(o)?{project:a,field:o}:null:{project:a,field:`${o}.${s!==void 0&&c.includes(s)?s:c[0]}`}}var Br={to:`shared`,tab:`trackers`},Vr={to:`shared`,tab:`page`},Hr={to:`accounts`},Ur={"agent.copyMissing":{to:`shared`,tab:`models`},"agent.copyFailed":{to:`shared`,tab:`models`},"copilot.binaryMissing":{to:`shared`,tab:`models`},"git.noBranch":{to:`project`,tab:`repo`},"git.wrongBranch":{to:`project`,tab:`repo`},"forward.foreign":{to:`project`,tab:`repo`},"chain.emptyLabels":{to:`project`,tab:`tracker`},"chain.emptyStatus":{to:`project`,tab:`tracker`},"prompt.empty":{to:`project`,tab:`sessions`},"chain.unknownModel":{to:`project`,tab:`sessions`},"chain.modelUnavailable":{to:`project`,tab:`sessions`},"chain.opencodeCopilot":{to:`project`,tab:`sessions`},"copilot.modelUnavailable":{to:`project`,tab:`sessions`},"copilot.notSignedIn":Hr,"chain.limitSpent":{to:`project`,tab:`sessions`},"account.signedOut":Hr,"account.loginExpired":Hr,"account.activeGone":Hr,"account.sharedPool":{to:`shared`,tab:`models`},"profiles.paused":Br,"task.relabelFailed":Br,"ci.noToken":Br,"ci.denied":Br,"review.denied":Br,"config.token":Vr,"config.tokenShape":Vr,"claude.untrusted":{to:`resume`},"git.missing":{to:`resume`},"git.noIdentity":{to:`git`},"chain.packagesNotReady":{to:`packages`}};function Wr(e){if(e==null)return null;if(e.code===`claude.untrusted`)return e.params;for(let t of e.items??[]){let e=Wr(t);if(e!==null)return e}return Wr(e.cause)}function Gr(e){if(e==null)return null;if(e.code===`tracker.completeRefused`){let{task:t,level:n}=e.params;return n===void 0?{to:`tracker`,task:t}:{to:`moves`,level:n,task:t}}if(e.code===`statusMove.refused`||e.code===`statusMove.outside`||e.code===`statusMove.notDone`)return{to:`moves`,level:e.params.level,task:e.params.task};let t=Ur[e.code];if(t!==void 0)return t;for(let t of e.items??[]){let e=Gr(t);if(e!==null)return e}return Gr(e.cause)}var Kr={repo:[`repo`,`branch`,`mergeInto`,`carryAgent`,`slot`,`changelog`,`color`],tracker:[`tracker`,`trackerProject`,`fillMilestone`,`chain`],sessions:[`provider`,`models`,`accounts`,`modelLabels`,`brief`,`prompt`,`beforeStart`,`promptLanguage`,`cacheTtl`,`autoCompactWindow`,`contextHandoffs`,`checkpointTokens`,`checkpointShares`],ci:[`check`,`afterGreen`,`ci`,`pullRequests`]},qr={chain:[`parallel`,`brief`,`fillMilestone`,`chain`],models:[`provider`,`models`,`accounts`,`execution`,`cli`,`cliCheck`,`modelLabels`,`modelPrompts`,`promptLanguage`],sessions:[`hiddenSkills`,`context`,`contextHandoffs`,`checkpointTokens`,`checkpointShares`,`cacheTtl`,`autoCompactWindow`,`keepWarm`],ci:[`ci`],page:[`language`,`allowedHosts`],stats:[`stats`]};function Jr({project:e,field:t}){let n=t.split(`.`)[0];if(e===null){let e=Object.keys(qr).find(e=>qr[e].includes(n));return e===void 0?null:{to:`shared`,tab:e}}let r=Object.keys(Kr).find(e=>Kr[e].includes(n));return r===void 0?null:{to:`project`,project:e,tab:r}}function Yr({config:e,configError:t}){if(t===null)return null;let n=zr(t,e.trackers.flatMap(e=>e.projectKey===null?[]:[e.projectKey.key]));return n===null?null:Jr(n)}function Xr(e,t,n){if(e===void 0)return{base:t,edit:t};let r={},i={};for(let[a,o]of Object.entries(t)){let t=e.base[a],s=e.edit[a];t===void 0||s===void 0?r[a]=i[a]=o:n(a,t,o)?(r[a]=t,i[a]=s):n(a,s,t)?r[a]=i[a]=o:(r[a]=n(a,s,o)?o:t,i[a]=s)}return{base:r,edit:i}}function Zr(e,t,n){if(e===void 0)return;let r=Xr(e,t,n),i=new Set([...Object.keys(e.base),...Object.keys(r.base)]),a=(e,t,r)=>t!==void 0&&r!==void 0&&n(e,t,r);return[...i].every(t=>a(t,e.base[t],r.base[t])&&a(t,e.edit[t],r.edit[t]))?void 0:r}var G=(e,t,n)=>({...e,edit:{...e.edit,[t]:n}});function Qr(e,t,n,r,i){let a=e.base[t];return G(e,t,i(t,n,a===``?r:a)?a:n)}function $r(e,t,n,r,i,a){let o=G(e.edit[t]===!0?e:Object.entries(n).reduce((e,[t,n])=>G(e,t,n),G(e,t,!0)),r,i);return e.base[t]===!1&&Object.entries(n).every(([e,t])=>a(e,o.edit[e],t))?Object.keys(n).reduce((t,n)=>G(t,n,e.base[n]),G(o,t,!1)):o}var ei=(e,t,n)=>t.filter(t=>!n(t,e.edit[t],e.base[t]));function ti(e,t,n){let r=Object.fromEntries(n.map(e=>[e,t[e]]));return{base:{...e.base,...r},edit:{...e.edit,...r}}}function ni(e,t){return{form:{...e.base,...Object.fromEntries(t.map(t=>[t,e.edit[t]]))},base:e.base}}var ri=new Map,ii=new Map,ai=new Set,oi=e=>(ai.add(e),()=>void ai.delete(e)),si=()=>ai.forEach(e=>e());function ci(e,t,n){let r=(0,L.useSyncExternalStore)(oi,()=>ri.get(e)),i=t=>{ri.set(e,t),si()},a=t===void 0?void 0:Zr(r,t,n);return(0,L.useEffect)(()=>{a!==void 0&&ri.set(e,a)}),[t===void 0?void 0:a??Xr(r,t,n),i]}var li=`shared`,ui=e=>`project:${e}`,di=`settings`;function fi(e,t){ii.set(e,t),si()}function pi(e,t){return[(0,L.useSyncExternalStore)(oi,()=>ii.get(e))??t,t=>fi(e,t)]}var mi={repo:``,branch:``,key:``,name:``,tracker:``,trackerProject:``,team:``,profile:``,place:`worktree`,slots:`2`,milestones:``,provider:``,typed:{key:!1,name:!1,trackerProject:!1}};function hi(e){return e?.projectKey==null?`key`:e.projectKey.alias?`alias`:e.projectKey.optional?`within`:`place`}var gi=e=>e!==`key`;function _i(e,t,n){return n===null?null:n.code===`wizard.trackerShared`?`milestones`:n.code===`wizard.keyShape`||n.code===`wizard.keyTaken`?e.key.trim()===``?null:gi(t)?`key`:`tracker`:n.code===`wizard.trackerPlace`&&(t===`key`?e.key:t===`within`?e.team:e.trackerProject).trim()===``?null:`tracker`}function vi(e,t){return e===`alias`?t.trackerProject.trim():e===`within`?t.team.trim():``}function yi(e){let t=e.team.trim();return t===``||t===e.key.trim()?e.trackerProject:`${t}/${e.trackerProject}`}var bi=/^([A-Z][A-Z0-9_]{0,6})\/(.*)$/;function xi(e,t){let n=e.trackerProject;if(t===`key`&&(n=e.key),t===`within`){let t=bi.exec(e.trackerProject);n=t===null?`${e.key}/${e.trackerProject}`:`${t[1]}/${t[2].trim()}`}return JSON.stringify([e.tracker,e.profile,n,e.milestones])}function Si(e,t,n){let r=e===`within`?bi.exec(n.trim()):null;return r===null||r[1]===t?{team:``,trackerProject:r?.[2]??n}:{team:r[1],trackerProject:r[2]}}var Ci=5;function wi(e,t=!1){let n=0;if(e.place===`slots`){let t=e.slots.trim();if(n=/^\d+$/.test(t)?Number(t):0,n<1)return}return{repo:e.repo.trim(),branch:e.branch.trim(),key:e.key.trim(),name:e.name.trim(),tracker:e.tracker,trackerProject:yi({...e,trackerProject:e.trackerProject.trim()}),profile:e.profile===``||t?null:e.profile,slot:n,milestones:e.milestones.split(`
2
2
  `).map(e=>e.trim()).filter(e=>e!==``),provider:e.provider===``?null:e.provider}}function Ti(e,t,n){return{...e,[t]:n,typed:{...e.typed,[t]:n.trim()!==``}}}function K(e,t){let n={...e};for(let[r,i]of Object.entries(t))e.typed[r]||(n[r]=i);return n}function Ei(e,t){return t.kind===e.tracker?{...e,profile:t.id}:K({...e,profile:t.id,tracker:t.kind,team:``},{key:``,name:``,trackerProject:``})}function Di(e,t){return K({...e,team:t},{key:t})}function Oi(e,t,n){return t===`key`?K({...e,key:n.key,typed:{...e.typed,key:!0}},{name:n.name}):t===`within`?K({...e,team:n.key,trackerProject:n.within??``},{key:n.key,name:n.name}):t===`alias`?K({...e,trackerProject:n.key,typed:{...e.typed,trackerProject:!0}},{key:n.key,name:n.name}):K({...e,trackerProject:n.key,typed:{...e.typed,trackerProject:!0}},{key:Bi(n.name),name:n.name})}function ki(e,t,n){if(n.root===null)return e;let r={...e,branch:e.branch||(n.current??``)};if(t!==`place`)return r;let i=e.typed.trackerProject?e.trackerProject:n.suggested??e.trackerProject,a=i.includes(`/`)?i.slice(i.lastIndexOf(`/`)+1):Hi(n.root);return K(r,{trackerProject:i,key:Bi(a),name:a})}function Ai(e){return e!==null&&e.repo.root!==null&&e.repo.notice===null&&e.entry===null&&e.tracker?.ok===!0}function ji(e,t){return t===`win32`?`pushd "${e}" && claude`:`cd ${Pi(e)} && claude`}function Mi(e,t,n){return t===`win32`?`runas /user:${n} "cmd /k cd /d ${e} && claude"`:`cd ${Pi(e)} && sudo -u ${Pi(n)} -H claude`}function Ni(e){return{own:ji(e.folder,e.platform),as:e.service?Mi(e.folder,e.platform,e.user):null}}var Pi=e=>`'${e.replace(/'/g,`'\\''`)}'`;function Fi(e,t,n){return e.repo.trim()===``?`repo`:n?.repo.notice==null?e.profile===``?`profile`:t===`place`&&e.trackerProject.trim()===``?`place`:t===`alias`&&e.trackerProject.trim()===``||t===`within`&&e.team.trim()===``?`project`:e.key.trim()===``?gi(t)?`key`:`project`:n===null?`checking`:n.entry===null?n.tracker?.ok===!0?null:n.tracker===null?`checking`:`tracker`:`entry`:`repoError`}function Ii(e,t){let n=vi(e,t)||t.key.trim();if(n===``)return null;let r=`${n}-12 → ${n.toLowerCase()}-12/task`;return e===`place`?`#12 → ${r}`:r}function Li(e,t){return e===`key`?t.key.trim():e===`within`?[t.team.trim()||t.key.trim(),t.trackerProject.trim()].filter(e=>e!==``).join(` / `):t.trackerProject.trim()}var Ri=[`agent`,`repo`,`tracker`,`project`,`place`];function zi(e,t,n,r,i,a=n?.tracker??null){let o=e.key.trim(),s=n?.entry??null,c=_i(e,t,s),l=e.repo.trim()===``?`empty`:r?.repo.notice==null?r?.repo.root==null?`empty`:`passed`:`failed`,u=a===null?`empty`:a.ok?`passed`:`failed`;return{agent:i,repo:l,tracker:e.profile===``?`empty`:c===`tracker`?`failed`:u,project:c===`milestones`||c===`key`?`failed`:o!==``&&n!==null&&s===null?`passed`:`empty`,place:wi(e)===void 0?`failed`:`passed`}}function Bi(e){let t=Hi(e).toUpperCase().split(/[^A-Z0-9]+/).filter(e=>/^[A-Z]/.test(e));return t.length===0?``:(t.length===1?t[0].slice(0,3):t.map(e=>e[0]).join(``)).slice(0,Ci)}function Vi(e){return e.toUpperCase().replace(/[^A-Z0-9_]/g,``).replace(/^[^A-Z]+/,``).slice(0,Ci)}function Hi(e){return e.split(/[\\/]/).filter(e=>e!==``).pop()??``}function Ui(e,t,n){let r=t=>t<=e+.5;return r(t)?`full`:n!==null&&r(n)?`short`:`cut`}function q({line:e,fold:t=!1,wide:n=!1,children:r}){let i=[`field-strip`,t&&`field-strip--fold`,n&&`field-strip--wide`].filter(Boolean).join(` `);return(0,U.jsxs)(`div`,{className:i,children:[r,(0,U.jsx)(`div`,{className:`field-strip__room`,role:e?.tone===`error`?`alert`:void 0,children:e!==null&&(e.tone===`error`?(0,U.jsx)(Wi,{text:e.text}):(0,U.jsx)(Gi,{line:e},e.tone))})]})}function Wi({text:e}){return(0,U.jsx)(`span`,{className:`field-strip__line field-strip__line--error`,children:(0,U.jsx)(`span`,{className:`field-strip__text`,children:e})})}function Gi({line:e}){let t=(0,L.useRef)(null),n=(0,L.useRef)(null),r=(0,L.useRef)(null),[i,a]=(0,L.useState)(`full`);(0,L.useLayoutEffect)(()=>{let e=t.current;if(e===null)return;let i=()=>a(Ui(e.clientWidth,Ki(n.current),r.current===null?null:Ki(r.current)));i();let o=new ResizeObserver(i);return o.observe(e),()=>o.disconnect()},[e.text,e.short]);let o=i===`full`||e.short===void 0?e.text:e.short;return(0,U.jsxs)(ae,{tip:e.text,off:i!==`cut`,focusable:i===`cut`,align:`start`,className:`field-strip__line field-strip__line--${e.tone}`,children:[e.tone===`ok`&&(0,U.jsx)(`span`,{className:`field-strip__mark`,"aria-hidden":`true`,children:`✓`}),(0,U.jsx)(`span`,{ref:t,className:`field-strip__text`,children:o}),(0,U.jsx)(`span`,{ref:n,className:`field-strip__measure`,"aria-hidden":`true`,children:e.text}),e.short!==void 0&&(0,U.jsx)(`span`,{ref:r,className:`field-strip__measure`,"aria-hidden":`true`,children:e.short})]})}function Ki(e){return e===null?0:e.getBoundingClientRect().width}var qi=[`active`,`terminal`,`requiredLabels`,`excludedLabels`,`requiredMilestones`,`excludedMilestones`],Ji=e=>e.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e!==``),Yi=e=>({active:(e.active??[]).join(`
4
4
  `),terminal:(e.terminal??[]).join(`
@@ -10,14 +10,14 @@
10
10
  <link rel="apple-touch-icon" href="/apple-touch-icon.png">
11
11
  <link rel="manifest" href="/manifest.webmanifest">
12
12
  <title>Even Keel</title>
13
- <script type="module" crossorigin src="/assets/index-rS5P6s6Q.js"></script>
13
+ <script type="module" crossorigin src="/assets/index-AeOeU4Dr.js"></script>
14
14
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-XKyaHtl9.js">
15
- <link rel="modulepreload" crossorigin href="/assets/Loader-DMdHADtQ.js">
16
- <link rel="modulepreload" crossorigin href="/assets/useModels-Cmsw5PbQ.js">
17
- <link rel="modulepreload" crossorigin href="/assets/feedLine-Dl8ZRAah.js">
15
+ <link rel="modulepreload" crossorigin href="/assets/Loader-CG5xzofh.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/useModels-DfXVnluv.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/feedLine-CDr3S8u-.js">
18
18
  <link rel="stylesheet" crossorigin href="/assets/Loader-DJJTBsaF.css">
19
19
  <link rel="stylesheet" crossorigin href="/assets/useModels-1oIk0mDX.css">
20
- <link rel="stylesheet" crossorigin href="/assets/index-BJWUSCS1.css">
20
+ <link rel="stylesheet" crossorigin href="/assets/index-DMDSaLu7.css">
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "even-keel",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Runs Claude Code sessions over a tracker's tasks one after another, in the order of their blocks relations",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,4 +1,5 @@
1
1
  using System;
2
+ using System.Collections.Generic;
2
3
  using System.Diagnostics;
3
4
  using System.IO;
4
5
  using System.ServiceProcess;
@@ -208,6 +209,7 @@ public sealed class EvenKeelService : ServiceBase
208
209
  StandardOutputEncoding = Encoding.UTF8,
209
210
  StandardErrorEncoding = Encoding.UTF8,
210
211
  };
212
+ info.EnvironmentVariables["PATH"] = FreshPath();
211
213
  if (data != null) info.EnvironmentVariables["EVEN_KEEL_DATA"] = data;
212
214
  if (launcher != null) info.EnvironmentVariables["EVEN_KEEL_LAUNCHER"] = launcher;
213
215
  try
@@ -248,6 +250,44 @@ public sealed class EvenKeelService : ServiceBase
248
250
  }
249
251
  }
250
252
 
253
+ // The host's own environment is frozen at its start, so git or a CLI installed since would stay unseen even after a
254
+ // Restart (EKR-57). The registry's machine and user PATH are read anew, as Explorer builds it; the inherited entries the
255
+ // registry lacks (fnm, nvm, Volta, a terminal profile's additions) stay at the end, or node and the CLIs could vanish.
256
+ string FreshPath()
257
+ {
258
+ string inherited = Environment.GetEnvironmentVariable("PATH") ?? "";
259
+ try
260
+ {
261
+ return MergePath(
262
+ Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.Machine),
263
+ Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.User),
264
+ inherited);
265
+ }
266
+ catch (Exception error)
267
+ {
268
+ Log(who + ": could not read PATH from the registry, node keeps the host's own: " + error.Message);
269
+ return inherited;
270
+ }
271
+ }
272
+
273
+ // Joins PATH lists in order, dropping empty entries and repeats; entries compare case-insensitively without a trailing '\'.
274
+ internal static string MergePath(params string[] parts)
275
+ {
276
+ var seen = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
277
+ var entries = new List<string>();
278
+ foreach (string part in parts)
279
+ {
280
+ if (part == null) continue;
281
+ foreach (string raw in part.Split(';'))
282
+ {
283
+ string entry = raw.Trim();
284
+ if (entry.Length == 0) continue;
285
+ if (seen.Add(entry.TrimEnd('\\'))) entries.Add(entry);
286
+ }
287
+ }
288
+ return string.Join(";", entries);
289
+ }
290
+
251
291
  internal void Log(string line)
252
292
  {
253
293
  lock (logGate)