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]=`3c6a628d-a6b0-4b9d-9e47-590498d7d9d3`,e._sentryDebugIdIdentifier=`sentry-dbid-3c6a628d-a6b0-4b9d-9e47-590498d7d9d3`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Sp as n,gp as r,jg as i,xp as a}from"./entry.client-mpghtlrl.js";var o=e(i(),1);function s(e){let t=n({warn:e?.router===void 0}),i=e?.router||t,s=(0,o.useRef)(void 0);return r(i.stores.__store,t=>{if(e?.select){if(e.structuralSharing??i.options.defaultStructuralSharing){let n=a(s.current,e.select(t));return s.current=n,n}return e.select(t)}return t})}var c=t(),l=e=>e.location.pathname;function u(){let e=(0,c.c)(10),t=n().history,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:l},e[0]=r):r=e[0],s(r);let i=t.index,a=i>0,o;e[1]===t?o=e[2]:(o=()=>{t.canGoBack()&&t.back()},e[1]=t,e[2]=o);let u=o,d;e[3]===t?d=e[4]:(d=e=>{t.setHistory([e])},e[3]=t,e[4]=d);let f=d,p,m;return e[5]!==i||e[6]!==a||e[7]!==u||e[8]!==f?(m={index:i,canGoBack:a,goBack:u,resetHistory:f},e[5]=i,e[6]=a,e[7]=u,e[8]=f,e[9]=m):m=e[9],p=m,p}export{s as n,u as t};