import { n as StateCode } from "./states-BHJ5gB-2.js"; //#region src/generate-voter-id/generate-voter-id.d.ts /** * Generates a valid random Brazilian voter id (título de eleitor). * * Uses `Math.random()` internally, so it is not cryptographically secure, do not use for security purposes. * * @param {StateCode | "ZZ"} state - Optional. The Brazilian state code to generate a voter id * for, or `"ZZ"` for a voter id issued abroad. Defaults to `"ZZ"` when omitted or unknown, a key * of the prototype chain (`"__proto__"`, `"constructor"`) and a value that is not a string * included, so a malformed state never throws. * @returns {string} A valid 12-digit voter id string without formatting. * * @example * ```typescript * generateVoterId(); // "123456782895" (abroad, UF "28") * generateVoterId("SP"); // "123456780191" (UF "01") * generateVoterId("XX" as StateCode); // falls back to "ZZ" instead of throwing * ``` * * Resolução TSE nº 23.659/2021, art. 36, parágrafo único, confirms the federative union table and * the two-step módulo 11 structure; the weights themselves are not published by the TSE and follow * the community reference cited as `Based on:`. * * The TSE resolution page sits behind a bot filter and answers HTTP 403 to every non-browser * client, so it has to be opened in a browser. * * @see Official: https://www.tse.jus.br/legislacao/compilada/res/2021/resolucao-no-23-659-de-26-de-outubro-de-2021 * @see Based on: https://siga0984.wordpress.com/2019/05/01/algoritmos-validacao-de-titulo-de-eleitor/ */ export declare const generateVoterId: (state?: StateCode | "ZZ") => string; //#endregion export type { StateCode };