cosmemilton-acbr-node 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -106
- package/dist/cli.js +1511 -895
- package/dist/cli.js.map +4 -4
- package/dist/contract.json +1 -0
- package/dist/index.cjs +320 -46
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +317 -46
- package/dist/index.js.map +4 -4
- package/dist/runtime.cjs +254 -35
- package/dist/runtime.cjs.map +3 -3
- package/dist/runtime.js +251 -34
- package/dist/runtime.js.map +3 -3
- package/dist/types/generated/acbr/index.d.ts +15 -1
- package/dist/types/generated/acbr/models.d.ts +32 -0
- package/dist/types/src/cli.d.ts +4 -2
- package/dist/types/src/contract-help.d.ts +53 -0
- package/dist/types/src/diagnostics.d.ts +8 -0
- package/dist/types/src/generator.d.ts +3 -0
- package/dist/types/src/index.d.ts +13 -0
- package/dist/types/src/runtime.d.ts +1 -0
- package/dist/types/src/types.d.ts +34 -1
- package/docs/API.md +58 -0
- package/docs/CI.md +6 -0
- package/docs/CLI.md +52 -32
- package/docs/VALIDACAO.md +3 -1
- package/package.json +6 -4
package/dist/cli.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/
|
|
4
|
-
"sourcesContent": ["import { createHash } from 'node:crypto';\nimport { execFile } from 'node:child_process';\nimport { promisify } from 'node:util';\nimport { mkdir, readFile, writeFile, readdir } from 'node:fs/promises';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nconst execute = promisify(execFile);\ninterface RawProperty { name:string; type:string; indexed:boolean; readable:boolean; writable:boolean; default:string; line:number }\ninterface RawType { name:string; kind:string; ancestor?:string; properties?:RawProperty[]; methods?:{name:string;result:string;arguments:number}[]; target?:string; values?:{name:string;assigned:string}[]; min?:string; max?:string; declarationKind?:string; line:number }\ninterface RawUnit { name:string; file:string; uses:string[]; types:RawType[] }\nexport interface RawModel { schemaVersion:number; root:string; units:RawUnit[] }\nexport interface ModelProperty { name:string; type:string; kind:'string'|'integer'|'decimal'|'datetime'|'boolean'|'enum'|'object'|'list'; ref?:string; readonly:boolean; declaredDefault?:string; min?:number; max?:number; scale?:number }\nexport interface ModelType { name:string; unit:string; kind:'object'|'list'|'enum'; properties?:ModelProperty[]; item?:string; values?:string[]; factory?:string }\nexport interface ModelIR { schemaVersion:1; root:string; types:ModelType[] }\nexport interface GenerateOptions { acbrRoot:string; outputDir:string; revision:string|number; sourceHash?:string; modelOutputDir?:string; nativeOutputDir?:string; extractorPath?:string; fpcPath?:string }\nconst bases = new Set(['tobject','tpersistent','tacbrobjectlist']);\nconst primitives:Record<string,{kind:ModelProperty['kind'];min?:number;max?:number;scale?:number}>={\n string:{kind:'string'},ansistring:{kind:'string'},unicodestring:{kind:'string'},widestring:{kind:'string'},\n boolean:{kind:'boolean'},byte:{kind:'integer',min:0,max:255},word:{kind:'integer',min:0,max:65535},\n integer:{kind:'integer',min:-2147483648,max:2147483647},longint:{kind:'integer',min:-2147483648,max:2147483647},\n smallint:{kind:'integer',min:-32768,max:32767},shortint:{kind:'integer',min:-128,max:127},\n cardinal:{kind:'integer',min:0,max:4294967295},longword:{kind:'integer',min:0,max:4294967295},\n int64:{kind:'integer',min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER},qword:{kind:'integer',min:0,max:Number.MAX_SAFE_INTEGER},\n double:{kind:'decimal'},extended:{kind:'decimal'},single:{kind:'decimal'},currency:{kind:'decimal',scale:4},\n tdatetime:{kind:'datetime'},tdate:{kind:'datetime'},ttime:{kind:'datetime'}\n};\nconst stable = (value:unknown):string => JSON.stringify(value);\nconst hash = (value:string|Buffer):string => createHash('sha256').update(value).digest('hex');\nexport function buildModelIR(raw:RawModel):ModelIR {\n const declarations=new Map<string,{unit:RawUnit;type:RawType}>();\n for(const unit of raw.units)for(const type of unit.types)declarations.set((unit.name+'.'+type.name).toLowerCase(),{unit,type});\n function find(name:string,unit:RawUnit):{unit:RawUnit;type:RawType}{\n for(const key of [unit.name+'.'+name,...[...unit.uses].reverse().map(u=>u+'.'+name),name]){const item=declarations.get(key.toLowerCase());if(item)return item;}\n throw new Error('Tipo Pascal n\u00E3o resolvido: '+unit.name+'.'+name);\n }\n function resolve(name:string,unit:RawUnit,trail=new Set<string>()):{unit:RawUnit;type:RawType}|{primitive:string}{\n if(primitives[name.toLowerCase()])return {primitive:name.toLowerCase()};\n const found=find(name,unit),key=(found.unit.name+'.'+found.type.name).toLowerCase();\n if(trail.has(key))throw new Error('Alias Pascal c\u00EDclico: '+key);\n if(found.type.kind==='alias'){trail.add(key);return resolve(found.type.target!,found.unit,trail);}\n return found;\n }\n const rootUnit=raw.units.find(u=>u.types.some(t=>t.name===raw.root));\n if(!rootUnit)throw new Error('Modelo raiz ausente: '+raw.root);\n const generated=new Map<string,ModelType>();\n function visit(name:string,unit:RawUnit):{kind:ModelProperty['kind'];ref?:string;min?:number;max?:number;scale?:number}{\n const found=resolve(name,unit);if('primitive'in found)return primitives[found.primitive];\n const {type,unit:declUnit}=found,key=type.name;\n if(generated.has(key)){const node=generated.get(key)!;if(node.unit!==declUnit.name)throw new Error('Tipos hom\u00F4nimos incompat\u00EDveis: '+key);return {kind:node.kind==='object'?'object':node.kind==='list'?'list':'enum',ref:key};}\n if(type.kind==='enum'){\n const values=type.values!.map(v=>v.name);if(!values.length)throw new Error('Enum sem valores: '+key);\n generated.set(key,{name:key,unit:declUnit.name,kind:'enum',values});return {kind:'enum',ref:key};\n }\n if(type.kind!=='class')throw new Error('Declara\u00E7\u00E3o Pascal n\u00E3o suportada: '+declUnit.name+'.'+key+' ('+(type.declarationKind??type.kind)+')');\n const creator=type.methods?.find(m=>m.name.toLowerCase()==='new'&&m.arguments===0);\n const indexed=type.properties?.find(p=>p.indexed&&p.name.toLowerCase()==='items');\n if(creator||indexed){\n if(!creator||!indexed||!indexed.readable)throw new Error('Cole\u00E7\u00E3o sem contrato New/Items tipado: '+key);\n const item=resolve(creator.result,declUnit),itemProperty=resolve(indexed.type,declUnit);\n if('primitive'in item||'primitive'in itemProperty||item.type.name!==itemProperty.type.name)throw new Error('Cole\u00E7\u00E3o com tipos New/Items divergentes: '+key);\n generated.set(key,{name:key,unit:declUnit.name,kind:'list',item:item.type.name,factory:creator.name});\n if(visit(creator.result,declUnit).kind!=='object')throw new Error('Item de cole\u00E7\u00E3o n\u00E3o \u00E9 objeto: '+key);\n return {kind:'list',ref:key};\n }\n const node:ModelType={name:key,unit:declUnit.name,kind:'object',properties:[]};generated.set(key,node);\n let inherited:ModelProperty[]=[];\n if(type.ancestor&&!bases.has(type.ancestor.toLowerCase())){\n const ancestor=visit(type.ancestor,declUnit);if(ancestor.kind!=='object')throw new Error('Heran\u00E7a n\u00E3o suportada: '+key);\n inherited=generated.get(ancestor.ref!)!.properties!;\n }\n const props=new Map(inherited.map(p=>[p.name.toLowerCase(),p]));\n for(const p of type.properties??[]){\n if(p.indexed)throw new Error('Propriedade indexada fora de cole\u00E7\u00E3o: '+key+'.'+p.name);\n if(!p.readable)throw new Error('Propriedade sem leitura: '+key+'.'+p.name);\n const resolved=visit(p.type,declUnit);\n const readonly=(!p.writable&&!['object','list'].includes(resolved.kind))||(key===raw.root&&['signature','procnfe','infnfesupl'].includes(p.name.toLowerCase()));\n props.set(p.name.toLowerCase(),{name:p.name,type:p.type,...resolved,readonly,...(p.default?{declaredDefault:p.default}:{})});\n }\n node.properties=[...props.values()].sort((a,b)=>a.name.localeCompare(b.name,'en'));return {kind:'object',ref:key};\n }\n visit(raw.root,rootUnit);return {schemaVersion:1,root:raw.root,types:[...generated.values()].sort((a,b)=>a.name.localeCompare(b.name,'en'))};\n}\nexport function compareContracts(previous:ModelIR|undefined,current:ModelIR){\n const old=new Map(previous?.types.map(t=>[t.name,t])??[]),now=new Map(current.types.map(t=>[t.name,t]));\n const additions:string[]=[],removals:string[]=[],changes:string[]=[];\n for(const [name,type]of now){\n const before=old.get(name);if(!before){additions.push(name);continue;}\n if(type.kind!==before.kind){changes.push(name+':kind');continue;}\n if(type.kind==='object'){\n const a=new Map(before.properties!.map(p=>[p.name,p])),b=new Map(type.properties!.map(p=>[p.name,p]));\n for(const [field,p]of b){if(!a.has(field))additions.push(name+'.'+field);else if(stable(a.get(field))!==stable(p))changes.push(name+'.'+field);}\n for(const field of a.keys())if(!b.has(field))removals.push(name+'.'+field);\n }else if(type.kind==='enum'){\n for(const v of type.values!)if(!before.values!.includes(v))additions.push(name+'.'+v);\n for(const v of before.values!)if(!type.values!.includes(v))removals.push(name+'.'+v);\n }else if(type.item!==before.item)changes.push(name+':item');\n }\n for(const name of old.keys())if(!now.has(name))removals.push(name);\n return {additions:additions.sort(),removals:removals.sort(),changes:changes.sort(),breaking:removals.length>0||changes.length>0};\n}\nconst tsType=(p:ModelProperty):string=>p.kind==='object'?p.ref+'Input':p.kind==='list'?p.ref+'Input':p.kind==='enum'?p.ref!:p.kind==='integer'?'number':p.kind==='boolean'?'boolean':'string';\nexport function renderTypeScript(ir:ModelIR,revision:number,contractHash:string):string {\n const out=['// Generated from ACBr AST. LGPL-2.1-or-later. Do not edit.','export const ACBR_CONTRACT = '+stable({sourceRevision:revision,contractHash})+' as const;','export const SOURCE_REVISION=ACBR_CONTRACT.sourceRevision;','export const CONTRACT_HASH=ACBR_CONTRACT.contractHash;'];\n for(const t of ir.types){\n if(t.kind==='enum'){\n out.push('export const '+t.name+' = Object.freeze('+stable(Object.fromEntries(t.values!.map(v=>[v,v])))+' as const);','export type '+t.name+' = typeof '+t.name+'[keyof typeof '+t.name+'];');\n }else if(t.kind==='list'){\n out.push('export type '+t.name+'Input = '+t.item+'Input[];','export class '+t.name+' extends Array<'+t.item+'> {',' New(input: '+t.item+'Input = {}): '+t.item+' { const item=new '+t.item+'(input); this.push(item); return item; }','}');\n }else {\n out.push('export interface '+t.name+'Input {');\n for(const p of t.properties!.filter(p=>!p.readonly))out.push(' '+JSON.stringify(p.name)+'?: '+tsType(p)+';');\n out.push('}','export class '+t.name+' {');\n for(const p of t.properties!){\n if(p.readonly){out.push(' readonly '+JSON.stringify(p.name)+'?: '+tsType(p)+';');continue;}\n if(p.declaredDefault)out.push(' /** Pascal streaming default: '+p.declaredDefault.replaceAll('*/','')+'. Omission preserves the native constructor. */');\n if(p.kind==='object'||p.kind==='list')out.push(' '+JSON.stringify(p.name)+' = new '+p.ref+'();');\n else out.push(' '+JSON.stringify(p.name)+'?: '+tsType(p)+';');\n }\n out.push(' constructor(input: '+t.name+'Input = {}) {',' validateModel('+JSON.stringify(t.name)+', input);');\n for(const p of t.properties!.filter(p=>!p.readonly)){\n const access='input['+JSON.stringify(p.name)+']',target='this['+JSON.stringify(p.name)+']';\n out.push(' if ('+access+' !== undefined) '+target+' = '+(p.kind==='object'?'new '+p.ref+'('+access+')':p.kind==='list'?'Object.assign(new '+p.ref+'(), '+access+'.map(v=>new '+ir.types.find(t=>t.name===p.ref)!.item+'(v)))':access)+';');\n }\n out.push(' }','}');\n }\n }\n out.push('const MODEL_SCHEMA: Record<string, any> = '+stable(Object.fromEntries(ir.types.map(t=>[t.name,t])))+';');\n out.push(String.raw`\nexport function validateModel(model: string, value: unknown, at=model): void {\n const schema=MODEL_SCHEMA[model]; if(!schema)throw new TypeError('Modelo desconhecido: '+model);\n if(schema.kind==='enum'){ if(typeof value!=='string'||!schema.values.includes(value))throw new TypeError(at+': enum inv\u00E1lido'); return; }\n if(schema.kind==='list'){ if(!Array.isArray(value))throw new TypeError(at+': esperado array'); value.forEach((item,index)=>validateModel(schema.item,item,at+'['+index+']'));return; }\n if(value===null||typeof value!=='object'||Array.isArray(value))throw new TypeError(at+': esperado objeto');\n const fields=new Map<string,any>(schema.properties.filter((p:any)=>!p.readonly).map((p:any)=>[p.name,p]));\n for(const [name,v] of Object.entries(value)){\n if(v===undefined)continue;\n const p=fields.get(name);if(!p)throw new TypeError(at+'.'+name+': propriedade desconhecida ou somente leitura');\n if(v===undefined)continue;\n const field=at+'.'+name;\n if(p.ref){validateModel(p.ref,v,field);continue;}\n if(p.kind==='integer'){if(typeof v!=='number'||!Number.isSafeInteger(v)||v<p.min||v>p.max)throw new TypeError(field+': inteiro fora do intervalo');}\n else if(p.kind==='boolean'){if(typeof v!=='boolean')throw new TypeError(field+': esperado boolean');}\n else if(p.kind==='decimal'){if(typeof v!=='string'||v.length>64||! /^-?\\d+(?:\\.\\d+)?$/.test(v)||p.scale!==undefined&&(v.split('.')[1]?.length??0)>p.scale)throw new TypeError(field+': esperado decimal em string'+(p.scale!==undefined?' de at\u00E9 '+p.scale+' casas':''));}\n else if(p.kind==='datetime'){\n if(typeof v!=='string'||! /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?)?$/.test(v)||Number.isNaN(Date.parse(v+(v.length===10?'T00:00:00Z':'Z'))))throw new TypeError(field+': esperado data/hora civil ISO (sem timezone)');\n const date=new Date(v+(v.length===10?'T00:00:00Z':'Z'));if(date.toISOString().slice(0,10)!==v.slice(0,10))throw new TypeError(field+': data inv\u00E1lida');\n }else if(typeof v!=='string')throw new TypeError(field+': esperado string');\n }\n}\nexport function validateTNFe(value: unknown): asserts value is TNFeInput { validateModel('TNFe',value); }\n`);\n return out.join('\\n')+'\\n';\n}\n\nexport function renderPascal(ir:ModelIR,revision:number,contractHash:string):string {\n const classes=ir.types.filter(t=>t.kind==='object'),byName=new Map(ir.types.map(t=>[t.name,t]));\n const units=[...new Set(ir.types.map(t=>t.unit))].sort();\n const out=['{ Generated from ACBr AST. LGPL-2.1-or-later. Do not edit. }','unit AcbrModels;','{$mode delphi}{$H+}','interface','uses SysUtils, Classes, fpjson, DateUtils, Math, '+units.join(', ')+';','const SourceRevision = '+revision+';',\" ContractHash = '\"+contractHash+\"';\",'procedure preencherTNFe(documento:TJSONObject; destino:TNFe);','implementation'];\n out.push(String.raw`\nprocedure Bad(const P,M:string); begin raise Exception.Create(P+': '+M) end;\nfunction Obj(D:TJSONData;const P:string):TJSONObject;\nbegin if (D=nil) or (D.JSONType<>jtObject) then Bad(P,'esperado objeto');Result:=TJSONObject(D) end;\nfunction Arr(D:TJSONData;const P:string):TJSONArray;\nbegin if (D=nil) or (D.JSONType<>jtArray) then Bad(P,'esperado array');Result:=TJSONArray(D) end;\nfunction Text(D:TJSONData;const P:string):string;\nbegin if (D=nil) or (D.JSONType<>jtString) then Bad(P,'esperado string');Result:=D.AsString end;\nfunction IntValue(D:TJSONData;const P:string;MinV,MaxV:Int64):Int64;\nvar V:Extended;\nbegin\n if (D=nil) or (D.JSONType<>jtNumber) then Bad(P,'esperado inteiro');\n V:=D.AsFloat;if IsNan(V) or IsInfinite(V) or (Frac(V)<>0) or (V<MinV) or (V>MaxV) then Bad(P,'inteiro fora do intervalo');\n Result:=D.AsInt64;\nend;\nfunction BoolValue(D:TJSONData;const P:string):boolean;\nbegin if (D=nil) or (D.JSONType<>jtBoolean) then Bad(P,'esperado boolean');Result:=D.AsBoolean end;\nfunction DecimalText(D:TJSONData;const P:string;Scale:integer):string;\nvar I,PointPos:integer;\nbegin\n Result:=Text(D,P);PointPos:=0;\n if (Result='') or (Length(Result)>64) then Bad(P,'decimal inv\u00E1lido');\n for I:=1 to Length(Result) do begin\n if Result[I]='.' then begin if (PointPos>0) or (I=1) or ((I=2) and (Result[1]='-')) or (I=Length(Result)) then Bad(P,'decimal inv\u00E1lido');PointPos:=I end\n else if (Result[I]='-') and (I=1) then begin if Length(Result)=1 then Bad(P,'decimal inv\u00E1lido') end\n else if not (Result[I] in ['0'..'9']) then Bad(P,'decimal inv\u00E1lido');\n end;\n if (PointPos>0) and (Scale>=0) and (Length(Result)-PointPos>Scale) then Bad(P,'casas decimais excedidas');\nend;\nfunction FloatValue(D:TJSONData;const P:string):Extended;\nvar F:TFormatSettings;S:string;\nbegin F:=DefaultFormatSettings;F.DecimalSeparator:='.';F.ThousandSeparator:=#0;S:=DecimalText(D,P,-1);\n if not TryStrToFloat(S,Result,F) or IsNan(Result) or IsInfinite(Result) then Bad(P,'decimal fora do intervalo');\nend;\nfunction CurrencyValue(D:TJSONData;const P:string):Currency;\nvar F:TFormatSettings;S:string;\nbegin F:=DefaultFormatSettings;F.DecimalSeparator:='.';F.ThousandSeparator:=#0;S:=DecimalText(D,P,4);\n if not TryStrToCurr(S,Result,F) then Bad(P,'currency fora do intervalo');\nend;\nfunction DateValue(D:TJSONData;const P:string):TDateTime;\nvar S:string;I:integer;\nbegin\n S:=Text(D,P);\n if not (Length(S) in [10,19,21,22,23]) then Bad(P,'esperado data/hora civil ISO sem timezone');\n for I:=1 to Length(S) do if not ((S[I] in ['0'..'9']) or ((I in [5,8]) and (S[I]='-')) or ((I=11) and (S[I]='T')) or ((I in [14,17]) and (S[I]=':')) or ((I=20) and (S[I]='.'))) then Bad(P,'data ISO inv\u00E1lida');\n if not TryISO8601ToDate(S,Result,true) then Bad(P,'data ISO inv\u00E1lida');\nend;\n`);\n const q=(s:string)=>\"'\"+s.replaceAll(\"'\",\"''\")+\"'\";\n for(const t of classes)out.push('procedure Load_'+t.name+'(D:TJSONObject;destino:'+t.unit+'.'+t.name+';const P:string); forward;');\n for(const t of classes){\n out.push('procedure Load_'+t.name+'(D:TJSONObject;destino:'+t.unit+'.'+t.name+';const P:string);','var I,J:integer;V:TJSONData;A:TJSONArray;K,At:string;','begin',\" if destino=nil then Bad(P,'objeto ACBr n\u00E3o inicializado');\",' for I:=0 to D.Count-1 do begin',' K:=D.Names[I];V:=D.Items[I];At:=P+\\'.\\'+K;');\n let index=0;\n for(const p of t.properties!.filter(p=>!p.readonly)){\n out.push(' '+(index++?'else ':'')+'if K='+q(p.name)+' then begin');const target='destino.'+p.name;\n if(p.kind==='object')out.push(' Load_'+p.ref+'(Obj(V,At),'+target+',At);');\n else if(p.kind==='list'){\n const list=byName.get(p.ref!)!;\n out.push(' A:=Arr(V,At);if '+target+'=nil then Bad(At,\\'cole\u00E7\u00E3o n\u00E3o inicializada\\');'+target+'.Clear;',' for J:=0 to A.Count-1 do Load_'+list.item+'(Obj(A.Items[J],At+\\'[\\'+IntToStr(J)+\\']\\'),'+target+'.'+list.factory+',At+\\'[\\'+IntToStr(J)+\\']\\');');\n }else if(p.kind==='enum'){\n const enumeration=byName.get(p.ref!)!;\n out.push(...enumeration.values!.map((v,i)=>' '+(i?'else ':'')+'if Text(V,At)='+q(v)+' then '+target+':='+enumeration.unit+'.'+v),\" else Bad(At,'enum inv\u00E1lido');\");\n }else out.push(' '+target+':='+({string:'Text(V,At)',integer:'IntValue(V,At,'+p.min+','+p.max+')',boolean:'BoolValue(V,At)',datetime:'DateValue(V,At)',decimal:p.scale===4?'CurrencyValue(V,At)':'FloatValue(V,At)'}[p.kind])+';');\n out.push(' end');\n }\n out.push((index?\" else \":\" \")+\"Bad(At,'propriedade desconhecida ou somente leitura');\",' end;','end;');\n }\n out.push('procedure preencherTNFe(documento:TJSONObject;destino:TNFe);',\"begin if documento=nil then Bad('TNFe','esperado objeto');Load_TNFe(documento,destino,'TNFe') end;\",'end.');\n return out.join('\\n')+'\\n';\n}\nexport function renderClientIndex():string{\n return [\n '// Generated client bound to its own ACBr contract. Do not edit.',\n 'import { criarEmissor as criarRuntime, type OpcoesEmissor, type OpcoesOperacao } from '+JSON.stringify('cosmemilton-acbr-node/runtime')+';',\n 'import { ACBR_CONTRACT, validateTNFe, type TNFeInput } from '+JSON.stringify('./models.js')+';',\n 'export * from '+JSON.stringify('./models.js')+';',\n 'export function criarEmissor(options: Omit<OpcoesEmissor, '+JSON.stringify('contrato')+' | '+JSON.stringify('validaDocumento')+'>) {',\n ' const emissor=criarRuntime({...options, contrato:ACBR_CONTRACT, validaDocumento:validateTNFe});',\n ' return {...emissor, gerarXml(documento:TNFeInput, opcoes?:OpcoesOperacao) { return emissor.gerarXml(documento as unknown as Record<string,unknown>, opcoes); }};',\n '}'\n ].join('\\n')+'\\n';\n}\nasync function fingerprint(dir:string):Promise<string>{\n const files:string[]=[];\n async function walk(d:string){for(const entry of await readdir(d,{withFileTypes:true})){const f=path.join(d,entry.name);if(entry.isDirectory())await walk(f);else if(/\\.(pas|pp|inc|xsd)$/i.test(entry.name))files.push(f);}}\n await walk(dir);const digest=createHash('sha256');\n for(const f of files.sort()){digest.update(path.relative(dir,f).replaceAll('\\\\','/'));digest.update(await readFile(f));}return digest.digest('hex');\n}\nexport async function generateModel(options:GenerateOptions){\n const root=path.resolve(options.outputDir),cache=path.join(root,'.acbr/generated'),bin=path.join(root,'.acbr/bin');\n const models=path.resolve(root,options.modelOutputDir??'generated/acbr'),native=path.resolve(root,options.nativeOutputDir??'native/generated');\n await Promise.all([mkdir(cache,{recursive:true}),mkdir(bin,{recursive:true}),mkdir(models,{recursive:true}),mkdir(native,{recursive:true})]);\n const extractor=options.extractorPath??fileURLToPath(new URL('../tools/extract-model.lpr',import.meta.url));\n const executable=path.join(bin,'extract-model'+(process.platform==='win32'?'.exe':''));\n try{\n await execute(options.fpcPath??'fpc',['-Mobjfpc','-Sh','-FU'+bin,'-FE'+bin,extractor],{cwd:root,maxBuffer:8*1024*1024});\n await execute(executable,[path.resolve(options.acbrRoot),path.join(cache,'raw-model.json'),process.platform==='win32'?'win64':'linux'],{cwd:root,maxBuffer:8*1024*1024});\n }catch(error){const e=error as Error&{stdout?:string;stderr?:string};throw new Error('Extra\u00E7\u00E3o FCL-passrc falhou: '+(e.stderr??'')+(e.stdout??'')+e.message);}\n const raw=JSON.parse(await readFile(path.join(cache,'raw-model.json'),'utf8')) as RawModel;\n const ir=buildModelIR(raw),sourceRevision=Number(options.revision);\n if(!Number.isSafeInteger(sourceRevision)||sourceRevision<1)throw new Error('Revis\u00E3o SVN inv\u00E1lida');\n const sourceHash=options.sourceHash??await fingerprint(options.acbrRoot),contractHash=hash(stable({sourceRevision,sourceHash,ir}));\n let previous:ModelIR|undefined;try{previous=JSON.parse(await readFile(path.join(cache,'model.ir.json'),'utf8'));}catch(error){if((error as NodeJS.ErrnoException).code!=='ENOENT')throw error;}\n const report=compareContracts(previous,ir),reportPath=path.join(cache,'changes.json'),manifestPath=path.join(cache,'manifest.json');\n const files=[path.relative(root,path.join(models,'models.ts')),path.relative(root,path.join(models,'index.ts')),path.relative(root,path.join(native,'AcbrModels.pas'))].map(f=>f.replaceAll('\\\\','/'));\n const content=[renderTypeScript(ir,sourceRevision,contractHash),renderClientIndex(),renderPascal(ir,sourceRevision,contractHash)];\n const fileHashes=Object.fromEntries(files.map((file,index)=>[file,hash(content[index])]));\n await Promise.all([\n ...files.map((file,index)=>writeFile(path.resolve(root,file),content[index],'utf8')),\n writeFile(path.join(cache,'model.ir.json'),JSON.stringify(ir,null,2)+'\\n','utf8'),\n writeFile(reportPath,JSON.stringify(report,null,2)+'\\n','utf8'),\n writeFile(manifestPath,JSON.stringify({schemaVersion:1,sourceRevision,sourceHash,contractHash,root:ir.root,models:ir.types.length,files,fileHashes},null,2)+'\\n','utf8')\n ]);return {contractHash,sourceHash,models:ir.types.length,reportPath,manifestPath};\n}\n", "#!/usr/bin/env node\nimport { access } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { initializeConfig, loadConfig } from './config.js';\nimport { checkBuild, buildNative, doctor, runtimeDirectory } from './native-build.js';\nimport { lockExistingSource, updateSource, verifySource } from './source.js';\nimport { checkOffline } from './offline-check.js';\n\nexport const HELP = `acbr-node \u2014 compila\u00E7\u00E3o e contrato Node/ACBr NF-e\n\nUso:\n acbr-node init [--config caminho] [--revision HEAD|n\u00FAmero]\n acbr-node source update [--config caminho] [--revision HEAD|n\u00FAmero]\n acbr-node source lock --revision n\u00FAmero [--config caminho]\n acbr-node generate [--config caminho]\n acbr-node build [--config caminho]\n acbr-node check [--config caminho]\n acbr-node doctor [--config caminho]\n\nsource update consulta o SVN oficial e substitui apenas fontes verificadas pelo lock.\nsource lock registra um export existente cuja origem/revis\u00E3o o operador j\u00E1 conferiu.\ngenerate/build/check nunca atualizam fontes. Nenhum comando transmite NF-e.\n`;\nexport interface CliIO { stdout: { write(text: string): unknown }; stderr: { write(text: string): unknown }; }\nfunction revision(value: string | undefined): 'HEAD' | number | undefined {\n if (value === undefined) return undefined;\n if (value === 'HEAD') return value;\n if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error('--revision deve ser HEAD ou um n\u00FAmero SVN positivo.');\n return Number(value);\n}\ninterface Args { command: string[]; config: string; revision?: 'HEAD' | number; json: boolean; help: boolean; }\nexport function parseArguments(args: string[]): Args {\n const result: Args = { command: [], config: 'acbr.config.json', json: false, help: false };\n const used = new Set<string>();\n for (let i = 0; i < args.length; i++) {\n const arg = args[i]!;\n if (!arg.startsWith('-')) { result.command.push(arg); continue; }\n if (used.has(arg)) throw new Error(`Op\u00E7\u00E3o repetida: ${arg}.`);\n used.add(arg);\n if (arg === '--help' || arg === '-h') result.help = true;\n else if (arg === '--json') result.json = true;\n else if (arg === '--config' || arg === '--revision') {\n const value = args[++i];\n if (value === undefined || value.startsWith('--')) throw new Error(`Valor obrigat\u00F3rio para ${arg}.`);\n if (arg === '--config') result.config = value;\n else result.revision = revision(value);\n } else throw new Error(`Op\u00E7\u00E3o desconhecida: ${arg}.`);\n }\n return result;\n}\nexport async function main(args = process.argv.slice(2), io: CliIO = process): Promise<number> {\n try {\n const options = parseArguments(args);\n const command = options.command.join(' ');\n if (options.help || !command) { io.stdout.write(HELP); return 0; }\n const output = (value: unknown, text: string) => io.stdout.write(options.json ? `${JSON.stringify(value, null, 2)}\\n` : `${text}\\n`);\n if (command === 'init') {\n const config = await initializeConfig(options.config, options.revision, fileURLToPath(new URL('../', import.meta.url)));\n output({ configPath: config.configPath }, `Configura\u00E7\u00E3o criada: ${config.configPath}\\nPr\u00F3ximo passo: acbr-node source update.`);\n return 0;\n }\n if (!['source update', 'source lock', 'generate', 'build', 'check', 'doctor'].includes(command)) throw new Error(`Comando desconhecido: ${command}. Use --help.`);\n if (options.revision !== undefined && !command.startsWith('source ')) throw new Error('--revision \u00E9 aceito somente em init e source.');\n if (command === 'doctor') {\n let config;\n try { await access(resolve(options.config)); config = await loadConfig(options.config); } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n const report = await doctor(config);\n output(report, report.map(item => `${item.ok ? 'OK' : 'FALHA'} ${item.name}: ${item.detail}`).join('\\n'));\n return report.every(item => item.ok) ? 0 : 1;\n }\n const config = await loadConfig(options.config);\n if (command === 'source update') {\n const lock = await updateSource(config, options.revision);\n output(lock, `Fontes oficiais registradas na revis\u00E3o ${lock.source.revision}.\\nSHA256 da \u00E1rvore: ${lock.source.treeHash}\\nExecute generate para atualizar o contrato.`);\n } else if (command === 'source lock') {\n if (typeof options.revision !== 'number') throw new Error('source lock exige --revision com o n\u00FAmero verificado do export SVN.');\n if (config.source.revision !== 'HEAD' && config.source.revision !== options.revision) throw new Error('Revis\u00E3o do export diverge da configura\u00E7\u00E3o.');\n const lock = await lockExistingSource(config, options.revision);\n output(lock, `Export existente registrado na revis\u00E3o ${lock.source.revision}; ${Object.keys(lock.source.files).length} arquivos protegidos por SHA256.`);\n } else if (command === 'generate') {\n const lock = await verifySource(config);\n const { generateModel } = await import('./generator.js');\n const result = await generateModel({ acbrRoot: config.source.directory, outputDir: config.generator.outputDir, revision: String(lock.source.revision), sourceHash: lock.source.treeHash, fpcPath: config.native.fpc });\n output(result, `Contrato ${result.contractHash}; ${result.models} modelos gerados.\\nRevise o relat\u00F3rio: ${result.reportPath}`);\n } else if (command === 'build') {\n const result = await buildNative(config);\n output(result, `Runtime compilado: ${runtimeDirectory(config)}\\nACBr revis\u00E3o ${result.sourceRevision}; contrato ${result.contractHash}.`);\n } else {\n const result = await checkBuild(config);\n const offlineChecks = await checkOffline(config, result);\n output({ ...result, offlineChecks }, `Fontes, contrato e ${Object.keys(result.files).length} arquivos do runtime conferidos por SHA256.\\n${offlineChecks.length} verifica\u00E7\u00F5es offline do motor aprovadas; nenhuma transmiss\u00E3o.`);\n }\n return 0;\n } catch (error) {\n io.stderr.write(`Erro: ${(error as Error).message}\\n`);\n return 1;\n }\n}\nif (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {\n main().then(code => { process.exitCode = code; });\n}\n", "import { readFile, writeFile, mkdir, readdir, access, copyFile } from 'node:fs/promises';\nimport { dirname, isAbsolute, resolve } from 'node:path';\n\nexport const OFFICIAL_ACBR_URL = 'https://svn.code.sf.net/p/acbr/code/trunk2';\nexport const SOURCE_PARTS = ['Fontes', 'Exemplos/ACBrDFe/Schemas/NFe', 'Doctos/LICENSE.TXT'] as const;\nexport interface AcbrConfigFile {\n formatVersion: 1;\n source: { url: string; revision: 'HEAD' | number; directory: string };\n generator: { outputDir: string };\n native: { project: string; outputDir: string; fpc: string; lazarusRoot?: string; libraryFiles?: string[]; providerFiles?: string[] };\n}\nexport interface AcbrConfig extends AcbrConfigFile {\n configPath: string;\n projectRoot: string;\n lockPath: string;\n}\nconst DEFAULT: AcbrConfigFile = {\n formatVersion: 1,\n source: { url: OFFICIAL_ACBR_URL, revision: 'HEAD', directory: '.acbr/source' },\n generator: { outputDir: '.' },\n native: { project: 'native/acbr-worker.lpr', outputDir: '.acbr/runtime', fpc: 'fpc' },\n};\nexport function defaultConfig(): AcbrConfigFile { return structuredClone(DEFAULT); }\nfunction record(value: unknown, name: string): Record<string, unknown> {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) throw new Error(`${name} deve ser um objeto.`);\n return value as Record<string, unknown>;\n}\nfunction keys(value: Record<string, unknown>, allowed: string[], name: string): void {\n const unexpected = Object.keys(value).filter(key => !allowed.includes(key));\n if (unexpected.length) throw new Error(`Campo desconhecido em ${name}: ${unexpected.join(', ')}.`);\n}\nfunction string(value: unknown, name: string): string {\n if (typeof value !== 'string' || !value.trim() || value.includes('\\0')) throw new Error(`${name} deve ser um texto n\u00E3o vazio.`);\n return value;\n}\nexport function parseConfig(input: unknown, configPath: string): AcbrConfig {\n const root = record(input, 'configura\u00E7\u00E3o');\n keys(root, ['formatVersion', 'source', 'generator', 'native'], 'configura\u00E7\u00E3o');\n if (root.formatVersion !== 1) throw new Error('formatVersion deve ser 1.');\n const source = record(root.source, 'source'); keys(source, ['url', 'revision', 'directory'], 'source');\n const generator = record(root.generator, 'generator'); keys(generator, ['outputDir'], 'generator');\n const native = record(root.native, 'native'); keys(native, ['project', 'outputDir', 'fpc', 'lazarusRoot', 'libraryFiles', 'providerFiles'], 'native');\n const url = string(source.url, 'source.url').replace(/\\/+$/, '');\n if (url !== OFFICIAL_ACBR_URL) throw new Error(`source.url deve apontar ao reposit\u00F3rio oficial ${OFFICIAL_ACBR_URL}.`);\n const revision = source.revision;\n if (revision !== 'HEAD' && (!Number.isSafeInteger(revision) || Number(revision) < 1)) throw new Error('source.revision deve ser HEAD ou uma revis\u00E3o SVN positiva.');\n const absoluteConfig = resolve(configPath);\n const projectRoot = dirname(absoluteConfig);\n const localPath = (value: unknown, label: string) => resolve(projectRoot, string(value, label));\n const fpcInput = string(native.fpc, 'native.fpc');\n const fpc = isAbsolute(fpcInput) || /[\\\\/]/.test(fpcInput) ? resolve(projectRoot, fpcInput) : fpcInput;\n let libraryFiles: string[] | undefined;\n if (native.libraryFiles !== undefined) {\n if (!Array.isArray(native.libraryFiles)) throw new Error('native.libraryFiles deve ser uma lista de caminhos.');\n libraryFiles = native.libraryFiles.map((item, i) => localPath(item, `native.libraryFiles[${i}]`));\n }\n let providerFiles: string[] | undefined;\n if (native.providerFiles !== undefined) {\n if (!Array.isArray(native.providerFiles)) throw new Error('native.providerFiles deve ser uma lista de caminhos.');\n providerFiles = native.providerFiles.map((item, i) => localPath(item, `native.providerFiles[${i}]`));\n }\n return {\n formatVersion: 1, configPath: absoluteConfig, projectRoot, lockPath: resolve(projectRoot, 'acbr.lock.json'),\n source: { url, revision: revision as 'HEAD' | number, directory: localPath(source.directory, 'source.directory') },\n generator: { outputDir: localPath(generator.outputDir, 'generator.outputDir') },\n native: { project: localPath(native.project, 'native.project'), outputDir: localPath(native.outputDir, 'native.outputDir'), fpc,\n ...(native.lazarusRoot !== undefined ? { lazarusRoot: localPath(native.lazarusRoot, 'native.lazarusRoot') } : {}),\n ...(libraryFiles !== undefined ? { libraryFiles } : {}),\n ...(providerFiles !== undefined ? { providerFiles } : {}),\n },\n };\n}\nexport async function loadConfig(path = 'acbr.config.json'): Promise<AcbrConfig> {\n const configPath = resolve(path);\n let contents: string;\n try { contents = await readFile(configPath, 'utf8'); }\n catch (error) { throw new Error(`N\u00E3o foi poss\u00EDvel ler ${configPath}. Execute acbr-node init.`, { cause: error }); }\n let value: unknown;\n try { value = JSON.parse(contents); } catch (error) { throw new Error(`JSON inv\u00E1lido em ${configPath}.`, { cause: error }); }\n return parseConfig(value, configPath);\n}\nexport async function initializeConfig(path = 'acbr.config.json', revision: 'HEAD' | number = 'HEAD', assetRoot?: string): Promise<AcbrConfig> {\n const configPath = resolve(path);\n const config = defaultConfig(); config.source.revision = revision;\n parseConfig(config, configPath);\n await mkdir(dirname(configPath), { recursive: true });\n try { await access(configPath); throw Object.assign(new Error(`EEXIST: configura\u00E7\u00E3o j\u00E1 existe: ${configPath}`), { code: 'EEXIST' }); }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n const resolved = parseConfig(config, configPath);\n if (assetRoot) await copyInitAssets(assetRoot, resolved.projectRoot);\n await writeFile(configPath, `${JSON.stringify(config, null, 2)}\\n`, { flag: 'wx' });\n await mkdir(resolve(resolved.projectRoot, '.acbr/generated'), { recursive: true });\n await mkdir(resolve(resolved.projectRoot, 'generated/acbr'), { recursive: true });\n return resolved;\n}\n\nasync function copyInitAssets(assetRoot: string, targetRoot: string): Promise<void> {\n const entries: { source: string; destination: string; content: Buffer }[] = [];\n async function scan(current: string, target: string): Promise<void> {\n for (const entry of await readdir(current, { withFileTypes: true })) {\n if (entry.name === 'generated' || entry.name.startsWith('.')) continue;\n const source = resolve(current, entry.name); const destination = resolve(target, entry.name);\n if (entry.isDirectory()) await scan(source, destination);\n else if (entry.isFile() && /\\.(pas|lpr|inc|lpi)$/i.test(entry.name)) entries.push({ source, destination, content: await readFile(source) });\n }\n }\n await scan(resolve(assetRoot, 'native'), resolve(targetRoot, 'native'));\n if (!entries.some(entry => entry.source.endsWith('acbr-worker.lpr'))) throw new Error('Assets do pacote n\u00E3o cont\u00EAm native/acbr-worker.lpr.');\n entries.push({ source: resolve(assetRoot, 'tools/extract-model.lpr'), destination: resolve(targetRoot, 'tools/extract-model.lpr'), content: await readFile(resolve(assetRoot, 'tools/extract-model.lpr')) });\n for (const entry of entries) {\n try {\n const existing = await readFile(entry.destination);\n if (!existing.equals(entry.content)) throw new Error(`init preservou arquivo existente divergente: ${entry.destination}.`);\n } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n }\n for (const entry of entries) {\n await mkdir(dirname(entry.destination), { recursive: true });\n try { await writeFile(entry.destination, entry.content, { flag: 'wx' }); }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== 'EEXIST') throw error; }\n }\n}\n", "import { copyFile, mkdir, readdir, readFile, rename, rm, stat, chmod, realpath, access, writeFile } from 'node:fs/promises';\nimport { basename, dirname, join, relative, resolve, sep } from 'node:path';\nimport { randomUUID } from 'node:crypto';\nimport { fileURLToPath } from 'node:url';\nimport type { AcbrConfig } from './config.js';\nimport { fileHash, runCommand, snapshotSource, verifySource } from './source.js';\n\nexport interface BuiltRuntimeManifest {\n formatVersion: 1; sourceRevision: number; contractHash: string; platform: string; arch: string;\n executable: string; files: Record<string, string>;\n systemDependencies?: string[]; testOnly?: boolean; generatedFileHashes: Record<string, string>;\n}\ninterface GeneratedManifest { sourceRevision: number; sourceHash: string; contractHash: string; fileHashes: Record<string, string>; }\nexport function runtimeDirectory(config: AcbrConfig): string { return join(config.native.outputDir, `${process.platform}-${process.arch}`); }\nasync function exists(path: string): Promise<boolean> { try { await access(path); return true; } catch { return false; } }\nexport async function findLazarus(config: AcbrConfig): Promise<string> {\n const candidates = config.native.lazarusRoot ? [config.native.lazarusRoot] :\n [process.env.LAZARUS_ROOT, '/usr/lib/lazarus/default', '/usr/lib/lazarus/3.0', 'C:\\\\lazarus'].filter((path): path is string => Boolean(path));\n for (const candidate of candidates) if (await exists(join(candidate, 'components/lazutils'))) return realpath(candidate);\n throw new Error('Lazarus n\u00E3o encontrado. Defina native.lazarusRoot em acbr.config.json ou LAZARUS_ROOT.');\n}\nasync function generatedManifest(config: AcbrConfig): Promise<GeneratedManifest> {\n const path = join(config.generator.outputDir, '.acbr/generated/manifest.json');\n let value: GeneratedManifest;\n try { value = JSON.parse(await readFile(path, 'utf8')) as GeneratedManifest; }\n catch (error) { throw new Error('Contrato gerado ausente ou inv\u00E1lido. Execute acbr-node generate.', { cause: error }); }\n if (!Number.isSafeInteger(value.sourceRevision) || !/^[a-f0-9]{64}$/.test(value.contractHash) || !/^[a-f0-9]{64}$/.test(value.sourceHash)) throw new Error('Manifesto gerado inv\u00E1lido. Execute generate.');\n if (!value.fileHashes || typeof value.fileHashes !== 'object' || Array.isArray(value.fileHashes) || Object.keys(value.fileHashes).length !== 3 || ['generated/acbr/models.ts', 'generated/acbr/index.ts', 'native/generated/AcbrModels.pas'].some(name => !Object.hasOwn(value.fileHashes, name))) throw new Error('Manifesto gerado n\u00E3o cont\u00E9m os hashes dos tr\u00EAs arquivos. Execute generate.');\n for (const [name, expected] of Object.entries(value.fileHashes)) {\n const file = resolve(config.generator.outputDir, name);\n const location = relative(config.generator.outputDir, file);\n if (!name || name.startsWith('/') || name.includes('\\\\') || location === '..' || location.startsWith(`..${sep}`) || !/^[a-f0-9]{64}$/.test(expected)) throw new Error('Caminho ou SHA256 inv\u00E1lido no manifesto gerado.');\n if (await fileHash(file) !== expected) throw new Error(`Arquivo gerado diverge do manifesto: ${name}. Execute generate para restaurar o contrato.`);\n }\n return value;\n}\nasync function subdirectories(path: string): Promise<string[]> {\n const result = [path];\n for (const entry of (await readdir(path, { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name))) {\n if (entry.isDirectory()) result.push(...await subdirectories(join(path, entry.name)));\n }\n return result;\n}\nconst REQUIRED_DYNAMIC = ['libssl.so.3', 'libcrypto.so.3', 'libxml2.so.2'];\nconst CORE_SYSTEM = /^(?:lib(?:c|m|pthread|dl|rt|resolv|anl|util)\\.so(?:\\.|$)|ld-linux|linux-vdso)/;\nasync function copyLinuxLibraries(stage: string): Promise<string[]> {\n const { stdout } = await runCommand('ldconfig', ['-p']);\n const libraries = new Map<string, string>();\n for (const name of REQUIRED_DYNAMIC) {\n const line = stdout.split('\\n').find(value => value.trim().startsWith(`${name} `) && value.includes('x86-64'));\n const path = line?.split('=>')[1]?.trim();\n if (!path) throw new Error(`Depend\u00EAncia din\u00E2mica ausente: ${name}. Instale OpenSSL 3 e libxml2 compat\u00EDveis.`);\n libraries.set(name, await realpath(path));\n }\n const modules = '/usr/lib/x86_64-linux-gnu/ossl-modules';\n if (!(await exists(join(modules, 'legacy.so')))) throw new Error('Provider legacy OpenSSL 3 ausente. Instale o pacote libssl3/libssl3t64 completo.');\n libraries.set('ossl-modules/legacy.so', await realpath(join(modules, 'legacy.so')));\n const systemDependencies = new Set<string>();\n const inspected = new Set<string>();\n while (inspected.size < libraries.size) {\n const [name, path] = [...libraries].find(([name]) => !inspected.has(name))!;\n inspected.add(name);\n const dependencies = await runCommand('ldd', [path]);\n for (const line of dependencies.stdout.split('\\n')) {\n if (line.includes('not found')) throw new Error(`Depend\u00EAncia transitiva ausente: ${line.trim()}.`);\n const match = /^\\s*(\\S+)\\s+=>\\s+(\\S+)/.exec(line);\n if (match) {\n const dependency = match[1]!; const file = match[2]!;\n if (CORE_SYSTEM.test(dependency)) systemDependencies.add(dependency);\n else if (!libraries.has(dependency)) libraries.set(dependency, await realpath(file));\n } else {\n const direct = /^\\s*(\\/\\S+)/.exec(line)?.[1];\n if (direct) systemDependencies.add(basename(direct));\n }\n }\n }\n const licenseDir = join(stage, 'licenses'); await mkdir(licenseDir, { recursive: true });\n const provenance: Record<string, unknown> = {};\n for (const [name, path] of libraries) {\n const destination = name.startsWith('ossl-modules/') ? join(stage, name) : join(stage, 'lib', name);\n await mkdir(dirname(destination), { recursive: true }); await copyFile(path, destination);\n const aliases = name === 'libssl.so.3' ? ['libssl.so'] : name === 'libcrypto.so.3' ? ['libcrypto.so'] : name === 'libxml2.so.2' ? ['libxml2.so'] : [];\n for (const alias of aliases) await copyFile(path, join(stage, 'lib', alias));\n let owner: string;\n try { owner = (await runCommand('dpkg-query', ['-S', path])).stdout.split('\\n')[0]!.split(': ')[0]!; }\n catch (error) { throw new Error(`N\u00E3o foi poss\u00EDvel identificar pacote/licen\u00E7a de ${path}. Build requer Debian/Ubuntu com depend\u00EAncias registradas pelo dpkg.`, { cause: error }); }\n const pkg = owner.split(':')[0]!;\n const copyright = `/usr/share/doc/${pkg}/copyright`;\n if (!(await exists(copyright))) throw new Error(`Licen\u00E7a da depend\u00EAncia ${name} n\u00E3o encontrada: ${copyright}.`);\n await copyFile(copyright, join(licenseDir, `${name.replaceAll('/', '-')}.txt`));\n const source = (await runCommand('dpkg-query', ['-W', '-f=${source:Package}|${source:Version}|${Version}', owner])).stdout.trim().split('|');\n provenance[name] = { binaryPackage: owner, binaryVersion: source[2], sourcePackage: source[0], sourceVersion: source[1],\n sourceUrl: `https://launchpad.net/ubuntu/+source/${encodeURIComponent(source[0]!)}/${encodeURIComponent(source[1]!)}`,\n copyright: `licenses/${name.replaceAll('/', '-')}.txt` };\n }\n await mkdir(join(stage, 'sources'), { recursive: true });\n await writeFile(join(stage, 'sources/native-dependencies.json'), `${JSON.stringify(provenance, null, 2)}\\n`);\n await writeFile(join(stage, 'openssl.cnf'), 'openssl_conf = openssl_init\\n[openssl_init]\\nproviders = provider_sect\\n[provider_sect]\\ndefault = default_sect\\nlegacy = legacy_sect\\n[default_sect]\\nactivate = 1\\n[legacy_sect]\\nactivate = 1\\n');\n return [...systemDependencies].sort();\n}\nasync function copyExplicitLibraries(config: AcbrConfig, stage: string): Promise<void> {\n if (!config.native.libraryFiles?.length) throw new Error('Windows exige native.libraryFiles com DLLs OpenSSL 3/libxml2 e arquivos .LICENSE adjacentes.');\n await mkdir(join(stage, 'lib'), { recursive: true }); await mkdir(join(stage, 'licenses'), { recursive: true });\n const sources: Record<string, unknown> = {};\n const dependencyDirectories = new Set([...(config.native.libraryFiles ?? []), ...(config.native.providerFiles ?? [])].map(dirname));\n for (const directory of dependencyDirectories) {\n for (const entry of await readdir(directory)) {\n if (entry.endsWith('.LICENSE')) await copyFile(join(directory, entry), join(stage, 'licenses', entry));\n else if (entry === 'SOURCE.json') {\n await mkdir(join(stage, 'sources'), { recursive: true });\n await copyFile(join(directory, entry), join(stage, 'sources', `${basename(directory)}-SOURCE.json`));\n }\n }\n }\n for (const [directory, files] of [['lib', config.native.libraryFiles], ['ossl-modules', config.native.providerFiles ?? []]] as const) {\n await mkdir(join(stage, directory), { recursive: true });\n for (const source of files) {\n await copyFile(source, join(stage, directory, basename(source)));\n await copyFile(`${source}.LICENSE`, join(stage, 'licenses', `${basename(source)}.txt`));\n if (await exists(`${source}.SOURCE.json`)) sources[`${directory}/${basename(source)}`] = JSON.parse(await readFile(`${source}.SOURCE.json`, 'utf8'));\n }\n }\n if (!config.native.providerFiles?.some(path => basename(path).toLowerCase() === 'legacy.dll')) throw new Error('Windows requer native.providerFiles com o provider legacy.dll de OpenSSL 3 e licen\u00E7a adjacente.');\n await mkdir(join(stage, 'sources'), { recursive: true });\n await writeFile(join(stage, 'sources/native-dependencies.json'), `${JSON.stringify(sources, null, 2)}\\n`);\n await writeFile(join(stage, 'openssl.cnf'), 'openssl_conf = openssl_init\\n[openssl_init]\\nproviders = provider_sect\\n[provider_sect]\\ndefault = default_sect\\nlegacy = legacy_sect\\n[default_sect]\\nactivate = 1\\n[legacy_sect]\\nactivate = 1\\n');\n}\nexport async function buildNative(config: AcbrConfig, options: { testOnly?: boolean } = {}): Promise<BuiltRuntimeManifest> {\n if (!['linux', 'win32'].includes(process.platform) || process.arch !== 'x64') throw new Error('Build inicial suporta Linux x64 e Windows x64.');\n const lock = await verifySource(config);\n const contract = await generatedManifest(config);\n if (contract.sourceRevision !== lock.source.revision || contract.sourceHash !== lock.source.treeHash) throw new Error('Contrato gerado n\u00E3o corresponde \u00E0s fontes travadas. Execute generate.');\n const lazarus = await findLazarus(config);\n const source = config.source.directory;\n const target = options.testOnly ? join(config.projectRoot, '.acbr/test-runtime', `${process.platform}-${process.arch}`) : runtimeDirectory(config);\n const stage = join(dirname(target), `.runtime-stage-${randomUUID()}`);\n const units = join(stage, '.units');\n await mkdir(units, { recursive: true });\n const executable = process.platform === 'win32' ? 'acbr-worker.exe' : 'acbr-worker';\n try {\n const cpu = (await runCommand(config.native.fpc, ['-iTP'])).stdout.trim();\n if (cpu !== 'x86_64') throw new Error(`FPC deve compilar x86_64, encontrado ${cpu}.`);\n const targetOs = process.platform === 'win32' ? 'win64' : 'linux';\n const fontPaths = await subdirectories(join(source, 'Fontes'));\n const lazPaths = [join(lazarus, 'components/lazutils/lib', `x86_64-${targetOs}`), join(lazarus, 'lcl/units', `x86_64-${targetOs}`), join(lazarus, 'lcl/units', `x86_64-${targetOs}`, 'nogui'), join(lazarus, 'packager/units', `x86_64-${targetOs}`)];\n const searchPaths = [dirname(config.native.project), join(config.generator.outputDir, 'native/generated'), ...fontPaths, ...lazPaths];\n const args = ['-vew', '-Mdelphi', '-Scghi', '-O2', '-g-', '-dNOGUI', '-dNOREPORT', ...(options.testOnly ? ['-dACBR_NODE_TEST'] : []), `-FU${units}`, `-FE${stage}`, `-o${executable}`,\n ...searchPaths.map(path => `-Fu${path}`), ...fontPaths.map(path => `-Fi${path}`), config.native.project];\n const responseFile = join(stage, '.compiler.rsp');\n if (args.some(arg => /[\\\"\\r\\n]/.test(arg))) throw new Error('Caminhos do build n\u00E3o podem conter aspas ou quebras de linha.');\n await writeFile(responseFile, args.slice(0, -1).join('\\n') + '\\n');\n const logPath = join(config.projectRoot, '.acbr/build.log');\n try {\n const compilation = await runCommand(config.native.fpc, [`@${responseFile}`, config.native.project], { cwd: config.projectRoot, maxOutputBytes: 32 * 1024 * 1024 });\n await writeFile(logPath, compilation.stdout + compilation.stderr);\n } catch (error) {\n const compilation = error as Error & { stdout?: string; stderr?: string };\n await writeFile(logPath, (compilation.stdout ?? '') + (compilation.stderr ?? compilation.message));\n throw new Error(`${compilation.message}\\nLog completo: ${logPath}`, { cause: compilation });\n }\n const systemDependencies = process.platform === 'linux' ? await copyLinuxLibraries(stage) : (await copyExplicitLibraries(config, stage), []);\n const schemas = join(source, 'Exemplos/ACBrDFe/Schemas/NFe');\n await copyTree(schemas, join(stage, 'schemas'));\n const services = join(source, 'Fontes/ACBrDFe/ACBrNFe/ACBrNFeServicos.ini');\n await copyFile(services, join(stage, 'ACBrNFeServicos.ini'));\n await mkdir(join(stage, 'licenses'), { recursive: true });\n await copyFile(join(source, 'Doctos/LICENSE.TXT'), join(stage, 'licenses/ACBr-LICENSE.TXT'));\n await mkdir(join(stage, 'sources/native'), { recursive: true });\n await copyNativeSources(dirname(config.native.project), join(stage, 'sources/native'));\n await copyFile(join(config.generator.outputDir, 'native/generated/AcbrModels.pas'), join(stage, 'sources/native/AcbrModels.pas'));\n for (const name of ['fp-compiler-3.2.2', 'fp-units-rtl-3.2.2', 'fpc']) {\n const license = `/usr/share/doc/${name}/copyright`;\n if (await exists(license)) { await copyFile(license, join(stage, 'licenses/FPC-copyright.txt')); break; }\n }\n await copyCompilerLicenses(config, stage, lazarus);\n const archive = join(stage, 'sources/acbr-source.tar.gz');\n const tarArgs = process.platform === 'linux' ? ['--sort=name', '--mtime=@0', '--owner=0', '--group=0', '--numeric-owner', '-I', 'gzip -n'] : [];\n await runCommand('tar', [...tarArgs, process.platform === 'linux' ? '-cf' : '-czf', archive, '-C', source, 'Fontes', 'Exemplos/ACBrDFe/Schemas/NFe', 'Doctos/LICENSE.TXT']);\n await writeFile(join(stage, 'sources/build.json'), `${JSON.stringify({ sourceRevision: lock.source.revision, sourceUrl: lock.source.url, sourceTreeHash: lock.source.treeHash,\n compiler: (await runCommand(config.native.fpc, ['-iV'])).stdout.trim(), lazarusRoot: lazarus, lazarusVersion: basename(lazarus),\n compilerSourceUrl: 'https://gitlab.com/freepascal.org/fpc/source/-/tree/release_3_2_2', testOnly: options.testOnly ?? false, platform: process.platform, arch: process.arch,\n flags: ['-Mdelphi', '-Scghi', '-O2', '-dNOGUI', '-dNOREPORT'], sourceParts: lock.source.parts }, null, 2)}\\n`);\n await rm(units, { recursive: true, force: true });\n await rm(responseFile, { force: true });\n if (process.platform !== 'win32') await chmod(join(stage, executable), 0o755);\n const currentGenerated = await generatedManifest(config);\n if (currentGenerated.contractHash !== contract.contractHash || currentGenerated.sourceHash !== contract.sourceHash ||\n Object.entries(contract.fileHashes).some(([name, hash]) => currentGenerated.fileHashes[name] !== hash)) throw new Error('Arquivos gerados mudaram durante a compila\u00E7\u00E3o. Execute build novamente.');\n const currentSource = await verifySource(config);\n if (currentSource.source.revision !== lock.source.revision || currentSource.source.treeHash !== lock.source.treeHash) throw new Error('Fontes ACBr foram atualizadas durante a compila\u00E7\u00E3o. Execute generate e build novamente.');\n const files = (await snapshotSource(stage)).files;\n const manifest: BuiltRuntimeManifest = { formatVersion: 1, sourceRevision: lock.source.revision, contractHash: contract.contractHash,\n platform: process.platform, arch: process.arch, executable, files, generatedFileHashes: contract.fileHashes, systemDependencies, ...(options.testOnly ? { testOnly: true } : {}) };\n await writeFile(join(stage, 'manifest.json'), `${JSON.stringify(manifest, null, 2)}\\n`);\n await replaceRuntime(stage, target);\n return manifest;\n } finally { await rm(stage, { recursive: true, force: true }); }\n}\nasync function copyNativeSources(source: string, target: string): Promise<void> {\n await mkdir(target, { recursive: true });\n for (const entry of await readdir(source, { withFileTypes: true })) {\n if (entry.isDirectory() && !entry.name.startsWith('.')) await copyNativeSources(join(source, entry.name), join(target, entry.name));\n else if (entry.isFile() && /\\.(pas|lpr|inc|lpi)$/i.test(entry.name)) await copyFile(join(source, entry.name), join(target, entry.name));\n }\n}\nasync function copyTree(source: string, target: string): Promise<void> {\n await mkdir(target, { recursive: true });\n for (const entry of await readdir(source, { withFileTypes: true })) {\n if (entry.isSymbolicLink()) throw new Error(`Arquivo de distribui\u00E7\u00E3o n\u00E3o pode ser link: ${entry.name}.`);\n if (entry.isDirectory()) await copyTree(join(source, entry.name), join(target, entry.name));\n else if (entry.isFile()) await copyFile(join(source, entry.name), join(target, entry.name));\n }\n}\nasync function replaceRuntime(stage: string, target: string): Promise<void> {\n const backup = `${target}.${randomUUID()}.backup`;\n const hadTarget = await exists(target);\n if (hadTarget) await rename(target, backup);\n try { await rename(stage, target); }\n catch (error) { if (hadTarget) await rename(backup, target); throw error; }\n if (hadTarget) await rm(backup, { recursive: true, force: true });\n}\nexport async function checkBuild(config: AcbrConfig): Promise<BuiltRuntimeManifest> {\n const lock = await verifySource(config);\n const generated = await generatedManifest(config);\n const directory = runtimeDirectory(config);\n const manifest = JSON.parse(await readFile(join(directory, 'manifest.json'), 'utf8')) as BuiltRuntimeManifest;\n if (manifest.formatVersion !== 1 || manifest.platform !== process.platform || manifest.arch !== process.arch ||\n manifest.sourceRevision !== lock.source.revision || generated.sourceHash !== lock.source.treeHash || manifest.contractHash !== generated.contractHash ||\n !manifest.generatedFileHashes || Object.entries(generated.fileHashes).some(([name, hash]) => manifest.generatedFileHashes[name] !== hash) ||\n typeof manifest.executable !== 'string' || !manifest.files || !Object.hasOwn(manifest.files, manifest.executable)) throw new Error('Runtime diverge das fontes ou contrato. Execute build.');\n for (const [path, expected] of Object.entries(manifest.files)) {\n if (path.startsWith('/') || path.includes('\\\\') || path.split('/').includes('..') || !/^[a-f0-9]{64}$/.test(expected)) throw new Error(`Caminho/hash inv\u00E1lido no runtime: ${path}.`);\n if (await fileHash(join(directory, path)) !== expected) throw new Error(`Hash inv\u00E1lido no runtime: ${path}.`);\n }\n return manifest;\n}\nexport interface DoctorItem { name: string; ok: boolean; detail: string; }\nexport async function doctor(config?: AcbrConfig): Promise<DoctorItem[]> {\n const items: DoctorItem[] = [{ name: 'Node.js', ok: (Number(process.versions.node.split('.')[0]) > 22 || (Number(process.versions.node.split('.')[0]) === 22 && Number(process.versions.node.split('.')[1]) >= 12)), detail: process.versions.node }];\n for (const [name, command, args] of [['SVN', 'svn', ['--version', '--quiet']], ['Free Pascal', config?.native.fpc ?? 'fpc', ['-iV']]] as const) {\n try { const result = await runCommand(command, [...args]); items.push({ name, ok: true, detail: result.stdout.trim() }); }\n catch (error) { items.push({ name, ok: false, detail: (error as Error).message }); }\n }\n if (config) {\n try { items.push({ name: 'Lazarus', ok: true, detail: await findLazarus(config) }); }\n catch (error) { items.push({ name: 'Lazarus', ok: false, detail: (error as Error).message }); }\n try { const lock = await verifySource(config); items.push({ name: 'Fontes ACBr', ok: true, detail: `revis\u00E3o ${lock.source.revision}, ${lock.source.treeHash}` }); }\n catch (error) { items.push({ name: 'Fontes ACBr', ok: false, detail: (error as Error).message }); }\n }\n if (process.platform === 'linux') {\n try { const result = await runCommand('ldconfig', ['-p']); const missing = REQUIRED_DYNAMIC.filter(name => !result.stdout.includes(name)); items.push({ name: 'OpenSSL/libxml2 din\u00E2micos', ok: missing.length === 0, detail: missing.length ? `Ausentes: ${missing.join(', ')}` : REQUIRED_DYNAMIC.join(', ') }); }\n catch (error) { items.push({ name: 'OpenSSL/libxml2 din\u00E2micos', ok: false, detail: (error as Error).message }); }\n }\n return items;\n}\n\nasync function copyCompilerLicenses(config: AcbrConfig, stage: string, lazarus: string): Promise<void> {\n const packagedLazarus = fileURLToPath(new URL('../docs/licenses/lazarus/', import.meta.url));\n const packagedFpc = fileURLToPath(new URL('../docs/licenses/fpc/', import.meta.url));\n const notices: Record<string, { source: string; sha256: string }> = {};\n async function copyNotice(name: string, candidates: string[]): Promise<void> {\n for (const source of candidates) if (await exists(source)) {\n await copyFile(source, join(stage, 'licenses', name));\n notices[name] = { source, sha256: await fileHash(source) };\n return;\n }\n throw new Error(`Notice obrigat\u00F3rio ausente: ${name}.`);\n }\n for (const name of ['COPYING.txt', 'COPYING.LGPL.txt', 'COPYING.modifiedLGPL.txt']) {\n await copyNotice(`Lazarus-${name}`, [join(lazarus, name), join(lazarus, 'docs', name), join(packagedLazarus, name)]);\n }\n if (await exists(join(packagedLazarus, 'ORIGIN.json'))) await copyFile(join(packagedLazarus, 'ORIGIN.json'), join(stage, 'licenses/Lazarus-notice-origin.json'));\n const fpcRoot = resolve(dirname(config.native.fpc), '../..');\n const sourceRoots = [join(fpcRoot, 'source'), join(lazarus, 'fpc/3.2.2/source'), '/usr/share/fpcsrc/3.2.2'];\n for (const [name, sourceRelative] of [['COPYING.GPL.txt', 'compiler/COPYING.txt'], ['COPYING.LGPL.txt', 'rtl/COPYING.txt'], ['COPYING.FPC', 'rtl/COPYING.FPC']] as const) {\n await copyNotice(`FPC-${name}`, [...sourceRoots.map(directory => join(directory, sourceRelative)), join(packagedFpc, name)]);\n }\n if (await exists(join(packagedFpc, 'ORIGIN.json'))) await copyFile(join(packagedFpc, 'ORIGIN.json'), join(stage, 'licenses/FPC-notice-origin.json'));\n const candidates = [join(fpcRoot, 'doc'), fpcRoot, join(lazarus, 'fpc'), '/usr/share/doc/fp-compiler-3.2.2', '/usr/share/doc/fp-units-rtl-3.2.2'];\n for (const directory of candidates) {\n if (!(await exists(directory))) continue;\n for (const name of await readdir(directory)) {\n if (/^(?:copying|license|copyright)/i.test(name) && (await stat(join(directory, name))).isFile()) await copyFile(join(directory, name), join(stage, 'licenses', `FPC-${basename(directory)}-${name}`));\n }\n }\n await writeFile(join(stage, 'licenses/toolchain-notices.json'), `${JSON.stringify(notices, null, 2)}\\n`);\n}\n", "import { spawn } from 'node:child_process';\nimport { createHash, randomUUID } from 'node:crypto';\nimport { createReadStream } from 'node:fs';\nimport { access, mkdir, readdir, readFile, rename, rm, stat, writeFile } from 'node:fs/promises';\nimport { dirname, join, relative, resolve, sep } from 'node:path';\nimport { SOURCE_PARTS, type AcbrConfig } from './config.js';\n\nexport interface SourceSnapshot { treeHash: string; files: Record<string, string>; }\nexport interface SourceLock {\n formatVersion: 1;\n source: { url: string; revision: number; parts: string[]; treeHash: string; files: Record<string, string> };\n}\nexport interface CommandResult { stdout: string; stderr: string; }\nexport async function runCommand(command: string, args: string[], options: { cwd?: string; env?: NodeJS.ProcessEnv; maxOutputBytes?: number } = {}): Promise<CommandResult> {\n return new Promise((done, fail) => {\n const child = spawn(command, args, { cwd: options.cwd, env: options.env ?? process.env, stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true, shell: false });\n let stdout = ''; let stderr = ''; let overflow = false;\n const maximum = options.maxOutputBytes ?? 16 * 1024 * 1024;\n const append = (kind: 'stdout' | 'stderr', data: Buffer) => {\n if (overflow) return;\n if (kind === 'stdout') stdout += data.toString('utf8'); else stderr += data.toString('utf8');\n if (Buffer.byteLength(stdout) + Buffer.byteLength(stderr) > maximum) { overflow = true; child.kill(); }\n };\n child.stdout.on('data', data => append('stdout', data)); child.stderr.on('data', data => append('stderr', data));\n child.on('error', error => fail(new Error(`N\u00E3o foi poss\u00EDvel executar ${command}: ${error.message}`, { cause: error })));\n child.on('close', code => {\n if (overflow) fail(new Error(`Sa\u00EDda de ${command} excedeu o limite de ${maximum} bytes.`));\n else if (code !== 0) {\n const diagnostic = (stderr || stdout).split('\\n').slice(-80).join('\\n').slice(-16000);\n fail(Object.assign(new Error(`${command} terminou com c\u00F3digo ${code}:\\n${diagnostic}`), { stdout, stderr }));\n }\n else done({ stdout, stderr });\n });\n });\n}\nexport async function fileHash(path: string): Promise<string> {\n const hash = createHash('sha256');\n for await (const chunk of createReadStream(path)) hash.update(chunk);\n return hash.digest('hex');\n}\nexport async function snapshotSource(directory: string): Promise<SourceSnapshot> {\n const files: Record<string, string> = Object.create(null);\n async function scan(current: string): Promise<void> {\n const entries = (await readdir(current, { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name, 'en'));\n for (const entry of entries) {\n if (entry.name === '.svn') continue;\n const path = join(current, entry.name);\n if (entry.isSymbolicLink()) throw new Error(`Fonte ACBr cont\u00E9m link simb\u00F3lico: ${path}.`);\n if (entry.isDirectory()) await scan(path);\n else if (entry.isFile()) files[relative(directory, path).split(sep).join('/')] = await fileHash(path);\n else throw new Error(`Fonte ACBr cont\u00E9m arquivo especial: ${path}.`);\n }\n }\n await scan(resolve(directory));\n const sortedFiles = Object.fromEntries(Object.entries(files).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));\n const treeHash = createHash('sha256').update(JSON.stringify(sortedFiles)).digest('hex');\n return { treeHash, files: sortedFiles };\n}\nfunction validateLock(value: unknown): SourceLock {\n if (!value || typeof value !== 'object') throw new Error('Lock ACBr inv\u00E1lido.');\n const lock = value as SourceLock;\n if (lock.formatVersion !== 1 || !lock.source || !Number.isSafeInteger(lock.source.revision) || lock.source.revision < 1 ||\n !Array.isArray(lock.source.parts) || !lock.source.files || typeof lock.source.files !== 'object' || Array.isArray(lock.source.files) ||\n !/^[a-f0-9]{64}$/.test(lock.source.treeHash)) throw new Error('Formato inv\u00E1lido em acbr.lock.json.');\n for (const [path, hash] of Object.entries(lock.source.files)) {\n if (path.startsWith('/') || path.includes('\\\\') || path.split('/').includes('..') || !/^[a-f0-9]{64}$/.test(hash)) throw new Error('Caminho ou hash inv\u00E1lido no lock ACBr.');\n }\n if (lock.source.parts.join('\\n') !== SOURCE_PARTS.join('\\n')) throw new Error('Partes ACBr divergentes no lock.');\n return lock;\n}\nexport async function readSourceLock(config: AcbrConfig): Promise<SourceLock> {\n let lock: SourceLock;\n try { lock = validateLock(JSON.parse(await readFile(config.lockPath, 'utf8'))); }\n catch (error) { throw new Error(`N\u00E3o foi poss\u00EDvel ler ${config.lockPath}. Execute acbr-node source update.`, { cause: error }); }\n if (lock.source.url !== config.source.url) throw new Error('URL ACBr do lock diverge da configura\u00E7\u00E3o.');\n if (config.source.revision !== 'HEAD' && lock.source.revision !== config.source.revision) throw new Error('Revis\u00E3o ACBr do lock diverge da configura\u00E7\u00E3o. Execute source update explicitamente.');\n return lock;\n}\nexport async function verifySource(config: AcbrConfig): Promise<SourceLock> {\n try {\n await access(`${config.lockPath}.operation`);\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return verifySourceContents(config);\n throw error;\n }\n throw new Error('Atualiza\u00E7\u00E3o de fontes ACBr em andamento. Aguarde o CLI concluir.');\n}\nasync function verifySourceContents(config: AcbrConfig): Promise<SourceLock> {\n const lock = await readSourceLock(config);\n const snapshot = await snapshotSource(config.source.directory);\n if (snapshot.treeHash !== lock.source.treeHash) {\n const names = new Set([...Object.keys(snapshot.files), ...Object.keys(lock.source.files)]);\n const changed = [...names].filter(path => snapshot.files[path] !== lock.source.files[path]);\n throw new Error(`Fontes ACBr divergem do lock (${changed.length} arquivo(s)): ${changed.slice(0, 10).join(', ')}. Preserve as altera\u00E7\u00F5es antes de atualizar.`);\n }\n return lock;\n}\nasync function writeLock(config: AcbrConfig, snapshot: SourceSnapshot, revision: number): Promise<SourceLock> {\n const lock: SourceLock = { formatVersion: 1, source: { url: config.source.url, revision, parts: [...SOURCE_PARTS], ...snapshot } };\n await mkdir(dirname(config.lockPath), { recursive: true });\n const temporary = `${config.lockPath}.${randomUUID()}.tmp`;\n await writeFile(temporary, `${JSON.stringify(lock, null, 2)}\\n`, { flag: 'wx' });\n try { await rename(temporary, config.lockPath); } finally { await rm(temporary, { force: true }); }\n return lock;\n}\nexport async function lockExistingSource(config: AcbrConfig, revision: number): Promise<SourceLock> {\n return withSourceOperation(config, () => performLockExistingSource(config, revision));\n}\nasync function performLockExistingSource(config: AcbrConfig, revision: number): Promise<SourceLock> {\n if (!Number.isSafeInteger(revision) || revision < 1) throw new Error('Uma revis\u00E3o SVN positiva \u00E9 obrigat\u00F3ria para registrar fontes existentes.');\n try { await access(config.lockPath); } catch { return writeLock(config, await snapshotSource(config.source.directory), revision); }\n throw new Error('O lock j\u00E1 existe. Use source update para atualizar fontes e lock em conjunto.');\n}\nexport async function resolveSourceRevision(url: string, revision: 'HEAD' | number, runner: typeof runCommand = runCommand): Promise<number> {\n const { stdout } = await runner('svn', ['info', '--non-interactive', '--show-item', 'revision', '-r', String(revision), url]);\n const resolved = Number(stdout.trim());\n if (!Number.isSafeInteger(resolved) || resolved < 1) throw new Error('SVN n\u00E3o retornou uma revis\u00E3o v\u00E1lida.');\n return resolved;\n}\nasync function withSourceOperation<T>(config: AcbrConfig, operation: () => Promise<T>): Promise<T> {\n const marker = `${config.lockPath}.operation`;\n try { await writeFile(marker, `${JSON.stringify({ pid: process.pid, startedAt: new Date().toISOString() })}\\n`, { flag: 'wx' }); }\n catch (error) { throw new Error('Outra opera\u00E7\u00E3o de fontes ACBr est\u00E1 em andamento. Se o processo anterior terminou abruptamente, confira o PID do arquivo acbr.lock.json.operation antes de remov\u00EA-lo.', { cause: error }); }\n try { return await operation(); } finally { await rm(marker, { force: true }); }\n}\nexport async function updateSource(config: AcbrConfig, revision: 'HEAD' | number = 'HEAD', runner: typeof runCommand = runCommand): Promise<SourceLock> {\n return withSourceOperation(config, () => performUpdateSource(config, revision, runner));\n}\nasync function performUpdateSource(config: AcbrConfig, revision: 'HEAD' | number, runner: typeof runCommand): Promise<SourceLock> {\n const source = resolve(config.source.directory);\n if (source === config.projectRoot || source === dirname(source)) throw new Error('O diret\u00F3rio das fontes deve ser exclusivo e n\u00E3o pode ser a raiz do projeto ou do sistema.');\n let exists = false;\n try { const details = await stat(source); exists = true; if (!details.isDirectory()) throw new Error('O caminho das fontes n\u00E3o \u00E9 um diret\u00F3rio.'); } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n if (exists && (await readdir(source)).length) await verifySourceContents({ ...config, source: { ...config.source, revision: 'HEAD' } });\n const resolvedRevision = await resolveSourceRevision(config.source.url, revision, runner);\n const stage = join(dirname(source), `.acbr-source-stage-${randomUUID()}`);\n const backup = join(dirname(source), `.acbr-source-backup-${randomUUID()}`);\n await mkdir(stage, { recursive: true });\n let previousLock: string | undefined;\n try { previousLock = await readFile(config.lockPath, 'utf8'); } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n let backedUp = false; let replaced = false; let lockWritten = false;\n try {\n for (const part of SOURCE_PARTS) {\n const destination = join(stage, ...part.split('/'));\n await mkdir(dirname(destination), { recursive: true });\n await runner('svn', ['export', '--non-interactive', '-q', '-r', String(resolvedRevision), `${config.source.url}/${part}`, destination], { maxOutputBytes: 4 * 1024 * 1024 });\n }\n const snapshot = await snapshotSource(stage);\n if (exists) { await rename(source, backup); backedUp = true; }\n await rename(stage, source); replaced = true;\n const lock = await writeLock(config, snapshot, resolvedRevision); lockWritten = true;\n await persistRevision(config, resolvedRevision);\n config.source.revision = resolvedRevision;\n if (backedUp) await rm(backup, { recursive: true, force: true }).catch(() => undefined);\n return lock;\n } catch (error) {\n if (lockWritten) {\n if (previousLock === undefined) await rm(config.lockPath, { force: true });\n else await writeFile(config.lockPath, previousLock);\n }\n if (replaced) await rm(source, { recursive: true, force: true });\n if (backedUp) await rename(backup, source);\n throw error;\n } finally { await rm(stage, { recursive: true, force: true }); }\n}\n\nasync function persistRevision(config: AcbrConfig, revision: number): Promise<void> {\n const original = JSON.parse(await readFile(config.configPath, 'utf8')) as { source: { revision: number } };\n original.source.revision = revision;\n const temporary = `${config.configPath}.${randomUUID()}.tmp`;\n await writeFile(temporary, `${JSON.stringify(original, null, 2)}\\n`, { flag: 'wx' });\n try { await rename(temporary, config.configPath); } finally { await rm(temporary, { force: true }); }\n}\n", "import { spawn, type ChildProcessWithoutNullStreams, type SpawnOptionsWithoutStdio } from 'node:child_process';\nimport { readFile, stat } from 'node:fs/promises';\nimport path from 'node:path';\nimport { createRequire } from 'node:module';\nimport { createHash, randomUUID } from 'node:crypto';\nimport { TextDecoder } from 'node:util';\nimport { ErroAcbrNode, type ConfiguracaoEmissor, type Contrato, type ConfiguracaoMotor, type RequisicaoMotor, type ResultadoFiscal, type RuntimeManifest, type OpcoesOperacao, type Consulta, type Cancelamento, type CartaCorrecao, type Inutilizacao } from './types.js';\nexport * from './types.js';\ntype Launch = (exe: string, args: string[], config: SpawnOptionsWithoutStdio) => ChildProcessWithoutNullStreams;\nexport interface OpcoesEmissor extends ConfiguracaoEmissor {\n contrato: Contrato; runtimeDirectory?: string; timeoutMs?: number; limiteFila?: number; limiteBytes?: number;\n validaDocumento?: (documento: unknown) => void;\n /** Inje\u00E7\u00E3o para testes offline. O padr\u00E3o sempre inicia o motor distribu\u00EDdo. */\n criaProcesso?: Launch;\n}\nconst STATES = new Set(['DENEGADO','XML_GERADO','VALIDADO','ASSINADO','AUTORIZADO','REJEITADO','PENDENTE','INDETERMINADO','CONSULTADO','CANCELADO','EVENTO_REGISTRADO','INUTILIZADO','ERRO']);\nconst UFS = new Set('AC AL AP AM BA CE DF ES GO MA MT MS MG PA PB PR PE PI RJ RN RS RO RR SC SP SE TO'.split(' '));\nconst MAX_BYTES = 8 * 1024 * 1024;\nconst plain = (v: unknown): v is Record<string,unknown> => v !== null && typeof v === 'object' && !Array.isArray(v);\nconst validContract = (v: unknown): v is Contrato => plain(v) && Number.isInteger(v.sourceRevision) && Number(v.sourceRevision)>0 && typeof v.contractHash==='string' && /^[a-f0-9]{64}$/.test(v.contractHash);\nconst fail = (code: string, message: string, req?: RequisicaoMotor, unknown=false) => new ErroAcbrNode(code,message,unknown,req?.comando==='transmitir'?req.xmlBase64:undefined);\nfunction confined(root: string, relative: string): string {\n const file=path.resolve(root,relative), part=path.relative(root,file);\n if(!relative || path.isAbsolute(relative) || part==='..' || part.startsWith('..'+path.sep)) throw fail('RUNTIME_INVALIDO','Caminho inv\u00E1lido no runtime.');\n return file;\n}\nasync function resolveRuntime(directory: string | undefined, contract: Contrato): Promise<{directory:string;executable:string}> {\n if(!validContract(contract)) throw fail('CONTRATO_INVALIDO','Contrato gerado inv\u00E1lido.');\n let root=directory;\n if(!root) {\n if(!['linux','win32'].includes(process.platform) || process.arch!=='x64') throw fail('PLATAFORMA_NAO_SUPORTADA','Esta vers\u00E3o exige Linux ou Windows x64.');\n try { const require=createRequire(typeof __filename!=='undefined'?__filename:import.meta.url); root=path.join(path.dirname(require.resolve('cosmemilton-acbr-node-'+process.platform+'-x64/package.json')),'runtime'); }\n catch { throw fail('RUNTIME_AUSENTE','Instale o pacote de runtime da plataforma ou informe runtimeDirectory.'); }\n }\n root=path.resolve(root);\n let m: RuntimeManifest;\n try { m=JSON.parse(await readFile(path.join(root,'manifest.json'),'utf8')); } catch { throw fail('RUNTIME_AUSENTE','Manifesto do runtime n\u00E3o encontrado.'); }\n if(!validContract(m) || m.formatVersion!==1 || !plain(m.files) || typeof m.executable!=='string' || m.platform!==process.platform || m.arch!==process.arch) throw fail('RUNTIME_INVALIDO','Manifesto ou plataforma do runtime inv\u00E1lidos.');\n if(m.sourceRevision!==contract.sourceRevision || m.contractHash!==contract.contractHash) throw fail('CONTRATO_DIVERGENTE','Cliente e motor foram gerados de contratos diferentes; regenere e recompile.');\n for(const [name,hash] of Object.entries(m.files)) {\n if(typeof hash!=='string'||!/^[a-f0-9]{64}$/.test(hash)) throw fail('RUNTIME_INVALIDO','Hash inv\u00E1lido no runtime.');\n const file=confined(root,name); let data:Buffer;\n try { if(!(await stat(file)).isFile()) throw Error(); data=await readFile(file); } catch { throw fail('RUNTIME_INCOMPLETO','Arquivo do runtime ausente.'); }\n if(createHash('sha256').update(data).digest('hex')!==hash) throw fail('RUNTIME_ALTERADO','O runtime n\u00E3o corresponde ao manifesto distribu\u00EDdo.');\n }\n if(!m.files[m.executable]) throw fail('RUNTIME_INVALIDO','O execut\u00E1vel n\u00E3o consta no invent\u00E1rio.');\n return {directory:root,executable:confined(root,m.executable)};\n}\ninterface Pending { req:RequisicaoMotor; bytes:Buffer; signal?:AbortSignal; resolve:(v:ResultadoFiscal)=>void; reject:(e:unknown)=>void; abort?:()=>void }\nexport function criarEmissor(options: OpcoesEmissor) {\n if(!/^\\d{14}$/.test(options.cnpj)||!UFS.has(options.uf)||![55,65].includes(options.modelo)||![1,2].includes(options.ambiente)) throw fail('CONFIGURACAO_INVALIDA','Informe CNPJ, UF, modelo e ambiente v\u00E1lidos.');\n if(!validContract(options.contrato)) throw fail('CONTRATO_INVALIDO','Contrato gerado inv\u00E1lido.');\n const cert=options.certificado;\n if(cert && (typeof cert.senha!=='string' || !!cert.pfx===!!cert.arquivo || cert.pfx && !(cert.pfx instanceof Uint8Array))) throw fail('CERTIFICADO_INVALIDO','Informe A1 em pfx ou arquivo e sua senha.');\n if(options.csc && (!/^\\d{1,6}$/.test(options.csc.id) || typeof options.csc.valor!=='string' || !options.csc.valor || options.csc.valor.length>256)) throw fail('CSC_INVALIDO','CSC inv\u00E1lido.');\n const cfg:Omit<ConfiguracaoEmissor, 'certificado'>={cnpj:options.cnpj,uf:options.uf,modelo:options.modelo,ambiente:options.ambiente,csc:options.csc?{...options.csc}:undefined};\n const certificate=cert?{...cert,pfx:cert.pfx?Buffer.from(cert.pfx):undefined}:undefined;\n const contract={...options.contrato};\n const timeout=options.timeoutMs??120_000, capacity=options.limiteFila??32, bytesLimit=options.limiteBytes??MAX_BYTES;\n if(!Number.isInteger(timeout)||timeout<1||timeout>120000||!Number.isInteger(capacity)||capacity<0||capacity>1000||!Number.isInteger(bytesLimit)||bytesLimit<256||bytesLimit>MAX_BYTES) throw fail('CONFIGURACAO_INVALIDA','Limites de execu\u00E7\u00E3o inv\u00E1lidos.');\n const launch:Launch=options.criaProcesso??((exe,args,config)=>spawn(exe,args,{...config,stdio:['pipe','pipe','pipe']}));\n let runtimePromise:ReturnType<typeof resolveRuntime>|undefined, closed=false, current:{stop:()=>void;done:Promise<void>}|undefined;\n const queue:Pending[]=[];\n async function execute(item:Pending) {\n if(closed||item.signal?.aborted) throw fail('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada antes da execu\u00E7\u00E3o.');\n const runtime=await (runtimePromise??=resolveRuntime(options.runtimeDirectory,contract));\n if(closed||item.signal?.aborted) throw fail('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada antes da execu\u00E7\u00E3o.');\n await new Promise<void>((done)=>{\n let stopError:unknown; let child:ChildProcessWithoutNullStreams|undefined, finished=false, started=false, sending=false, total=0, rest=Buffer.alloc(0), result:ResultadoFiscal|undefined;\n let finishCurrent!:()=>void; const doneCurrent=new Promise<void>(r=>{finishCurrent=r;});\n const uncertain=()=>['transmitir','cancelar','cartaCorrecao','inutilizar'].includes(item.req.comando)&&started || sending;\n const finish=(error?:unknown)=>{\n if(finished)return; finished=true;clearTimeout(timer);item.signal?.removeEventListener('abort',abort);\n item.bytes.fill(0);if(current?.done===doneCurrent)current=undefined;finishCurrent();error?item.reject(error):item.resolve(result!);done();\n };\n const stop=(code:string,message:string)=>{ if(finished||stopError)return; stopError=fail(code,message,item.req,uncertain()); if(child?.pid)child.kill('SIGKILL');else finish(stopError); };\n const abort=()=>stop('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada; confira a situa\u00E7\u00E3o fiscal quando o envio foi iniciado.');\n const timer=setTimeout(()=>stop('TIMEOUT_MOTOR','O motor excedeu o prazo; consulte a situa\u00E7\u00E3o antes de transmitir novamente.'),timeout);\n current={stop:()=>stop('EMISSOR_FECHADO','Emissor encerrado.'),done:doneCurrent};\n const env:NodeJS.ProcessEnv={};\n for(const key of ['PATH','Path','SystemRoot','WINDIR','TEMP','TMP','HOME','LANG','LC_ALL']) if(process.env[key]!==undefined)env[key]=process.env[key];\n if(process.platform==='linux')env.LD_LIBRARY_PATH=path.join(runtime.directory,'lib');\n if(process.platform==='win32'){const inheritedPath=env.Path??env.PATH??'';delete env.Path;env.PATH=path.join(runtime.directory,'lib')+';'+runtime.directory+';'+inheritedPath;}\n const modules=path.join(runtime.directory,'ossl-modules'); env.OPENSSL_MODULES=modules; env.OPENSSL_CONF=path.join(runtime.directory,'openssl.cnf');\n try { child=launch(runtime.executable,['--parent-pid',String(process.pid)],{cwd:runtime.directory,env,windowsHide:true,shell:false,stdio:['pipe','pipe','pipe']}); started=typeof child.pid==='number'; }\n catch { finish(fail('FALHA_INICIAR_MOTOR','N\u00E3o foi poss\u00EDvel iniciar o motor.',item.req)); return; }\n item.signal?.addEventListener('abort',abort,{once:true});\n child.on('spawn',()=>{started=true;});\n child.on('error',()=>finish(fail('FALHA_INICIAR_MOTOR','N\u00E3o foi poss\u00EDvel iniciar o motor.',item.req,uncertain())));\n child.stdin.on('error',()=>stop('FALHA_PIPE','N\u00E3o foi poss\u00EDvel comunicar com o motor.'));\n child.stderr.on('data',()=>{}); // stderr bruto nunca \u00E9 exposto: pode conter mensagens de depend\u00EAncias.\n child.stdout.on('data',(chunk:Buffer)=>{\n if(finished||stopError)return;total+=chunk.length;if(total>bytesLimit){stop('RESPOSTA_EXCESSIVA','Resposta do motor excede o limite.');return;}\n rest=Buffer.concat([rest,chunk]);let end:number;\n while((end=rest.indexOf(10))>=0) {\n const line=rest.subarray(0,end);rest=rest.subarray(end+1);if(!line.length)continue;\n try {\n const frame=JSON.parse(new TextDecoder('utf-8',{fatal:true}).decode(line));\n if(!plain(frame)||frame.id!==item.req.id)throw Error();\n if(frame.tipo==='envioIniciado'){sending=true;continue;}\n if(result||frame.versao!==1||frame.sourceRevision!==contract.sourceRevision||frame.contractHash!==contract.contractHash||typeof frame.sucesso!=='boolean'||!STATES.has(String(frame.estado)))throw Error();\n if(frame.xmlBase64!==undefined&&(typeof frame.xmlBase64!=='string'||!frame.xmlBase64.length||Buffer.from(frame.xmlBase64,'base64').toString('base64')!==frame.xmlBase64))throw Error();\n if(frame.cStat!==undefined&&(!Number.isInteger(frame.cStat)||Number(frame.cStat)<1||Number(frame.cStat)>9999))throw Error();\n result=frame as unknown as ResultadoFiscal;\n }catch{stop('RESPOSTA_INVALIDA','O motor retornou uma resposta inv\u00E1lida.');return;}\n }\n });\n child.on('close',(code)=>{\n if(finished)return;\n if(stopError){finish(stopError);return;}\n if(code!==0||rest.length||!result){finish(fail('FALHA_MOTOR','O motor encerrou sem resposta fiscal v\u00E1lida.',item.req,uncertain()));return;}\n finish();\n });\n child.stdin.end(item.bytes);\n if(item.signal?.aborted)abort();\n });\n }\n let busy=false;\n async function next(){if(busy)return;const item=queue.shift();if(!item)return;busy=true;item.signal?.removeEventListener('abort',item.abort!);try{await execute(item);}catch(e){item.bytes.fill(0);item.reject(e);}finally{busy=false;void next();}}\n async function request(command:RequisicaoMotor['comando'],data:Partial<RequisicaoMotor>,operation:OpcoesOperacao={}):Promise<ResultadoFiscal> {\n if(closed)throw fail('EMISSOR_FECHADO','Emissor encerrado.');\n if(operation.signal?.aborted)throw fail('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada antes da execu\u00E7\u00E3o.');\n if(['assinar','transmitir','consultar','cancelar','cartaCorrecao','inutilizar'].includes(command)&&!certificate)throw fail('CERTIFICADO_AUSENTE','A opera\u00E7\u00E3o exige um certificado A1.');\n if(command==='gerarXml')options.validaDocumento?.(data.documento);\n const config:ConfiguracaoMotor={...cfg};\n if(certificate){let pfx:Buffer;try{pfx=certificate.pfx??await readFile(certificate.arquivo!);}catch{throw fail('CERTIFICADO_AUSENTE','N\u00E3o foi poss\u00EDvel ler o A1 configurado.');}if(pfx.length>2*1024*1024)throw fail('CERTIFICADO_EXCESSIVO','Certificado excede o limite.');config.certificado={pfxBase64:pfx.toString('base64'),senha:certificate.senha};}\n let bytes:Buffer, req:RequisicaoMotor;\n try{bytes=Buffer.from(JSON.stringify({versao:1,id:randomUUID(),...contract,comando:command,config,...data})+'\\n','utf8');if(bytes.length>bytesLimit)throw Error();req=JSON.parse(bytes.toString('utf8'));}catch{throw fail('REQUISICAO_INVALIDA','Dados da opera\u00E7\u00E3o inv\u00E1lidos ou acima do limite.');}\n return new Promise((resolve,reject)=>{\n if(closed){bytes.fill(0);reject(fail('EMISSOR_FECHADO','Emissor encerrado.'));return;}\n if(busy&&queue.length>=capacity){bytes.fill(0);reject(fail('FILA_CHEIA','A fila fiscal est\u00E1 cheia.'));return;}\n const item:Pending={req,bytes,signal:operation.signal,resolve,reject};\n item.abort=()=>{const i=queue.indexOf(item);if(i>=0){queue.splice(i,1);bytes.fill(0);operation.signal?.removeEventListener('abort',item.abort!);reject(fail('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada antes da execu\u00E7\u00E3o.'));}};\n operation.signal?.addEventListener('abort',item.abort,{once:true});queue.push(item);if(operation.signal?.aborted)item.abort();void next();\n });\n }\n const xmlData=(xml:string)=>{if(typeof xml!=='string'||!xml.trim()||Buffer.byteLength(xml,'utf8')>2*1024*1024)throw fail('XML_INVALIDO','XML vazio ou acima do limite.');return {xmlBase64:Buffer.from(xml,'utf8').toString('base64')};};\n const checkKey=(key:string)=>{if(!/^\\d{44}$/.test(key))throw fail('CHAVE_INVALIDA','Chave fiscal inv\u00E1lida.');};\n const reason=(value:string)=>{if(typeof value!=='string'||value.length<15||value.length>255)throw fail('JUSTIFICATIVA_INVALIDA','Justificativa deve ter de 15 a 255 caracteres.');};\n return {\n gerarXml:(documento:object,op?:OpcoesOperacao)=>request('gerarXml',{documento},op),\n validar:(xml:string,op?:OpcoesOperacao)=>request('validar',xmlData(xml),op),\n assinar:(xml:string,op?:OpcoesOperacao)=>request('assinar',xmlData(xml),op),\n transmitir:(xml:string,op?:OpcoesOperacao)=>request('transmitir',xmlData(xml),op),\n consultar:(consulta:Consulta,op?:OpcoesOperacao)=>{checkKey(consulta.chave);if(consulta.recibo&&!/^\\d{15}$/.test(consulta.recibo))throw fail('RECIBO_INVALIDO','Recibo inv\u00E1lido.');return request('consultar',consulta,op);},\n cancelar:(data:Cancelamento,op?:OpcoesOperacao)=>{checkKey(data.chave);reason(data.justificativa);if(!/^\\d{15}$/.test(data.protocolo))throw fail('PROTOCOLO_INVALIDO','Protocolo inv\u00E1lido.');return request('cancelar',data,op);},\n cartaCorrecao:(data:CartaCorrecao,op?:OpcoesOperacao)=>{if(cfg.modelo!==55)throw fail('OPERACAO_NAO_SUPORTADA','Carta de corre\u00E7\u00E3o exige NF-e modelo 55.');checkKey(data.chave);if(typeof data.correcao!=='string'||data.correcao.length<15||data.correcao.length>1000||!Number.isInteger(data.sequenciaEvento??1)||(data.sequenciaEvento??1)<1||(data.sequenciaEvento??1)>20)throw fail('CORRECAO_INVALIDA','Dados da carta de corre\u00E7\u00E3o inv\u00E1lidos.');return request('cartaCorrecao',{...data,sequenciaEvento:data.sequenciaEvento??1},op);},\n inutilizar:(data:Inutilizacao,op?:OpcoesOperacao)=>{reason(data.justificativa);if(!Number.isInteger(data.ano)||data.ano<0||data.ano>99||!Number.isInteger(data.serie)||data.serie<0||data.serie>999||!Number.isInteger(data.numeroInicial)||data.numeroInicial<1||!Number.isInteger(data.numeroFinal)||data.numeroFinal<data.numeroInicial||data.numeroFinal>999999999)throw fail('INUTILIZACAO_INVALIDA','Faixa de inutiliza\u00E7\u00E3o inv\u00E1lida.');return request('inutilizar',{inutilizacao:{ano:data.ano,serie:data.serie,numeroInicial:data.numeroInicial,numeroFinal:data.numeroFinal},justificativa:data.justificativa},op);},\n async fechar(){if(closed)return;closed=true;for(const item of queue.splice(0)){item.signal?.removeEventListener('abort',item.abort!);item.bytes.fill(0);item.reject(fail('EMISSOR_FECHADO','Emissor encerrado.'));}const running=current;running?.stop();if(running)await running.done;certificate?.pfx?.fill(0);}\n };\n}\nexport type Emissor = ReturnType<typeof criarEmissor>;\n", "export const PROTOCOL_VERSION = 1 as const;\nexport type Modelo = 55 | 65;\nexport type Ambiente = 1 | 2;\nexport type Comando = 'gerarXml' | 'validar' | 'assinar' | 'transmitir' | 'consultar' | 'cancelar' | 'cartaCorrecao' | 'inutilizar';\nexport interface Contrato { sourceRevision: number; contractHash: string }\nexport interface CertificadoA1 { pfx?: Uint8Array; arquivo?: string; senha: string }\nexport interface ConfiguracaoEmissor { cnpj: string; uf: string; modelo: Modelo; ambiente: Ambiente; certificado?: CertificadoA1; csc?: { id: string; valor: string } }\nexport interface ConfiguracaoMotor extends Omit<ConfiguracaoEmissor, 'certificado'> { certificado?: { pfxBase64: string; senha: string } }\nexport interface RequisicaoMotor extends Contrato {\n versao: 1; id: string; comando: Comando; config: ConfiguracaoMotor;\n documento?: object; xmlBase64?: string; chave?: string; recibo?: string;\n protocolo?: string; justificativa?: string; correcao?: string; sequenciaEvento?: number;\n inutilizacao?: { ano: number; serie: number; numeroInicial: number; numeroFinal: number };\n}\nexport type Estado = 'DENEGADO' | 'XML_GERADO' | 'VALIDADO' | 'ASSINADO' | 'AUTORIZADO' | 'REJEITADO' | 'PENDENTE' | 'INDETERMINADO' | 'CONSULTADO' | 'CANCELADO' | 'EVENTO_REGISTRADO' | 'INUTILIZADO' | 'ERRO';\nexport interface ResultadoFiscal extends Contrato {\n versao: 1; id: string; sucesso: boolean; estado: Estado; codigo?: string;\n cStat?: number; xMotivo?: string; chave?: string; protocolo?: string; recibo?: string;\n xmlBase64?: string; envioIniciado?: boolean;\n}\nexport interface RuntimeManifest extends Contrato {\n formatVersion: 1; platform: string; arch: string; executable: string; files: Record<string, string>;\n}\nexport interface OpcoesOperacao { signal?: AbortSignal }\nexport interface Consulta { chave: string; recibo?: string }\nexport interface Cancelamento { chave: string; protocolo: string; justificativa: string }\nexport interface CartaCorrecao { chave: string; correcao: string; sequenciaEvento?: number }\nexport interface Inutilizacao { ano: number; serie: number; numeroInicial: number; numeroFinal: number; justificativa: string }\nexport class ErroAcbrNode extends Error {\n readonly name = 'ErroAcbrNode';\n constructor(readonly codigo: string, mensagem: string, readonly resultadoDesconhecido = false, readonly xmlBase64?: string) { super(mensagem); }\n}\n", "// Synthetic signed XML, public X509 certificate only. Never transmit this document.\n// Contains no PFX, private key or password. Generated offline by the test certificate fixture.\nexport const OFFLINE_DOCUMENT = {\n \"infNFe\": {\n \"Versao\": \"4.00\"\n },\n \"Ide\": {\n \"cUF\": 23,\n \"cNF\": 12345678,\n \"natOp\": \"VENDA TESTE OFFLINE\",\n \"modelo\": 55,\n \"serie\": 1,\n \"nNF\": 1,\n \"dEmi\": \"2026-10-08T12:00:00\",\n \"tpNF\": \"tnSaida\",\n \"idDest\": \"doInterna\",\n \"cMunFG\": 2304400,\n \"tpImp\": \"tiRetrato\",\n \"tpEmis\": \"teNormal\",\n \"tpAmb\": \"taHomologacao\",\n \"finNFe\": \"fnNormal\",\n \"indFinal\": \"cfConsumidorFinal\",\n \"indPres\": \"pcPresencial\",\n \"procEmi\": \"peAplicativoContribuinte\",\n \"verProc\": \"ACBR-NODE-OFFLINE\"\n },\n \"Emit\": {\n \"CNPJCPF\": \"11222333000181\",\n \"xNome\": \"Caf\u00E9 S\u00E3o Jos\u00E9 TESTE OFFLINE SEM VALOR FISCAL\",\n \"IE\": \"123456789\",\n \"CRT\": \"crtSimplesNacional\",\n \"EnderEmit\": {\n \"xLgr\": \"RUA TESTE\",\n \"nro\": \"1\",\n \"xBairro\": \"TESTE\",\n \"cMun\": 2304400,\n \"xMun\": \"FORTALEZA\",\n \"UF\": \"CE\",\n \"CEP\": 60000000,\n \"cPais\": 1058,\n \"xPais\": \"BRASIL\"\n }\n },\n \"Dest\": {\n \"CNPJCPF\": \"12345678909\",\n \"xNome\": \"NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL\",\n \"indIEDest\": \"inNaoContribuinte\",\n \"EnderDest\": {\n \"xLgr\": \"RUA TESTE\",\n \"nro\": \"2\",\n \"xBairro\": \"TESTE\",\n \"cMun\": 2304400,\n \"xMun\": \"FORTALEZA\",\n \"UF\": \"CE\",\n \"CEP\": 60000000,\n \"cPais\": 1058,\n \"xPais\": \"BRASIL\"\n }\n },\n \"Det\": [\n {\n \"Prod\": {\n \"nItem\": 1,\n \"cProd\": \"TESTE\",\n \"cEAN\": \"SEM GTIN\",\n \"xProd\": \"Caf\u00E9 S\u00E3o Jos\u00E9 PRODUTO SINT\u00C9TICO OFFLINE\",\n \"NCM\": \"22021000\",\n \"CFOP\": \"5102\",\n \"uCom\": \"UN\",\n \"qCom\": \"1\",\n \"vUnCom\": \"10\",\n \"vProd\": \"10\",\n \"cEANTrib\": \"SEM GTIN\",\n \"uTrib\": \"UN\",\n \"qTrib\": \"1\",\n \"vUnTrib\": \"10\",\n \"IndTot\": \"itSomaTotalNFe\"\n },\n \"Imposto\": {\n \"ICMS\": {\n \"orig\": \"oeNacional\",\n \"CSOSN\": \"csosn102\"\n },\n \"PIS\": {\n \"CST\": \"pis07\"\n },\n \"COFINS\": {\n \"CST\": \"cof07\"\n }\n }\n }\n ],\n \"Total\": {\n \"ICMSTot\": {\n \"vProd\": \"10\",\n \"vNF\": \"10\"\n }\n },\n \"Transp\": {\n \"modFrete\": \"mfSemFrete\"\n },\n \"pag\": [\n {\n \"tPag\": \"fpDinheiro\",\n \"indPag\": \"ipVista\",\n \"vPag\": \"10\"\n }\n ]\n} as const;\nexport const OFFLINE_SIGNED_XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><NFe xmlns=\\\"http://www.portalfiscal.inf.br/nfe\\\"><infNFe Id=\\\"NFe23261011222333000181550010000000011123456780\\\" versao=\\\"4.00\\\"><ide><cUF>23</cUF><cNF>12345678</cNF><natOp>VENDA TESTE OFFLINE</natOp><mod>55</mod><serie>1</serie><nNF>1</nNF><dhEmi>2026-10-08T12:00:00-03:00</dhEmi><tpNF>1</tpNF><idDest>1</idDest><cMunFG>2304400</cMunFG><tpImp>1</tpImp><tpEmis>1</tpEmis><cDV>0</cDV><tpAmb>2</tpAmb><finNFe>1</finNFe><indFinal>1</indFinal><indPres>1</indPres><procEmi>0</procEmi><verProc>ACBR-NODE-OFFLINE</verProc></ide><emit><CNPJ>11222333000181</CNPJ><xNome>Caf\u00E9 S\u00E3o Jos\u00E9 TESTE OFFLINE SEM VALOR FISCAL</xNome><enderEmit><xLgr>RUA TESTE</xLgr><nro>1</nro><xBairro>TESTE</xBairro><cMun>2304400</cMun><xMun>FORTALEZA</xMun><UF>CE</UF><CEP>60000000</CEP><cPais>1058</cPais><xPais>BRASIL</xPais></enderEmit><IE>123456789</IE><CRT>1</CRT></emit><dest><CPF>12345678909</CPF><xNome>NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL</xNome><enderDest><xLgr>RUA TESTE</xLgr><nro>2</nro><xBairro>TESTE</xBairro><cMun>2304400</cMun><xMun>FORTALEZA</xMun><UF>CE</UF><CEP>60000000</CEP><cPais>1058</cPais><xPais>BRASIL</xPais></enderDest><indIEDest>9</indIEDest></dest><det nItem=\\\"1\\\"><prod><cProd>TESTE</cProd><cEAN>SEM GTIN</cEAN><xProd>Caf\u00E9 S\u00E3o Jos\u00E9 PRODUTO SINT\u00C9TICO OFFLINE</xProd><NCM>22021000</NCM><CFOP>5102</CFOP><uCom>UN</uCom><qCom>1.0000</qCom><vUnCom>10.0000000000</vUnCom><vProd>10.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UN</uTrib><qTrib>1.0000</qTrib><vUnTrib>10.0000000000</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISNT><CST>07</CST></PISNT></PIS><COFINS><COFINSNT><CST>07</CST></COFINSNT></COFINS></imposto></det><total><ICMSTot><vBC>0.00</vBC><vICMS>0.00</vICMS><vICMSDeson>0.00</vICMSDeson><vFCP>0.00</vFCP><vBCST>0.00</vBCST><vST>0.00</vST><vFCPST>0.00</vFCPST><vFCPSTRet>0.00</vFCPSTRet><vProd>10.00</vProd><vFrete>0.00</vFrete><vSeg>0.00</vSeg><vDesc>0.00</vDesc><vII>0.00</vII><vIPI>0.00</vIPI><vIPIDevol>0.00</vIPIDevol><vPIS>0.00</vPIS><vCOFINS>0.00</vCOFINS><vOutro>0.00</vOutro><vNF>10.00</vNF></ICMSTot></total><transp><modFrete>9</modFrete></transp><pag><detPag><indPag>0</indPag><tPag>01</tPag><vPag>10.00</vPag></detPag></pag></infNFe><Signature xmlns=\\\"http://www.w3.org/2000/09/xmldsig#\\\"><SignedInfo><CanonicalizationMethod Algorithm=\\\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\\\"></CanonicalizationMethod><SignatureMethod Algorithm=\\\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\\\"></SignatureMethod><Reference URI=\\\"#NFe23261011222333000181550010000000011123456780\\\"><Transforms><Transform Algorithm=\\\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\\\"></Transform><Transform Algorithm=\\\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\\\"></Transform></Transforms><DigestMethod Algorithm=\\\"http://www.w3.org/2000/09/xmldsig#sha1\\\"></DigestMethod><DigestValue>Ya5kXhcEibOVfcyOI0BzqcYzyMM=</DigestValue></Reference></SignedInfo><SignatureValue>mirdDvdV+VId/zsstW/6lVFsSVxdyWkdkY1NPd2ynLHpjtolFoIhaBGlfxxs7IhU/AzcNQmR6ivr9YkH1HXaMAypvvx9M6GR/T4du/Zqab4gx3YInVybjJTeQ7BKEDnLhde2TUKoXrxmfrrmBUw6K4nTNufVjUjFJBfGcwhJ57T72x7ssdoYuPvZCphb0IR8WxHRKhvKAQhjW61qfh33csTabelgVZSLuTC2I2k9+a+ARd88CLTlfhYNCAPItOdUnAjgrhAhtiDi2FjXKjywgRqx0zay8DxF9Y2iyTJd3IAoWOERGdI9whgsuzWiZUr2I0I5QGGBELVabfjXm/Bneg==</SignatureValue><KeyInfo><X509Data><X509Certificate>MIIDhjCCAm6gAwIBAgIBATANBgkqhkiG9w0BAQsFADBbMSswKQYDVQQDEyJBQ0JSIE5PREUgU1lOVEhFVElDOjExMjIyMzMzMDAwMTgxMQswCQYDVQQGEwJCUjEfMB0GA1UEChMWU1lOVEhFVElDIE9GRkxJTkUgVEVTVDAeFw0yNjEwMDYyMjIzMzNaFw0yNzEwMDgyMjIzMzNaMFsxKzApBgNVBAMTIkFDQlIgTk9ERSBTWU5USEVUSUM6MTEyMjIzMzMwMDAxODExCzAJBgNVBAYTAkJSMR8wHQYDVQQKExZTWU5USEVUSUMgT0ZGTElORSBURVNUMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsOwRzuW4de7jrv1IkcNgT311292NR5NNIHt6Fncarm2iJX6mYsIjPWriFQmrU88p7bfRI3EsXJrlK0oGCuMafbNf1nBZ6Tu8aV1ixbAIgu9ZIbWoDqDNbYJBucQRuKsI1ytFbY7eI0juhcdAlBHw3TNdgSbuv/8kEGgTTJ803wBcC+emGZHdpb4Bwx6Db0Fio0lWLlBaep9+MFNZZiEYmDA3dwgZF14MAr5MpzcNDUVYh/g95Ks8x+mhErOPdtmL1A6cDg+xtjiApeMJZqjMrdsXP4yQ34h5VRy03ZUJkXVAquOfWhXpQL/qjoSzXfHvij2wB0pVn89FzVZh7GzStQIDAQABo1UwUzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DATBgNVHSUEDDAKBggrBgEFBQcDAjAkBgNVHREEHTAboBkGBWBMAQMDoBAMDjExMjIyMzMzMDAwMTgxMA0GCSqGSIb3DQEBCwUAA4IBAQBDhbpxphiuAUlQWXkcVt22Nc+g2UM6GCZyC3v9o21llLSCyK/nhkrRCQzM75/86kbnYZ1zdulC9N4XQFgATwm16Sf/nDZw8s5EsXqZ8mwbauDs/aQvWrbQnyawB7c+aXvlUDkcfNq+3hLQ5ep8/bmGh4eueiNoPD0fjf/jUVmrS6KyHb6/FyIZGP6fEYAO6XrqJPMSPxpJHnbPXZXKW2vcCh3qaG1vTSeN8PLfN2Q/mp1XUH8VqHgl3jzssx/zwb1NKuKEz9WL+6ilLc1ZfIqUakJyQNMqMz2KIjqGKGp7TtpNHZ7mz+kBX4Xw7D5fFVrXYb7DN6KylyKLmXoEzs1B</X509Certificate></X509Data></KeyInfo></Signature></NFe>\";\n", "import type { AcbrConfig } from './config.js';\nimport { runtimeDirectory, type BuiltRuntimeManifest } from './native-build.js';\nimport { criarEmissor, type ResultadoFiscal } from './runtime.js';\nimport { OFFLINE_DOCUMENT, OFFLINE_SIGNED_XML } from './offline-fixture.js';\nexport interface OfflineCheck { name: string; estado: string; codigo?: string; envioIniciado: false; }\n/** Local synthetic probes only: no certificate credentials, connection or fiscal transmission. */\nexport async function checkOffline(config: AcbrConfig, manifest: BuiltRuntimeManifest): Promise<OfflineCheck[]> {\n const emitter = criarEmissor({ cnpj: '11222333000181', uf: 'CE', modelo: 55, ambiente: 2,\n contrato: { sourceRevision: manifest.sourceRevision, contractHash: manifest.contractHash },\n runtimeDirectory: runtimeDirectory(config), timeoutMs: 30_000 });\n const report: OfflineCheck[] = [];\n function expect(name: string, result: ResultadoFiscal, estado: string, codigo?: string): void {\n if (result.estado !== estado || result.sucesso !== (estado !== 'ERRO') || result.envioIniciado !== false ||\n result.sourceRevision !== manifest.sourceRevision || (codigo !== undefined && result.codigo !== codigo)) {\n throw new Error(`Smoke offline ${name} falhou: ${result.estado}/${result.codigo ?? 'sem c\u00F3digo'}.`);\n }\n report.push({ name, estado: result.estado, codigo: result.codigo, envioIniciado: false });\n }\n try {\n const generated = await emitter.gerarXml(OFFLINE_DOCUMENT);\n expect('gerarXml sint\u00E9tico', generated, 'XML_GERADO');\n const xml = generated.xmlBase64 ? Buffer.from(generated.xmlBase64, 'base64').toString('utf8') : '';\n const generatedKey = /Id=\"NFe(\\d{44})\"/.exec(xml)?.[1];\n if (!generatedKey || !xml.includes('Caf\u00E9 S\u00E3o Jos\u00E9 TESTE OFFLINE') || !xml.includes('<CNPJ>11222333000181</CNPJ>')) throw new Error('Smoke offline gerarXml perdeu chave, identidade ou UTF-8.');\n const validated = await emitter.validar(OFFLINE_SIGNED_XML);\n expect('validar XML assinado p\u00FAblico', validated, 'VALIDADO');\n const signedKey = /Id=\"NFe(\\d{44})\"/.exec(OFFLINE_SIGNED_XML)?.[1];\n if (validated.chave !== signedKey || generatedKey !== signedKey) throw new Error('Smoke offline validar retornou outra chave fiscal.');\n expect('recusar XML malformado', await emitter.validar('<NFe><infNFe></NFe>'), 'ERRO', 'OPERACAO_FISCAL_FALHOU');\n expect('recusar DTD/entidade externa', await emitter.validar('<!DOCTYPE NFe [<!ENTITY probe SYSTEM \"file:///acbr-node-offline-check-does-not-exist\">]><NFe>&probe;</NFe>'), 'ERRO', 'XML_INVALIDO');\n return report;\n } finally { await emitter.fechar(); }\n}\n"],
|
|
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,MAAM;AAAA,yBAA0C,OAAO,UAAU,EAAE;AAAA,IAC/H,WAAW,YAAY,SAAS;AAC9B,YAAM,SAAS,MAAM,YAAY,MAAM;AACvC,aAAO,QAAQ,sBAAsB,iBAAiB,MAAM,CAAC;AAAA,kBAAkB,OAAO,cAAc,cAAc,OAAO,YAAY,GAAG;AAAA,IAC1I,OAAO;AACL,YAAM,SAAS,MAAM,WAAW,MAAM;AACtC,YAAM,gBAAgB,MAAM,aAAa,QAAQ,MAAM;AACvD,aAAO,EAAE,GAAG,QAAQ,cAAc,GAAG,sBAAsB,OAAO,KAAK,OAAO,KAAK,EAAE,MAAM;AAAA,EAAgD,cAAc,MAAM,yEAAgE;AAAA,IACjO;AACA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,OAAG,OAAO,MAAM,SAAU,MAAgB,OAAO;AAAA,CAAI;AACrD,WAAO;AAAA,EACT;AACF;AACA,IAAI,QAAQ,KAAK,CAAC,KAAKD,SAAQ,QAAQ,KAAK,CAAC,CAAC,MAAMF,eAAc,YAAY,GAAG,GAAG;AAClF,OAAK,EAAE,KAAK,UAAQ;AAAE,YAAQ,WAAW;AAAA,EAAM,CAAC;AAClD;",
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../src/config.ts", "../src/source.ts", "../src/native-build.ts", "../src/generator.ts", "../src/diagnostics.ts", "../src/types.ts", "../src/runtime.ts", "../src/offline-fixture.ts", "../src/offline-check.ts", "../src/cli.ts", "../src/contract-help.ts", "../generated/acbr/models.ts"],
|
|
4
|
+
"sourcesContent": ["import { readFile, writeFile, mkdir, readdir, access, copyFile } from 'node:fs/promises';\nimport { dirname, isAbsolute, resolve } from 'node:path';\n\nexport const OFFICIAL_ACBR_URL = 'https://svn.code.sf.net/p/acbr/code/trunk2';\nexport const SOURCE_PARTS = ['Fontes', 'Exemplos/ACBrDFe/Schemas/NFe', 'Doctos/LICENSE.TXT'] as const;\nexport interface AcbrConfigFile {\n formatVersion: 1;\n source: { url: string; revision: 'HEAD' | number; directory: string };\n generator: { outputDir: string };\n native: { project: string; outputDir: string; fpc: string; lazarusRoot?: string; libraryFiles?: string[]; providerFiles?: string[] };\n}\nexport interface AcbrConfig extends AcbrConfigFile {\n configPath: string;\n projectRoot: string;\n lockPath: string;\n}\nconst DEFAULT: AcbrConfigFile = {\n formatVersion: 1,\n source: { url: OFFICIAL_ACBR_URL, revision: 'HEAD', directory: '.acbr/source' },\n generator: { outputDir: '.' },\n native: { project: 'native/acbr-worker.lpr', outputDir: '.acbr/runtime', fpc: 'fpc' },\n};\nexport function defaultConfig(): AcbrConfigFile { return structuredClone(DEFAULT); }\nfunction record(value: unknown, name: string): Record<string, unknown> {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) throw new Error(`${name} deve ser um objeto.`);\n return value as Record<string, unknown>;\n}\nfunction keys(value: Record<string, unknown>, allowed: string[], name: string): void {\n const unexpected = Object.keys(value).filter(key => !allowed.includes(key));\n if (unexpected.length) throw new Error(`Campo desconhecido em ${name}: ${unexpected.join(', ')}.`);\n}\nfunction string(value: unknown, name: string): string {\n if (typeof value !== 'string' || !value.trim() || value.includes('\\0')) throw new Error(`${name} deve ser um texto n\u00E3o vazio.`);\n return value;\n}\nexport function parseConfig(input: unknown, configPath: string): AcbrConfig {\n const root = record(input, 'configura\u00E7\u00E3o');\n keys(root, ['formatVersion', 'source', 'generator', 'native'], 'configura\u00E7\u00E3o');\n if (root.formatVersion !== 1) throw new Error('formatVersion deve ser 1.');\n const source = record(root.source, 'source'); keys(source, ['url', 'revision', 'directory'], 'source');\n const generator = record(root.generator, 'generator'); keys(generator, ['outputDir'], 'generator');\n const native = record(root.native, 'native'); keys(native, ['project', 'outputDir', 'fpc', 'lazarusRoot', 'libraryFiles', 'providerFiles'], 'native');\n const url = string(source.url, 'source.url').replace(/\\/+$/, '');\n if (url !== OFFICIAL_ACBR_URL) throw new Error(`source.url deve apontar ao reposit\u00F3rio oficial ${OFFICIAL_ACBR_URL}.`);\n const revision = source.revision;\n if (revision !== 'HEAD' && (!Number.isSafeInteger(revision) || Number(revision) < 1)) throw new Error('source.revision deve ser HEAD ou uma revis\u00E3o SVN positiva.');\n const absoluteConfig = resolve(configPath);\n const projectRoot = dirname(absoluteConfig);\n const localPath = (value: unknown, label: string) => resolve(projectRoot, string(value, label));\n const fpcInput = string(native.fpc, 'native.fpc');\n const fpc = isAbsolute(fpcInput) || /[\\\\/]/.test(fpcInput) ? resolve(projectRoot, fpcInput) : fpcInput;\n let libraryFiles: string[] | undefined;\n if (native.libraryFiles !== undefined) {\n if (!Array.isArray(native.libraryFiles)) throw new Error('native.libraryFiles deve ser uma lista de caminhos.');\n libraryFiles = native.libraryFiles.map((item, i) => localPath(item, `native.libraryFiles[${i}]`));\n }\n let providerFiles: string[] | undefined;\n if (native.providerFiles !== undefined) {\n if (!Array.isArray(native.providerFiles)) throw new Error('native.providerFiles deve ser uma lista de caminhos.');\n providerFiles = native.providerFiles.map((item, i) => localPath(item, `native.providerFiles[${i}]`));\n }\n return {\n formatVersion: 1, configPath: absoluteConfig, projectRoot, lockPath: resolve(projectRoot, 'acbr.lock.json'),\n source: { url, revision: revision as 'HEAD' | number, directory: localPath(source.directory, 'source.directory') },\n generator: { outputDir: localPath(generator.outputDir, 'generator.outputDir') },\n native: { project: localPath(native.project, 'native.project'), outputDir: localPath(native.outputDir, 'native.outputDir'), fpc,\n ...(native.lazarusRoot !== undefined ? { lazarusRoot: localPath(native.lazarusRoot, 'native.lazarusRoot') } : {}),\n ...(libraryFiles !== undefined ? { libraryFiles } : {}),\n ...(providerFiles !== undefined ? { providerFiles } : {}),\n },\n };\n}\nexport async function loadConfig(path = 'acbr.config.json'): Promise<AcbrConfig> {\n const configPath = resolve(path);\n let contents: string;\n try { contents = await readFile(configPath, 'utf8'); }\n catch (error) { throw new Error(`N\u00E3o foi poss\u00EDvel ler ${configPath}. Execute acbr-node init.`, { cause: error }); }\n let value: unknown;\n try { value = JSON.parse(contents); } catch (error) { throw new Error(`JSON inv\u00E1lido em ${configPath}.`, { cause: error }); }\n return parseConfig(value, configPath);\n}\nexport async function initializeConfig(path = 'acbr.config.json', revision: 'HEAD' | number = 'HEAD', assetRoot?: string): Promise<AcbrConfig> {\n const configPath = resolve(path);\n const config = defaultConfig(); config.source.revision = revision;\n parseConfig(config, configPath);\n await mkdir(dirname(configPath), { recursive: true });\n try { await access(configPath); throw Object.assign(new Error(`EEXIST: configura\u00E7\u00E3o j\u00E1 existe: ${configPath}`), { code: 'EEXIST' }); }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n const resolved = parseConfig(config, configPath);\n if (assetRoot) await copyInitAssets(assetRoot, resolved.projectRoot);\n await writeFile(configPath, `${JSON.stringify(config, null, 2)}\\n`, { flag: 'wx' });\n await mkdir(resolve(resolved.projectRoot, '.acbr/generated'), { recursive: true });\n await mkdir(resolve(resolved.projectRoot, 'generated/acbr'), { recursive: true });\n return resolved;\n}\n\nasync function copyInitAssets(assetRoot: string, targetRoot: string): Promise<void> {\n const entries: { source: string; destination: string; content: Buffer }[] = [];\n async function scan(current: string, target: string): Promise<void> {\n for (const entry of await readdir(current, { withFileTypes: true })) {\n if (entry.name === 'generated' || entry.name.startsWith('.')) continue;\n const source = resolve(current, entry.name); const destination = resolve(target, entry.name);\n if (entry.isDirectory()) await scan(source, destination);\n else if (entry.isFile() && /\\.(pas|lpr|inc|lpi)$/i.test(entry.name)) entries.push({ source, destination, content: await readFile(source) });\n }\n }\n await scan(resolve(assetRoot, 'native'), resolve(targetRoot, 'native'));\n if (!entries.some(entry => entry.source.endsWith('acbr-worker.lpr'))) throw new Error('Assets do pacote n\u00E3o cont\u00EAm native/acbr-worker.lpr.');\n entries.push({ source: resolve(assetRoot, 'tools/extract-model.lpr'), destination: resolve(targetRoot, 'tools/extract-model.lpr'), content: await readFile(resolve(assetRoot, 'tools/extract-model.lpr')) });\n for (const entry of entries) {\n try {\n const existing = await readFile(entry.destination);\n if (!existing.equals(entry.content)) throw new Error(`init preservou arquivo existente divergente: ${entry.destination}.`);\n } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n }\n for (const entry of entries) {\n await mkdir(dirname(entry.destination), { recursive: true });\n try { await writeFile(entry.destination, entry.content, { flag: 'wx' }); }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== 'EEXIST') throw error; }\n }\n}\n", "import { spawn } from 'node:child_process';\nimport { createHash, randomUUID } from 'node:crypto';\nimport { createReadStream } from 'node:fs';\nimport { access, mkdir, readdir, readFile, rename, rm, stat, writeFile } from 'node:fs/promises';\nimport { dirname, join, relative, resolve, sep } from 'node:path';\nimport { SOURCE_PARTS, type AcbrConfig } from './config.js';\n\nexport interface SourceSnapshot { treeHash: string; files: Record<string, string>; }\nexport interface SourceLock {\n formatVersion: 1;\n source: { url: string; revision: number; parts: string[]; treeHash: string; files: Record<string, string> };\n}\nexport interface CommandResult { stdout: string; stderr: string; }\nexport async function runCommand(command: string, args: string[], options: { cwd?: string; env?: NodeJS.ProcessEnv; maxOutputBytes?: number } = {}): Promise<CommandResult> {\n return new Promise((done, fail) => {\n const child = spawn(command, args, { cwd: options.cwd, env: options.env ?? process.env, stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true, shell: false });\n let stdout = ''; let stderr = ''; let overflow = false;\n const maximum = options.maxOutputBytes ?? 16 * 1024 * 1024;\n const append = (kind: 'stdout' | 'stderr', data: Buffer) => {\n if (overflow) return;\n if (kind === 'stdout') stdout += data.toString('utf8'); else stderr += data.toString('utf8');\n if (Buffer.byteLength(stdout) + Buffer.byteLength(stderr) > maximum) { overflow = true; child.kill(); }\n };\n child.stdout.on('data', data => append('stdout', data)); child.stderr.on('data', data => append('stderr', data));\n child.on('error', error => fail(new Error(`N\u00E3o foi poss\u00EDvel executar ${command}: ${error.message}`, { cause: error })));\n child.on('close', code => {\n if (overflow) fail(new Error(`Sa\u00EDda de ${command} excedeu o limite de ${maximum} bytes.`));\n else if (code !== 0) {\n const diagnostic = (stderr || stdout).split('\\n').slice(-80).join('\\n').slice(-16000);\n fail(Object.assign(new Error(`${command} terminou com c\u00F3digo ${code}:\\n${diagnostic}`), { stdout, stderr }));\n }\n else done({ stdout, stderr });\n });\n });\n}\nexport async function fileHash(path: string): Promise<string> {\n const hash = createHash('sha256');\n for await (const chunk of createReadStream(path)) hash.update(chunk);\n return hash.digest('hex');\n}\nexport async function snapshotSource(directory: string): Promise<SourceSnapshot> {\n const files: Record<string, string> = Object.create(null);\n async function scan(current: string): Promise<void> {\n const entries = (await readdir(current, { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name, 'en'));\n for (const entry of entries) {\n if (entry.name === '.svn') continue;\n const path = join(current, entry.name);\n if (entry.isSymbolicLink()) throw new Error(`Fonte ACBr cont\u00E9m link simb\u00F3lico: ${path}.`);\n if (entry.isDirectory()) await scan(path);\n else if (entry.isFile()) files[relative(directory, path).split(sep).join('/')] = await fileHash(path);\n else throw new Error(`Fonte ACBr cont\u00E9m arquivo especial: ${path}.`);\n }\n }\n await scan(resolve(directory));\n const sortedFiles = Object.fromEntries(Object.entries(files).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));\n const treeHash = createHash('sha256').update(JSON.stringify(sortedFiles)).digest('hex');\n return { treeHash, files: sortedFiles };\n}\nfunction validateLock(value: unknown): SourceLock {\n if (!value || typeof value !== 'object') throw new Error('Lock ACBr inv\u00E1lido.');\n const lock = value as SourceLock;\n if (lock.formatVersion !== 1 || !lock.source || !Number.isSafeInteger(lock.source.revision) || lock.source.revision < 1 ||\n !Array.isArray(lock.source.parts) || !lock.source.files || typeof lock.source.files !== 'object' || Array.isArray(lock.source.files) ||\n !/^[a-f0-9]{64}$/.test(lock.source.treeHash)) throw new Error('Formato inv\u00E1lido em acbr.lock.json.');\n for (const [path, hash] of Object.entries(lock.source.files)) {\n if (path.startsWith('/') || path.includes('\\\\') || path.split('/').includes('..') || !/^[a-f0-9]{64}$/.test(hash)) throw new Error('Caminho ou hash inv\u00E1lido no lock ACBr.');\n }\n if (lock.source.parts.join('\\n') !== SOURCE_PARTS.join('\\n')) throw new Error('Partes ACBr divergentes no lock.');\n return lock;\n}\nexport async function readSourceLock(config: AcbrConfig): Promise<SourceLock> {\n let lock: SourceLock;\n try { lock = validateLock(JSON.parse(await readFile(config.lockPath, 'utf8'))); }\n catch (error) { throw new Error(`N\u00E3o foi poss\u00EDvel ler ${config.lockPath}. Execute acbr-node source update.`, { cause: error }); }\n if (lock.source.url !== config.source.url) throw new Error('URL ACBr do lock diverge da configura\u00E7\u00E3o.');\n if (config.source.revision !== 'HEAD' && lock.source.revision !== config.source.revision) throw new Error('Revis\u00E3o ACBr do lock diverge da configura\u00E7\u00E3o. Execute source update explicitamente.');\n return lock;\n}\nexport async function verifySource(config: AcbrConfig): Promise<SourceLock> {\n try {\n await access(`${config.lockPath}.operation`);\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return verifySourceContents(config);\n throw error;\n }\n throw new Error('Atualiza\u00E7\u00E3o de fontes ACBr em andamento. Aguarde o CLI concluir.');\n}\nasync function verifySourceContents(config: AcbrConfig): Promise<SourceLock> {\n const lock = await readSourceLock(config);\n const snapshot = await snapshotSource(config.source.directory);\n if (snapshot.treeHash !== lock.source.treeHash) {\n const names = new Set([...Object.keys(snapshot.files), ...Object.keys(lock.source.files)]);\n const changed = [...names].filter(path => snapshot.files[path] !== lock.source.files[path]);\n throw new Error(`Fontes ACBr divergem do lock (${changed.length} arquivo(s)): ${changed.slice(0, 10).join(', ')}. Preserve as altera\u00E7\u00F5es antes de atualizar.`);\n }\n return lock;\n}\nasync function writeLock(config: AcbrConfig, snapshot: SourceSnapshot, revision: number): Promise<SourceLock> {\n const lock: SourceLock = { formatVersion: 1, source: { url: config.source.url, revision, parts: [...SOURCE_PARTS], ...snapshot } };\n await mkdir(dirname(config.lockPath), { recursive: true });\n const temporary = `${config.lockPath}.${randomUUID()}.tmp`;\n await writeFile(temporary, `${JSON.stringify(lock, null, 2)}\\n`, { flag: 'wx' });\n try { await rename(temporary, config.lockPath); } finally { await rm(temporary, { force: true }); }\n return lock;\n}\nexport async function lockExistingSource(config: AcbrConfig, revision: number): Promise<SourceLock> {\n return withSourceOperation(config, () => performLockExistingSource(config, revision));\n}\nasync function performLockExistingSource(config: AcbrConfig, revision: number): Promise<SourceLock> {\n if (!Number.isSafeInteger(revision) || revision < 1) throw new Error('Uma revis\u00E3o SVN positiva \u00E9 obrigat\u00F3ria para registrar fontes existentes.');\n try { await access(config.lockPath); } catch { return writeLock(config, await snapshotSource(config.source.directory), revision); }\n throw new Error('O lock j\u00E1 existe. Use source update para atualizar fontes e lock em conjunto.');\n}\nexport async function resolveSourceRevision(url: string, revision: 'HEAD' | number, runner: typeof runCommand = runCommand): Promise<number> {\n const { stdout } = await runner('svn', ['info', '--non-interactive', '--show-item', 'revision', '-r', String(revision), url]);\n const resolved = Number(stdout.trim());\n if (!Number.isSafeInteger(resolved) || resolved < 1) throw new Error('SVN n\u00E3o retornou uma revis\u00E3o v\u00E1lida.');\n return resolved;\n}\nasync function withSourceOperation<T>(config: AcbrConfig, operation: () => Promise<T>): Promise<T> {\n const marker = `${config.lockPath}.operation`;\n try { await writeFile(marker, `${JSON.stringify({ pid: process.pid, startedAt: new Date().toISOString() })}\\n`, { flag: 'wx' }); }\n catch (error) { throw new Error('Outra opera\u00E7\u00E3o de fontes ACBr est\u00E1 em andamento. Se o processo anterior terminou abruptamente, confira o PID do arquivo acbr.lock.json.operation antes de remov\u00EA-lo.', { cause: error }); }\n try { return await operation(); } finally { await rm(marker, { force: true }); }\n}\nexport async function updateSource(config: AcbrConfig, revision: 'HEAD' | number = 'HEAD', runner: typeof runCommand = runCommand): Promise<SourceLock> {\n return withSourceOperation(config, () => performUpdateSource(config, revision, runner));\n}\nasync function performUpdateSource(config: AcbrConfig, revision: 'HEAD' | number, runner: typeof runCommand): Promise<SourceLock> {\n const source = resolve(config.source.directory);\n if (source === config.projectRoot || source === dirname(source)) throw new Error('O diret\u00F3rio das fontes deve ser exclusivo e n\u00E3o pode ser a raiz do projeto ou do sistema.');\n let exists = false;\n try { const details = await stat(source); exists = true; if (!details.isDirectory()) throw new Error('O caminho das fontes n\u00E3o \u00E9 um diret\u00F3rio.'); } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n if (exists && (await readdir(source)).length) await verifySourceContents({ ...config, source: { ...config.source, revision: 'HEAD' } });\n const resolvedRevision = await resolveSourceRevision(config.source.url, revision, runner);\n const stage = join(dirname(source), `.acbr-source-stage-${randomUUID()}`);\n const backup = join(dirname(source), `.acbr-source-backup-${randomUUID()}`);\n await mkdir(stage, { recursive: true });\n let previousLock: string | undefined;\n try { previousLock = await readFile(config.lockPath, 'utf8'); } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\n let backedUp = false; let replaced = false; let lockWritten = false;\n try {\n for (const part of SOURCE_PARTS) {\n const destination = join(stage, ...part.split('/'));\n await mkdir(dirname(destination), { recursive: true });\n await runner('svn', ['export', '--non-interactive', '-q', '-r', String(resolvedRevision), `${config.source.url}/${part}`, destination], { maxOutputBytes: 4 * 1024 * 1024 });\n }\n const snapshot = await snapshotSource(stage);\n if (exists) { await rename(source, backup); backedUp = true; }\n await rename(stage, source); replaced = true;\n const lock = await writeLock(config, snapshot, resolvedRevision); lockWritten = true;\n await persistRevision(config, resolvedRevision);\n config.source.revision = resolvedRevision;\n if (backedUp) await rm(backup, { recursive: true, force: true }).catch(() => undefined);\n return lock;\n } catch (error) {\n if (lockWritten) {\n if (previousLock === undefined) await rm(config.lockPath, { force: true });\n else await writeFile(config.lockPath, previousLock);\n }\n if (replaced) await rm(source, { recursive: true, force: true });\n if (backedUp) await rename(backup, source);\n throw error;\n } finally { await rm(stage, { recursive: true, force: true }); }\n}\n\nasync function persistRevision(config: AcbrConfig, revision: number): Promise<void> {\n const original = JSON.parse(await readFile(config.configPath, 'utf8')) as { source: { revision: number } };\n original.source.revision = revision;\n const temporary = `${config.configPath}.${randomUUID()}.tmp`;\n await writeFile(temporary, `${JSON.stringify(original, null, 2)}\\n`, { flag: 'wx' });\n try { await rename(temporary, config.configPath); } finally { await rm(temporary, { force: true }); }\n}\n", "import { copyFile, mkdir, readdir, readFile, rename, rm, stat, chmod, realpath, access, writeFile } from 'node:fs/promises';\nimport { basename, dirname, join, relative, resolve, sep } from 'node:path';\nimport { randomUUID } from 'node:crypto';\nimport { fileURLToPath } from 'node:url';\nimport type { AcbrConfig } from './config.js';\nimport { fileHash, runCommand, snapshotSource, verifySource } from './source.js';\n\nexport interface BuiltRuntimeManifest {\n formatVersion: 1; sourceRevision: number; contractHash: string; platform: string; arch: string;\n executable: string; files: Record<string, string>;\n systemDependencies?: string[]; testOnly?: boolean; generatedFileHashes: Record<string, string>;\n}\ninterface GeneratedManifest { sourceRevision: number; sourceHash: string; contractHash: string; fileHashes: Record<string, string>; }\nexport function runtimeDirectory(config: AcbrConfig): string { return join(config.native.outputDir, `${process.platform}-${process.arch}`); }\nasync function exists(path: string): Promise<boolean> { try { await access(path); return true; } catch { return false; } }\nexport async function findLazarus(config: AcbrConfig): Promise<string> {\n const candidates = config.native.lazarusRoot ? [config.native.lazarusRoot] :\n [process.env.LAZARUS_ROOT, '/usr/lib/lazarus/default', '/usr/lib/lazarus/3.0', 'C:\\\\lazarus'].filter((path): path is string => Boolean(path));\n for (const candidate of candidates) if (await exists(join(candidate, 'components/lazutils'))) return realpath(candidate);\n throw new Error('Lazarus n\u00E3o encontrado. Defina native.lazarusRoot em acbr.config.json ou LAZARUS_ROOT.');\n}\nasync function generatedManifest(config: AcbrConfig): Promise<GeneratedManifest> {\n const path = join(config.generator.outputDir, '.acbr/generated/manifest.json');\n let value: GeneratedManifest;\n try { value = JSON.parse(await readFile(path, 'utf8')) as GeneratedManifest; }\n catch (error) { throw new Error('Contrato gerado ausente ou inv\u00E1lido. Execute acbr-node generate.', { cause: error }); }\n if (!Number.isSafeInteger(value.sourceRevision) || !/^[a-f0-9]{64}$/.test(value.contractHash) || !/^[a-f0-9]{64}$/.test(value.sourceHash)) throw new Error('Manifesto gerado inv\u00E1lido. Execute generate.');\n if (!value.fileHashes || typeof value.fileHashes !== 'object' || Array.isArray(value.fileHashes) || Object.keys(value.fileHashes).length !== 3 || ['generated/acbr/models.ts', 'generated/acbr/index.ts', 'native/generated/AcbrModels.pas'].some(name => !Object.hasOwn(value.fileHashes, name))) throw new Error('Manifesto gerado n\u00E3o cont\u00E9m os hashes dos tr\u00EAs arquivos. Execute generate.');\n for (const [name, expected] of Object.entries(value.fileHashes)) {\n const file = resolve(config.generator.outputDir, name);\n const location = relative(config.generator.outputDir, file);\n if (!name || name.startsWith('/') || name.includes('\\\\') || location === '..' || location.startsWith(`..${sep}`) || !/^[a-f0-9]{64}$/.test(expected)) throw new Error('Caminho ou SHA256 inv\u00E1lido no manifesto gerado.');\n if (await fileHash(file) !== expected) throw new Error(`Arquivo gerado diverge do manifesto: ${name}. Execute generate para restaurar o contrato.`);\n }\n return value;\n}\nasync function subdirectories(path: string): Promise<string[]> {\n const result = [path];\n for (const entry of (await readdir(path, { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name))) {\n if (entry.isDirectory()) result.push(...await subdirectories(join(path, entry.name)));\n }\n return result;\n}\nconst REQUIRED_DYNAMIC = ['libssl.so.3', 'libcrypto.so.3', 'libxml2.so.2'];\nconst CORE_SYSTEM = /^(?:lib(?:c|m|pthread|dl|rt|resolv|anl|util)\\.so(?:\\.|$)|ld-linux|linux-vdso)/;\nasync function copyLinuxLibraries(stage: string): Promise<string[]> {\n const { stdout } = await runCommand('ldconfig', ['-p']);\n const libraries = new Map<string, string>();\n for (const name of REQUIRED_DYNAMIC) {\n const line = stdout.split('\\n').find(value => value.trim().startsWith(`${name} `) && value.includes('x86-64'));\n const path = line?.split('=>')[1]?.trim();\n if (!path) throw new Error(`Depend\u00EAncia din\u00E2mica ausente: ${name}. Instale OpenSSL 3 e libxml2 compat\u00EDveis.`);\n libraries.set(name, await realpath(path));\n }\n const modules = '/usr/lib/x86_64-linux-gnu/ossl-modules';\n if (!(await exists(join(modules, 'legacy.so')))) throw new Error('Provider legacy OpenSSL 3 ausente. Instale o pacote libssl3/libssl3t64 completo.');\n libraries.set('ossl-modules/legacy.so', await realpath(join(modules, 'legacy.so')));\n const systemDependencies = new Set<string>();\n const inspected = new Set<string>();\n while (inspected.size < libraries.size) {\n const [name, path] = [...libraries].find(([name]) => !inspected.has(name))!;\n inspected.add(name);\n const dependencies = await runCommand('ldd', [path]);\n for (const line of dependencies.stdout.split('\\n')) {\n if (line.includes('not found')) throw new Error(`Depend\u00EAncia transitiva ausente: ${line.trim()}.`);\n const match = /^\\s*(\\S+)\\s+=>\\s+(\\S+)/.exec(line);\n if (match) {\n const dependency = match[1]!; const file = match[2]!;\n if (CORE_SYSTEM.test(dependency)) systemDependencies.add(dependency);\n else if (!libraries.has(dependency)) libraries.set(dependency, await realpath(file));\n } else {\n const direct = /^\\s*(\\/\\S+)/.exec(line)?.[1];\n if (direct) systemDependencies.add(basename(direct));\n }\n }\n }\n const licenseDir = join(stage, 'licenses'); await mkdir(licenseDir, { recursive: true });\n const provenance: Record<string, unknown> = {};\n for (const [name, path] of libraries) {\n const destination = name.startsWith('ossl-modules/') ? join(stage, name) : join(stage, 'lib', name);\n await mkdir(dirname(destination), { recursive: true }); await copyFile(path, destination);\n const aliases = name === 'libssl.so.3' ? ['libssl.so'] : name === 'libcrypto.so.3' ? ['libcrypto.so'] : name === 'libxml2.so.2' ? ['libxml2.so'] : [];\n for (const alias of aliases) await copyFile(path, join(stage, 'lib', alias));\n let owner: string;\n try { owner = (await runCommand('dpkg-query', ['-S', path])).stdout.split('\\n')[0]!.split(': ')[0]!; }\n catch (error) { throw new Error(`N\u00E3o foi poss\u00EDvel identificar pacote/licen\u00E7a de ${path}. Build requer Debian/Ubuntu com depend\u00EAncias registradas pelo dpkg.`, { cause: error }); }\n const pkg = owner.split(':')[0]!;\n const copyright = `/usr/share/doc/${pkg}/copyright`;\n if (!(await exists(copyright))) throw new Error(`Licen\u00E7a da depend\u00EAncia ${name} n\u00E3o encontrada: ${copyright}.`);\n await copyFile(copyright, join(licenseDir, `${name.replaceAll('/', '-')}.txt`));\n const source = (await runCommand('dpkg-query', ['-W', '-f=${source:Package}|${source:Version}|${Version}', owner])).stdout.trim().split('|');\n provenance[name] = { binaryPackage: owner, binaryVersion: source[2], sourcePackage: source[0], sourceVersion: source[1],\n sourceUrl: `https://launchpad.net/ubuntu/+source/${encodeURIComponent(source[0]!)}/${encodeURIComponent(source[1]!)}`,\n copyright: `licenses/${name.replaceAll('/', '-')}.txt` };\n }\n await mkdir(join(stage, 'sources'), { recursive: true });\n await writeFile(join(stage, 'sources/native-dependencies.json'), `${JSON.stringify(provenance, null, 2)}\\n`);\n await writeFile(join(stage, 'openssl.cnf'), 'openssl_conf = openssl_init\\n[openssl_init]\\nproviders = provider_sect\\n[provider_sect]\\ndefault = default_sect\\nlegacy = legacy_sect\\n[default_sect]\\nactivate = 1\\n[legacy_sect]\\nactivate = 1\\n');\n return [...systemDependencies].sort();\n}\nasync function copyExplicitLibraries(config: AcbrConfig, stage: string): Promise<void> {\n if (!config.native.libraryFiles?.length) throw new Error('Windows exige native.libraryFiles com DLLs OpenSSL 3/libxml2 e arquivos .LICENSE adjacentes.');\n await mkdir(join(stage, 'lib'), { recursive: true }); await mkdir(join(stage, 'licenses'), { recursive: true });\n const sources: Record<string, unknown> = {};\n const dependencyDirectories = new Set([...(config.native.libraryFiles ?? []), ...(config.native.providerFiles ?? [])].map(dirname));\n for (const directory of dependencyDirectories) {\n for (const entry of await readdir(directory)) {\n if (entry.endsWith('.LICENSE')) await copyFile(join(directory, entry), join(stage, 'licenses', entry));\n else if (entry === 'SOURCE.json') {\n await mkdir(join(stage, 'sources'), { recursive: true });\n await copyFile(join(directory, entry), join(stage, 'sources', `${basename(directory)}-SOURCE.json`));\n }\n }\n }\n for (const [directory, files] of [['lib', config.native.libraryFiles], ['ossl-modules', config.native.providerFiles ?? []]] as const) {\n await mkdir(join(stage, directory), { recursive: true });\n for (const source of files) {\n await copyFile(source, join(stage, directory, basename(source)));\n await copyFile(`${source}.LICENSE`, join(stage, 'licenses', `${basename(source)}.txt`));\n if (await exists(`${source}.SOURCE.json`)) sources[`${directory}/${basename(source)}`] = JSON.parse(await readFile(`${source}.SOURCE.json`, 'utf8'));\n }\n }\n if (!config.native.providerFiles?.some(path => basename(path).toLowerCase() === 'legacy.dll')) throw new Error('Windows requer native.providerFiles com o provider legacy.dll de OpenSSL 3 e licen\u00E7a adjacente.');\n await mkdir(join(stage, 'sources'), { recursive: true });\n await writeFile(join(stage, 'sources/native-dependencies.json'), `${JSON.stringify(sources, null, 2)}\\n`);\n await writeFile(join(stage, 'openssl.cnf'), 'openssl_conf = openssl_init\\n[openssl_init]\\nproviders = provider_sect\\n[provider_sect]\\ndefault = default_sect\\nlegacy = legacy_sect\\n[default_sect]\\nactivate = 1\\n[legacy_sect]\\nactivate = 1\\n');\n}\nexport async function buildNative(config: AcbrConfig, options: { testOnly?: boolean } = {}): Promise<BuiltRuntimeManifest> {\n if (!['linux', 'win32'].includes(process.platform) || process.arch !== 'x64') throw new Error('Build inicial suporta Linux x64 e Windows x64.');\n const lock = await verifySource(config);\n const contract = await generatedManifest(config);\n if (contract.sourceRevision !== lock.source.revision || contract.sourceHash !== lock.source.treeHash) throw new Error('Contrato gerado n\u00E3o corresponde \u00E0s fontes travadas. Execute generate.');\n const lazarus = await findLazarus(config);\n const source = config.source.directory;\n const target = options.testOnly ? join(config.projectRoot, '.acbr/test-runtime', `${process.platform}-${process.arch}`) : runtimeDirectory(config);\n const stage = join(dirname(target), `.runtime-stage-${randomUUID()}`);\n const units = join(stage, '.units');\n await mkdir(units, { recursive: true });\n const executable = process.platform === 'win32' ? 'acbr-worker.exe' : 'acbr-worker';\n try {\n const cpu = (await runCommand(config.native.fpc, ['-iTP'])).stdout.trim();\n if (cpu !== 'x86_64') throw new Error(`FPC deve compilar x86_64, encontrado ${cpu}.`);\n const targetOs = process.platform === 'win32' ? 'win64' : 'linux';\n const fontPaths = await subdirectories(join(source, 'Fontes'));\n const lazPaths = [join(lazarus, 'components/lazutils/lib', `x86_64-${targetOs}`), join(lazarus, 'lcl/units', `x86_64-${targetOs}`), join(lazarus, 'lcl/units', `x86_64-${targetOs}`, 'nogui'), join(lazarus, 'packager/units', `x86_64-${targetOs}`)];\n const searchPaths = [dirname(config.native.project), join(config.generator.outputDir, 'native/generated'), ...fontPaths, ...lazPaths];\n const args = ['-vew', '-Mdelphi', '-Scghi', '-O2', '-g-', '-dNOGUI', '-dNOREPORT', ...(options.testOnly ? ['-dACBR_NODE_TEST'] : []), `-FU${units}`, `-FE${stage}`, `-o${executable}`,\n ...searchPaths.map(path => `-Fu${path}`), ...fontPaths.map(path => `-Fi${path}`), config.native.project];\n const responseFile = join(stage, '.compiler.rsp');\n if (args.some(arg => /[\\\"\\r\\n]/.test(arg))) throw new Error('Caminhos do build n\u00E3o podem conter aspas ou quebras de linha.');\n await writeFile(responseFile, args.slice(0, -1).join('\\n') + '\\n');\n const logPath = join(config.projectRoot, '.acbr/build.log');\n try {\n const compilation = await runCommand(config.native.fpc, [`@${responseFile}`, config.native.project], { cwd: config.projectRoot, maxOutputBytes: 32 * 1024 * 1024 });\n await writeFile(logPath, compilation.stdout + compilation.stderr);\n } catch (error) {\n const compilation = error as Error & { stdout?: string; stderr?: string };\n await writeFile(logPath, (compilation.stdout ?? '') + (compilation.stderr ?? compilation.message));\n throw new Error(`${compilation.message}\\nLog completo: ${logPath}`, { cause: compilation });\n }\n const systemDependencies = process.platform === 'linux' ? await copyLinuxLibraries(stage) : (await copyExplicitLibraries(config, stage), []);\n const schemas = join(source, 'Exemplos/ACBrDFe/Schemas/NFe');\n await copyTree(schemas, join(stage, 'schemas'));\n const services = join(source, 'Fontes/ACBrDFe/ACBrNFe/ACBrNFeServicos.ini');\n await copyFile(services, join(stage, 'ACBrNFeServicos.ini'));\n await mkdir(join(stage, 'licenses'), { recursive: true });\n await copyFile(join(source, 'Doctos/LICENSE.TXT'), join(stage, 'licenses/ACBr-LICENSE.TXT'));\n await mkdir(join(stage, 'sources/native'), { recursive: true });\n await copyNativeSources(dirname(config.native.project), join(stage, 'sources/native'));\n await copyFile(join(config.generator.outputDir, 'native/generated/AcbrModels.pas'), join(stage, 'sources/native/AcbrModels.pas'));\n for (const name of ['fp-compiler-3.2.2', 'fp-units-rtl-3.2.2', 'fpc']) {\n const license = `/usr/share/doc/${name}/copyright`;\n if (await exists(license)) { await copyFile(license, join(stage, 'licenses/FPC-copyright.txt')); break; }\n }\n await copyCompilerLicenses(config, stage, lazarus);\n const archive = join(stage, 'sources/acbr-source.tar.gz');\n const tarArgs = process.platform === 'linux' ? ['--sort=name', '--mtime=@0', '--owner=0', '--group=0', '--numeric-owner', '-I', 'gzip -n'] : [];\n await runCommand('tar', [...tarArgs, process.platform === 'linux' ? '-cf' : '-czf', archive, '-C', source, 'Fontes', 'Exemplos/ACBrDFe/Schemas/NFe', 'Doctos/LICENSE.TXT']);\n await writeFile(join(stage, 'sources/build.json'), `${JSON.stringify({ sourceRevision: lock.source.revision, sourceUrl: lock.source.url, sourceTreeHash: lock.source.treeHash,\n compiler: (await runCommand(config.native.fpc, ['-iV'])).stdout.trim(), lazarusRoot: lazarus, lazarusVersion: basename(lazarus),\n compilerSourceUrl: 'https://gitlab.com/freepascal.org/fpc/source/-/tree/release_3_2_2', testOnly: options.testOnly ?? false, platform: process.platform, arch: process.arch,\n flags: ['-Mdelphi', '-Scghi', '-O2', '-dNOGUI', '-dNOREPORT'], sourceParts: lock.source.parts }, null, 2)}\\n`);\n await rm(units, { recursive: true, force: true });\n await rm(responseFile, { force: true });\n if (process.platform !== 'win32') await chmod(join(stage, executable), 0o755);\n const currentGenerated = await generatedManifest(config);\n if (currentGenerated.contractHash !== contract.contractHash || currentGenerated.sourceHash !== contract.sourceHash ||\n Object.entries(contract.fileHashes).some(([name, hash]) => currentGenerated.fileHashes[name] !== hash)) throw new Error('Arquivos gerados mudaram durante a compila\u00E7\u00E3o. Execute build novamente.');\n const currentSource = await verifySource(config);\n if (currentSource.source.revision !== lock.source.revision || currentSource.source.treeHash !== lock.source.treeHash) throw new Error('Fontes ACBr foram atualizadas durante a compila\u00E7\u00E3o. Execute generate e build novamente.');\n const files = (await snapshotSource(stage)).files;\n const manifest: BuiltRuntimeManifest = { formatVersion: 1, sourceRevision: lock.source.revision, contractHash: contract.contractHash,\n platform: process.platform, arch: process.arch, executable, files, generatedFileHashes: contract.fileHashes, systemDependencies, ...(options.testOnly ? { testOnly: true } : {}) };\n await writeFile(join(stage, 'manifest.json'), `${JSON.stringify(manifest, null, 2)}\\n`);\n await replaceRuntime(stage, target);\n return manifest;\n } finally { await rm(stage, { recursive: true, force: true }); }\n}\nasync function copyNativeSources(source: string, target: string): Promise<void> {\n await mkdir(target, { recursive: true });\n for (const entry of await readdir(source, { withFileTypes: true })) {\n if (entry.isDirectory() && !entry.name.startsWith('.')) await copyNativeSources(join(source, entry.name), join(target, entry.name));\n else if (entry.isFile() && /\\.(pas|lpr|inc|lpi)$/i.test(entry.name)) await copyFile(join(source, entry.name), join(target, entry.name));\n }\n}\nasync function copyTree(source: string, target: string): Promise<void> {\n await mkdir(target, { recursive: true });\n for (const entry of await readdir(source, { withFileTypes: true })) {\n if (entry.isSymbolicLink()) throw new Error(`Arquivo de distribui\u00E7\u00E3o n\u00E3o pode ser link: ${entry.name}.`);\n if (entry.isDirectory()) await copyTree(join(source, entry.name), join(target, entry.name));\n else if (entry.isFile()) await copyFile(join(source, entry.name), join(target, entry.name));\n }\n}\nasync function replaceRuntime(stage: string, target: string): Promise<void> {\n const backup = `${target}.${randomUUID()}.backup`;\n const hadTarget = await exists(target);\n if (hadTarget) await rename(target, backup);\n try { await rename(stage, target); }\n catch (error) { if (hadTarget) await rename(backup, target); throw error; }\n if (hadTarget) await rm(backup, { recursive: true, force: true });\n}\nexport async function checkBuild(config: AcbrConfig): Promise<BuiltRuntimeManifest> {\n const lock = await verifySource(config);\n const generated = await generatedManifest(config);\n const directory = runtimeDirectory(config);\n const manifest = JSON.parse(await readFile(join(directory, 'manifest.json'), 'utf8')) as BuiltRuntimeManifest;\n if (manifest.formatVersion !== 1 || manifest.platform !== process.platform || manifest.arch !== process.arch ||\n manifest.sourceRevision !== lock.source.revision || generated.sourceHash !== lock.source.treeHash || manifest.contractHash !== generated.contractHash ||\n !manifest.generatedFileHashes || Object.entries(generated.fileHashes).some(([name, hash]) => manifest.generatedFileHashes[name] !== hash) ||\n typeof manifest.executable !== 'string' || !manifest.files || !Object.hasOwn(manifest.files, manifest.executable)) throw new Error('Runtime diverge das fontes ou contrato. Execute build.');\n for (const [path, expected] of Object.entries(manifest.files)) {\n if (path.startsWith('/') || path.includes('\\\\') || path.split('/').includes('..') || !/^[a-f0-9]{64}$/.test(expected)) throw new Error(`Caminho/hash inv\u00E1lido no runtime: ${path}.`);\n if (await fileHash(join(directory, path)) !== expected) throw new Error(`Hash inv\u00E1lido no runtime: ${path}.`);\n }\n return manifest;\n}\nexport interface DoctorItem { name: string; ok: boolean; detail: string; }\nexport async function doctor(config?: AcbrConfig): Promise<DoctorItem[]> {\n const items: DoctorItem[] = [{ name: 'Node.js', ok: (Number(process.versions.node.split('.')[0]) > 22 || (Number(process.versions.node.split('.')[0]) === 22 && Number(process.versions.node.split('.')[1]) >= 12)), detail: process.versions.node }];\n for (const [name, command, args] of [['SVN', 'svn', ['--version', '--quiet']], ['Free Pascal', config?.native.fpc ?? 'fpc', ['-iV']]] as const) {\n try { const result = await runCommand(command, [...args]); items.push({ name, ok: true, detail: result.stdout.trim() }); }\n catch (error) { items.push({ name, ok: false, detail: (error as Error).message }); }\n }\n if (config) {\n try { items.push({ name: 'Lazarus', ok: true, detail: await findLazarus(config) }); }\n catch (error) { items.push({ name: 'Lazarus', ok: false, detail: (error as Error).message }); }\n try { const lock = await verifySource(config); items.push({ name: 'Fontes ACBr', ok: true, detail: `revis\u00E3o ${lock.source.revision}, ${lock.source.treeHash}` }); }\n catch (error) { items.push({ name: 'Fontes ACBr', ok: false, detail: (error as Error).message }); }\n }\n if (process.platform === 'linux') {\n try { const result = await runCommand('ldconfig', ['-p']); const missing = REQUIRED_DYNAMIC.filter(name => !result.stdout.includes(name)); items.push({ name: 'OpenSSL/libxml2 din\u00E2micos', ok: missing.length === 0, detail: missing.length ? `Ausentes: ${missing.join(', ')}` : REQUIRED_DYNAMIC.join(', ') }); }\n catch (error) { items.push({ name: 'OpenSSL/libxml2 din\u00E2micos', ok: false, detail: (error as Error).message }); }\n }\n return items;\n}\n\nasync function copyCompilerLicenses(config: AcbrConfig, stage: string, lazarus: string): Promise<void> {\n const packagedLazarus = fileURLToPath(new URL('../docs/licenses/lazarus/', import.meta.url));\n const packagedFpc = fileURLToPath(new URL('../docs/licenses/fpc/', import.meta.url));\n const notices: Record<string, { source: string; sha256: string }> = {};\n async function copyNotice(name: string, candidates: string[]): Promise<void> {\n for (const source of candidates) if (await exists(source)) {\n await copyFile(source, join(stage, 'licenses', name));\n notices[name] = { source, sha256: await fileHash(source) };\n return;\n }\n throw new Error(`Notice obrigat\u00F3rio ausente: ${name}.`);\n }\n for (const name of ['COPYING.txt', 'COPYING.LGPL.txt', 'COPYING.modifiedLGPL.txt']) {\n await copyNotice(`Lazarus-${name}`, [join(lazarus, name), join(lazarus, 'docs', name), join(packagedLazarus, name)]);\n }\n if (await exists(join(packagedLazarus, 'ORIGIN.json'))) await copyFile(join(packagedLazarus, 'ORIGIN.json'), join(stage, 'licenses/Lazarus-notice-origin.json'));\n const fpcRoot = resolve(dirname(config.native.fpc), '../..');\n const sourceRoots = [join(fpcRoot, 'source'), join(lazarus, 'fpc/3.2.2/source'), '/usr/share/fpcsrc/3.2.2'];\n for (const [name, sourceRelative] of [['COPYING.GPL.txt', 'compiler/COPYING.txt'], ['COPYING.LGPL.txt', 'rtl/COPYING.txt'], ['COPYING.FPC', 'rtl/COPYING.FPC']] as const) {\n await copyNotice(`FPC-${name}`, [...sourceRoots.map(directory => join(directory, sourceRelative)), join(packagedFpc, name)]);\n }\n if (await exists(join(packagedFpc, 'ORIGIN.json'))) await copyFile(join(packagedFpc, 'ORIGIN.json'), join(stage, 'licenses/FPC-notice-origin.json'));\n const candidates = [join(fpcRoot, 'doc'), fpcRoot, join(lazarus, 'fpc'), '/usr/share/doc/fp-compiler-3.2.2', '/usr/share/doc/fp-units-rtl-3.2.2'];\n for (const directory of candidates) {\n if (!(await exists(directory))) continue;\n for (const name of await readdir(directory)) {\n if (/^(?:copying|license|copyright)/i.test(name) && (await stat(join(directory, name))).isFile()) await copyFile(join(directory, name), join(stage, 'licenses', `FPC-${basename(directory)}-${name}`));\n }\n }\n await writeFile(join(stage, 'licenses/toolchain-notices.json'), `${JSON.stringify(notices, null, 2)}\\n`);\n}\n", "import { createHash } from 'node:crypto';\r\nimport { execFile } from 'node:child_process';\r\nimport { promisify } from 'node:util';\r\nimport { mkdir, readFile, writeFile, readdir } from 'node:fs/promises';\r\nimport path from 'node:path';\r\nimport { fileURLToPath } from 'node:url';\r\nconst execute = promisify(execFile);\r\ninterface RawProperty { name:string; type:string; indexed:boolean; readable:boolean; writable:boolean; default:string; line:number }\r\ninterface RawType { name:string; kind:string; ancestor?:string; properties?:RawProperty[]; methods?:{name:string;result:string;arguments:number}[]; target?:string; values?:{name:string;assigned:string}[]; min?:string; max?:string; declarationKind?:string; line:number }\r\ninterface RawUnit { name:string; file:string; uses:string[]; types:RawType[] }\r\nexport interface RawModel { schemaVersion:number; root:string; units:RawUnit[] }\r\nexport interface ModelProperty { name:string; type:string; kind:'string'|'integer'|'decimal'|'datetime'|'boolean'|'enum'|'object'|'list'; ref?:string; readonly:boolean; declaredDefault?:string; min?:number; max?:number; scale?:number }\r\nexport interface ModelType { name:string; unit:string; kind:'object'|'list'|'enum'; properties?:ModelProperty[]; item?:string; values?:string[]; factory?:string }\r\nexport interface ModelIR { schemaVersion:1; root:string; types:ModelType[] }\r\nexport interface GenerateOptions { acbrRoot:string; outputDir:string; revision:string|number; sourceHash?:string; modelOutputDir?:string; nativeOutputDir?:string; extractorPath?:string; fpcPath?:string }\r\nconst bases = new Set(['tobject','tpersistent','tacbrobjectlist']);\r\nconst primitives:Record<string,{kind:ModelProperty['kind'];min?:number;max?:number;scale?:number}>={\r\n string:{kind:'string'},ansistring:{kind:'string'},unicodestring:{kind:'string'},widestring:{kind:'string'},\r\n boolean:{kind:'boolean'},byte:{kind:'integer',min:0,max:255},word:{kind:'integer',min:0,max:65535},\r\n integer:{kind:'integer',min:-2147483648,max:2147483647},longint:{kind:'integer',min:-2147483648,max:2147483647},\r\n smallint:{kind:'integer',min:-32768,max:32767},shortint:{kind:'integer',min:-128,max:127},\r\n cardinal:{kind:'integer',min:0,max:4294967295},longword:{kind:'integer',min:0,max:4294967295},\r\n int64:{kind:'integer',min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER},qword:{kind:'integer',min:0,max:Number.MAX_SAFE_INTEGER},\r\n double:{kind:'decimal'},extended:{kind:'decimal'},single:{kind:'decimal'},currency:{kind:'decimal',scale:4},\r\n tdatetime:{kind:'datetime'},tdate:{kind:'datetime'},ttime:{kind:'datetime'}\r\n};\r\nconst stable = (value:unknown):string => JSON.stringify(value);\r\nconst hash = (value:string|Buffer):string => createHash('sha256').update(value).digest('hex');\r\nexport function buildModelIR(raw:RawModel):ModelIR {\r\n const declarations=new Map<string,{unit:RawUnit;type:RawType}>();\r\n for(const unit of raw.units)for(const type of unit.types)declarations.set((unit.name+'.'+type.name).toLowerCase(),{unit,type});\r\n function find(name:string,unit:RawUnit):{unit:RawUnit;type:RawType}{\r\n for(const key of [unit.name+'.'+name,...[...unit.uses].reverse().map(u=>u+'.'+name),name]){const item=declarations.get(key.toLowerCase());if(item)return item;}\r\n throw new Error('Tipo Pascal n\u00E3o resolvido: '+unit.name+'.'+name);\r\n }\r\n function resolve(name:string,unit:RawUnit,trail=new Set<string>()):{unit:RawUnit;type:RawType}|{primitive:string}{\r\n if(primitives[name.toLowerCase()])return {primitive:name.toLowerCase()};\r\n const found=find(name,unit),key=(found.unit.name+'.'+found.type.name).toLowerCase();\r\n if(trail.has(key))throw new Error('Alias Pascal c\u00EDclico: '+key);\r\n if(found.type.kind==='alias'){trail.add(key);return resolve(found.type.target!,found.unit,trail);}\r\n return found;\r\n }\r\n const rootUnit=raw.units.find(u=>u.types.some(t=>t.name===raw.root));\r\n if(!rootUnit)throw new Error('Modelo raiz ausente: '+raw.root);\r\n const generated=new Map<string,ModelType>();\r\n function visit(name:string,unit:RawUnit):{kind:ModelProperty['kind'];ref?:string;min?:number;max?:number;scale?:number}{\r\n const found=resolve(name,unit);if('primitive'in found)return primitives[found.primitive];\r\n const {type,unit:declUnit}=found,key=type.name;\r\n if(generated.has(key)){const node=generated.get(key)!;if(node.unit!==declUnit.name)throw new Error('Tipos hom\u00F4nimos incompat\u00EDveis: '+key);return {kind:node.kind==='object'?'object':node.kind==='list'?'list':'enum',ref:key};}\r\n if(type.kind==='enum'){\r\n const values=type.values!.map(v=>v.name);if(!values.length)throw new Error('Enum sem valores: '+key);\r\n generated.set(key,{name:key,unit:declUnit.name,kind:'enum',values});return {kind:'enum',ref:key};\r\n }\r\n if(type.kind!=='class')throw new Error('Declara\u00E7\u00E3o Pascal n\u00E3o suportada: '+declUnit.name+'.'+key+' ('+(type.declarationKind??type.kind)+')');\r\n const creator=type.methods?.find(m=>m.name.toLowerCase()==='new'&&m.arguments===0);\r\n const indexed=type.properties?.find(p=>p.indexed&&p.name.toLowerCase()==='items');\r\n if(creator||indexed){\r\n if(!creator||!indexed||!indexed.readable)throw new Error('Cole\u00E7\u00E3o sem contrato New/Items tipado: '+key);\r\n const item=resolve(creator.result,declUnit),itemProperty=resolve(indexed.type,declUnit);\r\n if('primitive'in item||'primitive'in itemProperty||item.type.name!==itemProperty.type.name)throw new Error('Cole\u00E7\u00E3o com tipos New/Items divergentes: '+key);\r\n generated.set(key,{name:key,unit:declUnit.name,kind:'list',item:item.type.name,factory:creator.name});\r\n if(visit(creator.result,declUnit).kind!=='object')throw new Error('Item de cole\u00E7\u00E3o n\u00E3o \u00E9 objeto: '+key);\r\n return {kind:'list',ref:key};\r\n }\r\n const node:ModelType={name:key,unit:declUnit.name,kind:'object',properties:[]};generated.set(key,node);\r\n let inherited:ModelProperty[]=[];\r\n if(type.ancestor&&!bases.has(type.ancestor.toLowerCase())){\r\n const ancestor=visit(type.ancestor,declUnit);if(ancestor.kind!=='object')throw new Error('Heran\u00E7a n\u00E3o suportada: '+key);\r\n inherited=generated.get(ancestor.ref!)!.properties!;\r\n }\r\n const props=new Map(inherited.map(p=>[p.name.toLowerCase(),p]));\r\n for(const p of type.properties??[]){\r\n if(p.indexed)throw new Error('Propriedade indexada fora de cole\u00E7\u00E3o: '+key+'.'+p.name);\r\n if(!p.readable)throw new Error('Propriedade sem leitura: '+key+'.'+p.name);\r\n const resolved=visit(p.type,declUnit);\r\n const readonly=(!p.writable&&!['object','list'].includes(resolved.kind))||(key===raw.root&&['signature','procnfe','infnfesupl'].includes(p.name.toLowerCase()));\r\n props.set(p.name.toLowerCase(),{name:p.name,type:p.type,...resolved,readonly,...(p.default?{declaredDefault:p.default}:{})});\r\n }\r\n node.properties=[...props.values()].sort((a,b)=>a.name.localeCompare(b.name,'en'));return {kind:'object',ref:key};\r\n }\r\n visit(raw.root,rootUnit);return {schemaVersion:1,root:raw.root,types:[...generated.values()].sort((a,b)=>a.name.localeCompare(b.name,'en'))};\r\n}\r\nexport function compareContracts(previous:ModelIR|undefined,current:ModelIR){\r\n const old=new Map(previous?.types.map(t=>[t.name,t])??[]),now=new Map(current.types.map(t=>[t.name,t]));\r\n const additions:string[]=[],removals:string[]=[],changes:string[]=[];\r\n for(const [name,type]of now){\r\n const before=old.get(name);if(!before){additions.push(name);continue;}\r\n if(type.kind!==before.kind){changes.push(name+':kind');continue;}\r\n if(type.kind==='object'){\r\n const a=new Map(before.properties!.map(p=>[p.name,p])),b=new Map(type.properties!.map(p=>[p.name,p]));\r\n for(const [field,p]of b){if(!a.has(field))additions.push(name+'.'+field);else if(stable(a.get(field))!==stable(p))changes.push(name+'.'+field);}\r\n for(const field of a.keys())if(!b.has(field))removals.push(name+'.'+field);\r\n }else if(type.kind==='enum'){\r\n for(const v of type.values!)if(!before.values!.includes(v))additions.push(name+'.'+v);\r\n for(const v of before.values!)if(!type.values!.includes(v))removals.push(name+'.'+v);\r\n }else if(type.item!==before.item)changes.push(name+':item');\r\n }\r\n for(const name of old.keys())if(!now.has(name))removals.push(name);\r\n return {additions:additions.sort(),removals:removals.sort(),changes:changes.sort(),breaking:removals.length>0||changes.length>0};\r\n}\r\nconst tsType=(p:ModelProperty):string=>p.kind==='object'?p.ref+'Input':p.kind==='list'?p.ref+'Input':p.kind==='enum'?p.ref!:p.kind==='integer'?'number':p.kind==='boolean'?'boolean':'string';\r\nexport function renderModelValidation():string { return String.raw`\r\nexport type CodigoValidacaoModelo = 'MODELO_DESCONHECIDO'|'ENUM_INVALIDO'|'ARRAY_ESPERADO'|'OBJETO_ESPERADO'|'CAMPO_DESCONHECIDO'|'CAMPO_SOMENTE_LEITURA'|'INTEIRO_INVALIDO'|'BOOLEANO_ESPERADO'|'DECIMAL_INVALIDO'|'DATA_HORA_INVALIDA'|'DATA_INVALIDA'|'TEXTO_ESPERADO';\r\nfunction campoConhecido(at: unknown): string | undefined {\r\n if(typeof at!=='string'||at.length>512||! /^[A-Za-z_]\\w*(?:(?:\\.[A-Za-z_]\\w*)|(?:\\[\\d{1,7}\\]))*$/.test(at))return undefined;\r\n const parts=at.replace(/\\[(\\d+)\\]/g,'.$1').split('.');let schema=Object.hasOwn(MODEL_SCHEMA,parts[0])?MODEL_SCHEMA[parts[0]]:undefined;\r\n if(!schema)return undefined;\r\n for(const part of parts.slice(1)){\r\n if(schema.kind==='list'){if(! /^\\d+$/.test(part))return undefined;schema=MODEL_SCHEMA[schema.item];}\r\n else if(schema.kind==='object'){const p=schema.properties.find((p:any)=>p.name===part);if(!p)return undefined;schema=p.ref?MODEL_SCHEMA[p.ref]:{kind:p.kind};}\r\n else return undefined;\r\n }\r\n return at;\r\n}\r\n/** TypeError compat\u00EDvel, com contexto seguro e sem o valor informado ou chaves desconhecidas. */\r\nexport class ErroValidacaoModelo extends TypeError {\r\n readonly codigo: CodigoValidacaoModelo;\r\n readonly diagnostico: Readonly<{codigo:CodigoValidacaoModelo;etapa:'documento';campo?:string;mensagem:string;acao:string;statusEnvio:'nao_enviado';causa:Readonly<{codigo:CodigoValidacaoModelo;etapa:'documento';campo?:string}>}>;\r\n constructor(codigo: CodigoValidacaoModelo, at?: string) {\r\n const catalogo:Record<CodigoValidacaoModelo,[string,string]>={\r\n MODELO_DESCONHECIDO:['Modelo desconhecido.','Use um modelo exportado pelo cliente gerado.'],\r\n ENUM_INVALIDO:['enum inv\u00E1lido','Use um dos valores textuais do enum exportado pelo cliente.'],\r\n ARRAY_ESPERADO:['esperado array','Informe uma lista JSON entre colchetes.'],\r\n OBJETO_ESPERADO:['esperado objeto','Informe um objeto JSON entre chaves.'],\r\n CAMPO_DESCONHECIDO:['propriedade desconhecida','Confira os nomes permitidos neste grupo; a chave desconhecida n\u00E3o \u00E9 registrada.'],\r\n CAMPO_SOMENTE_LEITURA:['propriedade somente leitura','Remova este campo da entrada; o motor preenche seu resultado.'],\r\n INTEIRO_INVALIDO:['inteiro fora do intervalo','Informe um n\u00FAmero inteiro dentro do intervalo do campo.'],\r\n BOOLEANO_ESPERADO:['esperado boolean','Informe true ou false como valor JSON, sem aspas.'],\r\n DECIMAL_INVALIDO:['esperado decimal em string','Informe o decimal entre aspas, com ponto e a escala permitida pelo campo.'],\r\n DATA_HORA_INVALIDA:['esperado data/hora civil ISO (sem timezone)','Informe a data/hora civil da UF como AAAA-MM-DDTHH:mm:ss, sem Z ou offset. Confira a data antes do envio.'],\r\n DATA_INVALIDA:['data inv\u00E1lida','Confira dia, m\u00EAs, ano e hor\u00E1rio usando uma data civil v\u00E1lida.'],\r\n TEXTO_ESPERADO:['esperado string','Informe texto entre aspas no JSON.']\r\n };\r\n const safeCode=Object.hasOwn(catalogo,codigo)?codigo:'MODELO_DESCONHECIDO';\r\n const campo=campoConhecido(at),[texto,acao]=catalogo[safeCode],mensagem=(campo?campo+': ':'')+texto;\r\n super(mensagem);this.codigo=safeCode;\r\n const causa=Object.freeze({codigo:safeCode,etapa:'documento' as const,...(campo?{campo}:{})});\r\n this.diagnostico=Object.freeze({codigo:safeCode,etapa:'documento' as const,...(campo?{campo}:{}),mensagem,acao,statusEnvio:'nao_enviado' as const,causa});\r\n Object.defineProperty(this,'cause',{value:causa,enumerable:false});\r\n }\r\n toJSON(){return this.diagnostico;}\r\n}\r\nexport function validateModel(model: string, value: unknown, at=model): void {\r\n const schema=Object.hasOwn(MODEL_SCHEMA,model)?MODEL_SCHEMA[model]:undefined;\r\n if(!schema)throw new ErroValidacaoModelo('MODELO_DESCONHECIDO');\r\n at=campoConhecido(at)??model;\r\n if(schema.kind==='enum'){if(typeof value!=='string'||!schema.values.includes(value))throw new ErroValidacaoModelo('ENUM_INVALIDO',at);return;}\r\n if(schema.kind==='list'){if(!Array.isArray(value))throw new ErroValidacaoModelo('ARRAY_ESPERADO',at);value.forEach((item,index)=>validateModel(schema.item,item,at+'['+index+']'));return;}\r\n if(value===null||typeof value!=='object'||Array.isArray(value))throw new ErroValidacaoModelo('OBJETO_ESPERADO',at);\r\n const fields=new Map<string,any>(schema.properties.filter((p:any)=>!p.readonly).map((p:any)=>[p.name,p]));\r\n for(const [name,v] of Object.entries(value)){\r\n if(v===undefined)continue;\r\n const p=fields.get(name);\r\n if(!p){const readonly=schema.properties.some((p:any)=>p.name===name&&p.readonly);throw new ErroValidacaoModelo(readonly?'CAMPO_SOMENTE_LEITURA':'CAMPO_DESCONHECIDO',readonly?at+'.'+name:at);}\r\n const field=at+'.'+name;\r\n if(p.ref){validateModel(p.ref,v,field);continue;}\r\n if(p.kind==='integer'){if(typeof v!=='number'||!Number.isSafeInteger(v)||v<p.min||v>p.max)throw new ErroValidacaoModelo('INTEIRO_INVALIDO',field);}\r\n else if(p.kind==='boolean'){if(typeof v!=='boolean')throw new ErroValidacaoModelo('BOOLEANO_ESPERADO',field);}\r\n else if(p.kind==='decimal'){if(typeof v!=='string'||v.length>64||! /^-?\\d+(?:\\.\\d+)?$/.test(v)||p.scale!==undefined&&(v.split('.')[1]?.length??0)>p.scale)throw new ErroValidacaoModelo('DECIMAL_INVALIDO',field);}\r\n else if(p.kind==='datetime'){\r\n if(typeof v!=='string'||! /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?)?$/.test(v)||Number.isNaN(Date.parse(v+(v.length===10?'T00:00:00Z':'Z'))))throw new ErroValidacaoModelo('DATA_HORA_INVALIDA',field);\r\n const date=new Date(v+(v.length===10?'T00:00:00Z':'Z'));if(date.toISOString().slice(0,10)!==v.slice(0,10))throw new ErroValidacaoModelo('DATA_INVALIDA',field);\r\n }else if(typeof v!=='string')throw new ErroValidacaoModelo('TEXTO_ESPERADO',field);\r\n }\r\n}\r\nexport function validateTNFe(value: unknown): asserts value is TNFeInput { validateModel('TNFe',value); }\r\n`; }\r\nexport function renderTypeScript(ir:ModelIR,revision:number,contractHash:string):string {\r\n const out=['// Generated from ACBr AST. LGPL-2.1-or-later. Do not edit.','export const ACBR_CONTRACT = '+stable({sourceRevision:revision,contractHash})+' as const;','export const SOURCE_REVISION=ACBR_CONTRACT.sourceRevision;','export const CONTRACT_HASH=ACBR_CONTRACT.contractHash;'];\r\n for(const t of ir.types){\r\n if(t.kind==='enum'){\r\n out.push('export const '+t.name+' = Object.freeze('+stable(Object.fromEntries(t.values!.map(v=>[v,v])))+' as const);','export type '+t.name+' = typeof '+t.name+'[keyof typeof '+t.name+'];');\r\n }else if(t.kind==='list'){\r\n out.push('export type '+t.name+'Input = '+t.item+'Input[];','export class '+t.name+' extends Array<'+t.item+'> {',' New(input: '+t.item+'Input = {}): '+t.item+' { const item=new '+t.item+'(input); this.push(item); return item; }','}');\r\n }else {\r\n out.push('export interface '+t.name+'Input {');\r\n for(const p of t.properties!.filter(p=>!p.readonly))out.push(' '+JSON.stringify(p.name)+'?: '+tsType(p)+';');\r\n out.push('}','export class '+t.name+' {');\r\n for(const p of t.properties!){\r\n if(p.readonly){out.push(' readonly '+JSON.stringify(p.name)+'?: '+tsType(p)+';');continue;}\r\n if(p.declaredDefault)out.push(' /** Pascal streaming default: '+p.declaredDefault.replaceAll('*/','')+'. Omission preserves the native constructor. */');\r\n if(p.kind==='object'||p.kind==='list')out.push(' '+JSON.stringify(p.name)+' = new '+p.ref+'();');\r\n else out.push(' '+JSON.stringify(p.name)+'?: '+tsType(p)+';');\r\n }\r\n out.push(' constructor(input: '+t.name+'Input = {}) {',' validateModel('+JSON.stringify(t.name)+', input);');\r\n for(const p of t.properties!.filter(p=>!p.readonly)){\r\n const access='input['+JSON.stringify(p.name)+']',target='this['+JSON.stringify(p.name)+']';\r\n out.push(' if ('+access+' !== undefined) '+target+' = '+(p.kind==='object'?'new '+p.ref+'('+access+')':p.kind==='list'?'Object.assign(new '+p.ref+'(), '+access+'.map(v=>new '+ir.types.find(t=>t.name===p.ref)!.item+'(v)))':access)+';');\r\n }\r\n out.push(' }','}');\r\n }\r\n }\r\n out.push('const MODEL_SCHEMA: Record<string, any> = '+stable(Object.fromEntries(ir.types.map(t=>[t.name,t])))+';');\r\n out.push(renderModelValidation());\r\n return out.join('\\n')+'\\n';\r\n}\r\n\r\nexport function renderContractMetadata(ir:ModelIR,sourceRevision:number,sourceHash:string,contractHash:string):string {\r\n if(hash(stable({sourceRevision,sourceHash,ir}))!==contractHash)throw new Error('Hash do contrato diverge dos metadados gerados.');\r\n return stable({formatVersion:1,sourceRevision,sourceHash,contractHash,ir})+'\\n';\r\n}\r\nexport function renderPascal(ir:ModelIR,revision:number,contractHash:string):string {\r\n const classes=ir.types.filter(t=>t.kind==='object'),byName=new Map(ir.types.map(t=>[t.name,t]));\r\n const units=[...new Set(ir.types.map(t=>t.unit))].sort();\r\n const out=['{ Generated from ACBr AST. LGPL-2.1-or-later. Do not edit. }','unit AcbrModels;','{$mode delphi}{$H+}','interface','uses SysUtils, Classes, fpjson, DateUtils, Math, '+units.join(', ')+';','const SourceRevision = '+revision+';',\" ContractHash = '\"+contractHash+\"';\",'procedure preencherTNFe(documento:TJSONObject; destino:TNFe);','implementation'];\r\n out.push(String.raw`\r\nprocedure Bad(const P,M:string); begin raise Exception.Create(P+': '+M) end;\r\nfunction Obj(D:TJSONData;const P:string):TJSONObject;\r\nbegin if (D=nil) or (D.JSONType<>jtObject) then Bad(P,'esperado objeto');Result:=TJSONObject(D) end;\r\nfunction Arr(D:TJSONData;const P:string):TJSONArray;\r\nbegin if (D=nil) or (D.JSONType<>jtArray) then Bad(P,'esperado array');Result:=TJSONArray(D) end;\r\nfunction Text(D:TJSONData;const P:string):string;\r\nbegin if (D=nil) or (D.JSONType<>jtString) then Bad(P,'esperado string');Result:=D.AsString end;\r\nfunction IntValue(D:TJSONData;const P:string;MinV,MaxV:Int64):Int64;\r\nvar V:Extended;\r\nbegin\r\n if (D=nil) or (D.JSONType<>jtNumber) then Bad(P,'esperado inteiro');\r\n V:=D.AsFloat;if IsNan(V) or IsInfinite(V) or (Frac(V)<>0) or (V<MinV) or (V>MaxV) then Bad(P,'inteiro fora do intervalo');\r\n Result:=D.AsInt64;\r\nend;\r\nfunction BoolValue(D:TJSONData;const P:string):boolean;\r\nbegin if (D=nil) or (D.JSONType<>jtBoolean) then Bad(P,'esperado boolean');Result:=D.AsBoolean end;\r\nfunction DecimalText(D:TJSONData;const P:string;Scale:integer):string;\r\nvar I,PointPos:integer;\r\nbegin\r\n Result:=Text(D,P);PointPos:=0;\r\n if (Result='') or (Length(Result)>64) then Bad(P,'decimal inv\u00E1lido');\r\n for I:=1 to Length(Result) do begin\r\n if Result[I]='.' then begin if (PointPos>0) or (I=1) or ((I=2) and (Result[1]='-')) or (I=Length(Result)) then Bad(P,'decimal inv\u00E1lido');PointPos:=I end\r\n else if (Result[I]='-') and (I=1) then begin if Length(Result)=1 then Bad(P,'decimal inv\u00E1lido') end\r\n else if not (Result[I] in ['0'..'9']) then Bad(P,'decimal inv\u00E1lido');\r\n end;\r\n if (PointPos>0) and (Scale>=0) and (Length(Result)-PointPos>Scale) then Bad(P,'casas decimais excedidas');\r\nend;\r\nfunction FloatValue(D:TJSONData;const P:string):Extended;\r\nvar F:TFormatSettings;S:string;\r\nbegin F:=DefaultFormatSettings;F.DecimalSeparator:='.';F.ThousandSeparator:=#0;S:=DecimalText(D,P,-1);\r\n if not TryStrToFloat(S,Result,F) or IsNan(Result) or IsInfinite(Result) then Bad(P,'decimal fora do intervalo');\r\nend;\r\nfunction CurrencyValue(D:TJSONData;const P:string):Currency;\r\nvar F:TFormatSettings;S:string;\r\nbegin F:=DefaultFormatSettings;F.DecimalSeparator:='.';F.ThousandSeparator:=#0;S:=DecimalText(D,P,4);\r\n if not TryStrToCurr(S,Result,F) then Bad(P,'currency fora do intervalo');\r\nend;\r\nfunction DateValue(D:TJSONData;const P:string):TDateTime;\r\nvar S:string;I:integer;\r\nbegin\r\n S:=Text(D,P);\r\n if not (Length(S) in [10,19,21,22,23]) then Bad(P,'esperado data/hora civil ISO sem timezone');\r\n for I:=1 to Length(S) do if not ((S[I] in ['0'..'9']) or ((I in [5,8]) and (S[I]='-')) or ((I=11) and (S[I]='T')) or ((I in [14,17]) and (S[I]=':')) or ((I=20) and (S[I]='.'))) then Bad(P,'data ISO inv\u00E1lida');\r\n if not TryISO8601ToDate(S,Result,true) then Bad(P,'data ISO inv\u00E1lida');\r\nend;\r\n`);\r\n const q=(s:string)=>\"'\"+s.replaceAll(\"'\",\"''\")+\"'\";\r\n for(const t of classes)out.push('procedure Load_'+t.name+'(D:TJSONObject;destino:'+t.unit+'.'+t.name+';const P:string); forward;');\r\n for(const t of classes){\r\n out.push('procedure Load_'+t.name+'(D:TJSONObject;destino:'+t.unit+'.'+t.name+';const P:string);','var I,J:integer;V:TJSONData;A:TJSONArray;K,At:string;','begin',\" if destino=nil then Bad(P,'objeto ACBr n\u00E3o inicializado');\",' for I:=0 to D.Count-1 do begin',' K:=D.Names[I];V:=D.Items[I];At:=P+\\'.\\'+K;');\r\n let index=0;\r\n for(const p of t.properties!.filter(p=>!p.readonly)){\r\n out.push(' '+(index++?'else ':'')+'if K='+q(p.name)+' then begin');const target='destino.'+p.name;\r\n if(p.kind==='object')out.push(' Load_'+p.ref+'(Obj(V,At),'+target+',At);');\r\n else if(p.kind==='list'){\r\n const list=byName.get(p.ref!)!;\r\n out.push(' A:=Arr(V,At);if '+target+'=nil then Bad(At,\\'cole\u00E7\u00E3o n\u00E3o inicializada\\');'+target+'.Clear;',' for J:=0 to A.Count-1 do Load_'+list.item+'(Obj(A.Items[J],At+\\'[\\'+IntToStr(J)+\\']\\'),'+target+'.'+list.factory+',At+\\'[\\'+IntToStr(J)+\\']\\');');\r\n }else if(p.kind==='enum'){\r\n const enumeration=byName.get(p.ref!)!;\r\n out.push(...enumeration.values!.map((v,i)=>' '+(i?'else ':'')+'if Text(V,At)='+q(v)+' then '+target+':='+enumeration.unit+'.'+v),\" else Bad(At,'enum inv\u00E1lido');\");\r\n }else out.push(' '+target+':='+({string:'Text(V,At)',integer:'IntValue(V,At,'+p.min+','+p.max+')',boolean:'BoolValue(V,At)',datetime:'DateValue(V,At)',decimal:p.scale===4?'CurrencyValue(V,At)':'FloatValue(V,At)'}[p.kind])+';');\r\n out.push(' end');\r\n }\r\n out.push((index?\" else \":\" \")+\"Bad(At,'propriedade desconhecida ou somente leitura');\",' end;','end;');\r\n }\r\n out.push('procedure preencherTNFe(documento:TJSONObject;destino:TNFe);',\"begin if documento=nil then Bad('TNFe','esperado objeto');Load_TNFe(documento,destino,'TNFe') end;\",'end.');\r\n return out.join('\\n')+'\\n';\r\n}\r\nexport function renderClientIndex():string{\r\n return [\r\n '// Generated client bound to its own ACBr contract. Do not edit.',\r\n 'import { criarEmissor as criarRuntime, diagnosticarErro as diagnosticarErroRuntime, diagnosticarResultado, type OpcoesEmissor, type OpcoesOperacao } from '+JSON.stringify('cosmemilton-acbr-node/runtime')+';',\r\n 'import { ACBR_CONTRACT, validateTNFe, ErroValidacaoModelo, type TNFeInput } from '+JSON.stringify('./models.js')+';',\r\n 'export * from '+JSON.stringify('./models.js')+';',\r\n 'export { diagnosticarResultado };',\r\n 'export function diagnosticarErro(erro:unknown) { return erro instanceof ErroValidacaoModelo ? erro.diagnostico : diagnosticarErroRuntime(erro); }',\r\n 'export function criarEmissor(options: Omit<OpcoesEmissor, '+JSON.stringify('contrato')+' | '+JSON.stringify('validaDocumento')+'>) {',\r\n ' const emissor=criarRuntime({...options, contrato:ACBR_CONTRACT, validaDocumento:validateTNFe});',\r\n ' return {...emissor, gerarXml(documento:TNFeInput, opcoes?:OpcoesOperacao) { return emissor.gerarXml(documento as unknown as Record<string,unknown>, opcoes); }};',\r\n '}'\r\n ].join('\\n')+'\\n';\r\n}\r\nasync function fingerprint(dir:string):Promise<string>{\r\n const files:string[]=[];\r\n async function walk(d:string){for(const entry of await readdir(d,{withFileTypes:true})){const f=path.join(d,entry.name);if(entry.isDirectory())await walk(f);else if(/\\.(pas|pp|inc|xsd)$/i.test(entry.name))files.push(f);}}\r\n await walk(dir);const digest=createHash('sha256');\r\n for(const f of files.sort()){digest.update(path.relative(dir,f).replaceAll('\\\\','/'));digest.update(await readFile(f));}return digest.digest('hex');\r\n}\r\nexport async function generateModel(options:GenerateOptions){\r\n const root=path.resolve(options.outputDir),cache=path.join(root,'.acbr/generated'),bin=path.join(root,'.acbr/bin');\r\n const models=path.resolve(root,options.modelOutputDir??'generated/acbr'),native=path.resolve(root,options.nativeOutputDir??'native/generated');\r\n await Promise.all([mkdir(cache,{recursive:true}),mkdir(bin,{recursive:true}),mkdir(models,{recursive:true}),mkdir(native,{recursive:true})]);\r\n const extractor=options.extractorPath??fileURLToPath(new URL('../tools/extract-model.lpr',import.meta.url));\r\n const executable=path.join(bin,'extract-model'+(process.platform==='win32'?'.exe':''));\r\n try{\r\n await execute(options.fpcPath??'fpc',['-Mobjfpc','-Sh','-FU'+bin,'-FE'+bin,extractor],{cwd:root,maxBuffer:8*1024*1024});\r\n await execute(executable,[path.resolve(options.acbrRoot),path.join(cache,'raw-model.json'),process.platform==='win32'?'win64':'linux'],{cwd:root,maxBuffer:8*1024*1024});\r\n }catch(error){const e=error as Error&{stdout?:string;stderr?:string};throw new Error('Extra\u00E7\u00E3o FCL-passrc falhou: '+(e.stderr??'')+(e.stdout??'')+e.message);}\r\n const raw=JSON.parse(await readFile(path.join(cache,'raw-model.json'),'utf8')) as RawModel;\r\n const ir=buildModelIR(raw),sourceRevision=Number(options.revision);\r\n if(!Number.isSafeInteger(sourceRevision)||sourceRevision<1)throw new Error('Revis\u00E3o SVN inv\u00E1lida');\r\n const sourceHash=options.sourceHash??await fingerprint(options.acbrRoot),contractHash=hash(stable({sourceRevision,sourceHash,ir}));\r\n let previous:ModelIR|undefined;try{previous=JSON.parse(await readFile(path.join(cache,'model.ir.json'),'utf8'));}catch(error){if((error as NodeJS.ErrnoException).code!=='ENOENT')throw error;}\r\n const report=compareContracts(previous,ir),reportPath=path.join(cache,'changes.json'),manifestPath=path.join(cache,'manifest.json');\r\n const files=[path.relative(root,path.join(models,'models.ts')),path.relative(root,path.join(models,'index.ts')),path.relative(root,path.join(native,'AcbrModels.pas'))].map(f=>f.replaceAll('\\\\','/'));\r\n const content=[renderTypeScript(ir,sourceRevision,contractHash),renderClientIndex(),renderPascal(ir,sourceRevision,contractHash)];\r\n const fileHashes=Object.fromEntries(files.map((file,index)=>[file,hash(content[index])]));\r\n const metadataPath=path.join(models,'contract.json'),metadataContent=renderContractMetadata(ir,sourceRevision,sourceHash,contractHash);\r\n await Promise.all([\r\n ...files.map((file,index)=>writeFile(path.resolve(root,file),content[index],'utf8')),\r\n writeFile(path.join(cache,'model.ir.json'),JSON.stringify(ir,null,2)+'\\n','utf8'),\r\n writeFile(metadataPath,metadataContent,'utf8'),\r\n writeFile(reportPath,JSON.stringify(report,null,2)+'\\n','utf8'),\r\n writeFile(manifestPath,JSON.stringify({schemaVersion:1,sourceRevision,sourceHash,contractHash,root:ir.root,models:ir.types.length,files,fileHashes,metadata:{file:path.relative(root,metadataPath).replaceAll('\\\\','/'),sha256:hash(metadataContent)}},null,2)+'\\n','utf8')\r\n ]);return {contractHash,sourceHash,models:ir.types.length,reportPath,manifestPath,metadataPath};\r\n}\r\n", "import { ErroAcbrNode, type Comando, type DetalhesErroAcbr, type DiagnosticoAcbr, type EtapaAcbr, type ResultadoFiscal, type StatusEnvio } from './types.js';\n\nconst ETAPAS = new Set<EtapaAcbr>(['configuracao','documento','runtime','geracao','validacao','assinatura','transmissao','consulta','cancelamento','carta_correcao','inutilizacao','operacao','limpeza']);\nconst CAMPOS = new Set(['cnpj','uf','modelo','ambiente','contrato','certificado','certificado.senha','certificado.pfx','certificado.arquivo','csc','csc.id','csc.valor','timeoutMs','limiteFila','limiteBytes','runtimeDirectory','documento','xml','consulta','chave','recibo','cancelamento','protocolo','justificativa','cartaCorrecao','correcao','sequenciaEvento','inutilizacao','ano','serie','numeroInicial','numeroFinal','operacao','signal']);\nconst CATALOGO: Record<string, [EtapaAcbr, string, string]> = {\n CONFIGURACAO_INVALIDA: ['configuracao','A configura\u00E7\u00E3o cont\u00E9m um campo inv\u00E1lido.','Confira o campo indicado e seu tipo antes de continuar.'],\n CONTRATO_INVALIDO: ['configuracao','O contrato do cliente \u00E9 inv\u00E1lido.','Use o contrato gerado junto com o cliente.'],\n CERTIFICADO_INVALIDO: ['configuracao','O certificado A1 ou sua configura\u00E7\u00E3o \u00E9 inv\u00E1lido.','Confira formato e validade do A1, pfx ou arquivo e a senha digitada, sem registrar esses dados.'],\n CERTIFICADO_DIVERGENTE: ['assinatura','O certificado n\u00E3o corresponde \u00E0 raiz CNPJ do emitente.','Confira o CNPJ configurado e selecione o A1 correspondente ao emitente.'],\n DEPENDENCIA_AUSENTE: ['runtime','Uma depend\u00EAncia do motor fiscal n\u00E3o est\u00E1 dispon\u00EDvel.','Reinstale o runtime completo da plataforma; confira a disponibilidade do OpenSSL distribu\u00EDdo.'],\n SCHEMAS_AUSENTES: ['runtime','Os schemas fiscais n\u00E3o est\u00E3o dispon\u00EDveis.','Reinstale o runtime completo da plataforma.'],\n SERVICOS_AUSENTES: ['runtime','A configura\u00E7\u00E3o dos servi\u00E7os fiscais n\u00E3o est\u00E1 dispon\u00EDvel.','Reinstale o runtime completo da plataforma.'],\n CSC_AUSENTE: ['configuracao','A opera\u00E7\u00E3o de NFC-e exige CSC.','Informe id e valor do CSC na configura\u00E7\u00E3o sem registrar seu conte\u00FAdo.'],\n IDENTIDADE_DIVERGENTE: ['documento','A identidade fiscal n\u00E3o corresponde \u00E0 configura\u00E7\u00E3o ou ao retorno.','Confira emitente, UF, modelo, ambiente e chave do documento antes de continuar.'],\n XML_SCHEMA_INVALIDO: ['validacao','O XML n\u00E3o atende aos schemas fiscais.','Confira os campos obrigat\u00F3rios e os tributos; a valida\u00E7\u00E3o de XML assinado deve ocorrer ap\u00F3s a assinatura.'],\n ASSINATURA_INVALIDA: ['assinatura','A assinatura do XML n\u00E3o foi validada.','Confira o A1 correspondente e use o XML assinado sem altera\u00E7\u00F5es.'],\n XML_NAO_ASSINADO: ['assinatura','A opera\u00E7\u00E3o exige XML previamente assinado.','Conclua a assinatura e a valida\u00E7\u00E3o antes de transmitir.'],\n XML_ALTERADO: ['assinatura','O XML assinado foi alterado.','Use exatamente o XML assinado e persistido; n\u00E3o edite seu conte\u00FAdo.'],\n RETORNO_INVALIDO: ['transmissao','A identidade ou o protocolo do retorno fiscal \u00E9 inv\u00E1lido.','Consulte a situa\u00E7\u00E3o fiscal antes de decidir repetir a opera\u00E7\u00E3o.'],\n OPERACAO_FISCAL_FALHOU: ['operacao','O motor n\u00E3o conseguiu concluir a etapa fiscal.','Confira a configura\u00E7\u00E3o da etapa, os dados do XML e as depend\u00EAncias do runtime.'],\n TLS_SERVIDOR_INVALIDO: ['transmissao','A verifica\u00E7\u00E3o TLS do servi\u00E7o fiscal falhou.','Confira o servi\u00E7o e a cadeia de confian\u00E7a; mantenha a verifica\u00E7\u00E3o TLS habilitada.'],\n CSC_INVALIDO: ['configuracao','A configura\u00E7\u00E3o do CSC \u00E9 inv\u00E1lida.','Confira id e valor do CSC sem registrar seu conte\u00FAdo.'],\n PLATAFORMA_NAO_SUPORTADA: ['runtime','A plataforma n\u00E3o \u00E9 suportada.','Execute em Windows ou Linux x64 com Node.js 22.12 ou superior.'],\n RUNTIME_AUSENTE: ['runtime','O motor fiscal n\u00E3o foi encontrado.','Instale o runtime da plataforma incluindo depend\u00EAncias opcionais.'],\n RUNTIME_INVALIDO: ['runtime','O runtime fiscal \u00E9 inv\u00E1lido.','Use um runtime distribu\u00EDdo e compat\u00EDvel com a plataforma.'],\n RUNTIME_INCOMPLETO: ['runtime','Falta um arquivo do runtime fiscal.','Reinstale o runtime da plataforma.'],\n RUNTIME_ALTERADO: ['runtime','A integridade do runtime fiscal n\u00E3o foi confirmada.','Reinstale o runtime; n\u00E3o desative a verifica\u00E7\u00E3o dos hashes.'],\n CONTRATO_DIVERGENTE: ['runtime','Cliente e motor usam contratos diferentes.','Use vers\u00F5es compat\u00EDveis ou regenere e recompile ambos.'],\n DOCUMENTO_INVALIDO: ['documento','O documento cont\u00E9m dados incompat\u00EDveis com o modelo.','Valide os campos e tipos do documento antes de gerar o XML.'],\n OPERACAO_INVALIDA: ['operacao','Os par\u00E2metros da opera\u00E7\u00E3o s\u00E3o inv\u00E1lidos.','Informe um objeto com os campos exigidos pela opera\u00E7\u00E3o.'],\n OPERACAO_CANCELADA: ['operacao','A opera\u00E7\u00E3o foi cancelada.','Confira o estado do envio antes de decidir continuar.'],\n TIMEOUT_MOTOR: ['runtime','O motor excedeu o tempo de espera.','Confira o estado do envio antes de repetir a opera\u00E7\u00E3o.'],\n EMISSOR_FECHADO: ['operacao','O emissor foi encerrado.','Crie um novo emissor para continuar.'],\n FALHA_INICIAR_MOTOR: ['runtime','N\u00E3o foi poss\u00EDvel iniciar o motor fiscal.','Confira a instala\u00E7\u00E3o e as permiss\u00F5es de execu\u00E7\u00E3o do runtime.'],\n FALHA_PIPE: ['runtime','A comunica\u00E7\u00E3o com o motor foi interrompida.','Confira a instala\u00E7\u00E3o e o estado do envio antes de continuar.'],\n RESPOSTA_EXCESSIVA: ['runtime','A resposta do motor excedeu o limite.','Confira o tamanho da opera\u00E7\u00E3o e a vers\u00E3o do runtime.'],\n RESPOSTA_INVALIDA: ['runtime','O motor devolveu uma resposta inv\u00E1lida.','Confira a compatibilidade do runtime e o estado do envio.'],\n FALHA_MOTOR: ['runtime','O motor encerrou sem uma resposta fiscal v\u00E1lida.','Confira a instala\u00E7\u00E3o e o estado do envio antes de continuar.'],\n CERTIFICADO_AUSENTE: ['configuracao','O certificado A1 n\u00E3o est\u00E1 dispon\u00EDvel para esta opera\u00E7\u00E3o.','Configure um A1 acess\u00EDvel e sua senha sem registrar esses dados.'],\n CERTIFICADO_EXCESSIVO: ['configuracao','O certificado excede o limite de tamanho.','Use um arquivo A1 de at\u00E9 2 MiB.'],\n REQUISICAO_INVALIDA: ['operacao','Os dados n\u00E3o puderam ser serializados ou excedem o limite.','Use dados JSON e reduza o tamanho da opera\u00E7\u00E3o.'],\n FILA_CHEIA: ['operacao','A fila fiscal est\u00E1 cheia.','Aguarde a opera\u00E7\u00E3o atual terminar antes de iniciar outra.'],\n XML_INVALIDO: ['documento','O XML est\u00E1 vazio, tem tipo inv\u00E1lido ou excede o limite.','Informe o XML como texto UTF-8 de at\u00E9 2 MiB.'],\n CHAVE_INVALIDA: ['documento','A chave fiscal tem formato inv\u00E1lido.','Informe a chave como texto com 44 d\u00EDgitos.'],\n RECIBO_INVALIDO: ['documento','O recibo tem formato inv\u00E1lido.','Informe o recibo como texto com 15 d\u00EDgitos.'],\n JUSTIFICATIVA_INVALIDA: ['documento','A justificativa tem tamanho inv\u00E1lido.','Informe uma justificativa com 15 a 255 caracteres.'],\n PROTOCOLO_INVALIDO: ['documento','O protocolo tem formato inv\u00E1lido.','Informe o protocolo como texto com 15 d\u00EDgitos.'],\n OPERACAO_NAO_SUPORTADA: ['operacao','A opera\u00E7\u00E3o n\u00E3o \u00E9 suportada para este modelo.','Carta de corre\u00E7\u00E3o exige NF-e modelo 55.'],\n CORRECAO_INVALIDA: ['documento','Os dados da carta de corre\u00E7\u00E3o s\u00E3o inv\u00E1lidos.','Confira a corre\u00E7\u00E3o de 15 a 1000 caracteres e a sequ\u00EAncia de 1 a 20.'],\n INUTILIZACAO_INVALIDA: ['documento','A faixa de inutiliza\u00E7\u00E3o \u00E9 inv\u00E1lida.','Confira ano, s\u00E9rie e n\u00FAmeros inicial e final.'],\n FALHA_LOCAL: ['operacao','N\u00E3o foi poss\u00EDvel concluir a opera\u00E7\u00E3o local.','Confira a etapa e os tipos dos dados; n\u00E3o registre o erro bruto.']\n};\n\nexport function etapaDaOperacao(comando: Comando): EtapaAcbr {\n return ({gerarXml:'geracao',validar:'validacao',assinar:'assinatura',transmitir:'transmissao',consultar:'consulta',cancelar:'cancelamento',cartaCorrecao:'carta_correcao',inutilizar:'inutilizacao'} as const)[comando]??'operacao';\n}\n\n/** Apenas cat\u00E1logo e metadados conhecidos; nunca copia message, stack, stderr ou causa bruta. */\nexport function criarDiagnosticoErro(codigo: string, desconhecido = false, detalhes: DetalhesErroAcbr = {}): DiagnosticoAcbr {\n const safeCode = Object.hasOwn(CATALOGO, codigo) ? codigo : 'FALHA_LOCAL';\n const [defaultStage, mensagem, defaultAction] = CATALOGO[safeCode];\n const etapa = detalhes.etapa && ETAPAS.has(detalhes.etapa) ? detalhes.etapa : defaultStage;\n const campo = detalhes.campo && CAMPOS.has(detalhes.campo) ? detalhes.campo : undefined;\n const acoesConfig:Record<string,string>={cnpj:'Informe o CNPJ como texto com 14 d\u00EDgitos.',uf:'Informe a sigla da UF em letras mai\u00FAsculas, por exemplo PE.',modelo:'Informe o n\u00FAmero 55 para NF-e ou 65 para NFC-e, sem aspas.',ambiente:'Informe o n\u00FAmero 2 para homologa\u00E7\u00E3o ou 1 para produ\u00E7\u00E3o, sem aspas.',timeoutMs:'Informe um n\u00FAmero inteiro de 1 a 120000 milissegundos.',limiteFila:'Informe um n\u00FAmero inteiro de 0 a 1000.',limiteBytes:'Informe um n\u00FAmero inteiro de 256 a 8388608 bytes.',runtimeDirectory:'Informe o diret\u00F3rio do runtime como texto n\u00E3o vazio.'};\n const acao=safeCode==='CONFIGURACAO_INVALIDA'&&campo&&Object.hasOwn(acoesConfig,campo)?acoesConfig[campo]:defaultAction;\n const causa = Object.freeze({codigo:safeCode,etapa,...(campo ? {campo} : {})});\n return Object.freeze({codigo:safeCode,etapa,...(campo ? {campo} : {}),mensagem,\n acao:desconhecido ? 'Consulte a situa\u00E7\u00E3o fiscal antes de repetir. O envio pode ter ocorrido; n\u00E3o retransmita automaticamente.' : acao,\n statusEnvio:desconhecido ? 'resultado_incerto' : 'nao_enviado',causa});\n}\n\nexport function diagnosticarErro(erro: unknown): DiagnosticoAcbr {\n return erro instanceof ErroAcbrNode ? erro.diagnostico : criarDiagnosticoErro('FALHA_LOCAL',true);\n}\n\nexport function adicionarDiagnosticoLimpeza(diagnostico: DiagnosticoAcbr): DiagnosticoAcbr {\n const acao=diagnostico.statusEnvio==='resultado_incerto'\n ? 'Encerre esta aplica\u00E7\u00E3o antes de iniciar outro motor e consulte a situa\u00E7\u00E3o fiscal antes de repetir qualquer envio.'\n : 'Encerre esta aplica\u00E7\u00E3o antes de iniciar outro motor. As pr\u00F3ximas opera\u00E7\u00F5es deste emissor foram bloqueadas.';\n const limpeza=Object.freeze({codigo:'ENCERRAMENTO_MOTOR_NAO_CONFIRMADO' as const,etapa:'limpeza' as const,mensagem:'N\u00E3o foi poss\u00EDvel confirmar o encerramento do motor fiscal.',acao});\n return Object.freeze({...diagnostico,acao,limpeza});\n}\n\n/** Status refere-se \u00E0 opera\u00E7\u00E3o atual; uma etapa local n\u00E3o prova aus\u00EAncia de envios anteriores. */\nexport function diagnosticarResultado(resultado: ResultadoFiscal, comando: Comando): DiagnosticoAcbr {\n const etapa = etapaDaOperacao(comando);\n if(!resultado||typeof resultado!=='object')return criarDiagnosticoErro('FALHA_LOCAL',true,{etapa});\n if(resultado.envioIniciado!==undefined&&typeof resultado.envioIniciado!=='boolean')return criarDiagnosticoErro('RESPOSTA_INVALIDA',true,{etapa});\n let statusEnvio: StatusEnvio = 'resultado_incerto', codigo = 'RESULTADO_INCERTO';\n let mensagem = 'A situa\u00E7\u00E3o fiscal ainda n\u00E3o foi confirmada.';\n let acao = 'Consulte a situa\u00E7\u00E3o fiscal antes de repetir. N\u00E3o retransmita automaticamente.';\n const local=(comando==='gerarXml'&&resultado.estado==='XML_GERADO')||(comando==='validar'&&resultado.estado==='VALIDADO')||(comando==='assinar'&&resultado.estado==='ASSINADO');\n const semEvento=resultado.envioIniciado===false||resultado.envioIniciado===undefined;\n const protocolo=typeof resultado.protocolo==='string'&&/^\\d{15}$/.test(resultado.protocolo);\n const chave=typeof resultado.chave==='string'&&/^\\d{44}$/.test(resultado.chave);\n const autorizacao=(comando==='transmitir'||comando==='consultar')&&resultado.estado==='AUTORIZADO'&&[100,150].includes(resultado.cStat!)&&protocolo&&chave&&(comando==='consultar'||resultado.envioIniciado!==false);\n const evento=(comando==='cancelar'&&resultado.estado==='CANCELADO'&&[135,136].includes(resultado.cStat!)&&chave)||(comando==='cartaCorrecao'&&resultado.estado==='EVENTO_REGISTRADO'&&resultado.cStat===135&&chave)||(comando==='inutilizar'&&resultado.estado==='INUTILIZADO'&&resultado.cStat===102);\n if (local && resultado.sucesso===true && semEvento) {\n statusEnvio='nao_enviado';codigo='ETAPA_LOCAL_CONCLUIDA';mensagem='A etapa local foi conclu\u00EDda; esta opera\u00E7\u00E3o n\u00E3o transmitiu a nota.';acao='Confira o resultado antes de seguir para a pr\u00F3xima etapa.';\n } else if (resultado.sucesso===true && (autorizacao||evento&&protocolo&&resultado.envioIniciado!==false)) {\n statusEnvio='autorizado';codigo='OPERACAO_CONFIRMADA';\n mensagem=({AUTORIZADO:'A nota foi autorizada.',CANCELADO:'O cancelamento foi confirmado.',EVENTO_REGISTRADO:'O evento foi registrado.',INUTILIZADO:'A faixa foi inutilizada.'} as Record<string,string>)[resultado.estado];\n acao='Guarde o resultado fiscal. N\u00E3o repita esta opera\u00E7\u00E3o.';\n } else if (resultado.sucesso===false && (comando==='consultar'||resultado.envioIniciado!==false) && ['transmitir','consultar','cancelar','cartaCorrecao','inutilizar'].includes(comando) && Number.isInteger(resultado.cStat) && Number(resultado.cStat)>0 && Number(resultado.cStat)<=9999 && (resultado.estado==='DENEGADO'&&[110,301,302].includes(resultado.cStat!)||resultado.estado==='REJEITADO'&&![100,150,110,301,302,101,151,155,103,104,105,108,109,204,539,573,135,136,102,217].includes(resultado.cStat!))) {\n statusEnvio='rejeitado';codigo=resultado.estado==='DENEGADO'?'NOTA_DENEGADA':'OPERACAO_REJEITADA';\n mensagem=resultado.estado==='DENEGADO'?'A nota foi denegada.':'A opera\u00E7\u00E3o foi rejeitada.';\n acao=resultado.estado==='DENEGADO'?'Consulte a situa\u00E7\u00E3o fiscal e a orienta\u00E7\u00E3o respons\u00E1vel antes de usar a numera\u00E7\u00E3o.':'Confira o cStat e revise os dados antes de decidir uma nova tentativa.';\n } else if (resultado.estado==='ERRO' && resultado.envioIniciado===false) {\n if(typeof resultado.codigo==='string'&&Object.hasOwn(CATALOGO,resultado.codigo))return criarDiagnosticoErro(resultado.codigo,false,{etapa});\n statusEnvio='nao_enviado';codigo='FALHA_ANTES_ENVIO';mensagem='O motor informou falha antes de iniciar o envio desta opera\u00E7\u00E3o.';acao='Revise a configura\u00E7\u00E3o e os dados antes de continuar.';\n }\n const cStat=Number.isInteger(resultado.cStat)&&Number(resultado.cStat)>0&&Number(resultado.cStat)<=9999 ? resultado.cStat : undefined;\n return Object.freeze({codigo,etapa,mensagem,acao,statusEnvio,...(cStat!==undefined?{cStat}:{})});\n}\n", "export const PROTOCOL_VERSION = 1 as const;\nexport type Modelo = 55 | 65;\nexport type Ambiente = 1 | 2;\nexport type Comando = 'gerarXml' | 'validar' | 'assinar' | 'transmitir' | 'consultar' | 'cancelar' | 'cartaCorrecao' | 'inutilizar';\nexport interface Contrato { sourceRevision: number; contractHash: string }\nexport interface CertificadoA1 { pfx?: Uint8Array; arquivo?: string; senha: string }\nexport interface ConfiguracaoEmissor { cnpj: string; uf: string; modelo: Modelo; ambiente: Ambiente; certificado?: CertificadoA1; csc?: { id: string; valor: string } }\nexport interface ConfiguracaoMotor extends Omit<ConfiguracaoEmissor, 'certificado'> { certificado?: { pfxBase64: string; senha: string } }\nexport interface RequisicaoMotor extends Contrato {\n versao: 1; id: string; comando: Comando; config: ConfiguracaoMotor;\n documento?: object; xmlBase64?: string; chave?: string; recibo?: string;\n protocolo?: string; justificativa?: string; correcao?: string; sequenciaEvento?: number;\n inutilizacao?: { ano: number; serie: number; numeroInicial: number; numeroFinal: number };\n}\nexport type Estado = 'DENEGADO' | 'XML_GERADO' | 'VALIDADO' | 'ASSINADO' | 'AUTORIZADO' | 'REJEITADO' | 'PENDENTE' | 'INDETERMINADO' | 'CONSULTADO' | 'CANCELADO' | 'EVENTO_REGISTRADO' | 'INUTILIZADO' | 'ERRO';\nexport interface ResultadoFiscal extends Contrato {\n versao: 1; id: string; sucesso: boolean; estado: Estado; codigo?: string;\n cStat?: number; xMotivo?: string; chave?: string; protocolo?: string; recibo?: string;\n xmlBase64?: string; envioIniciado?: boolean;\n /** Resumo seguro para interfaces e logs; n\u00E3o cont\u00E9m XML, identidade fiscal ou xMotivo bruto. */\n diagnostico?: DiagnosticoAcbr;\n}\nexport interface RuntimeManifest extends Contrato {\n formatVersion: 1; platform: string; arch: string; executable: string; files: Record<string, string>;\n}\nexport interface OpcoesOperacao { signal?: AbortSignal }\nexport interface Consulta { chave: string; recibo?: string }\nexport interface Cancelamento { chave: string; protocolo: string; justificativa: string }\nexport interface CartaCorrecao { chave: string; correcao: string; sequenciaEvento?: number }\nexport interface Inutilizacao { ano: number; serie: number; numeroInicial: number; numeroFinal: number; justificativa: string }\nexport type StatusEnvio = 'nao_enviado' | 'rejeitado' | 'autorizado' | 'resultado_incerto';\nexport type EtapaAcbr = 'configuracao' | 'documento' | 'runtime' | 'geracao' | 'validacao' | 'assinatura' | 'transmissao' | 'consulta' | 'cancelamento' | 'carta_correcao' | 'inutilizacao' | 'operacao' | 'limpeza';\nexport interface DiagnosticoAcbr {\n readonly codigo: string; readonly etapa: EtapaAcbr; readonly campo?: string;\n readonly mensagem: string; readonly acao: string; readonly statusEnvio: StatusEnvio;\n readonly cStat?: number;\n readonly causa?: Readonly<{ codigo: string; etapa: EtapaAcbr; campo?: string }>;\n readonly limpeza?: Readonly<{codigo:'ENCERRAMENTO_MOTOR_NAO_CONFIRMADO';etapa:'limpeza';mensagem:string;acao:string}>;\n}\nexport interface DetalhesErroAcbr { etapa?: EtapaAcbr; campo?: string }\nexport class ErroAcbrNode extends Error {\n readonly name = 'ErroAcbrNode';\n #diagnostico: DiagnosticoAcbr;\n get diagnostico(): DiagnosticoAcbr { return this.#diagnostico; }\n constructor(readonly codigo: string, mensagem: string, readonly resultadoDesconhecido = false, readonly xmlBase64?: string, detalhes?: DetalhesErroAcbr) {\n super(mensagem);\n this.#diagnostico = criarDiagnosticoErro(codigo, resultadoDesconhecido, detalhes);\n // Recupera\u00E7\u00E3o permanece dispon\u00EDvel por acesso expl\u00EDcito, sem vazar XML em console/JSON.\n Object.defineProperty(this, 'xmlBase64', { value: xmlBase64, enumerable: false });\n Object.defineProperty(this, 'cause', { value: this.diagnostico.causa, enumerable: false });\n }\n /** Acrescenta apenas o aviso est\u00E1tico de limpeza, preservando o erro da opera\u00E7\u00E3o. */\n anotarFalhaLimpeza(): void { this.#diagnostico = adicionarDiagnosticoLimpeza(this.#diagnostico); }\n toJSON(): DiagnosticoAcbr { return this.diagnostico; }\n}\nimport { criarDiagnosticoErro, adicionarDiagnosticoLimpeza } from './diagnostics.js';\n", "import { spawn, type ChildProcessWithoutNullStreams, type SpawnOptionsWithoutStdio } from 'node:child_process';\nimport { readFile, stat } from 'node:fs/promises';\nimport path from 'node:path';\nimport { createRequire } from 'node:module';\nimport { createHash, randomUUID } from 'node:crypto';\nimport { TextDecoder } from 'node:util';\nimport { ErroAcbrNode, type DetalhesErroAcbr, type ConfiguracaoEmissor, type Contrato, type ConfiguracaoMotor, type RequisicaoMotor, type ResultadoFiscal, type RuntimeManifest, type OpcoesOperacao, type Consulta, type Cancelamento, type CartaCorrecao, type Inutilizacao } from './types.js';\nimport { diagnosticarResultado, etapaDaOperacao } from './diagnostics.js';\nexport * from './types.js';\nexport { diagnosticarErro, diagnosticarResultado } from './diagnostics.js';\ntype Launch = (exe: string, args: string[], config: SpawnOptionsWithoutStdio) => ChildProcessWithoutNullStreams;\nexport interface OpcoesEmissor extends ConfiguracaoEmissor {\n contrato: Contrato; runtimeDirectory?: string; timeoutMs?: number; limiteFila?: number; limiteBytes?: number;\n validaDocumento?: (documento: unknown) => void;\n /** Inje\u00E7\u00E3o para testes offline. O padr\u00E3o sempre inicia o motor distribu\u00EDdo. */\n criaProcesso?: Launch;\n}\nconst STATES = new Set(['DENEGADO','XML_GERADO','VALIDADO','ASSINADO','AUTORIZADO','REJEITADO','PENDENTE','INDETERMINADO','CONSULTADO','CANCELADO','EVENTO_REGISTRADO','INUTILIZADO','ERRO']);\nconst UFS = new Set('AC AL AP AM BA CE DF ES GO MA MT MS MG PA PB PR PE PI RJ RN RS RO RR SC SP SE TO'.split(' '));\nconst MAX_BYTES = 8 * 1024 * 1024;\nconst MAX_TEARDOWN_MS = 1000;\nconst plain = (v: unknown): v is Record<string,unknown> => v !== null && typeof v === 'object' && !Array.isArray(v);\nconst validContract = (v: unknown): v is Contrato => plain(v) && Number.isInteger(v.sourceRevision) && Number(v.sourceRevision)>0 && typeof v.contractHash==='string' && /^[a-f0-9]{64}$/.test(v.contractHash);\nconst fail = (code: string, message: string, req?: RequisicaoMotor, unknown=false, detalhes?:DetalhesErroAcbr) => new ErroAcbrNode(code,message,unknown,req?.comando==='transmitir'?req.xmlBase64:undefined,{...(req?{etapa:etapaDaOperacao(req.comando)}:{}),...detalhes});\nfunction confined(root: string, relative: string): string {\n const file=path.resolve(root,relative), part=path.relative(root,file);\n if(!relative || path.isAbsolute(relative) || part==='..' || part.startsWith('..'+path.sep)) throw fail('RUNTIME_INVALIDO','Caminho inv\u00E1lido no runtime.');\n return file;\n}\nasync function resolveRuntime(directory: string | undefined, contract: Contrato): Promise<{directory:string;executable:string}> {\n if(!validContract(contract)) throw fail('CONTRATO_INVALIDO','Contrato gerado inv\u00E1lido.');\n let root=directory;\n if(!root) {\n if(!['linux','win32'].includes(process.platform) || process.arch!=='x64') throw fail('PLATAFORMA_NAO_SUPORTADA','Esta vers\u00E3o exige Linux ou Windows x64.');\n try { const require=createRequire(typeof __filename!=='undefined'?__filename:import.meta.url); root=path.join(path.dirname(require.resolve('cosmemilton-acbr-node-'+process.platform+'-x64/package.json')),'runtime'); }\n catch { throw fail('RUNTIME_AUSENTE','Instale o pacote de runtime da plataforma ou informe runtimeDirectory.'); }\n }\n root=path.resolve(root);\n let m: RuntimeManifest;\n try { m=JSON.parse(await readFile(path.join(root,'manifest.json'),'utf8')); } catch { throw fail('RUNTIME_AUSENTE','Manifesto do runtime n\u00E3o encontrado.'); }\n if(!validContract(m) || m.formatVersion!==1 || !plain(m.files) || typeof m.executable!=='string' || m.platform!==process.platform || m.arch!==process.arch) throw fail('RUNTIME_INVALIDO','Manifesto ou plataforma do runtime inv\u00E1lidos.');\n if(m.sourceRevision!==contract.sourceRevision || m.contractHash!==contract.contractHash) throw fail('CONTRATO_DIVERGENTE','Cliente e motor foram gerados de contratos diferentes; regenere e recompile.');\n for(const [name,hash] of Object.entries(m.files)) {\n if(typeof hash!=='string'||!/^[a-f0-9]{64}$/.test(hash)) throw fail('RUNTIME_INVALIDO','Hash inv\u00E1lido no runtime.');\n const file=confined(root,name); let data:Buffer;\n try { if(!(await stat(file)).isFile()) throw Error(); data=await readFile(file); } catch { throw fail('RUNTIME_INCOMPLETO','Arquivo do runtime ausente.'); }\n if(createHash('sha256').update(data).digest('hex')!==hash) throw fail('RUNTIME_ALTERADO','O runtime n\u00E3o corresponde ao manifesto distribu\u00EDdo.');\n }\n if(!m.files[m.executable]) throw fail('RUNTIME_INVALIDO','O execut\u00E1vel n\u00E3o consta no invent\u00E1rio.');\n return {directory:root,executable:confined(root,m.executable)};\n}\ninterface Pending { req:RequisicaoMotor; bytes:Buffer; signal?:AbortSignal; resolve:(v:ResultadoFiscal)=>void; reject:(e:unknown)=>void; abort?:()=>void }\nexport function criarEmissor(options: OpcoesEmissor) {\n const configFail=(campo?:string)=>fail('CONFIGURACAO_INVALIDA','Informe campos e tipos v\u00E1lidos na configura\u00E7\u00E3o.',undefined,false,{etapa:'configuracao',campo});\n if(!plain(options))throw configFail();\n if(typeof options.cnpj!=='string'||!/^\\d{14}$/.test(options.cnpj))throw configFail('cnpj');\n if(typeof options.uf!=='string'||!UFS.has(options.uf))throw configFail('uf');\n if(![55,65].includes(options.modelo))throw configFail('modelo');\n if(![1,2].includes(options.ambiente))throw configFail('ambiente');\n if(!validContract(options.contrato)) throw fail('CONTRATO_INVALIDO','Contrato gerado inv\u00E1lido.');\n const cert=options.certificado;\n if(cert!==undefined && (!plain(cert)||typeof cert.senha!=='string'||!!cert.pfx===!!cert.arquivo||cert.pfx!==undefined&&!(cert.pfx instanceof Uint8Array)||cert.arquivo!==undefined&&(typeof cert.arquivo!=='string'||!cert.arquivo))) throw fail('CERTIFICADO_INVALIDO','Informe A1 em pfx ou arquivo e sua senha.',undefined,false,{campo:'certificado'});\n if(options.csc!==undefined && (!plain(options.csc)||typeof options.csc.id!=='string'||!/^\\d{1,6}$/.test(options.csc.id)||typeof options.csc.valor!=='string'||!options.csc.valor||options.csc.valor.length>256)) throw fail('CSC_INVALIDO','CSC inv\u00E1lido.',undefined,false,{campo:'csc'});\n if(options.runtimeDirectory!==undefined&&(typeof options.runtimeDirectory!=='string'||!options.runtimeDirectory))throw configFail('runtimeDirectory');\n if(options.validaDocumento!==undefined&&typeof options.validaDocumento!=='function'||options.criaProcesso!==undefined&&typeof options.criaProcesso!=='function')throw configFail();\n const cfg:Omit<ConfiguracaoEmissor, 'certificado'>={cnpj:options.cnpj,uf:options.uf,modelo:options.modelo,ambiente:options.ambiente,csc:options.csc?{...options.csc}:undefined};\n const certificate=cert?{...cert,pfx:cert.pfx?Buffer.from(cert.pfx):undefined}:undefined;\n const contract={...options.contrato};\n const timeout=options.timeoutMs??120_000, capacity=options.limiteFila??32, bytesLimit=options.limiteBytes??MAX_BYTES;\n if(!Number.isInteger(timeout)||timeout<1||timeout>120000)throw configFail('timeoutMs');\n if(!Number.isInteger(capacity)||capacity<0||capacity>1000)throw configFail('limiteFila');\n if(!Number.isInteger(bytesLimit)||bytesLimit<256||bytesLimit>MAX_BYTES)throw configFail('limiteBytes');\n const launch:Launch=options.criaProcesso??((exe,args,config)=>spawn(exe,args,{...config,stdio:['pipe','pipe','pipe']}));\n let runtimePromise:ReturnType<typeof resolveRuntime>|undefined, closed=false, teardownFailed=false, current:{stop:()=>void;done:Promise<void>}|undefined;\n const queue:Pending[]=[];\n const closedError=()=>{const error=fail('EMISSOR_FECHADO','Emissor encerrado.');if(teardownFailed)error.anotarFalhaLimpeza();return error;};\n const rejectQueue=()=>{for(const item of queue.splice(0)){item.signal?.removeEventListener('abort',item.abort!);item.bytes.fill(0);item.reject(closedError());}};\n async function execute(item:Pending):Promise<ResultadoFiscal> {\n if(closed||item.signal?.aborted) throw fail('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada antes da execu\u00E7\u00E3o.');\n const runtime=await (runtimePromise??=resolveRuntime(options.runtimeDirectory,contract));\n if(closed||item.signal?.aborted) throw fail('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada antes da execu\u00E7\u00E3o.');\n return await new Promise<ResultadoFiscal>((done,rejectExecution)=>{\n let stopError:ErroAcbrNode|undefined; let child:ChildProcessWithoutNullStreams|undefined, finished=false, started=false, sending=false, total=0, rest=Buffer.alloc(0), result:ResultadoFiscal|undefined;\n let teardownTimer:ReturnType<typeof setTimeout>|undefined;\n let finishCurrent!:()=>void; const doneCurrent=new Promise<void>(r=>{finishCurrent=r;});\n const uncertain=()=>['transmitir','cancelar','cartaCorrecao','inutilizar'].includes(item.req.comando)&&started || sending;\n const finish=(error?:unknown)=>{\n if(finished)return; finished=true;clearTimeout(timer);clearTimeout(teardownTimer);item.signal?.removeEventListener('abort',abort);\n item.bytes.fill(0);if(current?.done===doneCurrent)current=undefined;finishCurrent();error?rejectExecution(error):done(result!);\n };\n const detachOwnedChild=()=>{\n // Somente os handles retornados por este launch; nunca enumera ou encerra processos alheios.\n for(const pipe of [child?.stdin,child?.stdout,child?.stderr]){\n try{pipe?.destroy();}catch{}\n try{(pipe as {unref?:()=>void}|undefined)?.unref?.();}catch{}\n }\n try{child?.unref();}catch{}\n };\n const teardownFallback=()=>{\n if(finished)return;\n stopError??=fail('FALHA_MOTOR','O motor n\u00E3o foi encerrado.',item.req,uncertain());\n stopError.anotarFalhaLimpeza();teardownFailed=true;closed=true;\n rejectQueue();certificate?.pfx?.fill(0);\n // Finaliza antes de destroy/unref: esses m\u00E9todos podem disparar eventos s\u00EDncronos.\n finish(stopError);detachOwnedChild();\n };\n const stop=(code:string,message:string)=>{\n if(finished||stopError)return;\n stopError=fail(code,message,item.req,uncertain());\n if(!child?.pid){finish(stopError);detachOwnedChild();return;}\n teardownTimer=setTimeout(teardownFallback,MAX_TEARDOWN_MS);\n try{if(child.kill('SIGKILL')!==true)teardownFallback();}catch{teardownFallback();}\n };\n const abort=()=>stop('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada; confira a situa\u00E7\u00E3o fiscal quando o envio foi iniciado.');\n const timer=setTimeout(()=>stop('TIMEOUT_MOTOR','O motor excedeu o prazo; consulte a situa\u00E7\u00E3o antes de transmitir novamente.'),timeout);\n current={stop:()=>stop('EMISSOR_FECHADO','Emissor encerrado.'),done:doneCurrent};\n const env:NodeJS.ProcessEnv={};\n for(const key of ['PATH','Path','SystemRoot','WINDIR','TEMP','TMP','HOME','LANG','LC_ALL']) if(process.env[key]!==undefined)env[key]=process.env[key];\n if(process.platform==='linux')env.LD_LIBRARY_PATH=path.join(runtime.directory,'lib');\n if(process.platform==='win32'){const inheritedPath=env.Path??env.PATH??'';delete env.Path;env.PATH=path.join(runtime.directory,'lib')+';'+runtime.directory+';'+inheritedPath;}\n const modules=path.join(runtime.directory,'ossl-modules'); env.OPENSSL_MODULES=modules; env.OPENSSL_CONF=path.join(runtime.directory,'openssl.cnf');\n try { child=launch(runtime.executable,['--parent-pid',String(process.pid)],{cwd:runtime.directory,env,windowsHide:true,shell:false,stdio:['pipe','pipe','pipe']}); started=typeof child.pid==='number'; }\n catch { finish(fail('FALHA_INICIAR_MOTOR','N\u00E3o foi poss\u00EDvel iniciar o motor.',item.req)); return; }\n item.signal?.addEventListener('abort',abort,{once:true});\n child.on('spawn',()=>{started=true;});\n child.on('error',()=>{if(finished)return;if(stopError){teardownFallback();return;}stop('FALHA_INICIAR_MOTOR','N\u00E3o foi poss\u00EDvel iniciar o motor.');});\n child.stdin.on('error',()=>stop('FALHA_PIPE','N\u00E3o foi poss\u00EDvel comunicar com o motor.'));\n child.stdout.on('error',()=>stop('FALHA_PIPE','N\u00E3o foi poss\u00EDvel comunicar com o motor.'));\n child.stderr.on('error',()=>stop('FALHA_PIPE','N\u00E3o foi poss\u00EDvel comunicar com o motor.'));\n child.stderr.on('data',()=>{}); // stderr bruto nunca \u00E9 exposto: pode conter mensagens de depend\u00EAncias.\n child.stdout.on('data',(chunk:Buffer)=>{\n if(finished||stopError)return;total+=chunk.length;if(total>bytesLimit){stop('RESPOSTA_EXCESSIVA','Resposta do motor excede o limite.');return;}\n rest=Buffer.concat([rest,chunk]);let end:number;\n while((end=rest.indexOf(10))>=0) {\n const line=rest.subarray(0,end);rest=rest.subarray(end+1);if(!line.length)continue;\n try {\n const frame=JSON.parse(new TextDecoder('utf-8',{fatal:true}).decode(line));\n if(!plain(frame)||frame.id!==item.req.id)throw Error();\n if(frame.tipo==='envioIniciado'){sending=true;continue;}\n if(result||frame.versao!==1||frame.sourceRevision!==contract.sourceRevision||frame.contractHash!==contract.contractHash||typeof frame.sucesso!=='boolean'||!STATES.has(String(frame.estado)))throw Error();\n if(frame.xmlBase64!==undefined&&(typeof frame.xmlBase64!=='string'||!frame.xmlBase64.length||Buffer.from(frame.xmlBase64,'base64').toString('base64')!==frame.xmlBase64))throw Error();\n if(frame.cStat!==undefined&&(!Number.isInteger(frame.cStat)||Number(frame.cStat)<1||Number(frame.cStat)>9999))throw Error();\n if(frame.envioIniciado!==undefined&&typeof frame.envioIniciado!=='boolean'||sending&&frame.envioIniciado===false)throw Error();\n const fiscal=frame as unknown as ResultadoFiscal;\n result={...fiscal,diagnostico:diagnosticarResultado(sending?{...fiscal,envioIniciado:true}:fiscal,item.req.comando)};\n }catch{stop('RESPOSTA_INVALIDA','O motor retornou uma resposta inv\u00E1lida.');return;}\n }\n });\n child.on('close',(code)=>{\n if(finished)return;\n if(stopError){finish(stopError);return;}\n if(code!==0||rest.length||!result){finish(fail('FALHA_MOTOR','O motor encerrou sem resposta fiscal v\u00E1lida.',item.req,uncertain()));return;}\n finish();\n });\n child.stdin.end(item.bytes);\n if(item.signal?.aborted)abort();\n });\n }\n let busy=false;\n async function next(){if(busy)return;const item=queue.shift();if(!item)return;busy=true;item.signal?.removeEventListener('abort',item.abort!);try{const result=await execute(item);item.resolve(result);}catch(e){item.bytes.fill(0);item.reject(e);}finally{busy=false;void next();}}\n async function request(command:RequisicaoMotor['comando'],data:Partial<RequisicaoMotor>,operation:OpcoesOperacao={}):Promise<ResultadoFiscal> {\n const rawOperation:unknown=operation;\n if(!plain(rawOperation))throw fail('OPERACAO_INVALIDA','Informe op\u00E7\u00F5es v\u00E1lidas para a opera\u00E7\u00E3o.',undefined,false,{etapa:etapaDaOperacao(command),campo:'operacao'});\n const signal:unknown=operation.signal;\n if(signal!==undefined&&(!plain(signal)||typeof signal.aborted!=='boolean'||typeof signal.addEventListener!=='function'||typeof signal.removeEventListener!=='function'))throw fail('OPERACAO_INVALIDA','Informe op\u00E7\u00F5es v\u00E1lidas para a opera\u00E7\u00E3o.',undefined,false,{etapa:etapaDaOperacao(command),campo:'signal'});\n if(closed)throw closedError();\n if(operation.signal?.aborted)throw fail('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada antes da execu\u00E7\u00E3o.');\n if(['assinar','transmitir','consultar','cancelar','cartaCorrecao','inutilizar'].includes(command)&&!certificate)throw fail('CERTIFICADO_AUSENTE','A opera\u00E7\u00E3o exige um certificado A1.');\n if(command==='gerarXml')options.validaDocumento?.(data.documento);\n const config:ConfiguracaoMotor={...cfg};\n if(certificate){let pfx:Buffer;try{pfx=certificate.pfx??await readFile(certificate.arquivo!);}catch{throw fail('CERTIFICADO_AUSENTE','N\u00E3o foi poss\u00EDvel ler o A1 configurado.');}if(pfx.length>2*1024*1024)throw fail('CERTIFICADO_EXCESSIVO','Certificado excede o limite.');config.certificado={pfxBase64:pfx.toString('base64'),senha:certificate.senha};}\n let bytes:Buffer, req:RequisicaoMotor;\n try{bytes=Buffer.from(JSON.stringify({versao:1,id:randomUUID(),...contract,comando:command,config,...data})+'\\n','utf8');if(bytes.length>bytesLimit)throw Error();req=JSON.parse(bytes.toString('utf8'));}catch{throw fail('REQUISICAO_INVALIDA','Dados da opera\u00E7\u00E3o inv\u00E1lidos ou acima do limite.');}\n return new Promise((resolve,reject)=>{\n if(closed){bytes.fill(0);reject(closedError());return;}\n if(busy&&queue.length>=capacity){bytes.fill(0);reject(fail('FILA_CHEIA','A fila fiscal est\u00E1 cheia.'));return;}\n const item:Pending={req,bytes,signal:operation.signal,resolve,reject};\n item.abort=()=>{const i=queue.indexOf(item);if(i>=0){queue.splice(i,1);bytes.fill(0);operation.signal?.removeEventListener('abort',item.abort!);reject(fail('OPERACAO_CANCELADA','Opera\u00E7\u00E3o cancelada antes da execu\u00E7\u00E3o.'));}};\n operation.signal?.addEventListener('abort',item.abort,{once:true});queue.push(item);if(operation.signal?.aborted)item.abort();void next();\n });\n }\n const xmlData=(xml:string)=>{if(typeof xml!=='string'||!xml.trim()||Buffer.byteLength(xml,'utf8')>2*1024*1024)throw fail('XML_INVALIDO','XML vazio ou acima do limite.',undefined,false,{campo:'xml'});return {xmlBase64:Buffer.from(xml,'utf8').toString('base64')};};\n const checkKey=(key:string)=>{if(typeof key!=='string'||!/^\\d{44}$/.test(key))throw fail('CHAVE_INVALIDA','Chave fiscal inv\u00E1lida.',undefined,false,{campo:'chave'});};\n const reason=(value:string)=>{if(typeof value!=='string'||value.length<15||value.length>255)throw fail('JUSTIFICATIVA_INVALIDA','Justificativa deve ter de 15 a 255 caracteres.',undefined,false,{campo:'justificativa'});};\n const checkObject=(data:unknown,campo:string)=>{if(!plain(data))throw fail('OPERACAO_INVALIDA','Informe os par\u00E2metros da opera\u00E7\u00E3o como objeto.',undefined,false,{campo});};\n return {\n gerarXml:(documento:object,op?:OpcoesOperacao)=>request('gerarXml',{documento},op),\n validar:(xml:string,op?:OpcoesOperacao)=>request('validar',xmlData(xml),op),\n assinar:(xml:string,op?:OpcoesOperacao)=>request('assinar',xmlData(xml),op),\n transmitir:(xml:string,op?:OpcoesOperacao)=>request('transmitir',xmlData(xml),op),\n consultar:(consulta:Consulta,op?:OpcoesOperacao)=>{checkObject(consulta,'consulta');checkKey(consulta.chave);if(consulta.recibo!==undefined&&(typeof consulta.recibo!=='string'||!/^\\d{15}$/.test(consulta.recibo)))throw fail('RECIBO_INVALIDO','Recibo inv\u00E1lido.',undefined,false,{campo:'recibo'});return request('consultar',consulta,op);},\n cancelar:(data:Cancelamento,op?:OpcoesOperacao)=>{checkObject(data,'cancelamento');checkKey(data.chave);reason(data.justificativa);if(typeof data.protocolo!=='string'||!/^\\d{15}$/.test(data.protocolo))throw fail('PROTOCOLO_INVALIDO','Protocolo inv\u00E1lido.',undefined,false,{campo:'protocolo'});return request('cancelar',data,op);},\n cartaCorrecao:(data:CartaCorrecao,op?:OpcoesOperacao)=>{checkObject(data,'cartaCorrecao');if(cfg.modelo!==55)throw fail('OPERACAO_NAO_SUPORTADA','Carta de corre\u00E7\u00E3o exige NF-e modelo 55.');checkKey(data.chave);if(typeof data.correcao!=='string'||data.correcao.length<15||data.correcao.length>1000||!Number.isInteger(data.sequenciaEvento??1)||(data.sequenciaEvento??1)<1||(data.sequenciaEvento??1)>20)throw fail('CORRECAO_INVALIDA','Dados da carta de corre\u00E7\u00E3o inv\u00E1lidos.',undefined,false,{campo:'cartaCorrecao'});return request('cartaCorrecao',{...data,sequenciaEvento:data.sequenciaEvento??1},op);},\n inutilizar:(data:Inutilizacao,op?:OpcoesOperacao)=>{checkObject(data,'inutilizacao');reason(data.justificativa);if(!Number.isInteger(data.ano)||data.ano<0||data.ano>99||!Number.isInteger(data.serie)||data.serie<0||data.serie>999||!Number.isInteger(data.numeroInicial)||data.numeroInicial<1||!Number.isInteger(data.numeroFinal)||data.numeroFinal<data.numeroInicial||data.numeroFinal>999999999)throw fail('INUTILIZACAO_INVALIDA','Faixa de inutiliza\u00E7\u00E3o inv\u00E1lida.',undefined,false,{campo:'inutilizacao'});return request('inutilizar',{inutilizacao:{ano:data.ano,serie:data.serie,numeroInicial:data.numeroInicial,numeroFinal:data.numeroFinal},justificativa:data.justificativa},op);},\n async fechar(){if(!closed){closed=true;rejectQueue();}const running=current;try{running?.stop();if(running)await running.done;}finally{certificate?.pfx?.fill(0);}}\n };\n}\nexport type Emissor = ReturnType<typeof criarEmissor>;\n", "// Synthetic signed XML, public X509 certificate only. Never transmit this document.\n// Contains no PFX, private key or password. Generated offline by the test certificate fixture.\nexport const OFFLINE_DOCUMENT = {\n \"infNFe\": {\n \"Versao\": \"4.00\"\n },\n \"Ide\": {\n \"cUF\": 23,\n \"cNF\": 12345678,\n \"natOp\": \"VENDA TESTE OFFLINE\",\n \"modelo\": 55,\n \"serie\": 1,\n \"nNF\": 1,\n \"dEmi\": \"2026-10-08T12:00:00\",\n \"tpNF\": \"tnSaida\",\n \"idDest\": \"doInterna\",\n \"cMunFG\": 2304400,\n \"tpImp\": \"tiRetrato\",\n \"tpEmis\": \"teNormal\",\n \"tpAmb\": \"taHomologacao\",\n \"finNFe\": \"fnNormal\",\n \"indFinal\": \"cfConsumidorFinal\",\n \"indPres\": \"pcPresencial\",\n \"procEmi\": \"peAplicativoContribuinte\",\n \"verProc\": \"ACBR-NODE-OFFLINE\"\n },\n \"Emit\": {\n \"CNPJCPF\": \"11222333000181\",\n \"xNome\": \"Caf\u00E9 S\u00E3o Jos\u00E9 TESTE OFFLINE SEM VALOR FISCAL\",\n \"IE\": \"123456789\",\n \"CRT\": \"crtSimplesNacional\",\n \"EnderEmit\": {\n \"xLgr\": \"RUA TESTE\",\n \"nro\": \"1\",\n \"xBairro\": \"TESTE\",\n \"cMun\": 2304400,\n \"xMun\": \"FORTALEZA\",\n \"UF\": \"CE\",\n \"CEP\": 60000000,\n \"cPais\": 1058,\n \"xPais\": \"BRASIL\"\n }\n },\n \"Dest\": {\n \"CNPJCPF\": \"12345678909\",\n \"xNome\": \"NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL\",\n \"indIEDest\": \"inNaoContribuinte\",\n \"EnderDest\": {\n \"xLgr\": \"RUA TESTE\",\n \"nro\": \"2\",\n \"xBairro\": \"TESTE\",\n \"cMun\": 2304400,\n \"xMun\": \"FORTALEZA\",\n \"UF\": \"CE\",\n \"CEP\": 60000000,\n \"cPais\": 1058,\n \"xPais\": \"BRASIL\"\n }\n },\n \"Det\": [\n {\n \"Prod\": {\n \"nItem\": 1,\n \"cProd\": \"TESTE\",\n \"cEAN\": \"SEM GTIN\",\n \"xProd\": \"Caf\u00E9 S\u00E3o Jos\u00E9 PRODUTO SINT\u00C9TICO OFFLINE\",\n \"NCM\": \"22021000\",\n \"CFOP\": \"5102\",\n \"uCom\": \"UN\",\n \"qCom\": \"1\",\n \"vUnCom\": \"10\",\n \"vProd\": \"10\",\n \"cEANTrib\": \"SEM GTIN\",\n \"uTrib\": \"UN\",\n \"qTrib\": \"1\",\n \"vUnTrib\": \"10\",\n \"IndTot\": \"itSomaTotalNFe\"\n },\n \"Imposto\": {\n \"ICMS\": {\n \"orig\": \"oeNacional\",\n \"CSOSN\": \"csosn102\"\n },\n \"PIS\": {\n \"CST\": \"pis07\"\n },\n \"COFINS\": {\n \"CST\": \"cof07\"\n }\n }\n }\n ],\n \"Total\": {\n \"ICMSTot\": {\n \"vProd\": \"10\",\n \"vNF\": \"10\"\n }\n },\n \"Transp\": {\n \"modFrete\": \"mfSemFrete\"\n },\n \"pag\": [\n {\n \"tPag\": \"fpDinheiro\",\n \"indPag\": \"ipVista\",\n \"vPag\": \"10\"\n }\n ]\n} as const;\nexport const OFFLINE_SIGNED_XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><NFe xmlns=\\\"http://www.portalfiscal.inf.br/nfe\\\"><infNFe Id=\\\"NFe23261011222333000181550010000000011123456780\\\" versao=\\\"4.00\\\"><ide><cUF>23</cUF><cNF>12345678</cNF><natOp>VENDA TESTE OFFLINE</natOp><mod>55</mod><serie>1</serie><nNF>1</nNF><dhEmi>2026-10-08T12:00:00-03:00</dhEmi><tpNF>1</tpNF><idDest>1</idDest><cMunFG>2304400</cMunFG><tpImp>1</tpImp><tpEmis>1</tpEmis><cDV>0</cDV><tpAmb>2</tpAmb><finNFe>1</finNFe><indFinal>1</indFinal><indPres>1</indPres><procEmi>0</procEmi><verProc>ACBR-NODE-OFFLINE</verProc></ide><emit><CNPJ>11222333000181</CNPJ><xNome>Caf\u00E9 S\u00E3o Jos\u00E9 TESTE OFFLINE SEM VALOR FISCAL</xNome><enderEmit><xLgr>RUA TESTE</xLgr><nro>1</nro><xBairro>TESTE</xBairro><cMun>2304400</cMun><xMun>FORTALEZA</xMun><UF>CE</UF><CEP>60000000</CEP><cPais>1058</cPais><xPais>BRASIL</xPais></enderEmit><IE>123456789</IE><CRT>1</CRT></emit><dest><CPF>12345678909</CPF><xNome>NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL</xNome><enderDest><xLgr>RUA TESTE</xLgr><nro>2</nro><xBairro>TESTE</xBairro><cMun>2304400</cMun><xMun>FORTALEZA</xMun><UF>CE</UF><CEP>60000000</CEP><cPais>1058</cPais><xPais>BRASIL</xPais></enderDest><indIEDest>9</indIEDest></dest><det nItem=\\\"1\\\"><prod><cProd>TESTE</cProd><cEAN>SEM GTIN</cEAN><xProd>Caf\u00E9 S\u00E3o Jos\u00E9 PRODUTO SINT\u00C9TICO OFFLINE</xProd><NCM>22021000</NCM><CFOP>5102</CFOP><uCom>UN</uCom><qCom>1.0000</qCom><vUnCom>10.0000000000</vUnCom><vProd>10.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UN</uTrib><qTrib>1.0000</qTrib><vUnTrib>10.0000000000</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISNT><CST>07</CST></PISNT></PIS><COFINS><COFINSNT><CST>07</CST></COFINSNT></COFINS></imposto></det><total><ICMSTot><vBC>0.00</vBC><vICMS>0.00</vICMS><vICMSDeson>0.00</vICMSDeson><vFCP>0.00</vFCP><vBCST>0.00</vBCST><vST>0.00</vST><vFCPST>0.00</vFCPST><vFCPSTRet>0.00</vFCPSTRet><vProd>10.00</vProd><vFrete>0.00</vFrete><vSeg>0.00</vSeg><vDesc>0.00</vDesc><vII>0.00</vII><vIPI>0.00</vIPI><vIPIDevol>0.00</vIPIDevol><vPIS>0.00</vPIS><vCOFINS>0.00</vCOFINS><vOutro>0.00</vOutro><vNF>10.00</vNF></ICMSTot></total><transp><modFrete>9</modFrete></transp><pag><detPag><indPag>0</indPag><tPag>01</tPag><vPag>10.00</vPag></detPag></pag></infNFe><Signature xmlns=\\\"http://www.w3.org/2000/09/xmldsig#\\\"><SignedInfo><CanonicalizationMethod Algorithm=\\\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\\\"></CanonicalizationMethod><SignatureMethod Algorithm=\\\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\\\"></SignatureMethod><Reference URI=\\\"#NFe23261011222333000181550010000000011123456780\\\"><Transforms><Transform Algorithm=\\\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\\\"></Transform><Transform Algorithm=\\\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\\\"></Transform></Transforms><DigestMethod Algorithm=\\\"http://www.w3.org/2000/09/xmldsig#sha1\\\"></DigestMethod><DigestValue>Ya5kXhcEibOVfcyOI0BzqcYzyMM=</DigestValue></Reference></SignedInfo><SignatureValue>mirdDvdV+VId/zsstW/6lVFsSVxdyWkdkY1NPd2ynLHpjtolFoIhaBGlfxxs7IhU/AzcNQmR6ivr9YkH1HXaMAypvvx9M6GR/T4du/Zqab4gx3YInVybjJTeQ7BKEDnLhde2TUKoXrxmfrrmBUw6K4nTNufVjUjFJBfGcwhJ57T72x7ssdoYuPvZCphb0IR8WxHRKhvKAQhjW61qfh33csTabelgVZSLuTC2I2k9+a+ARd88CLTlfhYNCAPItOdUnAjgrhAhtiDi2FjXKjywgRqx0zay8DxF9Y2iyTJd3IAoWOERGdI9whgsuzWiZUr2I0I5QGGBELVabfjXm/Bneg==</SignatureValue><KeyInfo><X509Data><X509Certificate>MIIDhjCCAm6gAwIBAgIBATANBgkqhkiG9w0BAQsFADBbMSswKQYDVQQDEyJBQ0JSIE5PREUgU1lOVEhFVElDOjExMjIyMzMzMDAwMTgxMQswCQYDVQQGEwJCUjEfMB0GA1UEChMWU1lOVEhFVElDIE9GRkxJTkUgVEVTVDAeFw0yNjEwMDYyMjIzMzNaFw0yNzEwMDgyMjIzMzNaMFsxKzApBgNVBAMTIkFDQlIgTk9ERSBTWU5USEVUSUM6MTEyMjIzMzMwMDAxODExCzAJBgNVBAYTAkJSMR8wHQYDVQQKExZTWU5USEVUSUMgT0ZGTElORSBURVNUMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsOwRzuW4de7jrv1IkcNgT311292NR5NNIHt6Fncarm2iJX6mYsIjPWriFQmrU88p7bfRI3EsXJrlK0oGCuMafbNf1nBZ6Tu8aV1ixbAIgu9ZIbWoDqDNbYJBucQRuKsI1ytFbY7eI0juhcdAlBHw3TNdgSbuv/8kEGgTTJ803wBcC+emGZHdpb4Bwx6Db0Fio0lWLlBaep9+MFNZZiEYmDA3dwgZF14MAr5MpzcNDUVYh/g95Ks8x+mhErOPdtmL1A6cDg+xtjiApeMJZqjMrdsXP4yQ34h5VRy03ZUJkXVAquOfWhXpQL/qjoSzXfHvij2wB0pVn89FzVZh7GzStQIDAQABo1UwUzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DATBgNVHSUEDDAKBggrBgEFBQcDAjAkBgNVHREEHTAboBkGBWBMAQMDoBAMDjExMjIyMzMzMDAwMTgxMA0GCSqGSIb3DQEBCwUAA4IBAQBDhbpxphiuAUlQWXkcVt22Nc+g2UM6GCZyC3v9o21llLSCyK/nhkrRCQzM75/86kbnYZ1zdulC9N4XQFgATwm16Sf/nDZw8s5EsXqZ8mwbauDs/aQvWrbQnyawB7c+aXvlUDkcfNq+3hLQ5ep8/bmGh4eueiNoPD0fjf/jUVmrS6KyHb6/FyIZGP6fEYAO6XrqJPMSPxpJHnbPXZXKW2vcCh3qaG1vTSeN8PLfN2Q/mp1XUH8VqHgl3jzssx/zwb1NKuKEz9WL+6ilLc1ZfIqUakJyQNMqMz2KIjqGKGp7TtpNHZ7mz+kBX4Xw7D5fFVrXYb7DN6KylyKLmXoEzs1B</X509Certificate></X509Data></KeyInfo></Signature></NFe>\";\n", "import type { AcbrConfig } from './config.js';\nimport { runtimeDirectory, type BuiltRuntimeManifest } from './native-build.js';\nimport { criarEmissor, type ResultadoFiscal } from './runtime.js';\nimport { OFFLINE_DOCUMENT, OFFLINE_SIGNED_XML } from './offline-fixture.js';\nexport interface OfflineCheck { name: string; estado: string; codigo?: string; envioIniciado: false; }\n/** Local synthetic probes only: no certificate credentials, connection or fiscal transmission. */\nexport async function checkOffline(config: AcbrConfig, manifest: BuiltRuntimeManifest): Promise<OfflineCheck[]> {\n const emitter = criarEmissor({ cnpj: '11222333000181', uf: 'CE', modelo: 55, ambiente: 2,\n contrato: { sourceRevision: manifest.sourceRevision, contractHash: manifest.contractHash },\n runtimeDirectory: runtimeDirectory(config), timeoutMs: 30_000 });\n const report: OfflineCheck[] = [];\n function expect(name: string, result: ResultadoFiscal, estado: string, codigo?: string): void {\n if (result.estado !== estado || result.sucesso !== (estado !== 'ERRO') || result.envioIniciado !== false ||\n result.sourceRevision !== manifest.sourceRevision || (codigo !== undefined && result.codigo !== codigo)) {\n throw new Error(`Smoke offline ${name} falhou: ${result.estado}/${result.codigo ?? 'sem c\u00F3digo'}.`);\n }\n report.push({ name, estado: result.estado, codigo: result.codigo, envioIniciado: false });\n }\n try {\n const generated = await emitter.gerarXml(OFFLINE_DOCUMENT);\n expect('gerarXml sint\u00E9tico', generated, 'XML_GERADO');\n const xml = generated.xmlBase64 ? Buffer.from(generated.xmlBase64, 'base64').toString('utf8') : '';\n const generatedKey = /Id=\"NFe(\\d{44})\"/.exec(xml)?.[1];\n if (!generatedKey || !xml.includes('Caf\u00E9 S\u00E3o Jos\u00E9 TESTE OFFLINE') || !xml.includes('<CNPJ>11222333000181</CNPJ>')) throw new Error('Smoke offline gerarXml perdeu chave, identidade ou UTF-8.');\n const validated = await emitter.validar(OFFLINE_SIGNED_XML);\n expect('validar XML assinado p\u00FAblico', validated, 'VALIDADO');\n const signedKey = /Id=\"NFe(\\d{44})\"/.exec(OFFLINE_SIGNED_XML)?.[1];\n if (validated.chave !== signedKey || generatedKey !== signedKey) throw new Error('Smoke offline validar retornou outra chave fiscal.');\n expect('recusar XML malformado', await emitter.validar('<NFe><infNFe></NFe>'), 'ERRO', 'OPERACAO_FISCAL_FALHOU');\n expect('recusar DTD/entidade externa', await emitter.validar('<!DOCTYPE NFe [<!ENTITY probe SYSTEM \"file:///acbr-node-offline-check-does-not-exist\">]><NFe>&probe;</NFe>'), 'ERRO', 'XML_INVALIDO');\n return report;\n } finally { await emitter.fechar(); }\n}\n", "#!/usr/bin/env node\r\nimport { realpathSync } from 'node:fs';\r\nimport { access } from 'node:fs/promises';\r\nimport { resolve } from 'node:path';\r\nimport { fileURLToPath } from 'node:url';\r\nimport { describeInstalledField, formatFieldDescription, FieldHelpError } from './contract-help.js';\r\n\r\nexport const HELP = `acbr-node \u2014 compila\u00E7\u00E3o e contrato Node/ACBr NF-e\r\n\r\nUso:\r\n acbr-node help TAG Ide.tpNF [--json]\r\n acbr-node help TAG 'Det[].Imposto.PIS.CST' [--json]\r\n acbr-node init [--config caminho] [--revision HEAD|n\u00FAmero]\r\n acbr-node source update [--config caminho] [--revision HEAD|n\u00FAmero]\r\n acbr-node source lock --revision n\u00FAmero [--config caminho]\r\n acbr-node generate [--config caminho]\r\n acbr-node build [--config caminho]\r\n acbr-node check [--config caminho]\r\n acbr-node doctor [--config caminho]\r\n\r\nsource update consulta o SVN oficial e substitui apenas fontes verificadas pelo lock.\r\nsource lock registra um export existente cuja origem/revis\u00E3o o operador j\u00E1 conferiu.\r\ngenerate/build/check nunca atualizam fontes. Nenhum comando transmite NF-e.\r\nhelp TAG consulta somente o contrato da vers\u00E3o instalada, offline e sem runtime ou certificado.\r\n`;\r\nexport interface CliIO { stdout: { write(text: string): unknown }; stderr: { write(text: string): unknown }; }\r\nfunction revision(value: string | undefined): 'HEAD' | number | undefined {\r\n if (value === undefined) return undefined;\r\n if (value === 'HEAD') return value;\r\n if (!/^[1-9]\\d*$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error('--revision deve ser HEAD ou um n\u00FAmero SVN positivo.');\r\n return Number(value);\r\n}\r\ninterface Args { command: string[]; config: string; revision?: 'HEAD' | number; json: boolean; help: boolean; }\r\nexport function parseArguments(args: string[]): Args {\r\n const result: Args = { command: [], config: 'acbr.config.json', json: false, help: false };\r\n const used = new Set<string>();\r\n for (let i = 0; i < args.length; i++) {\r\n const arg = args[i]!;\r\n if (!arg.startsWith('-')) { result.command.push(arg); continue; }\r\n if (used.has(arg)) throw new Error(`Op\u00E7\u00E3o repetida: ${arg}.`);\r\n used.add(arg);\r\n if (arg === '--help' || arg === '-h') result.help = true;\r\n else if (arg === '--json') result.json = true;\r\n else if (arg === '--config' || arg === '--revision') {\r\n const value = args[++i];\r\n if (value === undefined || value.startsWith('--')) throw new Error(`Valor obrigat\u00F3rio para ${arg}.`);\r\n if (arg === '--config') result.config = value;\r\n else result.revision = revision(value);\r\n } else throw new Error(`Op\u00E7\u00E3o desconhecida: ${arg}.`);\r\n }\r\n return result;\r\n}\r\nexport async function main(args = process.argv.slice(2), io: CliIO = process, dependencies: { contractRoot?: string } = {}): Promise<number> {\r\n const initialCommand = args.filter(arg => !['--json', '--help', '-h'].includes(arg));\r\n let jsonTag = args.includes('--json') && initialCommand[0]?.toLowerCase() === 'help' && initialCommand[1]?.toLowerCase() === 'tag';\r\n try {\r\n let options: Args;\r\n try { options = parseArguments(args); } catch (error) {\r\n if (jsonTag) throw new FieldHelpError('USO_INVALIDO', 'Argumentos inv\u00E1lidos. Use acbr-node help TAG caminho [--json].');\r\n throw error;\r\n }\r\n const command = options.command.join(' ');\r\n if (options.help || !command) { io.stdout.write(HELP); return 0; }\r\n const output = (value: unknown, text: string) => io.stdout.write(options.json ? `${JSON.stringify(value, null, 2)}\\n` : `${text}\\n`);\r\n if (options.command[0]?.toLowerCase() === 'help' && options.command[1]?.toLowerCase() === 'tag') {\r\n jsonTag = options.json;\r\n if (options.command.length !== 3) throw new FieldHelpError('USO_INVALIDO', 'Use acbr-node help TAG caminho [--json].');\r\n if (options.revision !== undefined || args.includes('--config')) throw new FieldHelpError('USO_INVALIDO', 'help TAG usa o contrato instalado e n\u00E3o aceita --config ou --revision.');\r\n const description = await describeInstalledField(options.command[2]!, dependencies.contractRoot ?? fileURLToPath(new URL('../', import.meta.url)));\r\n output(description, formatFieldDescription(description)); return 0;\r\n }\r\n if (command === 'init') {\r\n const { initializeConfig } = await import('./config.js');\r\n const config = await initializeConfig(options.config, options.revision, fileURLToPath(new URL('../', import.meta.url)));\r\n output({ configPath: config.configPath }, `Configura\u00E7\u00E3o criada: ${config.configPath}\\nPr\u00F3ximo passo: acbr-node source update.`);\r\n return 0;\r\n }\r\n if (!['source update', 'source lock', 'generate', 'build', 'check', 'doctor'].includes(command)) throw new Error(`Comando desconhecido: ${command}. Use --help.`);\r\n if (options.revision !== undefined && !command.startsWith('source ')) throw new Error('--revision \u00E9 aceito somente em init e source.');\r\n if (command === 'doctor') {\r\n const { loadConfig } = await import('./config.js');\r\n const { doctor } = await import('./native-build.js');\r\n let config;\r\n try { await access(resolve(options.config)); config = await loadConfig(options.config); } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error; }\r\n const report = await doctor(config);\r\n output(report, report.map(item => `${item.ok ? 'OK' : 'FALHA'} ${item.name}: ${item.detail}`).join('\\n'));\r\n return report.every(item => item.ok) ? 0 : 1;\r\n }\r\n const { loadConfig } = await import('./config.js');\r\n const config = await loadConfig(options.config);\r\n if (command === 'source update') {\r\n const { updateSource } = await import('./source.js');\r\n const lock = await updateSource(config, options.revision);\r\n output(lock, `Fontes oficiais registradas na revis\u00E3o ${lock.source.revision}.\\nSHA256 da \u00E1rvore: ${lock.source.treeHash}\\nExecute generate para atualizar o contrato.`);\r\n } else if (command === 'source lock') {\r\n const { lockExistingSource } = await import('./source.js');\r\n if (typeof options.revision !== 'number') throw new Error('source lock exige --revision com o n\u00FAmero verificado do export SVN.');\r\n if (config.source.revision !== 'HEAD' && config.source.revision !== options.revision) throw new Error('Revis\u00E3o do export diverge da configura\u00E7\u00E3o.');\r\n const lock = await lockExistingSource(config, options.revision);\r\n output(lock, `Export existente registrado na revis\u00E3o ${lock.source.revision}; ${Object.keys(lock.source.files).length} arquivos protegidos por SHA256.`);\r\n } else if (command === 'generate') {\r\n const { verifySource } = await import('./source.js');\r\n const lock = await verifySource(config);\r\n const { generateModel } = await import('./generator.js');\r\n const result = await generateModel({ acbrRoot: config.source.directory, outputDir: config.generator.outputDir, revision: String(lock.source.revision), sourceHash: lock.source.treeHash, fpcPath: config.native.fpc });\r\n output(result, `Contrato ${result.contractHash}; ${result.models} modelos gerados.\\nRevise o relat\u00F3rio: ${result.reportPath}`);\r\n } else if (command === 'build') {\r\n const { buildNative, runtimeDirectory } = await import('./native-build.js');\r\n const result = await buildNative(config);\r\n output(result, `Runtime compilado: ${runtimeDirectory(config)}\\nACBr revis\u00E3o ${result.sourceRevision}; contrato ${result.contractHash}.`);\r\n } else {\r\n const { checkBuild } = await import('./native-build.js');\r\n const { checkOffline } = await import('./offline-check.js');\r\n const result = await checkBuild(config);\r\n const offlineChecks = await checkOffline(config, result);\r\n output({ ...result, offlineChecks }, `Fontes, contrato e ${Object.keys(result.files).length} arquivos do runtime conferidos por SHA256.\\n${offlineChecks.length} verifica\u00E7\u00F5es offline do motor aprovadas; nenhuma transmiss\u00E3o.`);\r\n }\r\n return 0;\r\n } catch (error) {\r\n if (jsonTag) {\r\n const problem = error instanceof FieldHelpError ? { code: error.code, message: error.message, ...error.details } : { code: 'HELP_INDISPONIVEL', message: 'N\u00E3o foi poss\u00EDvel consultar o contrato instalado.' };\r\n io.stderr.write(`${JSON.stringify({ ok: false, error: problem }, null, 2)}\\n`); return 1;\r\n }\r\n io.stderr.write(`Erro: ${(error as Error).message}\\n`);\r\n return 1;\r\n }\r\n}\r\nfunction isDirectInvocation(): boolean {\r\n const entry = process.argv[1];\r\n if (!entry) return false;\r\n try {\r\n // npm's Unix bin is a symlink; resolve both sides before deciding to run.\r\n return realpathSync(resolve(entry)) === realpathSync(fileURLToPath(import.meta.url));\r\n } catch {\r\n // Importing the CLI must remain inert even if the host's argv path is absent.\r\n return false;\r\n }\r\n}\r\nif (isDirectInvocation()) {\r\n main().then(code => { process.exitCode = code; });\r\n}\r\n", "import { createHash } from 'node:crypto';\nimport { readFile } from 'node:fs/promises';\nimport path from 'node:path';\nimport { ACBR_CONTRACT } from '../generated/acbr/models.js';\nimport type { ModelIR, ModelProperty, ModelType } from './generator.js';\n\nexport interface ContractMetadata {\n formatVersion: 1;\n sourceRevision: number;\n sourceHash: string;\n contractHash: string;\n ir: ModelIR;\n}\nexport interface FieldDescription {\n formatVersion: 1;\n sdkVersion: string;\n sourceRevision: number;\n sourceHash: string;\n contractHash: string;\n root: string;\n path: string;\n kind: ModelProperty['kind'];\n pascalType: string;\n typeReference?: string;\n inputType: 'string' | 'number' | 'boolean' | 'object' | 'array';\n readonly: boolean;\n declaredDefault?: string;\n values?: string[];\n constraints?: { min?: number; max?: number; scale?: number };\n itemType?: string;\n members?: { name: string; kind: ModelProperty['kind']; pascalType: string; readonly: boolean }[];\n}\nexport class FieldHelpError extends Error {\n constructor(public readonly code: string, message: string, public readonly details?: { segment?: string; ownerType?: string; candidates?: string[] }) { super(message); this.name = 'FieldHelpError'; }\n}\nconst kinds = new Set(['string', 'integer', 'decimal', 'datetime', 'boolean', 'enum', 'object', 'list']);\nconst identifier = /^[A-Za-z_]\\w*$/;\nconst sha256 = /^[a-f0-9]{64}$/;\nconst fail = (message = 'Os metadados do contrato s\u00E3o inv\u00E1lidos.'): never => { throw new FieldHelpError('CONTRATO_INVALIDO', message); };\n\nexport function validateContractMetadata(value: unknown): ContractMetadata {\n const metadata = value as ContractMetadata;\n if (!metadata || metadata.formatVersion !== 1 || !Number.isSafeInteger(metadata.sourceRevision) || metadata.sourceRevision < 1 ||\n !sha256.test(metadata.sourceHash ?? '') || !sha256.test(metadata.contractHash ?? '') || metadata.ir?.schemaVersion !== 1 ||\n !identifier.test(metadata.ir.root ?? '') || !Array.isArray(metadata.ir.types) || metadata.ir.types.length === 0) fail();\n const digest = createHash('sha256').update(JSON.stringify({ sourceRevision: metadata.sourceRevision, sourceHash: metadata.sourceHash, ir: metadata.ir })).digest('hex');\n if (digest !== metadata.contractHash) fail('O hash dos metadados diverge do contrato gerado.');\n const types = new Map<string, ModelType>();\n for (const node of metadata.ir.types) {\n if (!node || typeof node.name !== 'string' || !identifier.test(node.name) || types.has(node.name) || !['object', 'list', 'enum'].includes(node.kind)) fail();\n types.set(node.name, node);\n }\n if (types.get(metadata.ir.root)?.kind !== 'object') fail();\n for (const node of types.values()) {\n if (node.kind === 'enum') {\n if (!Array.isArray(node.values) || node.values.length === 0 || node.values.some(v => typeof v !== 'string' || !identifier.test(v)) || new Set(node.values).size !== node.values.length) fail();\n } else if (node.kind === 'list') {\n if (!node.item || types.get(node.item)?.kind !== 'object') fail();\n } else {\n if (!Array.isArray(node.properties)) fail();\n const names = new Set<string>();\n for (const property of node.properties!) {\n if (!property || typeof property.name !== 'string' || !identifier.test(property.name) || names.has(property.name.toLowerCase()) || !kinds.has(property.kind) || typeof property.type !== 'string' || typeof property.readonly !== 'boolean') fail();\n names.add(property.name.toLowerCase());\n if (['object', 'list', 'enum'].includes(property.kind) && (!property.ref || types.get(property.ref)?.kind !== property.kind)) fail();\n if (!['object', 'list', 'enum'].includes(property.kind) && property.ref !== undefined) fail();\n if (property.declaredDefault !== undefined && typeof property.declaredDefault !== 'string') fail();\n for (const key of ['min', 'max', 'scale'] as const) if (property[key] !== undefined && !Number.isFinite(property[key])) fail();\n }\n }\n }\n return metadata;\n}\n\nfunction matchingPaths(types: Map<string, ModelType>, root: string, field: string): string[] {\n const paths: string[] = [];\n let incomplete = false;\n function visit(name: string, prefix: string, trail: Set<string>): void {\n if (trail.has(name) || trail.size > 128 || paths.length > 1000) { incomplete = true; return; }\n const node = types.get(name)!;\n const next = new Set(trail).add(name);\n if (node.kind === 'list') { visit(node.item!, prefix + '[]', next); return; }\n if (node.kind !== 'object') return;\n for (const property of node.properties!) {\n const candidate = prefix ? prefix + '.' + property.name : property.name;\n if (property.name === field) paths.push(candidate);\n if (property.ref && property.kind !== 'enum') visit(property.ref, candidate, next);\n }\n }\n visit(root, '', new Set());\n if (incomplete) throw new FieldHelpError('CAMINHO_COMPLETO_NECESSARIO', 'O contrato cont\u00E9m caminhos recursivos ou extensos. Informe o caminho completo.');\n return paths.sort();\n}\n\nexport function describeField(metadata: ContractMetadata, sdkVersion: string, query: string): FieldDescription {\n validateContractMetadata(metadata);\n if (typeof query !== 'string' || query.length > 512 || !/^[A-Za-z_]\\w*(?:\\[(?:\\d*)\\])?(?:\\.[A-Za-z_]\\w*(?:\\[(?:\\d*)\\])?)*$/.test(query))\n throw new FieldHelpError('CAMINHO_INVALIDO', 'Use nomes de campos separados por ponto e [] para elementos de cole\u00E7\u00E3o.');\n const types = new Map(metadata.ir.types.map(node => [node.name, node]));\n const root = metadata.ir.root;\n const base = { formatVersion: 1 as const, sdkVersion, sourceRevision: metadata.sourceRevision, sourceHash: metadata.sourceHash, contractHash: metadata.contractHash, root };\n let relative = query === root ? '' : query.startsWith(root + '.') ? query.slice(root.length + 1) : query;\n if (identifier.test(relative) && !types.get(root)!.properties!.some(property => property.name === relative)) {\n const matches = matchingPaths(types, root, relative);\n if (matches.length > 1) throw new FieldHelpError('CAMPO_AMBIGUO', 'O nome aparece em mais de um caminho. Informe o caminho completo.', { candidates: matches });\n if (matches.length === 1) relative = matches[0]!;\n }\n let node = types.get(root)!;\n let property: ModelProperty | undefined;\n let readonly = false;\n const canonical: string[] = [];\n const parts = relative ? relative.split('.') : [];\n for (let index = 0; index < parts.length; index++) {\n const segment = parts[index]!;\n const parsed = /^([A-Za-z_]\\w*)(\\[(?:\\d*)\\])?$/.exec(segment)!;\n if (node.kind !== 'object') throw new FieldHelpError('CAMINHO_INVALIDO', 'O caminho tenta acessar um campo de um valor simples.');\n property = node.properties!.find(item => item.name === parsed[1]);\n if (!property) throw new FieldHelpError('CAMPO_INEXISTENTE', 'O campo n\u00E3o existe nesse objeto do contrato.', { segment: parsed[1], ownerType: node.name, candidates: node.properties!.map(item => item.name) });\n readonly ||= property.readonly;\n canonical.push(property.name);\n const selected = parsed[2] !== undefined;\n if (selected && property.kind !== 'list') throw new FieldHelpError('CAMPO_NAO_COLECAO', '[] ou \u00EDndice foi usado em um campo que n\u00E3o \u00E9 cole\u00E7\u00E3o.');\n if (property.kind === 'list') {\n node = types.get(property.ref!)!;\n if (selected) { canonical[canonical.length - 1] += '[]'; node = types.get(node.item!)!; }\n else if (index < parts.length - 1) throw new FieldHelpError('COLECAO_REQUER_INDICE', 'Use [] ou um \u00EDndice para consultar campos do elemento da cole\u00E7\u00E3o.');\n } else if (property.ref) node = types.get(property.ref)!;\n else if (index < parts.length - 1) throw new FieldHelpError('CAMINHO_INVALIDO', 'Um valor simples n\u00E3o cont\u00E9m outros campos.');\n }\n const selectedListItem = property?.kind === 'list' && canonical[canonical.length - 1]?.endsWith('[]');\n const kind = selectedListItem ? 'object' : property?.kind ?? 'object';\n const description: FieldDescription = { ...base, path: [root, ...canonical].join('.'), kind,\n pascalType: selectedListItem ? node.name : property?.type ?? node.name,\n inputType: kind === 'integer' ? 'number' : kind === 'boolean' ? 'boolean' : kind === 'object' ? 'object' : kind === 'list' ? 'array' : 'string', readonly };\n if (property?.declaredDefault !== undefined) description.declaredDefault = property.declaredDefault;\n if (property?.ref) description.typeReference = selectedListItem ? node.name : property.ref;\n if (kind === 'enum') description.values = [...node.values!];\n const constraints = property && Object.fromEntries((['min', 'max', 'scale'] as const).filter(key => property![key] !== undefined).map(key => [key, property![key]]));\n if (constraints && Object.keys(constraints).length) description.constraints = constraints;\n if (kind === 'list') description.itemType = node.item;\n if (kind === 'object') description.members = node.properties!.map(item => ({ name: item.name, kind: item.kind, pascalType: item.type, readonly: readonly || item.readonly }));\n return description;\n}\n\nexport async function describeInstalledField(query: string, packageRoot: string): Promise<FieldDescription> {\n let metadata: ContractMetadata, pkg: { version: string }, lock: { source: { revision: number; treeHash: string } };\n try {\n [metadata, pkg, lock] = await Promise.all(['dist/contract.json', 'package.json', 'acbr.lock.json'].map(async filename => JSON.parse(await readFile(path.join(packageRoot, filename), 'utf8')))) as [ContractMetadata, typeof pkg, typeof lock];\n } catch { throw new FieldHelpError('CONTRATO_INDISPONIVEL', 'Os metadados empacotados n\u00E3o est\u00E3o dispon\u00EDveis. Reinstale o pacote ou gere e compile o checkout.'); }\n validateContractMetadata(metadata);\n if (typeof pkg.version !== 'string' || !/^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$/.test(pkg.version) ||\n metadata.sourceRevision !== lock.source?.revision || metadata.sourceHash !== lock.source?.treeHash ||\n metadata.sourceRevision !== ACBR_CONTRACT.sourceRevision || metadata.contractHash !== ACBR_CONTRACT.contractHash)\n throw new FieldHelpError('CONTRATO_INCOMPATIVEL', 'Os metadados divergem da vers\u00E3o instalada, do lock ou do validador gerado.');\n return describeField(metadata, pkg.version, query);\n}\n\nexport function formatFieldDescription(description: FieldDescription): string {\n const lines = [description.path, `Tipo: ${description.pascalType}${description.typeReference && description.typeReference !== description.pascalType ? ` [${description.typeReference}]` : ''} (${description.kind}; entrada ${description.inputType})`,\n `Somente leitura: ${description.readonly ? 'sim' : 'n\u00E3o'}`];\n if (description.values) lines.push(`Valores permitidos na API: ${description.values.join(', ')}`);\n if (description.declaredDefault !== undefined) lines.push(`Padr\u00E3o declarado no Pascal: ${description.declaredDefault} (n\u00E3o substitui regras fiscais ou o construtor nativo).`);\n if (description.constraints) lines.push(`Limites do tipo: ${JSON.stringify(description.constraints)}`);\n if (description.itemType) lines.push(`Tipo do elemento: ${description.itemType}`);\n if (description.members) lines.push(`Campos: ${description.members.map(member => member.name).join(', ')}`);\n lines.push(`SDK: ${description.sdkVersion}; revis\u00E3o ACBr: ${description.sourceRevision}`, `Contrato: ${description.contractHash}`);\n return lines.join('\\n');\n}\n", "// Generated from ACBr AST. LGPL-2.1-or-later. Do not edit.\nexport const ACBR_CONTRACT = {\"sourceRevision\":48590,\"contractHash\":\"e5a497cefe8e0e350a30da5cc04e88b35c38a98535893d52f878890260d1346d\"} as const;\nexport const SOURCE_REVISION=ACBR_CONTRACT.sourceRevision;\nexport const CONTRACT_HASH=ACBR_CONTRACT.contractHash;\nexport const TACBrProcessoEmissao = Object.freeze({\"peAplicativoContribuinte\":\"peAplicativoContribuinte\",\"peAvulsaFisco\":\"peAvulsaFisco\",\"peAvulsaContribuinte\":\"peAvulsaContribuinte\",\"peContribuinteAplicativoFisco\":\"peContribuinteAplicativoFisco\",\"peProvedorAssinaturaAutorizacao\":\"peProvedorAssinaturaAutorizacao\"} as const);\nexport type TACBrProcessoEmissao = typeof TACBrProcessoEmissao[keyof typeof TACBrProcessoEmissao];\nexport const TACBrTipoAmbiente = Object.freeze({\"taProducao\":\"taProducao\",\"taHomologacao\":\"taHomologacao\"} as const);\nexport type TACBrTipoAmbiente = typeof TACBrTipoAmbiente[keyof typeof TACBrTipoAmbiente];\nexport const TACBrTipoEmissao = Object.freeze({\"teNormal\":\"teNormal\",\"teContingencia\":\"teContingencia\",\"teSCAN\":\"teSCAN\",\"teDPEC\":\"teDPEC\",\"teFSDA\":\"teFSDA\",\"teSVCAN\":\"teSVCAN\",\"teSVCRS\":\"teSVCRS\",\"teSVCSP\":\"teSVCSP\",\"teOffLine\":\"teOffLine\"} as const);\nexport type TACBrTipoEmissao = typeof TACBrTipoEmissao[keyof typeof TACBrTipoEmissao];\nexport const TACBrTipoImpressao = Object.freeze({\"tiSemGeracao\":\"tiSemGeracao\",\"tiRetrato\":\"tiRetrato\",\"tiPaisagem\":\"tiPaisagem\",\"tiSimplificado\":\"tiSimplificado\",\"tiNFCe\":\"tiNFCe\",\"tiMsgEletronica\":\"tiMsgEletronica\",\"tiSimplificadoTipo2\":\"tiSimplificadoTipo2\"} as const);\nexport type TACBrTipoImpressao = typeof TACBrTipoImpressao[keyof typeof TACBrTipoImpressao];\nexport type TAdiCollectionInput = TAdiCollectionItemInput[];\nexport class TAdiCollection extends Array<TAdiCollectionItem> {\n New(input: TAdiCollectionItemInput = {}): TAdiCollectionItem { const item=new TAdiCollectionItem(input); this.push(item); return item; }\n}\nexport interface TAdiCollectionItemInput {\n \"cFabricante\"?: string;\n \"nAdicao\"?: number;\n \"nDraw\"?: string;\n \"nSeqAdi\"?: number;\n \"vDescDI\"?: string;\n}\nexport class TAdiCollectionItem {\n \"cFabricante\"?: string;\n \"nAdicao\"?: number;\n \"nDraw\"?: string;\n \"nSeqAdi\"?: number;\n \"vDescDI\"?: string;\n constructor(input: TAdiCollectionItemInput = {}) {\n validateModel(\"TAdiCollectionItem\", input);\n if (input[\"cFabricante\"] !== undefined) this[\"cFabricante\"] = input[\"cFabricante\"];\n if (input[\"nAdicao\"] !== undefined) this[\"nAdicao\"] = input[\"nAdicao\"];\n if (input[\"nDraw\"] !== undefined) this[\"nDraw\"] = input[\"nDraw\"];\n if (input[\"nSeqAdi\"] !== undefined) this[\"nSeqAdi\"] = input[\"nSeqAdi\"];\n if (input[\"vDescDI\"] !== undefined) this[\"vDescDI\"] = input[\"vDescDI\"];\n }\n}\nexport interface TagropecuarioInput {\n \"defensivo\"?: TdefensivoCollectionInput;\n \"guiaTransito\"?: TguiaTransitoInput;\n}\nexport class Tagropecuario {\n \"defensivo\" = new TdefensivoCollection();\n \"guiaTransito\" = new TguiaTransito();\n constructor(input: TagropecuarioInput = {}) {\n validateModel(\"Tagropecuario\", input);\n if (input[\"defensivo\"] !== undefined) this[\"defensivo\"] = Object.assign(new TdefensivoCollection(), input[\"defensivo\"].map(v=>new TdefensivoCollectionItem(v)));\n if (input[\"guiaTransito\"] !== undefined) this[\"guiaTransito\"] = new TguiaTransito(input[\"guiaTransito\"]);\n }\n}\nexport type TArmaCollectionInput = TArmaCollectionItemInput[];\nexport class TArmaCollection extends Array<TArmaCollectionItem> {\n New(input: TArmaCollectionItemInput = {}): TArmaCollectionItem { const item=new TArmaCollectionItem(input); this.push(item); return item; }\n}\nexport interface TArmaCollectionItemInput {\n \"descr\"?: string;\n \"nCano\"?: string;\n \"nSerie\"?: string;\n \"tpArma\"?: TpcnTipoArma;\n}\nexport class TArmaCollectionItem {\n \"descr\"?: string;\n \"nCano\"?: string;\n \"nSerie\"?: string;\n /** Pascal streaming default: taUsoPermitido. Omission preserves the native constructor. */\n \"tpArma\"?: TpcnTipoArma;\n constructor(input: TArmaCollectionItemInput = {}) {\n validateModel(\"TArmaCollectionItem\", input);\n if (input[\"descr\"] !== undefined) this[\"descr\"] = input[\"descr\"];\n if (input[\"nCano\"] !== undefined) this[\"nCano\"] = input[\"nCano\"];\n if (input[\"nSerie\"] !== undefined) this[\"nSerie\"] = input[\"nSerie\"];\n if (input[\"tpArma\"] !== undefined) this[\"tpArma\"] = input[\"tpArma\"];\n }\n}\nexport type TautXMLCollectionInput = TautXMLCollectionItemInput[];\nexport class TautXMLCollection extends Array<TautXMLCollectionItem> {\n New(input: TautXMLCollectionItemInput = {}): TautXMLCollectionItem { const item=new TautXMLCollectionItem(input); this.push(item); return item; }\n}\nexport interface TautXMLCollectionItemInput {\n \"CNPJCPF\"?: string;\n}\nexport class TautXMLCollectionItem {\n \"CNPJCPF\"?: string;\n constructor(input: TautXMLCollectionItemInput = {}) {\n validateModel(\"TautXMLCollectionItem\", input);\n if (input[\"CNPJCPF\"] !== undefined) this[\"CNPJCPF\"] = input[\"CNPJCPF\"];\n }\n}\nexport interface TAvulsaInput {\n \"CNPJ\"?: string;\n \"dEmi\"?: string;\n \"dPag\"?: string;\n \"fone\"?: string;\n \"matr\"?: string;\n \"nDAR\"?: string;\n \"repEmi\"?: string;\n \"UF\"?: string;\n \"vDAR\"?: string;\n \"xAgente\"?: string;\n \"xOrgao\"?: string;\n}\nexport class TAvulsa {\n \"CNPJ\"?: string;\n \"dEmi\"?: string;\n \"dPag\"?: string;\n \"fone\"?: string;\n \"matr\"?: string;\n \"nDAR\"?: string;\n \"repEmi\"?: string;\n \"UF\"?: string;\n \"vDAR\"?: string;\n \"xAgente\"?: string;\n \"xOrgao\"?: string;\n constructor(input: TAvulsaInput = {}) {\n validateModel(\"TAvulsa\", input);\n if (input[\"CNPJ\"] !== undefined) this[\"CNPJ\"] = input[\"CNPJ\"];\n if (input[\"dEmi\"] !== undefined) this[\"dEmi\"] = input[\"dEmi\"];\n if (input[\"dPag\"] !== undefined) this[\"dPag\"] = input[\"dPag\"];\n if (input[\"fone\"] !== undefined) this[\"fone\"] = input[\"fone\"];\n if (input[\"matr\"] !== undefined) this[\"matr\"] = input[\"matr\"];\n if (input[\"nDAR\"] !== undefined) this[\"nDAR\"] = input[\"nDAR\"];\n if (input[\"repEmi\"] !== undefined) this[\"repEmi\"] = input[\"repEmi\"];\n if (input[\"UF\"] !== undefined) this[\"UF\"] = input[\"UF\"];\n if (input[\"vDAR\"] !== undefined) this[\"vDAR\"] = input[\"vDAR\"];\n if (input[\"xAgente\"] !== undefined) this[\"xAgente\"] = input[\"xAgente\"];\n if (input[\"xOrgao\"] !== undefined) this[\"xOrgao\"] = input[\"xOrgao\"];\n }\n}\nexport interface TcanaInput {\n \"deduc\"?: TDeducCollectionInput;\n \"fordia\"?: TForDiaCollectionInput;\n \"qTotAnt\"?: string;\n \"qTotGer\"?: string;\n \"qTotMes\"?: string;\n \"ref\"?: string;\n \"safra\"?: string;\n \"vFor\"?: string;\n \"vLiqFor\"?: string;\n \"vTotDed\"?: string;\n}\nexport class Tcana {\n \"deduc\" = new TDeducCollection();\n \"fordia\" = new TForDiaCollection();\n \"qTotAnt\"?: string;\n \"qTotGer\"?: string;\n \"qTotMes\"?: string;\n \"ref\"?: string;\n \"safra\"?: string;\n \"vFor\"?: string;\n \"vLiqFor\"?: string;\n \"vTotDed\"?: string;\n constructor(input: TcanaInput = {}) {\n validateModel(\"Tcana\", input);\n if (input[\"deduc\"] !== undefined) this[\"deduc\"] = Object.assign(new TDeducCollection(), input[\"deduc\"].map(v=>new TDeducCollectionItem(v)));\n if (input[\"fordia\"] !== undefined) this[\"fordia\"] = Object.assign(new TForDiaCollection(), input[\"fordia\"].map(v=>new TForDiaCollectionItem(v)));\n if (input[\"qTotAnt\"] !== undefined) this[\"qTotAnt\"] = input[\"qTotAnt\"];\n if (input[\"qTotGer\"] !== undefined) this[\"qTotGer\"] = input[\"qTotGer\"];\n if (input[\"qTotMes\"] !== undefined) this[\"qTotMes\"] = input[\"qTotMes\"];\n if (input[\"ref\"] !== undefined) this[\"ref\"] = input[\"ref\"];\n if (input[\"safra\"] !== undefined) this[\"safra\"] = input[\"safra\"];\n if (input[\"vFor\"] !== undefined) this[\"vFor\"] = input[\"vFor\"];\n if (input[\"vLiqFor\"] !== undefined) this[\"vLiqFor\"] = input[\"vLiqFor\"];\n if (input[\"vTotDed\"] !== undefined) this[\"vTotDed\"] = input[\"vTotDed\"];\n }\n}\nexport const TcCredPres = Object.freeze({\"cpNenhum\":\"cpNenhum\",\"cp01\":\"cp01\",\"cp02\":\"cp02\",\"cp03\":\"cp03\",\"cp04\":\"cp04\",\"cp05\":\"cp05\",\"cp06\":\"cp06\",\"cp07\":\"cp07\",\"cp08\":\"cp08\",\"cp09\":\"cp09\",\"cp10\":\"cp10\",\"cp11\":\"cp11\",\"cp12\":\"cp12\",\"cp13\":\"cp13\"} as const);\nexport type TcCredPres = typeof TcCredPres[keyof typeof TcCredPres];\nexport interface TCIDEInput {\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vCIDE\"?: string;\n}\nexport class TCIDE {\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vCIDE\"?: string;\n constructor(input: TCIDEInput = {}) {\n validateModel(\"TCIDE\", input);\n if (input[\"qBCProd\"] !== undefined) this[\"qBCProd\"] = input[\"qBCProd\"];\n if (input[\"vAliqProd\"] !== undefined) this[\"vAliqProd\"] = input[\"vAliqProd\"];\n if (input[\"vCIDE\"] !== undefined) this[\"vCIDE\"] = input[\"vCIDE\"];\n }\n}\nexport interface TCobrInput {\n \"Dup\"?: TDupCollectionInput;\n \"Fat\"?: TFatInput;\n}\nexport class TCobr {\n \"Dup\" = new TDupCollection();\n \"Fat\" = new TFat();\n constructor(input: TCobrInput = {}) {\n validateModel(\"TCobr\", input);\n if (input[\"Dup\"] !== undefined) this[\"Dup\"] = Object.assign(new TDupCollection(), input[\"Dup\"].map(v=>new TDupCollectionItem(v)));\n if (input[\"Fat\"] !== undefined) this[\"Fat\"] = new TFat(input[\"Fat\"]);\n }\n}\nexport interface TCOFINSInput {\n \"CST\"?: TCSTCofins;\n \"pCOFINS\"?: string;\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vBC\"?: string;\n \"vBCProd\"?: string;\n \"vCOFINS\"?: string;\n}\nexport class TCOFINS {\n /** Pascal streaming default: cof01. Omission preserves the native constructor. */\n \"CST\"?: TCSTCofins;\n \"pCOFINS\"?: string;\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vBC\"?: string;\n \"vBCProd\"?: string;\n \"vCOFINS\"?: string;\n constructor(input: TCOFINSInput = {}) {\n validateModel(\"TCOFINS\", input);\n if (input[\"CST\"] !== undefined) this[\"CST\"] = input[\"CST\"];\n if (input[\"pCOFINS\"] !== undefined) this[\"pCOFINS\"] = input[\"pCOFINS\"];\n if (input[\"qBCProd\"] !== undefined) this[\"qBCProd\"] = input[\"qBCProd\"];\n if (input[\"vAliqProd\"] !== undefined) this[\"vAliqProd\"] = input[\"vAliqProd\"];\n if (input[\"vBC\"] !== undefined) this[\"vBC\"] = input[\"vBC\"];\n if (input[\"vBCProd\"] !== undefined) this[\"vBCProd\"] = input[\"vBCProd\"];\n if (input[\"vCOFINS\"] !== undefined) this[\"vCOFINS\"] = input[\"vCOFINS\"];\n }\n}\nexport interface TCOFINSSTInput {\n \"indSomaCOFINSST\"?: TIndSomaCOFINSST;\n \"pCOFINS\"?: string;\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vBC\"?: string;\n \"vCOFINS\"?: string;\n}\nexport class TCOFINSST {\n \"indSomaCOFINSST\"?: TIndSomaCOFINSST;\n \"pCOFINS\"?: string;\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vBC\"?: string;\n \"vCOFINS\"?: string;\n constructor(input: TCOFINSSTInput = {}) {\n validateModel(\"TCOFINSST\", input);\n if (input[\"indSomaCOFINSST\"] !== undefined) this[\"indSomaCOFINSST\"] = input[\"indSomaCOFINSST\"];\n if (input[\"pCOFINS\"] !== undefined) this[\"pCOFINS\"] = input[\"pCOFINS\"];\n if (input[\"qBCProd\"] !== undefined) this[\"qBCProd\"] = input[\"qBCProd\"];\n if (input[\"vAliqProd\"] !== undefined) this[\"vAliqProd\"] = input[\"vAliqProd\"];\n if (input[\"vBC\"] !== undefined) this[\"vBC\"] = input[\"vBC\"];\n if (input[\"vCOFINS\"] !== undefined) this[\"vCOFINS\"] = input[\"vCOFINS\"];\n }\n}\nexport interface TCombInput {\n \"CIDE\"?: TCIDEInput;\n \"CODIF\"?: string;\n \"cProdANP\"?: number;\n \"descANP\"?: string;\n \"encerrante\"?: TencerranteInput;\n \"ICMS\"?: TICMSCombInput;\n \"ICMSCons\"?: TICMSConsInput;\n \"ICMSInter\"?: TICMSInterInput;\n \"origComb\"?: TorigCombCollectionInput;\n \"pBio\"?: string;\n \"pGLP\"?: string;\n \"pGNi\"?: string;\n \"pGNn\"?: string;\n \"pMixGN\"?: string;\n \"qTemp\"?: string;\n \"UFcons\"?: string;\n \"vPart\"?: string;\n}\nexport class TComb {\n \"CIDE\" = new TCIDE();\n \"CODIF\"?: string;\n \"cProdANP\"?: number;\n \"descANP\"?: string;\n \"encerrante\" = new Tencerrante();\n \"ICMS\" = new TICMSComb();\n \"ICMSCons\" = new TICMSCons();\n \"ICMSInter\" = new TICMSInter();\n \"origComb\" = new TorigCombCollection();\n \"pBio\"?: string;\n \"pGLP\"?: string;\n \"pGNi\"?: string;\n \"pGNn\"?: string;\n \"pMixGN\"?: string;\n \"qTemp\"?: string;\n \"UFcons\"?: string;\n \"vPart\"?: string;\n constructor(input: TCombInput = {}) {\n validateModel(\"TComb\", input);\n if (input[\"CIDE\"] !== undefined) this[\"CIDE\"] = new TCIDE(input[\"CIDE\"]);\n if (input[\"CODIF\"] !== undefined) this[\"CODIF\"] = input[\"CODIF\"];\n if (input[\"cProdANP\"] !== undefined) this[\"cProdANP\"] = input[\"cProdANP\"];\n if (input[\"descANP\"] !== undefined) this[\"descANP\"] = input[\"descANP\"];\n if (input[\"encerrante\"] !== undefined) this[\"encerrante\"] = new Tencerrante(input[\"encerrante\"]);\n if (input[\"ICMS\"] !== undefined) this[\"ICMS\"] = new TICMSComb(input[\"ICMS\"]);\n if (input[\"ICMSCons\"] !== undefined) this[\"ICMSCons\"] = new TICMSCons(input[\"ICMSCons\"]);\n if (input[\"ICMSInter\"] !== undefined) this[\"ICMSInter\"] = new TICMSInter(input[\"ICMSInter\"]);\n if (input[\"origComb\"] !== undefined) this[\"origComb\"] = Object.assign(new TorigCombCollection(), input[\"origComb\"].map(v=>new TorigCombCollectionItem(v)));\n if (input[\"pBio\"] !== undefined) this[\"pBio\"] = input[\"pBio\"];\n if (input[\"pGLP\"] !== undefined) this[\"pGLP\"] = input[\"pGLP\"];\n if (input[\"pGNi\"] !== undefined) this[\"pGNi\"] = input[\"pGNi\"];\n if (input[\"pGNn\"] !== undefined) this[\"pGNn\"] = input[\"pGNn\"];\n if (input[\"pMixGN\"] !== undefined) this[\"pMixGN\"] = input[\"pMixGN\"];\n if (input[\"qTemp\"] !== undefined) this[\"qTemp\"] = input[\"qTemp\"];\n if (input[\"UFcons\"] !== undefined) this[\"UFcons\"] = input[\"UFcons\"];\n if (input[\"vPart\"] !== undefined) this[\"vPart\"] = input[\"vPart\"];\n }\n}\nexport interface TCompraInput {\n \"xCont\"?: string;\n \"xNEmp\"?: string;\n \"xPed\"?: string;\n}\nexport class TCompra {\n \"xCont\"?: string;\n \"xNEmp\"?: string;\n \"xPed\"?: string;\n constructor(input: TCompraInput = {}) {\n validateModel(\"TCompra\", input);\n if (input[\"xCont\"] !== undefined) this[\"xCont\"] = input[\"xCont\"];\n if (input[\"xNEmp\"] !== undefined) this[\"xNEmp\"] = input[\"xNEmp\"];\n if (input[\"xPed\"] !== undefined) this[\"xPed\"] = input[\"xPed\"];\n }\n}\nexport interface TCredPresIBSZFMInput {\n \"competApur\"?: string;\n \"tpCredPresIBSZFM\"?: TTpCredPresIBSZFM;\n \"vCredPresIBSZFM\"?: string;\n}\nexport class TCredPresIBSZFM {\n \"competApur\"?: string;\n \"tpCredPresIBSZFM\"?: TTpCredPresIBSZFM;\n \"vCredPresIBSZFM\"?: string;\n constructor(input: TCredPresIBSZFMInput = {}) {\n validateModel(\"TCredPresIBSZFM\", input);\n if (input[\"competApur\"] !== undefined) this[\"competApur\"] = input[\"competApur\"];\n if (input[\"tpCredPresIBSZFM\"] !== undefined) this[\"tpCredPresIBSZFM\"] = input[\"tpCredPresIBSZFM\"];\n if (input[\"vCredPresIBSZFM\"] !== undefined) this[\"vCredPresIBSZFM\"] = input[\"vCredPresIBSZFM\"];\n }\n}\nexport type TCredPresumidoCollectionInput = TCredPresumidoCollectionItemInput[];\nexport class TCredPresumidoCollection extends Array<TCredPresumidoCollectionItem> {\n New(input: TCredPresumidoCollectionItemInput = {}): TCredPresumidoCollectionItem { const item=new TCredPresumidoCollectionItem(input); this.push(item); return item; }\n}\nexport interface TCredPresumidoCollectionItemInput {\n \"cCredPresumido\"?: string;\n \"pCredPresumido\"?: string;\n \"vCredPresumido\"?: string;\n}\nexport class TCredPresumidoCollectionItem {\n \"cCredPresumido\"?: string;\n \"pCredPresumido\"?: string;\n \"vCredPresumido\"?: string;\n constructor(input: TCredPresumidoCollectionItemInput = {}) {\n validateModel(\"TCredPresumidoCollectionItem\", input);\n if (input[\"cCredPresumido\"] !== undefined) this[\"cCredPresumido\"] = input[\"cCredPresumido\"];\n if (input[\"pCredPresumido\"] !== undefined) this[\"pCredPresumido\"] = input[\"pCredPresumido\"];\n if (input[\"vCredPresumido\"] !== undefined) this[\"vCredPresumido\"] = input[\"vCredPresumido\"];\n }\n}\nexport const TCSOSNIcms = Object.freeze({\"csosnVazio\":\"csosnVazio\",\"csosn101\":\"csosn101\",\"csosn102\":\"csosn102\",\"csosn103\":\"csosn103\",\"csosn201\":\"csosn201\",\"csosn202\":\"csosn202\",\"csosn203\":\"csosn203\",\"csosn300\":\"csosn300\",\"csosn400\":\"csosn400\",\"csosn500\":\"csosn500\",\"csosn900\":\"csosn900\"} as const);\nexport type TCSOSNIcms = typeof TCSOSNIcms[keyof typeof TCSOSNIcms];\nexport const TCSTCofins = Object.freeze({\"cof01\":\"cof01\",\"cof02\":\"cof02\",\"cof03\":\"cof03\",\"cof04\":\"cof04\",\"cof05\":\"cof05\",\"cof06\":\"cof06\",\"cof07\":\"cof07\",\"cof08\":\"cof08\",\"cof09\":\"cof09\",\"cof49\":\"cof49\",\"cof50\":\"cof50\",\"cof51\":\"cof51\",\"cof52\":\"cof52\",\"cof53\":\"cof53\",\"cof54\":\"cof54\",\"cof55\":\"cof55\",\"cof56\":\"cof56\",\"cof60\":\"cof60\",\"cof61\":\"cof61\",\"cof62\":\"cof62\",\"cof63\":\"cof63\",\"cof64\":\"cof64\",\"cof65\":\"cof65\",\"cof66\":\"cof66\",\"cof67\":\"cof67\",\"cof70\":\"cof70\",\"cof71\":\"cof71\",\"cof72\":\"cof72\",\"cof73\":\"cof73\",\"cof74\":\"cof74\",\"cof75\":\"cof75\",\"cof98\":\"cof98\",\"cof99\":\"cof99\"} as const);\nexport type TCSTCofins = typeof TCSTCofins[keyof typeof TCSTCofins];\nexport const TCSTIBSCBS = Object.freeze({\"cstNenhum\":\"cstNenhum\",\"cst000\":\"cst000\",\"cst010\":\"cst010\",\"cst011\":\"cst011\",\"cst200\":\"cst200\",\"cst220\":\"cst220\",\"cst221\":\"cst221\",\"cst222\":\"cst222\",\"cst400\":\"cst400\",\"cst410\":\"cst410\",\"cst510\":\"cst510\",\"cst515\":\"cst515\",\"cst550\":\"cst550\",\"cst620\":\"cst620\",\"cst800\":\"cst800\",\"cst810\":\"cst810\",\"cst811\":\"cst811\",\"cst820\":\"cst820\",\"cst830\":\"cst830\"} as const);\nexport type TCSTIBSCBS = typeof TCSTIBSCBS[keyof typeof TCSTIBSCBS];\nexport const TCSTIcms = Object.freeze({\"cstVazio\":\"cstVazio\",\"cst00\":\"cst00\",\"cst10\":\"cst10\",\"cst20\":\"cst20\",\"cst30\":\"cst30\",\"cst40\":\"cst40\",\"cst41\":\"cst41\",\"cst45\":\"cst45\",\"cst50\":\"cst50\",\"cst51\":\"cst51\",\"cst60\":\"cst60\",\"cst70\":\"cst70\",\"cst80\":\"cst80\",\"cst81\":\"cst81\",\"cst90\":\"cst90\",\"cstICMSOutraUF\":\"cstICMSOutraUF\",\"cstICMSSN\":\"cstICMSSN\",\"cstPart10\":\"cstPart10\",\"cstPart90\":\"cstPart90\",\"cstRep41\":\"cstRep41\",\"cstRep60\":\"cstRep60\",\"cst02\":\"cst02\",\"cst15\":\"cst15\",\"cst53\":\"cst53\",\"cst61\":\"cst61\",\"cst01\":\"cst01\",\"cst12\":\"cst12\",\"cst13\":\"cst13\",\"cst14\":\"cst14\",\"cst21\":\"cst21\",\"cst72\":\"cst72\",\"cst73\":\"cst73\",\"cst74\":\"cst74\",\"cstPart20\":\"cstPart20\"} as const);\nexport type TCSTIcms = typeof TCSTIcms[keyof typeof TCSTIcms];\nexport const TCSTPis = Object.freeze({\"pis01\":\"pis01\",\"pis02\":\"pis02\",\"pis03\":\"pis03\",\"pis04\":\"pis04\",\"pis05\":\"pis05\",\"pis06\":\"pis06\",\"pis07\":\"pis07\",\"pis08\":\"pis08\",\"pis09\":\"pis09\",\"pis49\":\"pis49\",\"pis50\":\"pis50\",\"pis51\":\"pis51\",\"pis52\":\"pis52\",\"pis53\":\"pis53\",\"pis54\":\"pis54\",\"pis55\":\"pis55\",\"pis56\":\"pis56\",\"pis60\":\"pis60\",\"pis61\":\"pis61\",\"pis62\":\"pis62\",\"pis63\":\"pis63\",\"pis64\":\"pis64\",\"pis65\":\"pis65\",\"pis66\":\"pis66\",\"pis67\":\"pis67\",\"pis70\":\"pis70\",\"pis71\":\"pis71\",\"pis72\":\"pis72\",\"pis73\":\"pis73\",\"pis74\":\"pis74\",\"pis75\":\"pis75\",\"pis98\":\"pis98\",\"pis99\":\"pis99\"} as const);\nexport type TCSTPis = typeof TCSTPis[keyof typeof TCSTPis];\nexport type TDeducCollectionInput = TDeducCollectionItemInput[];\nexport class TDeducCollection extends Array<TDeducCollectionItem> {\n New(input: TDeducCollectionItemInput = {}): TDeducCollectionItem { const item=new TDeducCollectionItem(input); this.push(item); return item; }\n}\nexport interface TDeducCollectionItemInput {\n \"vDed\"?: string;\n \"xDed\"?: string;\n}\nexport class TDeducCollectionItem {\n \"vDed\"?: string;\n \"xDed\"?: string;\n constructor(input: TDeducCollectionItemInput = {}) {\n validateModel(\"TDeducCollectionItem\", input);\n if (input[\"vDed\"] !== undefined) this[\"vDed\"] = input[\"vDed\"];\n if (input[\"xDed\"] !== undefined) this[\"xDed\"] = input[\"xDed\"];\n }\n}\nexport type TdefensivoCollectionInput = TdefensivoCollectionItemInput[];\nexport class TdefensivoCollection extends Array<TdefensivoCollectionItem> {\n New(input: TdefensivoCollectionItemInput = {}): TdefensivoCollectionItem { const item=new TdefensivoCollectionItem(input); this.push(item); return item; }\n}\nexport interface TdefensivoCollectionItemInput {\n \"CPFRespTec\"?: string;\n \"nReceituario\"?: string;\n}\nexport class TdefensivoCollectionItem {\n \"CPFRespTec\"?: string;\n \"nReceituario\"?: string;\n constructor(input: TdefensivoCollectionItemInput = {}) {\n validateModel(\"TdefensivoCollectionItem\", input);\n if (input[\"CPFRespTec\"] !== undefined) this[\"CPFRespTec\"] = input[\"CPFRespTec\"];\n if (input[\"nReceituario\"] !== undefined) this[\"nReceituario\"] = input[\"nReceituario\"];\n }\n}\nexport interface TDestInput {\n \"CNPJCPF\"?: string;\n \"Email\"?: string;\n \"EnderDest\"?: TEnderDestInput;\n \"idEstrangeiro\"?: string;\n \"IE\"?: string;\n \"IM\"?: string;\n \"indIEDest\"?: TindIEDest;\n \"ISUF\"?: string;\n \"xNome\"?: string;\n}\nexport class TDest {\n \"CNPJCPF\"?: string;\n \"Email\"?: string;\n \"EnderDest\" = new TEnderDest();\n \"idEstrangeiro\"?: string;\n \"IE\"?: string;\n \"IM\"?: string;\n \"indIEDest\"?: TindIEDest;\n \"ISUF\"?: string;\n \"xNome\"?: string;\n constructor(input: TDestInput = {}) {\n validateModel(\"TDest\", input);\n if (input[\"CNPJCPF\"] !== undefined) this[\"CNPJCPF\"] = input[\"CNPJCPF\"];\n if (input[\"Email\"] !== undefined) this[\"Email\"] = input[\"Email\"];\n if (input[\"EnderDest\"] !== undefined) this[\"EnderDest\"] = new TEnderDest(input[\"EnderDest\"]);\n if (input[\"idEstrangeiro\"] !== undefined) this[\"idEstrangeiro\"] = input[\"idEstrangeiro\"];\n if (input[\"IE\"] !== undefined) this[\"IE\"] = input[\"IE\"];\n if (input[\"IM\"] !== undefined) this[\"IM\"] = input[\"IM\"];\n if (input[\"indIEDest\"] !== undefined) this[\"indIEDest\"] = input[\"indIEDest\"];\n if (input[\"ISUF\"] !== undefined) this[\"ISUF\"] = input[\"ISUF\"];\n if (input[\"xNome\"] !== undefined) this[\"xNome\"] = input[\"xNome\"];\n }\n}\nexport type TDetCollectionInput = TDetCollectionItemInput[];\nexport class TDetCollection extends Array<TDetCollectionItem> {\n New(input: TDetCollectionItemInput = {}): TDetCollectionItem { const item=new TDetCollectionItem(input); this.push(item); return item; }\n}\nexport interface TDetCollectionItemInput {\n \"DFeReferenciado\"?: TDFeReferenciadoInput;\n \"Imposto\"?: TImpostoInput;\n \"infAdProd\"?: string;\n \"obsCont\"?: TobsItemInput;\n \"obsFisco\"?: TobsItemInput;\n \"pDevol\"?: string;\n \"Prod\"?: TProdInput;\n \"vIPIDevol\"?: string;\n \"vItem\"?: string;\n}\nexport class TDetCollectionItem {\n \"DFeReferenciado\" = new TDFeReferenciado();\n \"Imposto\" = new TImposto();\n \"infAdProd\"?: string;\n \"obsCont\" = new TobsItem();\n \"obsFisco\" = new TobsItem();\n \"pDevol\"?: string;\n \"Prod\" = new TProd();\n \"vIPIDevol\"?: string;\n \"vItem\"?: string;\n constructor(input: TDetCollectionItemInput = {}) {\n validateModel(\"TDetCollectionItem\", input);\n if (input[\"DFeReferenciado\"] !== undefined) this[\"DFeReferenciado\"] = new TDFeReferenciado(input[\"DFeReferenciado\"]);\n if (input[\"Imposto\"] !== undefined) this[\"Imposto\"] = new TImposto(input[\"Imposto\"]);\n if (input[\"infAdProd\"] !== undefined) this[\"infAdProd\"] = input[\"infAdProd\"];\n if (input[\"obsCont\"] !== undefined) this[\"obsCont\"] = new TobsItem(input[\"obsCont\"]);\n if (input[\"obsFisco\"] !== undefined) this[\"obsFisco\"] = new TobsItem(input[\"obsFisco\"]);\n if (input[\"pDevol\"] !== undefined) this[\"pDevol\"] = input[\"pDevol\"];\n if (input[\"Prod\"] !== undefined) this[\"Prod\"] = new TProd(input[\"Prod\"]);\n if (input[\"vIPIDevol\"] !== undefined) this[\"vIPIDevol\"] = input[\"vIPIDevol\"];\n if (input[\"vItem\"] !== undefined) this[\"vItem\"] = input[\"vItem\"];\n }\n}\nexport type TdetExportCollectionInput = TdetExportCollectionItemInput[];\nexport class TdetExportCollection extends Array<TdetExportCollectionItem> {\n New(input: TdetExportCollectionItemInput = {}): TdetExportCollectionItem { const item=new TdetExportCollectionItem(input); this.push(item); return item; }\n}\nexport interface TdetExportCollectionItemInput {\n \"chNFe\"?: string;\n \"nDraw\"?: string;\n \"nRE\"?: string;\n \"qExport\"?: string;\n}\nexport class TdetExportCollectionItem {\n \"chNFe\"?: string;\n \"nDraw\"?: string;\n \"nRE\"?: string;\n \"qExport\"?: string;\n constructor(input: TdetExportCollectionItemInput = {}) {\n validateModel(\"TdetExportCollectionItem\", input);\n if (input[\"chNFe\"] !== undefined) this[\"chNFe\"] = input[\"chNFe\"];\n if (input[\"nDraw\"] !== undefined) this[\"nDraw\"] = input[\"nDraw\"];\n if (input[\"nRE\"] !== undefined) this[\"nRE\"] = input[\"nRE\"];\n if (input[\"qExport\"] !== undefined) this[\"qExport\"] = input[\"qExport\"];\n }\n}\nexport type TDFErefCollectionInput = TDFErefCollectionItemInput[];\nexport class TDFErefCollection extends Array<TDFErefCollectionItem> {\n New(input: TDFErefCollectionItemInput = {}): TDFErefCollectionItem { const item=new TDFErefCollectionItem(input); this.push(item); return item; }\n}\nexport interface TDFErefCollectionItemInput {\n \"refDFeChave\"?: string;\n}\nexport class TDFErefCollectionItem {\n \"refDFeChave\"?: string;\n constructor(input: TDFErefCollectionItemInput = {}) {\n validateModel(\"TDFErefCollectionItem\", input);\n if (input[\"refDFeChave\"] !== undefined) this[\"refDFeChave\"] = input[\"refDFeChave\"];\n }\n}\nexport interface TDFeReferenciadoInput {\n \"chaveAcesso\"?: string;\n \"nItem\"?: number;\n}\nexport class TDFeReferenciado {\n \"chaveAcesso\"?: string;\n \"nItem\"?: number;\n constructor(input: TDFeReferenciadoInput = {}) {\n validateModel(\"TDFeReferenciado\", input);\n if (input[\"chaveAcesso\"] !== undefined) this[\"chaveAcesso\"] = input[\"chaveAcesso\"];\n if (input[\"nItem\"] !== undefined) this[\"nItem\"] = input[\"nItem\"];\n }\n}\nexport type TDICollectionInput = TDICollectionItemInput[];\nexport class TDICollection extends Array<TDICollectionItem> {\n New(input: TDICollectionItemInput = {}): TDICollectionItem { const item=new TDICollectionItem(input); this.push(item); return item; }\n}\nexport interface TDICollectionItemInput {\n \"adi\"?: TAdiCollectionInput;\n \"cExportador\"?: string;\n \"CNPJ\"?: string;\n \"dDesemb\"?: string;\n \"dDi\"?: string;\n \"nDi\"?: string;\n \"tpIntermedio\"?: TpcnTipoIntermedio;\n \"tpViaTransp\"?: TpcnTipoViaTransp;\n \"UFDesemb\"?: string;\n \"UFTerceiro\"?: string;\n \"vAFRMM\"?: string;\n \"xLocDesemb\"?: string;\n}\nexport class TDICollectionItem {\n \"adi\" = new TAdiCollection();\n \"cExportador\"?: string;\n \"CNPJ\"?: string;\n \"dDesemb\"?: string;\n \"dDi\"?: string;\n \"nDi\"?: string;\n \"tpIntermedio\"?: TpcnTipoIntermedio;\n \"tpViaTransp\"?: TpcnTipoViaTransp;\n \"UFDesemb\"?: string;\n \"UFTerceiro\"?: string;\n \"vAFRMM\"?: string;\n \"xLocDesemb\"?: string;\n constructor(input: TDICollectionItemInput = {}) {\n validateModel(\"TDICollectionItem\", input);\n if (input[\"adi\"] !== undefined) this[\"adi\"] = Object.assign(new TAdiCollection(), input[\"adi\"].map(v=>new TAdiCollectionItem(v)));\n if (input[\"cExportador\"] !== undefined) this[\"cExportador\"] = input[\"cExportador\"];\n if (input[\"CNPJ\"] !== undefined) this[\"CNPJ\"] = input[\"CNPJ\"];\n if (input[\"dDesemb\"] !== undefined) this[\"dDesemb\"] = input[\"dDesemb\"];\n if (input[\"dDi\"] !== undefined) this[\"dDi\"] = input[\"dDi\"];\n if (input[\"nDi\"] !== undefined) this[\"nDi\"] = input[\"nDi\"];\n if (input[\"tpIntermedio\"] !== undefined) this[\"tpIntermedio\"] = input[\"tpIntermedio\"];\n if (input[\"tpViaTransp\"] !== undefined) this[\"tpViaTransp\"] = input[\"tpViaTransp\"];\n if (input[\"UFDesemb\"] !== undefined) this[\"UFDesemb\"] = input[\"UFDesemb\"];\n if (input[\"UFTerceiro\"] !== undefined) this[\"UFTerceiro\"] = input[\"UFTerceiro\"];\n if (input[\"vAFRMM\"] !== undefined) this[\"vAFRMM\"] = input[\"vAFRMM\"];\n if (input[\"xLocDesemb\"] !== undefined) this[\"xLocDesemb\"] = input[\"xLocDesemb\"];\n }\n}\nexport type TDupCollectionInput = TDupCollectionItemInput[];\nexport class TDupCollection extends Array<TDupCollectionItem> {\n New(input: TDupCollectionItemInput = {}): TDupCollectionItem { const item=new TDupCollectionItem(input); this.push(item); return item; }\n}\nexport interface TDupCollectionItemInput {\n \"dVenc\"?: string;\n \"nDup\"?: string;\n \"vDup\"?: string;\n}\nexport class TDupCollectionItem {\n \"dVenc\"?: string;\n \"nDup\"?: string;\n \"vDup\"?: string;\n constructor(input: TDupCollectionItemInput = {}) {\n validateModel(\"TDupCollectionItem\", input);\n if (input[\"dVenc\"] !== undefined) this[\"dVenc\"] = input[\"dVenc\"];\n if (input[\"nDup\"] !== undefined) this[\"nDup\"] = input[\"nDup\"];\n if (input[\"vDup\"] !== undefined) this[\"vDup\"] = input[\"vDup\"];\n }\n}\nexport interface TEmitInput {\n \"CNAE\"?: string;\n \"CNPJCPF\"?: string;\n \"CRT\"?: TpcnCRT;\n \"EnderEmit\"?: TenderEmitInput;\n \"IE\"?: string;\n \"IEST\"?: string;\n \"IM\"?: string;\n \"ISUFEmit\"?: string;\n \"xFant\"?: string;\n \"xNome\"?: string;\n}\nexport class TEmit {\n \"CNAE\"?: string;\n \"CNPJCPF\"?: string;\n \"CRT\"?: TpcnCRT;\n \"EnderEmit\" = new TenderEmit();\n \"IE\"?: string;\n \"IEST\"?: string;\n \"IM\"?: string;\n \"ISUFEmit\"?: string;\n \"xFant\"?: string;\n \"xNome\"?: string;\n constructor(input: TEmitInput = {}) {\n validateModel(\"TEmit\", input);\n if (input[\"CNAE\"] !== undefined) this[\"CNAE\"] = input[\"CNAE\"];\n if (input[\"CNPJCPF\"] !== undefined) this[\"CNPJCPF\"] = input[\"CNPJCPF\"];\n if (input[\"CRT\"] !== undefined) this[\"CRT\"] = input[\"CRT\"];\n if (input[\"EnderEmit\"] !== undefined) this[\"EnderEmit\"] = new TenderEmit(input[\"EnderEmit\"]);\n if (input[\"IE\"] !== undefined) this[\"IE\"] = input[\"IE\"];\n if (input[\"IEST\"] !== undefined) this[\"IEST\"] = input[\"IEST\"];\n if (input[\"IM\"] !== undefined) this[\"IM\"] = input[\"IM\"];\n if (input[\"ISUFEmit\"] !== undefined) this[\"ISUFEmit\"] = input[\"ISUFEmit\"];\n if (input[\"xFant\"] !== undefined) this[\"xFant\"] = input[\"xFant\"];\n if (input[\"xNome\"] !== undefined) this[\"xNome\"] = input[\"xNome\"];\n }\n}\nexport interface TencerranteInput {\n \"nBico\"?: number;\n \"nBomba\"?: number;\n \"nTanque\"?: number;\n \"vEncFin\"?: string;\n \"vEncIni\"?: string;\n}\nexport class Tencerrante {\n \"nBico\"?: number;\n \"nBomba\"?: number;\n \"nTanque\"?: number;\n \"vEncFin\"?: string;\n \"vEncIni\"?: string;\n constructor(input: TencerranteInput = {}) {\n validateModel(\"Tencerrante\", input);\n if (input[\"nBico\"] !== undefined) this[\"nBico\"] = input[\"nBico\"];\n if (input[\"nBomba\"] !== undefined) this[\"nBomba\"] = input[\"nBomba\"];\n if (input[\"nTanque\"] !== undefined) this[\"nTanque\"] = input[\"nTanque\"];\n if (input[\"vEncFin\"] !== undefined) this[\"vEncFin\"] = input[\"vEncFin\"];\n if (input[\"vEncIni\"] !== undefined) this[\"vEncIni\"] = input[\"vEncIni\"];\n }\n}\nexport interface TEnderDestInput {\n \"CEP\"?: number;\n \"cMun\"?: number;\n \"cPais\"?: number;\n \"fone\"?: string;\n \"nro\"?: string;\n \"UF\"?: string;\n \"xBairro\"?: string;\n \"xCpl\"?: string;\n \"xLgr\"?: string;\n \"xMun\"?: string;\n \"xPais\"?: string;\n}\nexport class TEnderDest {\n \"CEP\"?: number;\n \"cMun\"?: number;\n \"cPais\"?: number;\n \"fone\"?: string;\n \"nro\"?: string;\n \"UF\"?: string;\n \"xBairro\"?: string;\n \"xCpl\"?: string;\n \"xLgr\"?: string;\n \"xMun\"?: string;\n \"xPais\"?: string;\n constructor(input: TEnderDestInput = {}) {\n validateModel(\"TEnderDest\", input);\n if (input[\"CEP\"] !== undefined) this[\"CEP\"] = input[\"CEP\"];\n if (input[\"cMun\"] !== undefined) this[\"cMun\"] = input[\"cMun\"];\n if (input[\"cPais\"] !== undefined) this[\"cPais\"] = input[\"cPais\"];\n if (input[\"fone\"] !== undefined) this[\"fone\"] = input[\"fone\"];\n if (input[\"nro\"] !== undefined) this[\"nro\"] = input[\"nro\"];\n if (input[\"UF\"] !== undefined) this[\"UF\"] = input[\"UF\"];\n if (input[\"xBairro\"] !== undefined) this[\"xBairro\"] = input[\"xBairro\"];\n if (input[\"xCpl\"] !== undefined) this[\"xCpl\"] = input[\"xCpl\"];\n if (input[\"xLgr\"] !== undefined) this[\"xLgr\"] = input[\"xLgr\"];\n if (input[\"xMun\"] !== undefined) this[\"xMun\"] = input[\"xMun\"];\n if (input[\"xPais\"] !== undefined) this[\"xPais\"] = input[\"xPais\"];\n }\n}\nexport interface TenderEmitInput {\n \"CEP\"?: number;\n \"cMun\"?: number;\n \"cPais\"?: number;\n \"fone\"?: string;\n \"nro\"?: string;\n \"UF\"?: string;\n \"xBairro\"?: string;\n \"xCpl\"?: string;\n \"xLgr\"?: string;\n \"xMun\"?: string;\n \"xPais\"?: string;\n}\nexport class TenderEmit {\n \"CEP\"?: number;\n \"cMun\"?: number;\n \"cPais\"?: number;\n \"fone\"?: string;\n \"nro\"?: string;\n \"UF\"?: string;\n \"xBairro\"?: string;\n \"xCpl\"?: string;\n \"xLgr\"?: string;\n \"xMun\"?: string;\n \"xPais\"?: string;\n constructor(input: TenderEmitInput = {}) {\n validateModel(\"TenderEmit\", input);\n if (input[\"CEP\"] !== undefined) this[\"CEP\"] = input[\"CEP\"];\n if (input[\"cMun\"] !== undefined) this[\"cMun\"] = input[\"cMun\"];\n if (input[\"cPais\"] !== undefined) this[\"cPais\"] = input[\"cPais\"];\n if (input[\"fone\"] !== undefined) this[\"fone\"] = input[\"fone\"];\n if (input[\"nro\"] !== undefined) this[\"nro\"] = input[\"nro\"];\n if (input[\"UF\"] !== undefined) this[\"UF\"] = input[\"UF\"];\n if (input[\"xBairro\"] !== undefined) this[\"xBairro\"] = input[\"xBairro\"];\n if (input[\"xCpl\"] !== undefined) this[\"xCpl\"] = input[\"xCpl\"];\n if (input[\"xLgr\"] !== undefined) this[\"xLgr\"] = input[\"xLgr\"];\n if (input[\"xMun\"] !== undefined) this[\"xMun\"] = input[\"xMun\"];\n if (input[\"xPais\"] !== undefined) this[\"xPais\"] = input[\"xPais\"];\n }\n}\nexport interface TEntregaInput {\n \"CEP\"?: number;\n \"cMun\"?: number;\n \"CNPJCPF\"?: string;\n \"cPais\"?: number;\n \"Email\"?: string;\n \"fone\"?: string;\n \"IE\"?: string;\n \"nro\"?: string;\n \"UF\"?: string;\n \"xBairro\"?: string;\n \"xCpl\"?: string;\n \"xLgr\"?: string;\n \"xMun\"?: string;\n \"xNome\"?: string;\n \"xPais\"?: string;\n}\nexport class TEntrega {\n \"CEP\"?: number;\n \"cMun\"?: number;\n \"CNPJCPF\"?: string;\n \"cPais\"?: number;\n \"Email\"?: string;\n \"fone\"?: string;\n \"IE\"?: string;\n \"nro\"?: string;\n \"UF\"?: string;\n \"xBairro\"?: string;\n \"xCpl\"?: string;\n \"xLgr\"?: string;\n \"xMun\"?: string;\n \"xNome\"?: string;\n \"xPais\"?: string;\n constructor(input: TEntregaInput = {}) {\n validateModel(\"TEntrega\", input);\n if (input[\"CEP\"] !== undefined) this[\"CEP\"] = input[\"CEP\"];\n if (input[\"cMun\"] !== undefined) this[\"cMun\"] = input[\"cMun\"];\n if (input[\"CNPJCPF\"] !== undefined) this[\"CNPJCPF\"] = input[\"CNPJCPF\"];\n if (input[\"cPais\"] !== undefined) this[\"cPais\"] = input[\"cPais\"];\n if (input[\"Email\"] !== undefined) this[\"Email\"] = input[\"Email\"];\n if (input[\"fone\"] !== undefined) this[\"fone\"] = input[\"fone\"];\n if (input[\"IE\"] !== undefined) this[\"IE\"] = input[\"IE\"];\n if (input[\"nro\"] !== undefined) this[\"nro\"] = input[\"nro\"];\n if (input[\"UF\"] !== undefined) this[\"UF\"] = input[\"UF\"];\n if (input[\"xBairro\"] !== undefined) this[\"xBairro\"] = input[\"xBairro\"];\n if (input[\"xCpl\"] !== undefined) this[\"xCpl\"] = input[\"xCpl\"];\n if (input[\"xLgr\"] !== undefined) this[\"xLgr\"] = input[\"xLgr\"];\n if (input[\"xMun\"] !== undefined) this[\"xMun\"] = input[\"xMun\"];\n if (input[\"xNome\"] !== undefined) this[\"xNome\"] = input[\"xNome\"];\n if (input[\"xPais\"] !== undefined) this[\"xPais\"] = input[\"xPais\"];\n }\n}\nexport interface TExportaInput {\n \"UFembarq\"?: string;\n \"UFSaidaPais\"?: string;\n \"xLocDespacho\"?: string;\n \"xLocEmbarq\"?: string;\n \"xLocExporta\"?: string;\n}\nexport class TExporta {\n \"UFembarq\"?: string;\n \"UFSaidaPais\"?: string;\n \"xLocDespacho\"?: string;\n \"xLocEmbarq\"?: string;\n \"xLocExporta\"?: string;\n constructor(input: TExportaInput = {}) {\n validateModel(\"TExporta\", input);\n if (input[\"UFembarq\"] !== undefined) this[\"UFembarq\"] = input[\"UFembarq\"];\n if (input[\"UFSaidaPais\"] !== undefined) this[\"UFSaidaPais\"] = input[\"UFSaidaPais\"];\n if (input[\"xLocDespacho\"] !== undefined) this[\"xLocDespacho\"] = input[\"xLocDespacho\"];\n if (input[\"xLocEmbarq\"] !== undefined) this[\"xLocEmbarq\"] = input[\"xLocEmbarq\"];\n if (input[\"xLocExporta\"] !== undefined) this[\"xLocExporta\"] = input[\"xLocExporta\"];\n }\n}\nexport interface TFatInput {\n \"nFat\"?: string;\n \"vDesc\"?: string;\n \"vLiq\"?: string;\n \"vOrig\"?: string;\n}\nexport class TFat {\n \"nFat\"?: string;\n \"vDesc\"?: string;\n \"vLiq\"?: string;\n \"vOrig\"?: string;\n constructor(input: TFatInput = {}) {\n validateModel(\"TFat\", input);\n if (input[\"nFat\"] !== undefined) this[\"nFat\"] = input[\"nFat\"];\n if (input[\"vDesc\"] !== undefined) this[\"vDesc\"] = input[\"vDesc\"];\n if (input[\"vLiq\"] !== undefined) this[\"vLiq\"] = input[\"vLiq\"];\n if (input[\"vOrig\"] !== undefined) this[\"vOrig\"] = input[\"vOrig\"];\n }\n}\nexport type TForDiaCollectionInput = TForDiaCollectionItemInput[];\nexport class TForDiaCollection extends Array<TForDiaCollectionItem> {\n New(input: TForDiaCollectionItemInput = {}): TForDiaCollectionItem { const item=new TForDiaCollectionItem(input); this.push(item); return item; }\n}\nexport interface TForDiaCollectionItemInput {\n \"dia\"?: number;\n \"qtde\"?: string;\n}\nexport class TForDiaCollectionItem {\n \"dia\"?: number;\n \"qtde\"?: string;\n constructor(input: TForDiaCollectionItemInput = {}) {\n validateModel(\"TForDiaCollectionItem\", input);\n if (input[\"dia\"] !== undefined) this[\"dia\"] = input[\"dia\"];\n if (input[\"qtde\"] !== undefined) this[\"qtde\"] = input[\"qtde\"];\n }\n}\nexport interface TgAjusteCompetInput {\n \"competApur\"?: string;\n \"vCBS\"?: string;\n \"vIBS\"?: string;\n}\nexport class TgAjusteCompet {\n \"competApur\"?: string;\n \"vCBS\"?: string;\n \"vIBS\"?: string;\n constructor(input: TgAjusteCompetInput = {}) {\n validateModel(\"TgAjusteCompet\", input);\n if (input[\"competApur\"] !== undefined) this[\"competApur\"] = input[\"competApur\"];\n if (input[\"vCBS\"] !== undefined) this[\"vCBS\"] = input[\"vCBS\"];\n if (input[\"vIBS\"] !== undefined) this[\"vIBS\"] = input[\"vIBS\"];\n }\n}\nexport interface TgALCZFMCBSInput {\n \"nProcSuframa\"?: string;\n \"pAliqEfetRegCBS\"?: string;\n \"tpALCZFMCBS\"?: TtpALCZFMCBS;\n \"vTribRegCBS\"?: string;\n}\nexport class TgALCZFMCBS {\n \"nProcSuframa\"?: string;\n \"pAliqEfetRegCBS\"?: string;\n \"tpALCZFMCBS\"?: TtpALCZFMCBS;\n \"vTribRegCBS\"?: string;\n constructor(input: TgALCZFMCBSInput = {}) {\n validateModel(\"TgALCZFMCBS\", input);\n if (input[\"nProcSuframa\"] !== undefined) this[\"nProcSuframa\"] = input[\"nProcSuframa\"];\n if (input[\"pAliqEfetRegCBS\"] !== undefined) this[\"pAliqEfetRegCBS\"] = input[\"pAliqEfetRegCBS\"];\n if (input[\"tpALCZFMCBS\"] !== undefined) this[\"tpALCZFMCBS\"] = input[\"tpALCZFMCBS\"];\n if (input[\"vTribRegCBS\"] !== undefined) this[\"vTribRegCBS\"] = input[\"vTribRegCBS\"];\n }\n}\nexport interface TgCBSInput {\n \"vCBS\"?: string;\n \"vCredPres\"?: string;\n \"vCredPresCondSus\"?: string;\n \"vDevTrib\"?: string;\n \"vDif\"?: string;\n}\nexport class TgCBS {\n \"vCBS\"?: string;\n \"vCredPres\"?: string;\n \"vCredPresCondSus\"?: string;\n \"vDevTrib\"?: string;\n \"vDif\"?: string;\n constructor(input: TgCBSInput = {}) {\n validateModel(\"TgCBS\", input);\n if (input[\"vCBS\"] !== undefined) this[\"vCBS\"] = input[\"vCBS\"];\n if (input[\"vCredPres\"] !== undefined) this[\"vCredPres\"] = input[\"vCredPres\"];\n if (input[\"vCredPresCondSus\"] !== undefined) this[\"vCredPresCondSus\"] = input[\"vCredPresCondSus\"];\n if (input[\"vDevTrib\"] !== undefined) this[\"vDevTrib\"] = input[\"vDevTrib\"];\n if (input[\"vDif\"] !== undefined) this[\"vDif\"] = input[\"vDif\"];\n }\n}\nexport interface TgCBSMonoAdRemInput {\n \"gMonoPadrao\"?: TgMonoPadraoCBSQtdeInput;\n \"gMonoRet\"?: TgMonoRetCBSInput;\n \"gMonoReten\"?: TgMonoRetenCBSQtdeInput;\n \"gpBioDiferenca\"?: TgpBioDiferencaCBSInput;\n}\nexport class TgCBSMonoAdRem {\n \"gMonoPadrao\" = new TgMonoPadraoCBSQtde();\n \"gMonoRet\" = new TgMonoRetCBS();\n \"gMonoReten\" = new TgMonoRetenCBSQtde();\n \"gpBioDiferenca\" = new TgpBioDiferencaCBS();\n constructor(input: TgCBSMonoAdRemInput = {}) {\n validateModel(\"TgCBSMonoAdRem\", input);\n if (input[\"gMonoPadrao\"] !== undefined) this[\"gMonoPadrao\"] = new TgMonoPadraoCBSQtde(input[\"gMonoPadrao\"]);\n if (input[\"gMonoRet\"] !== undefined) this[\"gMonoRet\"] = new TgMonoRetCBS(input[\"gMonoRet\"]);\n if (input[\"gMonoReten\"] !== undefined) this[\"gMonoReten\"] = new TgMonoRetenCBSQtde(input[\"gMonoReten\"]);\n if (input[\"gpBioDiferenca\"] !== undefined) this[\"gpBioDiferenca\"] = new TgpBioDiferencaCBS(input[\"gpBioDiferenca\"]);\n }\n}\nexport interface TgCBSMonoAdValoremInput {\n \"gMonoPadrao\"?: TgMonoPadraoCBSAliqInput;\n \"gMonoRet\"?: TgMonoRetCBSInput;\n \"gMonoReten\"?: TgMonoRetenCBSAliqInput;\n \"gpBioDiferenca\"?: TgpBioDiferencaCBSInput;\n}\nexport class TgCBSMonoAdValorem {\n \"gMonoPadrao\" = new TgMonoPadraoCBSAliq();\n \"gMonoRet\" = new TgMonoRetCBS();\n \"gMonoReten\" = new TgMonoRetenCBSAliq();\n \"gpBioDiferenca\" = new TgpBioDiferencaCBS();\n constructor(input: TgCBSMonoAdValoremInput = {}) {\n validateModel(\"TgCBSMonoAdValorem\", input);\n if (input[\"gMonoPadrao\"] !== undefined) this[\"gMonoPadrao\"] = new TgMonoPadraoCBSAliq(input[\"gMonoPadrao\"]);\n if (input[\"gMonoRet\"] !== undefined) this[\"gMonoRet\"] = new TgMonoRetCBS(input[\"gMonoRet\"]);\n if (input[\"gMonoReten\"] !== undefined) this[\"gMonoReten\"] = new TgMonoRetenCBSAliq(input[\"gMonoReten\"]);\n if (input[\"gpBioDiferenca\"] !== undefined) this[\"gpBioDiferenca\"] = new TgpBioDiferencaCBS(input[\"gpBioDiferenca\"]);\n }\n}\nexport interface TgCBSValoresInput {\n \"gALCZFMCBS\"?: TgALCZFMCBSInput;\n \"gDevTrib\"?: TgDevTribInput;\n \"gDif\"?: TgDifInput;\n \"gRed\"?: TgRedInput;\n \"pCBS\"?: string;\n \"vCBS\"?: string;\n}\nexport class TgCBSValores {\n \"gALCZFMCBS\" = new TgALCZFMCBS();\n \"gDevTrib\" = new TgDevTrib();\n \"gDif\" = new TgDif();\n \"gRed\" = new TgRed();\n \"pCBS\"?: string;\n \"vCBS\"?: string;\n constructor(input: TgCBSValoresInput = {}) {\n validateModel(\"TgCBSValores\", input);\n if (input[\"gALCZFMCBS\"] !== undefined) this[\"gALCZFMCBS\"] = new TgALCZFMCBS(input[\"gALCZFMCBS\"]);\n if (input[\"gDevTrib\"] !== undefined) this[\"gDevTrib\"] = new TgDevTrib(input[\"gDevTrib\"]);\n if (input[\"gDif\"] !== undefined) this[\"gDif\"] = new TgDif(input[\"gDif\"]);\n if (input[\"gRed\"] !== undefined) this[\"gRed\"] = new TgRed(input[\"gRed\"]);\n if (input[\"pCBS\"] !== undefined) this[\"pCBS\"] = input[\"pCBS\"];\n if (input[\"vCBS\"] !== undefined) this[\"vCBS\"] = input[\"vCBS\"];\n }\n}\nexport interface TgCompraGovInput {\n \"pRedutor\"?: string;\n \"refDFeAnt\"?: TDFErefCollectionInput;\n \"tpEnteGov\"?: TtpEnteGov;\n \"tpOperGov\"?: TtpOperGov;\n}\nexport class TgCompraGov {\n \"pRedutor\"?: string;\n \"refDFeAnt\" = new TDFErefCollection();\n \"tpEnteGov\"?: TtpEnteGov;\n \"tpOperGov\"?: TtpOperGov;\n constructor(input: TgCompraGovInput = {}) {\n validateModel(\"TgCompraGov\", input);\n if (input[\"pRedutor\"] !== undefined) this[\"pRedutor\"] = input[\"pRedutor\"];\n if (input[\"refDFeAnt\"] !== undefined) this[\"refDFeAnt\"] = Object.assign(new TDFErefCollection(), input[\"refDFeAnt\"].map(v=>new TDFErefCollectionItem(v)));\n if (input[\"tpEnteGov\"] !== undefined) this[\"tpEnteGov\"] = input[\"tpEnteGov\"];\n if (input[\"tpOperGov\"] !== undefined) this[\"tpOperGov\"] = input[\"tpOperGov\"];\n }\n}\nexport interface TgCredPresOperInput {\n \"cCredPres\"?: TcCredPres;\n \"gCBSCredPres\"?: TgIBSCBSCredPresInput;\n \"gIBSCredPres\"?: TgIBSCBSCredPresInput;\n \"vBCCredPres\"?: string;\n}\nexport class TgCredPresOper {\n \"cCredPres\"?: TcCredPres;\n \"gCBSCredPres\" = new TgIBSCBSCredPres();\n \"gIBSCredPres\" = new TgIBSCBSCredPres();\n \"vBCCredPres\"?: string;\n constructor(input: TgCredPresOperInput = {}) {\n validateModel(\"TgCredPresOper\", input);\n if (input[\"cCredPres\"] !== undefined) this[\"cCredPres\"] = input[\"cCredPres\"];\n if (input[\"gCBSCredPres\"] !== undefined) this[\"gCBSCredPres\"] = new TgIBSCBSCredPres(input[\"gCBSCredPres\"]);\n if (input[\"gIBSCredPres\"] !== undefined) this[\"gIBSCredPres\"] = new TgIBSCBSCredPres(input[\"gIBSCredPres\"]);\n if (input[\"vBCCredPres\"] !== undefined) this[\"vBCCredPres\"] = input[\"vBCCredPres\"];\n }\n}\nexport interface TgDevTribInput {\n \"pDevTrib\"?: string;\n \"vDevTrib\"?: string;\n}\nexport class TgDevTrib {\n \"pDevTrib\"?: string;\n \"vDevTrib\"?: string;\n constructor(input: TgDevTribInput = {}) {\n validateModel(\"TgDevTrib\", input);\n if (input[\"pDevTrib\"] !== undefined) this[\"pDevTrib\"] = input[\"pDevTrib\"];\n if (input[\"vDevTrib\"] !== undefined) this[\"vDevTrib\"] = input[\"vDevTrib\"];\n }\n}\nexport interface TgDifInput {\n \"pDif\"?: string;\n \"vDif\"?: string;\n}\nexport class TgDif {\n \"pDif\"?: string;\n \"vDif\"?: string;\n constructor(input: TgDifInput = {}) {\n validateModel(\"TgDif\", input);\n if (input[\"pDif\"] !== undefined) this[\"pDif\"] = input[\"pDif\"];\n if (input[\"vDif\"] !== undefined) this[\"vDif\"] = input[\"vDif\"];\n }\n}\nexport interface TgEstornoCredInput {\n \"vCBSEstCred\"?: string;\n \"vIBSEstCred\"?: string;\n}\nexport class TgEstornoCred {\n \"vCBSEstCred\"?: string;\n \"vIBSEstCred\"?: string;\n constructor(input: TgEstornoCredInput = {}) {\n validateModel(\"TgEstornoCred\", input);\n if (input[\"vCBSEstCred\"] !== undefined) this[\"vCBSEstCred\"] = input[\"vCBSEstCred\"];\n if (input[\"vIBSEstCred\"] !== undefined) this[\"vIBSEstCred\"] = input[\"vIBSEstCred\"];\n }\n}\nexport interface TgIBSInput {\n \"gIBSMunTot\"?: TgIBSMunTotInput;\n \"gIBSUFTot\"?: TgIBSUFTotInput;\n \"vCredPres\"?: string;\n \"vCredPresCondSus\"?: string;\n \"vIBS\"?: string;\n}\nexport class TgIBS {\n \"gIBSMunTot\" = new TgIBSMunTot();\n \"gIBSUFTot\" = new TgIBSUFTot();\n \"vCredPres\"?: string;\n \"vCredPresCondSus\"?: string;\n \"vIBS\"?: string;\n constructor(input: TgIBSInput = {}) {\n validateModel(\"TgIBS\", input);\n if (input[\"gIBSMunTot\"] !== undefined) this[\"gIBSMunTot\"] = new TgIBSMunTot(input[\"gIBSMunTot\"]);\n if (input[\"gIBSUFTot\"] !== undefined) this[\"gIBSUFTot\"] = new TgIBSUFTot(input[\"gIBSUFTot\"]);\n if (input[\"vCredPres\"] !== undefined) this[\"vCredPres\"] = input[\"vCredPres\"];\n if (input[\"vCredPresCondSus\"] !== undefined) this[\"vCredPresCondSus\"] = input[\"vCredPresCondSus\"];\n if (input[\"vIBS\"] !== undefined) this[\"vIBS\"] = input[\"vIBS\"];\n }\n}\nexport interface TgIBSCBSInput {\n \"gCBS\"?: TgCBSValoresInput;\n \"gIBSMun\"?: TgIBSMunValoresInput;\n \"gIBSUF\"?: TgIBSUFValoresInput;\n \"gTribCompraGov\"?: TgTribCompraGovInput;\n \"gTribRegular\"?: TgTribRegularInput;\n \"vBC\"?: string;\n \"vIBS\"?: string;\n \"vOperacIndiv\"?: string;\n \"vRedAjusteIndiv\"?: string;\n \"vRedSocialIndiv\"?: string;\n \"vTornaIndiv\"?: string;\n}\nexport class TgIBSCBS {\n \"gCBS\" = new TgCBSValores();\n \"gIBSMun\" = new TgIBSMunValores();\n \"gIBSUF\" = new TgIBSUFValores();\n \"gTribCompraGov\" = new TgTribCompraGov();\n \"gTribRegular\" = new TgTribRegular();\n \"vBC\"?: string;\n \"vIBS\"?: string;\n \"vOperacIndiv\"?: string;\n \"vRedAjusteIndiv\"?: string;\n \"vRedSocialIndiv\"?: string;\n \"vTornaIndiv\"?: string;\n constructor(input: TgIBSCBSInput = {}) {\n validateModel(\"TgIBSCBS\", input);\n if (input[\"gCBS\"] !== undefined) this[\"gCBS\"] = new TgCBSValores(input[\"gCBS\"]);\n if (input[\"gIBSMun\"] !== undefined) this[\"gIBSMun\"] = new TgIBSMunValores(input[\"gIBSMun\"]);\n if (input[\"gIBSUF\"] !== undefined) this[\"gIBSUF\"] = new TgIBSUFValores(input[\"gIBSUF\"]);\n if (input[\"gTribCompraGov\"] !== undefined) this[\"gTribCompraGov\"] = new TgTribCompraGov(input[\"gTribCompraGov\"]);\n if (input[\"gTribRegular\"] !== undefined) this[\"gTribRegular\"] = new TgTribRegular(input[\"gTribRegular\"]);\n if (input[\"vBC\"] !== undefined) this[\"vBC\"] = input[\"vBC\"];\n if (input[\"vIBS\"] !== undefined) this[\"vIBS\"] = input[\"vIBS\"];\n if (input[\"vOperacIndiv\"] !== undefined) this[\"vOperacIndiv\"] = input[\"vOperacIndiv\"];\n if (input[\"vRedAjusteIndiv\"] !== undefined) this[\"vRedAjusteIndiv\"] = input[\"vRedAjusteIndiv\"];\n if (input[\"vRedSocialIndiv\"] !== undefined) this[\"vRedSocialIndiv\"] = input[\"vRedSocialIndiv\"];\n if (input[\"vTornaIndiv\"] !== undefined) this[\"vTornaIndiv\"] = input[\"vTornaIndiv\"];\n }\n}\nexport interface TgIBSCBSCredPresInput {\n \"pCredPres\"?: string;\n \"vCredPres\"?: string;\n \"vCredPresCondSus\"?: string;\n}\nexport class TgIBSCBSCredPres {\n \"pCredPres\"?: string;\n \"vCredPres\"?: string;\n \"vCredPresCondSus\"?: string;\n constructor(input: TgIBSCBSCredPresInput = {}) {\n validateModel(\"TgIBSCBSCredPres\", input);\n if (input[\"pCredPres\"] !== undefined) this[\"pCredPres\"] = input[\"pCredPres\"];\n if (input[\"vCredPres\"] !== undefined) this[\"vCredPres\"] = input[\"vCredPres\"];\n if (input[\"vCredPresCondSus\"] !== undefined) this[\"vCredPresCondSus\"] = input[\"vCredPresCondSus\"];\n }\n}\nexport interface TgIBSCBSMonoInput {\n \"gCBSMonoAdRem\"?: TgCBSMonoAdRemInput;\n \"gCBSMonoAdValorem\"?: TgCBSMonoAdValoremInput;\n \"gIBSMonoAdRem\"?: TgIBSMonoAdRemInput;\n \"gIBSMonoAdValorem\"?: TgIBSMonoAdValoremInput;\n \"vTotCBSMonoItem\"?: string;\n \"vTotIBSMonoItem\"?: string;\n}\nexport class TgIBSCBSMono {\n \"gCBSMonoAdRem\" = new TgCBSMonoAdRem();\n \"gCBSMonoAdValorem\" = new TgCBSMonoAdValorem();\n \"gIBSMonoAdRem\" = new TgIBSMonoAdRem();\n \"gIBSMonoAdValorem\" = new TgIBSMonoAdValorem();\n \"vTotCBSMonoItem\"?: string;\n \"vTotIBSMonoItem\"?: string;\n constructor(input: TgIBSCBSMonoInput = {}) {\n validateModel(\"TgIBSCBSMono\", input);\n if (input[\"gCBSMonoAdRem\"] !== undefined) this[\"gCBSMonoAdRem\"] = new TgCBSMonoAdRem(input[\"gCBSMonoAdRem\"]);\n if (input[\"gCBSMonoAdValorem\"] !== undefined) this[\"gCBSMonoAdValorem\"] = new TgCBSMonoAdValorem(input[\"gCBSMonoAdValorem\"]);\n if (input[\"gIBSMonoAdRem\"] !== undefined) this[\"gIBSMonoAdRem\"] = new TgIBSMonoAdRem(input[\"gIBSMonoAdRem\"]);\n if (input[\"gIBSMonoAdValorem\"] !== undefined) this[\"gIBSMonoAdValorem\"] = new TgIBSMonoAdValorem(input[\"gIBSMonoAdValorem\"]);\n if (input[\"vTotCBSMonoItem\"] !== undefined) this[\"vTotCBSMonoItem\"] = input[\"vTotCBSMonoItem\"];\n if (input[\"vTotIBSMonoItem\"] !== undefined) this[\"vTotIBSMonoItem\"] = input[\"vTotIBSMonoItem\"];\n }\n}\nexport interface TgIBSMonoAdRemInput {\n \"gMonoPadrao\"?: TgMonoPadraoIBSQtdeInput;\n \"gMonoRet\"?: TgMonoRetIBSInput;\n \"gMonoReten\"?: TgMonoRetenIBSQtdeInput;\n \"gpBioDiferenca\"?: TgpBioDiferencaIBSInput;\n}\nexport class TgIBSMonoAdRem {\n \"gMonoPadrao\" = new TgMonoPadraoIBSQtde();\n \"gMonoRet\" = new TgMonoRetIBS();\n \"gMonoReten\" = new TgMonoRetenIBSQtde();\n \"gpBioDiferenca\" = new TgpBioDiferencaIBS();\n constructor(input: TgIBSMonoAdRemInput = {}) {\n validateModel(\"TgIBSMonoAdRem\", input);\n if (input[\"gMonoPadrao\"] !== undefined) this[\"gMonoPadrao\"] = new TgMonoPadraoIBSQtde(input[\"gMonoPadrao\"]);\n if (input[\"gMonoRet\"] !== undefined) this[\"gMonoRet\"] = new TgMonoRetIBS(input[\"gMonoRet\"]);\n if (input[\"gMonoReten\"] !== undefined) this[\"gMonoReten\"] = new TgMonoRetenIBSQtde(input[\"gMonoReten\"]);\n if (input[\"gpBioDiferenca\"] !== undefined) this[\"gpBioDiferenca\"] = new TgpBioDiferencaIBS(input[\"gpBioDiferenca\"]);\n }\n}\nexport interface TgIBSMonoAdValoremInput {\n \"gMonoPadrao\"?: TgMonoPadraoIBSAliqInput;\n \"gMonoRet\"?: TgMonoRetIBSInput;\n \"gMonoReten\"?: TgMonoRetenIBSAliqInput;\n \"gpBioDiferenca\"?: TgpBioDiferencaIBSInput;\n}\nexport class TgIBSMonoAdValorem {\n \"gMonoPadrao\" = new TgMonoPadraoIBSAliq();\n \"gMonoRet\" = new TgMonoRetIBS();\n \"gMonoReten\" = new TgMonoRetenIBSAliq();\n \"gpBioDiferenca\" = new TgpBioDiferencaIBS();\n constructor(input: TgIBSMonoAdValoremInput = {}) {\n validateModel(\"TgIBSMonoAdValorem\", input);\n if (input[\"gMonoPadrao\"] !== undefined) this[\"gMonoPadrao\"] = new TgMonoPadraoIBSAliq(input[\"gMonoPadrao\"]);\n if (input[\"gMonoRet\"] !== undefined) this[\"gMonoRet\"] = new TgMonoRetIBS(input[\"gMonoRet\"]);\n if (input[\"gMonoReten\"] !== undefined) this[\"gMonoReten\"] = new TgMonoRetenIBSAliq(input[\"gMonoReten\"]);\n if (input[\"gpBioDiferenca\"] !== undefined) this[\"gpBioDiferenca\"] = new TgpBioDiferencaIBS(input[\"gpBioDiferenca\"]);\n }\n}\nexport interface TgIBSMunTotInput {\n \"vDevTrib\"?: string;\n \"vDif\"?: string;\n \"vIBSMun\"?: string;\n}\nexport class TgIBSMunTot {\n \"vDevTrib\"?: string;\n \"vDif\"?: string;\n \"vIBSMun\"?: string;\n constructor(input: TgIBSMunTotInput = {}) {\n validateModel(\"TgIBSMunTot\", input);\n if (input[\"vDevTrib\"] !== undefined) this[\"vDevTrib\"] = input[\"vDevTrib\"];\n if (input[\"vDif\"] !== undefined) this[\"vDif\"] = input[\"vDif\"];\n if (input[\"vIBSMun\"] !== undefined) this[\"vIBSMun\"] = input[\"vIBSMun\"];\n }\n}\nexport interface TgIBSMunValoresInput {\n \"gDevTrib\"?: TgDevTribInput;\n \"gDif\"?: TgDifInput;\n \"gRed\"?: TgRedInput;\n \"pIBSMun\"?: string;\n \"vIBSMun\"?: string;\n}\nexport class TgIBSMunValores {\n \"gDevTrib\" = new TgDevTrib();\n \"gDif\" = new TgDif();\n \"gRed\" = new TgRed();\n \"pIBSMun\"?: string;\n \"vIBSMun\"?: string;\n constructor(input: TgIBSMunValoresInput = {}) {\n validateModel(\"TgIBSMunValores\", input);\n if (input[\"gDevTrib\"] !== undefined) this[\"gDevTrib\"] = new TgDevTrib(input[\"gDevTrib\"]);\n if (input[\"gDif\"] !== undefined) this[\"gDif\"] = new TgDif(input[\"gDif\"]);\n if (input[\"gRed\"] !== undefined) this[\"gRed\"] = new TgRed(input[\"gRed\"]);\n if (input[\"pIBSMun\"] !== undefined) this[\"pIBSMun\"] = input[\"pIBSMun\"];\n if (input[\"vIBSMun\"] !== undefined) this[\"vIBSMun\"] = input[\"vIBSMun\"];\n }\n}\nexport interface TgIBSUFTotInput {\n \"vDevTrib\"?: string;\n \"vDif\"?: string;\n \"vIBSUF\"?: string;\n}\nexport class TgIBSUFTot {\n \"vDevTrib\"?: string;\n \"vDif\"?: string;\n \"vIBSUF\"?: string;\n constructor(input: TgIBSUFTotInput = {}) {\n validateModel(\"TgIBSUFTot\", input);\n if (input[\"vDevTrib\"] !== undefined) this[\"vDevTrib\"] = input[\"vDevTrib\"];\n if (input[\"vDif\"] !== undefined) this[\"vDif\"] = input[\"vDif\"];\n if (input[\"vIBSUF\"] !== undefined) this[\"vIBSUF\"] = input[\"vIBSUF\"];\n }\n}\nexport interface TgIBSUFValoresInput {\n \"gDevTrib\"?: TgDevTribInput;\n \"gDif\"?: TgDifInput;\n \"gRed\"?: TgRedInput;\n \"pIBSUF\"?: string;\n \"vIBSUF\"?: string;\n}\nexport class TgIBSUFValores {\n \"gDevTrib\" = new TgDevTrib();\n \"gDif\" = new TgDif();\n \"gRed\" = new TgRed();\n \"pIBSUF\"?: string;\n \"vIBSUF\"?: string;\n constructor(input: TgIBSUFValoresInput = {}) {\n validateModel(\"TgIBSUFValores\", input);\n if (input[\"gDevTrib\"] !== undefined) this[\"gDevTrib\"] = new TgDevTrib(input[\"gDevTrib\"]);\n if (input[\"gDif\"] !== undefined) this[\"gDif\"] = new TgDif(input[\"gDif\"]);\n if (input[\"gRed\"] !== undefined) this[\"gRed\"] = new TgRed(input[\"gRed\"]);\n if (input[\"pIBSUF\"] !== undefined) this[\"pIBSUF\"] = input[\"pIBSUF\"];\n if (input[\"vIBSUF\"] !== undefined) this[\"vIBSUF\"] = input[\"vIBSUF\"];\n }\n}\nexport interface TgISInput {\n \"adRemIS\"?: string;\n \"cClassTribIS\"?: string;\n \"CSTIS\"?: string;\n \"pIS\"?: string;\n \"qTrib\"?: string;\n \"uTrib\"?: string;\n \"vBCIS\"?: string;\n \"vIS\"?: string;\n}\nexport class TgIS {\n \"adRemIS\"?: string;\n \"cClassTribIS\"?: string;\n \"CSTIS\"?: string;\n \"pIS\"?: string;\n \"qTrib\"?: string;\n \"uTrib\"?: string;\n \"vBCIS\"?: string;\n \"vIS\"?: string;\n constructor(input: TgISInput = {}) {\n validateModel(\"TgIS\", input);\n if (input[\"adRemIS\"] !== undefined) this[\"adRemIS\"] = input[\"adRemIS\"];\n if (input[\"cClassTribIS\"] !== undefined) this[\"cClassTribIS\"] = input[\"cClassTribIS\"];\n if (input[\"CSTIS\"] !== undefined) this[\"CSTIS\"] = input[\"CSTIS\"];\n if (input[\"pIS\"] !== undefined) this[\"pIS\"] = input[\"pIS\"];\n if (input[\"qTrib\"] !== undefined) this[\"qTrib\"] = input[\"qTrib\"];\n if (input[\"uTrib\"] !== undefined) this[\"uTrib\"] = input[\"uTrib\"];\n if (input[\"vBCIS\"] !== undefined) this[\"vBCIS\"] = input[\"vBCIS\"];\n if (input[\"vIS\"] !== undefined) this[\"vIS\"] = input[\"vIS\"];\n }\n}\nexport interface TgMonoInput {\n \"vCBSMono\"?: string;\n \"vCBSMonoRet\"?: string;\n \"vCBSMonoReten\"?: string;\n \"vIBSMono\"?: string;\n \"vIBSMonoRet\"?: string;\n \"vIBSMonoReten\"?: string;\n}\nexport class TgMono {\n \"vCBSMono\"?: string;\n \"vCBSMonoRet\"?: string;\n \"vCBSMonoReten\"?: string;\n \"vIBSMono\"?: string;\n \"vIBSMonoRet\"?: string;\n \"vIBSMonoReten\"?: string;\n constructor(input: TgMonoInput = {}) {\n validateModel(\"TgMono\", input);\n if (input[\"vCBSMono\"] !== undefined) this[\"vCBSMono\"] = input[\"vCBSMono\"];\n if (input[\"vCBSMonoRet\"] !== undefined) this[\"vCBSMonoRet\"] = input[\"vCBSMonoRet\"];\n if (input[\"vCBSMonoReten\"] !== undefined) this[\"vCBSMonoReten\"] = input[\"vCBSMonoReten\"];\n if (input[\"vIBSMono\"] !== undefined) this[\"vIBSMono\"] = input[\"vIBSMono\"];\n if (input[\"vIBSMonoRet\"] !== undefined) this[\"vIBSMonoRet\"] = input[\"vIBSMonoRet\"];\n if (input[\"vIBSMonoReten\"] !== undefined) this[\"vIBSMonoReten\"] = input[\"vIBSMonoReten\"];\n }\n}\nexport interface TgMonoPadraoCBSAliqInput {\n \"pAliqMonoCBS\"?: string;\n \"vBCMono\"?: string;\n \"vCBSMono\"?: string;\n}\nexport class TgMonoPadraoCBSAliq {\n \"pAliqMonoCBS\"?: string;\n \"vBCMono\"?: string;\n \"vCBSMono\"?: string;\n constructor(input: TgMonoPadraoCBSAliqInput = {}) {\n validateModel(\"TgMonoPadraoCBSAliq\", input);\n if (input[\"pAliqMonoCBS\"] !== undefined) this[\"pAliqMonoCBS\"] = input[\"pAliqMonoCBS\"];\n if (input[\"vBCMono\"] !== undefined) this[\"vBCMono\"] = input[\"vBCMono\"];\n if (input[\"vCBSMono\"] !== undefined) this[\"vCBSMono\"] = input[\"vCBSMono\"];\n }\n}\nexport interface TgMonoPadraoCBSQtdeInput {\n \"adRemCBS\"?: string;\n \"qBCMono\"?: string;\n \"vCBSMono\"?: string;\n}\nexport class TgMonoPadraoCBSQtde {\n \"adRemCBS\"?: string;\n \"qBCMono\"?: string;\n \"vCBSMono\"?: string;\n constructor(input: TgMonoPadraoCBSQtdeInput = {}) {\n validateModel(\"TgMonoPadraoCBSQtde\", input);\n if (input[\"adRemCBS\"] !== undefined) this[\"adRemCBS\"] = input[\"adRemCBS\"];\n if (input[\"qBCMono\"] !== undefined) this[\"qBCMono\"] = input[\"qBCMono\"];\n if (input[\"vCBSMono\"] !== undefined) this[\"vCBSMono\"] = input[\"vCBSMono\"];\n }\n}\nexport interface TgMonoPadraoIBSAliqInput {\n \"pAliqMonoMun\"?: string;\n \"pAliqMonoUF\"?: string;\n \"vBCMono\"?: string;\n \"vIBSMono\"?: string;\n \"vIBSMonoMun\"?: string;\n \"vIBSMonoUF\"?: string;\n}\nexport class TgMonoPadraoIBSAliq {\n \"pAliqMonoMun\"?: string;\n \"pAliqMonoUF\"?: string;\n \"vBCMono\"?: string;\n \"vIBSMono\"?: string;\n \"vIBSMonoMun\"?: string;\n \"vIBSMonoUF\"?: string;\n constructor(input: TgMonoPadraoIBSAliqInput = {}) {\n validateModel(\"TgMonoPadraoIBSAliq\", input);\n if (input[\"pAliqMonoMun\"] !== undefined) this[\"pAliqMonoMun\"] = input[\"pAliqMonoMun\"];\n if (input[\"pAliqMonoUF\"] !== undefined) this[\"pAliqMonoUF\"] = input[\"pAliqMonoUF\"];\n if (input[\"vBCMono\"] !== undefined) this[\"vBCMono\"] = input[\"vBCMono\"];\n if (input[\"vIBSMono\"] !== undefined) this[\"vIBSMono\"] = input[\"vIBSMono\"];\n if (input[\"vIBSMonoMun\"] !== undefined) this[\"vIBSMonoMun\"] = input[\"vIBSMonoMun\"];\n if (input[\"vIBSMonoUF\"] !== undefined) this[\"vIBSMonoUF\"] = input[\"vIBSMonoUF\"];\n }\n}\nexport interface TgMonoPadraoIBSQtdeInput {\n \"adRemIBS\"?: string;\n \"qBCMono\"?: string;\n \"vIBSMono\"?: string;\n}\nexport class TgMonoPadraoIBSQtde {\n \"adRemIBS\"?: string;\n \"qBCMono\"?: string;\n \"vIBSMono\"?: string;\n constructor(input: TgMonoPadraoIBSQtdeInput = {}) {\n validateModel(\"TgMonoPadraoIBSQtde\", input);\n if (input[\"adRemIBS\"] !== undefined) this[\"adRemIBS\"] = input[\"adRemIBS\"];\n if (input[\"qBCMono\"] !== undefined) this[\"qBCMono\"] = input[\"qBCMono\"];\n if (input[\"vIBSMono\"] !== undefined) this[\"vIBSMono\"] = input[\"vIBSMono\"];\n }\n}\nexport interface TgMonoRetCBSInput {\n \"vCBSMonoRet\"?: string;\n}\nexport class TgMonoRetCBS {\n \"vCBSMonoRet\"?: string;\n constructor(input: TgMonoRetCBSInput = {}) {\n validateModel(\"TgMonoRetCBS\", input);\n if (input[\"vCBSMonoRet\"] !== undefined) this[\"vCBSMonoRet\"] = input[\"vCBSMonoRet\"];\n }\n}\nexport interface TgMonoRetenCBSAliqInput {\n \"pAliqMonoReten\"?: string;\n \"vBCMonoReten\"?: string;\n \"vCBSMonoReten\"?: string;\n}\nexport class TgMonoRetenCBSAliq {\n \"pAliqMonoReten\"?: string;\n \"vBCMonoReten\"?: string;\n \"vCBSMonoReten\"?: string;\n constructor(input: TgMonoRetenCBSAliqInput = {}) {\n validateModel(\"TgMonoRetenCBSAliq\", input);\n if (input[\"pAliqMonoReten\"] !== undefined) this[\"pAliqMonoReten\"] = input[\"pAliqMonoReten\"];\n if (input[\"vBCMonoReten\"] !== undefined) this[\"vBCMonoReten\"] = input[\"vBCMonoReten\"];\n if (input[\"vCBSMonoReten\"] !== undefined) this[\"vCBSMonoReten\"] = input[\"vCBSMonoReten\"];\n }\n}\nexport interface TgMonoRetenCBSQtdeInput {\n \"adRemCBSReten\"?: string;\n \"qBCMonoReten\"?: string;\n \"vCBSMonoReten\"?: string;\n}\nexport class TgMonoRetenCBSQtde {\n \"adRemCBSReten\"?: string;\n \"qBCMonoReten\"?: string;\n \"vCBSMonoReten\"?: string;\n constructor(input: TgMonoRetenCBSQtdeInput = {}) {\n validateModel(\"TgMonoRetenCBSQtde\", input);\n if (input[\"adRemCBSReten\"] !== undefined) this[\"adRemCBSReten\"] = input[\"adRemCBSReten\"];\n if (input[\"qBCMonoReten\"] !== undefined) this[\"qBCMonoReten\"] = input[\"qBCMonoReten\"];\n if (input[\"vCBSMonoReten\"] !== undefined) this[\"vCBSMonoReten\"] = input[\"vCBSMonoReten\"];\n }\n}\nexport interface TgMonoRetenIBSAliqInput {\n \"pAliqMonoReten\"?: string;\n \"vBCMonoReten\"?: string;\n \"vIBSMonoReten\"?: string;\n}\nexport class TgMonoRetenIBSAliq {\n \"pAliqMonoReten\"?: string;\n \"vBCMonoReten\"?: string;\n \"vIBSMonoReten\"?: string;\n constructor(input: TgMonoRetenIBSAliqInput = {}) {\n validateModel(\"TgMonoRetenIBSAliq\", input);\n if (input[\"pAliqMonoReten\"] !== undefined) this[\"pAliqMonoReten\"] = input[\"pAliqMonoReten\"];\n if (input[\"vBCMonoReten\"] !== undefined) this[\"vBCMonoReten\"] = input[\"vBCMonoReten\"];\n if (input[\"vIBSMonoReten\"] !== undefined) this[\"vIBSMonoReten\"] = input[\"vIBSMonoReten\"];\n }\n}\nexport interface TgMonoRetenIBSQtdeInput {\n \"adRemIBSReten\"?: string;\n \"qBCMonoReten\"?: string;\n \"vIBSMonoReten\"?: string;\n}\nexport class TgMonoRetenIBSQtde {\n \"adRemIBSReten\"?: string;\n \"qBCMonoReten\"?: string;\n \"vIBSMonoReten\"?: string;\n constructor(input: TgMonoRetenIBSQtdeInput = {}) {\n validateModel(\"TgMonoRetenIBSQtde\", input);\n if (input[\"adRemIBSReten\"] !== undefined) this[\"adRemIBSReten\"] = input[\"adRemIBSReten\"];\n if (input[\"qBCMonoReten\"] !== undefined) this[\"qBCMonoReten\"] = input[\"qBCMonoReten\"];\n if (input[\"vIBSMonoReten\"] !== undefined) this[\"vIBSMonoReten\"] = input[\"vIBSMonoReten\"];\n }\n}\nexport interface TgMonoRetIBSInput {\n \"vIBSMonoRet\"?: string;\n}\nexport class TgMonoRetIBS {\n \"vIBSMonoRet\"?: string;\n constructor(input: TgMonoRetIBSInput = {}) {\n validateModel(\"TgMonoRetIBS\", input);\n if (input[\"vIBSMonoRet\"] !== undefined) this[\"vIBSMonoRet\"] = input[\"vIBSMonoRet\"];\n }\n}\nexport interface TgPagAntecipadoInput {\n \"refNFe\"?: TrefDFePagAntCollectionInput;\n}\nexport class TgPagAntecipado {\n \"refNFe\" = new TrefDFePagAntCollection();\n constructor(input: TgPagAntecipadoInput = {}) {\n validateModel(\"TgPagAntecipado\", input);\n if (input[\"refNFe\"] !== undefined) this[\"refNFe\"] = Object.assign(new TrefDFePagAntCollection(), input[\"refNFe\"].map(v=>new TrefDFePagAntCollectionItem(v)));\n }\n}\nexport interface TgpBioDiferencaCBSInput {\n \"qBCBioComb\"?: string;\n \"vCBSDiferenca\"?: string;\n}\nexport class TgpBioDiferencaCBS {\n \"qBCBioComb\"?: string;\n \"vCBSDiferenca\"?: string;\n constructor(input: TgpBioDiferencaCBSInput = {}) {\n validateModel(\"TgpBioDiferencaCBS\", input);\n if (input[\"qBCBioComb\"] !== undefined) this[\"qBCBioComb\"] = input[\"qBCBioComb\"];\n if (input[\"vCBSDiferenca\"] !== undefined) this[\"vCBSDiferenca\"] = input[\"vCBSDiferenca\"];\n }\n}\nexport interface TgpBioDiferencaIBSInput {\n \"qBCBioComb\"?: string;\n \"vIBSDiferenca\"?: string;\n}\nexport class TgpBioDiferencaIBS {\n \"qBCBioComb\"?: string;\n \"vIBSDiferenca\"?: string;\n constructor(input: TgpBioDiferencaIBSInput = {}) {\n validateModel(\"TgpBioDiferencaIBS\", input);\n if (input[\"qBCBioComb\"] !== undefined) this[\"qBCBioComb\"] = input[\"qBCBioComb\"];\n if (input[\"vIBSDiferenca\"] !== undefined) this[\"vIBSDiferenca\"] = input[\"vIBSDiferenca\"];\n }\n}\nexport interface TgRedInput {\n \"pAliqEfet\"?: string;\n \"pRedAliq\"?: string;\n}\nexport class TgRed {\n \"pAliqEfet\"?: string;\n \"pRedAliq\"?: string;\n constructor(input: TgRedInput = {}) {\n validateModel(\"TgRed\", input);\n if (input[\"pAliqEfet\"] !== undefined) this[\"pAliqEfet\"] = input[\"pAliqEfet\"];\n if (input[\"pRedAliq\"] !== undefined) this[\"pRedAliq\"] = input[\"pRedAliq\"];\n }\n}\nexport interface TgTransfCredInput {\n \"vCBS\"?: string;\n \"vIBS\"?: string;\n}\nexport class TgTransfCred {\n \"vCBS\"?: string;\n \"vIBS\"?: string;\n constructor(input: TgTransfCredInput = {}) {\n validateModel(\"TgTransfCred\", input);\n if (input[\"vCBS\"] !== undefined) this[\"vCBS\"] = input[\"vCBS\"];\n if (input[\"vIBS\"] !== undefined) this[\"vIBS\"] = input[\"vIBS\"];\n }\n}\nexport interface TgTribCompraGovInput {\n \"pAliqCBS\"?: string;\n \"pAliqIBSMun\"?: string;\n \"pAliqIBSUF\"?: string;\n \"vTribCBS\"?: string;\n \"vTribIBSMun\"?: string;\n \"vTribIBSUF\"?: string;\n}\nexport class TgTribCompraGov {\n \"pAliqCBS\"?: string;\n \"pAliqIBSMun\"?: string;\n \"pAliqIBSUF\"?: string;\n \"vTribCBS\"?: string;\n \"vTribIBSMun\"?: string;\n \"vTribIBSUF\"?: string;\n constructor(input: TgTribCompraGovInput = {}) {\n validateModel(\"TgTribCompraGov\", input);\n if (input[\"pAliqCBS\"] !== undefined) this[\"pAliqCBS\"] = input[\"pAliqCBS\"];\n if (input[\"pAliqIBSMun\"] !== undefined) this[\"pAliqIBSMun\"] = input[\"pAliqIBSMun\"];\n if (input[\"pAliqIBSUF\"] !== undefined) this[\"pAliqIBSUF\"] = input[\"pAliqIBSUF\"];\n if (input[\"vTribCBS\"] !== undefined) this[\"vTribCBS\"] = input[\"vTribCBS\"];\n if (input[\"vTribIBSMun\"] !== undefined) this[\"vTribIBSMun\"] = input[\"vTribIBSMun\"];\n if (input[\"vTribIBSUF\"] !== undefined) this[\"vTribIBSUF\"] = input[\"vTribIBSUF\"];\n }\n}\nexport interface TgTribRegularInput {\n \"cClassTribReg\"?: string;\n \"CSTReg\"?: TCSTIBSCBS;\n \"pAliqEfetRegCBS\"?: string;\n \"pAliqEfetRegIBSMun\"?: string;\n \"pAliqEfetRegIBSUF\"?: string;\n \"vTribRegCBS\"?: string;\n \"vTribRegIBSMun\"?: string;\n \"vTribRegIBSUF\"?: string;\n}\nexport class TgTribRegular {\n \"cClassTribReg\"?: string;\n \"CSTReg\"?: TCSTIBSCBS;\n \"pAliqEfetRegCBS\"?: string;\n \"pAliqEfetRegIBSMun\"?: string;\n \"pAliqEfetRegIBSUF\"?: string;\n \"vTribRegCBS\"?: string;\n \"vTribRegIBSMun\"?: string;\n \"vTribRegIBSUF\"?: string;\n constructor(input: TgTribRegularInput = {}) {\n validateModel(\"TgTribRegular\", input);\n if (input[\"cClassTribReg\"] !== undefined) this[\"cClassTribReg\"] = input[\"cClassTribReg\"];\n if (input[\"CSTReg\"] !== undefined) this[\"CSTReg\"] = input[\"CSTReg\"];\n if (input[\"pAliqEfetRegCBS\"] !== undefined) this[\"pAliqEfetRegCBS\"] = input[\"pAliqEfetRegCBS\"];\n if (input[\"pAliqEfetRegIBSMun\"] !== undefined) this[\"pAliqEfetRegIBSMun\"] = input[\"pAliqEfetRegIBSMun\"];\n if (input[\"pAliqEfetRegIBSUF\"] !== undefined) this[\"pAliqEfetRegIBSUF\"] = input[\"pAliqEfetRegIBSUF\"];\n if (input[\"vTribRegCBS\"] !== undefined) this[\"vTribRegCBS\"] = input[\"vTribRegCBS\"];\n if (input[\"vTribRegIBSMun\"] !== undefined) this[\"vTribRegIBSMun\"] = input[\"vTribRegIBSMun\"];\n if (input[\"vTribRegIBSUF\"] !== undefined) this[\"vTribRegIBSUF\"] = input[\"vTribRegIBSUF\"];\n }\n}\nexport interface TguiaTransitoInput {\n \"nGuia\"?: string;\n \"serieGuia\"?: string;\n \"tpGuia\"?: TtpGuia;\n \"UFGuia\"?: string;\n}\nexport class TguiaTransito {\n \"nGuia\"?: string;\n \"serieGuia\"?: string;\n \"tpGuia\"?: TtpGuia;\n \"UFGuia\"?: string;\n constructor(input: TguiaTransitoInput = {}) {\n validateModel(\"TguiaTransito\", input);\n if (input[\"nGuia\"] !== undefined) this[\"nGuia\"] = input[\"nGuia\"];\n if (input[\"serieGuia\"] !== undefined) this[\"serieGuia\"] = input[\"serieGuia\"];\n if (input[\"tpGuia\"] !== undefined) this[\"tpGuia\"] = input[\"tpGuia\"];\n if (input[\"UFGuia\"] !== undefined) this[\"UFGuia\"] = input[\"UFGuia\"];\n }\n}\nexport interface TIBSCBSInput {\n \"cClassTrib\"?: string;\n \"CST\"?: TCSTIBSCBS;\n \"gAjusteCompet\"?: TgAjusteCompetInput;\n \"gCredPresIBSZFM\"?: TCredPresIBSZFMInput;\n \"gCredPresOper\"?: TgCredPresOperInput;\n \"gEstornoCred\"?: TgEstornoCredInput;\n \"gIBSCBS\"?: TgIBSCBSInput;\n \"gIBSCBSMono\"?: TgIBSCBSMonoInput;\n \"gTransfCred\"?: TgTransfCredInput;\n \"indDoacao\"?: TIndicadorEx;\n}\nexport class TIBSCBS {\n \"cClassTrib\"?: string;\n \"CST\"?: TCSTIBSCBS;\n \"gAjusteCompet\" = new TgAjusteCompet();\n \"gCredPresIBSZFM\" = new TCredPresIBSZFM();\n \"gCredPresOper\" = new TgCredPresOper();\n \"gEstornoCred\" = new TgEstornoCred();\n \"gIBSCBS\" = new TgIBSCBS();\n \"gIBSCBSMono\" = new TgIBSCBSMono();\n \"gTransfCred\" = new TgTransfCred();\n \"indDoacao\"?: TIndicadorEx;\n constructor(input: TIBSCBSInput = {}) {\n validateModel(\"TIBSCBS\", input);\n if (input[\"cClassTrib\"] !== undefined) this[\"cClassTrib\"] = input[\"cClassTrib\"];\n if (input[\"CST\"] !== undefined) this[\"CST\"] = input[\"CST\"];\n if (input[\"gAjusteCompet\"] !== undefined) this[\"gAjusteCompet\"] = new TgAjusteCompet(input[\"gAjusteCompet\"]);\n if (input[\"gCredPresIBSZFM\"] !== undefined) this[\"gCredPresIBSZFM\"] = new TCredPresIBSZFM(input[\"gCredPresIBSZFM\"]);\n if (input[\"gCredPresOper\"] !== undefined) this[\"gCredPresOper\"] = new TgCredPresOper(input[\"gCredPresOper\"]);\n if (input[\"gEstornoCred\"] !== undefined) this[\"gEstornoCred\"] = new TgEstornoCred(input[\"gEstornoCred\"]);\n if (input[\"gIBSCBS\"] !== undefined) this[\"gIBSCBS\"] = new TgIBSCBS(input[\"gIBSCBS\"]);\n if (input[\"gIBSCBSMono\"] !== undefined) this[\"gIBSCBSMono\"] = new TgIBSCBSMono(input[\"gIBSCBSMono\"]);\n if (input[\"gTransfCred\"] !== undefined) this[\"gTransfCred\"] = new TgTransfCred(input[\"gTransfCred\"]);\n if (input[\"indDoacao\"] !== undefined) this[\"indDoacao\"] = input[\"indDoacao\"];\n }\n}\nexport interface TIBSCBSTotInput {\n \"gCBS\"?: TgCBSInput;\n \"gEstornoCred\"?: TgEstornoCredInput;\n \"gIBS\"?: TgIBSInput;\n \"gMono\"?: TgMonoInput;\n \"vBCIBSCBS\"?: string;\n}\nexport class TIBSCBSTot {\n \"gCBS\" = new TgCBS();\n \"gEstornoCred\" = new TgEstornoCred();\n \"gIBS\" = new TgIBS();\n \"gMono\" = new TgMono();\n \"vBCIBSCBS\"?: string;\n constructor(input: TIBSCBSTotInput = {}) {\n validateModel(\"TIBSCBSTot\", input);\n if (input[\"gCBS\"] !== undefined) this[\"gCBS\"] = new TgCBS(input[\"gCBS\"]);\n if (input[\"gEstornoCred\"] !== undefined) this[\"gEstornoCred\"] = new TgEstornoCred(input[\"gEstornoCred\"]);\n if (input[\"gIBS\"] !== undefined) this[\"gIBS\"] = new TgIBS(input[\"gIBS\"]);\n if (input[\"gMono\"] !== undefined) this[\"gMono\"] = new TgMono(input[\"gMono\"]);\n if (input[\"vBCIBSCBS\"] !== undefined) this[\"vBCIBSCBS\"] = input[\"vBCIBSCBS\"];\n }\n}\nexport interface TICMSInput {\n \"adRemICMS\"?: string;\n \"adRemICMSDif\"?: string;\n \"adRemICMSRet\"?: string;\n \"adRemICMSReten\"?: string;\n \"cBenefRBC\"?: string;\n \"CSOSN\"?: TCSOSNIcms;\n \"CST\"?: TCSTIcms;\n \"indDeduzDeson\"?: TIndicadorEx;\n \"modBC\"?: TpcnDeterminacaoBaseIcms;\n \"modBCST\"?: TpcnDeterminacaoBaseIcmsST;\n \"motDesICMS\"?: TpcnMotivoDesoneracaoICMS;\n \"motDesICMSST\"?: TpcnMotivoDesoneracaoICMS;\n \"motRedAdRem\"?: TmotRedAdRem;\n \"orig\"?: TOrigemMercadoria;\n \"pBCOp\"?: string;\n \"pCredSN\"?: string;\n \"pDif\"?: string;\n \"pFCP\"?: string;\n \"pFCPDif\"?: string;\n \"pFCPST\"?: string;\n \"pFCPSTRet\"?: string;\n \"pICMS\"?: string;\n \"pICMSEfet\"?: string;\n \"pICMSST\"?: string;\n \"pMVAST\"?: string;\n \"pRedAdRem\"?: string;\n \"pRedBC\"?: string;\n \"pRedBCEfet\"?: string;\n \"pRedBCST\"?: string;\n \"pST\"?: string;\n \"qBCMono\"?: string;\n \"qBCMonoDif\"?: string;\n \"qBCMonoRet\"?: string;\n \"qBCMonoReten\"?: string;\n \"UFST\"?: string;\n \"vBC\"?: string;\n \"vBCEfet\"?: string;\n \"vBCFCP\"?: string;\n \"vBCFCPST\"?: string;\n \"vBCFCPSTRet\"?: string;\n \"vBCST\"?: string;\n \"vBCSTDest\"?: string;\n \"vBCSTRet\"?: string;\n \"vCredICMSSN\"?: string;\n \"vFCP\"?: string;\n \"vFCPDif\"?: string;\n \"vFCPEfet\"?: string;\n \"vFCPST\"?: string;\n \"vFCPSTRet\"?: string;\n \"vICMS\"?: string;\n \"vICMSDeson\"?: string;\n \"vICMSDif\"?: string;\n \"vICMSEfet\"?: string;\n \"vICMSMono\"?: string;\n \"vICMSMonoDif\"?: string;\n \"vICMSMonoOp\"?: string;\n \"vICMSMonoRet\"?: string;\n \"vICMSMonoReten\"?: string;\n \"vICMSOp\"?: string;\n \"vICMSST\"?: string;\n \"vICMSSTDeson\"?: string;\n \"vICMSSTDest\"?: string;\n \"vICMSSTRet\"?: string;\n \"vICMSSubstituto\"?: string;\n}\nexport class TICMS {\n \"adRemICMS\"?: string;\n \"adRemICMSDif\"?: string;\n \"adRemICMSRet\"?: string;\n \"adRemICMSReten\"?: string;\n \"cBenefRBC\"?: string;\n \"CSOSN\"?: TCSOSNIcms;\n /** Pascal streaming default: cst00. Omission preserves the native constructor. */\n \"CST\"?: TCSTIcms;\n /** Pascal streaming default: tieNenhum. Omission preserves the native constructor. */\n \"indDeduzDeson\"?: TIndicadorEx;\n /** Pascal streaming default: dbiMargemValorAgregado. Omission preserves the native constructor. */\n \"modBC\"?: TpcnDeterminacaoBaseIcms;\n /** Pascal streaming default: dbisPrecoTabelado. Omission preserves the native constructor. */\n \"modBCST\"?: TpcnDeterminacaoBaseIcmsST;\n \"motDesICMS\"?: TpcnMotivoDesoneracaoICMS;\n \"motDesICMSST\"?: TpcnMotivoDesoneracaoICMS;\n \"motRedAdRem\"?: TmotRedAdRem;\n /** Pascal streaming default: oeNacional. Omission preserves the native constructor. */\n \"orig\"?: TOrigemMercadoria;\n \"pBCOp\"?: string;\n \"pCredSN\"?: string;\n \"pDif\"?: string;\n \"pFCP\"?: string;\n \"pFCPDif\"?: string;\n \"pFCPST\"?: string;\n \"pFCPSTRet\"?: string;\n \"pICMS\"?: string;\n \"pICMSEfet\"?: string;\n \"pICMSST\"?: string;\n \"pMVAST\"?: string;\n \"pRedAdRem\"?: string;\n \"pRedBC\"?: string;\n \"pRedBCEfet\"?: string;\n \"pRedBCST\"?: string;\n \"pST\"?: string;\n \"qBCMono\"?: string;\n \"qBCMonoDif\"?: string;\n \"qBCMonoRet\"?: string;\n \"qBCMonoReten\"?: string;\n \"UFST\"?: string;\n \"vBC\"?: string;\n \"vBCEfet\"?: string;\n \"vBCFCP\"?: string;\n \"vBCFCPST\"?: string;\n \"vBCFCPSTRet\"?: string;\n \"vBCST\"?: string;\n \"vBCSTDest\"?: string;\n \"vBCSTRet\"?: string;\n \"vCredICMSSN\"?: string;\n \"vFCP\"?: string;\n \"vFCPDif\"?: string;\n \"vFCPEfet\"?: string;\n \"vFCPST\"?: string;\n \"vFCPSTRet\"?: string;\n \"vICMS\"?: string;\n \"vICMSDeson\"?: string;\n \"vICMSDif\"?: string;\n \"vICMSEfet\"?: string;\n \"vICMSMono\"?: string;\n \"vICMSMonoDif\"?: string;\n \"vICMSMonoOp\"?: string;\n \"vICMSMonoRet\"?: string;\n \"vICMSMonoReten\"?: string;\n \"vICMSOp\"?: string;\n \"vICMSST\"?: string;\n \"vICMSSTDeson\"?: string;\n \"vICMSSTDest\"?: string;\n \"vICMSSTRet\"?: string;\n \"vICMSSubstituto\"?: string;\n constructor(input: TICMSInput = {}) {\n validateModel(\"TICMS\", input);\n if (input[\"adRemICMS\"] !== undefined) this[\"adRemICMS\"] = input[\"adRemICMS\"];\n if (input[\"adRemICMSDif\"] !== undefined) this[\"adRemICMSDif\"] = input[\"adRemICMSDif\"];\n if (input[\"adRemICMSRet\"] !== undefined) this[\"adRemICMSRet\"] = input[\"adRemICMSRet\"];\n if (input[\"adRemICMSReten\"] !== undefined) this[\"adRemICMSReten\"] = input[\"adRemICMSReten\"];\n if (input[\"cBenefRBC\"] !== undefined) this[\"cBenefRBC\"] = input[\"cBenefRBC\"];\n if (input[\"CSOSN\"] !== undefined) this[\"CSOSN\"] = input[\"CSOSN\"];\n if (input[\"CST\"] !== undefined) this[\"CST\"] = input[\"CST\"];\n if (input[\"indDeduzDeson\"] !== undefined) this[\"indDeduzDeson\"] = input[\"indDeduzDeson\"];\n if (input[\"modBC\"] !== undefined) this[\"modBC\"] = input[\"modBC\"];\n if (input[\"modBCST\"] !== undefined) this[\"modBCST\"] = input[\"modBCST\"];\n if (input[\"motDesICMS\"] !== undefined) this[\"motDesICMS\"] = input[\"motDesICMS\"];\n if (input[\"motDesICMSST\"] !== undefined) this[\"motDesICMSST\"] = input[\"motDesICMSST\"];\n if (input[\"motRedAdRem\"] !== undefined) this[\"motRedAdRem\"] = input[\"motRedAdRem\"];\n if (input[\"orig\"] !== undefined) this[\"orig\"] = input[\"orig\"];\n if (input[\"pBCOp\"] !== undefined) this[\"pBCOp\"] = input[\"pBCOp\"];\n if (input[\"pCredSN\"] !== undefined) this[\"pCredSN\"] = input[\"pCredSN\"];\n if (input[\"pDif\"] !== undefined) this[\"pDif\"] = input[\"pDif\"];\n if (input[\"pFCP\"] !== undefined) this[\"pFCP\"] = input[\"pFCP\"];\n if (input[\"pFCPDif\"] !== undefined) this[\"pFCPDif\"] = input[\"pFCPDif\"];\n if (input[\"pFCPST\"] !== undefined) this[\"pFCPST\"] = input[\"pFCPST\"];\n if (input[\"pFCPSTRet\"] !== undefined) this[\"pFCPSTRet\"] = input[\"pFCPSTRet\"];\n if (input[\"pICMS\"] !== undefined) this[\"pICMS\"] = input[\"pICMS\"];\n if (input[\"pICMSEfet\"] !== undefined) this[\"pICMSEfet\"] = input[\"pICMSEfet\"];\n if (input[\"pICMSST\"] !== undefined) this[\"pICMSST\"] = input[\"pICMSST\"];\n if (input[\"pMVAST\"] !== undefined) this[\"pMVAST\"] = input[\"pMVAST\"];\n if (input[\"pRedAdRem\"] !== undefined) this[\"pRedAdRem\"] = input[\"pRedAdRem\"];\n if (input[\"pRedBC\"] !== undefined) this[\"pRedBC\"] = input[\"pRedBC\"];\n if (input[\"pRedBCEfet\"] !== undefined) this[\"pRedBCEfet\"] = input[\"pRedBCEfet\"];\n if (input[\"pRedBCST\"] !== undefined) this[\"pRedBCST\"] = input[\"pRedBCST\"];\n if (input[\"pST\"] !== undefined) this[\"pST\"] = input[\"pST\"];\n if (input[\"qBCMono\"] !== undefined) this[\"qBCMono\"] = input[\"qBCMono\"];\n if (input[\"qBCMonoDif\"] !== undefined) this[\"qBCMonoDif\"] = input[\"qBCMonoDif\"];\n if (input[\"qBCMonoRet\"] !== undefined) this[\"qBCMonoRet\"] = input[\"qBCMonoRet\"];\n if (input[\"qBCMonoReten\"] !== undefined) this[\"qBCMonoReten\"] = input[\"qBCMonoReten\"];\n if (input[\"UFST\"] !== undefined) this[\"UFST\"] = input[\"UFST\"];\n if (input[\"vBC\"] !== undefined) this[\"vBC\"] = input[\"vBC\"];\n if (input[\"vBCEfet\"] !== undefined) this[\"vBCEfet\"] = input[\"vBCEfet\"];\n if (input[\"vBCFCP\"] !== undefined) this[\"vBCFCP\"] = input[\"vBCFCP\"];\n if (input[\"vBCFCPST\"] !== undefined) this[\"vBCFCPST\"] = input[\"vBCFCPST\"];\n if (input[\"vBCFCPSTRet\"] !== undefined) this[\"vBCFCPSTRet\"] = input[\"vBCFCPSTRet\"];\n if (input[\"vBCST\"] !== undefined) this[\"vBCST\"] = input[\"vBCST\"];\n if (input[\"vBCSTDest\"] !== undefined) this[\"vBCSTDest\"] = input[\"vBCSTDest\"];\n if (input[\"vBCSTRet\"] !== undefined) this[\"vBCSTRet\"] = input[\"vBCSTRet\"];\n if (input[\"vCredICMSSN\"] !== undefined) this[\"vCredICMSSN\"] = input[\"vCredICMSSN\"];\n if (input[\"vFCP\"] !== undefined) this[\"vFCP\"] = input[\"vFCP\"];\n if (input[\"vFCPDif\"] !== undefined) this[\"vFCPDif\"] = input[\"vFCPDif\"];\n if (input[\"vFCPEfet\"] !== undefined) this[\"vFCPEfet\"] = input[\"vFCPEfet\"];\n if (input[\"vFCPST\"] !== undefined) this[\"vFCPST\"] = input[\"vFCPST\"];\n if (input[\"vFCPSTRet\"] !== undefined) this[\"vFCPSTRet\"] = input[\"vFCPSTRet\"];\n if (input[\"vICMS\"] !== undefined) this[\"vICMS\"] = input[\"vICMS\"];\n if (input[\"vICMSDeson\"] !== undefined) this[\"vICMSDeson\"] = input[\"vICMSDeson\"];\n if (input[\"vICMSDif\"] !== undefined) this[\"vICMSDif\"] = input[\"vICMSDif\"];\n if (input[\"vICMSEfet\"] !== undefined) this[\"vICMSEfet\"] = input[\"vICMSEfet\"];\n if (input[\"vICMSMono\"] !== undefined) this[\"vICMSMono\"] = input[\"vICMSMono\"];\n if (input[\"vICMSMonoDif\"] !== undefined) this[\"vICMSMonoDif\"] = input[\"vICMSMonoDif\"];\n if (input[\"vICMSMonoOp\"] !== undefined) this[\"vICMSMonoOp\"] = input[\"vICMSMonoOp\"];\n if (input[\"vICMSMonoRet\"] !== undefined) this[\"vICMSMonoRet\"] = input[\"vICMSMonoRet\"];\n if (input[\"vICMSMonoReten\"] !== undefined) this[\"vICMSMonoReten\"] = input[\"vICMSMonoReten\"];\n if (input[\"vICMSOp\"] !== undefined) this[\"vICMSOp\"] = input[\"vICMSOp\"];\n if (input[\"vICMSST\"] !== undefined) this[\"vICMSST\"] = input[\"vICMSST\"];\n if (input[\"vICMSSTDeson\"] !== undefined) this[\"vICMSSTDeson\"] = input[\"vICMSSTDeson\"];\n if (input[\"vICMSSTDest\"] !== undefined) this[\"vICMSSTDest\"] = input[\"vICMSSTDest\"];\n if (input[\"vICMSSTRet\"] !== undefined) this[\"vICMSSTRet\"] = input[\"vICMSSTRet\"];\n if (input[\"vICMSSubstituto\"] !== undefined) this[\"vICMSSubstituto\"] = input[\"vICMSSubstituto\"];\n }\n}\nexport interface TICMSCombInput {\n \"vBCICMS\"?: string;\n \"vBCICMSST\"?: string;\n \"vICMS\"?: string;\n \"vICMSST\"?: string;\n}\nexport class TICMSComb {\n \"vBCICMS\"?: string;\n \"vBCICMSST\"?: string;\n \"vICMS\"?: string;\n \"vICMSST\"?: string;\n constructor(input: TICMSCombInput = {}) {\n validateModel(\"TICMSComb\", input);\n if (input[\"vBCICMS\"] !== undefined) this[\"vBCICMS\"] = input[\"vBCICMS\"];\n if (input[\"vBCICMSST\"] !== undefined) this[\"vBCICMSST\"] = input[\"vBCICMSST\"];\n if (input[\"vICMS\"] !== undefined) this[\"vICMS\"] = input[\"vICMS\"];\n if (input[\"vICMSST\"] !== undefined) this[\"vICMSST\"] = input[\"vICMSST\"];\n }\n}\nexport interface TICMSConsInput {\n \"UFcons\"?: string;\n \"vBCICMSSTCons\"?: string;\n \"vICMSSTCons\"?: string;\n}\nexport class TICMSCons {\n \"UFcons\"?: string;\n \"vBCICMSSTCons\"?: string;\n \"vICMSSTCons\"?: string;\n constructor(input: TICMSConsInput = {}) {\n validateModel(\"TICMSCons\", input);\n if (input[\"UFcons\"] !== undefined) this[\"UFcons\"] = input[\"UFcons\"];\n if (input[\"vBCICMSSTCons\"] !== undefined) this[\"vBCICMSSTCons\"] = input[\"vBCICMSSTCons\"];\n if (input[\"vICMSSTCons\"] !== undefined) this[\"vICMSSTCons\"] = input[\"vICMSSTCons\"];\n }\n}\nexport interface TICMSInterInput {\n \"vBCICMSSTDest\"?: string;\n \"vICMSSTDest\"?: string;\n}\nexport class TICMSInter {\n \"vBCICMSSTDest\"?: string;\n \"vICMSSTDest\"?: string;\n constructor(input: TICMSInterInput = {}) {\n validateModel(\"TICMSInter\", input);\n if (input[\"vBCICMSSTDest\"] !== undefined) this[\"vBCICMSSTDest\"] = input[\"vBCICMSSTDest\"];\n if (input[\"vICMSSTDest\"] !== undefined) this[\"vICMSSTDest\"] = input[\"vICMSSTDest\"];\n }\n}\nexport interface TICMSTotInput {\n \"qBCMono\"?: string;\n \"qBCMonoRet\"?: string;\n \"qBCMonoReten\"?: string;\n \"vBC\"?: string;\n \"vBCST\"?: string;\n \"vCOFINS\"?: string;\n \"vDesc\"?: string;\n \"vFCP\"?: string;\n \"vFCPST\"?: string;\n \"vFCPSTRet\"?: string;\n \"vFCPUFDest\"?: string;\n \"vFrete\"?: string;\n \"vICMS\"?: string;\n \"vICMSDeson\"?: string;\n \"vICMSMono\"?: string;\n \"vICMSMonoRet\"?: string;\n \"vICMSMonoReten\"?: string;\n \"vICMSUFDest\"?: string;\n \"vICMSUFRemet\"?: string;\n \"vII\"?: string;\n \"vIPI\"?: string;\n \"vIPIDevol\"?: string;\n \"vNF\"?: string;\n \"vOutro\"?: string;\n \"vPIS\"?: string;\n \"vProd\"?: string;\n \"vSeg\"?: string;\n \"vST\"?: string;\n \"vTotTrib\"?: string;\n}\nexport class TICMSTot {\n \"qBCMono\"?: string;\n \"qBCMonoRet\"?: string;\n \"qBCMonoReten\"?: string;\n \"vBC\"?: string;\n \"vBCST\"?: string;\n \"vCOFINS\"?: string;\n \"vDesc\"?: string;\n \"vFCP\"?: string;\n \"vFCPST\"?: string;\n \"vFCPSTRet\"?: string;\n \"vFCPUFDest\"?: string;\n \"vFrete\"?: string;\n \"vICMS\"?: string;\n \"vICMSDeson\"?: string;\n \"vICMSMono\"?: string;\n \"vICMSMonoRet\"?: string;\n \"vICMSMonoReten\"?: string;\n \"vICMSUFDest\"?: string;\n \"vICMSUFRemet\"?: string;\n \"vII\"?: string;\n \"vIPI\"?: string;\n \"vIPIDevol\"?: string;\n \"vNF\"?: string;\n \"vOutro\"?: string;\n \"vPIS\"?: string;\n \"vProd\"?: string;\n \"vSeg\"?: string;\n \"vST\"?: string;\n \"vTotTrib\"?: string;\n constructor(input: TICMSTotInput = {}) {\n validateModel(\"TICMSTot\", input);\n if (input[\"qBCMono\"] !== undefined) this[\"qBCMono\"] = input[\"qBCMono\"];\n if (input[\"qBCMonoRet\"] !== undefined) this[\"qBCMonoRet\"] = input[\"qBCMonoRet\"];\n if (input[\"qBCMonoReten\"] !== undefined) this[\"qBCMonoReten\"] = input[\"qBCMonoReten\"];\n if (input[\"vBC\"] !== undefined) this[\"vBC\"] = input[\"vBC\"];\n if (input[\"vBCST\"] !== undefined) this[\"vBCST\"] = input[\"vBCST\"];\n if (input[\"vCOFINS\"] !== undefined) this[\"vCOFINS\"] = input[\"vCOFINS\"];\n if (input[\"vDesc\"] !== undefined) this[\"vDesc\"] = input[\"vDesc\"];\n if (input[\"vFCP\"] !== undefined) this[\"vFCP\"] = input[\"vFCP\"];\n if (input[\"vFCPST\"] !== undefined) this[\"vFCPST\"] = input[\"vFCPST\"];\n if (input[\"vFCPSTRet\"] !== undefined) this[\"vFCPSTRet\"] = input[\"vFCPSTRet\"];\n if (input[\"vFCPUFDest\"] !== undefined) this[\"vFCPUFDest\"] = input[\"vFCPUFDest\"];\n if (input[\"vFrete\"] !== undefined) this[\"vFrete\"] = input[\"vFrete\"];\n if (input[\"vICMS\"] !== undefined) this[\"vICMS\"] = input[\"vICMS\"];\n if (input[\"vICMSDeson\"] !== undefined) this[\"vICMSDeson\"] = input[\"vICMSDeson\"];\n if (input[\"vICMSMono\"] !== undefined) this[\"vICMSMono\"] = input[\"vICMSMono\"];\n if (input[\"vICMSMonoRet\"] !== undefined) this[\"vICMSMonoRet\"] = input[\"vICMSMonoRet\"];\n if (input[\"vICMSMonoReten\"] !== undefined) this[\"vICMSMonoReten\"] = input[\"vICMSMonoReten\"];\n if (input[\"vICMSUFDest\"] !== undefined) this[\"vICMSUFDest\"] = input[\"vICMSUFDest\"];\n if (input[\"vICMSUFRemet\"] !== undefined) this[\"vICMSUFRemet\"] = input[\"vICMSUFRemet\"];\n if (input[\"vII\"] !== undefined) this[\"vII\"] = input[\"vII\"];\n if (input[\"vIPI\"] !== undefined) this[\"vIPI\"] = input[\"vIPI\"];\n if (input[\"vIPIDevol\"] !== undefined) this[\"vIPIDevol\"] = input[\"vIPIDevol\"];\n if (input[\"vNF\"] !== undefined) this[\"vNF\"] = input[\"vNF\"];\n if (input[\"vOutro\"] !== undefined) this[\"vOutro\"] = input[\"vOutro\"];\n if (input[\"vPIS\"] !== undefined) this[\"vPIS\"] = input[\"vPIS\"];\n if (input[\"vProd\"] !== undefined) this[\"vProd\"] = input[\"vProd\"];\n if (input[\"vSeg\"] !== undefined) this[\"vSeg\"] = input[\"vSeg\"];\n if (input[\"vST\"] !== undefined) this[\"vST\"] = input[\"vST\"];\n if (input[\"vTotTrib\"] !== undefined) this[\"vTotTrib\"] = input[\"vTotTrib\"];\n }\n}\nexport interface TICMSUFDestInput {\n \"pFCPUFDest\"?: string;\n \"pICMSInter\"?: string;\n \"pICMSInterPart\"?: string;\n \"pICMSUFDest\"?: string;\n \"vBCFCPUFDest\"?: string;\n \"vBCUFDest\"?: string;\n \"vFCPUFDest\"?: string;\n \"vICMSUFDest\"?: string;\n \"vICMSUFRemet\"?: string;\n}\nexport class TICMSUFDest {\n \"pFCPUFDest\"?: string;\n \"pICMSInter\"?: string;\n \"pICMSInterPart\"?: string;\n \"pICMSUFDest\"?: string;\n \"vBCFCPUFDest\"?: string;\n \"vBCUFDest\"?: string;\n \"vFCPUFDest\"?: string;\n \"vICMSUFDest\"?: string;\n \"vICMSUFRemet\"?: string;\n constructor(input: TICMSUFDestInput = {}) {\n validateModel(\"TICMSUFDest\", input);\n if (input[\"pFCPUFDest\"] !== undefined) this[\"pFCPUFDest\"] = input[\"pFCPUFDest\"];\n if (input[\"pICMSInter\"] !== undefined) this[\"pICMSInter\"] = input[\"pICMSInter\"];\n if (input[\"pICMSInterPart\"] !== undefined) this[\"pICMSInterPart\"] = input[\"pICMSInterPart\"];\n if (input[\"pICMSUFDest\"] !== undefined) this[\"pICMSUFDest\"] = input[\"pICMSUFDest\"];\n if (input[\"vBCFCPUFDest\"] !== undefined) this[\"vBCFCPUFDest\"] = input[\"vBCFCPUFDest\"];\n if (input[\"vBCUFDest\"] !== undefined) this[\"vBCUFDest\"] = input[\"vBCUFDest\"];\n if (input[\"vFCPUFDest\"] !== undefined) this[\"vFCPUFDest\"] = input[\"vFCPUFDest\"];\n if (input[\"vICMSUFDest\"] !== undefined) this[\"vICMSUFDest\"] = input[\"vICMSUFDest\"];\n if (input[\"vICMSUFRemet\"] !== undefined) this[\"vICMSUFRemet\"] = input[\"vICMSUFRemet\"];\n }\n}\nexport interface TIdeInput {\n \"cDV\"?: number;\n \"cIndOp\"?: string;\n \"cMunFG\"?: number;\n \"cMunFGIBS\"?: number;\n \"cNF\"?: number;\n \"cUF\"?: number;\n \"dEmi\"?: string;\n \"dhCont\"?: string;\n \"dPrevEntrega\"?: string;\n \"dSaiEnt\"?: string;\n \"finNFe\"?: TpcnFinalidadeNFe;\n \"gCompraGov\"?: TgCompraGovInput;\n \"gPagAntecipado\"?: TgPagAntecipadoInput;\n \"hSaiEnt\"?: string;\n \"idDest\"?: TpcnDestinoOperacao;\n \"indFinal\"?: TpcnConsumidorFinal;\n \"indIntermed\"?: TindIntermed;\n \"indPag\"?: TpcnIndicadorPagamento;\n \"indPres\"?: TpcnPresencaComprador;\n \"modelo\"?: number;\n \"natOp\"?: string;\n \"NFref\"?: TNFrefCollectionInput;\n \"nNF\"?: number;\n \"procEmi\"?: TACBrProcessoEmissao;\n \"serie\"?: number;\n \"tpAmb\"?: TACBrTipoAmbiente;\n \"tpEmis\"?: TACBrTipoEmissao;\n \"tpImp\"?: TACBrTipoImpressao;\n \"tpNF\"?: TTipoNFe;\n \"tpNFCredito\"?: TtpNFCredito;\n \"tpNFDebito\"?: TtpNFDebito;\n \"verProc\"?: string;\n \"xJust\"?: string;\n}\nexport class TIde {\n \"cDV\"?: number;\n \"cIndOp\"?: string;\n \"cMunFG\"?: number;\n \"cMunFGIBS\"?: number;\n \"cNF\"?: number;\n \"cUF\"?: number;\n \"dEmi\"?: string;\n \"dhCont\"?: string;\n \"dPrevEntrega\"?: string;\n \"dSaiEnt\"?: string;\n /** Pascal streaming default: fnNormal. Omission preserves the native constructor. */\n \"finNFe\"?: TpcnFinalidadeNFe;\n \"gCompraGov\" = new TgCompraGov();\n \"gPagAntecipado\" = new TgPagAntecipado();\n \"hSaiEnt\"?: string;\n \"idDest\"?: TpcnDestinoOperacao;\n \"indFinal\"?: TpcnConsumidorFinal;\n \"indIntermed\"?: TindIntermed;\n /** Pascal streaming default: ipPrazo. Omission preserves the native constructor. */\n \"indPag\"?: TpcnIndicadorPagamento;\n \"indPres\"?: TpcnPresencaComprador;\n \"modelo\"?: number;\n \"natOp\"?: string;\n \"NFref\" = new TNFrefCollection();\n \"nNF\"?: number;\n /** Pascal streaming default: peAplicativoContribuinte. Omission preserves the native constructor. */\n \"procEmi\"?: TACBrProcessoEmissao;\n \"serie\"?: number;\n /** Pascal streaming default: taHomologacao. Omission preserves the native constructor. */\n \"tpAmb\"?: TACBrTipoAmbiente;\n /** Pascal streaming default: teNormal. Omission preserves the native constructor. */\n \"tpEmis\"?: TACBrTipoEmissao;\n /** Pascal streaming default: tiPaisagem. Omission preserves the native constructor. */\n \"tpImp\"?: TACBrTipoImpressao;\n /** Pascal streaming default: tnSaida. Omission preserves the native constructor. */\n \"tpNF\"?: TTipoNFe;\n \"tpNFCredito\"?: TtpNFCredito;\n \"tpNFDebito\"?: TtpNFDebito;\n \"verProc\"?: string;\n \"xJust\"?: string;\n constructor(input: TIdeInput = {}) {\n validateModel(\"TIde\", input);\n if (input[\"cDV\"] !== undefined) this[\"cDV\"] = input[\"cDV\"];\n if (input[\"cIndOp\"] !== undefined) this[\"cIndOp\"] = input[\"cIndOp\"];\n if (input[\"cMunFG\"] !== undefined) this[\"cMunFG\"] = input[\"cMunFG\"];\n if (input[\"cMunFGIBS\"] !== undefined) this[\"cMunFGIBS\"] = input[\"cMunFGIBS\"];\n if (input[\"cNF\"] !== undefined) this[\"cNF\"] = input[\"cNF\"];\n if (input[\"cUF\"] !== undefined) this[\"cUF\"] = input[\"cUF\"];\n if (input[\"dEmi\"] !== undefined) this[\"dEmi\"] = input[\"dEmi\"];\n if (input[\"dhCont\"] !== undefined) this[\"dhCont\"] = input[\"dhCont\"];\n if (input[\"dPrevEntrega\"] !== undefined) this[\"dPrevEntrega\"] = input[\"dPrevEntrega\"];\n if (input[\"dSaiEnt\"] !== undefined) this[\"dSaiEnt\"] = input[\"dSaiEnt\"];\n if (input[\"finNFe\"] !== undefined) this[\"finNFe\"] = input[\"finNFe\"];\n if (input[\"gCompraGov\"] !== undefined) this[\"gCompraGov\"] = new TgCompraGov(input[\"gCompraGov\"]);\n if (input[\"gPagAntecipado\"] !== undefined) this[\"gPagAntecipado\"] = new TgPagAntecipado(input[\"gPagAntecipado\"]);\n if (input[\"hSaiEnt\"] !== undefined) this[\"hSaiEnt\"] = input[\"hSaiEnt\"];\n if (input[\"idDest\"] !== undefined) this[\"idDest\"] = input[\"idDest\"];\n if (input[\"indFinal\"] !== undefined) this[\"indFinal\"] = input[\"indFinal\"];\n if (input[\"indIntermed\"] !== undefined) this[\"indIntermed\"] = input[\"indIntermed\"];\n if (input[\"indPag\"] !== undefined) this[\"indPag\"] = input[\"indPag\"];\n if (input[\"indPres\"] !== undefined) this[\"indPres\"] = input[\"indPres\"];\n if (input[\"modelo\"] !== undefined) this[\"modelo\"] = input[\"modelo\"];\n if (input[\"natOp\"] !== undefined) this[\"natOp\"] = input[\"natOp\"];\n if (input[\"NFref\"] !== undefined) this[\"NFref\"] = Object.assign(new TNFrefCollection(), input[\"NFref\"].map(v=>new TNFrefCollectionItem(v)));\n if (input[\"nNF\"] !== undefined) this[\"nNF\"] = input[\"nNF\"];\n if (input[\"procEmi\"] !== undefined) this[\"procEmi\"] = input[\"procEmi\"];\n if (input[\"serie\"] !== undefined) this[\"serie\"] = input[\"serie\"];\n if (input[\"tpAmb\"] !== undefined) this[\"tpAmb\"] = input[\"tpAmb\"];\n if (input[\"tpEmis\"] !== undefined) this[\"tpEmis\"] = input[\"tpEmis\"];\n if (input[\"tpImp\"] !== undefined) this[\"tpImp\"] = input[\"tpImp\"];\n if (input[\"tpNF\"] !== undefined) this[\"tpNF\"] = input[\"tpNF\"];\n if (input[\"tpNFCredito\"] !== undefined) this[\"tpNFCredito\"] = input[\"tpNFCredito\"];\n if (input[\"tpNFDebito\"] !== undefined) this[\"tpNFDebito\"] = input[\"tpNFDebito\"];\n if (input[\"verProc\"] !== undefined) this[\"verProc\"] = input[\"verProc\"];\n if (input[\"xJust\"] !== undefined) this[\"xJust\"] = input[\"xJust\"];\n }\n}\nexport interface TIIInput {\n \"vBc\"?: string;\n \"vDespAdu\"?: string;\n \"vII\"?: string;\n \"vIOF\"?: string;\n}\nexport class TII {\n \"vBc\"?: string;\n \"vDespAdu\"?: string;\n \"vII\"?: string;\n \"vIOF\"?: string;\n constructor(input: TIIInput = {}) {\n validateModel(\"TII\", input);\n if (input[\"vBc\"] !== undefined) this[\"vBc\"] = input[\"vBc\"];\n if (input[\"vDespAdu\"] !== undefined) this[\"vDespAdu\"] = input[\"vDespAdu\"];\n if (input[\"vII\"] !== undefined) this[\"vII\"] = input[\"vII\"];\n if (input[\"vIOF\"] !== undefined) this[\"vIOF\"] = input[\"vIOF\"];\n }\n}\nexport interface TImpostoInput {\n \"COFINS\"?: TCOFINSInput;\n \"COFINSST\"?: TCOFINSSTInput;\n \"IBSCBS\"?: TIBSCBSInput;\n \"ICMS\"?: TICMSInput;\n \"ICMSUFDest\"?: TICMSUFDestInput;\n \"II\"?: TIIInput;\n \"IPI\"?: TIPIInput;\n \"ISel\"?: TgISInput;\n \"ISSQN\"?: TISSQNInput;\n \"PIS\"?: TPISInput;\n \"PISST\"?: TPISSTInput;\n \"vTotTrib\"?: string;\n}\nexport class TImposto {\n \"COFINS\" = new TCOFINS();\n \"COFINSST\" = new TCOFINSST();\n \"IBSCBS\" = new TIBSCBS();\n \"ICMS\" = new TICMS();\n \"ICMSUFDest\" = new TICMSUFDest();\n \"II\" = new TII();\n \"IPI\" = new TIPI();\n \"ISel\" = new TgIS();\n \"ISSQN\" = new TISSQN();\n \"PIS\" = new TPIS();\n \"PISST\" = new TPISST();\n \"vTotTrib\"?: string;\n constructor(input: TImpostoInput = {}) {\n validateModel(\"TImposto\", input);\n if (input[\"COFINS\"] !== undefined) this[\"COFINS\"] = new TCOFINS(input[\"COFINS\"]);\n if (input[\"COFINSST\"] !== undefined) this[\"COFINSST\"] = new TCOFINSST(input[\"COFINSST\"]);\n if (input[\"IBSCBS\"] !== undefined) this[\"IBSCBS\"] = new TIBSCBS(input[\"IBSCBS\"]);\n if (input[\"ICMS\"] !== undefined) this[\"ICMS\"] = new TICMS(input[\"ICMS\"]);\n if (input[\"ICMSUFDest\"] !== undefined) this[\"ICMSUFDest\"] = new TICMSUFDest(input[\"ICMSUFDest\"]);\n if (input[\"II\"] !== undefined) this[\"II\"] = new TII(input[\"II\"]);\n if (input[\"IPI\"] !== undefined) this[\"IPI\"] = new TIPI(input[\"IPI\"]);\n if (input[\"ISel\"] !== undefined) this[\"ISel\"] = new TgIS(input[\"ISel\"]);\n if (input[\"ISSQN\"] !== undefined) this[\"ISSQN\"] = new TISSQN(input[\"ISSQN\"]);\n if (input[\"PIS\"] !== undefined) this[\"PIS\"] = new TPIS(input[\"PIS\"]);\n if (input[\"PISST\"] !== undefined) this[\"PISST\"] = new TPISST(input[\"PISST\"]);\n if (input[\"vTotTrib\"] !== undefined) this[\"vTotTrib\"] = input[\"vTotTrib\"];\n }\n}\nexport const TIndicadorEx = Object.freeze({\"tieNenhum\":\"tieNenhum\",\"tieSim\":\"tieSim\",\"tieNao\":\"tieNao\"} as const);\nexport type TIndicadorEx = typeof TIndicadorEx[keyof typeof TIndicadorEx];\nexport const TindIEDest = Object.freeze({\"inContribuinte\":\"inContribuinte\",\"inIsento\":\"inIsento\",\"inNaoContribuinte\":\"inNaoContribuinte\"} as const);\nexport type TindIEDest = typeof TindIEDest[keyof typeof TindIEDest];\nexport const TindImport = Object.freeze({\"iiNacional\":\"iiNacional\",\"iiImportado\":\"iiImportado\"} as const);\nexport type TindImport = typeof TindImport[keyof typeof TindImport];\nexport const TindIncentivo = Object.freeze({\"iiSim\":\"iiSim\",\"iiNao\":\"iiNao\"} as const);\nexport type TindIncentivo = typeof TindIncentivo[keyof typeof TindIncentivo];\nexport const TindIntermed = Object.freeze({\"iiSemOperacao\":\"iiSemOperacao\",\"iiOperacaoSemIntermediador\":\"iiOperacaoSemIntermediador\",\"iiOperacaoComIntermediador\":\"iiOperacaoComIntermediador\"} as const);\nexport type TindIntermed = typeof TindIntermed[keyof typeof TindIntermed];\nexport const TIndSomaCOFINSST = Object.freeze({\"iscNenhum\":\"iscNenhum\",\"iscCOFINSSTNaoCompoe\":\"iscCOFINSSTNaoCompoe\",\"iscCOFINSSTCompoe\":\"iscCOFINSSTCompoe\"} as const);\nexport type TIndSomaCOFINSST = typeof TIndSomaCOFINSST[keyof typeof TIndSomaCOFINSST];\nexport const TIndSomaPISST = Object.freeze({\"ispNenhum\":\"ispNenhum\",\"ispPISSTNaoCompoe\":\"ispPISSTNaoCompoe\",\"ispPISSTCompoe\":\"ispPISSTCompoe\"} as const);\nexport type TIndSomaPISST = typeof TIndSomaPISST[keyof typeof TIndSomaPISST];\nexport interface TInfAdicInput {\n \"infAdFisco\"?: string;\n \"infCpl\"?: string;\n \"obsCont\"?: TobsContCollectionInput;\n \"obsFisco\"?: TobsFiscoCollectionInput;\n \"procRef\"?: TprocRefCollectionInput;\n}\nexport class TInfAdic {\n \"infAdFisco\"?: string;\n \"infCpl\"?: string;\n \"obsCont\" = new TobsContCollection();\n \"obsFisco\" = new TobsFiscoCollection();\n \"procRef\" = new TprocRefCollection();\n constructor(input: TInfAdicInput = {}) {\n validateModel(\"TInfAdic\", input);\n if (input[\"infAdFisco\"] !== undefined) this[\"infAdFisco\"] = input[\"infAdFisco\"];\n if (input[\"infCpl\"] !== undefined) this[\"infCpl\"] = input[\"infCpl\"];\n if (input[\"obsCont\"] !== undefined) this[\"obsCont\"] = Object.assign(new TobsContCollection(), input[\"obsCont\"].map(v=>new TobsContCollectionItem(v)));\n if (input[\"obsFisco\"] !== undefined) this[\"obsFisco\"] = Object.assign(new TobsFiscoCollection(), input[\"obsFisco\"].map(v=>new TobsFiscoCollectionItem(v)));\n if (input[\"procRef\"] !== undefined) this[\"procRef\"] = Object.assign(new TprocRefCollection(), input[\"procRef\"].map(v=>new TprocRefCollectionItem(v)));\n }\n}\nexport interface TinfIntermedInput {\n \"CNPJ\"?: string;\n \"idCadIntTran\"?: string;\n}\nexport class TinfIntermed {\n \"CNPJ\"?: string;\n \"idCadIntTran\"?: string;\n constructor(input: TinfIntermedInput = {}) {\n validateModel(\"TinfIntermed\", input);\n if (input[\"CNPJ\"] !== undefined) this[\"CNPJ\"] = input[\"CNPJ\"];\n if (input[\"idCadIntTran\"] !== undefined) this[\"idCadIntTran\"] = input[\"idCadIntTran\"];\n }\n}\nexport interface TinfNFeInput {\n \"ID\"?: string;\n \"Versao\"?: string;\n}\nexport class TinfNFe {\n \"ID\"?: string;\n \"Versao\"?: string;\n constructor(input: TinfNFeInput = {}) {\n validateModel(\"TinfNFe\", input);\n if (input[\"ID\"] !== undefined) this[\"ID\"] = input[\"ID\"];\n if (input[\"Versao\"] !== undefined) this[\"Versao\"] = input[\"Versao\"];\n }\n}\nexport interface TinfNFeSuplInput {\n \"qrCode\"?: string;\n \"urlChave\"?: string;\n}\nexport class TinfNFeSupl {\n \"qrCode\"?: string;\n \"urlChave\"?: string;\n constructor(input: TinfNFeSuplInput = {}) {\n validateModel(\"TinfNFeSupl\", input);\n if (input[\"qrCode\"] !== undefined) this[\"qrCode\"] = input[\"qrCode\"];\n if (input[\"urlChave\"] !== undefined) this[\"urlChave\"] = input[\"urlChave\"];\n }\n}\nexport interface TinfPAAInput {\n \"CNPJPAA\"?: string;\n \"Exponent\"?: string;\n \"Modulus\"?: string;\n \"SignatureValue\"?: string;\n}\nexport class TinfPAA {\n \"CNPJPAA\"?: string;\n \"Exponent\"?: string;\n \"Modulus\"?: string;\n \"SignatureValue\"?: string;\n constructor(input: TinfPAAInput = {}) {\n validateModel(\"TinfPAA\", input);\n if (input[\"CNPJPAA\"] !== undefined) this[\"CNPJPAA\"] = input[\"CNPJPAA\"];\n if (input[\"Exponent\"] !== undefined) this[\"Exponent\"] = input[\"Exponent\"];\n if (input[\"Modulus\"] !== undefined) this[\"Modulus\"] = input[\"Modulus\"];\n if (input[\"SignatureValue\"] !== undefined) this[\"SignatureValue\"] = input[\"SignatureValue\"];\n }\n}\nexport interface TinfRespTecInput {\n \"CNPJ\"?: string;\n \"email\"?: string;\n \"fone\"?: string;\n \"hashCSRT\"?: string;\n \"idCSRT\"?: number;\n \"xContato\"?: string;\n}\nexport class TinfRespTec {\n \"CNPJ\"?: string;\n \"email\"?: string;\n \"fone\"?: string;\n \"hashCSRT\"?: string;\n \"idCSRT\"?: number;\n \"xContato\"?: string;\n constructor(input: TinfRespTecInput = {}) {\n validateModel(\"TinfRespTec\", input);\n if (input[\"CNPJ\"] !== undefined) this[\"CNPJ\"] = input[\"CNPJ\"];\n if (input[\"email\"] !== undefined) this[\"email\"] = input[\"email\"];\n if (input[\"fone\"] !== undefined) this[\"fone\"] = input[\"fone\"];\n if (input[\"hashCSRT\"] !== undefined) this[\"hashCSRT\"] = input[\"hashCSRT\"];\n if (input[\"idCSRT\"] !== undefined) this[\"idCSRT\"] = input[\"idCSRT\"];\n if (input[\"xContato\"] !== undefined) this[\"xContato\"] = input[\"xContato\"];\n }\n}\nexport interface TIPIInput {\n \"cEnq\"?: string;\n \"clEnq\"?: string;\n \"CNPJProd\"?: string;\n \"cSelo\"?: string;\n \"CST\"?: TpcnCstIpi;\n \"pIPI\"?: string;\n \"qSelo\"?: number;\n \"qUnid\"?: string;\n \"vBC\"?: string;\n \"vIPI\"?: string;\n \"vUnid\"?: string;\n}\nexport class TIPI {\n \"cEnq\"?: string;\n \"clEnq\"?: string;\n \"CNPJProd\"?: string;\n \"cSelo\"?: string;\n /** Pascal streaming default: ipi00. Omission preserves the native constructor. */\n \"CST\"?: TpcnCstIpi;\n \"pIPI\"?: string;\n \"qSelo\"?: number;\n \"qUnid\"?: string;\n \"vBC\"?: string;\n \"vIPI\"?: string;\n \"vUnid\"?: string;\n constructor(input: TIPIInput = {}) {\n validateModel(\"TIPI\", input);\n if (input[\"cEnq\"] !== undefined) this[\"cEnq\"] = input[\"cEnq\"];\n if (input[\"clEnq\"] !== undefined) this[\"clEnq\"] = input[\"clEnq\"];\n if (input[\"CNPJProd\"] !== undefined) this[\"CNPJProd\"] = input[\"CNPJProd\"];\n if (input[\"cSelo\"] !== undefined) this[\"cSelo\"] = input[\"cSelo\"];\n if (input[\"CST\"] !== undefined) this[\"CST\"] = input[\"CST\"];\n if (input[\"pIPI\"] !== undefined) this[\"pIPI\"] = input[\"pIPI\"];\n if (input[\"qSelo\"] !== undefined) this[\"qSelo\"] = input[\"qSelo\"];\n if (input[\"qUnid\"] !== undefined) this[\"qUnid\"] = input[\"qUnid\"];\n if (input[\"vBC\"] !== undefined) this[\"vBC\"] = input[\"vBC\"];\n if (input[\"vIPI\"] !== undefined) this[\"vIPI\"] = input[\"vIPI\"];\n if (input[\"vUnid\"] !== undefined) this[\"vUnid\"] = input[\"vUnid\"];\n }\n}\nexport interface TISSQNInput {\n \"cListServ\"?: string;\n \"cMun\"?: number;\n \"cMunFG\"?: number;\n \"cPais\"?: number;\n \"cServico\"?: string;\n \"cSitTrib\"?: TpcnISSQNcSitTrib;\n \"indIncentivo\"?: TindIncentivo;\n \"indISS\"?: TpcnindISS;\n \"indISSRet\"?: TpcnindISSRet;\n \"nProcesso\"?: string;\n \"vAliq\"?: string;\n \"vBC\"?: string;\n \"vDeducao\"?: string;\n \"vDescCond\"?: string;\n \"vDescIncond\"?: string;\n \"vISSQN\"?: string;\n \"vISSRet\"?: string;\n \"vOutro\"?: string;\n}\nexport class TISSQN {\n \"cListServ\"?: string;\n \"cMun\"?: number;\n \"cMunFG\"?: number;\n \"cPais\"?: number;\n \"cServico\"?: string;\n /** Pascal streaming default: ISSQNcSitTribVazio. Omission preserves the native constructor. */\n \"cSitTrib\"?: TpcnISSQNcSitTrib;\n \"indIncentivo\"?: TindIncentivo;\n \"indISS\"?: TpcnindISS;\n \"indISSRet\"?: TpcnindISSRet;\n \"nProcesso\"?: string;\n \"vAliq\"?: string;\n \"vBC\"?: string;\n \"vDeducao\"?: string;\n \"vDescCond\"?: string;\n \"vDescIncond\"?: string;\n \"vISSQN\"?: string;\n \"vISSRet\"?: string;\n \"vOutro\"?: string;\n constructor(input: TISSQNInput = {}) {\n validateModel(\"TISSQN\", input);\n if (input[\"cListServ\"] !== undefined) this[\"cListServ\"] = input[\"cListServ\"];\n if (input[\"cMun\"] !== undefined) this[\"cMun\"] = input[\"cMun\"];\n if (input[\"cMunFG\"] !== undefined) this[\"cMunFG\"] = input[\"cMunFG\"];\n if (input[\"cPais\"] !== undefined) this[\"cPais\"] = input[\"cPais\"];\n if (input[\"cServico\"] !== undefined) this[\"cServico\"] = input[\"cServico\"];\n if (input[\"cSitTrib\"] !== undefined) this[\"cSitTrib\"] = input[\"cSitTrib\"];\n if (input[\"indIncentivo\"] !== undefined) this[\"indIncentivo\"] = input[\"indIncentivo\"];\n if (input[\"indISS\"] !== undefined) this[\"indISS\"] = input[\"indISS\"];\n if (input[\"indISSRet\"] !== undefined) this[\"indISSRet\"] = input[\"indISSRet\"];\n if (input[\"nProcesso\"] !== undefined) this[\"nProcesso\"] = input[\"nProcesso\"];\n if (input[\"vAliq\"] !== undefined) this[\"vAliq\"] = input[\"vAliq\"];\n if (input[\"vBC\"] !== undefined) this[\"vBC\"] = input[\"vBC\"];\n if (input[\"vDeducao\"] !== undefined) this[\"vDeducao\"] = input[\"vDeducao\"];\n if (input[\"vDescCond\"] !== undefined) this[\"vDescCond\"] = input[\"vDescCond\"];\n if (input[\"vDescIncond\"] !== undefined) this[\"vDescIncond\"] = input[\"vDescIncond\"];\n if (input[\"vISSQN\"] !== undefined) this[\"vISSQN\"] = input[\"vISSQN\"];\n if (input[\"vISSRet\"] !== undefined) this[\"vISSRet\"] = input[\"vISSRet\"];\n if (input[\"vOutro\"] !== undefined) this[\"vOutro\"] = input[\"vOutro\"];\n }\n}\nexport interface TISSQNtotInput {\n \"cRegTrib\"?: TRegTribISSQN;\n \"dCompet\"?: string;\n \"vBC\"?: string;\n \"vCOFINS\"?: string;\n \"vDeducao\"?: string;\n \"vDescCond\"?: string;\n \"vDescIncond\"?: string;\n \"vISS\"?: string;\n \"vISSRet\"?: string;\n \"vOutro\"?: string;\n \"vPIS\"?: string;\n \"vServ\"?: string;\n}\nexport class TISSQNtot {\n \"cRegTrib\"?: TRegTribISSQN;\n \"dCompet\"?: string;\n \"vBC\"?: string;\n \"vCOFINS\"?: string;\n \"vDeducao\"?: string;\n \"vDescCond\"?: string;\n \"vDescIncond\"?: string;\n \"vISS\"?: string;\n \"vISSRet\"?: string;\n \"vOutro\"?: string;\n \"vPIS\"?: string;\n \"vServ\"?: string;\n constructor(input: TISSQNtotInput = {}) {\n validateModel(\"TISSQNtot\", input);\n if (input[\"cRegTrib\"] !== undefined) this[\"cRegTrib\"] = input[\"cRegTrib\"];\n if (input[\"dCompet\"] !== undefined) this[\"dCompet\"] = input[\"dCompet\"];\n if (input[\"vBC\"] !== undefined) this[\"vBC\"] = input[\"vBC\"];\n if (input[\"vCOFINS\"] !== undefined) this[\"vCOFINS\"] = input[\"vCOFINS\"];\n if (input[\"vDeducao\"] !== undefined) this[\"vDeducao\"] = input[\"vDeducao\"];\n if (input[\"vDescCond\"] !== undefined) this[\"vDescCond\"] = input[\"vDescCond\"];\n if (input[\"vDescIncond\"] !== undefined) this[\"vDescIncond\"] = input[\"vDescIncond\"];\n if (input[\"vISS\"] !== undefined) this[\"vISS\"] = input[\"vISS\"];\n if (input[\"vISSRet\"] !== undefined) this[\"vISSRet\"] = input[\"vISSRet\"];\n if (input[\"vOutro\"] !== undefined) this[\"vOutro\"] = input[\"vOutro\"];\n if (input[\"vPIS\"] !== undefined) this[\"vPIS\"] = input[\"vPIS\"];\n if (input[\"vServ\"] !== undefined) this[\"vServ\"] = input[\"vServ\"];\n }\n}\nexport interface TISTotInput {\n \"vIS\"?: string;\n}\nexport class TISTot {\n \"vIS\"?: string;\n constructor(input: TISTotInput = {}) {\n validateModel(\"TISTot\", input);\n if (input[\"vIS\"] !== undefined) this[\"vIS\"] = input[\"vIS\"];\n }\n}\nexport type TLacresCollectionInput = TLacresCollectionItemInput[];\nexport class TLacresCollection extends Array<TLacresCollectionItem> {\n New(input: TLacresCollectionItemInput = {}): TLacresCollectionItem { const item=new TLacresCollectionItem(input); this.push(item); return item; }\n}\nexport interface TLacresCollectionItemInput {\n \"nLacre\"?: string;\n}\nexport class TLacresCollectionItem {\n \"nLacre\"?: string;\n constructor(input: TLacresCollectionItemInput = {}) {\n validateModel(\"TLacresCollectionItem\", input);\n if (input[\"nLacre\"] !== undefined) this[\"nLacre\"] = input[\"nLacre\"];\n }\n}\nexport type TMedCollectionInput = TMedCollectionItemInput[];\nexport class TMedCollection extends Array<TMedCollectionItem> {\n New(input: TMedCollectionItemInput = {}): TMedCollectionItem { const item=new TMedCollectionItem(input); this.push(item); return item; }\n}\nexport interface TMedCollectionItemInput {\n \"cProdANVISA\"?: string;\n \"dFab\"?: string;\n \"dVal\"?: string;\n \"nLote\"?: string;\n \"qLote\"?: string;\n \"vPMC\"?: string;\n \"xMotivoIsencao\"?: string;\n}\nexport class TMedCollectionItem {\n \"cProdANVISA\"?: string;\n \"dFab\"?: string;\n \"dVal\"?: string;\n \"nLote\"?: string;\n \"qLote\"?: string;\n \"vPMC\"?: string;\n \"xMotivoIsencao\"?: string;\n constructor(input: TMedCollectionItemInput = {}) {\n validateModel(\"TMedCollectionItem\", input);\n if (input[\"cProdANVISA\"] !== undefined) this[\"cProdANVISA\"] = input[\"cProdANVISA\"];\n if (input[\"dFab\"] !== undefined) this[\"dFab\"] = input[\"dFab\"];\n if (input[\"dVal\"] !== undefined) this[\"dVal\"] = input[\"dVal\"];\n if (input[\"nLote\"] !== undefined) this[\"nLote\"] = input[\"nLote\"];\n if (input[\"qLote\"] !== undefined) this[\"qLote\"] = input[\"qLote\"];\n if (input[\"vPMC\"] !== undefined) this[\"vPMC\"] = input[\"vPMC\"];\n if (input[\"xMotivoIsencao\"] !== undefined) this[\"xMotivoIsencao\"] = input[\"xMotivoIsencao\"];\n }\n}\nexport const TmotRedAdRem = Object.freeze({\"motTranspColetivo\":\"motTranspColetivo\",\"motOutros\":\"motOutros\"} as const);\nexport type TmotRedAdRem = typeof TmotRedAdRem[keyof typeof TmotRedAdRem];\nexport interface TNFeInput {\n \"agropecuario\"?: TagropecuarioInput;\n \"autXML\"?: TautXMLCollectionInput;\n \"Avulsa\"?: TAvulsaInput;\n \"cana\"?: TcanaInput;\n \"Cobr\"?: TCobrInput;\n \"compra\"?: TCompraInput;\n \"Dest\"?: TDestInput;\n \"Det\"?: TDetCollectionInput;\n \"Emit\"?: TEmitInput;\n \"Entrega\"?: TEntregaInput;\n \"exporta\"?: TExportaInput;\n \"Ide\"?: TIdeInput;\n \"InfAdic\"?: TInfAdicInput;\n \"infIntermed\"?: TinfIntermedInput;\n \"infNFe\"?: TinfNFeInput;\n \"infPAA\"?: TinfPAAInput;\n \"infRespTec\"?: TinfRespTecInput;\n \"pag\"?: TpagCollectionInput;\n \"Retirada\"?: TRetiradaInput;\n \"Total\"?: TTotalInput;\n \"Transp\"?: TTranspInput;\n}\nexport class TNFe {\n \"agropecuario\" = new Tagropecuario();\n \"autXML\" = new TautXMLCollection();\n \"Avulsa\" = new TAvulsa();\n \"cana\" = new Tcana();\n \"Cobr\" = new TCobr();\n \"compra\" = new TCompra();\n \"Dest\" = new TDest();\n \"Det\" = new TDetCollection();\n \"Emit\" = new TEmit();\n \"Entrega\" = new TEntrega();\n \"exporta\" = new TExporta();\n \"Ide\" = new TIde();\n \"InfAdic\" = new TInfAdic();\n \"infIntermed\" = new TinfIntermed();\n \"infNFe\" = new TinfNFe();\n readonly \"infNFeSupl\"?: TinfNFeSuplInput;\n \"infPAA\" = new TinfPAA();\n \"infRespTec\" = new TinfRespTec();\n \"pag\" = new TpagCollection();\n readonly \"procNFe\"?: TProcDFeInput;\n \"Retirada\" = new TRetirada();\n readonly \"signature\"?: TSignatureInput;\n \"Total\" = new TTotal();\n \"Transp\" = new TTransp();\n constructor(input: TNFeInput = {}) {\n validateModel(\"TNFe\", input);\n if (input[\"agropecuario\"] !== undefined) this[\"agropecuario\"] = new Tagropecuario(input[\"agropecuario\"]);\n if (input[\"autXML\"] !== undefined) this[\"autXML\"] = Object.assign(new TautXMLCollection(), input[\"autXML\"].map(v=>new TautXMLCollectionItem(v)));\n if (input[\"Avulsa\"] !== undefined) this[\"Avulsa\"] = new TAvulsa(input[\"Avulsa\"]);\n if (input[\"cana\"] !== undefined) this[\"cana\"] = new Tcana(input[\"cana\"]);\n if (input[\"Cobr\"] !== undefined) this[\"Cobr\"] = new TCobr(input[\"Cobr\"]);\n if (input[\"compra\"] !== undefined) this[\"compra\"] = new TCompra(input[\"compra\"]);\n if (input[\"Dest\"] !== undefined) this[\"Dest\"] = new TDest(input[\"Dest\"]);\n if (input[\"Det\"] !== undefined) this[\"Det\"] = Object.assign(new TDetCollection(), input[\"Det\"].map(v=>new TDetCollectionItem(v)));\n if (input[\"Emit\"] !== undefined) this[\"Emit\"] = new TEmit(input[\"Emit\"]);\n if (input[\"Entrega\"] !== undefined) this[\"Entrega\"] = new TEntrega(input[\"Entrega\"]);\n if (input[\"exporta\"] !== undefined) this[\"exporta\"] = new TExporta(input[\"exporta\"]);\n if (input[\"Ide\"] !== undefined) this[\"Ide\"] = new TIde(input[\"Ide\"]);\n if (input[\"InfAdic\"] !== undefined) this[\"InfAdic\"] = new TInfAdic(input[\"InfAdic\"]);\n if (input[\"infIntermed\"] !== undefined) this[\"infIntermed\"] = new TinfIntermed(input[\"infIntermed\"]);\n if (input[\"infNFe\"] !== undefined) this[\"infNFe\"] = new TinfNFe(input[\"infNFe\"]);\n if (input[\"infPAA\"] !== undefined) this[\"infPAA\"] = new TinfPAA(input[\"infPAA\"]);\n if (input[\"infRespTec\"] !== undefined) this[\"infRespTec\"] = new TinfRespTec(input[\"infRespTec\"]);\n if (input[\"pag\"] !== undefined) this[\"pag\"] = Object.assign(new TpagCollection(), input[\"pag\"].map(v=>new TpagCollectionItem(v)));\n if (input[\"Retirada\"] !== undefined) this[\"Retirada\"] = new TRetirada(input[\"Retirada\"]);\n if (input[\"Total\"] !== undefined) this[\"Total\"] = new TTotal(input[\"Total\"]);\n if (input[\"Transp\"] !== undefined) this[\"Transp\"] = new TTransp(input[\"Transp\"]);\n }\n}\nexport type TNFrefCollectionInput = TNFrefCollectionItemInput[];\nexport class TNFrefCollection extends Array<TNFrefCollectionItem> {\n New(input: TNFrefCollectionItemInput = {}): TNFrefCollectionItem { const item=new TNFrefCollectionItem(input); this.push(item); return item; }\n}\nexport interface TNFrefCollectionItemInput {\n \"refCTe\"?: string;\n \"RefECF\"?: TRefECFInput;\n \"RefNF\"?: TRefNFInput;\n \"refNFe\"?: string;\n \"refNFeSig\"?: string;\n \"RefNFP\"?: TRefNFPInput;\n}\nexport class TNFrefCollectionItem {\n \"refCTe\"?: string;\n \"RefECF\" = new TRefECF();\n \"RefNF\" = new TRefNF();\n \"refNFe\"?: string;\n \"refNFeSig\"?: string;\n \"RefNFP\" = new TRefNFP();\n constructor(input: TNFrefCollectionItemInput = {}) {\n validateModel(\"TNFrefCollectionItem\", input);\n if (input[\"refCTe\"] !== undefined) this[\"refCTe\"] = input[\"refCTe\"];\n if (input[\"RefECF\"] !== undefined) this[\"RefECF\"] = new TRefECF(input[\"RefECF\"]);\n if (input[\"RefNF\"] !== undefined) this[\"RefNF\"] = new TRefNF(input[\"RefNF\"]);\n if (input[\"refNFe\"] !== undefined) this[\"refNFe\"] = input[\"refNFe\"];\n if (input[\"refNFeSig\"] !== undefined) this[\"refNFeSig\"] = input[\"refNFeSig\"];\n if (input[\"RefNFP\"] !== undefined) this[\"RefNFP\"] = new TRefNFP(input[\"RefNFP\"]);\n }\n}\nexport type TNVECollectionInput = TNVECollectionItemInput[];\nexport class TNVECollection extends Array<TNVECollectionItem> {\n New(input: TNVECollectionItemInput = {}): TNVECollectionItem { const item=new TNVECollectionItem(input); this.push(item); return item; }\n}\nexport interface TNVECollectionItemInput {\n \"NVE\"?: string;\n}\nexport class TNVECollectionItem {\n \"NVE\"?: string;\n constructor(input: TNVECollectionItemInput = {}) {\n validateModel(\"TNVECollectionItem\", input);\n if (input[\"NVE\"] !== undefined) this[\"NVE\"] = input[\"NVE\"];\n }\n}\nexport type TobsContCollectionInput = TobsContCollectionItemInput[];\nexport class TobsContCollection extends Array<TobsContCollectionItem> {\n New(input: TobsContCollectionItemInput = {}): TobsContCollectionItem { const item=new TobsContCollectionItem(input); this.push(item); return item; }\n}\nexport interface TobsContCollectionItemInput {\n \"xCampo\"?: string;\n \"xTexto\"?: string;\n}\nexport class TobsContCollectionItem {\n \"xCampo\"?: string;\n \"xTexto\"?: string;\n constructor(input: TobsContCollectionItemInput = {}) {\n validateModel(\"TobsContCollectionItem\", input);\n if (input[\"xCampo\"] !== undefined) this[\"xCampo\"] = input[\"xCampo\"];\n if (input[\"xTexto\"] !== undefined) this[\"xTexto\"] = input[\"xTexto\"];\n }\n}\nexport type TobsFiscoCollectionInput = TobsFiscoCollectionItemInput[];\nexport class TobsFiscoCollection extends Array<TobsFiscoCollectionItem> {\n New(input: TobsFiscoCollectionItemInput = {}): TobsFiscoCollectionItem { const item=new TobsFiscoCollectionItem(input); this.push(item); return item; }\n}\nexport interface TobsFiscoCollectionItemInput {\n \"xCampo\"?: string;\n \"xTexto\"?: string;\n}\nexport class TobsFiscoCollectionItem {\n \"xCampo\"?: string;\n \"xTexto\"?: string;\n constructor(input: TobsFiscoCollectionItemInput = {}) {\n validateModel(\"TobsFiscoCollectionItem\", input);\n if (input[\"xCampo\"] !== undefined) this[\"xCampo\"] = input[\"xCampo\"];\n if (input[\"xTexto\"] !== undefined) this[\"xTexto\"] = input[\"xTexto\"];\n }\n}\nexport interface TobsItemInput {\n \"xCampo\"?: string;\n \"xTexto\"?: string;\n}\nexport class TobsItem {\n \"xCampo\"?: string;\n \"xTexto\"?: string;\n constructor(input: TobsItemInput = {}) {\n validateModel(\"TobsItem\", input);\n if (input[\"xCampo\"] !== undefined) this[\"xCampo\"] = input[\"xCampo\"];\n if (input[\"xTexto\"] !== undefined) this[\"xTexto\"] = input[\"xTexto\"];\n }\n}\nexport type TorigCombCollectionInput = TorigCombCollectionItemInput[];\nexport class TorigCombCollection extends Array<TorigCombCollectionItem> {\n New(input: TorigCombCollectionItemInput = {}): TorigCombCollectionItem { const item=new TorigCombCollectionItem(input); this.push(item); return item; }\n}\nexport interface TorigCombCollectionItemInput {\n \"cUFOrig\"?: number;\n \"indImport\"?: TindImport;\n \"pOrig\"?: string;\n}\nexport class TorigCombCollectionItem {\n \"cUFOrig\"?: number;\n \"indImport\"?: TindImport;\n \"pOrig\"?: string;\n constructor(input: TorigCombCollectionItemInput = {}) {\n validateModel(\"TorigCombCollectionItem\", input);\n if (input[\"cUFOrig\"] !== undefined) this[\"cUFOrig\"] = input[\"cUFOrig\"];\n if (input[\"indImport\"] !== undefined) this[\"indImport\"] = input[\"indImport\"];\n if (input[\"pOrig\"] !== undefined) this[\"pOrig\"] = input[\"pOrig\"];\n }\n}\nexport const TOrigemMercadoria = Object.freeze({\"oeNacional\":\"oeNacional\",\"oeEstrangeiraImportacaoDireta\":\"oeEstrangeiraImportacaoDireta\",\"oeEstrangeiraAdquiridaBrasil\":\"oeEstrangeiraAdquiridaBrasil\",\"oeNacionalConteudoImportacaoSuperior40\":\"oeNacionalConteudoImportacaoSuperior40\",\"oeNacionalProcessosBasicos\":\"oeNacionalProcessosBasicos\",\"oeNacionalConteudoImportacaoInferiorIgual40\":\"oeNacionalConteudoImportacaoInferiorIgual40\",\"oeEstrangeiraImportacaoDiretaSemSimilar\":\"oeEstrangeiraImportacaoDiretaSemSimilar\",\"oeEstrangeiraAdquiridaBrasilSemSimilar\":\"oeEstrangeiraAdquiridaBrasilSemSimilar\",\"oeNacionalConteudoImportacaoSuperior70\":\"oeNacionalConteudoImportacaoSuperior70\",\"oeReservadoParaUsoFuturo\":\"oeReservadoParaUsoFuturo\",\"oeVazio\":\"oeVazio\"} as const);\nexport type TOrigemMercadoria = typeof TOrigemMercadoria[keyof typeof TOrigemMercadoria];\nexport type TpagCollectionInput = TpagCollectionItemInput[];\nexport class TpagCollection extends Array<TpagCollectionItem> {\n New(input: TpagCollectionItemInput = {}): TpagCollectionItem { const item=new TpagCollectionItem(input); this.push(item); return item; }\n}\nexport interface TpagCollectionItemInput {\n \"cAut\"?: string;\n \"CNPJ\"?: string;\n \"CNPJPag\"?: string;\n \"CNPJReceb\"?: string;\n \"dPag\"?: string;\n \"idTermPag\"?: string;\n \"indPag\"?: TpcnIndicadorPagamento;\n \"tBand\"?: TpcnBandeiraCartao;\n \"tPag\"?: TpcnFormaPagamento;\n \"tpIntegra\"?: TtpIntegra;\n \"UFPag\"?: string;\n \"vPag\"?: string;\n \"xPag\"?: string;\n}\nexport class TpagCollectionItem {\n \"cAut\"?: string;\n \"CNPJ\"?: string;\n \"CNPJPag\"?: string;\n \"CNPJReceb\"?: string;\n \"dPag\"?: string;\n \"idTermPag\"?: string;\n /** Pascal streaming default: ipNenhum. Omission preserves the native constructor. */\n \"indPag\"?: TpcnIndicadorPagamento;\n \"tBand\"?: TpcnBandeiraCartao;\n \"tPag\"?: TpcnFormaPagamento;\n \"tpIntegra\"?: TtpIntegra;\n \"UFPag\"?: string;\n \"vPag\"?: string;\n \"xPag\"?: string;\n constructor(input: TpagCollectionItemInput = {}) {\n validateModel(\"TpagCollectionItem\", input);\n if (input[\"cAut\"] !== undefined) this[\"cAut\"] = input[\"cAut\"];\n if (input[\"CNPJ\"] !== undefined) this[\"CNPJ\"] = input[\"CNPJ\"];\n if (input[\"CNPJPag\"] !== undefined) this[\"CNPJPag\"] = input[\"CNPJPag\"];\n if (input[\"CNPJReceb\"] !== undefined) this[\"CNPJReceb\"] = input[\"CNPJReceb\"];\n if (input[\"dPag\"] !== undefined) this[\"dPag\"] = input[\"dPag\"];\n if (input[\"idTermPag\"] !== undefined) this[\"idTermPag\"] = input[\"idTermPag\"];\n if (input[\"indPag\"] !== undefined) this[\"indPag\"] = input[\"indPag\"];\n if (input[\"tBand\"] !== undefined) this[\"tBand\"] = input[\"tBand\"];\n if (input[\"tPag\"] !== undefined) this[\"tPag\"] = input[\"tPag\"];\n if (input[\"tpIntegra\"] !== undefined) this[\"tpIntegra\"] = input[\"tpIntegra\"];\n if (input[\"UFPag\"] !== undefined) this[\"UFPag\"] = input[\"UFPag\"];\n if (input[\"vPag\"] !== undefined) this[\"vPag\"] = input[\"vPag\"];\n if (input[\"xPag\"] !== undefined) this[\"xPag\"] = input[\"xPag\"];\n }\n}\nexport const TpcnBandeiraCartao = Object.freeze({\"bcVisa\":\"bcVisa\",\"bcMasterCard\":\"bcMasterCard\",\"bcAmericanExpress\":\"bcAmericanExpress\",\"bcSorocred\":\"bcSorocred\",\"bcDinersClub\":\"bcDinersClub\",\"bcElo\":\"bcElo\",\"bcHipercard\":\"bcHipercard\",\"bcAura\":\"bcAura\",\"bcCabal\":\"bcCabal\",\"bcAlelo\":\"bcAlelo\",\"bcBanesCard\":\"bcBanesCard\",\"bcCalCard\":\"bcCalCard\",\"bcCredz\":\"bcCredz\",\"bcDiscover\":\"bcDiscover\",\"bcGoodCard\":\"bcGoodCard\",\"bcGreenCard\":\"bcGreenCard\",\"bcHiper\":\"bcHiper\",\"bcJcB\":\"bcJcB\",\"bcMais\":\"bcMais\",\"bcMaxVan\":\"bcMaxVan\",\"bcPolicard\":\"bcPolicard\",\"bcRedeCompras\":\"bcRedeCompras\",\"bcSodexo\":\"bcSodexo\",\"bcValeCard\":\"bcValeCard\",\"bcVerocheque\":\"bcVerocheque\",\"bcVR\":\"bcVR\",\"bcTicket\":\"bcTicket\",\"bcOutros\":\"bcOutros\"} as const);\nexport type TpcnBandeiraCartao = typeof TpcnBandeiraCartao[keyof typeof TpcnBandeiraCartao];\nexport const TpcnCondicaoVeiculo = Object.freeze({\"cvAcabado\":\"cvAcabado\",\"cvInacabado\":\"cvInacabado\",\"cvSemiAcabado\":\"cvSemiAcabado\"} as const);\nexport type TpcnCondicaoVeiculo = typeof TpcnCondicaoVeiculo[keyof typeof TpcnCondicaoVeiculo];\nexport const TpcnConsumidorFinal = Object.freeze({\"cfNao\":\"cfNao\",\"cfConsumidorFinal\":\"cfConsumidorFinal\"} as const);\nexport type TpcnConsumidorFinal = typeof TpcnConsumidorFinal[keyof typeof TpcnConsumidorFinal];\nexport const TpcnCRT = Object.freeze({\"crtSimplesNacional\":\"crtSimplesNacional\",\"crtSimplesExcessoReceita\":\"crtSimplesExcessoReceita\",\"crtRegimeNormal\":\"crtRegimeNormal\",\"crtMEI\":\"crtMEI\"} as const);\nexport type TpcnCRT = typeof TpcnCRT[keyof typeof TpcnCRT];\nexport const TpcnCstIpi = Object.freeze({\"ipi00\":\"ipi00\",\"ipi49\":\"ipi49\",\"ipi50\":\"ipi50\",\"ipi99\":\"ipi99\",\"ipi01\":\"ipi01\",\"ipi02\":\"ipi02\",\"ipi03\":\"ipi03\",\"ipi04\":\"ipi04\",\"ipi05\":\"ipi05\",\"ipi51\":\"ipi51\",\"ipi52\":\"ipi52\",\"ipi53\":\"ipi53\",\"ipi54\":\"ipi54\",\"ipi55\":\"ipi55\"} as const);\nexport type TpcnCstIpi = typeof TpcnCstIpi[keyof typeof TpcnCstIpi];\nexport const TpcnDestinoOperacao = Object.freeze({\"doInterna\":\"doInterna\",\"doInterestadual\":\"doInterestadual\",\"doExterior\":\"doExterior\"} as const);\nexport type TpcnDestinoOperacao = typeof TpcnDestinoOperacao[keyof typeof TpcnDestinoOperacao];\nexport const TpcnDeterminacaoBaseIcms = Object.freeze({\"dbiMargemValorAgregado\":\"dbiMargemValorAgregado\",\"dbiPauta\":\"dbiPauta\",\"dbiPrecoTabelado\":\"dbiPrecoTabelado\",\"dbiValorOperacao\":\"dbiValorOperacao\",\"dbiNenhum\":\"dbiNenhum\"} as const);\nexport type TpcnDeterminacaoBaseIcms = typeof TpcnDeterminacaoBaseIcms[keyof typeof TpcnDeterminacaoBaseIcms];\nexport const TpcnDeterminacaoBaseIcmsST = Object.freeze({\"dbisPrecoTabelado\":\"dbisPrecoTabelado\",\"dbisListaNegativa\":\"dbisListaNegativa\",\"dbisListaPositiva\":\"dbisListaPositiva\",\"dbisListaNeutra\":\"dbisListaNeutra\",\"dbisMargemValorAgregado\":\"dbisMargemValorAgregado\",\"dbisPauta\":\"dbisPauta\",\"dbisValordaOperacao\":\"dbisValordaOperacao\"} as const);\nexport type TpcnDeterminacaoBaseIcmsST = typeof TpcnDeterminacaoBaseIcmsST[keyof typeof TpcnDeterminacaoBaseIcmsST];\nexport const TpcnECFModRef = Object.freeze({\"ECFModRefVazio\":\"ECFModRefVazio\",\"ECFModRef2B\":\"ECFModRef2B\",\"ECFModRef2C\":\"ECFModRef2C\",\"ECFModRef2D\":\"ECFModRef2D\"} as const);\nexport type TpcnECFModRef = typeof TpcnECFModRef[keyof typeof TpcnECFModRef];\nexport const TpcnFinalidadeNFe = Object.freeze({\"fnNormal\":\"fnNormal\",\"fnComplementar\":\"fnComplementar\",\"fnAjuste\":\"fnAjuste\",\"fnDevolucao\":\"fnDevolucao\",\"fnCredito\":\"fnCredito\",\"fnDebito\":\"fnDebito\"} as const);\nexport type TpcnFinalidadeNFe = typeof TpcnFinalidadeNFe[keyof typeof TpcnFinalidadeNFe];\nexport const TpcnFormaPagamento = Object.freeze({\"fpDinheiro\":\"fpDinheiro\",\"fpCheque\":\"fpCheque\",\"fpCartaoCredito\":\"fpCartaoCredito\",\"fpCartaoDebito\":\"fpCartaoDebito\",\"fpCreditoLoja\":\"fpCreditoLoja\",\"fpValeAlimentacao\":\"fpValeAlimentacao\",\"fpValeRefeicao\":\"fpValeRefeicao\",\"fpValePresente\":\"fpValePresente\",\"fpValeCombustivel\":\"fpValeCombustivel\",\"fpDuplicataMercantil\":\"fpDuplicataMercantil\",\"fpBoletoBancario\":\"fpBoletoBancario\",\"fpDepositoBancario\":\"fpDepositoBancario\",\"fpPagamentoInstantaneo\":\"fpPagamentoInstantaneo\",\"fpTransfBancario\":\"fpTransfBancario\",\"fpProgramaFidelidade\":\"fpProgramaFidelidade\",\"fpSemPagamento\":\"fpSemPagamento\",\"fpRegimeEspecial\":\"fpRegimeEspecial\",\"fpOutro\":\"fpOutro\",\"fpPagamentoInstantaneoEstatico\":\"fpPagamentoInstantaneoEstatico\",\"fpCreditoEmLojaPorDevolucao\":\"fpCreditoEmLojaPorDevolucao\",\"fpFalhaHardware\":\"fpFalhaHardware\",\"fpPagamentoPosterior\":\"fpPagamentoPosterior\",\"fpPagInstantaneoPIXAutomatico\":\"fpPagInstantaneoPIXAutomatico\",\"fpTEFBookTransfer\":\"fpTEFBookTransfer\"} as const);\nexport type TpcnFormaPagamento = typeof TpcnFormaPagamento[keyof typeof TpcnFormaPagamento];\nexport const TpcnIndEscala = Object.freeze({\"ieRelevante\":\"ieRelevante\",\"ieNaoRelevante\":\"ieNaoRelevante\",\"ieNenhum\":\"ieNenhum\"} as const);\nexport type TpcnIndEscala = typeof TpcnIndEscala[keyof typeof TpcnIndEscala];\nexport const TpcnIndicadorPagamento = Object.freeze({\"ipVista\":\"ipVista\",\"ipPrazo\":\"ipPrazo\",\"ipOutras\":\"ipOutras\",\"ipNenhum\":\"ipNenhum\"} as const);\nexport type TpcnIndicadorPagamento = typeof TpcnIndicadorPagamento[keyof typeof TpcnIndicadorPagamento];\nexport const TpcnIndicadorProcesso = Object.freeze({\"ipSEFAZ\":\"ipSEFAZ\",\"ipJusticaFederal\":\"ipJusticaFederal\",\"ipJusticaEstadual\":\"ipJusticaEstadual\",\"ipSecexRFB\":\"ipSecexRFB\",\"ipCONFAZ\":\"ipCONFAZ\",\"ipOutros\":\"ipOutros\"} as const);\nexport type TpcnIndicadorProcesso = typeof TpcnIndicadorProcesso[keyof typeof TpcnIndicadorProcesso];\nexport const TpcnIndicadorTotal = Object.freeze({\"itSomaTotalNFe\":\"itSomaTotalNFe\",\"itNaoSomaTotalNFe\":\"itNaoSomaTotalNFe\"} as const);\nexport type TpcnIndicadorTotal = typeof TpcnIndicadorTotal[keyof typeof TpcnIndicadorTotal];\nexport const TpcnindISS = Object.freeze({\"iiExigivel\":\"iiExigivel\",\"iiNaoIncidencia\":\"iiNaoIncidencia\",\"iiIsencao\":\"iiIsencao\",\"iiExportacao\":\"iiExportacao\",\"iiImunidade\":\"iiImunidade\",\"iiExigSuspDecisaoJudicial\":\"iiExigSuspDecisaoJudicial\",\"iiExigSuspProcessoAdm\":\"iiExigSuspProcessoAdm\"} as const);\nexport type TpcnindISS = typeof TpcnindISS[keyof typeof TpcnindISS];\nexport const TpcnindISSRet = Object.freeze({\"iirSim\":\"iirSim\",\"iirNao\":\"iirNao\"} as const);\nexport type TpcnindISSRet = typeof TpcnindISSRet[keyof typeof TpcnindISSRet];\nexport const TpcnISSQNcSitTrib = Object.freeze({\"ISSQNcSitTribVazio\":\"ISSQNcSitTribVazio\",\"ISSQNcSitTribNORMAL\":\"ISSQNcSitTribNORMAL\",\"ISSQNcSitTribRETIDA\":\"ISSQNcSitTribRETIDA\",\"ISSQNcSitTribSUBSTITUTA\":\"ISSQNcSitTribSUBSTITUTA\",\"ISSQNcSitTribISENTA\":\"ISSQNcSitTribISENTA\"} as const);\nexport type TpcnISSQNcSitTrib = typeof TpcnISSQNcSitTrib[keyof typeof TpcnISSQNcSitTrib];\nexport const TpcnModalidadeFrete = Object.freeze({\"mfContaEmitente\":\"mfContaEmitente\",\"mfContaDestinatario\":\"mfContaDestinatario\",\"mfContaTerceiros\":\"mfContaTerceiros\",\"mfProprioRemetente\":\"mfProprioRemetente\",\"mfProprioDestinatario\":\"mfProprioDestinatario\",\"mfSemFrete\":\"mfSemFrete\"} as const);\nexport type TpcnModalidadeFrete = typeof TpcnModalidadeFrete[keyof typeof TpcnModalidadeFrete];\nexport const TpcnMotivoDesoneracaoICMS = Object.freeze({\"mdiTaxi\":\"mdiTaxi\",\"mdiDeficienteFisico\":\"mdiDeficienteFisico\",\"mdiProdutorAgropecuario\":\"mdiProdutorAgropecuario\",\"mdiFrotistaLocadora\":\"mdiFrotistaLocadora\",\"mdiDiplomaticoConsular\":\"mdiDiplomaticoConsular\",\"mdiAmazoniaLivreComercio\":\"mdiAmazoniaLivreComercio\",\"mdiSuframa\":\"mdiSuframa\",\"mdiVendaOrgaosPublicos\":\"mdiVendaOrgaosPublicos\",\"mdiOutros\":\"mdiOutros\",\"mdiDeficienteCondutor\":\"mdiDeficienteCondutor\",\"mdiDeficienteNaoCondutor\":\"mdiDeficienteNaoCondutor\",\"mdiOrgaoFomento\":\"mdiOrgaoFomento\",\"mdiOlimpiadaRio2016\":\"mdiOlimpiadaRio2016\",\"mdiSolicitadoFisco\":\"mdiSolicitadoFisco\"} as const);\nexport type TpcnMotivoDesoneracaoICMS = typeof TpcnMotivoDesoneracaoICMS[keyof typeof TpcnMotivoDesoneracaoICMS];\nexport const TpcnPresencaComprador = Object.freeze({\"pcNao\":\"pcNao\",\"pcPresencial\":\"pcPresencial\",\"pcInternet\":\"pcInternet\",\"pcTeleatendimento\":\"pcTeleatendimento\",\"pcEntregaDomicilio\":\"pcEntregaDomicilio\",\"pcPresencialForaEstabelecimento\":\"pcPresencialForaEstabelecimento\",\"pcOutros\":\"pcOutros\"} as const);\nexport type TpcnPresencaComprador = typeof TpcnPresencaComprador[keyof typeof TpcnPresencaComprador];\nexport const TpcnTipoArma = Object.freeze({\"taUsoPermitido\":\"taUsoPermitido\",\"taUsoRestrito\":\"taUsoRestrito\"} as const);\nexport type TpcnTipoArma = typeof TpcnTipoArma[keyof typeof TpcnTipoArma];\nexport const TpcnTipoIntermedio = Object.freeze({\"tiContaPropria\":\"tiContaPropria\",\"tiContaOrdem\":\"tiContaOrdem\",\"tiEncomenda\":\"tiEncomenda\"} as const);\nexport type TpcnTipoIntermedio = typeof TpcnTipoIntermedio[keyof typeof TpcnTipoIntermedio];\nexport const TpcnTipoOperacao = Object.freeze({\"toVendaConcessionaria\":\"toVendaConcessionaria\",\"toFaturamentoDireto\":\"toFaturamentoDireto\",\"toVendaDireta\":\"toVendaDireta\",\"toOutros\":\"toOutros\"} as const);\nexport type TpcnTipoOperacao = typeof TpcnTipoOperacao[keyof typeof TpcnTipoOperacao];\nexport const TpcnTipoViaTransp = Object.freeze({\"tvMaritima\":\"tvMaritima\",\"tvFluvial\":\"tvFluvial\",\"tvLacustre\":\"tvLacustre\",\"tvAerea\":\"tvAerea\",\"tvPostal\":\"tvPostal\",\"tvFerroviaria\":\"tvFerroviaria\",\"tvRodoviaria\":\"tvRodoviaria\",\"tvConduto\":\"tvConduto\",\"tvMeiosProprios\":\"tvMeiosProprios\",\"tvEntradaSaidaFicta\":\"tvEntradaSaidaFicta\",\"tvCourier\":\"tvCourier\",\"tvEmMaos\":\"tvEmMaos\",\"tvPorReboque\":\"tvPorReboque\"} as const);\nexport type TpcnTipoViaTransp = typeof TpcnTipoViaTransp[keyof typeof TpcnTipoViaTransp];\nexport interface TPISInput {\n \"CST\"?: TCSTPis;\n \"pPIS\"?: string;\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vBC\"?: string;\n \"vPIS\"?: string;\n}\nexport class TPIS {\n /** Pascal streaming default: pis01. Omission preserves the native constructor. */\n \"CST\"?: TCSTPis;\n \"pPIS\"?: string;\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vBC\"?: string;\n \"vPIS\"?: string;\n constructor(input: TPISInput = {}) {\n validateModel(\"TPIS\", input);\n if (input[\"CST\"] !== undefined) this[\"CST\"] = input[\"CST\"];\n if (input[\"pPIS\"] !== undefined) this[\"pPIS\"] = input[\"pPIS\"];\n if (input[\"qBCProd\"] !== undefined) this[\"qBCProd\"] = input[\"qBCProd\"];\n if (input[\"vAliqProd\"] !== undefined) this[\"vAliqProd\"] = input[\"vAliqProd\"];\n if (input[\"vBC\"] !== undefined) this[\"vBC\"] = input[\"vBC\"];\n if (input[\"vPIS\"] !== undefined) this[\"vPIS\"] = input[\"vPIS\"];\n }\n}\nexport interface TPISSTInput {\n \"indSomaPISST\"?: TIndSomaPISST;\n \"pPis\"?: string;\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vBc\"?: string;\n \"vPIS\"?: string;\n}\nexport class TPISST {\n \"indSomaPISST\"?: TIndSomaPISST;\n \"pPis\"?: string;\n \"qBCProd\"?: string;\n \"vAliqProd\"?: string;\n \"vBc\"?: string;\n \"vPIS\"?: string;\n constructor(input: TPISSTInput = {}) {\n validateModel(\"TPISST\", input);\n if (input[\"indSomaPISST\"] !== undefined) this[\"indSomaPISST\"] = input[\"indSomaPISST\"];\n if (input[\"pPis\"] !== undefined) this[\"pPis\"] = input[\"pPis\"];\n if (input[\"qBCProd\"] !== undefined) this[\"qBCProd\"] = input[\"qBCProd\"];\n if (input[\"vAliqProd\"] !== undefined) this[\"vAliqProd\"] = input[\"vAliqProd\"];\n if (input[\"vBc\"] !== undefined) this[\"vBc\"] = input[\"vBc\"];\n if (input[\"vPIS\"] !== undefined) this[\"vPIS\"] = input[\"vPIS\"];\n }\n}\nexport interface TProcDFeInput {\n \"chDFe\"?: string;\n \"cMsg\"?: number;\n \"cStat\"?: number;\n \"dhRecbto\"?: string;\n \"digVal\"?: string;\n \"Id\"?: string;\n \"nProt\"?: string;\n \"PathDFe\"?: string;\n \"PathRetConsReciDFe\"?: string;\n \"PathRetConsSitDFe\"?: string;\n \"tpAmb\"?: TACBrTipoAmbiente;\n \"verAplic\"?: string;\n \"XML_DFe\"?: string;\n \"XML_prot\"?: string;\n \"xMotivo\"?: string;\n \"xMsg\"?: string;\n}\nexport class TProcDFe {\n \"chDFe\"?: string;\n \"cMsg\"?: number;\n \"cStat\"?: number;\n \"dhRecbto\"?: string;\n \"digVal\"?: string;\n \"Id\"?: string;\n \"nProt\"?: string;\n \"PathDFe\"?: string;\n \"PathRetConsReciDFe\"?: string;\n \"PathRetConsSitDFe\"?: string;\n \"tpAmb\"?: TACBrTipoAmbiente;\n \"verAplic\"?: string;\n \"XML_DFe\"?: string;\n \"XML_prot\"?: string;\n \"xMotivo\"?: string;\n \"xMsg\"?: string;\n constructor(input: TProcDFeInput = {}) {\n validateModel(\"TProcDFe\", input);\n if (input[\"chDFe\"] !== undefined) this[\"chDFe\"] = input[\"chDFe\"];\n if (input[\"cMsg\"] !== undefined) this[\"cMsg\"] = input[\"cMsg\"];\n if (input[\"cStat\"] !== undefined) this[\"cStat\"] = input[\"cStat\"];\n if (input[\"dhRecbto\"] !== undefined) this[\"dhRecbto\"] = input[\"dhRecbto\"];\n if (input[\"digVal\"] !== undefined) this[\"digVal\"] = input[\"digVal\"];\n if (input[\"Id\"] !== undefined) this[\"Id\"] = input[\"Id\"];\n if (input[\"nProt\"] !== undefined) this[\"nProt\"] = input[\"nProt\"];\n if (input[\"PathDFe\"] !== undefined) this[\"PathDFe\"] = input[\"PathDFe\"];\n if (input[\"PathRetConsReciDFe\"] !== undefined) this[\"PathRetConsReciDFe\"] = input[\"PathRetConsReciDFe\"];\n if (input[\"PathRetConsSitDFe\"] !== undefined) this[\"PathRetConsSitDFe\"] = input[\"PathRetConsSitDFe\"];\n if (input[\"tpAmb\"] !== undefined) this[\"tpAmb\"] = input[\"tpAmb\"];\n if (input[\"verAplic\"] !== undefined) this[\"verAplic\"] = input[\"verAplic\"];\n if (input[\"XML_DFe\"] !== undefined) this[\"XML_DFe\"] = input[\"XML_DFe\"];\n if (input[\"XML_prot\"] !== undefined) this[\"XML_prot\"] = input[\"XML_prot\"];\n if (input[\"xMotivo\"] !== undefined) this[\"xMotivo\"] = input[\"xMotivo\"];\n if (input[\"xMsg\"] !== undefined) this[\"xMsg\"] = input[\"xMsg\"];\n }\n}\nexport type TprocRefCollectionInput = TprocRefCollectionItemInput[];\nexport class TprocRefCollection extends Array<TprocRefCollectionItem> {\n New(input: TprocRefCollectionItemInput = {}): TprocRefCollectionItem { const item=new TprocRefCollectionItem(input); this.push(item); return item; }\n}\nexport interface TprocRefCollectionItemInput {\n \"indProc\"?: TpcnIndicadorProcesso;\n \"nProc\"?: string;\n \"tpAto\"?: TtpAto;\n}\nexport class TprocRefCollectionItem {\n /** Pascal streaming default: ipSEFAZ. Omission preserves the native constructor. */\n \"indProc\"?: TpcnIndicadorProcesso;\n \"nProc\"?: string;\n \"tpAto\"?: TtpAto;\n constructor(input: TprocRefCollectionItemInput = {}) {\n validateModel(\"TprocRefCollectionItem\", input);\n if (input[\"indProc\"] !== undefined) this[\"indProc\"] = input[\"indProc\"];\n if (input[\"nProc\"] !== undefined) this[\"nProc\"] = input[\"nProc\"];\n if (input[\"tpAto\"] !== undefined) this[\"tpAto\"] = input[\"tpAto\"];\n }\n}\nexport interface TProdInput {\n \"arma\"?: TArmaCollectionInput;\n \"cBarra\"?: string;\n \"cBarraTrib\"?: string;\n \"cBenef\"?: string;\n \"cEAN\"?: string;\n \"cEANTrib\"?: string;\n \"CEST\"?: string;\n \"CFOP\"?: string;\n \"CNPJFab\"?: string;\n \"comb\"?: TCombInput;\n \"cProd\"?: string;\n \"CredPresumido\"?: TCredPresumidoCollectionInput;\n \"detExport\"?: TdetExportCollectionInput;\n \"DI\"?: TDICollectionInput;\n \"EXTIPI\"?: string;\n \"indBemMovelUsado\"?: TIndicadorEx;\n \"indEscala\"?: TpcnIndEscala;\n \"IndTot\"?: TpcnIndicadorTotal;\n \"med\"?: TMedCollectionInput;\n \"NCM\"?: string;\n \"nFCI\"?: string;\n \"nItem\"?: number;\n \"nItemPed\"?: string;\n \"nRECOPI\"?: string;\n \"NVE\"?: TNVECollectionInput;\n \"qCom\"?: string;\n \"qTrib\"?: string;\n \"rastro\"?: TRastroCollectionInput;\n \"tpCredPresIBSZFM\"?: TTpCredPresIBSZFM;\n \"uCom\"?: string;\n \"uTrib\"?: string;\n \"vDesc\"?: string;\n \"veicProd\"?: TveicProdInput;\n \"vFrete\"?: string;\n \"vOutro\"?: string;\n \"vProd\"?: string;\n \"vSeg\"?: string;\n \"vUnCom\"?: string;\n \"vUnTrib\"?: string;\n \"xPed\"?: string;\n \"xProd\"?: string;\n}\nexport class TProd {\n \"arma\" = new TArmaCollection();\n \"cBarra\"?: string;\n \"cBarraTrib\"?: string;\n \"cBenef\"?: string;\n \"cEAN\"?: string;\n \"cEANTrib\"?: string;\n \"CEST\"?: string;\n \"CFOP\"?: string;\n \"CNPJFab\"?: string;\n \"comb\" = new TComb();\n \"cProd\"?: string;\n \"CredPresumido\" = new TCredPresumidoCollection();\n \"detExport\" = new TdetExportCollection();\n \"DI\" = new TDICollection();\n \"EXTIPI\"?: string;\n /** Pascal streaming default: tieNenhum. Omission preserves the native constructor. */\n \"indBemMovelUsado\"?: TIndicadorEx;\n /** Pascal streaming default: ieNenhum. Omission preserves the native constructor. */\n \"indEscala\"?: TpcnIndEscala;\n /** Pascal streaming default: itSomaTotalNFe. Omission preserves the native constructor. */\n \"IndTot\"?: TpcnIndicadorTotal;\n \"med\" = new TMedCollection();\n \"NCM\"?: string;\n \"nFCI\"?: string;\n \"nItem\"?: number;\n \"nItemPed\"?: string;\n \"nRECOPI\"?: string;\n \"NVE\" = new TNVECollection();\n \"qCom\"?: string;\n \"qTrib\"?: string;\n \"rastro\" = new TRastroCollection();\n \"tpCredPresIBSZFM\"?: TTpCredPresIBSZFM;\n \"uCom\"?: string;\n \"uTrib\"?: string;\n \"vDesc\"?: string;\n \"veicProd\" = new TveicProd();\n \"vFrete\"?: string;\n \"vOutro\"?: string;\n \"vProd\"?: string;\n \"vSeg\"?: string;\n \"vUnCom\"?: string;\n \"vUnTrib\"?: string;\n \"xPed\"?: string;\n \"xProd\"?: string;\n constructor(input: TProdInput = {}) {\n validateModel(\"TProd\", input);\n if (input[\"arma\"] !== undefined) this[\"arma\"] = Object.assign(new TArmaCollection(), input[\"arma\"].map(v=>new TArmaCollectionItem(v)));\n if (input[\"cBarra\"] !== undefined) this[\"cBarra\"] = input[\"cBarra\"];\n if (input[\"cBarraTrib\"] !== undefined) this[\"cBarraTrib\"] = input[\"cBarraTrib\"];\n if (input[\"cBenef\"] !== undefined) this[\"cBenef\"] = input[\"cBenef\"];\n if (input[\"cEAN\"] !== undefined) this[\"cEAN\"] = input[\"cEAN\"];\n if (input[\"cEANTrib\"] !== undefined) this[\"cEANTrib\"] = input[\"cEANTrib\"];\n if (input[\"CEST\"] !== undefined) this[\"CEST\"] = input[\"CEST\"];\n if (input[\"CFOP\"] !== undefined) this[\"CFOP\"] = input[\"CFOP\"];\n if (input[\"CNPJFab\"] !== undefined) this[\"CNPJFab\"] = input[\"CNPJFab\"];\n if (input[\"comb\"] !== undefined) this[\"comb\"] = new TComb(input[\"comb\"]);\n if (input[\"cProd\"] !== undefined) this[\"cProd\"] = input[\"cProd\"];\n if (input[\"CredPresumido\"] !== undefined) this[\"CredPresumido\"] = Object.assign(new TCredPresumidoCollection(), input[\"CredPresumido\"].map(v=>new TCredPresumidoCollectionItem(v)));\n if (input[\"detExport\"] !== undefined) this[\"detExport\"] = Object.assign(new TdetExportCollection(), input[\"detExport\"].map(v=>new TdetExportCollectionItem(v)));\n if (input[\"DI\"] !== undefined) this[\"DI\"] = Object.assign(new TDICollection(), input[\"DI\"].map(v=>new TDICollectionItem(v)));\n if (input[\"EXTIPI\"] !== undefined) this[\"EXTIPI\"] = input[\"EXTIPI\"];\n if (input[\"indBemMovelUsado\"] !== undefined) this[\"indBemMovelUsado\"] = input[\"indBemMovelUsado\"];\n if (input[\"indEscala\"] !== undefined) this[\"indEscala\"] = input[\"indEscala\"];\n if (input[\"IndTot\"] !== undefined) this[\"IndTot\"] = input[\"IndTot\"];\n if (input[\"med\"] !== undefined) this[\"med\"] = Object.assign(new TMedCollection(), input[\"med\"].map(v=>new TMedCollectionItem(v)));\n if (input[\"NCM\"] !== undefined) this[\"NCM\"] = input[\"NCM\"];\n if (input[\"nFCI\"] !== undefined) this[\"nFCI\"] = input[\"nFCI\"];\n if (input[\"nItem\"] !== undefined) this[\"nItem\"] = input[\"nItem\"];\n if (input[\"nItemPed\"] !== undefined) this[\"nItemPed\"] = input[\"nItemPed\"];\n if (input[\"nRECOPI\"] !== undefined) this[\"nRECOPI\"] = input[\"nRECOPI\"];\n if (input[\"NVE\"] !== undefined) this[\"NVE\"] = Object.assign(new TNVECollection(), input[\"NVE\"].map(v=>new TNVECollectionItem(v)));\n if (input[\"qCom\"] !== undefined) this[\"qCom\"] = input[\"qCom\"];\n if (input[\"qTrib\"] !== undefined) this[\"qTrib\"] = input[\"qTrib\"];\n if (input[\"rastro\"] !== undefined) this[\"rastro\"] = Object.assign(new TRastroCollection(), input[\"rastro\"].map(v=>new TRastroCollectionItem(v)));\n if (input[\"tpCredPresIBSZFM\"] !== undefined) this[\"tpCredPresIBSZFM\"] = input[\"tpCredPresIBSZFM\"];\n if (input[\"uCom\"] !== undefined) this[\"uCom\"] = input[\"uCom\"];\n if (input[\"uTrib\"] !== undefined) this[\"uTrib\"] = input[\"uTrib\"];\n if (input[\"vDesc\"] !== undefined) this[\"vDesc\"] = input[\"vDesc\"];\n if (input[\"veicProd\"] !== undefined) this[\"veicProd\"] = new TveicProd(input[\"veicProd\"]);\n if (input[\"vFrete\"] !== undefined) this[\"vFrete\"] = input[\"vFrete\"];\n if (input[\"vOutro\"] !== undefined) this[\"vOutro\"] = input[\"vOutro\"];\n if (input[\"vProd\"] !== undefined) this[\"vProd\"] = input[\"vProd\"];\n if (input[\"vSeg\"] !== undefined) this[\"vSeg\"] = input[\"vSeg\"];\n if (input[\"vUnCom\"] !== undefined) this[\"vUnCom\"] = input[\"vUnCom\"];\n if (input[\"vUnTrib\"] !== undefined) this[\"vUnTrib\"] = input[\"vUnTrib\"];\n if (input[\"xPed\"] !== undefined) this[\"xPed\"] = input[\"xPed\"];\n if (input[\"xProd\"] !== undefined) this[\"xProd\"] = input[\"xProd\"];\n }\n}\nexport type TRastroCollectionInput = TRastroCollectionItemInput[];\nexport class TRastroCollection extends Array<TRastroCollectionItem> {\n New(input: TRastroCollectionItemInput = {}): TRastroCollectionItem { const item=new TRastroCollectionItem(input); this.push(item); return item; }\n}\nexport interface TRastroCollectionItemInput {\n \"cAgreg\"?: string;\n \"dFab\"?: string;\n \"dVal\"?: string;\n \"nLote\"?: string;\n \"qLote\"?: string;\n}\nexport class TRastroCollectionItem {\n \"cAgreg\"?: string;\n \"dFab\"?: string;\n \"dVal\"?: string;\n \"nLote\"?: string;\n \"qLote\"?: string;\n constructor(input: TRastroCollectionItemInput = {}) {\n validateModel(\"TRastroCollectionItem\", input);\n if (input[\"cAgreg\"] !== undefined) this[\"cAgreg\"] = input[\"cAgreg\"];\n if (input[\"dFab\"] !== undefined) this[\"dFab\"] = input[\"dFab\"];\n if (input[\"dVal\"] !== undefined) this[\"dVal\"] = input[\"dVal\"];\n if (input[\"nLote\"] !== undefined) this[\"nLote\"] = input[\"nLote\"];\n if (input[\"qLote\"] !== undefined) this[\"qLote\"] = input[\"qLote\"];\n }\n}\nexport type TReboqueCollectionInput = TReboqueCollectionItemInput[];\nexport class TReboqueCollection extends Array<TReboqueCollectionItem> {\n New(input: TReboqueCollectionItemInput = {}): TReboqueCollectionItem { const item=new TReboqueCollectionItem(input); this.push(item); return item; }\n}\nexport interface TReboqueCollectionItemInput {\n \"placa\"?: string;\n \"RNTC\"?: string;\n \"UF\"?: string;\n}\nexport class TReboqueCollectionItem {\n \"placa\"?: string;\n \"RNTC\"?: string;\n \"UF\"?: string;\n constructor(input: TReboqueCollectionItemInput = {}) {\n validateModel(\"TReboqueCollectionItem\", input);\n if (input[\"placa\"] !== undefined) this[\"placa\"] = input[\"placa\"];\n if (input[\"RNTC\"] !== undefined) this[\"RNTC\"] = input[\"RNTC\"];\n if (input[\"UF\"] !== undefined) this[\"UF\"] = input[\"UF\"];\n }\n}\nexport type TrefDFePagAntCollectionInput = TrefDFePagAntCollectionItemInput[];\nexport class TrefDFePagAntCollection extends Array<TrefDFePagAntCollectionItem> {\n New(input: TrefDFePagAntCollectionItemInput = {}): TrefDFePagAntCollectionItem { const item=new TrefDFePagAntCollectionItem(input); this.push(item); return item; }\n}\nexport interface TrefDFePagAntCollectionItemInput {\n \"refDFEChave\"?: string;\n}\nexport class TrefDFePagAntCollectionItem {\n \"refDFEChave\"?: string;\n constructor(input: TrefDFePagAntCollectionItemInput = {}) {\n validateModel(\"TrefDFePagAntCollectionItem\", input);\n if (input[\"refDFEChave\"] !== undefined) this[\"refDFEChave\"] = input[\"refDFEChave\"];\n }\n}\nexport interface TRefECFInput {\n \"modelo\"?: TpcnECFModRef;\n \"nCOO\"?: string;\n \"nECF\"?: string;\n}\nexport class TRefECF {\n /** Pascal streaming default: ECFModRefVazio. Omission preserves the native constructor. */\n \"modelo\"?: TpcnECFModRef;\n \"nCOO\"?: string;\n \"nECF\"?: string;\n constructor(input: TRefECFInput = {}) {\n validateModel(\"TRefECF\", input);\n if (input[\"modelo\"] !== undefined) this[\"modelo\"] = input[\"modelo\"];\n if (input[\"nCOO\"] !== undefined) this[\"nCOO\"] = input[\"nCOO\"];\n if (input[\"nECF\"] !== undefined) this[\"nECF\"] = input[\"nECF\"];\n }\n}\nexport interface TRefNFInput {\n \"AAMM\"?: string;\n \"CNPJ\"?: string;\n \"cUF\"?: number;\n \"modelo\"?: number;\n \"nNF\"?: number;\n \"serie\"?: number;\n}\nexport class TRefNF {\n \"AAMM\"?: string;\n \"CNPJ\"?: string;\n \"cUF\"?: number;\n \"modelo\"?: number;\n \"nNF\"?: number;\n \"serie\"?: number;\n constructor(input: TRefNFInput = {}) {\n validateModel(\"TRefNF\", input);\n if (input[\"AAMM\"] !== undefined) this[\"AAMM\"] = input[\"AAMM\"];\n if (input[\"CNPJ\"] !== undefined) this[\"CNPJ\"] = input[\"CNPJ\"];\n if (input[\"cUF\"] !== undefined) this[\"cUF\"] = input[\"cUF\"];\n if (input[\"modelo\"] !== undefined) this[\"modelo\"] = input[\"modelo\"];\n if (input[\"nNF\"] !== undefined) this[\"nNF\"] = input[\"nNF\"];\n if (input[\"serie\"] !== undefined) this[\"serie\"] = input[\"serie\"];\n }\n}\nexport interface TRefNFPInput {\n \"AAMM\"?: string;\n \"CNPJCPF\"?: string;\n \"cUF\"?: number;\n \"IE\"?: string;\n \"modelo\"?: string;\n \"nNF\"?: number;\n \"serie\"?: number;\n}\nexport class TRefNFP {\n \"AAMM\"?: string;\n \"CNPJCPF\"?: string;\n \"cUF\"?: number;\n \"IE\"?: string;\n \"modelo\"?: string;\n \"nNF\"?: number;\n \"serie\"?: number;\n constructor(input: TRefNFPInput = {}) {\n validateModel(\"TRefNFP\", input);\n if (input[\"AAMM\"] !== undefined) this[\"AAMM\"] = input[\"AAMM\"];\n if (input[\"CNPJCPF\"] !== undefined) this[\"CNPJCPF\"] = input[\"CNPJCPF\"];\n if (input[\"cUF\"] !== undefined) this[\"cUF\"] = input[\"cUF\"];\n if (input[\"IE\"] !== undefined) this[\"IE\"] = input[\"IE\"];\n if (input[\"modelo\"] !== undefined) this[\"modelo\"] = input[\"modelo\"];\n if (input[\"nNF\"] !== undefined) this[\"nNF\"] = input[\"nNF\"];\n if (input[\"serie\"] !== undefined) this[\"serie\"] = input[\"serie\"];\n }\n}\nexport const TRegTribISSQN = Object.freeze({\"RTISSMicroempresaMunicipal\":\"RTISSMicroempresaMunicipal\",\"RTISSEstimativa\":\"RTISSEstimativa\",\"RTISSSociedadeProfissionais\":\"RTISSSociedadeProfissionais\",\"RTISSCooperativa\":\"RTISSCooperativa\",\"RTISSMEI\":\"RTISSMEI\",\"RTISSMEEPP\":\"RTISSMEEPP\",\"RTISSNenhum\":\"RTISSNenhum\"} as const);\nexport type TRegTribISSQN = typeof TRegTribISSQN[keyof typeof TRegTribISSQN];\nexport interface TRetiradaInput {\n \"CEP\"?: number;\n \"cMun\"?: number;\n \"CNPJCPF\"?: string;\n \"cPais\"?: number;\n \"Email\"?: string;\n \"fone\"?: string;\n \"IE\"?: string;\n \"nro\"?: string;\n \"UF\"?: string;\n \"xBairro\"?: string;\n \"xCpl\"?: string;\n \"xLgr\"?: string;\n \"xMun\"?: string;\n \"xNome\"?: string;\n \"xPais\"?: string;\n}\nexport class TRetirada {\n \"CEP\"?: number;\n \"cMun\"?: number;\n \"CNPJCPF\"?: string;\n \"cPais\"?: number;\n \"Email\"?: string;\n \"fone\"?: string;\n \"IE\"?: string;\n \"nro\"?: string;\n \"UF\"?: string;\n \"xBairro\"?: string;\n \"xCpl\"?: string;\n \"xLgr\"?: string;\n \"xMun\"?: string;\n \"xNome\"?: string;\n \"xPais\"?: string;\n constructor(input: TRetiradaInput = {}) {\n validateModel(\"TRetirada\", input);\n if (input[\"CEP\"] !== undefined) this[\"CEP\"] = input[\"CEP\"];\n if (input[\"cMun\"] !== undefined) this[\"cMun\"] = input[\"cMun\"];\n if (input[\"CNPJCPF\"] !== undefined) this[\"CNPJCPF\"] = input[\"CNPJCPF\"];\n if (input[\"cPais\"] !== undefined) this[\"cPais\"] = input[\"cPais\"];\n if (input[\"Email\"] !== undefined) this[\"Email\"] = input[\"Email\"];\n if (input[\"fone\"] !== undefined) this[\"fone\"] = input[\"fone\"];\n if (input[\"IE\"] !== undefined) this[\"IE\"] = input[\"IE\"];\n if (input[\"nro\"] !== undefined) this[\"nro\"] = input[\"nro\"];\n if (input[\"UF\"] !== undefined) this[\"UF\"] = input[\"UF\"];\n if (input[\"xBairro\"] !== undefined) this[\"xBairro\"] = input[\"xBairro\"];\n if (input[\"xCpl\"] !== undefined) this[\"xCpl\"] = input[\"xCpl\"];\n if (input[\"xLgr\"] !== undefined) this[\"xLgr\"] = input[\"xLgr\"];\n if (input[\"xMun\"] !== undefined) this[\"xMun\"] = input[\"xMun\"];\n if (input[\"xNome\"] !== undefined) this[\"xNome\"] = input[\"xNome\"];\n if (input[\"xPais\"] !== undefined) this[\"xPais\"] = input[\"xPais\"];\n }\n}\nexport interface TretTranspInput {\n \"CFOP\"?: string;\n \"cMunFG\"?: number;\n \"pICMSRet\"?: string;\n \"vBCRet\"?: string;\n \"vICMSRet\"?: string;\n \"vServ\"?: string;\n}\nexport class TretTransp {\n \"CFOP\"?: string;\n \"cMunFG\"?: number;\n \"pICMSRet\"?: string;\n \"vBCRet\"?: string;\n \"vICMSRet\"?: string;\n \"vServ\"?: string;\n constructor(input: TretTranspInput = {}) {\n validateModel(\"TretTransp\", input);\n if (input[\"CFOP\"] !== undefined) this[\"CFOP\"] = input[\"CFOP\"];\n if (input[\"cMunFG\"] !== undefined) this[\"cMunFG\"] = input[\"cMunFG\"];\n if (input[\"pICMSRet\"] !== undefined) this[\"pICMSRet\"] = input[\"pICMSRet\"];\n if (input[\"vBCRet\"] !== undefined) this[\"vBCRet\"] = input[\"vBCRet\"];\n if (input[\"vICMSRet\"] !== undefined) this[\"vICMSRet\"] = input[\"vICMSRet\"];\n if (input[\"vServ\"] !== undefined) this[\"vServ\"] = input[\"vServ\"];\n }\n}\nexport interface TretTribInput {\n \"vBCIRRF\"?: string;\n \"vBCRetPrev\"?: string;\n \"vIRRF\"?: string;\n \"vRetCOFINS\"?: string;\n \"vRetCSLL\"?: string;\n \"vRetPIS\"?: string;\n \"vRetPrev\"?: string;\n}\nexport class TretTrib {\n \"vBCIRRF\"?: string;\n \"vBCRetPrev\"?: string;\n \"vIRRF\"?: string;\n \"vRetCOFINS\"?: string;\n \"vRetCSLL\"?: string;\n \"vRetPIS\"?: string;\n \"vRetPrev\"?: string;\n constructor(input: TretTribInput = {}) {\n validateModel(\"TretTrib\", input);\n if (input[\"vBCIRRF\"] !== undefined) this[\"vBCIRRF\"] = input[\"vBCIRRF\"];\n if (input[\"vBCRetPrev\"] !== undefined) this[\"vBCRetPrev\"] = input[\"vBCRetPrev\"];\n if (input[\"vIRRF\"] !== undefined) this[\"vIRRF\"] = input[\"vIRRF\"];\n if (input[\"vRetCOFINS\"] !== undefined) this[\"vRetCOFINS\"] = input[\"vRetCOFINS\"];\n if (input[\"vRetCSLL\"] !== undefined) this[\"vRetCSLL\"] = input[\"vRetCSLL\"];\n if (input[\"vRetPIS\"] !== undefined) this[\"vRetPIS\"] = input[\"vRetPIS\"];\n if (input[\"vRetPrev\"] !== undefined) this[\"vRetPrev\"] = input[\"vRetPrev\"];\n }\n}\nexport interface TSignatureInput {\n \"DigestValue\"?: string;\n \"IdSignature\"?: string;\n \"IdSignatureValue\"?: string;\n \"SignatureValue\"?: string;\n \"URI\"?: string;\n \"X509Certificate\"?: string;\n}\nexport class TSignature {\n \"DigestValue\"?: string;\n \"IdSignature\"?: string;\n \"IdSignatureValue\"?: string;\n \"SignatureValue\"?: string;\n \"URI\"?: string;\n \"X509Certificate\"?: string;\n constructor(input: TSignatureInput = {}) {\n validateModel(\"TSignature\", input);\n if (input[\"DigestValue\"] !== undefined) this[\"DigestValue\"] = input[\"DigestValue\"];\n if (input[\"IdSignature\"] !== undefined) this[\"IdSignature\"] = input[\"IdSignature\"];\n if (input[\"IdSignatureValue\"] !== undefined) this[\"IdSignatureValue\"] = input[\"IdSignatureValue\"];\n if (input[\"SignatureValue\"] !== undefined) this[\"SignatureValue\"] = input[\"SignatureValue\"];\n if (input[\"URI\"] !== undefined) this[\"URI\"] = input[\"URI\"];\n if (input[\"X509Certificate\"] !== undefined) this[\"X509Certificate\"] = input[\"X509Certificate\"];\n }\n}\nexport const TTipoNFe = Object.freeze({\"tnEntrada\":\"tnEntrada\",\"tnSaida\":\"tnSaida\"} as const);\nexport type TTipoNFe = typeof TTipoNFe[keyof typeof TTipoNFe];\nexport interface TTotalInput {\n \"IBSCBSTot\"?: TIBSCBSTotInput;\n \"ICMSTot\"?: TICMSTotInput;\n \"ISSQNtot\"?: TISSQNtotInput;\n \"ISTot\"?: TISTotInput;\n \"retTrib\"?: TretTribInput;\n \"vNFTot\"?: string;\n}\nexport class TTotal {\n \"IBSCBSTot\" = new TIBSCBSTot();\n \"ICMSTot\" = new TICMSTot();\n \"ISSQNtot\" = new TISSQNtot();\n \"ISTot\" = new TISTot();\n \"retTrib\" = new TretTrib();\n \"vNFTot\"?: string;\n constructor(input: TTotalInput = {}) {\n validateModel(\"TTotal\", input);\n if (input[\"IBSCBSTot\"] !== undefined) this[\"IBSCBSTot\"] = new TIBSCBSTot(input[\"IBSCBSTot\"]);\n if (input[\"ICMSTot\"] !== undefined) this[\"ICMSTot\"] = new TICMSTot(input[\"ICMSTot\"]);\n if (input[\"ISSQNtot\"] !== undefined) this[\"ISSQNtot\"] = new TISSQNtot(input[\"ISSQNtot\"]);\n if (input[\"ISTot\"] !== undefined) this[\"ISTot\"] = new TISTot(input[\"ISTot\"]);\n if (input[\"retTrib\"] !== undefined) this[\"retTrib\"] = new TretTrib(input[\"retTrib\"]);\n if (input[\"vNFTot\"] !== undefined) this[\"vNFTot\"] = input[\"vNFTot\"];\n }\n}\nexport const TtpALCZFMCBS = Object.freeze({\"tpALCZFMCBSnOpInd\":\"tpALCZFMCBSnOpInd\",\"tpALCZFMCBSOpInd\":\"tpALCZFMCBSOpInd\"} as const);\nexport type TtpALCZFMCBS = typeof TtpALCZFMCBS[keyof typeof TtpALCZFMCBS];\nexport const TtpAto = Object.freeze({\"taNenhum\":\"taNenhum\",\"taTermoAcordo\":\"taTermoAcordo\",\"taRegimeEspecial\":\"taRegimeEspecial\",\"taAutorizacaoEspecifica\":\"taAutorizacaoEspecifica\",\"taAjusteSNIEF\":\"taAjusteSNIEF\",\"taConvenioICMS\":\"taConvenioICMS\"} as const);\nexport type TtpAto = typeof TtpAto[keyof typeof TtpAto];\nexport const TTpCredPresIBSZFM = Object.freeze({\"tcpNenhum\":\"tcpNenhum\",\"tcpSemCredito\":\"tcpSemCredito\",\"tcpBensConsumoFinal\":\"tcpBensConsumoFinal\",\"tcpBensCapital\":\"tcpBensCapital\",\"tcpBensIntermediarios\":\"tcpBensIntermediarios\",\"tcpBensInformaticaOutros\":\"tcpBensInformaticaOutros\"} as const);\nexport type TTpCredPresIBSZFM = typeof TTpCredPresIBSZFM[keyof typeof TTpCredPresIBSZFM];\nexport const TtpEnteGov = Object.freeze({\"tcgNenhum\":\"tcgNenhum\",\"tcgUniao\":\"tcgUniao\",\"tcgEstados\":\"tcgEstados\",\"tcgDistritoFederal\":\"tcgDistritoFederal\",\"tcgMunicipios\":\"tcgMunicipios\",\"tcgConsorcioPublico\":\"tcgConsorcioPublico\",\"tcgComiteGestorIBS\":\"tcgComiteGestorIBS\"} as const);\nexport type TtpEnteGov = typeof TtpEnteGov[keyof typeof TtpEnteGov];\nexport const TtpGuia = Object.freeze({\"tpgNenhum\":\"tpgNenhum\",\"tpgGTA\":\"tpgGTA\",\"tpgTTA\":\"tpgTTA\",\"tpgDTA\":\"tpgDTA\",\"tpgATV\":\"tpgATV\",\"tpgPTV\":\"tpgPTV\",\"tpgGTV\":\"tpgGTV\",\"tpgGuiaFlorestal\":\"tpgGuiaFlorestal\"} as const);\nexport type TtpGuia = typeof TtpGuia[keyof typeof TtpGuia];\nexport const TtpIntegra = Object.freeze({\"tiNaoInformado\":\"tiNaoInformado\",\"tiPagIntegrado\":\"tiPagIntegrado\",\"tiPagNaoIntegrado\":\"tiPagNaoIntegrado\"} as const);\nexport type TtpIntegra = typeof TtpIntegra[keyof typeof TtpIntegra];\nexport const TtpNFCredito = Object.freeze({\"tcNenhum\":\"tcNenhum\",\"tcMultaJuros\":\"tcMultaJuros\",\"tcApropriacaoCreditoPresumido\":\"tcApropriacaoCreditoPresumido\",\"tcRetorno\":\"tcRetorno\",\"tcReducaoValores\":\"tcReducaoValores\",\"tcTransferenciaCreditoSucessao\":\"tcTransferenciaCreditoSucessao\",\"tcRetornoRecusaParcial\":\"tcRetornoRecusaParcial\"} as const);\nexport type TtpNFCredito = typeof TtpNFCredito[keyof typeof TtpNFCredito];\nexport const TtpNFDebito = Object.freeze({\"tdNenhum\":\"tdNenhum\",\"tdTransferenciaCreditoCooperativa\":\"tdTransferenciaCreditoCooperativa\",\"tdAnulacao\":\"tdAnulacao\",\"tdDebitosNaoProcessadas\":\"tdDebitosNaoProcessadas\",\"tdMultaJuros\":\"tdMultaJuros\",\"tdTransferenciaCreditoSucessao\":\"tdTransferenciaCreditoSucessao\",\"tdPagamentoAntecipado\":\"tdPagamentoAntecipado\",\"tdPerdaEmEstoque\":\"tdPerdaEmEstoque\",\"tdDesenquadramentodoSN\":\"tdDesenquadramentodoSN\"} as const);\nexport type TtpNFDebito = typeof TtpNFDebito[keyof typeof TtpNFDebito];\nexport const TtpOperGov = Object.freeze({\"togNenhum\":\"togNenhum\",\"togFornecimento\":\"togFornecimento\",\"togRecebimentoPag\":\"togRecebimentoPag\",\"togFornecimentoPagRealizado\":\"togFornecimentoPagRealizado\",\"togRecebimentoPagFornecPosterior\":\"togRecebimentoPagFornecPosterior\"} as const);\nexport type TtpOperGov = typeof TtpOperGov[keyof typeof TtpOperGov];\nexport interface TTranspInput {\n \"balsa\"?: string;\n \"modFrete\"?: TpcnModalidadeFrete;\n \"Reboque\"?: TReboqueCollectionInput;\n \"retTransp\"?: TretTranspInput;\n \"Transporta\"?: TTransportaInput;\n \"vagao\"?: string;\n \"veicTransp\"?: TveicTranspInput;\n \"Vol\"?: TVolCollectionInput;\n}\nexport class TTransp {\n \"balsa\"?: string;\n \"modFrete\"?: TpcnModalidadeFrete;\n \"Reboque\" = new TReboqueCollection();\n \"retTransp\" = new TretTransp();\n \"Transporta\" = new TTransporta();\n \"vagao\"?: string;\n \"veicTransp\" = new TveicTransp();\n \"Vol\" = new TVolCollection();\n constructor(input: TTranspInput = {}) {\n validateModel(\"TTransp\", input);\n if (input[\"balsa\"] !== undefined) this[\"balsa\"] = input[\"balsa\"];\n if (input[\"modFrete\"] !== undefined) this[\"modFrete\"] = input[\"modFrete\"];\n if (input[\"Reboque\"] !== undefined) this[\"Reboque\"] = Object.assign(new TReboqueCollection(), input[\"Reboque\"].map(v=>new TReboqueCollectionItem(v)));\n if (input[\"retTransp\"] !== undefined) this[\"retTransp\"] = new TretTransp(input[\"retTransp\"]);\n if (input[\"Transporta\"] !== undefined) this[\"Transporta\"] = new TTransporta(input[\"Transporta\"]);\n if (input[\"vagao\"] !== undefined) this[\"vagao\"] = input[\"vagao\"];\n if (input[\"veicTransp\"] !== undefined) this[\"veicTransp\"] = new TveicTransp(input[\"veicTransp\"]);\n if (input[\"Vol\"] !== undefined) this[\"Vol\"] = Object.assign(new TVolCollection(), input[\"Vol\"].map(v=>new TVolCollectionItem(v)));\n }\n}\nexport interface TTransportaInput {\n \"CNPJCPF\"?: string;\n \"IE\"?: string;\n \"UF\"?: string;\n \"xEnder\"?: string;\n \"xMun\"?: string;\n \"xNome\"?: string;\n}\nexport class TTransporta {\n \"CNPJCPF\"?: string;\n \"IE\"?: string;\n \"UF\"?: string;\n \"xEnder\"?: string;\n \"xMun\"?: string;\n \"xNome\"?: string;\n constructor(input: TTransportaInput = {}) {\n validateModel(\"TTransporta\", input);\n if (input[\"CNPJCPF\"] !== undefined) this[\"CNPJCPF\"] = input[\"CNPJCPF\"];\n if (input[\"IE\"] !== undefined) this[\"IE\"] = input[\"IE\"];\n if (input[\"UF\"] !== undefined) this[\"UF\"] = input[\"UF\"];\n if (input[\"xEnder\"] !== undefined) this[\"xEnder\"] = input[\"xEnder\"];\n if (input[\"xMun\"] !== undefined) this[\"xMun\"] = input[\"xMun\"];\n if (input[\"xNome\"] !== undefined) this[\"xNome\"] = input[\"xNome\"];\n }\n}\nexport interface TveicProdInput {\n \"anoFab\"?: number;\n \"anoMod\"?: number;\n \"cCor\"?: string;\n \"cCorDENATRAN\"?: string;\n \"chassi\"?: string;\n \"Cilin\"?: string;\n \"cMod\"?: string;\n \"CMT\"?: string;\n \"condVeic\"?: TpcnCondicaoVeiculo;\n \"dist\"?: string;\n \"espVeic\"?: number;\n \"lota\"?: number;\n \"nMotor\"?: string;\n \"nSerie\"?: string;\n \"pesoB\"?: string;\n \"pesoL\"?: string;\n \"pot\"?: string;\n \"tpComb\"?: string;\n \"tpOP\"?: TpcnTipoOperacao;\n \"tpPint\"?: string;\n \"tpRest\"?: number;\n \"tpVeic\"?: number;\n \"VIN\"?: string;\n \"xCor\"?: string;\n}\nexport class TveicProd {\n \"anoFab\"?: number;\n \"anoMod\"?: number;\n \"cCor\"?: string;\n \"cCorDENATRAN\"?: string;\n \"chassi\"?: string;\n \"Cilin\"?: string;\n \"cMod\"?: string;\n \"CMT\"?: string;\n readonly \"CombDescricao\"?: string;\n \"condVeic\"?: TpcnCondicaoVeiculo;\n \"dist\"?: string;\n \"espVeic\"?: number;\n \"lota\"?: number;\n \"nMotor\"?: string;\n \"nSerie\"?: string;\n \"pesoB\"?: string;\n \"pesoL\"?: string;\n \"pot\"?: string;\n \"tpComb\"?: string;\n \"tpOP\"?: TpcnTipoOperacao;\n \"tpPint\"?: string;\n \"tpRest\"?: number;\n \"tpVeic\"?: number;\n \"VIN\"?: string;\n \"xCor\"?: string;\n constructor(input: TveicProdInput = {}) {\n validateModel(\"TveicProd\", input);\n if (input[\"anoFab\"] !== undefined) this[\"anoFab\"] = input[\"anoFab\"];\n if (input[\"anoMod\"] !== undefined) this[\"anoMod\"] = input[\"anoMod\"];\n if (input[\"cCor\"] !== undefined) this[\"cCor\"] = input[\"cCor\"];\n if (input[\"cCorDENATRAN\"] !== undefined) this[\"cCorDENATRAN\"] = input[\"cCorDENATRAN\"];\n if (input[\"chassi\"] !== undefined) this[\"chassi\"] = input[\"chassi\"];\n if (input[\"Cilin\"] !== undefined) this[\"Cilin\"] = input[\"Cilin\"];\n if (input[\"cMod\"] !== undefined) this[\"cMod\"] = input[\"cMod\"];\n if (input[\"CMT\"] !== undefined) this[\"CMT\"] = input[\"CMT\"];\n if (input[\"condVeic\"] !== undefined) this[\"condVeic\"] = input[\"condVeic\"];\n if (input[\"dist\"] !== undefined) this[\"dist\"] = input[\"dist\"];\n if (input[\"espVeic\"] !== undefined) this[\"espVeic\"] = input[\"espVeic\"];\n if (input[\"lota\"] !== undefined) this[\"lota\"] = input[\"lota\"];\n if (input[\"nMotor\"] !== undefined) this[\"nMotor\"] = input[\"nMotor\"];\n if (input[\"nSerie\"] !== undefined) this[\"nSerie\"] = input[\"nSerie\"];\n if (input[\"pesoB\"] !== undefined) this[\"pesoB\"] = input[\"pesoB\"];\n if (input[\"pesoL\"] !== undefined) this[\"pesoL\"] = input[\"pesoL\"];\n if (input[\"pot\"] !== undefined) this[\"pot\"] = input[\"pot\"];\n if (input[\"tpComb\"] !== undefined) this[\"tpComb\"] = input[\"tpComb\"];\n if (input[\"tpOP\"] !== undefined) this[\"tpOP\"] = input[\"tpOP\"];\n if (input[\"tpPint\"] !== undefined) this[\"tpPint\"] = input[\"tpPint\"];\n if (input[\"tpRest\"] !== undefined) this[\"tpRest\"] = input[\"tpRest\"];\n if (input[\"tpVeic\"] !== undefined) this[\"tpVeic\"] = input[\"tpVeic\"];\n if (input[\"VIN\"] !== undefined) this[\"VIN\"] = input[\"VIN\"];\n if (input[\"xCor\"] !== undefined) this[\"xCor\"] = input[\"xCor\"];\n }\n}\nexport interface TveicTranspInput {\n \"placa\"?: string;\n \"RNTC\"?: string;\n \"UF\"?: string;\n}\nexport class TveicTransp {\n \"placa\"?: string;\n \"RNTC\"?: string;\n \"UF\"?: string;\n constructor(input: TveicTranspInput = {}) {\n validateModel(\"TveicTransp\", input);\n if (input[\"placa\"] !== undefined) this[\"placa\"] = input[\"placa\"];\n if (input[\"RNTC\"] !== undefined) this[\"RNTC\"] = input[\"RNTC\"];\n if (input[\"UF\"] !== undefined) this[\"UF\"] = input[\"UF\"];\n }\n}\nexport type TVolCollectionInput = TVolCollectionItemInput[];\nexport class TVolCollection extends Array<TVolCollectionItem> {\n New(input: TVolCollectionItemInput = {}): TVolCollectionItem { const item=new TVolCollectionItem(input); this.push(item); return item; }\n}\nexport interface TVolCollectionItemInput {\n \"esp\"?: string;\n \"Lacres\"?: TLacresCollectionInput;\n \"marca\"?: string;\n \"nVol\"?: string;\n \"pesoB\"?: string;\n \"pesoL\"?: string;\n \"qVol\"?: number;\n}\nexport class TVolCollectionItem {\n \"esp\"?: string;\n \"Lacres\" = new TLacresCollection();\n \"marca\"?: string;\n \"nVol\"?: string;\n \"pesoB\"?: string;\n \"pesoL\"?: string;\n \"qVol\"?: number;\n constructor(input: TVolCollectionItemInput = {}) {\n validateModel(\"TVolCollectionItem\", input);\n if (input[\"esp\"] !== undefined) this[\"esp\"] = input[\"esp\"];\n if (input[\"Lacres\"] !== undefined) this[\"Lacres\"] = Object.assign(new TLacresCollection(), input[\"Lacres\"].map(v=>new TLacresCollectionItem(v)));\n if (input[\"marca\"] !== undefined) this[\"marca\"] = input[\"marca\"];\n if (input[\"nVol\"] !== undefined) this[\"nVol\"] = input[\"nVol\"];\n if (input[\"pesoB\"] !== undefined) this[\"pesoB\"] = input[\"pesoB\"];\n if (input[\"pesoL\"] !== undefined) this[\"pesoL\"] = input[\"pesoL\"];\n if (input[\"qVol\"] !== undefined) this[\"qVol\"] = input[\"qVol\"];\n }\n}\nconst MODEL_SCHEMA: Record<string, any> = {\"TACBrProcessoEmissao\":{\"name\":\"TACBrProcessoEmissao\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"peAplicativoContribuinte\",\"peAvulsaFisco\",\"peAvulsaContribuinte\",\"peContribuinteAplicativoFisco\",\"peProvedorAssinaturaAutorizacao\"]},\"TACBrTipoAmbiente\":{\"name\":\"TACBrTipoAmbiente\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"taProducao\",\"taHomologacao\"]},\"TACBrTipoEmissao\":{\"name\":\"TACBrTipoEmissao\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"teNormal\",\"teContingencia\",\"teSCAN\",\"teDPEC\",\"teFSDA\",\"teSVCAN\",\"teSVCRS\",\"teSVCSP\",\"teOffLine\"]},\"TACBrTipoImpressao\":{\"name\":\"TACBrTipoImpressao\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"tiSemGeracao\",\"tiRetrato\",\"tiPaisagem\",\"tiSimplificado\",\"tiNFCe\",\"tiMsgEletronica\",\"tiSimplificadoTipo2\"]},\"TAdiCollection\":{\"name\":\"TAdiCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TAdiCollectionItem\",\"factory\":\"New\"},\"TAdiCollectionItem\":{\"name\":\"TAdiCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cFabricante\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nAdicao\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"nDraw\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nSeqAdi\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"vDescDI\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"Tagropecuario\":{\"name\":\"Tagropecuario\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"defensivo\",\"type\":\"TdefensivoCollection\",\"kind\":\"list\",\"ref\":\"TdefensivoCollection\",\"readonly\":false},{\"name\":\"guiaTransito\",\"type\":\"TguiaTransito\",\"kind\":\"object\",\"ref\":\"TguiaTransito\",\"readonly\":false}]},\"TArmaCollection\":{\"name\":\"TArmaCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TArmaCollectionItem\",\"factory\":\"New\"},\"TArmaCollectionItem\":{\"name\":\"TArmaCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"descr\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nCano\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nSerie\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"tpArma\",\"type\":\"TpcnTipoArma\",\"kind\":\"enum\",\"ref\":\"TpcnTipoArma\",\"readonly\":false,\"declaredDefault\":\"taUsoPermitido\"}]},\"TautXMLCollection\":{\"name\":\"TautXMLCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TautXMLCollectionItem\",\"factory\":\"New\"},\"TautXMLCollectionItem\":{\"name\":\"TautXMLCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CNPJCPF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TAvulsa\":{\"name\":\"TAvulsa\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CNPJ\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"dEmi\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"dPag\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"fone\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"matr\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nDAR\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"repEmi\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vDAR\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"xAgente\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xOrgao\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"Tcana\":{\"name\":\"Tcana\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"deduc\",\"type\":\"TDeducCollection\",\"kind\":\"list\",\"ref\":\"TDeducCollection\",\"readonly\":false},{\"name\":\"fordia\",\"type\":\"TForDiaCollection\",\"kind\":\"list\",\"ref\":\"TForDiaCollection\",\"readonly\":false},{\"name\":\"qTotAnt\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"qTotGer\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"qTotMes\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"ref\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"safra\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vFor\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vLiqFor\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vTotDed\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TcCredPres\":{\"name\":\"TcCredPres\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"cpNenhum\",\"cp01\",\"cp02\",\"cp03\",\"cp04\",\"cp05\",\"cp06\",\"cp07\",\"cp08\",\"cp09\",\"cp10\",\"cp11\",\"cp12\",\"cp13\"]},\"TCIDE\":{\"name\":\"TCIDE\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"qBCProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vAliqProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vCIDE\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TCobr\":{\"name\":\"TCobr\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"Dup\",\"type\":\"TDupCollection\",\"kind\":\"list\",\"ref\":\"TDupCollection\",\"readonly\":false},{\"name\":\"Fat\",\"type\":\"TFat\",\"kind\":\"object\",\"ref\":\"TFat\",\"readonly\":false}]},\"TCOFINS\":{\"name\":\"TCOFINS\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CST\",\"type\":\"TCstCofins\",\"kind\":\"enum\",\"ref\":\"TCSTCofins\",\"readonly\":false,\"declaredDefault\":\"cof01\"},{\"name\":\"pCOFINS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vAliqProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vCOFINS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TCOFINSST\":{\"name\":\"TCOFINSST\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"indSomaCOFINSST\",\"type\":\"TIndSomaCOFINSST\",\"kind\":\"enum\",\"ref\":\"TIndSomaCOFINSST\",\"readonly\":false},{\"name\":\"pCOFINS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vAliqProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vCOFINS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TComb\":{\"name\":\"TComb\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CIDE\",\"type\":\"TCIDE\",\"kind\":\"object\",\"ref\":\"TCIDE\",\"readonly\":false},{\"name\":\"CODIF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cProdANP\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"descANP\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"encerrante\",\"type\":\"Tencerrante\",\"kind\":\"object\",\"ref\":\"Tencerrante\",\"readonly\":false},{\"name\":\"ICMS\",\"type\":\"TICMSComb\",\"kind\":\"object\",\"ref\":\"TICMSComb\",\"readonly\":false},{\"name\":\"ICMSCons\",\"type\":\"TICMSCons\",\"kind\":\"object\",\"ref\":\"TICMSCons\",\"readonly\":false},{\"name\":\"ICMSInter\",\"type\":\"TICMSInter\",\"kind\":\"object\",\"ref\":\"TICMSInter\",\"readonly\":false},{\"name\":\"origComb\",\"type\":\"TorigCombCollection\",\"kind\":\"list\",\"ref\":\"TorigCombCollection\",\"readonly\":false},{\"name\":\"pBio\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pGLP\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pGNi\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pGNn\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pMixGN\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qTemp\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"UFcons\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vPart\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TCompra\":{\"name\":\"TCompra\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"xCont\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xNEmp\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xPed\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TCredPresIBSZFM\":{\"name\":\"TCredPresIBSZFM\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"competApur\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"tpCredPresIBSZFM\",\"type\":\"TTpCredPresIBSZFM\",\"kind\":\"enum\",\"ref\":\"TTpCredPresIBSZFM\",\"readonly\":false},{\"name\":\"vCredPresIBSZFM\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TCredPresumidoCollection\":{\"name\":\"TCredPresumidoCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TCredPresumidoCollectionItem\",\"factory\":\"New\"},\"TCredPresumidoCollectionItem\":{\"name\":\"TCredPresumidoCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cCredPresumido\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"pCredPresumido\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCredPresumido\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TCSOSNIcms\":{\"name\":\"TCSOSNIcms\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"csosnVazio\",\"csosn101\",\"csosn102\",\"csosn103\",\"csosn201\",\"csosn202\",\"csosn203\",\"csosn300\",\"csosn400\",\"csosn500\",\"csosn900\"]},\"TCSTCofins\":{\"name\":\"TCSTCofins\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"cof01\",\"cof02\",\"cof03\",\"cof04\",\"cof05\",\"cof06\",\"cof07\",\"cof08\",\"cof09\",\"cof49\",\"cof50\",\"cof51\",\"cof52\",\"cof53\",\"cof54\",\"cof55\",\"cof56\",\"cof60\",\"cof61\",\"cof62\",\"cof63\",\"cof64\",\"cof65\",\"cof66\",\"cof67\",\"cof70\",\"cof71\",\"cof72\",\"cof73\",\"cof74\",\"cof75\",\"cof98\",\"cof99\"]},\"TCSTIBSCBS\":{\"name\":\"TCSTIBSCBS\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"cstNenhum\",\"cst000\",\"cst010\",\"cst011\",\"cst200\",\"cst220\",\"cst221\",\"cst222\",\"cst400\",\"cst410\",\"cst510\",\"cst515\",\"cst550\",\"cst620\",\"cst800\",\"cst810\",\"cst811\",\"cst820\",\"cst830\"]},\"TCSTIcms\":{\"name\":\"TCSTIcms\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"cstVazio\",\"cst00\",\"cst10\",\"cst20\",\"cst30\",\"cst40\",\"cst41\",\"cst45\",\"cst50\",\"cst51\",\"cst60\",\"cst70\",\"cst80\",\"cst81\",\"cst90\",\"cstICMSOutraUF\",\"cstICMSSN\",\"cstPart10\",\"cstPart90\",\"cstRep41\",\"cstRep60\",\"cst02\",\"cst15\",\"cst53\",\"cst61\",\"cst01\",\"cst12\",\"cst13\",\"cst14\",\"cst21\",\"cst72\",\"cst73\",\"cst74\",\"cstPart20\"]},\"TCSTPis\":{\"name\":\"TCSTPis\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"pis01\",\"pis02\",\"pis03\",\"pis04\",\"pis05\",\"pis06\",\"pis07\",\"pis08\",\"pis09\",\"pis49\",\"pis50\",\"pis51\",\"pis52\",\"pis53\",\"pis54\",\"pis55\",\"pis56\",\"pis60\",\"pis61\",\"pis62\",\"pis63\",\"pis64\",\"pis65\",\"pis66\",\"pis67\",\"pis70\",\"pis71\",\"pis72\",\"pis73\",\"pis74\",\"pis75\",\"pis98\",\"pis99\"]},\"TDeducCollection\":{\"name\":\"TDeducCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TDeducCollectionItem\",\"factory\":\"New\"},\"TDeducCollectionItem\":{\"name\":\"TDeducCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vDed\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"xDed\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TdefensivoCollection\":{\"name\":\"TdefensivoCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TdefensivoCollectionItem\",\"factory\":\"New\"},\"TdefensivoCollectionItem\":{\"name\":\"TdefensivoCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CPFRespTec\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nReceituario\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TDest\":{\"name\":\"TDest\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CNPJCPF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"Email\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"EnderDest\",\"type\":\"TEnderDest\",\"kind\":\"object\",\"ref\":\"TEnderDest\",\"readonly\":false},{\"name\":\"idEstrangeiro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"IE\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"IM\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"indIEDest\",\"type\":\"TindIEDest\",\"kind\":\"enum\",\"ref\":\"TindIEDest\",\"readonly\":false},{\"name\":\"ISUF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xNome\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TDetCollection\":{\"name\":\"TDetCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TDetCollectionItem\",\"factory\":\"New\"},\"TDetCollectionItem\":{\"name\":\"TDetCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"DFeReferenciado\",\"type\":\"TDFeReferenciado\",\"kind\":\"object\",\"ref\":\"TDFeReferenciado\",\"readonly\":false},{\"name\":\"Imposto\",\"type\":\"TImposto\",\"kind\":\"object\",\"ref\":\"TImposto\",\"readonly\":false},{\"name\":\"infAdProd\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"obsCont\",\"type\":\"TobsItem\",\"kind\":\"object\",\"ref\":\"TobsItem\",\"readonly\":false},{\"name\":\"obsFisco\",\"type\":\"TobsItem\",\"kind\":\"object\",\"ref\":\"TobsItem\",\"readonly\":false},{\"name\":\"pDevol\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"Prod\",\"type\":\"TProd\",\"kind\":\"object\",\"ref\":\"TProd\",\"readonly\":false},{\"name\":\"vIPIDevol\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vItem\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TdetExportCollection\":{\"name\":\"TdetExportCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TdetExportCollectionItem\",\"factory\":\"New\"},\"TdetExportCollectionItem\":{\"name\":\"TdetExportCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"chNFe\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nDraw\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nRE\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"qExport\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TDFErefCollection\":{\"name\":\"TDFErefCollection\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"list\",\"item\":\"TDFErefCollectionItem\",\"factory\":\"New\"},\"TDFErefCollectionItem\":{\"name\":\"TDFErefCollectionItem\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"refDFeChave\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TDFeReferenciado\":{\"name\":\"TDFeReferenciado\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"chaveAcesso\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nItem\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false}]},\"TDICollection\":{\"name\":\"TDICollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TDICollectionItem\",\"factory\":\"New\"},\"TDICollectionItem\":{\"name\":\"TDICollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"adi\",\"type\":\"TAdiCollection\",\"kind\":\"list\",\"ref\":\"TAdiCollection\",\"readonly\":false},{\"name\":\"cExportador\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CNPJ\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"dDesemb\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"dDi\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"nDi\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"tpIntermedio\",\"type\":\"TpcnTipoIntermedio\",\"kind\":\"enum\",\"ref\":\"TpcnTipoIntermedio\",\"readonly\":false},{\"name\":\"tpViaTransp\",\"type\":\"TpcnTipoViaTransp\",\"kind\":\"enum\",\"ref\":\"TpcnTipoViaTransp\",\"readonly\":false},{\"name\":\"UFDesemb\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UFTerceiro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vAFRMM\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"xLocDesemb\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TDupCollection\":{\"name\":\"TDupCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TDupCollectionItem\",\"factory\":\"New\"},\"TDupCollectionItem\":{\"name\":\"TDupCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"dVenc\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"nDup\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vDup\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TEmit\":{\"name\":\"TEmit\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CNAE\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CNPJCPF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CRT\",\"type\":\"TpcnCRT\",\"kind\":\"enum\",\"ref\":\"TpcnCRT\",\"readonly\":false},{\"name\":\"EnderEmit\",\"type\":\"TEnderEmit\",\"kind\":\"object\",\"ref\":\"TenderEmit\",\"readonly\":false},{\"name\":\"IE\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"IEST\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"IM\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"ISUFEmit\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xFant\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xNome\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"Tencerrante\":{\"name\":\"Tencerrante\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"nBico\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"nBomba\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"nTanque\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"vEncFin\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vEncIni\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TEnderDest\":{\"name\":\"TEnderDest\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CEP\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cMun\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cPais\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"fone\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xBairro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xCpl\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xLgr\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xMun\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xPais\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TenderEmit\":{\"name\":\"TenderEmit\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CEP\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cMun\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cPais\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"fone\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xBairro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xCpl\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xLgr\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xMun\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xPais\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TEntrega\":{\"name\":\"TEntrega\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CEP\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cMun\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"CNPJCPF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cPais\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"Email\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"fone\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"IE\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xBairro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xCpl\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xLgr\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xMun\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xNome\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xPais\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TExporta\":{\"name\":\"TExporta\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"UFembarq\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UFSaidaPais\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xLocDespacho\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xLocEmbarq\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xLocExporta\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TFat\":{\"name\":\"TFat\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"nFat\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vDesc\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vLiq\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vOrig\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TForDiaCollection\":{\"name\":\"TForDiaCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TForDiaCollectionItem\",\"factory\":\"New\"},\"TForDiaCollectionItem\":{\"name\":\"TForDiaCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"dia\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"qtde\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TgAjusteCompet\":{\"name\":\"TgAjusteCompet\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"competApur\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"vCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgALCZFMCBS\":{\"name\":\"TgALCZFMCBS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"nProcSuframa\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"pAliqEfetRegCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"tpALCZFMCBS\",\"type\":\"TtpALCZFMCBS\",\"kind\":\"enum\",\"ref\":\"TtpALCZFMCBS\",\"readonly\":false},{\"name\":\"vTribRegCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgCBS\":{\"name\":\"TgCBS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCredPres\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCredPresCondSus\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vDevTrib\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vDif\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgCBSMonoAdRem\":{\"name\":\"TgCBSMonoAdRem\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gMonoPadrao\",\"type\":\"TgMonoPadraoCBSQtde\",\"kind\":\"object\",\"ref\":\"TgMonoPadraoCBSQtde\",\"readonly\":false},{\"name\":\"gMonoRet\",\"type\":\"TgMonoRetCBS\",\"kind\":\"object\",\"ref\":\"TgMonoRetCBS\",\"readonly\":false},{\"name\":\"gMonoReten\",\"type\":\"TgMonoRetenCBSQtde\",\"kind\":\"object\",\"ref\":\"TgMonoRetenCBSQtde\",\"readonly\":false},{\"name\":\"gpBioDiferenca\",\"type\":\"TgpBioDiferencaCBS\",\"kind\":\"object\",\"ref\":\"TgpBioDiferencaCBS\",\"readonly\":false}]},\"TgCBSMonoAdValorem\":{\"name\":\"TgCBSMonoAdValorem\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gMonoPadrao\",\"type\":\"TgMonoPadraoCBSAliq\",\"kind\":\"object\",\"ref\":\"TgMonoPadraoCBSAliq\",\"readonly\":false},{\"name\":\"gMonoRet\",\"type\":\"TgMonoRetCBS\",\"kind\":\"object\",\"ref\":\"TgMonoRetCBS\",\"readonly\":false},{\"name\":\"gMonoReten\",\"type\":\"TgMonoRetenCBSAliq\",\"kind\":\"object\",\"ref\":\"TgMonoRetenCBSAliq\",\"readonly\":false},{\"name\":\"gpBioDiferenca\",\"type\":\"TgpBioDiferencaCBS\",\"kind\":\"object\",\"ref\":\"TgpBioDiferencaCBS\",\"readonly\":false}]},\"TgCBSValores\":{\"name\":\"TgCBSValores\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gALCZFMCBS\",\"type\":\"TgALCZFMCBS\",\"kind\":\"object\",\"ref\":\"TgALCZFMCBS\",\"readonly\":false},{\"name\":\"gDevTrib\",\"type\":\"TgDevTrib\",\"kind\":\"object\",\"ref\":\"TgDevTrib\",\"readonly\":false},{\"name\":\"gDif\",\"type\":\"TgDif\",\"kind\":\"object\",\"ref\":\"TgDif\",\"readonly\":false},{\"name\":\"gRed\",\"type\":\"TgRed\",\"kind\":\"object\",\"ref\":\"TgRed\",\"readonly\":false},{\"name\":\"pCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgCompraGov\":{\"name\":\"TgCompraGov\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pRedutor\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"refDFeAnt\",\"type\":\"TDFerefCollection\",\"kind\":\"list\",\"ref\":\"TDFErefCollection\",\"readonly\":false},{\"name\":\"tpEnteGov\",\"type\":\"TtpEnteGov\",\"kind\":\"enum\",\"ref\":\"TtpEnteGov\",\"readonly\":false},{\"name\":\"tpOperGov\",\"type\":\"TtpOperGov\",\"kind\":\"enum\",\"ref\":\"TtpOperGov\",\"readonly\":false}]},\"TgCredPresOper\":{\"name\":\"TgCredPresOper\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cCredPres\",\"type\":\"TcCredPres\",\"kind\":\"enum\",\"ref\":\"TcCredPres\",\"readonly\":false},{\"name\":\"gCBSCredPres\",\"type\":\"TgIBSCBSCredPres\",\"kind\":\"object\",\"ref\":\"TgIBSCBSCredPres\",\"readonly\":false},{\"name\":\"gIBSCredPres\",\"type\":\"TgIBSCBSCredPres\",\"kind\":\"object\",\"ref\":\"TgIBSCBSCredPres\",\"readonly\":false},{\"name\":\"vBCCredPres\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgDevTrib\":{\"name\":\"TgDevTrib\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pDevTrib\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vDevTrib\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgDif\":{\"name\":\"TgDif\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pDif\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vDif\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgEstornoCred\":{\"name\":\"TgEstornoCred\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vCBSEstCred\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSEstCred\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgIBS\":{\"name\":\"TgIBS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gIBSMunTot\",\"type\":\"TgIBSMunTot\",\"kind\":\"object\",\"ref\":\"TgIBSMunTot\",\"readonly\":false},{\"name\":\"gIBSUFTot\",\"type\":\"TgIBSUFTot\",\"kind\":\"object\",\"ref\":\"TgIBSUFTot\",\"readonly\":false},{\"name\":\"vCredPres\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCredPresCondSus\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgIBSCBS\":{\"name\":\"TgIBSCBS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gCBS\",\"type\":\"TgCBSValores\",\"kind\":\"object\",\"ref\":\"TgCBSValores\",\"readonly\":false},{\"name\":\"gIBSMun\",\"type\":\"TgIBSMunValores\",\"kind\":\"object\",\"ref\":\"TgIBSMunValores\",\"readonly\":false},{\"name\":\"gIBSUF\",\"type\":\"TgIBSUFValores\",\"kind\":\"object\",\"ref\":\"TgIBSUFValores\",\"readonly\":false},{\"name\":\"gTribCompraGov\",\"type\":\"TgTribCompraGov\",\"kind\":\"object\",\"ref\":\"TgTribCompraGov\",\"readonly\":false},{\"name\":\"gTribRegular\",\"type\":\"TgTribRegular\",\"kind\":\"object\",\"ref\":\"TgTribRegular\",\"readonly\":false},{\"name\":\"vBC\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vOperacIndiv\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vRedAjusteIndiv\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vRedSocialIndiv\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vTornaIndiv\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgIBSCBSCredPres\":{\"name\":\"TgIBSCBSCredPres\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pCredPres\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCredPres\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCredPresCondSus\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgIBSCBSMono\":{\"name\":\"TgIBSCBSMono\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gCBSMonoAdRem\",\"type\":\"TgCBSMonoAdRem\",\"kind\":\"object\",\"ref\":\"TgCBSMonoAdRem\",\"readonly\":false},{\"name\":\"gCBSMonoAdValorem\",\"type\":\"TgCBSMonoAdValorem\",\"kind\":\"object\",\"ref\":\"TgCBSMonoAdValorem\",\"readonly\":false},{\"name\":\"gIBSMonoAdRem\",\"type\":\"TgIBSMonoAdRem\",\"kind\":\"object\",\"ref\":\"TgIBSMonoAdRem\",\"readonly\":false},{\"name\":\"gIBSMonoAdValorem\",\"type\":\"TgIBSMonoAdValorem\",\"kind\":\"object\",\"ref\":\"TgIBSMonoAdValorem\",\"readonly\":false},{\"name\":\"vTotCBSMonoItem\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vTotIBSMonoItem\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgIBSMonoAdRem\":{\"name\":\"TgIBSMonoAdRem\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gMonoPadrao\",\"type\":\"TgMonoPadraoIBSQtde\",\"kind\":\"object\",\"ref\":\"TgMonoPadraoIBSQtde\",\"readonly\":false},{\"name\":\"gMonoRet\",\"type\":\"TgMonoRetIBS\",\"kind\":\"object\",\"ref\":\"TgMonoRetIBS\",\"readonly\":false},{\"name\":\"gMonoReten\",\"type\":\"TgMonoRetenIBSQtde\",\"kind\":\"object\",\"ref\":\"TgMonoRetenIBSQtde\",\"readonly\":false},{\"name\":\"gpBioDiferenca\",\"type\":\"TgpBioDiferencaIBS\",\"kind\":\"object\",\"ref\":\"TgpBioDiferencaIBS\",\"readonly\":false}]},\"TgIBSMonoAdValorem\":{\"name\":\"TgIBSMonoAdValorem\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gMonoPadrao\",\"type\":\"TgMonoPadraoIBSAliq\",\"kind\":\"object\",\"ref\":\"TgMonoPadraoIBSAliq\",\"readonly\":false},{\"name\":\"gMonoRet\",\"type\":\"TgMonoRetIBS\",\"kind\":\"object\",\"ref\":\"TgMonoRetIBS\",\"readonly\":false},{\"name\":\"gMonoReten\",\"type\":\"TgMonoRetenIBSAliq\",\"kind\":\"object\",\"ref\":\"TgMonoRetenIBSAliq\",\"readonly\":false},{\"name\":\"gpBioDiferenca\",\"type\":\"TgpBioDiferencaIBS\",\"kind\":\"object\",\"ref\":\"TgpBioDiferencaIBS\",\"readonly\":false}]},\"TgIBSMunTot\":{\"name\":\"TgIBSMunTot\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vDevTrib\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vDif\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMun\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgIBSMunValores\":{\"name\":\"TgIBSMunValores\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gDevTrib\",\"type\":\"TgDevTrib\",\"kind\":\"object\",\"ref\":\"TgDevTrib\",\"readonly\":false},{\"name\":\"gDif\",\"type\":\"TgDif\",\"kind\":\"object\",\"ref\":\"TgDif\",\"readonly\":false},{\"name\":\"gRed\",\"type\":\"TgRed\",\"kind\":\"object\",\"ref\":\"TgRed\",\"readonly\":false},{\"name\":\"pIBSMun\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMun\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgIBSUFTot\":{\"name\":\"TgIBSUFTot\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vDevTrib\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vDif\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSUF\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgIBSUFValores\":{\"name\":\"TgIBSUFValores\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gDevTrib\",\"type\":\"TgDevTrib\",\"kind\":\"object\",\"ref\":\"TgDevTrib\",\"readonly\":false},{\"name\":\"gDif\",\"type\":\"TgDif\",\"kind\":\"object\",\"ref\":\"TgDif\",\"readonly\":false},{\"name\":\"gRed\",\"type\":\"TgRed\",\"kind\":\"object\",\"ref\":\"TgRed\",\"readonly\":false},{\"name\":\"pIBSUF\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSUF\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgIS\":{\"name\":\"TgIS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"adRemIS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"cClassTribIS\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CSTIS\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"pIS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"qTrib\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"uTrib\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vBCIS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMono\":{\"name\":\"TgMono\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vCBSMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCBSMonoRet\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCBSMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMonoRet\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoPadraoCBSAliq\":{\"name\":\"TgMonoPadraoCBSAliq\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pAliqMonoCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vBCMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCBSMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoPadraoCBSQtde\":{\"name\":\"TgMonoPadraoCBSQtde\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"adRemCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"qBCMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCBSMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoPadraoIBSAliq\":{\"name\":\"TgMonoPadraoIBSAliq\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pAliqMonoMun\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"pAliqMonoUF\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vBCMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMonoMun\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMonoUF\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoPadraoIBSQtde\":{\"name\":\"TgMonoPadraoIBSQtde\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"adRemIBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"qBCMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMono\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoRetCBS\":{\"name\":\"TgMonoRetCBS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vCBSMonoRet\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoRetenCBSAliq\":{\"name\":\"TgMonoRetenCBSAliq\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pAliqMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vBCMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCBSMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoRetenCBSQtde\":{\"name\":\"TgMonoRetenCBSQtde\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"adRemCBSReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"qBCMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCBSMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoRetenIBSAliq\":{\"name\":\"TgMonoRetenIBSAliq\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pAliqMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vBCMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoRetenIBSQtde\":{\"name\":\"TgMonoRetenIBSQtde\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"adRemIBSReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"qBCMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSMonoReten\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgMonoRetIBS\":{\"name\":\"TgMonoRetIBS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vIBSMonoRet\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgPagAntecipado\":{\"name\":\"TgPagAntecipado\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"refNFe\",\"type\":\"TrefDFePagAntCollection\",\"kind\":\"list\",\"ref\":\"TrefDFePagAntCollection\",\"readonly\":false}]},\"TgpBioDiferencaCBS\":{\"name\":\"TgpBioDiferencaCBS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"qBCBioComb\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vCBSDiferenca\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgpBioDiferencaIBS\":{\"name\":\"TgpBioDiferencaIBS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"qBCBioComb\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBSDiferenca\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgRed\":{\"name\":\"TgRed\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pAliqEfet\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"pRedAliq\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgTransfCred\":{\"name\":\"TgTransfCred\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vIBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgTribCompraGov\":{\"name\":\"TgTribCompraGov\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pAliqCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"pAliqIBSMun\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"pAliqIBSUF\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vTribCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vTribIBSMun\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vTribIBSUF\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TgTribRegular\":{\"name\":\"TgTribRegular\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cClassTribReg\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CSTReg\",\"type\":\"TCSTIBSCBS\",\"kind\":\"enum\",\"ref\":\"TCSTIBSCBS\",\"readonly\":false},{\"name\":\"pAliqEfetRegCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"pAliqEfetRegIBSMun\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"pAliqEfetRegIBSUF\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vTribRegCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vTribRegIBSMun\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vTribRegIBSUF\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TguiaTransito\":{\"name\":\"TguiaTransito\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"nGuia\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"serieGuia\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"tpGuia\",\"type\":\"TtpGuia\",\"kind\":\"enum\",\"ref\":\"TtpGuia\",\"readonly\":false},{\"name\":\"UFGuia\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TIBSCBS\":{\"name\":\"TIBSCBS\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cClassTrib\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CST\",\"type\":\"TCSTIBSCBS\",\"kind\":\"enum\",\"ref\":\"TCSTIBSCBS\",\"readonly\":false},{\"name\":\"gAjusteCompet\",\"type\":\"TgAjusteCompet\",\"kind\":\"object\",\"ref\":\"TgAjusteCompet\",\"readonly\":false},{\"name\":\"gCredPresIBSZFM\",\"type\":\"TCredPresIBSZFM\",\"kind\":\"object\",\"ref\":\"TCredPresIBSZFM\",\"readonly\":false},{\"name\":\"gCredPresOper\",\"type\":\"TgCredPresOper\",\"kind\":\"object\",\"ref\":\"TgCredPresOper\",\"readonly\":false},{\"name\":\"gEstornoCred\",\"type\":\"TgEstornoCred\",\"kind\":\"object\",\"ref\":\"TgEstornoCred\",\"readonly\":false},{\"name\":\"gIBSCBS\",\"type\":\"TgIBSCBS\",\"kind\":\"object\",\"ref\":\"TgIBSCBS\",\"readonly\":false},{\"name\":\"gIBSCBSMono\",\"type\":\"TgIBSCBSMono\",\"kind\":\"object\",\"ref\":\"TgIBSCBSMono\",\"readonly\":false},{\"name\":\"gTransfCred\",\"type\":\"TgTransfCred\",\"kind\":\"object\",\"ref\":\"TgTransfCred\",\"readonly\":false},{\"name\":\"indDoacao\",\"type\":\"TIndicadorEx\",\"kind\":\"enum\",\"ref\":\"TIndicadorEx\",\"readonly\":false}]},\"TIBSCBSTot\":{\"name\":\"TIBSCBSTot\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"gCBS\",\"type\":\"TgCBS\",\"kind\":\"object\",\"ref\":\"TgCBS\",\"readonly\":false},{\"name\":\"gEstornoCred\",\"type\":\"TgEstornoCred\",\"kind\":\"object\",\"ref\":\"TgEstornoCred\",\"readonly\":false},{\"name\":\"gIBS\",\"type\":\"TgIBS\",\"kind\":\"object\",\"ref\":\"TgIBS\",\"readonly\":false},{\"name\":\"gMono\",\"type\":\"TgMono\",\"kind\":\"object\",\"ref\":\"TgMono\",\"readonly\":false},{\"name\":\"vBCIBSCBS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TICMS\":{\"name\":\"TICMS\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"adRemICMS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"adRemICMSDif\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"adRemICMSRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"adRemICMSReten\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"cBenefRBC\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CSOSN\",\"type\":\"TCSOSNIcms\",\"kind\":\"enum\",\"ref\":\"TCSOSNIcms\",\"readonly\":false},{\"name\":\"CST\",\"type\":\"TCSTIcms\",\"kind\":\"enum\",\"ref\":\"TCSTIcms\",\"readonly\":false,\"declaredDefault\":\"cst00\"},{\"name\":\"indDeduzDeson\",\"type\":\"TIndicadorEx\",\"kind\":\"enum\",\"ref\":\"TIndicadorEx\",\"readonly\":false,\"declaredDefault\":\"tieNenhum\"},{\"name\":\"modBC\",\"type\":\"TpcnDeterminacaoBaseIcms\",\"kind\":\"enum\",\"ref\":\"TpcnDeterminacaoBaseIcms\",\"readonly\":false,\"declaredDefault\":\"dbiMargemValorAgregado\"},{\"name\":\"modBCST\",\"type\":\"TpcnDeterminacaoBaseIcmsST\",\"kind\":\"enum\",\"ref\":\"TpcnDeterminacaoBaseIcmsST\",\"readonly\":false,\"declaredDefault\":\"dbisPrecoTabelado\"},{\"name\":\"motDesICMS\",\"type\":\"TpcnMotivoDesoneracaoICMS\",\"kind\":\"enum\",\"ref\":\"TpcnMotivoDesoneracaoICMS\",\"readonly\":false},{\"name\":\"motDesICMSST\",\"type\":\"TpcnMotivoDesoneracaoICMS\",\"kind\":\"enum\",\"ref\":\"TpcnMotivoDesoneracaoICMS\",\"readonly\":false},{\"name\":\"motRedAdRem\",\"type\":\"TmotRedAdRem\",\"kind\":\"enum\",\"ref\":\"TmotRedAdRem\",\"readonly\":false},{\"name\":\"orig\",\"type\":\"TOrigemMercadoria\",\"kind\":\"enum\",\"ref\":\"TOrigemMercadoria\",\"readonly\":false,\"declaredDefault\":\"oeNacional\"},{\"name\":\"pBCOp\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pCredSN\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pDif\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pFCP\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pFCPDif\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pFCPST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pFCPSTRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pICMS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pICMSEfet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pICMSST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pMVAST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pRedAdRem\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pRedBC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pRedBCEfet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pRedBCST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCMono\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCMonoDif\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCMonoRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCMonoReten\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"UFST\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vBC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCEfet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCFCP\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCFCPST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCFCPSTRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCSTDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCSTRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vCredICMSSN\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCP\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCPDif\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCPEfet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCPST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCPSTRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSDeson\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSDif\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSEfet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSMono\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSMonoDif\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSMonoOp\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSMonoRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSMonoReten\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSOp\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSSTDeson\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSSTDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSSTRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSSubstituto\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TICMSComb\":{\"name\":\"TICMSComb\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vBCICMS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCICMSST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TICMSCons\":{\"name\":\"TICMSCons\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"UFcons\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vBCICMSSTCons\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSSTCons\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TICMSInter\":{\"name\":\"TICMSInter\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vBCICMSSTDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSSTDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TICMSTot\":{\"name\":\"TICMSTot\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"qBCMono\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCMonoRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCMonoReten\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vCOFINS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vDesc\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCP\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCPST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCPSTRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCPUFDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFrete\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSDeson\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSMono\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSMonoRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSMonoReten\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSUFDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSUFRemet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vII\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vIPI\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vIPIDevol\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vNF\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vOutro\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vPIS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vSeg\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vST\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vTotTrib\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TICMSUFDest\":{\"name\":\"TICMSUFDest\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"pFCPUFDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pICMSInter\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pICMSInterPart\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pICMSUFDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCFCPUFDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCUFDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vFCPUFDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSUFDest\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSUFRemet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TIde\":{\"name\":\"TIde\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cDV\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cIndOp\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cMunFG\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cMunFGIBS\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cNF\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cUF\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"dEmi\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"dhCont\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"dPrevEntrega\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"dSaiEnt\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"finNFe\",\"type\":\"TpcnFinalidadeNFe\",\"kind\":\"enum\",\"ref\":\"TpcnFinalidadeNFe\",\"readonly\":false,\"declaredDefault\":\"fnNormal\"},{\"name\":\"gCompraGov\",\"type\":\"TgCompraGov\",\"kind\":\"object\",\"ref\":\"TgCompraGov\",\"readonly\":false},{\"name\":\"gPagAntecipado\",\"type\":\"TgPagAntecipado\",\"kind\":\"object\",\"ref\":\"TgPagAntecipado\",\"readonly\":false},{\"name\":\"hSaiEnt\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"idDest\",\"type\":\"TpcnDestinoOperacao\",\"kind\":\"enum\",\"ref\":\"TpcnDestinoOperacao\",\"readonly\":false},{\"name\":\"indFinal\",\"type\":\"TpcnConsumidorFinal\",\"kind\":\"enum\",\"ref\":\"TpcnConsumidorFinal\",\"readonly\":false},{\"name\":\"indIntermed\",\"type\":\"TindIntermed\",\"kind\":\"enum\",\"ref\":\"TindIntermed\",\"readonly\":false},{\"name\":\"indPag\",\"type\":\"TpcnIndicadorPagamento\",\"kind\":\"enum\",\"ref\":\"TpcnIndicadorPagamento\",\"readonly\":false,\"declaredDefault\":\"ipPrazo\"},{\"name\":\"indPres\",\"type\":\"TpcnPresencaComprador\",\"kind\":\"enum\",\"ref\":\"TpcnPresencaComprador\",\"readonly\":false},{\"name\":\"modelo\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"natOp\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"NFref\",\"type\":\"TNFrefCollection\",\"kind\":\"list\",\"ref\":\"TNFrefCollection\",\"readonly\":false},{\"name\":\"nNF\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"procEmi\",\"type\":\"TACBrProcessoEmissao\",\"kind\":\"enum\",\"ref\":\"TACBrProcessoEmissao\",\"readonly\":false,\"declaredDefault\":\"peAplicativoContribuinte\"},{\"name\":\"serie\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"tpAmb\",\"type\":\"TACBrTipoAmbiente\",\"kind\":\"enum\",\"ref\":\"TACBrTipoAmbiente\",\"readonly\":false,\"declaredDefault\":\"taHomologacao\"},{\"name\":\"tpEmis\",\"type\":\"TACBrTipoEmissao\",\"kind\":\"enum\",\"ref\":\"TACBrTipoEmissao\",\"readonly\":false,\"declaredDefault\":\"teNormal\"},{\"name\":\"tpImp\",\"type\":\"TACBrTipoImpressao\",\"kind\":\"enum\",\"ref\":\"TACBrTipoImpressao\",\"readonly\":false,\"declaredDefault\":\"tiPaisagem\"},{\"name\":\"tpNF\",\"type\":\"TTipoNFe\",\"kind\":\"enum\",\"ref\":\"TTipoNFe\",\"readonly\":false,\"declaredDefault\":\"tnSaida\"},{\"name\":\"tpNFCredito\",\"type\":\"TtpNFCredito\",\"kind\":\"enum\",\"ref\":\"TtpNFCredito\",\"readonly\":false},{\"name\":\"tpNFDebito\",\"type\":\"TtpNFDebito\",\"kind\":\"enum\",\"ref\":\"TtpNFDebito\",\"readonly\":false},{\"name\":\"verProc\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xJust\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TII\":{\"name\":\"TII\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vBc\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vDespAdu\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vII\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vIOF\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TImposto\":{\"name\":\"TImposto\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"COFINS\",\"type\":\"TCOFINS\",\"kind\":\"object\",\"ref\":\"TCOFINS\",\"readonly\":false},{\"name\":\"COFINSST\",\"type\":\"TCOFINSST\",\"kind\":\"object\",\"ref\":\"TCOFINSST\",\"readonly\":false},{\"name\":\"IBSCBS\",\"type\":\"TIBSCBS\",\"kind\":\"object\",\"ref\":\"TIBSCBS\",\"readonly\":false},{\"name\":\"ICMS\",\"type\":\"TICMS\",\"kind\":\"object\",\"ref\":\"TICMS\",\"readonly\":false},{\"name\":\"ICMSUFDest\",\"type\":\"TICMSUFDest\",\"kind\":\"object\",\"ref\":\"TICMSUFDest\",\"readonly\":false},{\"name\":\"II\",\"type\":\"TII\",\"kind\":\"object\",\"ref\":\"TII\",\"readonly\":false},{\"name\":\"IPI\",\"type\":\"TIPI\",\"kind\":\"object\",\"ref\":\"TIPI\",\"readonly\":false},{\"name\":\"ISel\",\"type\":\"TgIS\",\"kind\":\"object\",\"ref\":\"TgIS\",\"readonly\":false},{\"name\":\"ISSQN\",\"type\":\"TISSQN\",\"kind\":\"object\",\"ref\":\"TISSQN\",\"readonly\":false},{\"name\":\"PIS\",\"type\":\"TPIS\",\"kind\":\"object\",\"ref\":\"TPIS\",\"readonly\":false},{\"name\":\"PISST\",\"type\":\"TPISST\",\"kind\":\"object\",\"ref\":\"TPISST\",\"readonly\":false},{\"name\":\"vTotTrib\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TIndicadorEx\":{\"name\":\"TIndicadorEx\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"tieNenhum\",\"tieSim\",\"tieNao\"]},\"TindIEDest\":{\"name\":\"TindIEDest\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"inContribuinte\",\"inIsento\",\"inNaoContribuinte\"]},\"TindImport\":{\"name\":\"TindImport\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"iiNacional\",\"iiImportado\"]},\"TindIncentivo\":{\"name\":\"TindIncentivo\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"iiSim\",\"iiNao\"]},\"TindIntermed\":{\"name\":\"TindIntermed\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"iiSemOperacao\",\"iiOperacaoSemIntermediador\",\"iiOperacaoComIntermediador\"]},\"TIndSomaCOFINSST\":{\"name\":\"TIndSomaCOFINSST\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"iscNenhum\",\"iscCOFINSSTNaoCompoe\",\"iscCOFINSSTCompoe\"]},\"TIndSomaPISST\":{\"name\":\"TIndSomaPISST\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"ispNenhum\",\"ispPISSTNaoCompoe\",\"ispPISSTCompoe\"]},\"TInfAdic\":{\"name\":\"TInfAdic\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"infAdFisco\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"infCpl\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"obsCont\",\"type\":\"TobsContCollection\",\"kind\":\"list\",\"ref\":\"TobsContCollection\",\"readonly\":false},{\"name\":\"obsFisco\",\"type\":\"TobsFiscoCollection\",\"kind\":\"list\",\"ref\":\"TobsFiscoCollection\",\"readonly\":false},{\"name\":\"procRef\",\"type\":\"TprocRefCollection\",\"kind\":\"list\",\"ref\":\"TprocRefCollection\",\"readonly\":false}]},\"TinfIntermed\":{\"name\":\"TinfIntermed\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CNPJ\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"idCadIntTran\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TinfNFe\":{\"name\":\"TinfNFe\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"ID\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"Versao\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TinfNFeSupl\":{\"name\":\"TinfNFeSupl\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"qrCode\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"urlChave\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TinfPAA\":{\"name\":\"TinfPAA\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CNPJPAA\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"Exponent\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"Modulus\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"SignatureValue\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TinfRespTec\":{\"name\":\"TinfRespTec\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CNPJ\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"email\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"fone\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"hashCSRT\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"idCSRT\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"xContato\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TIPI\":{\"name\":\"TIPI\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cEnq\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"clEnq\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CNPJProd\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cSelo\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CST\",\"type\":\"TpcnCstIpi\",\"kind\":\"enum\",\"ref\":\"TpcnCstIpi\",\"readonly\":false,\"declaredDefault\":\"ipi00\"},{\"name\":\"pIPI\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qSelo\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"qUnid\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vIPI\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vUnid\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TISSQN\":{\"name\":\"TISSQN\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cListServ\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cMun\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cMunFG\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cPais\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cServico\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cSitTrib\",\"type\":\"TpcnISSQNcSitTrib\",\"kind\":\"enum\",\"ref\":\"TpcnISSQNcSitTrib\",\"readonly\":false,\"declaredDefault\":\"ISSQNcSitTribVazio\"},{\"name\":\"indIncentivo\",\"type\":\"TindIncentivo\",\"kind\":\"enum\",\"ref\":\"TindIncentivo\",\"readonly\":false},{\"name\":\"indISS\",\"type\":\"TpcnindISS\",\"kind\":\"enum\",\"ref\":\"TpcnindISS\",\"readonly\":false},{\"name\":\"indISSRet\",\"type\":\"TpcnindISSRet\",\"kind\":\"enum\",\"ref\":\"TpcnindISSRet\",\"readonly\":false},{\"name\":\"nProcesso\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vAliq\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vDeducao\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vDescCond\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vDescIncond\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vISSQN\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vISSRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vOutro\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TISSQNtot\":{\"name\":\"TISSQNtot\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cRegTrib\",\"type\":\"TRegTribISSQN\",\"kind\":\"enum\",\"ref\":\"TRegTribISSQN\",\"readonly\":false},{\"name\":\"dCompet\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"vBC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vCOFINS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vDeducao\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vDescCond\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vDescIncond\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vISS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vISSRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vOutro\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vPIS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vServ\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TISTot\":{\"name\":\"TISTot\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vIS\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TLacresCollection\":{\"name\":\"TLacresCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TLacresCollectionItem\",\"factory\":\"New\"},\"TLacresCollectionItem\":{\"name\":\"TLacresCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"nLacre\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TMedCollection\":{\"name\":\"TMedCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TMedCollectionItem\",\"factory\":\"New\"},\"TMedCollectionItem\":{\"name\":\"TMedCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cProdANVISA\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"dFab\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"dVal\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"nLote\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"qLote\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vPMC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"xMotivoIsencao\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TmotRedAdRem\":{\"name\":\"TmotRedAdRem\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"motTranspColetivo\",\"motOutros\"]},\"TNFe\":{\"name\":\"TNFe\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"agropecuario\",\"type\":\"Tagropecuario\",\"kind\":\"object\",\"ref\":\"Tagropecuario\",\"readonly\":false},{\"name\":\"autXML\",\"type\":\"TautXMLCollection\",\"kind\":\"list\",\"ref\":\"TautXMLCollection\",\"readonly\":false},{\"name\":\"Avulsa\",\"type\":\"TAvulsa\",\"kind\":\"object\",\"ref\":\"TAvulsa\",\"readonly\":false},{\"name\":\"cana\",\"type\":\"Tcana\",\"kind\":\"object\",\"ref\":\"Tcana\",\"readonly\":false},{\"name\":\"Cobr\",\"type\":\"TCobr\",\"kind\":\"object\",\"ref\":\"TCobr\",\"readonly\":false},{\"name\":\"compra\",\"type\":\"Tcompra\",\"kind\":\"object\",\"ref\":\"TCompra\",\"readonly\":false},{\"name\":\"Dest\",\"type\":\"TDest\",\"kind\":\"object\",\"ref\":\"TDest\",\"readonly\":false},{\"name\":\"Det\",\"type\":\"TDetCollection\",\"kind\":\"list\",\"ref\":\"TDetCollection\",\"readonly\":false},{\"name\":\"Emit\",\"type\":\"TEmit\",\"kind\":\"object\",\"ref\":\"TEmit\",\"readonly\":false},{\"name\":\"Entrega\",\"type\":\"TEntrega\",\"kind\":\"object\",\"ref\":\"TEntrega\",\"readonly\":false},{\"name\":\"exporta\",\"type\":\"Texporta\",\"kind\":\"object\",\"ref\":\"TExporta\",\"readonly\":false},{\"name\":\"Ide\",\"type\":\"TIde\",\"kind\":\"object\",\"ref\":\"TIde\",\"readonly\":false},{\"name\":\"InfAdic\",\"type\":\"TInfAdic\",\"kind\":\"object\",\"ref\":\"TInfAdic\",\"readonly\":false},{\"name\":\"infIntermed\",\"type\":\"TinfIntermed\",\"kind\":\"object\",\"ref\":\"TinfIntermed\",\"readonly\":false},{\"name\":\"infNFe\",\"type\":\"TinfNFe\",\"kind\":\"object\",\"ref\":\"TinfNFe\",\"readonly\":false},{\"name\":\"infNFeSupl\",\"type\":\"TinfNFeSupl\",\"kind\":\"object\",\"ref\":\"TinfNFeSupl\",\"readonly\":true},{\"name\":\"infPAA\",\"type\":\"TinfPAA\",\"kind\":\"object\",\"ref\":\"TinfPAA\",\"readonly\":false},{\"name\":\"infRespTec\",\"type\":\"TinfRespTec\",\"kind\":\"object\",\"ref\":\"TinfRespTec\",\"readonly\":false},{\"name\":\"pag\",\"type\":\"TpagCollection\",\"kind\":\"list\",\"ref\":\"TpagCollection\",\"readonly\":false},{\"name\":\"procNFe\",\"type\":\"TProcDFe\",\"kind\":\"object\",\"ref\":\"TProcDFe\",\"readonly\":true},{\"name\":\"Retirada\",\"type\":\"TRetirada\",\"kind\":\"object\",\"ref\":\"TRetirada\",\"readonly\":false},{\"name\":\"signature\",\"type\":\"Tsignature\",\"kind\":\"object\",\"ref\":\"TSignature\",\"readonly\":true},{\"name\":\"Total\",\"type\":\"TTotal\",\"kind\":\"object\",\"ref\":\"TTotal\",\"readonly\":false},{\"name\":\"Transp\",\"type\":\"TTransp\",\"kind\":\"object\",\"ref\":\"TTransp\",\"readonly\":false}]},\"TNFrefCollection\":{\"name\":\"TNFrefCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TNFrefCollectionItem\",\"factory\":\"New\"},\"TNFrefCollectionItem\":{\"name\":\"TNFrefCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"refCTe\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"RefECF\",\"type\":\"TRefECF\",\"kind\":\"object\",\"ref\":\"TRefECF\",\"readonly\":false},{\"name\":\"RefNF\",\"type\":\"TRefNF\",\"kind\":\"object\",\"ref\":\"TRefNF\",\"readonly\":false},{\"name\":\"refNFe\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"refNFeSig\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"RefNFP\",\"type\":\"TRefNFP\",\"kind\":\"object\",\"ref\":\"TRefNFP\",\"readonly\":false}]},\"TNVECollection\":{\"name\":\"TNVECollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TNVECollectionItem\",\"factory\":\"New\"},\"TNVECollectionItem\":{\"name\":\"TNVECollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"NVE\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TobsContCollection\":{\"name\":\"TobsContCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TobsContCollectionItem\",\"factory\":\"New\"},\"TobsContCollectionItem\":{\"name\":\"TobsContCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"xCampo\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xTexto\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TobsFiscoCollection\":{\"name\":\"TobsFiscoCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TobsFiscoCollectionItem\",\"factory\":\"New\"},\"TobsFiscoCollectionItem\":{\"name\":\"TobsFiscoCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"xCampo\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xTexto\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TobsItem\":{\"name\":\"TobsItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"xCampo\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xTexto\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TorigCombCollection\":{\"name\":\"TorigCombCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TorigCombCollectionItem\",\"factory\":\"New\"},\"TorigCombCollectionItem\":{\"name\":\"TorigCombCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cUFOrig\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"indImport\",\"type\":\"TindImport\",\"kind\":\"enum\",\"ref\":\"TindImport\",\"readonly\":false},{\"name\":\"pOrig\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TOrigemMercadoria\":{\"name\":\"TOrigemMercadoria\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"oeNacional\",\"oeEstrangeiraImportacaoDireta\",\"oeEstrangeiraAdquiridaBrasil\",\"oeNacionalConteudoImportacaoSuperior40\",\"oeNacionalProcessosBasicos\",\"oeNacionalConteudoImportacaoInferiorIgual40\",\"oeEstrangeiraImportacaoDiretaSemSimilar\",\"oeEstrangeiraAdquiridaBrasilSemSimilar\",\"oeNacionalConteudoImportacaoSuperior70\",\"oeReservadoParaUsoFuturo\",\"oeVazio\"]},\"TpagCollection\":{\"name\":\"TpagCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TpagCollectionItem\",\"factory\":\"New\"},\"TpagCollectionItem\":{\"name\":\"TpagCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cAut\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CNPJ\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CNPJPag\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CNPJReceb\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"dPag\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"idTermPag\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"indPag\",\"type\":\"TpcnIndicadorPagamento\",\"kind\":\"enum\",\"ref\":\"TpcnIndicadorPagamento\",\"readonly\":false,\"declaredDefault\":\"ipNenhum\"},{\"name\":\"tBand\",\"type\":\"TpcnBandeiraCartao\",\"kind\":\"enum\",\"ref\":\"TpcnBandeiraCartao\",\"readonly\":false},{\"name\":\"tPag\",\"type\":\"TpcnFormaPagamento\",\"kind\":\"enum\",\"ref\":\"TpcnFormaPagamento\",\"readonly\":false},{\"name\":\"tpIntegra\",\"type\":\"TtpIntegra\",\"kind\":\"enum\",\"ref\":\"TtpIntegra\",\"readonly\":false},{\"name\":\"UFPag\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vPag\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"xPag\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TpcnBandeiraCartao\":{\"name\":\"TpcnBandeiraCartao\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"bcVisa\",\"bcMasterCard\",\"bcAmericanExpress\",\"bcSorocred\",\"bcDinersClub\",\"bcElo\",\"bcHipercard\",\"bcAura\",\"bcCabal\",\"bcAlelo\",\"bcBanesCard\",\"bcCalCard\",\"bcCredz\",\"bcDiscover\",\"bcGoodCard\",\"bcGreenCard\",\"bcHiper\",\"bcJcB\",\"bcMais\",\"bcMaxVan\",\"bcPolicard\",\"bcRedeCompras\",\"bcSodexo\",\"bcValeCard\",\"bcVerocheque\",\"bcVR\",\"bcTicket\",\"bcOutros\"]},\"TpcnCondicaoVeiculo\":{\"name\":\"TpcnCondicaoVeiculo\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"cvAcabado\",\"cvInacabado\",\"cvSemiAcabado\"]},\"TpcnConsumidorFinal\":{\"name\":\"TpcnConsumidorFinal\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"cfNao\",\"cfConsumidorFinal\"]},\"TpcnCRT\":{\"name\":\"TpcnCRT\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"crtSimplesNacional\",\"crtSimplesExcessoReceita\",\"crtRegimeNormal\",\"crtMEI\"]},\"TpcnCstIpi\":{\"name\":\"TpcnCstIpi\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"ipi00\",\"ipi49\",\"ipi50\",\"ipi99\",\"ipi01\",\"ipi02\",\"ipi03\",\"ipi04\",\"ipi05\",\"ipi51\",\"ipi52\",\"ipi53\",\"ipi54\",\"ipi55\"]},\"TpcnDestinoOperacao\":{\"name\":\"TpcnDestinoOperacao\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"doInterna\",\"doInterestadual\",\"doExterior\"]},\"TpcnDeterminacaoBaseIcms\":{\"name\":\"TpcnDeterminacaoBaseIcms\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"dbiMargemValorAgregado\",\"dbiPauta\",\"dbiPrecoTabelado\",\"dbiValorOperacao\",\"dbiNenhum\"]},\"TpcnDeterminacaoBaseIcmsST\":{\"name\":\"TpcnDeterminacaoBaseIcmsST\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"dbisPrecoTabelado\",\"dbisListaNegativa\",\"dbisListaPositiva\",\"dbisListaNeutra\",\"dbisMargemValorAgregado\",\"dbisPauta\",\"dbisValordaOperacao\"]},\"TpcnECFModRef\":{\"name\":\"TpcnECFModRef\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"ECFModRefVazio\",\"ECFModRef2B\",\"ECFModRef2C\",\"ECFModRef2D\"]},\"TpcnFinalidadeNFe\":{\"name\":\"TpcnFinalidadeNFe\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"fnNormal\",\"fnComplementar\",\"fnAjuste\",\"fnDevolucao\",\"fnCredito\",\"fnDebito\"]},\"TpcnFormaPagamento\":{\"name\":\"TpcnFormaPagamento\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"fpDinheiro\",\"fpCheque\",\"fpCartaoCredito\",\"fpCartaoDebito\",\"fpCreditoLoja\",\"fpValeAlimentacao\",\"fpValeRefeicao\",\"fpValePresente\",\"fpValeCombustivel\",\"fpDuplicataMercantil\",\"fpBoletoBancario\",\"fpDepositoBancario\",\"fpPagamentoInstantaneo\",\"fpTransfBancario\",\"fpProgramaFidelidade\",\"fpSemPagamento\",\"fpRegimeEspecial\",\"fpOutro\",\"fpPagamentoInstantaneoEstatico\",\"fpCreditoEmLojaPorDevolucao\",\"fpFalhaHardware\",\"fpPagamentoPosterior\",\"fpPagInstantaneoPIXAutomatico\",\"fpTEFBookTransfer\"]},\"TpcnIndEscala\":{\"name\":\"TpcnIndEscala\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"ieRelevante\",\"ieNaoRelevante\",\"ieNenhum\"]},\"TpcnIndicadorPagamento\":{\"name\":\"TpcnIndicadorPagamento\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"ipVista\",\"ipPrazo\",\"ipOutras\",\"ipNenhum\"]},\"TpcnIndicadorProcesso\":{\"name\":\"TpcnIndicadorProcesso\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"ipSEFAZ\",\"ipJusticaFederal\",\"ipJusticaEstadual\",\"ipSecexRFB\",\"ipCONFAZ\",\"ipOutros\"]},\"TpcnIndicadorTotal\":{\"name\":\"TpcnIndicadorTotal\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"itSomaTotalNFe\",\"itNaoSomaTotalNFe\"]},\"TpcnindISS\":{\"name\":\"TpcnindISS\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"iiExigivel\",\"iiNaoIncidencia\",\"iiIsencao\",\"iiExportacao\",\"iiImunidade\",\"iiExigSuspDecisaoJudicial\",\"iiExigSuspProcessoAdm\"]},\"TpcnindISSRet\":{\"name\":\"TpcnindISSRet\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"iirSim\",\"iirNao\"]},\"TpcnISSQNcSitTrib\":{\"name\":\"TpcnISSQNcSitTrib\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"ISSQNcSitTribVazio\",\"ISSQNcSitTribNORMAL\",\"ISSQNcSitTribRETIDA\",\"ISSQNcSitTribSUBSTITUTA\",\"ISSQNcSitTribISENTA\"]},\"TpcnModalidadeFrete\":{\"name\":\"TpcnModalidadeFrete\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"mfContaEmitente\",\"mfContaDestinatario\",\"mfContaTerceiros\",\"mfProprioRemetente\",\"mfProprioDestinatario\",\"mfSemFrete\"]},\"TpcnMotivoDesoneracaoICMS\":{\"name\":\"TpcnMotivoDesoneracaoICMS\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"mdiTaxi\",\"mdiDeficienteFisico\",\"mdiProdutorAgropecuario\",\"mdiFrotistaLocadora\",\"mdiDiplomaticoConsular\",\"mdiAmazoniaLivreComercio\",\"mdiSuframa\",\"mdiVendaOrgaosPublicos\",\"mdiOutros\",\"mdiDeficienteCondutor\",\"mdiDeficienteNaoCondutor\",\"mdiOrgaoFomento\",\"mdiOlimpiadaRio2016\",\"mdiSolicitadoFisco\"]},\"TpcnPresencaComprador\":{\"name\":\"TpcnPresencaComprador\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"pcNao\",\"pcPresencial\",\"pcInternet\",\"pcTeleatendimento\",\"pcEntregaDomicilio\",\"pcPresencialForaEstabelecimento\",\"pcOutros\"]},\"TpcnTipoArma\":{\"name\":\"TpcnTipoArma\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"taUsoPermitido\",\"taUsoRestrito\"]},\"TpcnTipoIntermedio\":{\"name\":\"TpcnTipoIntermedio\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"tiContaPropria\",\"tiContaOrdem\",\"tiEncomenda\"]},\"TpcnTipoOperacao\":{\"name\":\"TpcnTipoOperacao\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"toVendaConcessionaria\",\"toFaturamentoDireto\",\"toVendaDireta\",\"toOutros\"]},\"TpcnTipoViaTransp\":{\"name\":\"TpcnTipoViaTransp\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"tvMaritima\",\"tvFluvial\",\"tvLacustre\",\"tvAerea\",\"tvPostal\",\"tvFerroviaria\",\"tvRodoviaria\",\"tvConduto\",\"tvMeiosProprios\",\"tvEntradaSaidaFicta\",\"tvCourier\",\"tvEmMaos\",\"tvPorReboque\"]},\"TPIS\":{\"name\":\"TPIS\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CST\",\"type\":\"TCstPis\",\"kind\":\"enum\",\"ref\":\"TCSTPis\",\"readonly\":false,\"declaredDefault\":\"pis01\"},{\"name\":\"pPIS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vAliqProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBC\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vPIS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TPISST\":{\"name\":\"TPISST\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"indSomaPISST\",\"type\":\"TIndSomaPISST\",\"kind\":\"enum\",\"ref\":\"TIndSomaPISST\",\"readonly\":false},{\"name\":\"pPis\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qBCProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vAliqProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBc\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vPIS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TProcDFe\":{\"name\":\"TProcDFe\",\"unit\":\"ACBrDFeComum.Proc\",\"kind\":\"object\",\"properties\":[{\"name\":\"chDFe\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cMsg\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cStat\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"dhRecbto\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"digVal\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"Id\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nProt\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"PathDFe\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"PathRetConsReciDFe\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"PathRetConsSitDFe\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"tpAmb\",\"type\":\"TACBrTipoAmbiente\",\"kind\":\"enum\",\"ref\":\"TACBrTipoAmbiente\",\"readonly\":false},{\"name\":\"verAplic\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"XML_DFe\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"XML_prot\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xMotivo\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xMsg\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TprocRefCollection\":{\"name\":\"TprocRefCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TprocRefCollectionItem\",\"factory\":\"New\"},\"TprocRefCollectionItem\":{\"name\":\"TprocRefCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"indProc\",\"type\":\"TpcnIndicadorProcesso\",\"kind\":\"enum\",\"ref\":\"TpcnIndicadorProcesso\",\"readonly\":false,\"declaredDefault\":\"ipSEFAZ\"},{\"name\":\"nProc\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"tpAto\",\"type\":\"TtpAto\",\"kind\":\"enum\",\"ref\":\"TtpAto\",\"readonly\":false}]},\"TProd\":{\"name\":\"TProd\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"arma\",\"type\":\"TarmaCollection\",\"kind\":\"list\",\"ref\":\"TArmaCollection\",\"readonly\":false},{\"name\":\"cBarra\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cBarraTrib\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cBenef\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cEAN\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cEANTrib\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CEST\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CFOP\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CNPJFab\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"comb\",\"type\":\"TComb\",\"kind\":\"object\",\"ref\":\"TComb\",\"readonly\":false},{\"name\":\"cProd\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CredPresumido\",\"type\":\"TCredPresumidoCollection\",\"kind\":\"list\",\"ref\":\"TCredPresumidoCollection\",\"readonly\":false},{\"name\":\"detExport\",\"type\":\"TdetExportCollection\",\"kind\":\"list\",\"ref\":\"TdetExportCollection\",\"readonly\":false},{\"name\":\"DI\",\"type\":\"TDICollection\",\"kind\":\"list\",\"ref\":\"TDICollection\",\"readonly\":false},{\"name\":\"EXTIPI\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"indBemMovelUsado\",\"type\":\"TIndicadorEx\",\"kind\":\"enum\",\"ref\":\"TIndicadorEx\",\"readonly\":false,\"declaredDefault\":\"tieNenhum\"},{\"name\":\"indEscala\",\"type\":\"TpcnIndEscala\",\"kind\":\"enum\",\"ref\":\"TpcnIndEscala\",\"readonly\":false,\"declaredDefault\":\"ieNenhum\"},{\"name\":\"IndTot\",\"type\":\"TpcnIndicadorTotal\",\"kind\":\"enum\",\"ref\":\"TpcnIndicadorTotal\",\"readonly\":false,\"declaredDefault\":\"itSomaTotalNFe\"},{\"name\":\"med\",\"type\":\"TMedCollection\",\"kind\":\"list\",\"ref\":\"TMedCollection\",\"readonly\":false},{\"name\":\"NCM\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nFCI\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nItem\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"nItemPed\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nRECOPI\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"NVE\",\"type\":\"TNVECollection\",\"kind\":\"list\",\"ref\":\"TNVECollection\",\"readonly\":false},{\"name\":\"qCom\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qTrib\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"rastro\",\"type\":\"TRastroCollection\",\"kind\":\"list\",\"ref\":\"TRastroCollection\",\"readonly\":false},{\"name\":\"tpCredPresIBSZFM\",\"type\":\"TtpCredPresIBSZFM\",\"kind\":\"enum\",\"ref\":\"TTpCredPresIBSZFM\",\"readonly\":false},{\"name\":\"uCom\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"uTrib\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"vDesc\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"veicProd\",\"type\":\"TveicProd\",\"kind\":\"object\",\"ref\":\"TveicProd\",\"readonly\":false},{\"name\":\"vFrete\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vOutro\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vProd\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vSeg\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vUnCom\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"vUnTrib\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false},{\"name\":\"xPed\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xProd\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TRastroCollection\":{\"name\":\"TRastroCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TRastroCollectionItem\",\"factory\":\"New\"},\"TRastroCollectionItem\":{\"name\":\"TRastroCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"cAgreg\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"dFab\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"dVal\",\"type\":\"TDateTime\",\"kind\":\"datetime\",\"readonly\":false},{\"name\":\"nLote\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"qLote\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TReboqueCollection\":{\"name\":\"TReboqueCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TReboqueCollectionItem\",\"factory\":\"New\"},\"TReboqueCollectionItem\":{\"name\":\"TReboqueCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"placa\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"RNTC\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TrefDFePagAntCollection\":{\"name\":\"TrefDFePagAntCollection\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"list\",\"item\":\"TrefDFePagAntCollectionItem\",\"factory\":\"New\"},\"TrefDFePagAntCollectionItem\":{\"name\":\"TrefDFePagAntCollectionItem\",\"unit\":\"ACBrDFe.RTC.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"refDFEChave\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TRefECF\":{\"name\":\"TRefECF\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"modelo\",\"type\":\"TpcnECFModRef\",\"kind\":\"enum\",\"ref\":\"TpcnECFModRef\",\"readonly\":false,\"declaredDefault\":\"ECFModRefVazio\"},{\"name\":\"nCOO\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nECF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TRefNF\":{\"name\":\"TRefNF\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"AAMM\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CNPJ\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cUF\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"modelo\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"nNF\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"serie\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false}]},\"TRefNFP\":{\"name\":\"TRefNFP\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"AAMM\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CNPJCPF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cUF\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"IE\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"modelo\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nNF\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"serie\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false}]},\"TRegTribISSQN\":{\"name\":\"TRegTribISSQN\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"RTISSMicroempresaMunicipal\",\"RTISSEstimativa\",\"RTISSSociedadeProfissionais\",\"RTISSCooperativa\",\"RTISSMEI\",\"RTISSMEEPP\",\"RTISSNenhum\"]},\"TRetirada\":{\"name\":\"TRetirada\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CEP\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cMun\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"CNPJCPF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cPais\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"Email\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"fone\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"IE\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xBairro\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xCpl\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xLgr\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xMun\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xNome\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xPais\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TretTransp\":{\"name\":\"TretTransp\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CFOP\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cMunFG\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"pICMSRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vICMSRet\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vServ\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TretTrib\":{\"name\":\"TretTrib\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"vBCIRRF\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vBCRetPrev\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vIRRF\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vRetCOFINS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vRetCSLL\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vRetPIS\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"vRetPrev\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false}]},\"TSignature\":{\"name\":\"TSignature\",\"unit\":\"ACBrXmlBase\",\"kind\":\"object\",\"properties\":[{\"name\":\"DigestValue\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"IdSignature\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"IdSignatureValue\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"SignatureValue\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"URI\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"X509Certificate\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TTipoNFe\":{\"name\":\"TTipoNFe\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"tnEntrada\",\"tnSaida\"]},\"TTotal\":{\"name\":\"TTotal\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"IBSCBSTot\",\"type\":\"TIBSCBSTot\",\"kind\":\"object\",\"ref\":\"TIBSCBSTot\",\"readonly\":false},{\"name\":\"ICMSTot\",\"type\":\"TICMSTot\",\"kind\":\"object\",\"ref\":\"TICMSTot\",\"readonly\":false},{\"name\":\"ISSQNtot\",\"type\":\"TISSQNtot\",\"kind\":\"object\",\"ref\":\"TISSQNtot\",\"readonly\":false},{\"name\":\"ISTot\",\"type\":\"TISTot\",\"kind\":\"object\",\"ref\":\"TISTot\",\"readonly\":false},{\"name\":\"retTrib\",\"type\":\"TretTrib\",\"kind\":\"object\",\"ref\":\"TretTrib\",\"readonly\":false},{\"name\":\"vNFTot\",\"type\":\"Double\",\"kind\":\"decimal\",\"readonly\":false}]},\"TtpALCZFMCBS\":{\"name\":\"TtpALCZFMCBS\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"tpALCZFMCBSnOpInd\",\"tpALCZFMCBSOpInd\"]},\"TtpAto\":{\"name\":\"TtpAto\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"taNenhum\",\"taTermoAcordo\",\"taRegimeEspecial\",\"taAutorizacaoEspecifica\",\"taAjusteSNIEF\",\"taConvenioICMS\"]},\"TTpCredPresIBSZFM\":{\"name\":\"TTpCredPresIBSZFM\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"tcpNenhum\",\"tcpSemCredito\",\"tcpBensConsumoFinal\",\"tcpBensCapital\",\"tcpBensIntermediarios\",\"tcpBensInformaticaOutros\"]},\"TtpEnteGov\":{\"name\":\"TtpEnteGov\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"tcgNenhum\",\"tcgUniao\",\"tcgEstados\",\"tcgDistritoFederal\",\"tcgMunicipios\",\"tcgConsorcioPublico\",\"tcgComiteGestorIBS\"]},\"TtpGuia\":{\"name\":\"TtpGuia\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"tpgNenhum\",\"tpgGTA\",\"tpgTTA\",\"tpgDTA\",\"tpgATV\",\"tpgPTV\",\"tpgGTV\",\"tpgGuiaFlorestal\"]},\"TtpIntegra\":{\"name\":\"TtpIntegra\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"tiNaoInformado\",\"tiPagIntegrado\",\"tiPagNaoIntegrado\"]},\"TtpNFCredito\":{\"name\":\"TtpNFCredito\",\"unit\":\"pcnConversaoNFe\",\"kind\":\"enum\",\"values\":[\"tcNenhum\",\"tcMultaJuros\",\"tcApropriacaoCreditoPresumido\",\"tcRetorno\",\"tcReducaoValores\",\"tcTransferenciaCreditoSucessao\",\"tcRetornoRecusaParcial\"]},\"TtpNFDebito\":{\"name\":\"TtpNFDebito\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"tdNenhum\",\"tdTransferenciaCreditoCooperativa\",\"tdAnulacao\",\"tdDebitosNaoProcessadas\",\"tdMultaJuros\",\"tdTransferenciaCreditoSucessao\",\"tdPagamentoAntecipado\",\"tdPerdaEmEstoque\",\"tdDesenquadramentodoSN\"]},\"TtpOperGov\":{\"name\":\"TtpOperGov\",\"unit\":\"ACBrDFe.Conversao\",\"kind\":\"enum\",\"values\":[\"togNenhum\",\"togFornecimento\",\"togRecebimentoPag\",\"togFornecimentoPagRealizado\",\"togRecebimentoPagFornecPosterior\"]},\"TTransp\":{\"name\":\"TTransp\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"balsa\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"modFrete\",\"type\":\"TpcnModalidadeFrete\",\"kind\":\"enum\",\"ref\":\"TpcnModalidadeFrete\",\"readonly\":false},{\"name\":\"Reboque\",\"type\":\"TReboqueCollection\",\"kind\":\"list\",\"ref\":\"TReboqueCollection\",\"readonly\":false},{\"name\":\"retTransp\",\"type\":\"TretTransp\",\"kind\":\"object\",\"ref\":\"TretTransp\",\"readonly\":false},{\"name\":\"Transporta\",\"type\":\"TTransporta\",\"kind\":\"object\",\"ref\":\"TTransporta\",\"readonly\":false},{\"name\":\"vagao\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"veicTransp\",\"type\":\"TveicTransp\",\"kind\":\"object\",\"ref\":\"TveicTransp\",\"readonly\":false},{\"name\":\"Vol\",\"type\":\"TVolCollection\",\"kind\":\"list\",\"ref\":\"TVolCollection\",\"readonly\":false}]},\"TTransporta\":{\"name\":\"TTransporta\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"CNPJCPF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"IE\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xEnder\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xMun\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xNome\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TveicProd\":{\"name\":\"TveicProd\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"anoFab\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"anoMod\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"cCor\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cCorDENATRAN\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"chassi\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"Cilin\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"cMod\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CMT\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"CombDescricao\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":true},{\"name\":\"condVeic\",\"type\":\"TpcnCondicaoVeiculo\",\"kind\":\"enum\",\"ref\":\"TpcnCondicaoVeiculo\",\"readonly\":false},{\"name\":\"dist\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"espVeic\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"lota\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"nMotor\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nSerie\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"pesoB\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"pesoL\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"pot\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"tpComb\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"tpOP\",\"type\":\"TpcnTipoOperacao\",\"kind\":\"enum\",\"ref\":\"TpcnTipoOperacao\",\"readonly\":false},{\"name\":\"tpPint\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"tpRest\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"tpVeic\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false},{\"name\":\"VIN\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"xCor\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TveicTransp\":{\"name\":\"TveicTransp\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"placa\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"RNTC\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"UF\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false}]},\"TVolCollection\":{\"name\":\"TVolCollection\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"list\",\"item\":\"TVolCollectionItem\",\"factory\":\"New\"},\"TVolCollectionItem\":{\"name\":\"TVolCollectionItem\",\"unit\":\"ACBrNFe.Classes\",\"kind\":\"object\",\"properties\":[{\"name\":\"esp\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"Lacres\",\"type\":\"TLacresCollection\",\"kind\":\"list\",\"ref\":\"TLacresCollection\",\"readonly\":false},{\"name\":\"marca\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"nVol\",\"type\":\"string\",\"kind\":\"string\",\"readonly\":false},{\"name\":\"pesoB\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"pesoL\",\"type\":\"Currency\",\"kind\":\"decimal\",\"scale\":4,\"readonly\":false},{\"name\":\"qVol\",\"type\":\"Integer\",\"kind\":\"integer\",\"min\":-2147483648,\"max\":2147483647,\"readonly\":false}]}};\n\nexport type CodigoValidacaoModelo = 'MODELO_DESCONHECIDO'|'ENUM_INVALIDO'|'ARRAY_ESPERADO'|'OBJETO_ESPERADO'|'CAMPO_DESCONHECIDO'|'CAMPO_SOMENTE_LEITURA'|'INTEIRO_INVALIDO'|'BOOLEANO_ESPERADO'|'DECIMAL_INVALIDO'|'DATA_HORA_INVALIDA'|'DATA_INVALIDA'|'TEXTO_ESPERADO';\nfunction campoConhecido(at: unknown): string | undefined {\n if(typeof at!=='string'||at.length>512||! /^[A-Za-z_]\\w*(?:(?:\\.[A-Za-z_]\\w*)|(?:\\[\\d{1,7}\\]))*$/.test(at))return undefined;\n const parts=at.replace(/\\[(\\d+)\\]/g,'.$1').split('.');let schema=Object.hasOwn(MODEL_SCHEMA,parts[0])?MODEL_SCHEMA[parts[0]]:undefined;\n if(!schema)return undefined;\n for(const part of parts.slice(1)){\n if(schema.kind==='list'){if(! /^\\d+$/.test(part))return undefined;schema=MODEL_SCHEMA[schema.item];}\n else if(schema.kind==='object'){const p=schema.properties.find((p:any)=>p.name===part);if(!p)return undefined;schema=p.ref?MODEL_SCHEMA[p.ref]:{kind:p.kind};}\n else return undefined;\n }\n return at;\n}\n/** TypeError compat\u00EDvel, com contexto seguro e sem o valor informado ou chaves desconhecidas. */\nexport class ErroValidacaoModelo extends TypeError {\n readonly codigo: CodigoValidacaoModelo;\n readonly diagnostico: Readonly<{codigo:CodigoValidacaoModelo;etapa:'documento';campo?:string;mensagem:string;acao:string;statusEnvio:'nao_enviado';causa:Readonly<{codigo:CodigoValidacaoModelo;etapa:'documento';campo?:string}>}>;\n constructor(codigo: CodigoValidacaoModelo, at?: string) {\n const catalogo:Record<CodigoValidacaoModelo,[string,string]>={\n MODELO_DESCONHECIDO:['Modelo desconhecido.','Use um modelo exportado pelo cliente gerado.'],\n ENUM_INVALIDO:['enum inv\u00E1lido','Use um dos valores textuais do enum exportado pelo cliente.'],\n ARRAY_ESPERADO:['esperado array','Informe uma lista JSON entre colchetes.'],\n OBJETO_ESPERADO:['esperado objeto','Informe um objeto JSON entre chaves.'],\n CAMPO_DESCONHECIDO:['propriedade desconhecida','Confira os nomes permitidos neste grupo; a chave desconhecida n\u00E3o \u00E9 registrada.'],\n CAMPO_SOMENTE_LEITURA:['propriedade somente leitura','Remova este campo da entrada; o motor preenche seu resultado.'],\n INTEIRO_INVALIDO:['inteiro fora do intervalo','Informe um n\u00FAmero inteiro dentro do intervalo do campo.'],\n BOOLEANO_ESPERADO:['esperado boolean','Informe true ou false como valor JSON, sem aspas.'],\n DECIMAL_INVALIDO:['esperado decimal em string','Informe o decimal entre aspas, com ponto e a escala permitida pelo campo.'],\n DATA_HORA_INVALIDA:['esperado data/hora civil ISO (sem timezone)','Informe a data/hora civil da UF como AAAA-MM-DDTHH:mm:ss, sem Z ou offset. Confira a data antes do envio.'],\n DATA_INVALIDA:['data inv\u00E1lida','Confira dia, m\u00EAs, ano e hor\u00E1rio usando uma data civil v\u00E1lida.'],\n TEXTO_ESPERADO:['esperado string','Informe texto entre aspas no JSON.']\n };\n const safeCode=Object.hasOwn(catalogo,codigo)?codigo:'MODELO_DESCONHECIDO';\n const campo=campoConhecido(at),[texto,acao]=catalogo[safeCode],mensagem=(campo?campo+': ':'')+texto;\n super(mensagem);this.codigo=safeCode;\n const causa=Object.freeze({codigo:safeCode,etapa:'documento' as const,...(campo?{campo}:{})});\n this.diagnostico=Object.freeze({codigo:safeCode,etapa:'documento' as const,...(campo?{campo}:{}),mensagem,acao,statusEnvio:'nao_enviado' as const,causa});\n Object.defineProperty(this,'cause',{value:causa,enumerable:false});\n }\n toJSON(){return this.diagnostico;}\n}\nexport function validateModel(model: string, value: unknown, at=model): void {\n const schema=Object.hasOwn(MODEL_SCHEMA,model)?MODEL_SCHEMA[model]:undefined;\n if(!schema)throw new ErroValidacaoModelo('MODELO_DESCONHECIDO');\n at=campoConhecido(at)??model;\n if(schema.kind==='enum'){if(typeof value!=='string'||!schema.values.includes(value))throw new ErroValidacaoModelo('ENUM_INVALIDO',at);return;}\n if(schema.kind==='list'){if(!Array.isArray(value))throw new ErroValidacaoModelo('ARRAY_ESPERADO',at);value.forEach((item,index)=>validateModel(schema.item,item,at+'['+index+']'));return;}\n if(value===null||typeof value!=='object'||Array.isArray(value))throw new ErroValidacaoModelo('OBJETO_ESPERADO',at);\n const fields=new Map<string,any>(schema.properties.filter((p:any)=>!p.readonly).map((p:any)=>[p.name,p]));\n for(const [name,v] of Object.entries(value)){\n if(v===undefined)continue;\n const p=fields.get(name);\n if(!p){const readonly=schema.properties.some((p:any)=>p.name===name&&p.readonly);throw new ErroValidacaoModelo(readonly?'CAMPO_SOMENTE_LEITURA':'CAMPO_DESCONHECIDO',readonly?at+'.'+name:at);}\n const field=at+'.'+name;\n if(p.ref){validateModel(p.ref,v,field);continue;}\n if(p.kind==='integer'){if(typeof v!=='number'||!Number.isSafeInteger(v)||v<p.min||v>p.max)throw new ErroValidacaoModelo('INTEIRO_INVALIDO',field);}\n else if(p.kind==='boolean'){if(typeof v!=='boolean')throw new ErroValidacaoModelo('BOOLEANO_ESPERADO',field);}\n else if(p.kind==='decimal'){if(typeof v!=='string'||v.length>64||! /^-?\\d+(?:\\.\\d+)?$/.test(v)||p.scale!==undefined&&(v.split('.')[1]?.length??0)>p.scale)throw new ErroValidacaoModelo('DECIMAL_INVALIDO',field);}\n else if(p.kind==='datetime'){\n if(typeof v!=='string'||! /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?)?$/.test(v)||Number.isNaN(Date.parse(v+(v.length===10?'T00:00:00Z':'Z'))))throw new ErroValidacaoModelo('DATA_HORA_INVALIDA',field);\n const date=new Date(v+(v.length===10?'T00:00:00Z':'Z'));if(date.toISOString().slice(0,10)!==v.slice(0,10))throw new ErroValidacaoModelo('DATA_INVALIDA',field);\n }else if(typeof v!=='string')throw new ErroValidacaoModelo('TEXTO_ESPERADO',field);\n }\n}\nexport function validateTNFe(value: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;AACA,IAAI,mBAAmB,GAAG;AACxB,OAAK,EAAE,KAAK,UAAQ;AAAE,YAAQ,WAAW;AAAA,EAAM,CAAC;AAClD;",
|
|
6
|
+
"names": ["readFile", "revision", "path", "createHash", "access", "mkdir", "readdir", "readFile", "writeFile", "dirname", "resolve", "fail", "path", "hash", "revision", "exists", "copyFile", "mkdir", "readdir", "readFile", "rename", "rm", "stat", "access", "writeFile", "dirname", "join", "relative", "resolve", "sep", "randomUUID", "path", "name", "hash", "candidates", "createHash", "mkdir", "readFile", "writeFile", "readdir", "path", "fileURLToPath", "resolve", "node", "revision", "p", "access", "t", "spawn", "readFile", "stat", "path", "createHash", "randomUUID", "relative", "fail", "require", "hash", "execute", "resolve", "access", "resolve", "fileURLToPath", "node", "relative", "property", "fileURLToPath", "initializeConfig", "config", "loadConfig", "doctor", "access", "resolve", "updateSource", "lockExistingSource", "verifySource", "generateModel", "buildNative", "runtimeDirectory", "checkBuild", "checkOffline"]
|
|
7
7
|
}
|