@deslop/workbench 0.0.320 → 0.0.327

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.
Files changed (27) hide show
  1. package/dist/client/assets/agent-CRsoHYEG.js +1 -0
  2. package/dist/client/assets/{agent-DAD7EQOa.js → agent-DYjX-Pzl.js} +2 -2
  3. package/dist/client/assets/{diff-HFsBcdrM.js → diff-C_X2wnRm.js} +2 -2
  4. package/dist/client/assets/{diff-BbjpVkn4.js → diff-hUFci-J4.js} +26 -26
  5. package/dist/client/assets/index-BX6N5TyF.css +2 -0
  6. package/dist/client/assets/{index-Ds4rq0zQ.js → index-DpbZkluz.js} +1 -1
  7. package/dist/client/assets/input-group-CAejCCyD.js +153 -0
  8. package/dist/client/assets/{portless-DFKFPX3Z.js → portless-D4NDzBYJ.js} +1 -1
  9. package/dist/client/assets/{portless-DexDlqwA.js → portless-D73tczCx.js} +2 -2
  10. package/dist/client/assets/{route-DOWKJR6H.js → route-0gFXuUyt.js} +2 -2
  11. package/dist/client/assets/{route-CUHeGENe.js → route-BcNQ-aN-.js} +1 -1
  12. package/dist/client/assets/{run-BvHiSlty.js → run-B5fcXFyP.js} +2 -2
  13. package/dist/client/assets/run-BzrHh2aK.js +1 -0
  14. package/dist/client/assets/state-C-LyNCwu.js +2 -0
  15. package/dist/client/assets/{terminal-t4CeG_V9.js → terminal-B3oT0xJm.js} +2 -2
  16. package/dist/client/assets/terminal-DgodR87i.js +145 -0
  17. package/dist/client/assets/terminal-EfiQ0Ote.js +1 -0
  18. package/dist/client/index.html +8 -8
  19. package/dist/server.js +1287 -354
  20. package/package.json +2 -2
  21. package/dist/client/assets/agent-DHWhwvQy.js +0 -1
  22. package/dist/client/assets/index-Ci3BZgXN.css +0 -2
  23. package/dist/client/assets/input-group-BtEJur4W.js +0 -153
  24. package/dist/client/assets/run-L2YCL4H0.js +0 -1
  25. package/dist/client/assets/state-T-ZhKyUm.js +0 -2
  26. package/dist/client/assets/terminal-CGe8qF7_.js +0 -1
  27. package/dist/client/assets/terminal-Ci9YBovb.js +0 -119
