// @bun
var{defineProperty:z,getOwnPropertyNames:C,getOwnPropertyDescriptor:D}=Object,E=Object.prototype.hasOwnProperty;function F(f){return this[f]}var I=(f)=>{var j=(B??=new WeakMap).get(f),q;if(j)return j;if(j=z({},"__esModule",{value:!0}),f&&typeof f==="object"||typeof f==="function"){for(var y of C(f))if(!E.call(j,y))z(j,y,{get:F.bind(f,y),enumerable:!(q=D(f,y))||q.enumerable})}return B.set(f,j),j},B;var G=(f)=>f;function H(f,j){this[f]=G.bind(null,j)}var J=(f,j)=>{for(var q in j)z(f,q,{get:j[q],enumerable:!0,configurable:!0,set:H.bind(j,q)})};var K=(f,j)=>()=>(f&&(j=f(f=0)),j);var M=import.meta.require;function O(f){if(typeof window<"u")if(window.stxRouter?.navigate)window.stxRouter.navigate(f);else window.location.href=f}function Q(){if(typeof window<"u")window.history.back()}function T(){if(typeof window<"u")window.history.forward()}function V(){if(typeof window>"u")return{path:"/",fullPath:"/",hash:"",query:{},params:{}};if(window.stx?.useRoute)return window.stx.useRoute();return{get path(){return window.location.pathname},get fullPath(){return window.location.pathname+window.location.search+window.location.hash},get hash(){return window.location.hash},get query(){let f={};return new URLSearchParams(window.location.search).forEach((j,q)=>{f[q]=j}),f},get params(){return window.stx?._rp??{}}}}function W(f){if(typeof window<"u"&&window.stx?.setRouteParams)window.stx.setRouteParams(f)}function X(){return{data:Object.assign(()=>({}),{set:()=>{}}),get:()=>{return},set:()=>{},setAll:()=>{}}}export{X as useSearchParams,V as useRoute,W as setRouteParams,O as navigate,T as goForward,Q as goBack};
