try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`7b132d97-5166-40ef-b7a5-a5e2625444e6`,e._sentryDebugIdIdentifier=`sentry-dbid-7b132d97-5166-40ef-b7a5-a5e2625444e6`)}catch{}import{t as e}from"./useLocation-fu2554ly.js";import{Fg as t,Gp as n,ch as r,zp as i}from"./entry.client-dr7r6s9a.js";import{ht as a,mt as o}from"./workspace-leaf-files-mc5sghv7.js";var s=t(),c=i.dialog.settings.fullPath,l=()=>{let t=(0,s.c)(4),n=e(),r;t[0]===n.pathname?r=t[1]:(r=(n.pathname.startsWith(c)?n.pathname.slice(c.length+1):``).split(`/`)[0]||``,t[0]=n.pathname,t[1]=r);let i=r,l;return t[2]===i?l=t[3]:(l=a.find(e=>o[e]===i)??`account`,t[2]=i,t[3]=l),l},u=(t,i)=>{let a=(0,s.c)(6),{trackUserAction:o}=r(),c=n(),l=e(),u;return a[0]!==o||a[1]!==t||a[2]!==l.pathname||a[3]!==c||a[4]!==i?(u=()=>{o(`NavigateInModal`,{destination:t,source:l.pathname},`Press`),c({to:t,params:i})},a[0]=o,a[1]=t,a[2]=l.pathname,a[3]=c,a[4]=i,a[5]=u):u=a[5],u};export{u as n,l as t};