import { U as UfCode, p as NfeChaveValidationResult, F as FormatResult } from './validation-result-D4Wrxl7j.js'; export { D as DocumentFormat, N as NfeChave, o as NfeChaveParsed, V as ValidationErrorCode, Q as ValidationResult } from './validation-result-D4Wrxl7j.js'; /** * NF-e / NFC-e chave de acesso — 44 digits (ENCAT / SEFAZ MOC). * @see https://www.nfe.fazenda.gov.br/portal/listaConteudo.aspx?tipoConteudo=ndIjl+iEFdE%3D — MOC 7.0 index * @see http://moc.sped.fazenda.pr.gov.br/ — MOC online (SEFAZ-PR mirror), §2.2.6 * @see https://www.confaz.fazenda.gov.br/legislacao/arquivo-manuais/moc7-visao-geral.pdf — MOC 7.0 §2.2.6.1–2.2.6.2 */ declare const NFE_CHAVE_OFFICIAL_SOURCE_URL = "https://www.nfe.fazenda.gov.br/portal/listaConteudo.aspx?tipoConteudo=ndIjl+iEFdE%3D"; declare const NFE_CHAVE_MOC_ONLINE_URL = "http://moc.sped.fazenda.pr.gov.br/"; declare const NFE_CHAVE_MOC_DV_SECTION_URL = "http://moc.sped.fazenda.pr.gov.br/#2.2.6.2. C\u00E1lculo do D\u00EDgito Verificador da Chave de Acesso da NF-e"; declare const NFE_CHAVE_MOC_PDF_URL = "https://www.confaz.fazenda.gov.br/legislacao/arquivo-manuais/moc7-visao-geral.pdf"; declare const NFE_CHAVE_DFE_PORTAL_URL = "https://dfe-portal.svrs.rs.gov.br/NFe/Documentos"; /** MOC DANFE NFC-e QR Code page — illustrative chave (DV inconsistent with §2.2.6.2). */ declare const NFE_CHAVE_NFCE_QR_ILLUSTRATIVE_URL = "http://moc.sped.fazenda.pr.gov.br/DanfeQrCodeNFCe.html"; declare const NFE_CHAVE_LENGTH = 44; declare const NFE_CHAVE_BASE_LENGTH = 43; declare const NFE_CHAVE_MOD = 11; declare const NFE_CHAVE_WEIGHT_CYCLE: readonly [2, 3, 4, 5, 6, 7, 8, 9]; declare const NFE_CHAVE_NUMERIC_PATTERN: RegExp; /** * Golden primary — MOC §2.2.6.2 worked example (sum=644, remainder=6, DV=5). * Base 43 digits from MOC table; DV appended per modulo-11 rule. */ declare const NFE_CHAVE_GOLDEN_PRIMARY = "52060433009911002506550120000007800267301615"; /** Secondary valid vector from MOC online examples. */ declare const NFE_CHAVE_GOLDEN_SECONDARY = "41180678393592000146558900000006041028190697"; /** MOC NFC-e QR page illustrative chave — fails DV under §2.2.6.2 (not used as valid golden). */ declare const NFE_CHAVE_NFCE_QR_ILLUSTRATIVE = "28170800156225000131650110000151341562040824"; declare const NFE_MODELO_NFE = "55"; declare const NFE_MODELO_NFCE = "65"; declare const NFE_MODELOS: readonly ["55", "65"]; /** IBGE UF codes valid in cUF (positions 1–2). */ declare const NFE_IBGE_UF_CODES: Set; /** IBGE cUF → Brazilian UF sigla. */ declare const NFE_IBGE_UF_BY_CODE: Readonly>; declare function computeNfeChaveWeightedSum(base43: string): number; declare function resolveNfeChaveCheckDigit(weightedSum: number): number; /** Compute DV for the first 43 digits of a chave de acesso. */ declare function computeNfeChaveCheckDigit(base43: string): number; declare function isValidNfeChaveCheckDigit(stripped: string): boolean; type NfeChaveParts = { cUF: string; aamm: string; cnpj: string; mod: string; serie: string; nNF: string; tpEmis: string; cNF: string; cDV: string; }; declare function parseNfeChaveParts(stripped: string): NfeChaveParts | null; declare function isValidNfeChave(input: string): boolean; declare function parseNfeChave(input: string): NfeChaveValidationResult; declare function validateNfeChave(input: string): NfeChaveValidationResult; /** * Strip NF-e chave de acesso — digits only (BR-NFE-CHAVE-002). * @see http://moc.sped.fazenda.pr.gov.br/ — §2.2.6 chave de acesso */ declare function stripNfeChave(input: string): string; declare function formatNfeChave(input: string): FormatResult; export { FormatResult, NFE_CHAVE_BASE_LENGTH, NFE_CHAVE_DFE_PORTAL_URL, NFE_CHAVE_GOLDEN_PRIMARY, NFE_CHAVE_GOLDEN_SECONDARY, NFE_CHAVE_LENGTH, NFE_CHAVE_MOC_DV_SECTION_URL, NFE_CHAVE_MOC_ONLINE_URL, NFE_CHAVE_MOC_PDF_URL, NFE_CHAVE_MOD, NFE_CHAVE_NFCE_QR_ILLUSTRATIVE, NFE_CHAVE_NFCE_QR_ILLUSTRATIVE_URL, NFE_CHAVE_NUMERIC_PATTERN, NFE_CHAVE_OFFICIAL_SOURCE_URL, NFE_CHAVE_WEIGHT_CYCLE, NFE_IBGE_UF_BY_CODE, NFE_IBGE_UF_CODES, NFE_MODELOS, NFE_MODELO_NFCE, NFE_MODELO_NFE, type NfeChaveParts, NfeChaveValidationResult, UfCode, computeNfeChaveCheckDigit, computeNfeChaveWeightedSum, formatNfeChave, isValidNfeChave, isValidNfeChaveCheckDigit, parseNfeChave, parseNfeChaveParts, resolveNfeChaveCheckDigit, stripNfeChave, validateNfeChave };