{"version":3,"file":"index.cjs","names":["path","path","path","path","path","nodePath","ensure","remove","exists","copy","move","stats","size","isEmpty","list","listFiles","hash","nodePath","stats","lastModified","readline","nodePath","nodePath"],"sources":["../../../../../../@warlock.js/fs/src/atomic.ts","../../../../../../@warlock.js/fs/src/copy.ts","../../../../../../@warlock.js/fs/src/dirs.ts","../../../../../../@warlock.js/fs/src/exists.ts","../../../../../../@warlock.js/fs/src/hash.ts","../../../../../../@warlock.js/fs/src/list.ts","../../../../../../@warlock.js/fs/src/read.ts","../../../../../../@warlock.js/fs/src/remove.ts","../../../../../../@warlock.js/fs/src/rename.ts","../../../../../../@warlock.js/fs/src/stats.ts","../../../../../../@warlock.js/fs/src/write.ts","../../../../../../@warlock.js/fs/src/facade/options.ts","../../../../../../@warlock.js/fs/src/facade/dirs.ts","../../../../../../@warlock.js/fs/src/facade/standard-schema.ts","../../../../../../@warlock.js/fs/src/facade/files.ts","../../../../../../@warlock.js/fs/src/facade/file.ts","../../../../../../@warlock.js/fs/src/facade/directory.ts","../../../../../../@warlock.js/fs/src/facade/fs.ts"],"sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport { mkdir, rename, unlink, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n\n/**\n * Write a file atomically.\n *\n * Writes to a uniquely-named sibling temp file first, then renames it onto\n * the target. Readers either see the old content or the complete new\n * content — never a half-written file. If anything fails mid-write the\n * temp file is cleaned up.\n *\n * Parent directories are created if missing.\n *\n * @example\n *   await atomicWriteAsync(\"manifest.json\", JSON.stringify(data));\n */\nexport async function atomicWriteAsync(filePath: string, content: string | Buffer): Promise<void> {\n  const dir = path.dirname(filePath);\n  await mkdir(dir, { recursive: true });\n\n  // Random suffix so concurrent writers don't fight over the same temp file.\n  const tempPath = path.join(dir, `.${path.basename(filePath)}.${randomBytes(6).toString(\"hex\")}.tmp`);\n\n  try {\n    await writeFile(tempPath, content);\n    await rename(tempPath, filePath);\n  } catch (error) {\n    await unlink(tempPath).catch(() => undefined);\n    throw error;\n  }\n}\n\n/**\n * Atomic write convenience for JSON values (pretty-printed, 2-space indent).\n */\nexport async function atomicWriteJsonAsync(filePath: string, value: unknown): Promise<void> {\n  await atomicWriteAsync(filePath, JSON.stringify(value, null, 2));\n}\n","import { cp, copyFile as copyFilePromise, mkdir } from \"node:fs/promises\";\nimport { copyFileSync, cpSync, mkdirSync } from \"node:fs\";\nimport path from \"node:path\";\n\n/**\n * Copy a single file. Creates the destination's parent directory if needed.\n */\nexport async function copyFileAsync(source: string, destination: string): Promise<void> {\n  await mkdir(path.dirname(destination), { recursive: true });\n  await copyFilePromise(source, destination);\n}\n\nexport function copyFile(source: string, destination: string): void {\n  mkdirSync(path.dirname(destination), { recursive: true });\n  copyFileSync(source, destination);\n}\n\n/**\n * Recursively copy a directory.\n */\nexport async function copyDirectoryAsync(source: string, destination: string): Promise<void> {\n  await cp(source, destination, { recursive: true });\n}\n\nexport function copyDirectory(source: string, destination: string): void {\n  cpSync(source, destination, { recursive: true });\n}\n","import { mkdir } from \"node:fs/promises\";\nimport { mkdirSync } from \"node:fs\";\n\n/**\n * Ensure a directory exists (recursively creating parents).\n * Idempotent — no error if the directory already exists.\n */\nexport async function ensureDirectoryAsync(path: string): Promise<void> {\n  await mkdir(path, { recursive: true });\n}\n\nexport function ensureDirectory(path: string): void {\n  mkdirSync(path, { recursive: true });\n}\n","import { access, stat } from \"node:fs/promises\";\nimport { accessSync, statSync } from \"node:fs\";\n\n/**\n * Check whether a path exists, REGARDLESS of type — resolves `true` for both\n * files and directories, `false` only when nothing is there (ENOENT).\n *\n * Pick the right check for the job:\n *   - `pathExistsAsync`      — anything at this path (file OR directory).\n *   - `fileExistsAsync`      — exists AND is a regular file.\n *   - `directoryExistsAsync` — exists AND is a directory.\n *\n * @example\n * if (await pathExistsAsync(\"/var/data\")) {\n *   // something is there — could be a file or a folder\n * }\n */\nexport async function pathExistsAsync(path: string): Promise<boolean> {\n  try {\n    await access(path);\n    return true;\n  } catch {\n    return false;\n  }\n}\n\nexport function pathExists(path: string): boolean {\n  try {\n    accessSync(path);\n    return true;\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Check whether a path exists AND is a regular file. Resolves `false` for a\n * directory — use `directoryExistsAsync` for folders, or `pathExistsAsync`\n * when the type does not matter.\n *\n * @example\n * if (await fileExistsAsync(\"/etc/config.json\")) {\n *   const raw = await readFile(\"/etc/config.json\", \"utf8\");\n * }\n */\nexport async function fileExistsAsync(path: string): Promise<boolean> {\n  try {\n    return (await stat(path)).isFile();\n  } catch {\n    return false;\n  }\n}\n\nexport function fileExists(path: string): boolean {\n  try {\n    return statSync(path).isFile();\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Check whether a path exists AND is a directory. Resolves `false` for a\n * regular file — use `fileExistsAsync` for files, or `pathExistsAsync` when\n * the type does not matter.\n *\n * @example\n * if (await directoryExistsAsync(\"/var/uploads\")) {\n *   const entries = await readdir(\"/var/uploads\");\n * }\n */\nexport async function directoryExistsAsync(path: string): Promise<boolean> {\n  try {\n    return (await stat(path)).isDirectory();\n  } catch {\n    return false;\n  }\n}\n\nexport function directoryExists(path: string): boolean {\n  try {\n    return statSync(path).isDirectory();\n  } catch {\n    return false;\n  }\n}\n","import { createHash } from \"node:crypto\";\nimport { createReadStream } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { readFileSync } from \"node:fs\";\n\nexport type HashAlgorithm = \"sha256\" | \"sha1\" | \"md5\" | \"sha512\";\n\n/**\n * Compute a hex digest of a file's contents. Uses streaming for large\n * files so memory doesn't spike when hashing big assets.\n *\n * @param path - File to hash.\n * @param algorithm - Hash algorithm (default `sha256`).\n *\n * @example\n *   const fingerprint = await hashFile(\"./bundle.js\");\n *   const quick = await hashFile(\"./small.txt\", \"md5\");\n */\nexport function hashFileAsync(\n  path: string,\n  algorithm: HashAlgorithm = \"sha256\",\n): Promise<string> {\n  return new Promise((resolve, reject) => {\n    const hash = createHash(algorithm);\n    const stream = createReadStream(path);\n    stream.on(\"data\", chunk => hash.update(chunk));\n    stream.on(\"end\", () => resolve(hash.digest(\"hex\")));\n    stream.on(\"error\", reject);\n  });\n}\n\nexport function hashFile(path: string, algorithm: HashAlgorithm = \"sha256\"): string {\n  return createHash(algorithm).update(readFileSync(path)).digest(\"hex\");\n}\n\n/**\n * Hash an in-memory string without touching disk. Convenient when the\n * caller already has the content loaded (e.g. file watcher diffing).\n */\nexport function hashString(content: string, algorithm: HashAlgorithm = \"sha256\"): string {\n  return createHash(algorithm).update(content).digest(\"hex\");\n}\n\n/**\n * Hash an arbitrary buffer.\n */\nexport function hashBuffer(\n  content: Buffer | Uint8Array,\n  algorithm: HashAlgorithm = \"sha256\",\n): string {\n  return createHash(algorithm).update(content).digest(\"hex\");\n}\n\n/**\n * Like `hashFileAsync` but reads the file in one go. Slightly faster for\n * small files; use the streaming variant for anything > ~1 MB.\n */\nexport async function hashFileSmallAsync(\n  path: string,\n  algorithm: HashAlgorithm = \"sha256\",\n): Promise<string> {\n  return createHash(algorithm).update(await readFile(path)).digest(\"hex\");\n}\n","import { readdir, stat } from \"node:fs/promises\";\nimport { readdirSync, statSync } from \"node:fs\";\nimport path from \"node:path\";\n\n/**\n * List immediate children of a directory (files + subdirs), returning\n * full paths.\n */\nexport async function listAsync(directoryPath: string): Promise<string[]> {\n  const entries = await readdir(directoryPath);\n  return entries.map(entry => path.join(directoryPath, entry));\n}\n\nexport function list(directoryPath: string): string[] {\n  return readdirSync(directoryPath).map(entry => path.join(directoryPath, entry));\n}\n\n/**\n * List only files (not subdirectories) directly inside a directory.\n */\nexport async function listFilesAsync(directoryPath: string): Promise<string[]> {\n  const entries = await listAsync(directoryPath);\n  const checks = await Promise.all(\n    entries.map(async entry => ((await stat(entry)).isFile() ? entry : null)),\n  );\n  return checks.filter((entry): entry is string => entry !== null);\n}\n\nexport function listFiles(directoryPath: string): string[] {\n  return list(directoryPath).filter(entry => statSync(entry).isFile());\n}\n\n/**\n * List only subdirectories directly inside a directory.\n */\nexport async function listDirectoriesAsync(directoryPath: string): Promise<string[]> {\n  const entries = await listAsync(directoryPath);\n  const checks = await Promise.all(\n    entries.map(async entry => ((await stat(entry)).isDirectory() ? entry : null)),\n  );\n  return checks.filter((entry): entry is string => entry !== null);\n}\n\nexport function listDirectories(directoryPath: string): string[] {\n  return list(directoryPath).filter(entry => statSync(entry).isDirectory());\n}\n","import { readFile } from \"node:fs/promises\";\nimport { readFileSync } from \"node:fs\";\n\n/**\n * Read a file as UTF-8 text.\n */\nexport async function getFileAsync(path: string): Promise<string> {\n  return readFile(path, \"utf-8\");\n}\n\nexport function getFile(path: string): string {\n  return readFileSync(path, \"utf-8\");\n}\n\n/**\n * Read a JSON file and parse it.\n *\n * @throws if the file does not exist or contains invalid JSON.\n */\nexport async function getJsonFileAsync<T = unknown>(path: string): Promise<T> {\n  return JSON.parse(await getFileAsync(path)) as T;\n}\n\nexport function getJsonFile<T = unknown>(path: string): T {\n  return JSON.parse(getFile(path)) as T;\n}\n","import { rm, unlink as unlinkPromise } from \"node:fs/promises\";\nimport { rmSync, unlinkSync } from \"node:fs\";\n\n/**\n * Delete a single file. No error if the file doesn't exist.\n */\nexport async function unlinkAsync(path: string): Promise<void> {\n  try {\n    await unlinkPromise(path);\n  } catch (error: any) {\n    if (error?.code !== \"ENOENT\") throw error;\n  }\n}\n\nexport function unlink(path: string): void {\n  try {\n    unlinkSync(path);\n  } catch (error: any) {\n    if (error?.code !== \"ENOENT\") throw error;\n  }\n}\n\n/**\n * Recursively delete a directory and its contents. No error if missing.\n */\nexport async function removeDirectoryAsync(path: string): Promise<void> {\n  await rm(path, { recursive: true, force: true });\n}\n\nexport function removeDirectory(path: string): void {\n  rmSync(path, { recursive: true, force: true });\n}\n","import { rename as renamePromise } from \"node:fs/promises\";\nimport { renameSync } from \"node:fs\";\n\n/**\n * Rename / move a file or directory.\n */\nexport async function renameFileAsync(from: string, to: string): Promise<void> {\n  await renamePromise(from, to);\n}\n\nexport function renameFile(from: string, to: string): void {\n  renameSync(from, to);\n}\n","import { stat as statPromise } from \"node:fs/promises\";\nimport { statSync } from \"node:fs\";\n\n/**\n * Get last-modified time of a path. Returns a Date.\n *\n * @throws if the path does not exist.\n */\nexport async function lastModifiedAsync(path: string): Promise<Date> {\n  return (await statPromise(path)).mtime;\n}\n\nexport function lastModified(path: string): Date {\n  return statSync(path).mtime;\n}\n\n/**\n * Return raw fs.Stats for a path.\n */\nexport async function statsAsync(path: string) {\n  return statPromise(path);\n}\n\nexport function stats(path: string) {\n  return statSync(path);\n}\n","import { mkdir, writeFile } from \"node:fs/promises\";\nimport { mkdirSync, writeFileSync } from \"node:fs\";\nimport path from \"node:path\";\n\n/**\n * Write a UTF-8 string to disk, creating any missing parent directories.\n */\nexport async function putFileAsync(filePath: string, content: string): Promise<void> {\n  await mkdir(path.dirname(filePath), { recursive: true });\n  await writeFile(filePath, content, \"utf-8\");\n}\n\nexport function putFile(filePath: string, content: string): void {\n  mkdirSync(path.dirname(filePath), { recursive: true });\n  writeFileSync(filePath, content, \"utf-8\");\n}\n\n/**\n * Write a JSON-serialisable value to disk (pretty-printed, 2-space indent).\n */\nexport async function putJsonFileAsync(filePath: string, value: unknown): Promise<void> {\n  await putFileAsync(filePath, JSON.stringify(value, null, 2));\n}\n\nexport function putJsonFile(filePath: string, value: unknown): void {\n  putFile(filePath, JSON.stringify(value, null, 2));\n}\n","import path from \"node:path\";\nimport type { Stats } from \"node:fs\";\nimport type { StandardSchemaV1 } from \"./standard-schema\";\n\n/** Read options. `encoding: null` returns a `Buffer`; otherwise a decoded string. */\nexport type ReadOptions = { encoding?: BufferEncoding | null };\n\n/**\n * JSON read options. `schema` validates the parsed value against any Standard\n * Schema (seal / zod / valibot); `default` is returned when the file is missing\n * (instead of throwing).\n */\nexport type ReadJsonOptions<T = unknown> = {\n  schema?: StandardSchemaV1<T>;\n  default?: T;\n};\n\n/** Write options shared by the string/Buffer writers. */\nexport type WriteOptions = {\n  /** Text encoding for string writes (default `utf-8`). Ignored for `Buffer`. */\n  encoding?: BufferEncoding;\n  /** Write via a temp file + rename so readers never see a half-written file. */\n  atomic?: boolean;\n  /** Create missing parent directories (default `true`). */\n  ensureDir?: boolean;\n  /** When `false`, throw if the target already exists (drives `create`). Default `true`. */\n  overwrite?: boolean;\n};\n\n/** JSON write options — adds the pretty-print `indent` (default `2`). */\nexport type WriteJsonOptions = WriteOptions & { indent?: number };\n\n/** JSON merge options — shallow spread by default; `deep` for a recursive merge. */\nexport type MergeJsonOptions = WriteJsonOptions & { deep?: boolean };\n\n/** Copy options (files + directories). */\nexport type CopyOptions = {\n  /** Overwrite an existing destination (default `true`). */\n  overwrite?: boolean;\n  /** Throw if the destination already exists (default `false`). */\n  errorOnExist?: boolean;\n  /** Follow symlinks instead of copying the link (default `false`). */\n  dereference?: boolean;\n};\n\n/** Move options. `ensureDir` (default `true`) creates the destination's parent. */\nexport type MoveOptions = {\n  overwrite?: boolean;\n  ensureDir?: boolean;\n};\n\n/** Directory-listing options. `recursive` walks the whole tree. */\nexport type ListOptions = { recursive?: boolean };\n\n/** Directory-walk options. */\nexport type WalkOptions = {\n  recursive?: boolean;\n  followSymlinks?: boolean;\n};\n\n/** One entry yielded by `walk()`. Discriminated by `type` (never `kind`). */\nexport type WalkEntry = {\n  path: string;\n  name: string;\n  type: \"file\" | \"directory\";\n};\n\n/**\n * Normalized stats — a small, stable shape (with the raw `node:fs.Stats` kept\n * on `raw` as an escape hatch). Discriminated by `type`, not `kind`.\n */\nexport type FileStats = {\n  path: string;\n  name: string;\n  size: number;\n  type: \"file\" | \"directory\";\n  lastModified: Date;\n  raw: Stats;\n};\n\n/**\n * Normalize a raw `node:fs.Stats` into a {@link FileStats}.\n *\n * @param filePath - The path the stats were read for.\n * @param raw - The raw `node:fs.Stats`.\n * @returns The normalized stats.\n */\nexport function normalizeStats(filePath: string, raw: Stats): FileStats {\n  return {\n    path: filePath,\n    name: path.basename(filePath),\n    size: raw.size,\n    type: raw.isDirectory() ? \"directory\" : \"file\",\n    lastModified: raw.mtime,\n    raw,\n  };\n}\n","import { cp, readdir, rename, rm, stat } from \"node:fs/promises\";\nimport { createHash } from \"node:crypto\";\nimport nodePath from \"node:path\";\nimport { ensureDirectoryAsync } from \"../dirs\";\nimport { directoryExistsAsync, pathExistsAsync } from \"../exists\";\nimport { hashFileAsync, type HashAlgorithm } from \"../hash\";\nimport { listAsync, listDirectoriesAsync, listFilesAsync } from \"../list\";\nimport { removeDirectoryAsync } from \"../remove\";\nimport { statsAsync } from \"../stats\";\nimport {\n  normalizeStats,\n  type CopyOptions,\n  type FileStats,\n  type ListOptions,\n  type MoveOptions,\n  type WalkEntry,\n  type WalkOptions,\n} from \"./options\";\n\n/** Recursive (by default) directory walker — a constant-memory async iterator. */\nasync function* walk(root: string, options?: WalkOptions): AsyncGenerator<WalkEntry> {\n  const recursive = options?.recursive ?? true;\n  const followSymlinks = options?.followSymlinks ?? false;\n  const stack: string[] = [root];\n\n  while (stack.length > 0) {\n    const dir = stack.pop() as string;\n    const entries = await readdir(dir, { withFileTypes: true });\n\n    for (const entry of entries) {\n      const full = nodePath.join(dir, entry.name);\n      const isLink = entry.isSymbolicLink();\n      let isDirectory = entry.isDirectory();\n\n      if (isLink && followSymlinks) {\n        isDirectory = (await stat(full)).isDirectory();\n      }\n\n      yield { path: full, name: entry.name, type: isDirectory ? \"directory\" : \"file\" };\n\n      if (isDirectory && recursive && (!isLink || followSymlinks)) {\n        stack.push(full);\n      }\n    }\n  }\n}\n\nasync function collect(root: string, keep: (entry: WalkEntry) => boolean): Promise<string[]> {\n  const paths: string[] = [];\n  for await (const entry of walk(root, { recursive: true })) {\n    if (keep(entry)) paths.push(entry.path);\n  }\n  return paths;\n}\n\nfunction ensure(path: string): Promise<void> {\n  return ensureDirectoryAsync(path);\n}\n\nfunction remove(path: string): Promise<void> {\n  return removeDirectoryAsync(path);\n}\n\n/** Clear a directory's contents but keep the directory (created if missing). */\nasync function empty(path: string): Promise<void> {\n  await ensureDirectoryAsync(path);\n  const entries = await readdir(path);\n  await Promise.all(\n    entries.map((entry) => rm(nodePath.join(path, entry), { recursive: true, force: true })),\n  );\n}\n\nfunction exists(path: string): Promise<boolean> {\n  return directoryExistsAsync(path);\n}\n\nasync function copy(from: string, to: string, options?: CopyOptions): Promise<void> {\n  if ((options?.errorOnExist || options?.overwrite === false) && (await pathExistsAsync(to))) {\n    throw new Error(`fs.dirs.copy: destination \"${to}\" already exists`);\n  }\n\n  // Only set optional keys when defined — Node's cp rejects `undefined` values\n  // (they must be booleans when the property is present).\n  const cpOptions: Parameters<typeof cp>[2] = {\n    recursive: true,\n    force: options?.overwrite !== false,\n  };\n  if (options?.errorOnExist !== undefined) cpOptions.errorOnExist = options.errorOnExist;\n  if (options?.dereference !== undefined) cpOptions.dereference = options.dereference;\n\n  await cp(from, to, cpOptions);\n}\n\n/** Move a directory, EXDEV-safe: rename, falling back to copy+remove across devices. */\nasync function move(from: string, to: string, options?: MoveOptions): Promise<void> {\n  if (options?.overwrite === false && (await pathExistsAsync(to))) {\n    throw new Error(`fs.dirs.move: destination \"${to}\" already exists`);\n  }\n\n  if (options?.ensureDir !== false) {\n    await ensureDirectoryAsync(nodePath.dirname(to));\n  }\n\n  try {\n    await rename(from, to);\n  } catch (error) {\n    if ((error as { code?: string }).code === \"EXDEV\") {\n      await cp(from, to, { recursive: true });\n      await removeDirectoryAsync(from);\n      return;\n    }\n    throw error;\n  }\n}\n\nasync function stats(path: string): Promise<FileStats> {\n  return normalizeStats(path, await statsAsync(path));\n}\n\n/** Total byte size of a directory tree (sum of file sizes). */\nasync function size(path: string): Promise<number> {\n  let total = 0;\n  for await (const entry of walk(path, { recursive: true })) {\n    if (entry.type === \"file\") {\n      total += (await stat(entry.path)).size;\n    }\n  }\n  return total;\n}\n\n/** Number of immediate entries (files + subdirectories). */\nasync function count(path: string): Promise<number> {\n  return (await readdir(path)).length;\n}\n\nasync function isEmpty(path: string): Promise<boolean> {\n  return (await readdir(path)).length === 0;\n}\n\nfunction list(path: string, options?: ListOptions): Promise<string[]> {\n  return options?.recursive ? collect(path, () => true) : listAsync(path);\n}\n\nfunction listFiles(path: string, options?: ListOptions): Promise<string[]> {\n  return options?.recursive\n    ? collect(path, (entry) => entry.type === \"file\")\n    : listFilesAsync(path);\n}\n\nfunction listDirs(path: string, options?: ListOptions): Promise<string[]> {\n  return options?.recursive\n    ? collect(path, (entry) => entry.type === \"directory\")\n    : listDirectoriesAsync(path);\n}\n\n/**\n * Stable fingerprint of a directory tree: hashes every file (path-sorted) and\n * folds the relative path + per-file digest into one hash. Two trees with the\n * same relative layout + contents produce the same hash.\n */\nasync function hash(path: string, algorithm?: HashAlgorithm): Promise<string> {\n  const filePaths = (await collect(path, (entry) => entry.type === \"file\")).sort();\n  const digest = createHash(algorithm ?? \"sha256\");\n\n  for (const filePath of filePaths) {\n    const relative = nodePath.relative(path, filePath).split(nodePath.sep).join(\"/\");\n    digest.update(`${relative}\\0${await hashFileAsync(filePath, algorithm)}\\n`);\n  }\n\n  return digest.digest(\"hex\");\n}\n\n/**\n * The `fs.dirs.*` facade — an async, ergonomic surface over the directory\n * primitives, plus recursive `walk`/`list*`/`size` and a directory fingerprint.\n */\nexport const dirs = {\n  ensure,\n  remove,\n  empty,\n  exists,\n  copy,\n  move,\n  stats,\n  size,\n  count,\n  isEmpty,\n  list,\n  listFiles,\n  listDirs,\n  walk,\n  hash,\n};\n","/**\n * Minimal, vendor-neutral [Standard Schema](https://standardschema.dev) v1\n * interface, declared locally so `@warlock.js/fs` takes **zero dependencies**\n * (not even a type-only one) to support schema-validated JSON reads.\n *\n * Any Standard-Schema-compliant validator satisfies this — `@warlock.js/seal`\n * (every seal validator is `& StandardSchemaV1`), zod, valibot, etc. — so\n * `fs.files.getJson(path, { schema })` is validator-agnostic and validates by\n * calling the schema's own `~standard.validate`, with no runtime import.\n */\nexport interface StandardSchemaV1<Output = unknown> {\n  readonly \"~standard\": {\n    readonly version: 1;\n    readonly vendor: string;\n    readonly validate: (\n      value: unknown,\n    ) => StandardSchemaResult<Output> | Promise<StandardSchemaResult<Output>>;\n  };\n}\n\n/** A Standard Schema validation issue. */\nexport type StandardSchemaIssue = {\n  readonly message: string;\n  readonly path?: ReadonlyArray<PropertyKey | { readonly key: PropertyKey }>;\n};\n\n/** Success carries the (possibly transformed) value; failure carries issues. */\nexport type StandardSchemaResult<Output> =\n  | { readonly value: Output; readonly issues?: undefined }\n  | { readonly issues: ReadonlyArray<StandardSchemaIssue> };\n\n/**\n * Thrown when a `getJson({ schema })` read fails Standard Schema validation.\n * Carries the raw issues so callers can inspect what failed.\n */\nexport class JsonSchemaValidationError extends Error {\n  public constructor(\n    public readonly path: string,\n    public readonly issues: ReadonlyArray<StandardSchemaIssue>,\n  ) {\n    const summary = issues.map((issue) => issue.message).join(\"; \");\n    super(`JSON at \"${path}\" failed schema validation: ${summary}`);\n    this.name = \"JsonSchemaValidationError\";\n  }\n}\n\n/**\n * Validate an already-parsed value against a Standard Schema. Awaits the\n * (possibly async) `~standard.validate`, returns the validated/transformed\n * value on success, and throws {@link JsonSchemaValidationError} on failure.\n *\n * @param path - Source path, for the error message.\n * @param schema - Any Standard Schema validator.\n * @param value - The parsed JSON value to validate.\n * @returns The validated (possibly transformed) value.\n */\nexport async function validateAgainstSchema<T>(\n  path: string,\n  schema: StandardSchemaV1<T>,\n  value: unknown,\n): Promise<T> {\n  const result = await schema[\"~standard\"].validate(value);\n\n  if (\"issues\" in result && result.issues) {\n    throw new JsonSchemaValidationError(path, result.issues);\n  }\n\n  return (result as { value: T }).value;\n}\n","import { appendFile, readFile, rename, utimes, writeFile } from \"node:fs/promises\";\nimport { createReadStream } from \"node:fs\";\nimport readline from \"node:readline\";\nimport nodePath from \"node:path\";\nimport { atomicWriteAsync } from \"../atomic\";\nimport { copyFileAsync } from \"../copy\";\nimport { ensureDirectoryAsync } from \"../dirs\";\nimport { fileExistsAsync, pathExistsAsync } from \"../exists\";\nimport { hashFileAsync, type HashAlgorithm } from \"../hash\";\nimport { getFileAsync } from \"../read\";\nimport { unlinkAsync } from \"../remove\";\nimport { lastModifiedAsync, statsAsync } from \"../stats\";\nimport { putFileAsync } from \"../write\";\nimport {\n  normalizeStats,\n  type CopyOptions,\n  type FileStats,\n  type MergeJsonOptions,\n  type MoveOptions,\n  type ReadJsonOptions,\n  type ReadOptions,\n  type WriteJsonOptions,\n  type WriteOptions,\n} from \"./options\";\nimport { validateAgainstSchema } from \"./standard-schema\";\n\nfunction isENOENT(error: unknown): boolean {\n  return (error as { code?: string } | null)?.code === \"ENOENT\";\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n  return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction deepMerge(target: unknown, source: unknown): unknown {\n  if (!isPlainObject(target) || !isPlainObject(source)) return source;\n\n  const output: Record<string, unknown> = { ...target };\n\n  for (const [key, value] of Object.entries(source)) {\n    output[key] = isPlainObject(value) && isPlainObject(output[key])\n      ? deepMerge(output[key], value)\n      : value;\n  }\n\n  return output;\n}\n\n/** Read a file as text (utf-8) or, when `encoding: null`, as a `Buffer`. */\nfunction get(path: string): Promise<string>;\nfunction get(path: string, options: ReadOptions & { encoding: null }): Promise<Buffer>;\nfunction get(path: string, options: ReadOptions): Promise<string | Buffer>;\nasync function get(path: string, options?: ReadOptions): Promise<string | Buffer> {\n  if (options && options.encoding === null) {\n    return readFile(path);\n  }\n\n  return readFile(path, options?.encoding ?? \"utf-8\");\n}\n\n/**\n * Read + parse JSON. `options.schema` validates the parsed value against any\n * Standard Schema; `options.default` is returned when the file is missing.\n */\nasync function getJson<T = unknown>(path: string, options?: ReadJsonOptions<T>): Promise<T> {\n  let raw: string;\n\n  try {\n    raw = await getFileAsync(path);\n  } catch (error) {\n    if (options && \"default\" in options && isENOENT(error)) {\n      return options.default as T;\n    }\n    throw error;\n  }\n\n  const value = JSON.parse(raw) as T;\n\n  if (options?.schema) {\n    return validateAgainstSchema(path, options.schema, value);\n  }\n\n  return value;\n}\n\n/** Write a file. Routes Buffers / `{ atomic }` through the atomic writer. */\nasync function put(\n  path: string,\n  content: string | Buffer,\n  options?: WriteOptions,\n): Promise<void> {\n  if (options?.overwrite === false && (await pathExistsAsync(path))) {\n    throw new Error(`fs.files: refusing to overwrite existing path \"${path}\" (overwrite:false)`);\n  }\n\n  if (typeof content !== \"string\" || options?.atomic) {\n    await atomicWriteAsync(path, content);\n    return;\n  }\n\n  const encoding = options?.encoding ?? \"utf-8\";\n\n  if (options?.ensureDir === false) {\n    await writeFile(path, content, encoding);\n    return;\n  }\n\n  if (encoding === \"utf-8\") {\n    await putFileAsync(path, content);\n    return;\n  }\n\n  await ensureDirectoryAsync(nodePath.dirname(path));\n  await writeFile(path, content, encoding);\n}\n\nasync function putJson(path: string, value: unknown, options?: WriteJsonOptions): Promise<void> {\n  await put(path, JSON.stringify(value, null, options?.indent ?? 2), options);\n}\n\n/** Create a file, refusing to overwrite an existing one (`put` with `overwrite:false`). */\nasync function create(path: string, content: string | Buffer, options?: WriteOptions): Promise<void> {\n  await put(path, content, { ...options, overwrite: false });\n}\n\nasync function createJson(path: string, value: unknown, options?: WriteJsonOptions): Promise<void> {\n  await putJson(path, value, { ...options, overwrite: false });\n}\n\nfunction exists(path: string): Promise<boolean> {\n  return fileExistsAsync(path);\n}\n\nfunction remove(path: string): Promise<void> {\n  return unlinkAsync(path);\n}\n\nasync function copy(from: string, to: string, options?: CopyOptions): Promise<void> {\n  if ((options?.errorOnExist || options?.overwrite === false) && (await pathExistsAsync(to))) {\n    throw new Error(`fs.files.copy: destination \"${to}\" already exists`);\n  }\n\n  await copyFileAsync(from, to);\n}\n\n/** Move a file, EXDEV-safe: rename, falling back to copy+unlink across devices. */\nasync function move(from: string, to: string, options?: MoveOptions): Promise<void> {\n  if (options?.overwrite === false && (await pathExistsAsync(to))) {\n    throw new Error(`fs.files.move: destination \"${to}\" already exists`);\n  }\n\n  if (options?.ensureDir !== false) {\n    await ensureDirectoryAsync(nodePath.dirname(to));\n  }\n\n  try {\n    await rename(from, to);\n  } catch (error) {\n    if ((error as { code?: string }).code === \"EXDEV\") {\n      await copyFileAsync(from, to);\n      await unlinkAsync(from);\n      return;\n    }\n    throw error;\n  }\n}\n\nasync function stats(path: string): Promise<FileStats> {\n  return normalizeStats(path, await statsAsync(path));\n}\n\nfunction lastModified(path: string): Promise<Date> {\n  return lastModifiedAsync(path);\n}\n\nfunction hash(path: string, algorithm?: HashAlgorithm): Promise<string> {\n  return hashFileAsync(path, algorithm);\n}\n\nasync function append(path: string, content: string | Buffer, options?: WriteOptions): Promise<void> {\n  if (options?.ensureDir !== false) {\n    await ensureDirectoryAsync(nodePath.dirname(path));\n  }\n  await appendFile(path, content, typeof content === \"string\" ? (options?.encoding ?? \"utf-8\") : undefined);\n}\n\nasync function prepend(path: string, content: string | Buffer, options?: WriteOptions): Promise<void> {\n  let existing = \"\";\n  try {\n    existing = await getFileAsync(path);\n  } catch (error) {\n    if (!isENOENT(error)) throw error;\n  }\n  await put(path, `${content.toString()}${existing}`, options);\n}\n\nfunction appendLine(path: string, line: string): Promise<void> {\n  return append(path, `${line}\\n`);\n}\n\nfunction appendJsonLine(path: string, value: unknown): Promise<void> {\n  return append(path, `${JSON.stringify(value)}\\n`);\n}\n\nasync function size(path: string): Promise<number> {\n  return (await statsAsync(path)).size;\n}\n\nasync function isEmpty(path: string): Promise<boolean> {\n  return (await statsAsync(path)).size === 0;\n}\n\n/** Create an empty file if missing (and its parents). Never truncates an existing file. */\nasync function ensure(path: string): Promise<void> {\n  if (!(await pathExistsAsync(path))) {\n    await putFileAsync(path, \"\");\n  }\n}\n\n/** Create the file if missing, otherwise bump its modified time. */\nasync function touch(path: string): Promise<void> {\n  if (await pathExistsAsync(path)) {\n    const now = new Date();\n    await utimes(path, now, now);\n    return;\n  }\n  await putFileAsync(path, \"\");\n}\n\n/** Read → transform → write (text). */\nasync function edit(\n  path: string,\n  editor: (content: string) => string | Promise<string>,\n): Promise<void> {\n  const next = await editor(await getFileAsync(path));\n  await put(path, next);\n}\n\n/** Read → transform → write (JSON value). */\nasync function editJson<T = unknown>(\n  path: string,\n  editor: (value: T) => T | Promise<T>,\n  options?: WriteJsonOptions,\n): Promise<void> {\n  const next = await editor(await getJson<T>(path));\n  await putJson(path, next, options);\n}\n\n/** Read → merge a partial into the JSON object → write. Shallow unless `{ deep:true }`. */\nasync function mergeJson<T = Record<string, unknown>>(\n  path: string,\n  partial: Partial<T>,\n  options?: MergeJsonOptions,\n): Promise<void> {\n  const current = await getJson<T>(path);\n  const merged = options?.deep\n    ? (deepMerge(current, partial) as T)\n    : ({ ...current, ...partial } as T);\n  await putJson(path, merged, options);\n}\n\n/** Return the parsed JSON, or create the file with `fallback` and return it. */\nasync function ensureJson<T = unknown>(\n  path: string,\n  fallback: T,\n  options?: WriteJsonOptions,\n): Promise<T> {\n  if (await pathExistsAsync(path)) {\n    return getJson<T>(path);\n  }\n  await putJson(path, fallback, options);\n  return fallback;\n}\n\n/** Compare a file's digest against an expected hash (case-insensitive). */\nasync function checksumMatches(\n  path: string,\n  expected: string,\n  algorithm?: HashAlgorithm,\n): Promise<boolean> {\n  const actual = await hashFileAsync(path, algorithm);\n  return actual.toLowerCase() === expected.toLowerCase();\n}\n\n/** Stream a text file line by line (constant memory). */\nfunction readLines(path: string): AsyncIterable<string> {\n  return {\n    async *[Symbol.asyncIterator]() {\n      const rl = readline.createInterface({\n        input: createReadStream(path, { encoding: \"utf-8\" }),\n        crlfDelay: Infinity,\n      });\n      try {\n        for await (const line of rl) {\n          yield line;\n        }\n      } finally {\n        rl.close();\n      }\n    },\n  };\n}\n\n/**\n * The `fs.files.*` facade — an async, ergonomic surface over the file\n * primitives. Sync callers stay on the bare primitives (`getFile`/`putFile`/…).\n */\nexport const files = {\n  get,\n  getJson,\n  put,\n  putJson,\n  create,\n  createJson,\n  exists,\n  remove,\n  copy,\n  move,\n  stats,\n  lastModified,\n  hash,\n  append,\n  prepend,\n  appendLine,\n  appendJsonLine,\n  size,\n  isEmpty,\n  ensure,\n  touch,\n  edit,\n  editJson,\n  mergeJson,\n  ensureJson,\n  checksumMatches,\n  readLines,\n};\n","import nodePath from \"node:path\";\nimport { files } from \"./files\";\nimport { Directory } from \"./directory\";\nimport type { HashAlgorithm } from \"../hash\";\nimport type {\n  CopyOptions,\n  FileStats,\n  MergeJsonOptions,\n  MoveOptions,\n  ReadJsonOptions,\n  ReadOptions,\n  WriteJsonOptions,\n  WriteOptions,\n} from \"./options\";\n\nfunction dirPathOf(dir: string | Directory): string {\n  return typeof dir === \"string\" ? dir : dir.path;\n}\n\n/**\n * A lazy, **immutable** handle to a file path. The constructor does zero IO;\n * path helpers (`name`/`extension`/`basename`/`parent`) are pure `node:path`.\n * `copy`/`move`/`copyTo`/`moveTo`/`rename` return a NEW handle to the\n * destination and never mutate `this.path`.\n *\n * @example\n * const pkg = fs.file(\"package.json\");\n * await pkg.editJson<Pkg>((p) => ({ ...p, version: \"4.7.0\" }));\n * pkg.extension; // \".json\"\n */\nexport class File {\n  public constructor(public readonly path: string) {}\n\n  /** Basename including extension (`\"user.model.ts\"`). */\n  public get name(): string {\n    return nodePath.basename(this.path);\n  }\n\n  /** Basename without extension (`\"user.model\"`). */\n  public get basename(): string {\n    return nodePath.basename(this.path, nodePath.extname(this.path));\n  }\n\n  /** Extension including the dot (`\".ts\"`), or `\"\"` when there is none. */\n  public get extension(): string {\n    return nodePath.extname(this.path);\n  }\n\n  /** Handle to the parent directory (pure path — no IO). */\n  public parent(): Directory {\n    return new Directory(nodePath.dirname(this.path));\n  }\n\n  public get(): Promise<string>;\n  public get(options: ReadOptions & { encoding: null }): Promise<Buffer>;\n  public get(options: ReadOptions): Promise<string | Buffer>;\n  public get(options?: ReadOptions): Promise<string | Buffer> {\n    return files.get(this.path, (options ?? {}) as ReadOptions);\n  }\n\n  public getJson<T = unknown>(options?: ReadJsonOptions<T>): Promise<T> {\n    return files.getJson<T>(this.path, options);\n  }\n\n  public put(content: string | Buffer, options?: WriteOptions): Promise<void> {\n    return files.put(this.path, content, options);\n  }\n\n  public putJson(value: unknown, options?: WriteJsonOptions): Promise<void> {\n    return files.putJson(this.path, value, options);\n  }\n\n  public append(content: string | Buffer, options?: WriteOptions): Promise<void> {\n    return files.append(this.path, content, options);\n  }\n\n  public prepend(content: string | Buffer, options?: WriteOptions): Promise<void> {\n    return files.prepend(this.path, content, options);\n  }\n\n  public appendJsonLine(value: unknown): Promise<void> {\n    return files.appendJsonLine(this.path, value);\n  }\n\n  public edit(editor: (content: string) => string | Promise<string>): Promise<void> {\n    return files.edit(this.path, editor);\n  }\n\n  public editJson<T = unknown>(\n    editor: (value: T) => T | Promise<T>,\n    options?: WriteJsonOptions,\n  ): Promise<void> {\n    return files.editJson<T>(this.path, editor, options);\n  }\n\n  public mergeJson<T = Record<string, unknown>>(\n    partial: Partial<T>,\n    options?: MergeJsonOptions,\n  ): Promise<void> {\n    return files.mergeJson<T>(this.path, partial, options);\n  }\n\n  public exists(): Promise<boolean> {\n    return files.exists(this.path);\n  }\n\n  public isEmpty(): Promise<boolean> {\n    return files.isEmpty(this.path);\n  }\n\n  public ensure(): Promise<void> {\n    return files.ensure(this.path);\n  }\n\n  public touch(): Promise<void> {\n    return files.touch(this.path);\n  }\n\n  public remove(): Promise<void> {\n    return files.remove(this.path);\n  }\n\n  public async copy(to: string, options?: CopyOptions): Promise<File> {\n    await files.copy(this.path, to, options);\n    return new File(to);\n  }\n\n  /** Copy into a directory, keeping this file's name. */\n  public async copyTo(dir: string | Directory, options?: CopyOptions): Promise<File> {\n    const target = nodePath.join(dirPathOf(dir), this.name);\n    await files.copy(this.path, target, options);\n    return new File(target);\n  }\n\n  public async move(to: string, options?: MoveOptions): Promise<File> {\n    await files.move(this.path, to, options);\n    return new File(to);\n  }\n\n  /** Move into a directory, keeping this file's name. */\n  public async moveTo(dir: string | Directory, options?: MoveOptions): Promise<File> {\n    const target = nodePath.join(dirPathOf(dir), this.name);\n    await files.move(this.path, target, options);\n    return new File(target);\n  }\n\n  /** Rename within the same parent directory. */\n  public async rename(newName: string, options?: MoveOptions): Promise<File> {\n    const target = nodePath.join(nodePath.dirname(this.path), newName);\n    await files.move(this.path, target, options);\n    return new File(target);\n  }\n\n  public stats(): Promise<FileStats> {\n    return files.stats(this.path);\n  }\n\n  public size(): Promise<number> {\n    return files.size(this.path);\n  }\n\n  public lastModified(): Promise<Date> {\n    return files.lastModified(this.path);\n  }\n\n  public hash(algorithm?: HashAlgorithm): Promise<string> {\n    return files.hash(this.path, algorithm);\n  }\n\n  public readLines(): AsyncIterable<string> {\n    return files.readLines(this.path);\n  }\n}\n","import nodePath from \"node:path\";\nimport { dirs } from \"./dirs\";\nimport { File } from \"./file\";\nimport type { HashAlgorithm } from \"../hash\";\nimport type {\n  CopyOptions,\n  FileStats,\n  ListOptions,\n  MoveOptions,\n  WalkEntry,\n  WalkOptions,\n} from \"./options\";\n\n/**\n * A lazy, **immutable** handle to a directory path. The constructor does zero\n * IO; path helpers (`name`/`parent`/`file`/`dir`) are pure `node:path`.\n * `copy`/`move` return a NEW handle to the destination. `listFiles`/`listDirs`\n * return `File`/`Directory` handles (not bare strings).\n *\n * @example\n * const src = fs.dir(\"src\");\n * for (const f of await src.listFiles({ recursive: true })) {\n *   if (f.extension === \".ts\") { ... }\n * }\n */\nexport class Directory {\n  public constructor(public readonly path: string) {}\n\n  /** Basename of this directory (`\"users\"`). */\n  public get name(): string {\n    return nodePath.basename(this.path);\n  }\n\n  /** Handle to the parent directory (pure path — no IO). */\n  public parent(): Directory {\n    return new Directory(nodePath.dirname(this.path));\n  }\n\n  /** Handle to a child file (pure path — no IO). */\n  public file(...segments: string[]): File {\n    return new File(nodePath.join(this.path, ...segments));\n  }\n\n  /** Handle to a child directory (pure path — no IO). */\n  public dir(...segments: string[]): Directory {\n    return new Directory(nodePath.join(this.path, ...segments));\n  }\n\n  public ensure(): Promise<void> {\n    return dirs.ensure(this.path);\n  }\n\n  public remove(): Promise<void> {\n    return dirs.remove(this.path);\n  }\n\n  public empty(): Promise<void> {\n    return dirs.empty(this.path);\n  }\n\n  public exists(): Promise<boolean> {\n    return dirs.exists(this.path);\n  }\n\n  public isEmpty(): Promise<boolean> {\n    return dirs.isEmpty(this.path);\n  }\n\n  public count(): Promise<number> {\n    return dirs.count(this.path);\n  }\n\n  public async copy(to: string, options?: CopyOptions): Promise<Directory> {\n    await dirs.copy(this.path, to, options);\n    return new Directory(to);\n  }\n\n  public async move(to: string, options?: MoveOptions): Promise<Directory> {\n    await dirs.move(this.path, to, options);\n    return new Directory(to);\n  }\n\n  public stats(): Promise<FileStats> {\n    return dirs.stats(this.path);\n  }\n\n  public size(): Promise<number> {\n    return dirs.size(this.path);\n  }\n\n  public list(options?: ListOptions): Promise<string[]> {\n    return dirs.list(this.path, options);\n  }\n\n  public async listFiles(options?: ListOptions): Promise<File[]> {\n    return (await dirs.listFiles(this.path, options)).map((path) => new File(path));\n  }\n\n  public async listDirs(options?: ListOptions): Promise<Directory[]> {\n    return (await dirs.listDirs(this.path, options)).map((path) => new Directory(path));\n  }\n\n  public walk(options?: WalkOptions): AsyncIterable<WalkEntry> {\n    return dirs.walk(this.path, options);\n  }\n\n  public hash(algorithm?: HashAlgorithm): Promise<string> {\n    return dirs.hash(this.path, algorithm);\n  }\n}\n","import { pathExistsAsync } from \"../exists\";\nimport { hashBuffer, hashFileAsync, hashString, type HashAlgorithm } from \"../hash\";\nimport { Directory } from \"./directory\";\nimport { dirs } from \"./dirs\";\nimport { File } from \"./file\";\nimport { files } from \"./files\";\n\n/**\n * The `fs` shorthand facade — an async, ergonomic surface over\n * `@warlock.js/fs`'s primitives:\n *\n * - `fs.files.*` — file operations\n * - `fs.dirs.*` — directory operations\n * - `fs.file(path)` / `fs.dir(path)` — lazy `File` / `Directory` handles\n * - `fs.exists(path)` — type-agnostic existence (file OR directory)\n *\n * Async-only by design: synchronous callers use the bare primitives\n * (`getFile` / `putFile` / …), which keep the package's `bare = sync`,\n * `*Async = async` charter. `fs.*` never sandboxes paths — path containment is\n * the storage layer's job.\n *\n * @example\n * import { fs } from \"@warlock.js/fs\";\n *\n * await fs.files.put(\"cache/data.json\", \"{}\", { atomic: true });\n * const cfg = await fs.files.getJson(\"config.json\", { schema, default: {} });\n * const dir = fs.dir(\"uploads\");\n * if (await dir.isEmpty()) { ... }\n */\nexport const fs = {\n  files,\n  dirs,\n\n  /**\n   * Hashing — `file`/`dir` are async (they read from disk); `string`/`buffer`\n   * are sync (pure, in-memory — no IO to await). Defaults to SHA-256.\n   */\n  hash: {\n    file: (path: string, algorithm?: HashAlgorithm): Promise<string> =>\n      hashFileAsync(path, algorithm),\n    dir: (path: string, algorithm?: HashAlgorithm): Promise<string> => dirs.hash(path, algorithm),\n    string: (content: string, algorithm?: HashAlgorithm): string => hashString(content, algorithm),\n    buffer: (content: Buffer | Uint8Array, algorithm?: HashAlgorithm): string =>\n      hashBuffer(content, algorithm),\n  },\n\n  /** Does anything exist at this path (file OR directory)? */\n  exists(path: string): Promise<boolean> {\n    return pathExistsAsync(path);\n  },\n\n  /** A lazy handle to a file path (no IO until a method is called). */\n  file(path: string): File {\n    return new File(path);\n  },\n\n  /** A lazy handle to a directory path (no IO until a method is called). */\n  dir(path: string): Directory {\n    return new Directory(path);\n  },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,eAAsB,iBAAiB,UAAkB,SAAyC;CAChG,MAAM,MAAMA,kBAAK,QAAQ,QAAQ;CACjC,kCAAY,KAAK,EAAE,WAAW,KAAK,CAAC;CAGpC,MAAM,WAAWA,kBAAK,KAAK,KAAK,IAAIA,kBAAK,SAAS,QAAQ,EAAE,gCAAe,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK;CAEnG,IAAI;EACF,sCAAgB,UAAU,OAAO;EACjC,mCAAa,UAAU,QAAQ;CACjC,SAAS,OAAO;EACd,mCAAa,QAAQ,CAAC,CAAC,YAAY,MAAS;EAC5C,MAAM;CACR;AACF;;;;AAKA,eAAsB,qBAAqB,UAAkB,OAA+B;CAC1F,MAAM,iBAAiB,UAAU,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