import e from"node:path";import t from"node:fs";function n(t,n){let r=e.resolve(t),i=e.resolve(n),a=e.relative(r,i);return a===``||!a.startsWith(`..${e.sep}`)&&a!==`..`&&!e.isAbsolute(a)}function r(e){try{return t.realpathSync(e)}catch{return null}}function i(e,t,i){if(!n(e,t))return!1;let a=r(e),o=r(t);return!a||!o?i?.requireRealpath!==!0:n(a,o)}function a(e){return e.split(/[\\/]+/).filter(Boolean).some(e=>e===`node_modules`||e.startsWith(`.`)&&e!==`.`&&e!==`..`)}export{n,i as r,a as t};