@@ -1 +1 @@
1
- import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,r as n,t as r}from"./compiler-runtime-rGeCHUuX.js";import{D as i,Et as a,T as o,Vs as s,Xo as c,hr as l,t as u}from"./button-fe_R2wzr.js";import{a as d,n as f,r as p}from"./fallbacks-DZ7ciusO.js";import{t as m}from"./triangle-alert-CGj-8H_a.js";import{i as h,n as g,r as _,t as v,y}from"./resizable-B1fIW9sm.js";import{t as b}from"./external-link-CTjuCORn.js";import{g as x,r as S,t as C}from"./state-T-ZhKyUm.js";import{t as w}from"./portless-DexDlqwA.js";var T=c(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),E=c(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),D=c(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),O=c(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),k=c(`file-clock`,[[`path`,{d:`M16 22h2a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v2.85`,key:`ryk6xj`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 14v2.2l1.6 1`,key:`6m4bie`}],[`circle`,{cx:`8`,cy:`16`,r:`6`,key:`10v15b`}]]),A=c(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),j=c(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),M=r(),N=e(n(),1),P=t();function F(e,t){return`${e}${t.startsWith(`/`)?t:`/${t}`}`}function I(e){if(e===``)return`localhost:0000`;try{return new URL(e).host}catch{return e.replace(/^https?:\/\//u,``)}}function L(e){return e===`error`?`text-destructive`:e===`warn`?`text-chart-2`:e===`info`?`text-chart-1`:e===`debug`?`text-chart-4`:`text-muted-foreground`}function R(e){let t=(0,M.c)(5);if(e.level===`error`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(T,{className:`size-3.5`}),t[0]=e):e=t[0],e}if(e.level===`warn`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(m,{className:`size-3.5`}),t[1]=e):e=t[1],e}if(e.level===`info`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(d,{className:`size-3.5`}),t[2]=e):e=t[2],e}if(e.level===`debug`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(O,{className:`size-3.5`}),t[3]=e):e=t[3],e}let n;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,P.jsx)(y,{className:`size-2`}),t[4]=n):n=t[4],n}function z(e){let t=e.toLowerCase();return e.startsWith(`[vite]`)||t.includes(`react scan`)||t.includes(`react-scan`)||t.includes(`react grab`)||t.includes(`react-grab`)}function B(e){let t=(0,N.useRef)(null),n=(0,N.useRef)(0),r=e.origin??``,[s,c]=(0,N.useState)(()=>r?F(r,`/`):``),[d,m]=(0,N.useState)(0),[y,x]=(0,N.useState)(`/`),[S,C]=(0,N.useState)(),[w,T]=(0,N.useState)(!1),[O,M]=(0,N.useState)(()=>r!==``),[B,V]=(0,N.useState)([]);(0,N.useEffect)(()=>{c(r?F(r,y):``),C(void 0),M(r!==``)},[r]),(0,N.useLayoutEffect)(()=>{T(!1);function e(e){if(e.origin===r&&!(typeof e.data!=`object`||e.data===null)){if(e.data.__deslopBrowserFavicon===!0){C(typeof e.data.href==`string`?e.data.href:void 0);return}if(e.data.__deslopBrowserLocation===!0){x(typeof e.data.path==`string`?e.data.path:`/`);return}e.data.__deslopBrowserLog===!0&&(typeof e.data.level!=`string`||typeof e.data.message!=`string`||J(e.data.level,e.data.message))}}return window.addEventListener(`message`,e),T(!0),()=>{window.removeEventListener(`message`,e),T(!1)}},[r]);function H(){if(!r)return;let e=F(r,l(y)||`/`);V([]),c(e),C(void 0),M(!0)}function U(){V([]),M(!0),m(e=>e+1)}function W(){r&&(V([]),t.current?.contentWindow?.postMessage({__deslopBrowserClear:!0},r))}function G(){s&&window.open(s,`_blank`,`noopener,noreferrer`)}function K(){try{t.current?.contentWindow?.history.back()}catch{}}function q(){try{t.current?.contentWindow?.history.forward()}catch{}}function J(e,t){z(t)||V(r=>[...r.slice(-199),{id:n.current++,level:e,message:t,time:a()}])}return(0,P.jsxs)(`div`,{className:o(`bg-background flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden border`,e.className),children:[(0,P.jsxs)(`form`,{className:`bg-muted/30 flex shrink-0 items-center gap-1 border-b p-2`,onSubmit:e=>{e.preventDefault(),H()},children:[(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Back`,onClick:K,children:(0,P.jsx)(E,{className:`size-3.5`})}),(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Forward`,onClick:q,children:(0,P.jsx)(D,{className:`size-3.5`})}),(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Reload`,onClick:U,children:(0,P.jsx)(A,{className:`size-3.5`})}),(0,P.jsx)(`div`,{className:`border-border flex h-8 w-8 shrink-0 items-center justify-center border`,children:S&&(0,P.jsx)(`img`,{src:S,alt:``,className:`size-4`})}),(0,P.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1`,children:[(0,P.jsx)(`div`,{className:`border-input bg-secondary text-secondary-foreground/70 flex h-8 min-w-0 shrink items-center border px-2 text-xs`,children:(0,P.jsx)(`span`,{className:`min-w-0 overflow-hidden text-ellipsis whitespace-nowrap`,children:I(r)})}),(0,P.jsx)(h,{value:y.startsWith(`/`)?y.slice(1):y,placeholder:``,className:`min-w-[7rem] flex-1 text-xs`,onChange:e=>{x(`/${e.currentTarget.value.replace(/^\/+/,``)}`)}})]}),(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Open top-level preview`,onClick:G,children:(0,P.jsx)(b,{className:`size-3.5`})}),r&&(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Clear cookies`,onClick:W,children:(0,P.jsx)(j,{className:`size-3.5`})})]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[r===``?(0,P.jsx)(f,{message:`Start a dev server in this worktree terminal to open a browser preview.`}):(0,P.jsxs)(_,{orientation:`vertical`,className:`min-h-0 flex-1`,children:[(0,P.jsx)(g,{defaultSize:`100%`,minSize:`40%`,children:(0,P.jsxs)(`div`,{className:`relative h-full min-h-0 w-full`,children:[(0,P.jsx)(`iframe`,{ref:t,title:s,src:w?s:void 0,className:`bg-background h-full min-h-0 w-full border-0`,onLoad:()=>{M(!1)}},d),O&&(0,P.jsx)(`div`,{className:`bg-background absolute inset-0 flex`,children:(0,P.jsx)(p,{})})]})}),(0,P.jsx)(v,{}),(0,P.jsx)(g,{collapsible:!0,collapsedSize:0,defaultSize:0,minSize:0,maxSize:`50%`,children:(0,P.jsx)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:(0,P.jsx)(`div`,{className:o(`min-h-0 flex-1 overflow-auto font-mono text-xs`,B.length===0&&`hidden`),children:B.map(e=>(0,P.jsxs)(`div`,{className:`grid grid-cols-[8rem_1rem_minmax(0,1fr)] gap-3 px-2 py-1`,children:[(0,P.jsx)(`span`,{className:`overflow-hidden whitespace-nowrap select-none`,children:i(e.time)}),(0,P.jsx)(`span`,{className:o(`flex shrink-0 items-center select-none`,L(e.level)),title:e.level,children:(0,P.jsx)(R,{level:e.level})}),(0,P.jsx)(`span`,{className:`min-w-0 break-words whitespace-pre-wrap select-text`,children:e.message})]},e.id))})})})]}),(0,P.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center justify-between border-b px-2`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-xs`,children:[(0,P.jsx)(k,{className:`size-3.5`}),(0,P.jsx)(`span`,{children:B.length})]}),(0,P.jsx)(u,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":`Clear browser logs`,onClick:()=>{V([])},children:(0,P.jsx)(j,{className:`size-3.5`})})]})]})]})}function V(){let e=(0,M.c)(10),t=w.useParams(),n=w.useSearch(),r;e[0]===t.worktree?r=e[1]:(r=C(t.worktree),e[0]=t.worktree,e[1]=r);let i=x(r),a=i.value.activeWorktree?.root??``,o;e[2]===a?o=e[3]:(o=S(a),e[2]=a,e[3]=o);let c=x(o);if(!i.value.activeWorktree){let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,P.jsx)(s,{to:`/`,replace:!0}),e[4]=t):t=e[4],t}let l;e[5]!==c||e[6]!==n.origin?(l=n.origin&&c.value.includes(n.origin)?n.origin:c.value[0],e[5]=c,e[6]=n.origin,e[7]=l):l=e[7];let u=l,d;return e[8]===u?d=e[9]:(d=(0,P.jsx)(`div`,{className:`bg-background h-full min-h-0 min-w-0 p-2`,children:(0,P.jsx)(B,{className:`h-full min-h-0 w-full min-w-0`,origin:u})}),e[8]=u,e[9]=d),d}export{V as component};
1
+ import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,r as n,t as r}from"./compiler-runtime-rGeCHUuX.js";import{D as i,Et as a,T as o,Vs as s,Xo as c,hr as l,t as u}from"./button-fe_R2wzr.js";import{a as d,n as f,r as p}from"./fallbacks-DZ7ciusO.js";import{t as m}from"./triangle-alert-CGj-8H_a.js";import{i as h,n as g,r as _,t as v,y}from"./resizable-B1fIW9sm.js";import{t as b}from"./external-link-CTjuCORn.js";import{g as x,r as S,t as C}from"./state-C-LyNCwu.js";import{t as w}from"./portless-D73tczCx.js";var T=c(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),E=c(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),D=c(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),O=c(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),k=c(`file-clock`,[[`path`,{d:`M16 22h2a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v2.85`,key:`ryk6xj`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 14v2.2l1.6 1`,key:`6m4bie`}],[`circle`,{cx:`8`,cy:`16`,r:`6`,key:`10v15b`}]]),A=c(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),j=c(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),M=r(),N=e(n(),1),P=t();function F(e,t){return`${e}${t.startsWith(`/`)?t:`/${t}`}`}function I(e){if(e===``)return`localhost:0000`;try{return new URL(e).host}catch{return e.replace(/^https?:\/\//u,``)}}function L(e){return e===`error`?`text-destructive`:e===`warn`?`text-chart-2`:e===`info`?`text-chart-1`:e===`debug`?`text-chart-4`:`text-muted-foreground`}function R(e){let t=(0,M.c)(5);if(e.level===`error`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(T,{className:`size-3.5`}),t[0]=e):e=t[0],e}if(e.level===`warn`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(m,{className:`size-3.5`}),t[1]=e):e=t[1],e}if(e.level===`info`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(d,{className:`size-3.5`}),t[2]=e):e=t[2],e}if(e.level===`debug`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,P.jsx)(O,{className:`size-3.5`}),t[3]=e):e=t[3],e}let n;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,P.jsx)(y,{className:`size-2`}),t[4]=n):n=t[4],n}function z(e){let t=e.toLowerCase();return e.startsWith(`[vite]`)||t.includes(`react scan`)||t.includes(`react-scan`)||t.includes(`react grab`)||t.includes(`react-grab`)}function B(e){let t=(0,N.useRef)(null),n=(0,N.useRef)(0),r=e.origin??``,[s,c]=(0,N.useState)(()=>r?F(r,`/`):``),[d,m]=(0,N.useState)(0),[y,x]=(0,N.useState)(`/`),[S,C]=(0,N.useState)(),[w,T]=(0,N.useState)(!1),[O,M]=(0,N.useState)(()=>r!==``),[B,V]=(0,N.useState)([]);(0,N.useEffect)(()=>{c(r?F(r,y):``),C(void 0),M(r!==``)},[r]),(0,N.useLayoutEffect)(()=>{T(!1);function e(e){if(e.origin===r&&!(typeof e.data!=`object`||e.data===null)){if(e.data.__deslopBrowserFavicon===!0){C(typeof e.data.href==`string`?e.data.href:void 0);return}if(e.data.__deslopBrowserLocation===!0){x(typeof e.data.path==`string`?e.data.path:`/`);return}e.data.__deslopBrowserLog===!0&&(typeof e.data.level!=`string`||typeof e.data.message!=`string`||J(e.data.level,e.data.message))}}return window.addEventListener(`message`,e),T(!0),()=>{window.removeEventListener(`message`,e),T(!1)}},[r]);function H(){if(!r)return;let e=F(r,l(y)||`/`);V([]),c(e),C(void 0),M(!0)}function U(){V([]),M(!0),m(e=>e+1)}function W(){r&&(V([]),t.current?.contentWindow?.postMessage({__deslopBrowserClear:!0},r))}function G(){s&&window.open(s,`_blank`,`noopener,noreferrer`)}function K(){try{t.current?.contentWindow?.history.back()}catch{}}function q(){try{t.current?.contentWindow?.history.forward()}catch{}}function J(e,t){z(t)||V(r=>[...r.slice(-199),{id:n.current++,level:e,message:t,time:a()}])}return(0,P.jsxs)(`div`,{className:o(`bg-background flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden border`,e.className),children:[(0,P.jsxs)(`form`,{className:`bg-muted/30 flex shrink-0 items-center gap-1 border-b p-2`,onSubmit:e=>{e.preventDefault(),H()},children:[(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Back`,onClick:K,children:(0,P.jsx)(E,{className:`size-3.5`})}),(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Forward`,onClick:q,children:(0,P.jsx)(D,{className:`size-3.5`})}),(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Reload`,onClick:U,children:(0,P.jsx)(A,{className:`size-3.5`})}),(0,P.jsx)(`div`,{className:`border-border flex h-8 w-8 shrink-0 items-center justify-center border`,children:S&&(0,P.jsx)(`img`,{src:S,alt:``,className:`size-4`})}),(0,P.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1`,children:[(0,P.jsx)(`div`,{className:`border-input bg-secondary text-secondary-foreground/70 flex h-8 min-w-0 shrink items-center border px-2 text-xs`,children:(0,P.jsx)(`span`,{className:`min-w-0 overflow-hidden text-ellipsis whitespace-nowrap`,children:I(r)})}),(0,P.jsx)(h,{value:y.startsWith(`/`)?y.slice(1):y,placeholder:``,className:`min-w-[7rem] flex-1 text-xs`,onChange:e=>{x(`/${e.currentTarget.value.replace(/^\/+/,``)}`)}})]}),(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Open top-level preview`,onClick:G,children:(0,P.jsx)(b,{className:`size-3.5`})}),r&&(0,P.jsx)(u,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Clear cookies`,onClick:W,children:(0,P.jsx)(j,{className:`size-3.5`})})]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[r===``?(0,P.jsx)(f,{message:`Start a dev server in this worktree terminal to open a browser preview.`}):(0,P.jsxs)(_,{orientation:`vertical`,className:`min-h-0 flex-1`,children:[(0,P.jsx)(g,{defaultSize:`100%`,minSize:`40%`,children:(0,P.jsxs)(`div`,{className:`relative h-full min-h-0 w-full`,children:[(0,P.jsx)(`iframe`,{ref:t,title:s,src:w?s:void 0,className:`bg-background h-full min-h-0 w-full border-0`,onLoad:()=>{M(!1)}},d),O&&(0,P.jsx)(`div`,{className:`bg-background absolute inset-0 flex`,children:(0,P.jsx)(p,{})})]})}),(0,P.jsx)(v,{}),(0,P.jsx)(g,{collapsible:!0,collapsedSize:0,defaultSize:0,minSize:0,maxSize:`50%`,children:(0,P.jsx)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:(0,P.jsx)(`div`,{className:o(`min-h-0 flex-1 overflow-auto font-mono text-xs`,B.length===0&&`hidden`),children:B.map(e=>(0,P.jsxs)(`div`,{className:`grid grid-cols-[8rem_1rem_minmax(0,1fr)] gap-3 px-2 py-1`,children:[(0,P.jsx)(`span`,{className:`overflow-hidden whitespace-nowrap select-none`,children:i(e.time)}),(0,P.jsx)(`span`,{className:o(`flex shrink-0 items-center select-none`,L(e.level)),title:e.level,children:(0,P.jsx)(R,{level:e.level})}),(0,P.jsx)(`span`,{className:`min-w-0 break-words whitespace-pre-wrap select-text`,children:e.message})]},e.id))})})})]}),(0,P.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center justify-between border-b px-2`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-2 font-mono text-xs`,children:[(0,P.jsx)(k,{className:`size-3.5`}),(0,P.jsx)(`span`,{children:B.length})]}),(0,P.jsx)(u,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":`Clear browser logs`,onClick:()=>{V([])},children:(0,P.jsx)(j,{className:`size-3.5`})})]})]})]})}function V(){let e=(0,M.c)(10),t=w.useParams(),n=w.useSearch(),r;e[0]===t.worktree?r=e[1]:(r=C(t.worktree),e[0]=t.worktree,e[1]=r);let i=x(r),a=i.value.activeWorktree?.root??``,o;e[2]===a?o=e[3]:(o=S(a),e[2]=a,e[3]=o);let c=x(o);if(!i.value.activeWorktree){let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,P.jsx)(s,{to:`/`,replace:!0}),e[4]=t):t=e[4],t}let l;e[5]!==c||e[6]!==n.origin?(l=n.origin&&c.value.includes(n.origin)?n.origin:c.value[0],e[5]=c,e[6]=n.origin,e[7]=l):l=e[7];let u=l,d;return e[8]===u?d=e[9]:(d=(0,P.jsx)(`div`,{className:`bg-background h-full min-h-0 min-w-0 p-2`,children:(0,P.jsx)(B,{className:`h-full min-h-0 w-full min-w-0`,origin:u})}),e[8]=u,e[9]=d),d}export{V as component};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/portless-DFKFPX3Z.js","assets/chunk-QTnfLwEv.js","assets/state-T-ZhKyUm.js","assets/button-fe_R2wzr.js","assets/compiler-runtime-rGeCHUuX.js","assets/resizable-B1fIW9sm.js","assets/external-link-CTjuCORn.js","assets/fallbacks-DZ7ciusO.js","assets/triangle-alert-CGj-8H_a.js"])))=>i.map(i=>d[i]);
2
- import{$o as e,J as t,Qo as n,Y as r,ft as i,gt as a}from"./button-fe_R2wzr.js";import{t as o}from"./preload-helper-CjdClQve.js";var s=e(`/(home)/$worktree/portless`)({component:n(()=>o(()=>import(`./portless-DFKFPX3Z.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),`component`),validateSearch:a(r({origin:i(t)}))});export{s as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/portless-D4NDzBYJ.js","assets/chunk-QTnfLwEv.js","assets/state-C-LyNCwu.js","assets/button-fe_R2wzr.js","assets/compiler-runtime-rGeCHUuX.js","assets/resizable-B1fIW9sm.js","assets/external-link-CTjuCORn.js","assets/fallbacks-DZ7ciusO.js","assets/triangle-alert-CGj-8H_a.js"])))=>i.map(i=>d[i]);
2
+ import{$o as e,J as t,Qo as n,Y as r,ft as i,gt as a}from"./button-fe_R2wzr.js";import{t as o}from"./preload-helper-CjdClQve.js";var s=e(`/(home)/$worktree/portless`)({component:n(()=>o(()=>import(`./portless-D4NDzBYJ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),`component`),validateSearch:a(r({origin:i(t)}))});export{s as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-CUHeGENe.js","assets/chunk-QTnfLwEv.js","assets/state-T-ZhKyUm.js","assets/button-fe_R2wzr.js","assets/compiler-runtime-rGeCHUuX.js","assets/input-group-BtEJur4W.js","assets/preload-helper-CjdClQve.js","assets/resizable-B1fIW9sm.js","assets/loader-circle-B1mHTP2Y.js"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,r as n}from"./compiler-runtime-rGeCHUuX.js";import{$o as r,As as i,Bs as a,Cs as o,Ds as s,Es as c,Fs as l,Hs as u,Is as d,Ls as f,Ns as p,Os as m,Ps as h,Qo as g,Rs as _,Ss as v,Ts as y,Ws as b,Y as x,_s as S,bs as C,ds as w,fs as T,gs as E,gt as ee,hs as te,is as D,js as ne,ks as O,ls as re,ms as ie,ns as ae,ps as oe,ss as k,us as A,vs as se,ws as ce,xs as le,ys as ue,zs as j}from"./button-fe_R2wzr.js";import{t as de}from"./preload-helper-CjdClQve.js";function fe(e){let t=e;return{get(){return t},set(e){t=p(e,t)}}}function pe(e){return{get(){return e()}}}function me(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>M(o,_.get())),x=r(()=>M(s,v.get())),S=r(()=>M(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),ee=ce(64);function te(e){let t=ee.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),ee.set(e,t)),t}let D={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:te,setMatches:ne,setPending:O,setCached:re};ne(e.matches),a?.(D);function ne(e){N(e,o,_,n,i)}function O(e){N(e,s,v,n,i)}function re(e){N(e,c,y,n,i)}return D}function M(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function N(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}s(n.get(),a)||n.set(a)})}function he(){try{return sessionStorage}catch{return}}var ge=`tsr-scroll-restoration-v1_3`,_e=he();function ve(){try{return JSON.parse(_e?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function ye(){try{_e?.setItem(ge,JSON.stringify(P))}catch{}}var P=ve(),be=`data-scroll-restoration-id`,xe=e=>e.state.__TSR_key||e.href;function Se(e){let t=e.getAttribute(be);if(t)return`[${be}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var F=!1,I=`window`;function L(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Ce(e){let t=[];for(let n of e){if(n===I)continue;let e=L(n);e&&t.push(e)}return t}function we(e,t){if((t??e.options.scrollRestoration)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,F=!1;let n=e.options.getScrollRestorationKey||xe,r=new Map,i=(e,t,n)=>{let i=r.get(e)||{};i.scrollX=t,i.scrollY=n,r.set(e,i)};history.scrollRestoration=`manual`;let a=t=>{if(!(F||!e.isScrollRestoring))if(t.target===document)i(I,scrollX,scrollY);else{let e=t.target;i(e,e.scrollLeft,e.scrollTop)}},o=t=>{if(!e.isScrollRestoring)return;let n=P[t]||={};for(let[e,t]of r)e===I?n[I]=t:e.isConnected&&(n[Se(e)]=t)};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(n(e.fromLocation)),r.clear()}),addEventListener(`pagehide`,()=>{o(n(e.stores.resolvedLocation.get()??e.stores.location.get())),ye()}),e.subscribe(`onRendered`,t=>{let i=e.options.scrollRestorationBehavior,a=e.options.scrollToTopSelectors,o=e.resetNextScroll,s;if(r.clear(),o||(e.resetNextScroll=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let c=n(t.toLocation),l=t.fromLocation&&n(t.fromLocation);if(e.isScrollRestoring&&l&&l!==c){let e=P[l];if(e){let t=P[c];for(let n in e){if(n===I){if(o)continue}else{let e=L(n);if(!e||o&&a&&(s??=Ce(a),s.includes(e)))continue}t||=P[c]={},t[n]??=e[n]}}}F=!0;try{let n=t.toLocation.hash,r=t.toLocation.state.__hashScrollIntoViewOptions??!0,l=!1;if(o){let o=rt.get(t.toLocation),u=n&&r&&(o===`PUSH`||o===`REPLACE`),d=e.isScrollRestoring?P[c]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:n}=d[e];if(e===I){if(u)continue;scrollTo({top:n,left:t,behavior:i}),l=!0}else{let r=L(e);r&&(r.scrollLeft=t,r.scrollTop=n)}}if(!l&&!n){let e={top:0,left:0,behavior:i};if(scrollTo(e),a){s??=Ce(a);for(let t of s)t.scrollTo(e)}}}!l&&n&&r&&document.getElementById(n)?.scrollIntoView(r)}finally{F=!1}})}function Te(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function R(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ee(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=R(r):Array.isArray(t)?t.push(R(r)):n[e]=[t,R(r)]}return n}var De=ke(JSON.parse),Oe=Ae(JSON.stringify,JSON.parse);function ke(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Ee(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Ae(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Te(e,r);return t?`?${t}`:``}}var z=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},je=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),B=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),V=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Me=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},H=(e,t,n)=>{if(!(!k(n)&&!A(n)))throw k(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:k(n)?`redirected`:A(n)?`notFound`:r.status===`pending`?`success`:r.status,context:V(e,t.index),isFetching:!1,error:n})),A(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),k(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Ne=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Pe=(e,t,n)=>{let r=V(e,n);e.updateMatch(t,e=>({...e,context:r}))},U=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,H(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,H(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!k(n)&&!A(n)&&(e.serialError??=n)},Fe=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!B(e,t)&&(n.options.loader||n.options.beforeLoad||Ge(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{z(e)},i);r._nonReactive.pendingTimeout=t}},Ie=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Fe(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&H(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Le=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=m(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&U(e,n,o),s&&U(e,n,s),Fe(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},f=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),f()});return}i._nonReactive.beforeLoadPromise=m();let p={...V(e,n,!1),...i.__routeContext},{search:h,params:g,cause:_}=i,v=B(e,t),y={search:h,abortController:c,params:g,preload:v,context:p,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{u(),f()});return}(k(r)||A(r))&&(u(),U(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),f()})},x;try{if(x=r.options.beforeLoad(y),d(x))return u(),x.catch(t=>{U(e,n,t)}).then(b)}catch(t){u(),U(e,n,t)}b(x)},Re=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Le(e,n,t,i),s=()=>{if(Ne(e,n))return;let t=Ie(e,n,i);return d(t)?t.then(o):o()};return a()},ze=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Be=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=V(e,r),d=B(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Ve=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{W(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Be(e,t,n,r,i)),l=!!s&&d(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;H(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:V(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:V(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,A(t)&&await i.options.notFoundComponent?.preload?.(),H(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,H(e,e.router.getMatch(n),t)}!k(o)&&!A(o)&&await W(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:V(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),H(e,r,t)}},He=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(Be(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Ve(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){k(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Ve(e,t,i,n,d):Pe(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Ne(e,i)){if(!e.router.getMatch(i))return e.matches[n];Pe(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=B(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&H(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=m(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function Ue(e){let t=e,n=[];je(t.router)&&z(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Re(t,e);d(n)&&await n}catch(e){if(k(e))throw e;if(A(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?Me(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(He(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(k(e))throw e;A(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=Me(t,l);e===void 0&&y();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await W(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await W(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=ze(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let f=z(t);if(d(f)&&await f,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function We(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function W(e,t=G){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===G?(()=>{if(e._componentsPromise===void 0){let t=We(e,G);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():We(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ge(e){for(let t of G)if(e.options[t]?.preload)return!0;return!1}var G=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Ke(e){return{input:({url:t})=>{for(let n of e)t=Je(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ye(e[n],t);return t}}}function qe(e){let t=E(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=ie([`/`,t,e.pathname]),e)}}function Je(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Ye(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}var K=`__TSR_index`,Xe=`popstate`,Ze=`beforeunload`;function Qe(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=q(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[K];i=$e(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[K];i=$e(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[K]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function $e(e,t){t||={};let n=nt();return{...t,key:n,__TSR_key:n,[K]:e}}function et(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>q(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=nt();t.history.replaceState({[K]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=q(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[K]-l.state[K],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Qe({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ze,S,{capture:!0}),t.removeEventListener(Xe,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Ze,S,{capture:!0}),t.addEventListener(Xe,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function tt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function q(e,t){let n=tt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=nt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[K]:0,key:a,__TSR_key:a}}}function nt(){return(Math.random()+1).toString(36).substring(7)}function J(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var rt=new WeakMap,it=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=T(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=et()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ce(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=me(ot(this.latestLocation),e),we(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=E(o);t&&t!==`/`&&e.push(qe({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Ke(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=o(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&v(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:O(e).path,external:!1,searchStr:o,search:_(t?.search,i),hash:O(r.slice(1)).path,state:j(t?.state,a)}}let o=new URL(i,this.origin),s=Je(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:O(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:_(t?.search,c),hash:O(s.hash.slice(1)).path,state:j(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>te({base:e,to:t.includes(`//`)?w(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>st({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,p(t.params,s)),d=this.routesByPath[S(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&h(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let m=e.leaveParams?l:O(oe({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,g=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,X(t.options.validateSearch,{...e,...g}))}catch{}}),g=e}g=ct({search:g,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),g=_(o,g);let v=this.options.stringifySearch(g),y=t.hash===!0?n.hash:t.hash?p(t.hash,n.hash):void 0,b=y?`#${y}`:``,x=t.state===!0?n.state:t.state?p(t.state,n.state):{};x=j(n.state,x);let C=`${m}${v}${b}`,w,T,E=!1;if(this.rewrite){let e=new URL(C,this.origin),t=Ye(this.rewrite,e);w=e.href.replace(e.origin,``),t.origin===this.origin?T=t.pathname+t.search+t.hash:(T=t.href,E=!0)}else w=ne(C),T=w;return{publicHref:T,href:w,pathname:m,search:g,searchStr:v,state:x,hash:y??``,external:E,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=ue(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,p(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,a=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=i(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},o=S(this.latestLocation.href)===S(n.href),s=this.commitLocationPromise;if(this.commitLocationPromise=m(()=>{s?.resolve(),s=void 0}),o&&a())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=q(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Je(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(l(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?rt.set(this.latestLocation,t):rt.delete(this.latestLocation);let n=this.latestLocation,r=J(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Ue({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){k(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):A(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(J(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&l(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=W,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await Ue({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(k(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});A(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let a=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=le(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!i(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?i(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Oe,parseSearch:e.parseSearch??De,protocolAllowlist:e.protocolAllowlist??c}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=se(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:S(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?ut(this.options.notFoundMode,a):void 0,c=Array(a.length),l=new Map;for(let e of this.stores.matchStores.values())e.routeId&&l.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],u,d,f;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=X(r.options.validateSearch,{...n})??void 0;u={...n,...e},d={...i,...e},f=void 0}catch(e){let r=e;if(e instanceof Y||(r=new Y(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},f=r}}let p=r.options.loaderDeps?.({search:u})??``,h=p?JSON.stringify(p):``,{interpolatedPath:g,usedParams:v}=oe({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),y=r.id+g+h,b=this.getMatch(y),x=l.get(r.id),S=b?._strictParams??v,C;if(!b)try{dt(r,S)}catch(e){if(C=A(e)||k(e)?e:new at(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,S);let w=x?`stay`:`enter`,T;if(b)T={...b,cause:w,params:x?.params??i,_strictParams:S,search:_(x?x.search:b.search,u),_strictSearch:d};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ge(r)?`pending`:`success`;T={id:y,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:S,pathname:g,updatedAt:Date.now(),search:x?_(x.search,u):u,_strictSearch:d,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:m()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:x?j(x.loaderDeps,p):p,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(T.globalNotFound=s===r.id),T.searchError=f;let E=this.getParentContext(o);T.context={...E,...T.__routeContext,...T.__beforeLoadContext},c[n]=T}for(let t=0;t<c.length;t++){let n=c[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=l.get(n.routeId);if(n.params=o?_(o.params,i):i,!a){let i=c[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=f(t),i={...e.search};for(let e of t)try{Object.assign(i,X(e.options.validateSearch,i))}catch{}let a=f(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{dt(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},Y=class extends Error{},at=class extends Error{};function ot(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function X(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Y(`Async validation not supported`);if(n.issues)throw new Y(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function st({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=S(e),a,o=C(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function ct({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return lt(n)(e,t,r??!1)}function lt(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...X(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:p(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function ut(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return re}function dt(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var Z=e(n(),1),Q=t();function ft(e){let t=e.errorComponent??mt;return(0,Q.jsx)(pt,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?Z.createElement(t,{error:n,reset:r}):e.children})}var pt=class extends Z.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function mt({error:e}){let[t,n]=Z.useState(!1);return(0,Q.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Q.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Q.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,Q.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,Q.jsx)(`code`,{children:e.message}):null})}):null]})}function ht(e){let t=u(),n=`not-found-${D(t.stores.location,e=>e.pathname)}-${D(t.stores.status,e=>e)}`;return(0,Q.jsx)(ft,{getResetKey:()=>n,onCatch:(t,n)=>{if(A(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(A(t))return e.fallback?.(t);throw t},children:e.children})}function gt(){return(0,Q.jsx)(`p`,{children:`Not Found`})}function $(e){return(0,Q.jsx)(Q.Fragment,{children:e.children})}function _t(e,t,n){return t.options.notFoundComponent?(0,Q.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Q.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Q.jsx)(gt,{})}var vt=Z.memo(function({matchId:e}){let t=u(),n=t.stores.matchStores.get(e);n||y();let r=D(t.stores.loadedAt,e=>e),i=D(n,e=>e);return(0,Q.jsx)(yt,{router:t,matchId:e,resetKey:r,matchState:Z.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function yt({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,s=o?(0,Q.jsx)(o,{}):null,c=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr===`data-only`,f=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??o??(i.options.errorComponent?.preload||d))?Z.Suspense:$,p=c?ft:$,m=u?ht:$;return(0,Q.jsxs)(i.isRoot?i.options.shellComponent??$:$,{children:[(0,Q.jsx)(a.Provider,{value:t,children:(0,Q.jsx)(f,{fallback:s,children:(0,Q.jsx)(p,{getResetKey:()=>n,errorComponent:c||mt,onCatch:(e,t)=>{if(A(e))throw e.routeId??=r.routeId,e;l?.(e,t)},children:(0,Q.jsx)(m,{fallback:e=>{if(e.routeId??=r.routeId,!u||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return Z.createElement(u,e)},children:d||r._displayPending?(0,Q.jsx)(ae,{fallback:s,children:(0,Q.jsx)(xt,{matchId:t})}):(0,Q.jsx)(xt,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(bt,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function bt({resetKey:e}){let t=u(),n=Z.useRef(void 0);return b(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...J(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var xt=Z.memo(function({matchId:e}){let t=u(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||y();let i=D(r,e=>e),a=i.routeId,o=t.routesById[a],s=Z.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=Z.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,Q.jsx)(e,{},s):(0,Q.jsx)(St,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=m();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return A(i.error)||y(),_t(t,o,i.error);if(i.status===`redirected`)throw k(i.error)||y(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),St=Z.memo(function(){let e=u(),t=Z.useContext(a),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=D(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=D(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let o=n?e.routesById[n]:void 0,s=e.options.defaultPendingComponent?(0,Q.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return o||y(),_t(e,o,void 0);if(!i)return null;let c=(0,Q.jsx)(vt,{matchId:i});return n===`__root__`?(0,Q.jsx)(Z.Suspense,{fallback:s,children:c}):c}),Ct=r(`/(home)`)({component:g(()=>de(()=>import(`./route-CUHeGENe.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),`component`),validateSearch:ee(x({}))});export{ft as a,J as c,$ as i,fe as l,vt as n,mt as o,St as r,it as s,Ct as t,pe as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-BcNQ-aN-.js","assets/chunk-QTnfLwEv.js","assets/state-C-LyNCwu.js","assets/button-fe_R2wzr.js","assets/compiler-runtime-rGeCHUuX.js","assets/input-group-CAejCCyD.js","assets/preload-helper-CjdClQve.js","assets/resizable-B1fIW9sm.js","assets/loader-circle-B1mHTP2Y.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,r as n}from"./compiler-runtime-rGeCHUuX.js";import{$o as r,As as i,Bs as a,Cs as o,Ds as s,Es as c,Fs as l,Hs as u,Is as d,Ls as f,Ns as p,Os as m,Ps as h,Qo as g,Rs as _,Ss as v,Ts as y,Ws as b,Y as x,_s as S,bs as C,ds as w,fs as T,gs as E,gt as ee,hs as te,is as D,js as ne,ks as O,ls as re,ms as ie,ns as ae,ps as oe,ss as k,us as A,vs as se,ws as ce,xs as le,ys as ue,zs as j}from"./button-fe_R2wzr.js";import{t as de}from"./preload-helper-CjdClQve.js";function fe(e){let t=e;return{get(){return t},set(e){t=p(e,t)}}}function pe(e){return{get(){return e()}}}function me(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>M(o,_.get())),x=r(()=>M(s,v.get())),S=r(()=>M(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),ee=ce(64);function te(e){let t=ee.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),ee.set(e,t)),t}let D={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:te,setMatches:ne,setPending:O,setCached:re};ne(e.matches),a?.(D);function ne(e){N(e,o,_,n,i)}function O(e){N(e,s,v,n,i)}function re(e){N(e,c,y,n,i)}return D}function M(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function N(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}s(n.get(),a)||n.set(a)})}function he(){try{return sessionStorage}catch{return}}var ge=`tsr-scroll-restoration-v1_3`,_e=he();function ve(){try{return JSON.parse(_e?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function ye(){try{_e?.setItem(ge,JSON.stringify(P))}catch{}}var P=ve(),be=`data-scroll-restoration-id`,xe=e=>e.state.__TSR_key||e.href;function Se(e){let t=e.getAttribute(be);if(t)return`[${be}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var F=!1,I=`window`;function L(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Ce(e){let t=[];for(let n of e){if(n===I)continue;let e=L(n);e&&t.push(e)}return t}function we(e,t){if((t??e.options.scrollRestoration)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,F=!1;let n=e.options.getScrollRestorationKey||xe,r=new Map,i=(e,t,n)=>{let i=r.get(e)||{};i.scrollX=t,i.scrollY=n,r.set(e,i)};history.scrollRestoration=`manual`;let a=t=>{if(!(F||!e.isScrollRestoring))if(t.target===document)i(I,scrollX,scrollY);else{let e=t.target;i(e,e.scrollLeft,e.scrollTop)}},o=t=>{if(!e.isScrollRestoring)return;let n=P[t]||={};for(let[e,t]of r)e===I?n[I]=t:e.isConnected&&(n[Se(e)]=t)};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(n(e.fromLocation)),r.clear()}),addEventListener(`pagehide`,()=>{o(n(e.stores.resolvedLocation.get()??e.stores.location.get())),ye()}),e.subscribe(`onRendered`,t=>{let i=e.options.scrollRestorationBehavior,a=e.options.scrollToTopSelectors,o=e.resetNextScroll,s;if(r.clear(),o||(e.resetNextScroll=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let c=n(t.toLocation),l=t.fromLocation&&n(t.fromLocation);if(e.isScrollRestoring&&l&&l!==c){let e=P[l];if(e){let t=P[c];for(let n in e){if(n===I){if(o)continue}else{let e=L(n);if(!e||o&&a&&(s??=Ce(a),s.includes(e)))continue}t||=P[c]={},t[n]??=e[n]}}}F=!0;try{let n=t.toLocation.hash,r=t.toLocation.state.__hashScrollIntoViewOptions??!0,l=!1;if(o){let o=rt.get(t.toLocation),u=n&&r&&(o===`PUSH`||o===`REPLACE`),d=e.isScrollRestoring?P[c]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:n}=d[e];if(e===I){if(u)continue;scrollTo({top:n,left:t,behavior:i}),l=!0}else{let r=L(e);r&&(r.scrollLeft=t,r.scrollTop=n)}}if(!l&&!n){let e={top:0,left:0,behavior:i};if(scrollTo(e),a){s??=Ce(a);for(let t of s)t.scrollTo(e)}}}!l&&n&&r&&document.getElementById(n)?.scrollIntoView(r)}finally{F=!1}})}function Te(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function R(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ee(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=R(r):Array.isArray(t)?t.push(R(r)):n[e]=[t,R(r)]}return n}var De=ke(JSON.parse),Oe=Ae(JSON.stringify,JSON.parse);function ke(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Ee(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Ae(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Te(e,r);return t?`?${t}`:``}}var z=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},je=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),B=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),V=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Me=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},H=(e,t,n)=>{if(!(!k(n)&&!A(n)))throw k(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:k(n)?`redirected`:A(n)?`notFound`:r.status===`pending`?`success`:r.status,context:V(e,t.index),isFetching:!1,error:n})),A(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),k(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Ne=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Pe=(e,t,n)=>{let r=V(e,n);e.updateMatch(t,e=>({...e,context:r}))},U=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,H(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,H(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!k(n)&&!A(n)&&(e.serialError??=n)},Fe=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!B(e,t)&&(n.options.loader||n.options.beforeLoad||Ge(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{z(e)},i);r._nonReactive.pendingTimeout=t}},Ie=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Fe(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&H(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Le=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=m(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&U(e,n,o),s&&U(e,n,s),Fe(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},f=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),f()});return}i._nonReactive.beforeLoadPromise=m();let p={...V(e,n,!1),...i.__routeContext},{search:h,params:g,cause:_}=i,v=B(e,t),y={search:h,abortController:c,params:g,preload:v,context:p,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{u(),f()});return}(k(r)||A(r))&&(u(),U(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),f()})},x;try{if(x=r.options.beforeLoad(y),d(x))return u(),x.catch(t=>{U(e,n,t)}).then(b)}catch(t){u(),U(e,n,t)}b(x)},Re=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Le(e,n,t,i),s=()=>{if(Ne(e,n))return;let t=Ie(e,n,i);return d(t)?t.then(o):o()};return a()},ze=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Be=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=V(e,r),d=B(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Ve=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{W(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Be(e,t,n,r,i)),l=!!s&&d(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;H(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:V(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:V(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,A(t)&&await i.options.notFoundComponent?.preload?.(),H(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,H(e,e.router.getMatch(n),t)}!k(o)&&!A(o)&&await W(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:V(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),H(e,r,t)}},He=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(Be(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Ve(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){k(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Ve(e,t,i,n,d):Pe(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Ne(e,i)){if(!e.router.getMatch(i))return e.matches[n];Pe(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=B(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&H(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=m(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function Ue(e){let t=e,n=[];je(t.router)&&z(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Re(t,e);d(n)&&await n}catch(e){if(k(e))throw e;if(A(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?Me(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(He(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(k(e))throw e;A(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=Me(t,l);e===void 0&&y();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await W(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await W(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=ze(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let f=z(t);if(d(f)&&await f,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function We(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function W(e,t=G){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===G?(()=>{if(e._componentsPromise===void 0){let t=We(e,G);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():We(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ge(e){for(let t of G)if(e.options[t]?.preload)return!0;return!1}var G=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Ke(e){return{input:({url:t})=>{for(let n of e)t=Je(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ye(e[n],t);return t}}}function qe(e){let t=E(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=ie([`/`,t,e.pathname]),e)}}function Je(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Ye(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}var K=`__TSR_index`,Xe=`popstate`,Ze=`beforeunload`;function Qe(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=q(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[K];i=$e(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[K];i=$e(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[K]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function $e(e,t){t||={};let n=nt();return{...t,key:n,__TSR_key:n,[K]:e}}function et(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>q(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=nt();t.history.replaceState({[K]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=q(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[K]-l.state[K],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Qe({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ze,S,{capture:!0}),t.removeEventListener(Xe,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Ze,S,{capture:!0}),t.addEventListener(Xe,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function tt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function q(e,t){let n=tt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=nt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[K]:0,key:a,__TSR_key:a}}}function nt(){return(Math.random()+1).toString(36).substring(7)}function J(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var rt=new WeakMap,it=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=T(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=et()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ce(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=me(ot(this.latestLocation),e),we(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=E(o);t&&t!==`/`&&e.push(qe({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Ke(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=o(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&v(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:O(e).path,external:!1,searchStr:o,search:_(t?.search,i),hash:O(r.slice(1)).path,state:j(t?.state,a)}}let o=new URL(i,this.origin),s=Je(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:O(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:_(t?.search,c),hash:O(s.hash.slice(1)).path,state:j(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>te({base:e,to:t.includes(`//`)?w(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>st({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,p(t.params,s)),d=this.routesByPath[S(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&h(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let m=e.leaveParams?l:O(oe({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,g=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,X(t.options.validateSearch,{...e,...g}))}catch{}}),g=e}g=ct({search:g,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),g=_(o,g);let v=this.options.stringifySearch(g),y=t.hash===!0?n.hash:t.hash?p(t.hash,n.hash):void 0,b=y?`#${y}`:``,x=t.state===!0?n.state:t.state?p(t.state,n.state):{};x=j(n.state,x);let C=`${m}${v}${b}`,w,T,E=!1;if(this.rewrite){let e=new URL(C,this.origin),t=Ye(this.rewrite,e);w=e.href.replace(e.origin,``),t.origin===this.origin?T=t.pathname+t.search+t.hash:(T=t.href,E=!0)}else w=ne(C),T=w;return{publicHref:T,href:w,pathname:m,search:g,searchStr:v,state:x,hash:y??``,external:E,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=ue(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,p(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,a=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=i(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},o=S(this.latestLocation.href)===S(n.href),s=this.commitLocationPromise;if(this.commitLocationPromise=m(()=>{s?.resolve(),s=void 0}),o&&a())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=q(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Je(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(l(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?rt.set(this.latestLocation,t):rt.delete(this.latestLocation);let n=this.latestLocation,r=J(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Ue({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){k(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):A(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(J(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&l(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=W,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await Ue({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(k(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});A(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let a=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=le(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!i(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?i(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Oe,parseSearch:e.parseSearch??De,protocolAllowlist:e.protocolAllowlist??c}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=se(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:S(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?ut(this.options.notFoundMode,a):void 0,c=Array(a.length),l=new Map;for(let e of this.stores.matchStores.values())e.routeId&&l.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],u,d,f;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=X(r.options.validateSearch,{...n})??void 0;u={...n,...e},d={...i,...e},f=void 0}catch(e){let r=e;if(e instanceof Y||(r=new Y(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},f=r}}let p=r.options.loaderDeps?.({search:u})??``,h=p?JSON.stringify(p):``,{interpolatedPath:g,usedParams:v}=oe({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),y=r.id+g+h,b=this.getMatch(y),x=l.get(r.id),S=b?._strictParams??v,C;if(!b)try{dt(r,S)}catch(e){if(C=A(e)||k(e)?e:new at(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,S);let w=x?`stay`:`enter`,T;if(b)T={...b,cause:w,params:x?.params??i,_strictParams:S,search:_(x?x.search:b.search,u),_strictSearch:d};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ge(r)?`pending`:`success`;T={id:y,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:S,pathname:g,updatedAt:Date.now(),search:x?_(x.search,u):u,_strictSearch:d,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:m()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:x?j(x.loaderDeps,p):p,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(T.globalNotFound=s===r.id),T.searchError=f;let E=this.getParentContext(o);T.context={...E,...T.__routeContext,...T.__beforeLoadContext},c[n]=T}for(let t=0;t<c.length;t++){let n=c[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=l.get(n.routeId);if(n.params=o?_(o.params,i):i,!a){let i=c[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=f(t),i={...e.search};for(let e of t)try{Object.assign(i,X(e.options.validateSearch,i))}catch{}let a=f(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{dt(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},Y=class extends Error{},at=class extends Error{};function ot(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function X(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Y(`Async validation not supported`);if(n.issues)throw new Y(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function st({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=S(e),a,o=C(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function ct({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return lt(n)(e,t,r??!1)}function lt(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...X(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:p(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function ut(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return re}function dt(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var Z=e(n(),1),Q=t();function ft(e){let t=e.errorComponent??mt;return(0,Q.jsx)(pt,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?Z.createElement(t,{error:n,reset:r}):e.children})}var pt=class extends Z.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function mt({error:e}){let[t,n]=Z.useState(!1);return(0,Q.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Q.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Q.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,Q.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,Q.jsx)(`code`,{children:e.message}):null})}):null]})}function ht(e){let t=u(),n=`not-found-${D(t.stores.location,e=>e.pathname)}-${D(t.stores.status,e=>e)}`;return(0,Q.jsx)(ft,{getResetKey:()=>n,onCatch:(t,n)=>{if(A(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(A(t))return e.fallback?.(t);throw t},children:e.children})}function gt(){return(0,Q.jsx)(`p`,{children:`Not Found`})}function $(e){return(0,Q.jsx)(Q.Fragment,{children:e.children})}function _t(e,t,n){return t.options.notFoundComponent?(0,Q.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Q.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Q.jsx)(gt,{})}var vt=Z.memo(function({matchId:e}){let t=u(),n=t.stores.matchStores.get(e);n||y();let r=D(t.stores.loadedAt,e=>e),i=D(n,e=>e);return(0,Q.jsx)(yt,{router:t,matchId:e,resetKey:r,matchState:Z.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function yt({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,s=o?(0,Q.jsx)(o,{}):null,c=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr===`data-only`,f=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??o??(i.options.errorComponent?.preload||d))?Z.Suspense:$,p=c?ft:$,m=u?ht:$;return(0,Q.jsxs)(i.isRoot?i.options.shellComponent??$:$,{children:[(0,Q.jsx)(a.Provider,{value:t,children:(0,Q.jsx)(f,{fallback:s,children:(0,Q.jsx)(p,{getResetKey:()=>n,errorComponent:c||mt,onCatch:(e,t)=>{if(A(e))throw e.routeId??=r.routeId,e;l?.(e,t)},children:(0,Q.jsx)(m,{fallback:e=>{if(e.routeId??=r.routeId,!u||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return Z.createElement(u,e)},children:d||r._displayPending?(0,Q.jsx)(ae,{fallback:s,children:(0,Q.jsx)(xt,{matchId:t})}):(0,Q.jsx)(xt,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(bt,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function bt({resetKey:e}){let t=u(),n=Z.useRef(void 0);return b(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...J(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var xt=Z.memo(function({matchId:e}){let t=u(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||y();let i=D(r,e=>e),a=i.routeId,o=t.routesById[a],s=Z.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=Z.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,Q.jsx)(e,{},s):(0,Q.jsx)(St,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=m();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return A(i.error)||y(),_t(t,o,i.error);if(i.status===`redirected`)throw k(i.error)||y(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),St=Z.memo(function(){let e=u(),t=Z.useContext(a),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=D(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=D(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let o=n?e.routesById[n]:void 0,s=e.options.defaultPendingComponent?(0,Q.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return o||y(),_t(e,o,void 0);if(!i)return null;let c=(0,Q.jsx)(vt,{matchId:i});return n===`__root__`?(0,Q.jsx)(Z.Suspense,{fallback:s,children:c}):c}),Ct=r(`/(home)`)({component:g(()=>de(()=>import(`./route-BcNQ-aN-.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),`component`),validateSearch:ee(x({}))});export{ft as a,J as c,$ as i,fe as l,vt as n,mt as o,St as r,it as s,Ct as t,pe as u};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,r as n,t as r}from"./compiler-runtime-rGeCHUuX.js";import{Hs as i,Ia as a,Jo as o,M as s,N as c,Na as l,Nn as u,Oa as d,Ot as f,Ra as p,T as m,Wt as h,Xo as g,ba as _,dr as v,eo as y,fa as b,fr as x,is as S,j as C,lr as w,ma as ee,on as T,pr as E,sr as D,t as te,to as ne,ts as O,ur as k,va as re,zs as A}from"./button-fe_R2wzr.js";import{r as j,t as M}from"./route-DOWKJR6H.js";import{T as N,a as P,c as ie,d as ae,f as oe,h as se,l as ce,n as le,o as ue,p as de,s as fe,t as pe,u as me}from"./input-group-BtEJur4W.js";import{n as F,r as he,t as I}from"./resizable-B1fIW9sm.js";import{a as ge,b as L,c as R,f as _e,g as z,h as B,i as ve,l as V,m as ye,n as be,o as xe,p as Se,t as Ce,v as we,y as Te}from"./state-T-ZhKyUm.js";var H=e(n(),1);function Ee(e){let t=i({warn:e?.router===void 0}),n=e?.router||t,r=(0,H.useRef)(void 0);return S(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=A(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var De=g(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Oe=g(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),ke=g(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Ae=g(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),je=g(`git-branch-plus`,[[`path`,{d:`M6 3v12`,key:`qpgusn`}],[`path`,{d:`M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`1d02ji`}],[`path`,{d:`M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`chk6ph`}],[`path`,{d:`M15 6a9 9 0 0 0-9 9`,key:`or332x`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),Me=g(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ne=g(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),Pe=g(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Fe=g(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ie=g(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Le=g(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Re=g(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),U=r(),ze=1,Be=.9,Ve=.8,He=.17,Ue=.1,We=.999,Ge=.9999,Ke=.99,qe=/[\\\/_+.#"@\[\(\{&]/,Je=/[\\\/_+.#"@\[\(\{&]/g,Ye=/[\s-]/,Xe=/[\s-]/g;function Ze(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?ze:Ke;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Ze(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=ze:qe.test(e.charAt(l-1))?(d*=Ve,p=e.slice(i,l-1).match(Je),p&&i>0&&(d*=We**+p.length)):Ye.test(e.charAt(l-1))?(d*=Be,m=e.slice(i,l-1).match(Xe),m&&i>0&&(d*=We**+m.length)):(d*=He,i>0&&(d*=We**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Ge)),(d<Ue&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Ze(e,t,n,r,l+1,a+2,o),f*Ue>d&&(d=f*Ue)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Qe(e){return e.toLowerCase().replace(Xe,` `)}function $e(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Ze(e,t,Qe(e),Qe(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function et(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function G(...e){return t=>{let n=!1,r=e.map(e=>{let r=et(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():et(e[t],null)}}}}function tt(...e){return H.useCallback(G(...e),e)}var K=t();function nt(e,t){let n=H.createContext(t),r=e=>{let{children:t,...r}=e,i=H.useMemo(()=>r,Object.values(r));return(0,K.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=H.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function rt(e,t=[]){let n=[];function r(t,r){let i=H.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=H.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=H.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>H.createContext(e));return function(n){let r=n?.[e]||t;return H.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,it(i,...t)]}function it(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return H.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var at=globalThis?.document?H.useLayoutEffect:()=>{},ot=H.useId||(()=>void 0),st=0;function q(e){let[t,n]=H.useState(ot());return at(()=>{e||n(e=>e??String(st++))},[e]),e||(t?`radix-${t}`:``)}var ct=H.useInsertionEffect||at;function lt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=ut({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=H.useRef(e!==void 0);H.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,H.useCallback(t=>{if(s){let n=dt(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function ut({defaultProp:e,onChange:t}){let[n,r]=H.useState(e),i=H.useRef(n),a=H.useRef(t);return ct(()=>{a.current=t},[t]),H.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function dt(e){return typeof e==`function`}var ft=e(O(),1);function pt(e){let t=mt(e),n=H.forwardRef((e,n)=>{let{children:r,...i}=e,a=H.Children.toArray(r),o=a.find(gt);if(o){let e=o.props.children,r=a.map(t=>t===o?H.Children.count(e)>1?H.Children.only(null):H.isValidElement(e)?e.props.children:null:t);return(0,K.jsx)(t,{...i,ref:n,children:H.isValidElement(e)?H.cloneElement(e,void 0,r):null})}return(0,K.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function mt(e){let t=H.forwardRef((e,t)=>{let{children:n,...r}=e;if(H.isValidElement(n)){let e=vt(n),i=_t(r,n.props);return n.type!==H.Fragment&&(i.ref=t?G(t,e):e),H.cloneElement(n,i)}return H.Children.count(n)>1?H.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ht=Symbol(`radix.slottable`);function gt(e){return H.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ht}function _t(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function vt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=pt(`Primitive.${t}`),r=H.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function yt(e,t){e&&ft.flushSync(()=>e.dispatchEvent(t))}function bt(e){let t=H.useRef(e);return H.useEffect(()=>{t.current=e}),H.useMemo(()=>(...e)=>t.current?.(...e),[])}function xt(e,t=globalThis?.document){let n=bt(e);H.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var St=`DismissableLayer`,Ct=`dismissableLayer.update`,wt=`dismissableLayer.pointerDownOutside`,Tt=`dismissableLayer.focusOutside`,Et,Dt=H.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ot=H.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=H.useContext(Dt),[u,d]=H.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=H.useState({}),m=tt(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=jt(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=Mt(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return xt(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),H.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Et=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Nt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Et)}},[u,f,n,l]),H.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Nt())},[u,l]),H.useEffect(()=>{let e=()=>p({});return document.addEventListener(Ct,e),()=>document.removeEventListener(Ct,e)},[]),(0,K.jsx)(J.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:W(e.onFocusCapture,S.onFocusCapture),onBlurCapture:W(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,x.onPointerDownCapture)})});Ot.displayName=St;var kt=`DismissableLayerBranch`,At=H.forwardRef((e,t)=>{let n=H.useContext(Dt),r=H.useRef(null),i=tt(t,r);return H.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,K.jsx)(J.div,{...e,ref:i})});At.displayName=kt;function jt(e,t=globalThis?.document){let n=bt(e),r=H.useRef(!1),i=H.useRef(()=>{});return H.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Pt(wt,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Mt(e,t=globalThis?.document){let n=bt(e),r=H.useRef(!1);return H.useEffect(()=>{let e=e=>{e.target&&!r.current&&Pt(Tt,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Nt(){let e=new CustomEvent(Ct);document.dispatchEvent(e)}function Pt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?yt(i,a):i.dispatchEvent(a)}var Ft=`focusScope.autoFocusOnMount`,It=`focusScope.autoFocusOnUnmount`,Lt={bubbles:!1,cancelable:!0},Rt=`FocusScope`,zt=H.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=H.useState(null),l=bt(i),u=bt(a),d=H.useRef(null),f=tt(t,e=>c(e)),p=H.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;H.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Y(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Y(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Y(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),H.useEffect(()=>{if(s){Kt.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ft,Lt);s.addEventListener(Ft,l),s.dispatchEvent(t),t.defaultPrevented||(Bt(Yt(Ht(s)),{select:!0}),document.activeElement===e&&Y(s))}return()=>{s.removeEventListener(Ft,l),setTimeout(()=>{let t=new CustomEvent(It,Lt);s.addEventListener(It,u),s.dispatchEvent(t),t.defaultPrevented||Y(e??document.body,{select:!0}),s.removeEventListener(It,u),Kt.remove(p)},0)}}},[s,l,u,p]);let m=H.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Vt(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Y(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Y(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,K.jsx)(J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});zt.displayName=Rt;function Bt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Y(r,{select:t}),document.activeElement!==n)return}function Vt(e){let t=Ht(e);return[Ut(t,e),Ut(t.reverse(),e)]}function Ht(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ut(e,t){for(let n of e)if(!Wt(n,{upTo:t}))return n}function Wt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Gt(e){return e instanceof HTMLInputElement&&`select`in e}function Y(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gt(e)&&t&&e.select()}}var Kt=qt();function qt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Jt(e,t),e.unshift(t)},remove(t){e=Jt(e,t),e[0]?.resume()}}}function Jt(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yt(e){return e.filter(e=>e.tagName!==`A`)}var Xt=`Portal`,Zt=H.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=H.useState(!1);at(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ft.createPortal((0,K.jsx)(J.div,{...r,ref:t}),o):null});Zt.displayName=Xt;function Qt(e,t){return H.useReducer((e,n)=>t[e][n]??e,e)}var $t=e=>{let{present:t,children:n}=e,r=en(t),i=typeof n==`function`?n({present:r.isPresent}):H.Children.only(n),a=tt(r.ref,nn(i));return typeof n==`function`||r.isPresent?H.cloneElement(i,{ref:a}):null};$t.displayName=`Presence`;function en(e){let[t,n]=H.useState(),r=H.useRef(null),i=H.useRef(e),a=H.useRef(`none`),[o,s]=Qt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return H.useEffect(()=>{let e=tn(r.current);a.current=o===`mounted`?e:`none`},[o]),at(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=tn(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),at(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=tn(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=tn(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:H.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function tn(e){return e?.animationName||`none`}function nn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rn=0;function an(){H.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??on()),document.body.insertAdjacentElement(`beforeend`,e[1]??on()),rn++,()=>{rn===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),rn--}},[])}function on(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},X.apply(this,arguments)};function sn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function cn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ln=`right-scroll-bar-position`,un=`width-before-scroll-bar`,dn=`with-scroll-bars-hidden`,fn=`--removed-body-scroll-bar-size`;function pn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function mn(e,t){var n=(0,H.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var hn=typeof window<`u`?H.useLayoutEffect:H.useEffect,gn=new WeakMap;function _n(e,t){var n=mn(t||null,function(t){return e.forEach(function(e){return pn(e,t)})});return hn(function(){var t=gn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||pn(e,null)}),i.forEach(function(e){r.has(e)||pn(e,a)})}gn.set(n,e)},[e]),n}function vn(e){return e}function yn(e,t){t===void 0&&(t=vn);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function bn(e){e===void 0&&(e={});var t=yn(null);return t.options=X({async:!0,ssr:!1},e),t}var xn=function(e){var t=e.sideCar,n=sn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return H.createElement(r,X({},n))};xn.isSideCarExport=!0;function Sn(e,t){return e.useMedium(t),xn}var Cn=bn(),wn=function(){},Tn=H.forwardRef(function(e,t){var n=H.useRef(null),r=H.useState({onScrollCapture:wn,onWheelCapture:wn,onTouchMoveCapture:wn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=sn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=_n([n,t]),C=X(X({},b),i);return H.createElement(H.Fragment,null,u&&H.createElement(x,{sideCar:Cn,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?H.cloneElement(H.Children.only(s),X(X({},C),{ref:S})):H.createElement(v,X({},C,{className:c,ref:S}),s))});Tn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tn.classNames={fullWidth:un,zeroRight:ln};var En,Dn=function(){if(En)return En;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function On(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Dn();return t&&e.setAttribute(`nonce`,t),e}function kn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function An(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var jn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=On())&&(kn(t,n),An(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mn=function(){var e=jn();return function(t,n){H.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Nn=function(){var e=Mn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Pn={left:0,top:0,right:0,gap:0},Fn=function(e){return parseInt(e||``,10)||0},In=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Fn(n),Fn(r),Fn(i)]},Ln=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Pn;var t=In(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Rn=Nn(),zn=`data-scroll-locked`,Bn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
1
+ import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,r as n,t as r}from"./compiler-runtime-rGeCHUuX.js";import{Hs as i,Ia as a,Jo as o,M as s,N as c,Na as l,Nn as u,Oa as d,Ot as f,Ra as p,T as m,Wt as h,Xo as g,ba as _,dr as v,eo as y,fa as b,fr as x,is as S,j as C,lr as w,ma as ee,on as T,pr as E,sr as D,t as te,to as ne,ts as O,ur as k,va as re,zs as A}from"./button-fe_R2wzr.js";import{r as j,t as M}from"./route-0gFXuUyt.js";import{T as N,a as P,c as ie,d as ae,f as oe,h as se,l as ce,n as le,o as ue,p as de,s as fe,t as pe,u as me}from"./input-group-CAejCCyD.js";import{n as F,r as he,t as I}from"./resizable-B1fIW9sm.js";import{a as ge,b as L,c as R,f as _e,g as z,h as B,i as ve,l as V,m as ye,n as be,o as xe,p as Se,t as Ce,v as we,y as Te}from"./state-C-LyNCwu.js";var H=e(n(),1);function Ee(e){let t=i({warn:e?.router===void 0}),n=e?.router||t,r=(0,H.useRef)(void 0);return S(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=A(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var De=g(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Oe=g(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),ke=g(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Ae=g(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),je=g(`git-branch-plus`,[[`path`,{d:`M6 3v12`,key:`qpgusn`}],[`path`,{d:`M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`1d02ji`}],[`path`,{d:`M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`chk6ph`}],[`path`,{d:`M15 6a9 9 0 0 0-9 9`,key:`or332x`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),Me=g(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ne=g(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),Pe=g(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Fe=g(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ie=g(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Le=g(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Re=g(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),U=r(),ze=1,Be=.9,Ve=.8,He=.17,Ue=.1,We=.999,Ge=.9999,Ke=.99,qe=/[\\\/_+.#"@\[\(\{&]/,Je=/[\\\/_+.#"@\[\(\{&]/g,Ye=/[\s-]/,Xe=/[\s-]/g;function Ze(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?ze:Ke;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Ze(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=ze:qe.test(e.charAt(l-1))?(d*=Ve,p=e.slice(i,l-1).match(Je),p&&i>0&&(d*=We**+p.length)):Ye.test(e.charAt(l-1))?(d*=Be,m=e.slice(i,l-1).match(Xe),m&&i>0&&(d*=We**+m.length)):(d*=He,i>0&&(d*=We**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Ge)),(d<Ue&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Ze(e,t,n,r,l+1,a+2,o),f*Ue>d&&(d=f*Ue)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Qe(e){return e.toLowerCase().replace(Xe,` `)}function $e(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Ze(e,t,Qe(e),Qe(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function et(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function G(...e){return t=>{let n=!1,r=e.map(e=>{let r=et(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():et(e[t],null)}}}}function tt(...e){return H.useCallback(G(...e),e)}var K=t();function nt(e,t){let n=H.createContext(t),r=e=>{let{children:t,...r}=e,i=H.useMemo(()=>r,Object.values(r));return(0,K.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=H.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function rt(e,t=[]){let n=[];function r(t,r){let i=H.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=H.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=H.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>H.createContext(e));return function(n){let r=n?.[e]||t;return H.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,it(i,...t)]}function it(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return H.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var at=globalThis?.document?H.useLayoutEffect:()=>{},ot=H.useId||(()=>void 0),st=0;function q(e){let[t,n]=H.useState(ot());return at(()=>{e||n(e=>e??String(st++))},[e]),e||(t?`radix-${t}`:``)}var ct=H.useInsertionEffect||at;function lt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=ut({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=H.useRef(e!==void 0);H.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,H.useCallback(t=>{if(s){let n=dt(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function ut({defaultProp:e,onChange:t}){let[n,r]=H.useState(e),i=H.useRef(n),a=H.useRef(t);return ct(()=>{a.current=t},[t]),H.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function dt(e){return typeof e==`function`}var ft=e(O(),1);function pt(e){let t=mt(e),n=H.forwardRef((e,n)=>{let{children:r,...i}=e,a=H.Children.toArray(r),o=a.find(gt);if(o){let e=o.props.children,r=a.map(t=>t===o?H.Children.count(e)>1?H.Children.only(null):H.isValidElement(e)?e.props.children:null:t);return(0,K.jsx)(t,{...i,ref:n,children:H.isValidElement(e)?H.cloneElement(e,void 0,r):null})}return(0,K.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function mt(e){let t=H.forwardRef((e,t)=>{let{children:n,...r}=e;if(H.isValidElement(n)){let e=vt(n),i=_t(r,n.props);return n.type!==H.Fragment&&(i.ref=t?G(t,e):e),H.cloneElement(n,i)}return H.Children.count(n)>1?H.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ht=Symbol(`radix.slottable`);function gt(e){return H.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ht}function _t(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function vt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=pt(`Primitive.${t}`),r=H.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function yt(e,t){e&&ft.flushSync(()=>e.dispatchEvent(t))}function bt(e){let t=H.useRef(e);return H.useEffect(()=>{t.current=e}),H.useMemo(()=>(...e)=>t.current?.(...e),[])}function xt(e,t=globalThis?.document){let n=bt(e);H.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var St=`DismissableLayer`,Ct=`dismissableLayer.update`,wt=`dismissableLayer.pointerDownOutside`,Tt=`dismissableLayer.focusOutside`,Et,Dt=H.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ot=H.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=H.useContext(Dt),[u,d]=H.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=H.useState({}),m=tt(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=jt(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=Mt(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return xt(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),H.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Et=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Nt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Et)}},[u,f,n,l]),H.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Nt())},[u,l]),H.useEffect(()=>{let e=()=>p({});return document.addEventListener(Ct,e),()=>document.removeEventListener(Ct,e)},[]),(0,K.jsx)(J.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:W(e.onFocusCapture,S.onFocusCapture),onBlurCapture:W(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,x.onPointerDownCapture)})});Ot.displayName=St;var kt=`DismissableLayerBranch`,At=H.forwardRef((e,t)=>{let n=H.useContext(Dt),r=H.useRef(null),i=tt(t,r);return H.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,K.jsx)(J.div,{...e,ref:i})});At.displayName=kt;function jt(e,t=globalThis?.document){let n=bt(e),r=H.useRef(!1),i=H.useRef(()=>{});return H.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Pt(wt,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Mt(e,t=globalThis?.document){let n=bt(e),r=H.useRef(!1);return H.useEffect(()=>{let e=e=>{e.target&&!r.current&&Pt(Tt,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Nt(){let e=new CustomEvent(Ct);document.dispatchEvent(e)}function Pt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?yt(i,a):i.dispatchEvent(a)}var Ft=`focusScope.autoFocusOnMount`,It=`focusScope.autoFocusOnUnmount`,Lt={bubbles:!1,cancelable:!0},Rt=`FocusScope`,zt=H.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=H.useState(null),l=bt(i),u=bt(a),d=H.useRef(null),f=tt(t,e=>c(e)),p=H.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;H.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Y(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Y(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Y(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),H.useEffect(()=>{if(s){Kt.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ft,Lt);s.addEventListener(Ft,l),s.dispatchEvent(t),t.defaultPrevented||(Bt(Yt(Ht(s)),{select:!0}),document.activeElement===e&&Y(s))}return()=>{s.removeEventListener(Ft,l),setTimeout(()=>{let t=new CustomEvent(It,Lt);s.addEventListener(It,u),s.dispatchEvent(t),t.defaultPrevented||Y(e??document.body,{select:!0}),s.removeEventListener(It,u),Kt.remove(p)},0)}}},[s,l,u,p]);let m=H.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Vt(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Y(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Y(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,K.jsx)(J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});zt.displayName=Rt;function Bt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Y(r,{select:t}),document.activeElement!==n)return}function Vt(e){let t=Ht(e);return[Ut(t,e),Ut(t.reverse(),e)]}function Ht(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ut(e,t){for(let n of e)if(!Wt(n,{upTo:t}))return n}function Wt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Gt(e){return e instanceof HTMLInputElement&&`select`in e}function Y(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gt(e)&&t&&e.select()}}var Kt=qt();function qt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Jt(e,t),e.unshift(t)},remove(t){e=Jt(e,t),e[0]?.resume()}}}function Jt(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yt(e){return e.filter(e=>e.tagName!==`A`)}var Xt=`Portal`,Zt=H.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=H.useState(!1);at(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ft.createPortal((0,K.jsx)(J.div,{...r,ref:t}),o):null});Zt.displayName=Xt;function Qt(e,t){return H.useReducer((e,n)=>t[e][n]??e,e)}var $t=e=>{let{present:t,children:n}=e,r=en(t),i=typeof n==`function`?n({present:r.isPresent}):H.Children.only(n),a=tt(r.ref,nn(i));return typeof n==`function`||r.isPresent?H.cloneElement(i,{ref:a}):null};$t.displayName=`Presence`;function en(e){let[t,n]=H.useState(),r=H.useRef(null),i=H.useRef(e),a=H.useRef(`none`),[o,s]=Qt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return H.useEffect(()=>{let e=tn(r.current);a.current=o===`mounted`?e:`none`},[o]),at(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=tn(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),at(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=tn(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=tn(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:H.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function tn(e){return e?.animationName||`none`}function nn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rn=0;function an(){H.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??on()),document.body.insertAdjacentElement(`beforeend`,e[1]??on()),rn++,()=>{rn===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),rn--}},[])}function on(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},X.apply(this,arguments)};function sn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function cn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ln=`right-scroll-bar-position`,un=`width-before-scroll-bar`,dn=`with-scroll-bars-hidden`,fn=`--removed-body-scroll-bar-size`;function pn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function mn(e,t){var n=(0,H.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var hn=typeof window<`u`?H.useLayoutEffect:H.useEffect,gn=new WeakMap;function _n(e,t){var n=mn(t||null,function(t){return e.forEach(function(e){return pn(e,t)})});return hn(function(){var t=gn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||pn(e,null)}),i.forEach(function(e){r.has(e)||pn(e,a)})}gn.set(n,e)},[e]),n}function vn(e){return e}function yn(e,t){t===void 0&&(t=vn);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function bn(e){e===void 0&&(e={});var t=yn(null);return t.options=X({async:!0,ssr:!1},e),t}var xn=function(e){var t=e.sideCar,n=sn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return H.createElement(r,X({},n))};xn.isSideCarExport=!0;function Sn(e,t){return e.useMedium(t),xn}var Cn=bn(),wn=function(){},Tn=H.forwardRef(function(e,t){var n=H.useRef(null),r=H.useState({onScrollCapture:wn,onWheelCapture:wn,onTouchMoveCapture:wn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=sn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=_n([n,t]),C=X(X({},b),i);return H.createElement(H.Fragment,null,u&&H.createElement(x,{sideCar:Cn,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?H.cloneElement(H.Children.only(s),X(X({},C),{ref:S})):H.createElement(v,X({},C,{className:c,ref:S}),s))});Tn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tn.classNames={fullWidth:un,zeroRight:ln};var En,Dn=function(){if(En)return En;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function On(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Dn();return t&&e.setAttribute(`nonce`,t),e}function kn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function An(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var jn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=On())&&(kn(t,n),An(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mn=function(){var e=jn();return function(t,n){H.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Nn=function(){var e=Mn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Pn={left:0,top:0,right:0,gap:0},Fn=function(e){return parseInt(e||``,10)||0},In=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Fn(n),Fn(r),Fn(i)]},Ln=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Pn;var t=In(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Rn=Nn(),zn=`data-scroll-locked`,Bn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
2
  .${dn} {
3
3
  overflow: hidden ${r};
4
4
  padding-right: ${s}px ${r};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/run-L2YCL4H0.js","assets/state-T-ZhKyUm.js","assets/chunk-QTnfLwEv.js","assets/button-fe_R2wzr.js","assets/compiler-runtime-rGeCHUuX.js","assets/terminal-Ci9YBovb.js","assets/fallbacks-DZ7ciusO.js"])))=>i.map(i=>d[i]);
2
- import{$o as e,F as t,G as n,J as r,Qo as i,Y as a,ft as o,gt as s,q as c}from"./button-fe_R2wzr.js";import{t as l}from"./preload-helper-CjdClQve.js";var u=e(`/(home)/$worktree/run`)({component:i(()=>l(()=>import(`./run-L2YCL4H0.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`),validateSearch:s(a({command:o(r),cwd:o(r),env:o(c(r,r)),inactive:o(t),runId:o(n),sessionId:r}))});export{u as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/run-BzrHh2aK.js","assets/state-C-LyNCwu.js","assets/chunk-QTnfLwEv.js","assets/button-fe_R2wzr.js","assets/compiler-runtime-rGeCHUuX.js","assets/terminal-DgodR87i.js","assets/fallbacks-DZ7ciusO.js"])))=>i.map(i=>d[i]);
2
+ import{$o as e,F as t,G as n,J as r,Qo as i,Y as a,ft as o,gt as s,q as c}from"./button-fe_R2wzr.js";import{t as l}from"./preload-helper-CjdClQve.js";var u=e(`/(home)/$worktree/run`)({component:i(()=>l(()=>import(`./run-BzrHh2aK.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`),validateSearch:s(a({command:o(r),cwd:o(r),env:o(c(r,r)),inactive:o(t),runId:o(n),sessionId:r}))});export{u as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./compiler-runtime-rGeCHUuX.js";import{Vs as n}from"./button-fe_R2wzr.js";import{n as r}from"./fallbacks-DZ7ciusO.js";import{g as i,h as a,l as o,s,t as c}from"./state-C-LyNCwu.js";import{t as l}from"./run-B5fcXFyP.js";import{t as u}from"./terminal-DgodR87i.js";var d=t(),f=e();function p(){let e=(0,d.c)(10),t=l.useParams(),a=l.useSearch(),o;e[0]===t.worktree?o=e[1]:(o=c(t.worktree),e[0]=t.worktree,e[1]=o);let s=i(o);if(!s.value.activeWorktree){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,f.jsx)(n,{to:`/`,replace:!0}),e[2]=t):t=e[2],t}if(a.inactive===!0){let t;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,f.jsx)(`div`,{className:`bg-background h-full min-h-0 min-w-0 p-2`,children:(0,f.jsx)(r,{message:`This script has not been started yet. Use the play button to start it.`})}),e[3]=t):t=e[3],t}let u=a.cwd??s.value.activeWorktree.root,p;return e[4]!==a.command||e[5]!==a.env||e[6]!==a.runId||e[7]!==a.sessionId||e[8]!==u?(p=(0,f.jsx)(m,{command:a.command,cwd:u,env:a.env,runId:a.runId,sessionId:a.sessionId}),e[4]=a.command,e[5]=a.env,e[6]=a.runId,e[7]=a.sessionId,e[8]=u,e[9]=p):p=e[9],p}function m(e){let t=(0,d.c)(22),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=o.mutation(`terminal.resize`),t[0]=n):n=t[0];let r=a(n),c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=o.mutation(`terminal.write`),t[1]=c):c=t[1];let l=a(c),p,m,h;t[2]!==e.command||t[3]!==e.cwd||t[4]!==e.env||t[5]!==e.sessionId?(p=e.command===void 0?{cwd:e.cwd,sessionId:e.sessionId}:{args:[`-lc`,e.command],command:`sh`,cwd:e.cwd,env:e.env,sessionId:e.sessionId},m=i,h=s(p),t[2]=e.command,t[3]=e.cwd,t[4]=e.env,t[5]=e.sessionId,t[6]=p,t[7]=m,t[8]=h):(p=t[6],m=t[7],h=t[8]);let g=m(h),_;t[9]!==p||t[10]!==l?(_=e=>l({payload:{...p,data:e}}),t[9]=p,t[10]=l,t[11]=_):_=t[11];let v;t[12]!==r||t[13]!==p?(v=e=>r({payload:{cols:e.cols,rows:e.rows,...p}}),t[12]=r,t[13]=p,t[14]=v):v=t[14];let y=e.runId!==void 0&&g.value.state.runId<e.runId?`starting`:g.value.state.state,b;return t[15]!==e.sessionId||t[16]!==_||t[17]!==v||t[18]!==y||t[19]!==g.value.data||t[20]!==g.value.frame?(b=(0,f.jsx)(`div`,{className:`bg-background h-full min-h-0 min-w-0`,children:(0,f.jsx)(u,{className:`h-full min-h-0 w-full min-w-0 overflow-hidden`,data:g.value.data,frame:g.value.frame,onData:_,onResize:v,state:y},e.sessionId)}),t[15]=e.sessionId,t[16]=_,t[17]=v,t[18]=y,t[19]=g.value.data,t[20]=g.value.frame,t[21]=b):b=t[21],b}export{p as component};