import{tt as e}from"./app-elements-CWGamLYk.js";function t(e,t){return t?e===t||e.startsWith(t+`/`):!1}function n(e,n){return t(e,n)?e.slice(n.length)||`/`:e}function r(e,n){return!n||t(e,n)?e:e===`/`?n:`${n}${e}`}function i(e){if(e===`/`)return`/`;let t=e.length;for(;t>0&&e.charCodeAt(t-1)===47;)t--;return t===0?`/`:e.slice(0,t)}var a=`NEXT_REDIRECT;`;function o(e){if(!e.startsWith(a))return null;let t=e.indexOf(`;`,14);if(t===-1)return null;let n=e.slice(t+1),r=n.match(/;(303|307|308);?$/),i=n!==``&&e.endsWith(`;`);if(i&&!r)return null;let o=r?n.slice(0,-r[0].length):n,s=o;if(!i)try{s=decodeURIComponent(o)}catch{return null}return{status:r?Number(r[1]):307,type:e.slice(14,t)||null,url:s}}function s(e){return!e||typeof e!=`object`||!(`digest`in e)?null:String(e.digest)}function c(e){return o(e)}function l(e){return e===`NEXT_NOT_FOUND`?{status:404}:e.startsWith(`NEXT_HTTP_ERROR_FALLBACK;`)?{status:parseInt(e.split(`;`)[1],10)}:null}var u=`_N_T_`;function d(e,t){e.includes(t)||e.push(t)}function f(e){return!e||e===`.`||e.startsWith(`@`)?null:e}function p(e,t){let n=[];for(let t of e){let e=f(t);e&&n.push(e)}return n.push(t),`/${n.join(`/`)}`}function m(e,t){if(d(e,`${u}/layout`),!t.startsWith(`/`))return;let n=t.split(`/`),r=n.length-1;for(let t=1;t<=n.length;t++){let i=n.slice(0,t).join(`/`);i&&(t-1!==r&&(i=`${i}/layout`),d(e,`${u}${i}`))}}function h(e,t,n){return g(e,t,[...n],`page`)}function g(t,n,r,i){let a=[t,`${u}${t.length>1&&t.endsWith(`/`)?t.slice(0,-1):t}`];t===`/`&&d(a,`${u}/index`),t===`/index`&&d(a,`${u}/`),m(a,p(r,i));for(let e of n)d(a,e);return a.map(e)}export{c as a,i as c,l as i,n as l,g as n,r as o,s as r,t as s,h as t};