/**
 * @packageDocumentation
 * Node entry point. Synchronously reads, decompresses, and parses the
 * bundled `data/procedures.json.gz` snapshot at module load time, then
 * exposes the result as a single eager constant. Suitable for server-side
 * Node consumers.
 *
 * Browser and edge consumers should use the {@link "./browser"} entry point
 * instead, which performs the same work asynchronously via `fetch` and
 * `DecompressionStream`.
 */
import { readFileSync } from 'node:fs';
import { gunzipSync } from 'node:zlib';
import { resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const dataPath = resolve(dirname(fileURLToPath(import.meta.url)), '../data/procedures.json.gz');
const raw = JSON.parse(gunzipSync(readFileSync(dataPath)).toString('utf-8'));
/**
 * Pre-processed snapshot of US instrument procedure data derived from
 * the FAA CIFP (Coded Instrument Flight Procedures) 28-day cycle.
 *
 * Contains Standard Instrument Departures (SIDs), Standard Terminal
 * Arrival Routes (STARs), and Instrument Approach Procedures (IAPs) in
 * the unified ARINC 424 leg model, including path terminators,
 * altitude and speed constraints, recommended navaids, RNP values, and
 * FAF / MAP / IAF / FACF flags.
 *
 * Pass the `records` array directly to `createProcedureResolver()` from
 * `@squawk/procedures` for zero-config lookups:
 *
 * ```typescript
 * import { usBundledProcedures } from '@squawk/procedure-data';
 * import { createProcedureResolver } from '@squawk/procedures';
 *
 * const resolver = createProcedureResolver({ data: usBundledProcedures.records });
 * ```
 */
export const usBundledProcedures = {
    properties: raw.meta,
    records: raw.records,
};
