/**
 * Base utility functions shared between Node.js and Browser
 * All functions use standard Web APIs that work in both environments
 * (Node.js 16+ supports atob/btoa/TextEncoder/TextDecoder globally)
 */
/**
 * Convert base64 string to Uint8Array
 * Uses native Buffer in Node.js for better performance
 */
export declare function base64ToUint8Array(base64: string): Uint8Array;
export declare function delay(ms: number): Promise<void>;
export declare function dateToExcel(d: Date, date1904?: boolean): number;
export declare function excelToDate(v: number, date1904?: boolean): Date;
/**
 * Parse an OOXML date string into a Date object.
 * OOXML dates like "2024-01-15T00:00:00" lack a timezone suffix,
 * which some JS engines parse as local time. Appending "Z" forces UTC.
 */
export declare function parseOoxmlDate(raw: string): Date;
export declare function xmlDecode(text: string): string;
/**
 * Encode special characters for XML output
 * Handles XML entities (< > & " ') and removes invalid control characters
 */
export declare function xmlEncode(text: string): string;
export declare function validInt(value: string | number): number;
export declare function isDateFmt(fmt: string | null | undefined): boolean;
export declare function parseBoolean(value: unknown): boolean;
export declare function range(start: number, stop: number, step?: number): Generator<number>;
export declare function toSortedArray<T>(values: Iterable<T>): T[];
/**
 * Convert a Buffer, ArrayBuffer, or Uint8Array to a UTF-8 string
 * Works in both Node.js and browser environments
 */
export declare function bufferToString(chunk: ArrayBuffer | Uint8Array | string): string;
/**
 * Convert Uint8Array to base64 string
 * Uses native Buffer in Node.js, optimized chunked conversion in browser
 */
export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
/**
 * Convert string to UTF-16LE Uint8Array (used for Excel password hashing)
 */
export declare function stringToUtf16Le(str: string): Uint8Array;
