import{E as e,N as t,s as n,z as r}from"./useRouterState-DyVgzXuA.js";function i(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function a(e){return!!e?.isNotFound}var o=`__root__`;function s(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&typeof n.href==`string`&&t(n.href))throw Error(`Redirect blocked: unsafe protocol in href "${n.href}". Only ${e.join(`, `)} protocols are allowed.`);if(!n._builtLocation&&!n.reloadDocument&&typeof n.href==`string`)try{new URL(n.href),n.reloadDocument=!0}catch{}let r=new Headers(n.headers);n.href&&r.get(`Location`)===null&&r.set(`Location`,n.href);let i=new Response(null,{status:n.statusCode,headers:r});if(i.options=n,n.throw)throw i;return i}function c(e){return e instanceof Response&&!!e.options}var l=r(n(),1),u=l.createContext(void 0),d=l.createContext(void 0);export{o as a,s as i,u as n,a as o,c as r,i as s,d as t};