import{readFileSync as s}from"fs";import{existsSync as f}from"node:fs";import{dirname as c,resolve as r}from"node:path";import{fileURLToPath as m}from"node:url";function E(e){let t=r(u(),e);return JSON.parse(s(t,"utf8"))}var o;function u(){if(o)return o;let e=d(),t=["./","../","./cjs/","./esm/"];for(let i of t){let n=r(e,i),a=r(n,"fhir");if(f(a))return o=n,n}throw new Error("No data directory found")}function d(){if(typeof __dirname<"u")return r(__dirname);if(import.meta.url)return r(c(m(import.meta.url)));throw new Error("No data directory found")}var P=["fhir/r4/search-parameters.json","fhir/r4/search-parameters-medplum.json","fhir/r4/search-parameters-uscore.json"];export{P as SEARCH_PARAMETER_BUNDLE_FILES,u as getDataDir,E as readJson};
//# sourceMappingURL=index.mjs.map
