nfets 0.0.15 → 0.0.16
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/build/Release/xml_validator.node +0 -0
- package/dist/{chunk-GMWKIB4E.mjs → chunk-H4DRLHOC.mjs} +51 -51
- package/dist/chunk-MOAUKJKC.mjs +7 -0
- package/dist/core/index.cjs +54 -54
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +62 -62
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +11 -11
- package/dist/nfe/index.d.cts +56 -3
- package/dist/nfe/index.d.ts +56 -3
- package/dist/nfe/index.mjs +1 -1
- package/package.json +4 -1
- package/dist/chunk-V2LFKSE4.mjs +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{b as kc,c as ef,d as tf}from"./chunk-3WPW27WV.mjs";import{a,e as Zc,f as Ia}from"./chunk-W6MRGYXP.mjs";var Fm=(function(t){return t.Normal="1",t.EPEC="4",t.SVCAN="6",t.SVCRS="7",t.OFFLINE="9",t})({});var zm=process.env.NFETS_NFE_SCHEMAS_DIR??"";var Ls=class{static{a(this,"AccessKeyBuilder")}compile(e){let o=e.cUF.toString().padStart(2,"0"),n=e.year.toString().padStart(2,"0"),i=e.month.toString().padStart(2,"0"),r=(e.identification??"").padStart(14,"0"),s=e.mod.toString().padStart(2,"0"),p=e.serie.toString().padStart(3,"0"),v=e.nNF.toString().padStart(9,"0"),u=e.tpEmis.toString().padStart(1,"0"),l=(e.cNF??this.code()).toString().padStart(8,"0"),g=`${o}${n}${i}${r}${s}${p}${v}${u}${l}`;return`${g}${this.verifyingDigit(g)}`}decompile(e){if(e.length!==44)return;let n=/^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{14})([0-9]{2})([0-9]{3})([0-9]{9})([0-9]{1})([0-9]{8})([0-9]{1})$/.exec(e);if(!n)return;let[i,r,s,p,v,u,l,g,S,R,y]=n;return{cUF:r,year:s,month:p,identification:v,mod:u,serie:l,nNF:g,tpEmis:S,cNF:R,vd:y}}code(){let e=Math.floor(Math.random()*1e8).toString().padStart(8,"0");return this.isCodeValid(e)?e:this.code()}isCodeValid(e){return!~["00000000","11111111","22222222","33333333","44444444","55555555","66666666","77777777","88888888","99999999","12345678","23456789","34567890","45678901","56789012","67890123","78901234","89012345","90123456","01234567"].indexOf(e)}verifyingDigit(e){let o=[2,3,4,5,6,7,8,9],n=42,i=0;for(;n>=0;)for(let s=0;s<8&&n>=0;s++){let p=parseInt(e[n]);i+=p*o[s],n--}let r=11-i%11;return r>9?0:r}};import{Decimal as en}from"@nfets/core/infrastructure";var Bs=class{static{a(this,"DefaultDetBuilderAggregator")}builder;constructor(e){this.builder=e}prod(e){let o=en.from(0);this.builder.increment(({ICMSTot:n})=>({ICMSTot:{vProd:en.newOrZero(n?.vProd).add(e.vProd).toFixed(2),vFrete:en.newOrZero(n?.vFrete).add(e.vFrete??o).toFixed(2),vSeg:en.newOrZero(n?.vSeg).add(e.vSeg??o).toFixed(2),vDesc:en.newOrZero(n?.vDesc).add(e.vDesc??o).toFixed(2),vOutro:en.newOrZero(n?.vOutro).add(e.vOutro??o).toFixed(2)}}))}icms(e){}};import{Decimal as Us}from"@nfets/core/infrastructure";var qs=class{static{a(this,"DefaultTotalBuilderAggregator")}builder;constructor(e){this.builder=e}aggregate(){let e=Us.from(0);this.builder.increment(({ICMSTot:o,ISSQNtot:n})=>({ICMSTot:{vNF:Us.newOrZero(o?.vProd).sub(o?.vDesc??e).sub(o?.vICMSDeson??e).add(o?.vST??e).add(o?.vFCPST??e).add(o?.vFrete??e).add(o?.vSeg??e).add(o?.vOutro??e).add(o?.vII??e).add(o?.vIPI??e).add(o?.vIPIDevol??e).add(n?.vServ??e).toFixed(2)}}))}};import{TpEmis as zl}from"@nfets/nfe/domain/entities/constants/tp-emis";function Jn(t,e){return a(function(){return t.apply(e,arguments)},"wrap")}a(Jn,"bind");var{toString:of}=Object.prototype,{getPrototypeOf:Oa}=Object,{iterator:zi,toStringTag:Hs}=Symbol,Oi=(t=>e=>{let o=of.call(e);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),wt=a(t=>(t=t.toLowerCase(),e=>Oi(e)===t),"kindOfTest"),xi=a(t=>e=>typeof e===t,"typeOfTest"),{isArray:on}=Array,tn=xi("undefined");function Gn(t){return t!==null&&!tn(t)&&t.constructor!==null&&!tn(t.constructor)&&nt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}a(Gn,"isBuffer");var $s=wt("ArrayBuffer");function rf(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&$s(t.buffer),e}a(rf,"isArrayBufferView");var nf=xi("string"),nt=xi("function"),Js=xi("number"),Wn=a(t=>t!==null&&typeof t=="object","isObject"),af=a(t=>t===!0||t===!1,"isBoolean"),Ii=a(t=>{if(Oi(t)!=="object")return!1;let e=Oa(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Hs in t)&&!(zi in t)},"isPlainObject"),sf=a(t=>{if(!Wn(t)||Gn(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},"isEmptyObject"),pf=wt("Date"),cf=wt("File"),ff=wt("Blob"),df=wt("FileList"),uf=a(t=>Wn(t)&&nt(t.pipe),"isStream"),lf=a(t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||nt(t.append)&&((e=Oi(t))==="formdata"||e==="object"&&nt(t.toString)&&t.toString()==="[object FormData]"))},"isFormData"),mf=wt("URLSearchParams"),[vf,yf,gf,hf]=["ReadableStream","Request","Response","Headers"].map(wt),Sf=a(t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function Kn(t,e,{allOwnKeys:o=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),on(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(Gn(t))return;let r=o?Object.getOwnPropertyNames(t):Object.keys(t),s=r.length,p;for(n=0;n<s;n++)p=r[n],e.call(null,t[p],p,t)}}a(Kn,"forEach");function Gs(t,e){if(Gn(t))return null;e=e.toLowerCase();let o=Object.keys(t),n=o.length,i;for(;n-- >0;)if(i=o[n],e===i.toLowerCase())return i;return null}a(Gs,"findKey");var Rr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ws=a(t=>!tn(t)&&t!==Rr,"isContextDefined");function za(){let{caseless:t,skipUndefined:e}=Ws(this)&&this||{},o={},n=a((i,r)=>{let s=t&&Gs(o,r)||r;Ii(o[s])&&Ii(i)?o[s]=za(o[s],i):Ii(i)?o[s]=za({},i):on(i)?o[s]=i.slice():(!e||!tn(i))&&(o[s]=i)},"assignValue");for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&Kn(arguments[i],n);return o}a(za,"merge");var Nf=a((t,e,o,{allOwnKeys:n}={})=>(Kn(e,(i,r)=>{o&&nt(i)?t[r]=Jn(i,o):t[r]=i},{allOwnKeys:n}),t),"extend"),Cf=a(t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),"stripBOM"),bf=a((t,e,o,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),o&&Object.assign(t.prototype,o)},"inherits"),Rf=a((t,e,o,n)=>{let i,r,s,p={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),r=i.length;r-- >0;)s=i[r],(!n||n(s,t,e))&&!p[s]&&(e[s]=t[s],p[s]=!0);t=o!==!1&&Oa(t)}while(t&&(!o||o(t,e))&&t!==Object.prototype);return e},"toFlatObject"),Ff=a((t,e,o)=>{t=String(t),(o===void 0||o>t.length)&&(o=t.length),o-=e.length;let n=t.indexOf(e,o);return n!==-1&&n===o},"endsWith"),If=a(t=>{if(!t)return null;if(on(t))return t;let e=t.length;if(!Js(e))return null;let o=new Array(e);for(;e-- >0;)o[e]=t[e];return o},"toArray"),zf=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Oa(Uint8Array)),Of=a((t,e)=>{let n=(t&&t[zi]).call(t),i;for(;(i=n.next())&&!i.done;){let r=i.value;e.call(t,r[0],r[1])}},"forEachEntry"),xf=a((t,e)=>{let o,n=[];for(;(o=t.exec(e))!==null;)n.push(o);return n},"matchAll"),Af=wt("HTMLFormElement"),wf=a(t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,a(function(o,n,i){return n.toUpperCase()+i},"replacer")),"toCamelCase"),Qs=(({hasOwnProperty:t})=>(e,o)=>t.call(e,o))(Object.prototype),Pf=wt("RegExp"),Ks=a((t,e)=>{let o=Object.getOwnPropertyDescriptors(t),n={};Kn(o,(i,r)=>{let s;(s=e(i,r,t))!==!1&&(n[r]=s||i)}),Object.defineProperties(t,n)},"reduceDescriptors"),Ef=a(t=>{Ks(t,(e,o)=>{if(nt(t)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;let n=t[o];if(nt(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},"freezeMethods"),Df=a((t,e)=>{let o={},n=a(i=>{i.forEach(r=>{o[r]=!0})},"define");return on(t)?n(t):n(String(t).split(e)),o},"toObjectSet"),jf=a(()=>{},"noop"),Tf=a((t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,"toFiniteNumber");function Vf(t){return!!(t&&nt(t.append)&&t[Hs]==="FormData"&&t[zi])}a(Vf,"isSpecCompliantForm");var Mf=a(t=>{let e=new Array(10),o=a((n,i)=>{if(Wn(n)){if(e.indexOf(n)>=0)return;if(Gn(n))return n;if(!("toJSON"in n)){e[i]=n;let r=on(n)?[]:{};return Kn(n,(s,p)=>{let v=o(s,i+1);!tn(v)&&(r[p]=v)}),e[i]=void 0,r}}return n},"visit");return o(t,0)},"toJSONObject"),_f=wt("AsyncFunction"),Lf=a(t=>t&&(Wn(t)||nt(t))&&nt(t.then)&&nt(t.catch),"isThenable"),Xs=((t,e)=>t?setImmediate:e?((o,n)=>(Rr.addEventListener("message",({source:i,data:r})=>{i===Rr&&r===o&&n.length&&n.shift()()},!1),i=>{n.push(i),Rr.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",nt(Rr.postMessage)),Bf=typeof queueMicrotask<"u"?queueMicrotask.bind(Rr):typeof process<"u"&&process.nextTick||Xs,Uf=a(t=>t!=null&&nt(t[zi]),"isIterable"),c={isArray:on,isArrayBuffer:$s,isBuffer:Gn,isFormData:lf,isArrayBufferView:rf,isString:nf,isNumber:Js,isBoolean:af,isObject:Wn,isPlainObject:Ii,isEmptyObject:sf,isReadableStream:vf,isRequest:yf,isResponse:gf,isHeaders:hf,isUndefined:tn,isDate:pf,isFile:cf,isBlob:ff,isRegExp:Pf,isFunction:nt,isStream:uf,isURLSearchParams:mf,isTypedArray:zf,isFileList:df,forEach:Kn,merge:za,extend:Nf,trim:Sf,stripBOM:Cf,inherits:bf,toFlatObject:Rf,kindOf:Oi,kindOfTest:wt,endsWith:Ff,toArray:If,forEachEntry:Of,matchAll:xf,isHTMLForm:Af,hasOwnProperty:Qs,hasOwnProp:Qs,reduceDescriptors:Ks,freezeMethods:Ef,toObjectSet:Df,toCamelCase:wf,noop:jf,toFiniteNumber:Tf,findKey:Gs,global:Rr,isContextDefined:Ws,isSpecCompliantForm:Vf,toJSONObject:Mf,isAsyncFn:_f,isThenable:Lf,setImmediate:Xs,asap:Bf,isIterable:Uf};function rn(t,e,o,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),o&&(this.config=o),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}a(rn,"AxiosError");c.inherits(rn,Error,{toJSON:a(function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}},"toJSON")});var Ys=rn.prototype,Zs={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Zs[t]={value:t}});Object.defineProperties(rn,Zs);Object.defineProperty(Ys,"isAxiosError",{value:!0});rn.from=(t,e,o,n,i,r)=>{let s=Object.create(Ys);c.toFlatObject(t,s,a(function(l){return l!==Error.prototype},"filter"),u=>u!=="isAxiosError");let p=t&&t.message?t.message:"Error",v=e==null&&t?t.code:e;return rn.call(s,p,v,o,n,i),t&&s.cause==null&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",r&&Object.assign(s,r),s};var N=rn;var ks=Ia(kc(),1),Ai=ks.default;function xa(t){return c.isPlainObject(t)||c.isArray(t)}a(xa,"isVisitable");function tp(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}a(tp,"removeBrackets");function ep(t,e,o){return t?t.concat(e).map(a(function(i,r){return i=tp(i),!o&&r?"["+i+"]":i},"each")).join(o?".":""):e}a(ep,"renderKey");function qf(t){return c.isArray(t)&&!t.some(xa)}a(qf,"isFlatArray");var Qf=c.toFlatObject(c,{},null,a(function(e){return/^is[A-Z]/.test(e)},"filter"));function Hf(t,e,o){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new(Ai||FormData),o=c.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,a(function(b,h){return!c.isUndefined(h[b])},"defined"));let n=o.metaTokens,i=o.visitor||l,r=o.dots,s=o.indexes,v=(o.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(i))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(c.isDate(y))return y.toISOString();if(c.isBoolean(y))return y.toString();if(!v&&c.isBlob(y))throw new N("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(y)||c.isTypedArray(y)?v&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}a(u,"convertValue");function l(y,b,h){let U=y;if(y&&!h&&typeof y=="object"){if(c.endsWith(b,"{}"))b=n?b:b.slice(0,-2),y=JSON.stringify(y);else if(c.isArray(y)&&qf(y)||(c.isFileList(y)||c.endsWith(b,"[]"))&&(U=c.toArray(y)))return b=tp(b),U.forEach(a(function(_,ve){!(c.isUndefined(_)||_===null)&&e.append(s===!0?ep([b],ve,r):s===null?b:b+"[]",u(_))},"each")),!1}return xa(y)?!0:(e.append(ep(h,b,r),u(y)),!1)}a(l,"defaultVisitor");let g=[],S=Object.assign(Qf,{defaultVisitor:l,convertValue:u,isVisitable:xa});function R(y,b){if(!c.isUndefined(y)){if(g.indexOf(y)!==-1)throw Error("Circular reference detected in "+b.join("."));g.push(y),c.forEach(y,a(function(U,Y){(!(c.isUndefined(U)||U===null)&&i.call(e,U,c.isString(Y)?Y.trim():Y,b,S))===!0&&R(U,b?b.concat(Y):[Y])},"each")),g.pop()}}if(a(R,"build"),!c.isObject(t))throw new TypeError("data must be an object");return R(t),e}a(Hf,"toFormData");var ar=Hf;function op(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,a(function(n){return e[n]},"replacer"))}a(op,"encode");function rp(t,e){this._pairs=[],t&&ar(t,this,e)}a(rp,"AxiosURLSearchParams");var np=rp.prototype;np.append=a(function(e,o){this._pairs.push([e,o])},"append");np.toString=a(function(e){let o=e?function(n){return e.call(this,n,op)}:op;return this._pairs.map(a(function(i){return o(i[0])+"="+o(i[1])},"each"),"").join("&")},"toString");var ip=rp;function $f(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}a($f,"encode");function Fr(t,e,o){if(!e)return t;let n=o&&o.encode||$f;c.isFunction(o)&&(o={serialize:o});let i=o&&o.serialize,r;if(i?r=i(e,o):r=c.isURLSearchParams(e)?e.toString():new ip(e,o).toString(n),r){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t}a(Fr,"buildURL");var Jf=class{static{a(this,"InterceptorManager")}constructor(){this.handlers=[]}use(e,o,n){return this.handlers.push({fulfilled:e,rejected:o,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,a(function(n){n!==null&&e(n)},"forEachHandler"))}},Aa=Jf;var nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};import Wf from"crypto";import Gf from"url";var ap=Gf.URLSearchParams;var wa="abcdefghijklmnopqrstuvwxyz",sp="0123456789",pp={DIGIT:sp,ALPHA:wa,ALPHA_DIGIT:wa+wa.toUpperCase()+sp},Kf=a((t=16,e=pp.ALPHA_DIGIT)=>{let o="",{length:n}=e,i=new Uint32Array(t);Wf.randomFillSync(i);for(let r=0;r<t;r++)o+=e[i[r]%n];return o},"generateString"),cp={isNode:!0,classes:{URLSearchParams:ap,FormData:Ai,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:pp,generateString:Kf,protocols:["http","https","file","data"]};var Da={};Zc(Da,{hasBrowserEnv:()=>Ea,hasStandardBrowserEnv:()=>Xf,hasStandardBrowserWebWorkerEnv:()=>Yf,navigator:()=>Pa,origin:()=>Zf});var Ea=typeof window<"u"&&typeof document<"u",Pa=typeof navigator=="object"&&navigator||void 0,Xf=Ea&&(!Pa||["ReactNative","NativeScript","NS"].indexOf(Pa.product)<0),Yf=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zf=Ea&&window.location.href||"http://localhost";var L={...Da,...cp};function ja(t,e){return ar(t,new L.classes.URLSearchParams,{visitor:a(function(o,n,i,r){return L.isNode&&c.isBuffer(o)?(this.append(n,o.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},"visitor"),...e})}a(ja,"toURLEncodedForm");function kf(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}a(kf,"parsePropPath");function ed(t){let e={},o=Object.keys(t),n,i=o.length,r;for(n=0;n<i;n++)r=o[n],e[r]=t[r];return e}a(ed,"arrayToObject");function td(t){function e(o,n,i,r){let s=o[r++];if(s==="__proto__")return!0;let p=Number.isFinite(+s),v=r>=o.length;return s=!s&&c.isArray(i)?i.length:s,v?(c.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!p):((!i[s]||!c.isObject(i[s]))&&(i[s]=[]),e(o,n,i[s],r)&&c.isArray(i[s])&&(i[s]=ed(i[s])),!p)}if(a(e,"buildPath"),c.isFormData(t)&&c.isFunction(t.entries)){let o={};return c.forEachEntry(t,(n,i)=>{e(kf(n),i,o,0)}),o}return null}a(td,"formDataToJSON");var wi=td;function od(t,e,o){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(o||JSON.stringify)(t)}a(od,"stringifySafely");var Ta={transitional:nn,adapter:["xhr","http","fetch"],transformRequest:[a(function(e,o){let n=o.getContentType()||"",i=n.indexOf("application/json")>-1,r=c.isObject(e);if(r&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return i?JSON.stringify(wi(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let p;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ja(e,this.formSerializer).toString();if((p=c.isFileList(e))||n.indexOf("multipart/form-data")>-1){let v=this.env&&this.env.FormData;return ar(p?{"files[]":e}:e,v&&new v,this.formSerializer)}}return r||i?(o.setContentType("application/json",!1),od(e)):e},"transformRequest")],transformResponse:[a(function(e){let o=this.transitional||Ta.transitional,n=o&&o.forcedJSONParsing,i=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(n&&!this.responseType||i)){let s=!(o&&o.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(p){if(s)throw p.name==="SyntaxError"?N.from(p,N.ERR_BAD_RESPONSE,this,null,this.response):p}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:L.classes.FormData,Blob:L.classes.Blob},validateStatus:a(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{Ta.headers[t]={}});var an=Ta;var rd=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fp=a((t=>{let e={},o,n,i;return t&&t.split(`
|
|
2
|
+
`).forEach(a(function(s){i=s.indexOf(":"),o=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!o||e[o]&&rd[o])&&(o==="set-cookie"?e[o]?e[o].push(n):e[o]=[n]:e[o]=e[o]?e[o]+", "+n:n)},"parser")),e}),"default");var dp=Symbol("internals");function Xn(t){return t&&String(t).trim().toLowerCase()}a(Xn,"normalizeHeader");function Pi(t){return t===!1||t==null?t:c.isArray(t)?t.map(Pi):String(t)}a(Pi,"normalizeValue");function nd(t){let e=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=o.exec(t);)e[n[1]]=n[2];return e}a(nd,"parseTokens");var id=a(t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()),"isValidHeaderName");function Va(t,e,o,n,i){if(c.isFunction(n))return n.call(this,e,o);if(i&&(e=o),!!c.isString(e)){if(c.isString(n))return e.indexOf(n)!==-1;if(c.isRegExp(n))return n.test(e)}}a(Va,"matchHeaderValue");function ad(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,o,n)=>o.toUpperCase()+n)}a(ad,"formatHeader");function sd(t,e){let o=c.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+o,{value:a(function(i,r,s){return this[n].call(this,e,i,r,s)},"value"),configurable:!0})})}a(sd,"buildAccessors");var Ei=class{static{a(this,"AxiosHeaders")}constructor(e){e&&this.set(e)}set(e,o,n){let i=this;function r(p,v,u){let l=Xn(v);if(!l)throw new Error("header name must be a non-empty string");let g=c.findKey(i,l);(!g||i[g]===void 0||u===!0||u===void 0&&i[g]!==!1)&&(i[g||v]=Pi(p))}a(r,"setHeader");let s=a((p,v)=>c.forEach(p,(u,l)=>r(u,l,v)),"setHeaders");if(c.isPlainObject(e)||e instanceof this.constructor)s(e,o);else if(c.isString(e)&&(e=e.trim())&&!id(e))s(fp(e),o);else if(c.isObject(e)&&c.isIterable(e)){let p={},v,u;for(let l of e){if(!c.isArray(l))throw TypeError("Object iterator must return a key-value pair");p[u=l[0]]=(v=p[u])?c.isArray(v)?[...v,l[1]]:[v,l[1]]:l[1]}s(p,o)}else e!=null&&r(o,e,n);return this}get(e,o){if(e=Xn(e),e){let n=c.findKey(this,e);if(n){let i=this[n];if(!o)return i;if(o===!0)return nd(i);if(c.isFunction(o))return o.call(this,i,n);if(c.isRegExp(o))return o.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,o){if(e=Xn(e),e){let n=c.findKey(this,e);return!!(n&&this[n]!==void 0&&(!o||Va(this,this[n],n,o)))}return!1}delete(e,o){let n=this,i=!1;function r(s){if(s=Xn(s),s){let p=c.findKey(n,s);p&&(!o||Va(n,n[p],p,o))&&(delete n[p],i=!0)}}return a(r,"deleteHeader"),c.isArray(e)?e.forEach(r):r(e),i}clear(e){let o=Object.keys(this),n=o.length,i=!1;for(;n--;){let r=o[n];(!e||Va(this,this[r],r,e,!0))&&(delete this[r],i=!0)}return i}normalize(e){let o=this,n={};return c.forEach(this,(i,r)=>{let s=c.findKey(n,r);if(s){o[s]=Pi(i),delete o[r];return}let p=e?ad(r):String(r).trim();p!==r&&delete o[r],o[p]=Pi(i),n[p]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let o=Object.create(null);return c.forEach(this,(n,i)=>{n!=null&&n!==!1&&(o[i]=e&&c.isArray(n)?n.join(", "):n)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,o])=>e+": "+o).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...o){let n=new this(e);return o.forEach(i=>n.set(i)),n}static accessor(e){let n=(this[dp]=this[dp]={accessors:{}}).accessors,i=this.prototype;function r(s){let p=Xn(s);n[p]||(sd(i,s),n[p]=!0)}return a(r,"defineAccessor"),c.isArray(e)?e.forEach(r):r(e),this}};Ei.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(Ei.prototype,({value:t},e)=>{let o=e[0].toUpperCase()+e.slice(1);return{get:a(()=>t,"get"),set(n){this[o]=n}}});c.freezeMethods(Ei);var ce=Ei;function Yn(t,e){let o=this||an,n=e||o,i=ce.from(n.headers),r=n.data;return c.forEach(t,a(function(p){r=p.call(o,r,i.normalize(),e?e.status:void 0)},"transform")),i.normalize(),r}a(Yn,"transformData");function Zn(t){return!!(t&&t.__CANCEL__)}a(Zn,"isCancel");function up(t,e,o){N.call(this,t??"canceled",N.ERR_CANCELED,e,o),this.name="CanceledError"}a(up,"CanceledError");c.inherits(up,N,{__CANCEL__:!0});var mt=up;function Yt(t,e,o){let n=o.config.validateStatus;!o.status||!n||n(o.status)?t(o):e(new N("Request failed with status code "+o.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}a(Yt,"settle");function Ma(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}a(Ma,"isAbsoluteURL");function _a(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}a(_a,"combineURLs");function Ir(t,e,o){let n=!Ma(e);return t&&(n||o==!1)?_a(t,e):e}a(Ir,"buildFullPath");var Fp=Ia(ef(),1),Op=Ia(tf(),1);import Fd from"http";import Id from"https";import Ip from"http2";import zp from"util";import pr from"zlib";var zr="1.13.2";function kn(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}a(kn,"parseProtocol");var pd=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function La(t,e,o){let n=o&&o.Blob||L.classes.Blob,i=kn(t);if(e===void 0&&n&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let r=pd.exec(t);if(!r)throw new N("Invalid URL",N.ERR_INVALID_URL);let s=r[1],p=r[2],v=r[3],u=Buffer.from(decodeURIComponent(v),p?"base64":"utf8");if(e){if(!n)throw new N("Blob is not supported",N.ERR_NOT_SUPPORT);return new n([u],{type:s})}return u}throw new N("Unsupported protocol "+i,N.ERR_NOT_SUPPORT)}a(La,"fromDataURI");import sr from"stream";import cd from"stream";var Ba=Symbol("internals"),fd=class extends cd.Transform{static{a(this,"AxiosTransformStream")}constructor(e){e=c.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,i)=>!c.isUndefined(i[n])),super({readableHighWaterMark:e.chunkSize});let o=this[Ba]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(o.isCaptured||(o.isCaptured=!0))})}_read(e){let o=this[Ba];return o.onReadCallback&&o.onReadCallback(),super._read(e)}_transform(e,o,n){let i=this[Ba],r=i.maxRate,s=this.readableHighWaterMark,p=i.timeWindow,v=1e3/p,u=r/v,l=i.minChunkSize!==!1?Math.max(i.minChunkSize,u*.01):0,g=a((R,y)=>{let b=Buffer.byteLength(R);i.bytesSeen+=b,i.bytes+=b,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(R)?process.nextTick(y):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(y)}},"pushChunk"),S=a((R,y)=>{let b=Buffer.byteLength(R),h=null,U=s,Y,_=0;if(r){let ve=Date.now();(!i.ts||(_=ve-i.ts)>=p)&&(i.ts=ve,Y=u-i.bytes,i.bytes=Y<0?-Y:0,_=0),Y=u-i.bytes}if(r){if(Y<=0)return setTimeout(()=>{y(null,R)},p-_);Y<U&&(U=Y)}U&&b>U&&b-U>l&&(h=R.subarray(U),R=R.subarray(0,U)),g(R,h?()=>{process.nextTick(y,null,h)}:y)},"transformChunk");S(e,a(function R(y,b){if(y)return n(y);b?S(b,R):n(null)},"transformNextChunk"))}},Ua=fd;import{EventEmitter as zd}from"events";import ud from"util";import{Readable as ld}from"stream";var{asyncIterator:lp}=Symbol,dd=a(async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[lp]?yield*t[lp]():yield t},"readBlob"),Di=dd;var md=L.ALPHABET.ALPHA_DIGIT+"-_",ei=typeof TextEncoder=="function"?new TextEncoder:new ud.TextEncoder,Or=`\r
|
|
4
|
+
`,vd=ei.encode(Or),yd=2,gd=class{static{a(this,"FormDataPart")}constructor(e,o){let{escapeName:n}=this.constructor,i=c.isString(o),r=`Content-Disposition: form-data; name="${n(e)}"${!i&&o.name?`; filename="${n(o.name)}"`:""}${Or}`;i?o=ei.encode(String(o).replace(/\r?\n|\r\n?/g,Or)):r+=`Content-Type: ${o.type||"application/octet-stream"}${Or}`,this.headers=ei.encode(r+Or),this.contentLength=i?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+yd,this.name=e,this.value=o}async*encode(){yield this.headers;let{value:e}=this;c.isTypedArray(e)?yield e:yield*Di(e),yield vd}static escapeName(e){return String(e).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},hd=a((t,e,o)=>{let{tag:n="form-data-boundary",size:i=25,boundary:r=n+"-"+L.generateString(i,md)}=o||{};if(!c.isFormData(t))throw TypeError("FormData instance required");if(r.length<1||r.length>70)throw Error("boundary must be 10-70 characters long");let s=ei.encode("--"+r+Or),p=ei.encode("--"+r+"--"+Or),v=p.byteLength,u=Array.from(t.entries()).map(([g,S])=>{let R=new gd(g,S);return v+=R.size,R});v+=s.byteLength*u.length,v=c.toFiniteNumber(v);let l={"Content-Type":`multipart/form-data; boundary=${r}`};return Number.isFinite(v)&&(l["Content-Length"]=v),e&&e(l),ld.from((async function*(){for(let g of u)yield s,yield*g.encode();yield p})())},"formDataToStream"),mp=hd;import Sd from"stream";var Nd=class extends Sd.Transform{static{a(this,"ZlibHeaderTransformStream")}__transform(e,o,n){this.push(e),n()}_transform(e,o,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,o)}this.__transform(e,o,n)}},vp=Nd;var Cd=a((t,e)=>c.isAsyncFn(t)?function(...o){let n=o.pop();t.apply(this,o).then(i=>{try{e?n(null,...e(i)):n(null,i)}catch(r){n(r)}},n)}:t,"callbackify"),yp=Cd;function bd(t,e){t=t||10;let o=new Array(t),n=new Array(t),i=0,r=0,s;return e=e!==void 0?e:1e3,a(function(v){let u=Date.now(),l=n[r];s||(s=u),o[i]=v,n[i]=u;let g=r,S=0;for(;g!==i;)S+=o[g++],g=g%t;if(i=(i+1)%t,i===r&&(r=(r+1)%t),u-s<e)return;let R=l&&u-l;return R?Math.round(S*1e3/R):void 0},"push")}a(bd,"speedometer");var gp=bd;function Rd(t,e){let o=0,n=1e3/e,i,r,s=a((u,l=Date.now())=>{o=l,i=null,r&&(clearTimeout(r),r=null),t(...u)},"invoke");return[a((...u)=>{let l=Date.now(),g=l-o;g>=n?s(u,l):(i=u,r||(r=setTimeout(()=>{r=null,s(i)},n-g)))},"throttled"),a(()=>i&&s(i),"flush")]}a(Rd,"throttle");var hp=Rd;var go=a((t,e,o=3)=>{let n=0,i=gp(50,250);return hp(r=>{let s=r.loaded,p=r.lengthComputable?r.total:void 0,v=s-n,u=i(v),l=s<=p;n=s;let g={loaded:s,total:p,progress:p?s/p:void 0,bytes:v,rate:u||void 0,estimated:u&&p&&l?(p-s)/u:void 0,event:r,lengthComputable:p!=null,[e?"download":"upload"]:!0};t(g)},o)},"progressEventReducer"),sn=a((t,e)=>{let o=t!=null;return[n=>e[0]({lengthComputable:o,total:t,loaded:n}),e[1]]},"progressEventDecorator"),pn=a(t=>(...e)=>c.asap(()=>t(...e)),"asyncDecorator");function qa(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let o=t.slice(5,e),n=t.slice(e+1);if(/;base64/i.test(o)){let r=n.length,s=n.length;for(let S=0;S<s;S++)if(n.charCodeAt(S)===37&&S+2<s){let R=n.charCodeAt(S+1),y=n.charCodeAt(S+2);(R>=48&&R<=57||R>=65&&R<=70||R>=97&&R<=102)&&(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(r-=2,S+=2)}let p=0,v=s-1,u=a(S=>S>=2&&n.charCodeAt(S-2)===37&&n.charCodeAt(S-1)===51&&(n.charCodeAt(S)===68||n.charCodeAt(S)===100),"tailIsPct3D");v>=0&&(n.charCodeAt(v)===61?(p++,v--):u(v)&&(p++,v-=3)),p===1&&v>=0&&(n.charCodeAt(v)===61||u(v))&&p++;let g=Math.floor(r/4)*3-(p||0);return g>0?g:0}return Buffer.byteLength(n,"utf8")}a(qa,"estimateDataURLDecodedBytes");var Sp={flush:pr.constants.Z_SYNC_FLUSH,finishFlush:pr.constants.Z_SYNC_FLUSH},Od={flush:pr.constants.BROTLI_OPERATION_FLUSH,finishFlush:pr.constants.BROTLI_OPERATION_FLUSH},Np=c.isFunction(pr.createBrotliDecompress),{http:xd,https:Ad}=Op.default,wd=/https:?/,Cp=L.protocols.map(t=>t+":"),bp=a((t,[e,o])=>(t.on("end",o).on("error",o),e),"flushOnFinish"),Pd=class{static{a(this,"Http2Sessions")}constructor(){this.sessions=Object.create(null)}getSession(e,o){o=Object.assign({sessionTimeout:1e3},o);let n=this.sessions[e];if(n){let l=n.length;for(let g=0;g<l;g++){let[S,R]=n[g];if(!S.destroyed&&!S.closed&&zp.isDeepStrictEqual(R,o))return S}}let i=Ip.connect(e,o),r,s=a(()=>{if(r)return;r=!0;let l=n,g=l.length,S=g;for(;S--;)if(l[S][0]===i){g===1?delete this.sessions[e]:l.splice(S,1);return}},"removeSession"),p=i.request,{sessionTimeout:v}=o;if(v!=null){let l,g=0;i.request=function(){let S=p.apply(this,arguments);return g++,l&&(clearTimeout(l),l=null),S.once("close",()=>{--g||(l=setTimeout(()=>{l=null,s()},v))}),S}}i.once("close",s);let u=[i,o];return n?n.push(u):n=this.sessions[e]=[u],i}},Ed=new Pd;function Dd(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}a(Dd,"dispatchBeforeRedirect");function xp(t,e,o){let n=e;if(!n&&n!==!1){let i=Fp.default.getProxyForUrl(o);i&&(n=new URL(i))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let r=Buffer.from(n.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+r}t.headers.host=t.hostname+(t.port?":"+t.port:"");let i=n.hostname||n.host;t.hostname=i,t.host=i,t.port=n.port,t.path=o,n.protocol&&(t.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}t.beforeRedirects.proxy=a(function(r){xp(r,e,r.href)},"beforeRedirect")}a(xp,"setProxy");var jd=typeof process<"u"&&c.kindOf(process)==="process",Td=a(t=>new Promise((e,o)=>{let n,i,r=a((v,u)=>{i||(i=!0,n&&n(v,u))},"done"),s=a(v=>{r(v),e(v)},"_resolve"),p=a(v=>{r(v,!0),o(v)},"_reject");t(s,p,v=>n=v).catch(p)}),"wrapAsync"),Vd=a(({address:t,family:e})=>{if(!c.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},"resolveFamily"),Rp=a((t,e)=>Vd(c.isObject(t)?t:{address:t,family:e}),"buildAddressEntry"),Md={request(t,e){let o=t.protocol+"//"+t.hostname+":"+(t.port||80),{http2Options:n,headers:i}=t,r=Ed.getSession(o,n),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:p,HTTP2_HEADER_PATH:v,HTTP2_HEADER_STATUS:u}=Ip.constants,l={[s]:t.protocol.replace(":",""),[p]:t.method,[v]:t.path};c.forEach(i,(S,R)=>{R.charAt(0)!==":"&&(l[R]=S)});let g=r.request(l);return g.once("response",S=>{let R=g;S=Object.assign({},S);let y=S[u];delete S[u],R.headers=S,R.statusCode=+y,e(R)}),g}},Ap=jd&&a(function(e){return Td(a(async function(n,i,r){let{data:s,lookup:p,family:v,httpVersion:u=1,http2Options:l}=e,{responseType:g,responseEncoding:S}=e,R=e.method.toUpperCase(),y,b=!1,h;if(u=+u,Number.isNaN(u))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(u!==1&&u!==2)throw TypeError(`Unsupported protocol version '${u}'`);let U=u===2;if(p){let E=yp(p,z=>c.isArray(z)?z:[z]);p=a((z,$,lt)=>{E(z,$,(ge,At,ir)=>{if(ge)return lt(ge);let rt=c.isArray(At)?At.map(Fi=>Rp(Fi)):[Rp(At,ir)];$.all?lt(ge,rt):lt(ge,rt[0].address,rt[0].family)})},"lookup")}let Y=new zd;function _(E){try{Y.emit("abort",!E||E.type?new mt(null,e,h):E)}catch(z){console.warn("emit error",z)}}a(_,"abort"),Y.once("abort",i);let ve=a(()=>{e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_),Y.removeAllListeners()},"onFinished");(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_))),r((E,z)=>{if(y=!0,z){b=!0,ve();return}let{data:$}=E;if($ instanceof sr.Readable||$ instanceof sr.Duplex){let lt=sr.finished($,()=>{lt(),ve()})}else ve()});let tt=Ir(e.baseURL,e.url,e.allowAbsoluteUrls),ye=new URL(tt,L.hasBrowserEnv?L.origin:void 0),Ae=ye.protocol||Cp[0];if(Ae==="data:"){if(e.maxContentLength>-1){let z=String(e.url||tt||"");if(qa(z)>e.maxContentLength)return i(new N("maxContentLength size of "+e.maxContentLength+" exceeded",N.ERR_BAD_RESPONSE,e))}let E;if(R!=="GET")return Yt(n,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{E=La(e.url,g==="blob",{Blob:e.env&&e.env.Blob})}catch(z){throw N.from(z,N.ERR_BAD_REQUEST,e)}return g==="text"?(E=E.toString(S),(!S||S==="utf8")&&(E=c.stripBOM(E))):g==="stream"&&(E=sr.Readable.from(E)),Yt(n,i,{data:E,status:200,statusText:"OK",headers:new ce,config:e})}if(Cp.indexOf(Ae)===-1)return i(new N("Unsupported protocol "+Ae,N.ERR_BAD_REQUEST,e));let De=ce.from(e.headers).normalize();De.set("User-Agent","axios/"+zr,!1);let{onUploadProgress:rr,onDownloadProgress:Zr}=e,br=e.maxRate,vo,Xt;if(c.isSpecCompliantForm(s)){let E=De.getContentType(/boundary=([-_\w\d]{10,70})/i);s=mp(s,z=>{De.set(z)},{tag:`axios-${zr}-boundary`,boundary:E&&E[1]||void 0})}else if(c.isFormData(s)&&c.isFunction(s.getHeaders)){if(De.set(s.getHeaders()),!De.hasContentLength())try{let E=await zp.promisify(s.getLength).call(s);Number.isFinite(E)&&E>=0&&De.setContentLength(E)}catch{}}else if(c.isBlob(s)||c.isFile(s))s.size&&De.setContentType(s.type||"application/octet-stream"),De.setContentLength(s.size||0),s=sr.Readable.from(Di(s));else if(s&&!c.isStream(s)){if(!Buffer.isBuffer(s))if(c.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else if(c.isString(s))s=Buffer.from(s,"utf-8");else return i(new N("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",N.ERR_BAD_REQUEST,e));if(De.setContentLength(s.length,!1),e.maxBodyLength>-1&&s.length>e.maxBodyLength)return i(new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,e))}let yo=c.toFiniteNumber(De.getContentLength());c.isArray(br)?(vo=br[0],Xt=br[1]):vo=Xt=br,s&&(rr||vo)&&(c.isStream(s)||(s=sr.Readable.from(s,{objectMode:!1})),s=sr.pipeline([s,new Ua({maxRate:c.toFiniteNumber(vo)})],c.noop),rr&&s.on("progress",bp(s,sn(yo,go(pn(rr),!1,3)))));let nr;if(e.auth){let E=e.auth.username||"",z=e.auth.password||"";nr=E+":"+z}if(!nr&&ye.username){let E=ye.username,z=ye.password;nr=E+":"+z}nr&&De.delete("authorization");let ut;try{ut=Fr(ye.pathname+ye.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(E){let z=new Error(E.message);return z.config=e,z.url=e.url,z.exists=!0,i(z)}De.set("Accept-Encoding","gzip, compress, deflate"+(Np?", br":""),!1);let je={path:ut,method:R,headers:De.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:nr,protocol:Ae,family:v,beforeRedirect:Dd,beforeRedirects:{},http2Options:l};!c.isUndefined(p)&&(je.lookup=p),e.socketPath?je.socketPath=e.socketPath:(je.hostname=ye.hostname.startsWith("[")?ye.hostname.slice(1,-1):ye.hostname,je.port=ye.port,xp(je,e.proxy,Ae+"//"+ye.hostname+(ye.port?":"+ye.port:"")+je.path));let ot,kr=wd.test(je.protocol);if(je.agent=kr?e.httpsAgent:e.httpAgent,U?ot=Md:e.transport?ot=e.transport:e.maxRedirects===0?ot=kr?Id:Fd:(e.maxRedirects&&(je.maxRedirects=e.maxRedirects),e.beforeRedirect&&(je.beforeRedirects.config=e.beforeRedirect),ot=kr?Ad:xd),e.maxBodyLength>-1?je.maxBodyLength=e.maxBodyLength:je.maxBodyLength=1/0,e.insecureHTTPParser&&(je.insecureHTTPParser=e.insecureHTTPParser),h=ot.request(je,a(function(z){if(h.destroyed)return;let $=[z],lt=c.toFiniteNumber(z.headers["content-length"]);if(Zr||Xt){let rt=new Ua({maxRate:c.toFiniteNumber(Xt)});Zr&&rt.on("progress",bp(rt,sn(lt,go(pn(Zr),!0,3)))),$.push(rt)}let ge=z,At=z.req||h;if(e.decompress!==!1&&z.headers["content-encoding"])switch((R==="HEAD"||z.statusCode===204)&&delete z.headers["content-encoding"],(z.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":$.push(pr.createUnzip(Sp)),delete z.headers["content-encoding"];break;case"deflate":$.push(new vp),$.push(pr.createUnzip(Sp)),delete z.headers["content-encoding"];break;case"br":Np&&($.push(pr.createBrotliDecompress(Od)),delete z.headers["content-encoding"])}ge=$.length>1?sr.pipeline($,c.noop):$[0];let ir={status:z.statusCode,statusText:z.statusMessage,headers:new ce(z.headers),config:e,request:At};if(g==="stream")ir.data=ge,Yt(n,i,ir);else{let rt=[],Fi=0;ge.on("data",a(function(Ke){rt.push(Ke),Fi+=Ke.length,e.maxContentLength>-1&&Fi>e.maxContentLength&&(b=!0,ge.destroy(),_(new N("maxContentLength size of "+e.maxContentLength+" exceeded",N.ERR_BAD_RESPONSE,e,At)))},"handleStreamData")),ge.on("aborted",a(function(){if(b)return;let Ke=new N("stream has been aborted",N.ERR_BAD_RESPONSE,e,At);ge.destroy(Ke),i(Ke)},"handlerStreamAborted")),ge.on("error",a(function(Ke){h.destroyed||i(N.from(Ke,null,e,At))},"handleStreamError")),ge.on("end",a(function(){try{let Ke=rt.length===1?rt[0]:Buffer.concat(rt);g!=="arraybuffer"&&(Ke=Ke.toString(S),(!S||S==="utf8")&&(Ke=c.stripBOM(Ke))),ir.data=Ke}catch(Ke){return i(N.from(Ke,null,e,ir.request,ir))}Yt(n,i,ir)},"handleStreamEnd"))}Y.once("abort",rt=>{ge.destroyed||(ge.emit("error",rt),ge.destroy())})},"handleResponse")),Y.once("abort",E=>{h.close?h.close():h.destroy(E)}),h.on("error",a(function(z){i(N.from(z,null,e,h))},"handleRequestError")),h.on("socket",a(function(z){z.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let E=parseInt(e.timeout,10);if(Number.isNaN(E)){_(new N("error trying to parse `config.timeout` to int",N.ERR_BAD_OPTION_VALUE,e,h));return}h.setTimeout(E,a(function(){if(y)return;let $=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",lt=e.transitional||nn;e.timeoutErrorMessage&&($=e.timeoutErrorMessage),_(new N($,lt.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,h))},"handleRequestTimeout"))}else h.setTimeout(0);if(c.isStream(s)){let E=!1,z=!1;s.on("end",()=>{E=!0}),s.once("error",$=>{z=!0,h.destroy($)}),s.on("close",()=>{!E&&!z&&_(new mt("Request stream has been aborted",e,h))}),s.pipe(h)}else s&&h.write(s),h.end()},"dispatchHttpRequest"))},"httpAdapter");var wp=L.hasStandardBrowserEnv?((t,e)=>o=>(o=new URL(o,L.origin),t.protocol===o.protocol&&t.host===o.host&&(e||t.port===o.port)))(new URL(L.origin),L.navigator&&/(msie|trident)/i.test(L.navigator.userAgent)):()=>!0;var Pp=L.hasStandardBrowserEnv?{write(t,e,o,n,i,r,s){if(typeof document>"u")return;let p=[`${t}=${encodeURIComponent(e)}`];c.isNumber(o)&&p.push(`expires=${new Date(o).toUTCString()}`),c.isString(n)&&p.push(`path=${n}`),c.isString(i)&&p.push(`domain=${i}`),r===!0&&p.push("secure"),c.isString(s)&&p.push(`SameSite=${s}`),document.cookie=p.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var Ep=a(t=>t instanceof ce?{...t}:t,"headersToObject");function Pt(t,e){e=e||{};let o={};function n(u,l,g,S){return c.isPlainObject(u)&&c.isPlainObject(l)?c.merge.call({caseless:S},u,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}a(n,"getMergedValue");function i(u,l,g,S){if(c.isUndefined(l)){if(!c.isUndefined(u))return n(void 0,u,g,S)}else return n(u,l,g,S)}a(i,"mergeDeepProperties");function r(u,l){if(!c.isUndefined(l))return n(void 0,l)}a(r,"valueFromConfig2");function s(u,l){if(c.isUndefined(l)){if(!c.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}a(s,"defaultToConfig2");function p(u,l,g){if(g in e)return n(u,l);if(g in t)return n(void 0,u)}a(p,"mergeDirectKeys");let v={url:r,method:r,data:r,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:p,headers:a((u,l,g)=>i(Ep(u),Ep(l),g,!0),"headers")};return c.forEach(Object.keys({...t,...e}),a(function(l){let g=v[l]||i,S=g(t[l],e[l],l);c.isUndefined(S)&&g!==p||(o[l]=S)},"computeConfigValue")),o}a(Pt,"mergeConfig");var ji=a((t=>{let e=Pt({},t),{data:o,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:s,auth:p}=e;if(e.headers=s=ce.from(s),e.url=Fr(Ir(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),p&&s.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),c.isFormData(o)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(c.isFunction(o.getHeaders)){let v=o.getHeaders(),u=["content-type","content-length"];Object.entries(v).forEach(([l,g])=>{u.includes(l.toLowerCase())&&s.set(l,g)})}}if(L.hasStandardBrowserEnv&&(n&&c.isFunction(n)&&(n=n(e)),n||n!==!1&&wp(e.url))){let v=i&&r&&Pp.read(r);v&&s.set(i,v)}return e}),"default");var _d=typeof XMLHttpRequest<"u",Dp=_d&&function(t){return new Promise(a(function(o,n){let i=ji(t),r=i.data,s=ce.from(i.headers).normalize(),{responseType:p,onUploadProgress:v,onDownloadProgress:u}=i,l,g,S,R,y;function b(){R&&R(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}a(b,"done");let h=new XMLHttpRequest;h.open(i.method.toUpperCase(),i.url,!0),h.timeout=i.timeout;function U(){if(!h)return;let _=ce.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),tt={data:!p||p==="text"||p==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:_,config:t,request:h};Yt(a(function(Ae){o(Ae),b()},"_resolve"),a(function(Ae){n(Ae),b()},"_reject"),tt),h=null}a(U,"onloadend"),"onloadend"in h?h.onloadend=U:h.onreadystatechange=a(function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(U)},"handleLoad"),h.onabort=a(function(){h&&(n(new N("Request aborted",N.ECONNABORTED,t,h)),h=null)},"handleAbort"),h.onerror=a(function(ve){let tt=ve&&ve.message?ve.message:"Network Error",ye=new N(tt,N.ERR_NETWORK,t,h);ye.event=ve||null,n(ye),h=null},"handleError"),h.ontimeout=a(function(){let ve=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",tt=i.transitional||nn;i.timeoutErrorMessage&&(ve=i.timeoutErrorMessage),n(new N(ve,tt.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,t,h)),h=null},"handleTimeout"),r===void 0&&s.setContentType(null),"setRequestHeader"in h&&c.forEach(s.toJSON(),a(function(ve,tt){h.setRequestHeader(tt,ve)},"setRequestHeader")),c.isUndefined(i.withCredentials)||(h.withCredentials=!!i.withCredentials),p&&p!=="json"&&(h.responseType=i.responseType),u&&([S,y]=go(u,!0),h.addEventListener("progress",S)),v&&h.upload&&([g,R]=go(v),h.upload.addEventListener("progress",g),h.upload.addEventListener("loadend",R)),(i.cancelToken||i.signal)&&(l=a(_=>{h&&(n(!_||_.type?new mt(null,t,h):_),h.abort(),h=null)},"onCanceled"),i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));let Y=kn(i.url);if(Y&&L.protocols.indexOf(Y)===-1){n(new N("Unsupported protocol "+Y+":",N.ERR_BAD_REQUEST,t));return}h.send(r||null)},"dispatchXhrRequest"))};var Ld=a((t,e)=>{let{length:o}=t=t?t.filter(Boolean):[];if(e||o){let n=new AbortController,i,r=a(function(u){if(!i){i=!0,p();let l=u instanceof Error?u:this.reason;n.abort(l instanceof N?l:new mt(l instanceof Error?l.message:l))}},"onabort"),s=e&&setTimeout(()=>{s=null,r(new N(`timeout ${e} of ms exceeded`,N.ETIMEDOUT))},e),p=a(()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(r):u.removeEventListener("abort",r)}),t=null)},"unsubscribe");t.forEach(u=>u.addEventListener("abort",r));let{signal:v}=n;return v.unsubscribe=()=>c.asap(p),v}},"composeSignals"),jp=Ld;var Bd=a(function*(t,e){let o=t.byteLength;if(!e||o<e){yield t;return}let n=0,i;for(;n<o;)i=n+e,yield t.slice(n,i),n=i},"streamChunk"),Ud=a(async function*(t,e){for await(let o of qd(t))yield*Bd(o,e)},"readBytes"),qd=a(async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:o,value:n}=await e.read();if(o)break;yield n}}finally{await e.cancel()}},"readStream"),Qa=a((t,e,o,n)=>{let i=Ud(t,e),r=0,s,p=a(v=>{s||(s=!0,n&&n(v))},"_onFinish");return new ReadableStream({async pull(v){try{let{done:u,value:l}=await i.next();if(u){p(),v.close();return}let g=l.byteLength;if(o){let S=r+=g;o(S)}v.enqueue(new Uint8Array(l))}catch(u){throw p(u),u}},cancel(v){return p(v),i.return()}},{highWaterMark:2})},"trackStream");var Tp=64*1024,{isFunction:Ti}=c,Qd=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:Vp,TextEncoder:Mp}=c.global,_p=a((t,...e)=>{try{return!!t(...e)}catch{return!1}},"test"),Hd=a(t=>{t=c.merge.call({skipUndefined:!0},Qd,t);let{fetch:e,Request:o,Response:n}=t,i=e?Ti(e):typeof fetch=="function",r=Ti(o),s=Ti(n);if(!i)return!1;let p=i&&Ti(Vp),v=i&&(typeof Mp=="function"?(y=>b=>y.encode(b))(new Mp):async y=>new Uint8Array(await new o(y).arrayBuffer())),u=r&&p&&_p(()=>{let y=!1,b=new o(L.origin,{body:new Vp,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!b}),l=s&&p&&_p(()=>c.isReadableStream(new n("").body)),g={stream:l&&(y=>y.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!g[y]&&(g[y]=(b,h)=>{let U=b&&b[y];if(U)return U.call(b);throw new N(`Response type '${y}' is not supported`,N.ERR_NOT_SUPPORT,h)})});let S=a(async y=>{if(y==null)return 0;if(c.isBlob(y))return y.size;if(c.isSpecCompliantForm(y))return(await new o(L.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(c.isArrayBufferView(y)||c.isArrayBuffer(y))return y.byteLength;if(c.isURLSearchParams(y)&&(y=y+""),c.isString(y))return(await v(y)).byteLength},"getBodyLength"),R=a(async(y,b)=>{let h=c.toFiniteNumber(y.getContentLength());return h??S(b)},"resolveBodyLength");return async y=>{let{url:b,method:h,data:U,signal:Y,cancelToken:_,timeout:ve,onDownloadProgress:tt,onUploadProgress:ye,responseType:Ae,headers:De,withCredentials:rr="same-origin",fetchOptions:Zr}=ji(y),br=e||fetch;Ae=Ae?(Ae+"").toLowerCase():"text";let vo=jp([Y,_&&_.toAbortSignal()],ve),Xt=null,yo=vo&&vo.unsubscribe&&(()=>{vo.unsubscribe()}),nr;try{if(ye&&u&&h!=="get"&&h!=="head"&&(nr=await R(De,U))!==0){let z=new o(b,{method:"POST",body:U,duplex:"half"}),$;if(c.isFormData(U)&&($=z.headers.get("content-type"))&&De.setContentType($),z.body){let[lt,ge]=sn(nr,go(pn(ye)));U=Qa(z.body,Tp,lt,ge)}}c.isString(rr)||(rr=rr?"include":"omit");let ut=r&&"credentials"in o.prototype,je={...Zr,signal:vo,method:h.toUpperCase(),headers:De.normalize().toJSON(),body:U,duplex:"half",credentials:ut?rr:void 0};Xt=r&&new o(b,je);let ot=await(r?br(Xt,Zr):br(b,je)),kr=l&&(Ae==="stream"||Ae==="response");if(l&&(tt||kr&&yo)){let z={};["status","statusText","headers"].forEach(At=>{z[At]=ot[At]});let $=c.toFiniteNumber(ot.headers.get("content-length")),[lt,ge]=tt&&sn($,go(pn(tt),!0))||[];ot=new n(Qa(ot.body,Tp,lt,()=>{ge&&ge(),yo&&yo()}),z)}Ae=Ae||"text";let E=await g[c.findKey(g,Ae)||"text"](ot,y);return!kr&&yo&&yo(),await new Promise((z,$)=>{Yt(z,$,{data:E,headers:ce.from(ot.headers),status:ot.status,statusText:ot.statusText,config:y,request:Xt})})}catch(ut){throw yo&&yo(),ut&&ut.name==="TypeError"&&/Load failed|fetch/i.test(ut.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,y,Xt),{cause:ut.cause||ut}):N.from(ut,ut&&ut.code,y,Xt)}}},"factory"),$d=new Map,Ha=a(t=>{let e=t&&t.env||{},{fetch:o,Request:n,Response:i}=e,r=[n,i,o],s=r.length,p=s,v,u,l=$d;for(;p--;)v=r[p],u=l.get(v),u===void 0&&l.set(v,u=p?new Map:Hd(e)),l=u;return u},"getFetch"),Rh=Ha();var $a={http:Ap,xhr:Dp,fetch:{get:Ha}};c.forEach($a,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var Lp=a(t=>`- ${t}`,"renderReason"),Gd=a(t=>c.isFunction(t)||t===null||t===!1,"isResolvedHandle");function Wd(t,e){t=c.isArray(t)?t:[t];let{length:o}=t,n,i,r={};for(let s=0;s<o;s++){n=t[s];let p;if(i=n,!Gd(n)&&(i=$a[(p=String(n)).toLowerCase()],i===void 0))throw new N(`Unknown adapter '${p}'`);if(i&&(c.isFunction(i)||(i=i.get(e))))break;r[p||"#"+s]=i}if(!i){let s=Object.entries(r).map(([v,u])=>`adapter ${v} `+(u===!1?"is not supported by the environment":"is not available in the build")),p=o?s.length>1?`since :
|
|
5
|
+
`+s.map(Lp).join(`
|
|
6
|
+
`):" "+Lp(s[0]):"as no adapter specified";throw new N("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return i}a(Wd,"getAdapter");var Vi={getAdapter:Wd,adapters:$a};function Ja(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new mt(null,t)}a(Ja,"throwIfCancellationRequested");function Mi(t){return Ja(t),t.headers=ce.from(t.headers),t.data=Yn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Vi.getAdapter(t.adapter||an.adapter,t)(t).then(a(function(n){return Ja(t),n.data=Yn.call(t,t.transformResponse,n),n.headers=ce.from(n.headers),n},"onAdapterResolution"),a(function(n){return Zn(n)||(Ja(t),n&&n.response&&(n.response.data=Yn.call(t,t.transformResponse,n.response),n.response.headers=ce.from(n.response.headers))),Promise.reject(n)},"onAdapterRejection"))}a(Mi,"dispatchRequest");var _i={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{_i[t]=a(function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t},"validator")});var Bp={};_i.transitional=a(function(e,o,n){function i(r,s){return"[Axios v"+zr+"] Transitional option '"+r+"'"+s+(n?". "+n:"")}return a(i,"formatMessage"),(r,s,p)=>{if(e===!1)throw new N(i(s," has been removed"+(o?" in "+o:"")),N.ERR_DEPRECATED);return o&&!Bp[s]&&(Bp[s]=!0,console.warn(i(s," has been deprecated since v"+o+" and will be removed in the near future"))),e?e(r,s,p):!0}},"transitional");_i.spelling=a(function(e){return(o,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)},"spelling");function Kd(t,e,o){if(typeof t!="object")throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),i=n.length;for(;i-- >0;){let r=n[i],s=e[r];if(s){let p=t[r],v=p===void 0||s(p,r,t);if(v!==!0)throw new N("option "+r+" must be "+v,N.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new N("Unknown option "+r,N.ERR_BAD_OPTION)}}a(Kd,"assertOptions");var ti={assertOptions:Kd,validators:_i};var Zt=ti.validators,Li=class{static{a(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new Aa,response:new Aa}}async request(e,o){try{return await this._request(e,o)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;let r=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?r&&!String(n.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
7
|
+
`+r):n.stack=r}catch{}}throw n}}_request(e,o){typeof e=="string"?(o=o||{},o.url=e):o=e||{},o=Pt(this.defaults,o);let{transitional:n,paramsSerializer:i,headers:r}=o;n!==void 0&&ti.assertOptions(n,{silentJSONParsing:Zt.transitional(Zt.boolean),forcedJSONParsing:Zt.transitional(Zt.boolean),clarifyTimeoutError:Zt.transitional(Zt.boolean)},!1),i!=null&&(c.isFunction(i)?o.paramsSerializer={serialize:i}:ti.assertOptions(i,{encode:Zt.function,serialize:Zt.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),ti.assertOptions(o,{baseUrl:Zt.spelling("baseURL"),withXsrfToken:Zt.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let s=r&&c.merge(r.common,r[o.method]);r&&c.forEach(["delete","get","head","post","put","patch","common"],y=>{delete r[y]}),o.headers=ce.concat(s,r);let p=[],v=!0;this.interceptors.request.forEach(a(function(b){typeof b.runWhen=="function"&&b.runWhen(o)===!1||(v=v&&b.synchronous,p.unshift(b.fulfilled,b.rejected))},"unshiftRequestInterceptors"));let u=[];this.interceptors.response.forEach(a(function(b){u.push(b.fulfilled,b.rejected)},"pushResponseInterceptors"));let l,g=0,S;if(!v){let y=[Mi.bind(this),void 0];for(y.unshift(...p),y.push(...u),S=y.length,l=Promise.resolve(o);g<S;)l=l.then(y[g++],y[g++]);return l}S=p.length;let R=o;for(;g<S;){let y=p[g++],b=p[g++];try{R=y(R)}catch(h){b.call(this,h);break}}try{l=Mi.call(this,R)}catch(y){return Promise.reject(y)}for(g=0,S=u.length;g<S;)l=l.then(u[g++],u[g++]);return l}getUri(e){e=Pt(this.defaults,e);let o=Ir(e.baseURL,e.url,e.allowAbsoluteUrls);return Fr(o,e.params,e.paramsSerializer)}};c.forEach(["delete","get","head","options"],a(function(e){Li.prototype[e]=function(o,n){return this.request(Pt(n||{},{method:e,url:o,data:(n||{}).data}))}},"forEachMethodNoData"));c.forEach(["post","put","patch"],a(function(e){function o(n){return a(function(r,s,p){return this.request(Pt(p||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))},"httpMethod")}a(o,"generateHTTPMethod"),Li.prototype[e]=o(),Li.prototype[e+"Form"]=o(!0)},"forEachMethodWithData"));var oi=Li;var Xd=class Up{static{a(this,"CancelToken")}constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(a(function(r){o=r},"promiseExecutor"));let n=this;this.promise.then(i=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](i);n._listeners=null}),this.promise.then=i=>{let r,s=new Promise(p=>{n.subscribe(p),r=p}).then(i);return s.cancel=a(function(){n.unsubscribe(r)},"reject"),s},e(a(function(r,s,p){n.reason||(n.reason=new mt(r,s,p),o(n.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let o=this._listeners.indexOf(e);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let e=new AbortController,o=a(n=>{e.abort(n)},"abort");return this.subscribe(o),e.signal.unsubscribe=()=>this.unsubscribe(o),e.signal}static source(){let e;return{token:new Up(a(function(i){e=i},"executor")),cancel:e}}},qp=Xd;function Ga(t){return a(function(o){return t.apply(null,o)},"wrap")}a(Ga,"spread");function Wa(t){return c.isObject(t)&&t.isAxiosError===!0}a(Wa,"isAxiosError");var Ka={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ka).forEach(([t,e])=>{Ka[e]=t});var Qp=Ka;function Hp(t){let e=new oi(t),o=Jn(oi.prototype.request,e);return c.extend(o,oi.prototype,e,{allOwnKeys:!0}),c.extend(o,e,null,{allOwnKeys:!0}),o.create=a(function(i){return Hp(Pt(t,i))},"create"),o}a(Hp,"createInstance");var Se=Hp(an);Se.Axios=oi;Se.CanceledError=mt;Se.CancelToken=qp;Se.isCancel=Zn;Se.VERSION=zr;Se.toFormData=ar;Se.AxiosError=N;Se.Cancel=Se.CanceledError;Se.all=a(function(e){return Promise.all(e)},"all");Se.spread=Ga;Se.isAxiosError=Wa;Se.mergeConfig=Pt;Se.AxiosHeaders=ce;Se.formToJSON=t=>wi(c.isHTMLForm(t)?new FormData(t):t);Se.getAdapter=Vi.getAdapter;Se.HttpStatusCode=Qp;Se.default=Se;var Bi=Se;var{Axios:AS,AxiosError:wS,CanceledError:PS,isCancel:ES,CancelToken:DS,VERSION:jS,all:TS,Cancel:VS,isAxiosError:MS,spread:_S,toFormData:LS,AxiosHeaders:BS,HttpStatusCode:US,formToJSON:qS,getAdapter:QS,mergeConfig:HS}=Bi;import{Xml2JsToolkit as Nl,NativeCertificateRepository as Cl,SoapRemoteTransmissionRepository as bl,MemoryCacheAdapter as Rl}from"@nfets/core/infrastructure";import{EntitySigner as Fl,ValidateErrorsMetadata as Il}from"@nfets/core/application";import sl from"path";import{NFeTsError as pl,StateCodes as cl}from"@nfets/core/domain";import{ValidateErrorsMetadata as jc,Validates as Xr}from"@nfets/core/application";import{left as fl,right as dl}from"@nfets/core/shared";import{ConsultStatusPayload as ul}from"@nfets/nfe/infrastructure/dto/services/consult-status";import{InutilizacaoPayload as ll}from"@nfets/nfe/infrastructure/dto/services/inutilizacao";import{ConsultaProtocoloPayload as ml}from"@nfets/nfe/infrastructure/dto/services/consulta-protocolo";import{StateCodes as tl,Environment as ol}from"@nfets/core/domain";import{Type as rl}from"class-transformer";import{IsEnum as Ds,IsOptional as js,IsString as nl,IsNotEmpty as il}from"class-validator";import{Allow as Zu,IsNotEmpty as ku,IsNotEmptyObject as Oc,IsObject as xc,IsString as el,ValidateNested as Ac}from"class-validator";import{ArrayMaxSize as Ic,ArrayMinSize as Yu,IsNotEmptyObject as Ps,IsObject as Es,IsOptional as et,IsString as zc,ValidateNested as Ie}from"class-validator";import{Type as ze}from"class-transformer";import{ArrayMaxSize as Yd,IsArray as Zd,IsEnum as kd,IsOptional as it,IsString as D,ValidateNested as Ui}from"class-validator";import{Type as qi}from"class-transformer";import{Choice as eu,TransformDateString as Xa}from"@nfets/core/application";import{StateCodes as tu}from"@nfets/core";function A(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(A,"_ts_decorate");function w(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(w,"_ts_metadata");var ho=class{static{a(this,"RefNF")}cUF;AAMM;CNPJ;mod;serie;nNF};A([D(),w("design:type",String)],ho.prototype,"cUF",void 0);A([D(),w("design:type",String)],ho.prototype,"AAMM",void 0);A([D(),w("design:type",String)],ho.prototype,"CNPJ",void 0);A([D(),w("design:type",String)],ho.prototype,"mod",void 0);A([D(),w("design:type",String)],ho.prototype,"serie",void 0);A([D(),w("design:type",String)],ho.prototype,"nNF",void 0);var vt=class{static{a(this,"RefNFP")}cUF;AAMM;CNPJ="";CPF="";IE;mod;serie;nNF};A([D(),w("design:type",String)],vt.prototype,"cUF",void 0);A([D(),w("design:type",String)],vt.prototype,"AAMM",void 0);A([it(),D(),w("design:type",String)],vt.prototype,"CNPJ",void 0);A([it(),D(),w("design:type",String)],vt.prototype,"CPF",void 0);A([D(),w("design:type",String)],vt.prototype,"IE",void 0);A([D(),w("design:type",String)],vt.prototype,"mod",void 0);A([D(),w("design:type",String)],vt.prototype,"serie",void 0);A([D(),w("design:type",String)],vt.prototype,"nNF",void 0);vt=A([eu({properties:["CNPJ","CPF"],required:!0})],vt);var cn=class{static{a(this,"RefECF")}mod;nECF;nCOO};A([D(),w("design:type",String)],cn.prototype,"mod",void 0);A([D(),w("design:type",String)],cn.prototype,"nECF",void 0);A([D(),w("design:type",String)],cn.prototype,"nCOO",void 0);var So=class{static{a(this,"NFref")}refNFe;refNFeSig;refNF;refNFP;refCTe;refECF};A([it(),D(),w("design:type",String)],So.prototype,"refNFe",void 0);A([it(),D(),w("design:type",String)],So.prototype,"refNFeSig",void 0);A([it(),Ui(),qi(()=>ho),w("design:type",typeof IRefNF>"u"?Object:IRefNF)],So.prototype,"refNF",void 0);A([it(),Ui(),qi(()=>vt),w("design:type",typeof IRefNFP>"u"?Object:IRefNFP)],So.prototype,"refNFP",void 0);A([it(),D(),w("design:type",String)],So.prototype,"refCTe",void 0);A([it(),Ui(),qi(()=>cn),w("design:type",typeof IRefECF>"u"?Object:IRefECF)],So.prototype,"refECF",void 0);var J=class{static{a(this,"Ide")}cUF;cNF;natOp;mod;serie;nNF;dhEmi;dhSaiEnt;tpNF;idDest;cMunFG;tpImp;tpEmis;cDV="";tpAmb;finNFe;indFinal;indPres;indIntermed;procEmi;verProc;dhCont;xJust;NFref};A([kd(tu),w("design:type",typeof StateCode>"u"?Object:StateCode)],J.prototype,"cUF",void 0);A([D(),w("design:type",String)],J.prototype,"cNF",void 0);A([D(),w("design:type",String)],J.prototype,"natOp",void 0);A([D(),w("design:type",String)],J.prototype,"mod",void 0);A([D(),w("design:type",String)],J.prototype,"serie",void 0);A([D(),w("design:type",String)],J.prototype,"nNF",void 0);A([Xa({format:"YYYY-MM-DD[T]HH:mm:ssZ"}),w("design:type",String)],J.prototype,"dhEmi",void 0);A([it(),Xa({format:"YYYY-MM-DD[T]HH:mm:ssZ"}),w("design:type",String)],J.prototype,"dhSaiEnt",void 0);A([D(),w("design:type",String)],J.prototype,"tpNF",void 0);A([D(),w("design:type",String)],J.prototype,"idDest",void 0);A([D(),w("design:type",String)],J.prototype,"cMunFG",void 0);A([D(),w("design:type",String)],J.prototype,"tpImp",void 0);A([D(),w("design:type",typeof TpEmis>"u"?Object:TpEmis)],J.prototype,"tpEmis",void 0);A([D(),it(),w("design:type",String)],J.prototype,"cDV",void 0);A([D(),w("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],J.prototype,"tpAmb",void 0);A([D(),w("design:type",String)],J.prototype,"finNFe",void 0);A([D(),w("design:type",String)],J.prototype,"indFinal",void 0);A([D(),w("design:type",String)],J.prototype,"indPres",void 0);A([it(),D(),w("design:type",String)],J.prototype,"indIntermed",void 0);A([D(),w("design:type",String)],J.prototype,"procEmi",void 0);A([D(),w("design:type",String)],J.prototype,"verProc",void 0);A([it(),D(),Xa({format:"YYYY-MM-DD[T]HH:mm:ssZ"}),w("design:type",String)],J.prototype,"dhCont",void 0);A([it(),D(),w("design:type",String)],J.prototype,"xJust",void 0);A([it(),Zd(),Yd(999),Ui({each:!0}),qi(()=>So),w("design:type",Array)],J.prototype,"NFref",void 0);import{IsOptional as fn,IsString as No,ValidateNested as ou}from"class-validator";import{Choice as ru}from"@nfets/core/application";import{Type as nu}from"class-transformer";import{IsOptional as Qi,IsString as jt}from"class-validator";function Et(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Et,"_ts_decorate");function Dt(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Dt,"_ts_metadata");var Te=class{static{a(this,"EnderEmit")}xLgr;nro;xCpl;xBairro;cMun;xMun;UF;CEP;cPais;xPais;fone};Et([jt(),Dt("design:type",String)],Te.prototype,"xLgr",void 0);Et([jt(),Dt("design:type",String)],Te.prototype,"nro",void 0);Et([Qi(),jt(),Dt("design:type",String)],Te.prototype,"xCpl",void 0);Et([jt(),Dt("design:type",String)],Te.prototype,"xBairro",void 0);Et([jt(),Dt("design:type",String)],Te.prototype,"cMun",void 0);Et([jt(),Dt("design:type",String)],Te.prototype,"xMun",void 0);Et([jt(),Dt("design:type",String)],Te.prototype,"UF",void 0);Et([jt(),Dt("design:type",String)],Te.prototype,"CEP",void 0);Et([Qi(),jt(),Dt("design:type",String)],Te.prototype,"cPais",void 0);Et([Qi(),jt(),Dt("design:type",String)],Te.prototype,"xPais",void 0);Et([Qi(),jt(),Dt("design:type",String)],Te.prototype,"fone",void 0);function Tt(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Tt,"_ts_decorate");function kt(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(kt,"_ts_metadata");var Ue=class{static{a(this,"Emit")}CNPJ="";CPF="";xNome;xFant;enderEmit;IE;IEST;IM;CNAE;CRT};Tt([fn(),No(),kt("design:type",String)],Ue.prototype,"CNPJ",void 0);Tt([fn(),No(),kt("design:type",String)],Ue.prototype,"CPF",void 0);Tt([No(),kt("design:type",String)],Ue.prototype,"xNome",void 0);Tt([fn(),No(),kt("design:type",String)],Ue.prototype,"xFant",void 0);Tt([ou(),nu(()=>Te),kt("design:type",typeof Te>"u"?Object:Te)],Ue.prototype,"enderEmit",void 0);Tt([No(),kt("design:type",String)],Ue.prototype,"IE",void 0);Tt([fn(),No(),kt("design:type",String)],Ue.prototype,"IEST",void 0);Tt([fn(),No(),kt("design:type",String)],Ue.prototype,"IM",void 0);Tt([fn(),No(),kt("design:type",String)],Ue.prototype,"CNAE",void 0);Tt([No(),kt("design:type",String)],Ue.prototype,"CRT",void 0);Ue=Tt([ru({properties:["CNPJ","CPF"],required:!0})],Ue);import{IsOptional as Co,IsString as bo,ValidateNested as iu}from"class-validator";import{Type as au}from"class-transformer";import{IsOptional as _t,IsString as Lt}from"class-validator";function Vt(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Vt,"_ts_decorate");function Mt(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Mt,"_ts_metadata");var Xe=class{static{a(this,"EnderDest")}xLgr;nro;xCpl;xBairro;cMun;xMun;UF;CEP;cPais;xPais;fone};Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"xLgr",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"nro",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"xCpl",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"xBairro",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"cMun",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"xMun",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"UF",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"CEP",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"cPais",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"xPais",void 0);Vt([_t(),Lt(),Mt("design:type",String)],Xe.prototype,"fone",void 0);import{Choice as su}from"@nfets/core/application";function Bt(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Bt,"_ts_decorate");function eo(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(eo,"_ts_metadata");var qe=class{static{a(this,"Dest")}CNPJ="";CPF="";idEstrangeiro;xNome;enderDest;indIEDest;IE;ISUF;IM;email};Bt([Co(),bo(),eo("design:type",String)],qe.prototype,"CNPJ",void 0);Bt([Co(),bo(),eo("design:type",String)],qe.prototype,"CPF",void 0);Bt([Co(),bo(),eo("design:type",String)],qe.prototype,"idEstrangeiro",void 0);Bt([Co(),bo(),eo("design:type",String)],qe.prototype,"xNome",void 0);Bt([Co(),iu(),au(()=>Xe),eo("design:type",typeof IEnderDest>"u"?Object:IEnderDest)],qe.prototype,"enderDest",void 0);Bt([bo(),eo("design:type",String)],qe.prototype,"indIEDest",void 0);Bt([Co(),bo(),eo("design:type",String)],qe.prototype,"IE",void 0);Bt([Co(),bo(),eo("design:type",String)],qe.prototype,"ISUF",void 0);Bt([Co(),bo(),eo("design:type",String)],qe.prototype,"IM",void 0);Bt([Co(),bo(),eo("design:type",String)],qe.prototype,"email",void 0);qe=Bt([su({properties:["CNPJ","CPF"],required:!0})],qe);import{IsOptional as to,IsString as He}from"class-validator";import{Choice as pu}from"@nfets/core/application";function Ve(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Ve,"_ts_decorate");function Qe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Qe,"_ts_metadata");var fe=class{static{a(this,"Local")}CNPJ;CPF;xNome;xLgr;nro;xCpl;xBairro;cMun;xMun;UF;CEP;cPais;xPais;fone;email;IE};Ve([to(),He(),Qe("design:type",String)],fe.prototype,"CNPJ",void 0);Ve([to(),He(),Qe("design:type",String)],fe.prototype,"CPF",void 0);Ve([to(),He(),Qe("design:type",String)],fe.prototype,"xNome",void 0);Ve([He(),Qe("design:type",String)],fe.prototype,"xLgr",void 0);Ve([He(),Qe("design:type",String)],fe.prototype,"nro",void 0);Ve([to(),He(),Qe("design:type",String)],fe.prototype,"xCpl",void 0);Ve([He(),Qe("design:type",String)],fe.prototype,"xBairro",void 0);Ve([He(),Qe("design:type",String)],fe.prototype,"cMun",void 0);Ve([He(),Qe("design:type",String)],fe.prototype,"xMun",void 0);Ve([He(),Qe("design:type",String)],fe.prototype,"UF",void 0);Ve([to(),He(),Qe("design:type",String)],fe.prototype,"CEP",void 0);Ve([to(),He(),Qe("design:type",String)],fe.prototype,"cPais",void 0);Ve([to(),He(),Qe("design:type",String)],fe.prototype,"xPais",void 0);Ve([to(),He(),Qe("design:type",String)],fe.prototype,"fone",void 0);Ve([to(),He(),Qe("design:type",String)],fe.prototype,"email",void 0);Ve([to(),He(),Qe("design:type",String)],fe.prototype,"IE",void 0);fe=Ve([pu({properties:["CNPJ","CPF"]})],fe);import{IsOptional as Jp,IsString as Gp}from"class-validator";import{Choice as cu}from"@nfets/core/application";function Ya(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Ya,"_ts_decorate");function $p(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a($p,"_ts_metadata");var cr=class{static{a(this,"AutXML")}CNPJ;CPF};Ya([Jp(),Gp(),$p("design:type",String)],cr.prototype,"CNPJ",void 0);Ya([Jp(),Gp(),$p("design:type",String)],cr.prototype,"CPF",void 0);cr=Ya([cu({properties:["CNPJ","CPF"]})],cr);import{IsOptional as fu,IsString as Xp}from"class-validator";function Wp(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Wp,"_ts_decorate");function Kp(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Kp,"_ts_metadata");var dn=class{static{a(this,"InfIntermed")}CNPJ;idCadIntTran};Wp([Xp(),Kp("design:type",String)],dn.prototype,"CNPJ",void 0);Wp([fu(),Xp(),Kp("design:type",String)],dn.prototype,"idCadIntTran",void 0);import{IsOptional as Yp,IsString as es}from"class-validator";function Za(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Za,"_ts_decorate");function ka(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ka,"_ts_metadata");var xr=class{static{a(this,"Exporta")}UFSaidaPais;xLocExporta;xLocDespacho};Za([es(),ka("design:type",String)],xr.prototype,"UFSaidaPais",void 0);Za([Yp(),es(),ka("design:type",String)],xr.prototype,"xLocExporta",void 0);Za([Yp(),es(),ka("design:type",String)],xr.prototype,"xLocDespacho",void 0);import{IsOptional as rs,IsString as ns}from"class-validator";function ts(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(ts,"_ts_decorate");function os(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(os,"_ts_metadata");var Ar=class{static{a(this,"Compra")}xNEmp;xPed;xCont};ts([rs(),ns(),os("design:type",String)],Ar.prototype,"xNEmp",void 0);ts([rs(),ns(),os("design:type",String)],Ar.prototype,"xPed",void 0);ts([rs(),ns(),os("design:type",String)],Ar.prototype,"xCont",void 0);import{IsOptional as Zp,IsString as mn}from"class-validator";function un(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(un,"_ts_decorate");function ln(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ln,"_ts_metadata");var oo=class{static{a(this,"InfRespTec")}CNPJ;xContato;email;fone;idCSRT;hashCSRT};un([mn(),ln("design:type",String)],oo.prototype,"CNPJ",void 0);un([mn(),ln("design:type",String)],oo.prototype,"xContato",void 0);un([mn(),ln("design:type",String)],oo.prototype,"email",void 0);un([mn(),ln("design:type",String)],oo.prototype,"fone",void 0);un([Zp(),mn(),ln("design:type",String)],oo.prototype,"idCSRT",void 0);un([Zp(),mn(),ln("design:type",String)],oo.prototype,"hashCSRT",void 0);import{IsOptional as kp,ValidateNested as ss}from"class-validator";import{Type as ps}from"class-transformer";import{IsOptional as ro}from"class-validator";import{TransformDecimal as H}from"@nfets/core/application";function q(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(q,"_ts_decorate");function Q(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Q,"_ts_metadata");var M=class{static{a(this,"ICMSTot")}vBC="0.00";vICMS="0.00";vICMSDeson="0.00";vFCPUFDest;vICMSUFDest;vICMSUFRemet;vFCP="0.00";vBCST="0.00";vST="0.00";vFCPST="0.00";vFCPSTRet="0.00";qBCMono;vICMSMono;qBCMonoReten;vICMSMonoReten;qBCMonoRet;vICMSMonoRet;vProd="0.00";vFrete="0.00";vSeg="0.00";vDesc="0.00";vII="0.00";vIPI="0.00";vIPIDevol="0.00";vPIS="0.00";vCOFINS="0.00";vOutro="0.00";vNF="0.00";vTotTrib};q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vBC",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vICMS",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vICMSDeson",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vFCPUFDest",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vICMSUFDest",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vICMSUFRemet",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vFCP",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vBCST",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vST",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vFCPST",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vFCPSTRet",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"qBCMono",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vICMSMono",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"qBCMonoReten",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vICMSMonoReten",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"qBCMonoRet",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vICMSMonoRet",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vProd",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vFrete",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vSeg",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vDesc",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vII",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vIPI",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vIPIDevol",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vPIS",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vCOFINS",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vOutro",void 0);q([H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vNF",void 0);q([ro(),H({fixed:2}),Q("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],M.prototype,"vTotTrib",void 0);import{IsOptional as Ut,IsString as Ft}from"class-validator";function bt(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(bt,"_ts_decorate");function Rt(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Rt,"_ts_metadata");var $e=class{static{a(this,"ISSQNTot")}vServ;vBC;vISS;vPIS;vCOFINS;dCompet;vDeducao;vOutro;vDescIncond;vDescCond;vISSRet;cRegTrib};bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vServ",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vBC",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vISS",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vPIS",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vCOFINS",void 0);bt([Ft(),Rt("design:type",String)],$e.prototype,"dCompet",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vDeducao",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vOutro",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vDescIncond",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vDescCond",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"vISSRet",void 0);bt([Ut(),Ft(),Rt("design:type",String)],$e.prototype,"cRegTrib",void 0);import{IsOptional as Er}from"class-validator";import{TransformDecimal as Dr}from"@nfets/core/application";function wr(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(wr,"_ts_decorate");function Pr(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Pr,"_ts_metadata");var qt=class{static{a(this,"RetTrib")}vRetPIS;vRetCOFINS;vRetCSLL;vBCIRRF;vIRRF;vBCRetPrev;vRetPrev};wr([Er(),Dr({fixed:2}),Pr("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qt.prototype,"vRetPIS",void 0);wr([Er(),Dr({fixed:2}),Pr("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qt.prototype,"vRetCOFINS",void 0);wr([Er(),Dr({fixed:2}),Pr("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qt.prototype,"vRetCSLL",void 0);wr([Er(),Dr({fixed:2}),Pr("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qt.prototype,"vBCIRRF",void 0);wr([Er(),Dr({fixed:2}),Pr("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qt.prototype,"vIRRF",void 0);wr([Er(),Dr({fixed:2}),Pr("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qt.prototype,"vBCRetPrev",void 0);wr([Er(),Dr({fixed:2}),Pr("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qt.prototype,"vRetPrev",void 0);function is(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(is,"_ts_decorate");function as(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(as,"_ts_metadata");var jr=class{static{a(this,"Total")}ICMSTot;ISSQNtot;retTrib};is([ss(),ps(()=>M),as("design:type",typeof IICMSTot>"u"?Object:IICMSTot)],jr.prototype,"ICMSTot",void 0);is([kp(),ss(),ps(()=>$e),as("design:type",typeof IISSQNTot>"u"?Object:IISSQNTot)],jr.prototype,"ISSQNtot",void 0);is([kp(),ss(),ps(()=>qt),as("design:type",typeof IRetTrib>"u"?Object:IRetTrib)],jr.prototype,"retTrib",void 0);import{ArrayMaxSize as rc,IsOptional as Lr,IsString as cs,ValidateNested as ri}from"class-validator";import{Type as ni}from"class-transformer";import{IsOptional as Vr,IsString as Mr}from"class-validator";import{Choice as du}from"@nfets/core/application";function fr(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(fr,"_ts_decorate");function Tr(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Tr,"_ts_metadata");var Je=class{static{a(this,"Transporta")}CNPJ;CPF;xNome;IE;xEnder;xMun;UF};fr([Vr(),Mr(),Tr("design:type",String)],Je.prototype,"CNPJ",void 0);fr([Vr(),Mr(),Tr("design:type",String)],Je.prototype,"CPF",void 0);fr([Vr(),Mr(),Tr("design:type",String)],Je.prototype,"xNome",void 0);fr([Vr(),Mr(),Tr("design:type",String)],Je.prototype,"IE",void 0);fr([Vr(),Mr(),Tr("design:type",String)],Je.prototype,"xEnder",void 0);fr([Vr(),Mr(),Tr("design:type",String)],Je.prototype,"xMun",void 0);fr([Vr(),Mr(),Tr("design:type",String)],Je.prototype,"UF",void 0);Je=fr([du({properties:["CNPJ","CPF"]})],Je);import{IsOptional as gn,IsString as ec}from"class-validator";import{TransformDecimal as Hi}from"@nfets/core/application";function vn(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(vn,"_ts_decorate");function yn(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(yn,"_ts_metadata");var yt=class{static{a(this,"RetTransp")}vServ;vBCRet;pICMSRet;vICMSRet;CFOP;cMunFG};vn([gn(),Hi({fixed:2}),yn("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],yt.prototype,"vServ",void 0);vn([gn(),Hi({fixed:2}),yn("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],yt.prototype,"vBCRet",void 0);vn([gn(),Hi({fixed:4}),yn("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],yt.prototype,"pICMSRet",void 0);vn([gn(),Hi({fixed:2}),yn("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],yt.prototype,"vICMSRet",void 0);vn([gn(),ec(),yn("design:type",String)],yt.prototype,"CFOP",void 0);vn([gn(),ec(),yn("design:type",String)],yt.prototype,"cMunFG",void 0);import{IsOptional as Nn,IsString as Cn}from"class-validator";function hn(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(hn,"_ts_decorate");function Sn(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Sn,"_ts_metadata");var no=class{static{a(this,"VeicTransp")}placa;UF;RNTC};hn([Nn(),Cn(),Sn("design:type",String)],no.prototype,"placa",void 0);hn([Nn(),Cn(),Sn("design:type",String)],no.prototype,"UF",void 0);hn([Nn(),Cn(),Sn("design:type",String)],no.prototype,"RNTC",void 0);var _r=class{static{a(this,"Reboque")}placa;UF;RNTC};hn([Nn(),Cn(),Sn("design:type",String)],_r.prototype,"placa",void 0);hn([Nn(),Cn(),Sn("design:type",String)],_r.prototype,"UF",void 0);hn([Nn(),Cn(),Sn("design:type",String)],_r.prototype,"RNTC",void 0);import{IsOptional as Fn,IsString as $i}from"class-validator";import{TransformDecimal as tc}from"@nfets/core/application";function bn(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(bn,"_ts_decorate");function Rn(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Rn,"_ts_metadata");var io=class{static{a(this,"Vol")}qVol;esp;marca;nVol;pesoL;pesoB};bn([Fn(),$i(),Rn("design:type",String)],io.prototype,"qVol",void 0);bn([Fn(),$i(),Rn("design:type",String)],io.prototype,"esp",void 0);bn([Fn(),$i(),Rn("design:type",String)],io.prototype,"marca",void 0);bn([Fn(),$i(),Rn("design:type",String)],io.prototype,"nVol",void 0);bn([Fn(),tc({fixed:3}),Rn("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],io.prototype,"pesoL",void 0);bn([Fn(),tc({fixed:3}),Rn("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],io.prototype,"pesoB",void 0);import{Choice as oc}from"@nfets/core/application";function Ro(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Ro,"_ts_decorate");function dr(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(dr,"_ts_metadata");var at=class{static{a(this,"Transp")}modFrete;transporta;retTransp;veicTransp;reboque;vagao;balsa;vol};Ro([cs(),dr("design:type",String)],at.prototype,"modFrete",void 0);Ro([Lr(),ri(),ni(()=>Je),dr("design:type",typeof Je>"u"?Object:Je)],at.prototype,"transporta",void 0);Ro([Lr(),ri(),ni(()=>yt),dr("design:type",typeof yt>"u"?Object:yt)],at.prototype,"retTransp",void 0);Ro([Lr(),ri(),ni(()=>no),dr("design:type",typeof no>"u"?Object:no)],at.prototype,"veicTransp",void 0);Ro([Lr(),ri({each:!0}),ni(()=>_r),rc(5),dr("design:type",Array)],at.prototype,"reboque",void 0);Ro([Lr(),cs(),dr("design:type",String)],at.prototype,"vagao",void 0);Ro([Lr(),cs(),dr("design:type",String)],at.prototype,"balsa",void 0);Ro([Lr(),ri({each:!0}),ni(()=>io),rc(5e3),dr("design:type",Array)],at.prototype,"vol",void 0);at=Ro([oc({properties:["veicTransp","reboque"]}),oc({properties:["vagao","balsa"]})],at);import{ArrayMaxSize as uu,IsOptional as Oo,IsString as fs,ValidateNested as nc}from"class-validator";import{Type as ic}from"class-transformer";import{TransformDecimal as Ji}from"@nfets/core/application";function Io(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Io,"_ts_decorate");function zo(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(zo,"_ts_metadata");var Fo=class{static{a(this,"Fat")}nFat;vOrig;vDesc;vLiq};Io([Oo(),fs(),zo("design:type",String)],Fo.prototype,"nFat",void 0);Io([Oo(),Ji({fixed:2}),zo("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Fo.prototype,"vOrig",void 0);Io([Oo(),Ji({fixed:2}),zo("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Fo.prototype,"vDesc",void 0);Io([Oo(),Ji({fixed:2}),zo("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Fo.prototype,"vLiq",void 0);var In=class{static{a(this,"Dup")}nDup;dVenc;vDup};Io([Oo(),fs(),zo("design:type",String)],In.prototype,"nDup",void 0);Io([Oo(),fs(),zo("design:type",String)],In.prototype,"dVenc",void 0);Io([Oo(),Ji({fixed:2}),zo("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],In.prototype,"vDup",void 0);var zn=class{static{a(this,"Cobr")}fat;dup};Io([Oo(),nc(),ic(()=>Fo),zo("design:type",typeof Fo>"u"?Object:Fo)],zn.prototype,"fat",void 0);Io([Oo(),nc({each:!0}),uu(120),ic(()=>In),zo("design:type",Array)],zn.prototype,"dup",void 0);import{ArrayMaxSize as yu,ArrayMinSize as gu,IsOptional as hu,ValidateNested as Su}from"class-validator";import{Type as Nu}from"class-transformer";import{IsOptional as vs,IsString as ys,ValidateNested as lu}from"class-validator";import{Type as mu}from"class-transformer";import{IsOptional as ls,IsString as ms}from"class-validator";function ds(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(ds,"_ts_decorate");function us(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(us,"_ts_metadata");var ao=class{static{a(this,"Card")}cNPJ;tBand;cAut};ds([ls(),ms(),us("design:type",String)],ao.prototype,"cNPJ",void 0);ds([ls(),ms(),us("design:type",String)],ao.prototype,"tBand",void 0);ds([ls(),ms(),us("design:type",String)],ao.prototype,"cAut",void 0);import{TransformDecimal as vu}from"@nfets/core/application";function ii(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(ii,"_ts_decorate");function ai(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ai,"_ts_metadata");var xo=class{static{a(this,"DetPag")}indPag;tPag;vPag;card;xPag};ii([vs(),ys(),ai("design:type",String)],xo.prototype,"indPag",void 0);ii([ys(),ai("design:type",typeof TPag>"u"?Object:TPag)],xo.prototype,"tPag",void 0);ii([vu({fixed:2}),ai("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],xo.prototype,"vPag",void 0);ii([vs(),lu(),mu(()=>ao),ai("design:type",typeof ao>"u"?Object:ao)],xo.prototype,"card",void 0);ii([vs(),ys(),ai("design:type",String)],xo.prototype,"xPag",void 0);import{TransformDecimal as Cu}from"@nfets/core/application";function ac(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(ac,"_ts_decorate");function sc(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(sc,"_ts_metadata");var On=class{static{a(this,"Pag")}detPag;vTroco};ac([Su({each:!0}),gu(1),yu(100),Nu(()=>xo),sc("design:type",Array)],On.prototype,"detPag",void 0);ac([hu(),Cu({fixed:2}),sc("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],On.prototype,"vTroco",void 0);import{ArrayMaxSize as gs,IsOptional as Br,IsString as An,ValidateNested as hs}from"class-validator";import{Type as Ss}from"class-transformer";function wo(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(wo,"_ts_decorate");function Po(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Po,"_ts_metadata");var xn=class{static{a(this,"InfAdicObs")}xCampo;xTexto};wo([An(),Po("design:type",String)],xn.prototype,"xCampo",void 0);wo([An(),Po("design:type",String)],xn.prototype,"xTexto",void 0);var si=class{static{a(this,"ProcRef")}nProc;indProc};wo([Br(),An(),Po("design:type",String)],si.prototype,"nProc",void 0);wo([Br(),An(),Po("design:type",String)],si.prototype,"indProc",void 0);var Ao=class{static{a(this,"InfAdic")}infAdFisco;infCpl;obsCont;obsFisco;procRef};wo([Br(),An(),Po("design:type",String)],Ao.prototype,"infAdFisco",void 0);wo([Br(),An(),Po("design:type",String)],Ao.prototype,"infCpl",void 0);wo([Br(),hs({each:!0}),Ss(()=>xn),gs(10),Po("design:type",Array)],Ao.prototype,"obsCont",void 0);wo([Br(),hs({each:!0}),Ss(()=>xn),gs(10),Po("design:type",Array)],Ao.prototype,"obsFisco",void 0);wo([Br(),hs({each:!0}),Ss(()=>si),gs(100),Po("design:type",Array)],Ao.prototype,"procRef",void 0);import{ArrayMaxSize as pc,IsNotEmptyObject as bu,IsObject as Ru,IsOptional as Ur,IsString as ur,ValidateNested as cc}from"class-validator";import{Type as Ns}from"class-transformer";import{TransformDecimal as Wi}from"@nfets/core/application";function Ye(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Ye,"_ts_decorate");function Ze(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Ze,"_ts_metadata");var Gi=class{static{a(this,"ForDiaAttributes")}dia};Ye([ur(),Ze("design:type",String)],Gi.prototype,"dia",void 0);var pi=class{static{a(this,"ForDia")}$;qtde};Ye([Ru(),bu(),Ns(()=>Gi),Ze("design:type",typeof IForDiaAttributes>"u"?Object:IForDiaAttributes)],pi.prototype,"$",void 0);Ye([ur(),Ze("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],pi.prototype,"qtde",void 0);var ci=class{static{a(this,"Deduc")}xDed;vDed};Ye([ur(),Ze("design:type",String)],ci.prototype,"xDed",void 0);Ye([Wi({fixed:2}),Ze("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ci.prototype,"vDed",void 0);var st=class{static{a(this,"Cana")}safra;ref;forDia;qTotMes;qTotAnt;qTotGer;deduc;vFor;vTotDed;vLiqFor};Ye([ur(),Ze("design:type",String)],st.prototype,"safra",void 0);Ye([ur(),Ze("design:type",String)],st.prototype,"ref",void 0);Ye([cc({each:!0}),pc(31),Ns(()=>pi),Ze("design:type",Array)],st.prototype,"forDia",void 0);Ye([Ur(),ur(),Ze("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],st.prototype,"qTotMes",void 0);Ye([Ur(),ur(),Ze("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],st.prototype,"qTotAnt",void 0);Ye([Ur(),ur(),Ze("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],st.prototype,"qTotGer",void 0);Ye([Ur(),cc({each:!0}),pc(10),Ns(()=>ci),Ze("design:type",Array)],st.prototype,"deduc",void 0);Ye([Ur(),Wi({fixed:2}),Ze("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],st.prototype,"vFor",void 0);Ye([Ur(),Wi({fixed:2}),Ze("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],st.prototype,"vTotDed",void 0);Ye([Ur(),Wi({fixed:2}),Ze("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],st.prototype,"vLiqFor",void 0);import{IsObject as Hu,IsOptional as ma,IsString as Fc,ValidateNested as hi}from"class-validator";import{Type as Si}from"class-transformer";import{ArrayMaxSize as yi,IsArray as ea,IsObject as Hr,IsOptional as k,IsString as Ne,ValidateNested as jo}from"class-validator";import{TransformDecimal as To}from"@nfets/core/application";import{Type as Vo}from"class-transformer";import{IsOptional as Ki,IsString as ui}from"class-validator";function fi(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(fi,"_ts_decorate");function di(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(di,"_ts_metadata");var Eo=class{static{a(this,"Rastro")}nLote;qLote;dFab;dVal;cAgreg};fi([ui(),di("design:type",String)],Eo.prototype,"nLote",void 0);fi([Ki(),ui(),di("design:type",String)],Eo.prototype,"qLote",void 0);fi([Ki(),ui(),di("design:type",String)],Eo.prototype,"dFab",void 0);fi([Ki(),ui(),di("design:type",String)],Eo.prototype,"dVal",void 0);fi([Ki(),ui(),di("design:type",String)],Eo.prototype,"cAgreg",void 0);import{Choice as Vu}from"@nfets/core/application";import{IsString as pt,IsOptional as li,IsArray as Fu,ValidateNested as Iu,ArrayMaxSize as zu,ArrayMinSize as Ou}from"class-validator";import{Type as xu}from"class-transformer";import{TransformDecimal as fc,Choice as Au}from"@nfets/core/application";function Pe(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Pe,"_ts_decorate");function Me(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Me,"_ts_metadata");var lr=class{static{a(this,"Adi")}nAdicao;nSeqAdic;cFabricante;vDescDI;nDraw};Pe([pt(),Me("design:type",String)],lr.prototype,"nAdicao",void 0);Pe([pt(),Me("design:type",String)],lr.prototype,"nSeqAdic",void 0);Pe([pt(),Me("design:type",String)],lr.prototype,"cFabricante",void 0);Pe([fc({fixed:2}),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],lr.prototype,"vDescDI",void 0);Pe([li(),pt(),Me("design:type",String)],lr.prototype,"nDraw",void 0);var we=class{static{a(this,"DI")}nDI;dDI;xLocDesemb;UFDesemb;dDesemb;tpViaTransp;vAFRMM;tpIntermedio;CNPJ="";CPF="";UFTerceiro;adi};Pe([pt(),Me("design:type",String)],we.prototype,"nDI",void 0);Pe([pt(),Me("design:type",String)],we.prototype,"dDI",void 0);Pe([pt(),Me("design:type",String)],we.prototype,"xLocDesemb",void 0);Pe([pt(),Me("design:type",String)],we.prototype,"UFDesemb",void 0);Pe([pt(),Me("design:type",String)],we.prototype,"dDesemb",void 0);Pe([pt(),Me("design:type",String)],we.prototype,"tpViaTransp",void 0);Pe([li(),fc({fixed:2}),Me("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],we.prototype,"vAFRMM",void 0);Pe([pt(),Me("design:type",String)],we.prototype,"tpIntermedio",void 0);Pe([pt(),li(),Me("design:type",String)],we.prototype,"CNPJ",void 0);Pe([pt(),li(),Me("design:type",String)],we.prototype,"CPF",void 0);Pe([pt(),li(),Me("design:type",String)],we.prototype,"UFTerceiro",void 0);Pe([Fu(),Iu({each:!0}),xu(()=>lr),zu(999),Ou(1),Me("design:type",Array)],we.prototype,"adi",void 0);we=Pe([Au({properties:["CNPJ","CPF"],required:!0})],we);import{Type as wu}from"class-transformer";import{IsOptional as dc,IsString as Cs,ValidateNested as Pu}from"class-validator";import{TransformDecimal as Eu}from"@nfets/core/application";function mi(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(mi,"_ts_decorate");function vi(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(vi,"_ts_metadata");var wn=class{static{a(this,"ExportInd")}nRE;chNFe;qExport};mi([Cs(),vi("design:type",String)],wn.prototype,"nRE",void 0);mi([Cs(),vi("design:type",String)],wn.prototype,"chNFe",void 0);mi([Eu({fixed:4}),vi("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],wn.prototype,"qExport",void 0);var Pn=class{static{a(this,"DetExport")}nDraw;exportInd};mi([dc(),Cs(),vi("design:type",String)],Pn.prototype,"nDraw",void 0);mi([dc(),Pu(),wu(()=>wn),vi("design:type",typeof IExportInd>"u"?Object:IExportInd)],Pn.prototype,"exportInd",void 0);import{IsString as mc}from"class-validator";function uc(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(uc,"_ts_decorate");function lc(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(lc,"_ts_metadata");var En=class{static{a(this,"InfProdNFF")}cProdFisco;cOperNFF};uc([mc(),lc("design:type",String)],En.prototype,"cProdFisco",void 0);uc([mc(),lc("design:type",String)],En.prototype,"cOperNFF",void 0);import{IsString as vc}from"class-validator";import{TransformDecimal as Du}from"@nfets/core/application";function bs(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(bs,"_ts_decorate");function Rs(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Rs,"_ts_metadata");var qr=class{static{a(this,"InfProdEmb")}xEmb;qVolEmb;uEmb};bs([vc(),Rs("design:type",String)],qr.prototype,"xEmb",void 0);bs([Du({fixed:3}),Rs("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qr.prototype,"qVolEmb",void 0);bs([vc(),Rs("design:type",String)],qr.prototype,"uEmb",void 0);import{IsString as oe}from"class-validator";function ee(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(ee,"_ts_decorate");function te(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(te,"_ts_metadata");var G=class{static{a(this,"VeicProd")}tpOp;chassi;cCor;xCor;pot;cilin;pesoL;pesoB;nSerie;tpComb;nMotor;CMT;dist;anoMod;anoFab;tpPint;tpVeic;espVeic;VIN;condVeic;cMod;cCorDENATRAN;lota;tpRest};ee([oe(),te("design:type",String)],G.prototype,"tpOp",void 0);ee([oe(),te("design:type",String)],G.prototype,"chassi",void 0);ee([oe(),te("design:type",String)],G.prototype,"cCor",void 0);ee([oe(),te("design:type",String)],G.prototype,"xCor",void 0);ee([oe(),te("design:type",String)],G.prototype,"pot",void 0);ee([oe(),te("design:type",String)],G.prototype,"cilin",void 0);ee([oe(),te("design:type",String)],G.prototype,"pesoL",void 0);ee([oe(),te("design:type",String)],G.prototype,"pesoB",void 0);ee([oe(),te("design:type",String)],G.prototype,"nSerie",void 0);ee([oe(),te("design:type",String)],G.prototype,"tpComb",void 0);ee([oe(),te("design:type",String)],G.prototype,"nMotor",void 0);ee([oe(),te("design:type",String)],G.prototype,"CMT",void 0);ee([oe(),te("design:type",String)],G.prototype,"dist",void 0);ee([oe(),te("design:type",String)],G.prototype,"anoMod",void 0);ee([oe(),te("design:type",String)],G.prototype,"anoFab",void 0);ee([oe(),te("design:type",String)],G.prototype,"tpPint",void 0);ee([oe(),te("design:type",String)],G.prototype,"tpVeic",void 0);ee([oe(),te("design:type",String)],G.prototype,"espVeic",void 0);ee([oe(),te("design:type",String)],G.prototype,"VIN",void 0);ee([oe(),te("design:type",String)],G.prototype,"condVeic",void 0);ee([oe(),te("design:type",String)],G.prototype,"cMod",void 0);ee([oe(),te("design:type",String)],G.prototype,"cCorDENATRAN",void 0);ee([oe(),te("design:type",String)],G.prototype,"lota",void 0);ee([oe(),te("design:type",String)],G.prototype,"tpRest",void 0);import{IsString as yc}from"class-validator";import{TransformDecimal as ju}from"@nfets/core/application";function Fs(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Fs,"_ts_decorate");function Is(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Is,"_ts_metadata");var Qr=class{static{a(this,"Med")}cProdANVISA;xMotivoIsencao;vPMC};Fs([yc(),Is("design:type",String)],Qr.prototype,"cProdANVISA",void 0);Fs([yc(),Is("design:type",String)],Qr.prototype,"xMotivoIsencao",void 0);Fs([ju({fixed:2}),Is("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Qr.prototype,"vPMC",void 0);import{IsString as Zi}from"class-validator";function Xi(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Xi,"_ts_decorate");function Yi(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Yi,"_ts_metadata");var mr=class{static{a(this,"Arma")}tpArma;nSerie;nCano;descr};Xi([Zi(),Yi("design:type",String)],mr.prototype,"tpArma",void 0);Xi([Zi(),Yi("design:type",String)],mr.prototype,"nSerie",void 0);Xi([Zi(),Yi("design:type",String)],mr.prototype,"nCano",void 0);Xi([Zi(),Yi("design:type",String)],mr.prototype,"descr",void 0);import{IsString as Do,IsOptional as yr,IsObject as zs,ValidateNested as Os,ArrayMaxSize as Tu,Max as ki}from"class-validator";import{Type as xs}from"class-transformer";import{TransformDecimal as It}from"@nfets/core/application";function re(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(re,"_ts_decorate");function ne(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ne,"_ts_metadata");var Dn=class{static{a(this,"OrigComb")}indImport;cUFOrig;pOrig};re([Do(),ne("design:type",String)],Dn.prototype,"indImport",void 0);re([Do(),ne("design:type",String)],Dn.prototype,"cUFOrig",void 0);re([It({fixed:4}),ki(100),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Dn.prototype,"pOrig",void 0);var jn=class{static{a(this,"CIDE")}qBCProd;vAliqProd;vCIDE};re([It({fixed:4}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],jn.prototype,"qBCProd",void 0);re([It({fixed:4}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],jn.prototype,"vAliqProd",void 0);re([It({fixed:2}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],jn.prototype,"vCIDE",void 0);var vr=class{static{a(this,"Encerrante")}nBico;nBomba;nTanque;vEncIni;vEncFin};re([Do(),ne("design:type",String)],vr.prototype,"nBico",void 0);re([Do(),ne("design:type",String)],vr.prototype,"nBomba",void 0);re([Do(),ne("design:type",String)],vr.prototype,"nTanque",void 0);re([It({fixed:3}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],vr.prototype,"vEncIni",void 0);re([It({fixed:3}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],vr.prototype,"vEncFin",void 0);var _e=class{static{a(this,"Comb")}cProdANP;descANP;pGLP;pGNn;pGNi;vPart;CODIF;qTemp;UFCons;CIDE;encerrante;pBio;origComb};re([Do(),ne("design:type",String)],_e.prototype,"cProdANP",void 0);re([Do(),ne("design:type",String)],_e.prototype,"descANP",void 0);re([yr(),ki(100),It({fixed:4}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],_e.prototype,"pGLP",void 0);re([yr(),ki(100),It({fixed:4}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],_e.prototype,"pGNn",void 0);re([yr(),ki(100),It({fixed:4}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],_e.prototype,"pGNi",void 0);re([yr(),It({fixed:2}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],_e.prototype,"vPart",void 0);re([Do(),yr(),ne("design:type",String)],_e.prototype,"CODIF",void 0);re([yr(),It({fixed:4}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],_e.prototype,"qTemp",void 0);re([Do(),ne("design:type",String)],_e.prototype,"UFCons",void 0);re([zs(),Os(),xs(()=>jn),ne("design:type",typeof ICIDE>"u"?Object:ICIDE)],_e.prototype,"CIDE",void 0);re([zs(),Os(),xs(()=>vr),ne("design:type",typeof IEncerrante>"u"?Object:IEncerrante)],_e.prototype,"encerrante",void 0);re([yr(),It({fixed:4}),ne("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],_e.prototype,"pBio",void 0);re([zs(),Os({each:!0}),xs(()=>Dn),Tu(30),yr(),ne("design:type",Array)],_e.prototype,"origComb",void 0);function j(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(j,"_ts_decorate");function T(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(T,"_ts_metadata");var P=class{static{a(this,"Prod")}cProd;cEAN;cBarra;xProd;NCM;NVE;CEST;indEscala;CNPJFab;cBenef;gCred;EXTIPI;CFOP;uCom;qCom;vUnCom;vProd;cEANTrib;uTrib;qTrib;vUnTrib;vFrete;vSeg;vDesc;vOutro;indTot;DI;detExport;xPed;nItemPed;nFCI;rastro;infProdNFF;infProdEmb;veicProd;med;arma;comb;nRECOPI};j([Ne(),T("design:type",String)],P.prototype,"cProd",void 0);j([Ne(),T("design:type",String)],P.prototype,"cEAN",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"cBarra",void 0);j([Ne(),T("design:type",String)],P.prototype,"xProd",void 0);j([Ne(),T("design:type",String)],P.prototype,"NCM",void 0);j([k(),ea(),yi(8),Ne({each:!0}),T("design:type",Array)],P.prototype,"NVE",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"CEST",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"indEscala",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"CNPJFab",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"cBenef",void 0);j([k(),Hr(),T("design:type",Object)],P.prototype,"gCred",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"EXTIPI",void 0);j([Ne(),T("design:type",String)],P.prototype,"CFOP",void 0);j([Ne(),T("design:type",String)],P.prototype,"uCom",void 0);j([To({fixed:4}),T("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],P.prototype,"qCom",void 0);j([To({fixed:10}),T("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],P.prototype,"vUnCom",void 0);j([To({fixed:2}),T("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],P.prototype,"vProd",void 0);j([Ne(),T("design:type",String)],P.prototype,"cEANTrib",void 0);j([Ne(),T("design:type",String)],P.prototype,"uTrib",void 0);j([To({fixed:4}),T("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],P.prototype,"qTrib",void 0);j([To({fixed:10}),T("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],P.prototype,"vUnTrib",void 0);j([k(),To({fixed:2}),T("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],P.prototype,"vFrete",void 0);j([k(),To({fixed:2}),T("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],P.prototype,"vSeg",void 0);j([k(),To({fixed:2}),T("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],P.prototype,"vDesc",void 0);j([k(),To({fixed:2}),T("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],P.prototype,"vOutro",void 0);j([Ne(),T("design:type",String)],P.prototype,"indTot",void 0);j([k(),ea(),jo({each:!0}),yi(100),Vo(()=>we),T("design:type",Array)],P.prototype,"DI",void 0);j([k(),ea(),jo({each:!0}),yi(500),Vo(()=>Pn),T("design:type",Array)],P.prototype,"detExport",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"xPed",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"nItemPed",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"nFCI",void 0);j([k(),ea(),jo({each:!0}),yi(500),Vo(()=>Eo),T("design:type",Array)],P.prototype,"rastro",void 0);j([k(),Hr(),jo(),Vo(()=>En),T("design:type",typeof IInfProdNFF>"u"?Object:IInfProdNFF)],P.prototype,"infProdNFF",void 0);j([k(),Hr(),jo(),Vo(()=>qr),T("design:type",typeof IInfProdEmb>"u"?Object:IInfProdEmb)],P.prototype,"infProdEmb",void 0);j([k(),Hr(),jo(),Vo(()=>G),T("design:type",typeof IVeicProd>"u"?Object:IVeicProd)],P.prototype,"veicProd",void 0);j([k(),Hr(),jo(),Vo(()=>Qr),T("design:type",typeof IMed>"u"?Object:IMed)],P.prototype,"med",void 0);j([k(),Hr(),jo({each:!0}),Vo(()=>mr),yi(500),T("design:type",Array)],P.prototype,"arma",void 0);j([k(),Hr(),jo(),Vo(()=>_e),T("design:type",typeof IComb>"u"?Object:IComb)],P.prototype,"comb",void 0);j([k(),Ne(),T("design:type",String)],P.prototype,"nRECOPI",void 0);P=j([Vu({properties:["veicProd","med","arma","comb"]})],P);import{Type as er}from"class-transformer";import{IsNumber as Lu,IsOptional as lo,ValidateNested as tr}from"class-validator";import{IsOptional as m,IsString as x,Max as Mu,ValidateNested as Le}from"class-validator";import{Type as Be}from"class-transformer";import{Choice as _u,TransformDecimal as C}from"@nfets/core/application";function f(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(f,"_ts_decorate");function d(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(d,"_ts_metadata");var Mo=class{static{a(this,"ICMS00")}orig;CST;modBC;vBC;pICMS;vICMS};f([x(),d("design:type",String)],Mo.prototype,"orig",void 0);f([x(),d("design:type",String)],Mo.prototype,"CST",void 0);f([m(),x(),d("design:type",String)],Mo.prototype,"modBC",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Mo.prototype,"vBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Mo.prototype,"pICMS",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Mo.prototype,"vICMS",void 0);var gt=class{static{a(this,"ICMS10")}orig;CST;modBC;vBC;pICMS;vICMS;modBCST;vBCST;pICMSST;vICMSST};f([x(),d("design:type",String)],gt.prototype,"orig",void 0);f([x(),d("design:type",String)],gt.prototype,"CST",void 0);f([m(),x(),d("design:type",String)],gt.prototype,"modBC",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],gt.prototype,"vBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],gt.prototype,"pICMS",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],gt.prototype,"vICMS",void 0);f([m(),x(),d("design:type",String)],gt.prototype,"modBCST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],gt.prototype,"vBCST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],gt.prototype,"pICMSST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],gt.prototype,"vICMSST",void 0);var so=class{static{a(this,"ICMS20")}orig;CST;modBC;pRedBC;vBC;pICMS;vICMS};f([x(),d("design:type",String)],so.prototype,"orig",void 0);f([x(),d("design:type",String)],so.prototype,"CST",void 0);f([m(),x(),d("design:type",String)],so.prototype,"modBC",void 0);f([m(),x(),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],so.prototype,"pRedBC",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],so.prototype,"vBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],so.prototype,"pICMS",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],so.prototype,"vICMS",void 0);var _o=class{static{a(this,"ICMS30")}orig;CST;modBCST;vBCST;pICMSST;vICMSST};f([x(),d("design:type",String)],_o.prototype,"orig",void 0);f([x(),d("design:type",String)],_o.prototype,"CST",void 0);f([m(),x(),d("design:type",String)],_o.prototype,"modBCST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],_o.prototype,"vBCST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],_o.prototype,"pICMSST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],_o.prototype,"vICMSST",void 0);var $r=class{static{a(this,"ICMS40")}orig;CST;vICMSDeson;motDesICMS};f([x(),d("design:type",String)],$r.prototype,"orig",void 0);f([x(),d("design:type",String)],$r.prototype,"CST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],$r.prototype,"vICMSDeson",void 0);f([m(),x(),d("design:type",String)],$r.prototype,"motDesICMS",void 0);var zt=class{static{a(this,"ICMS51")}orig;CST;modBC;pRedBC;vBC;pICMS;vICMS;pDif;vICMSDif};f([x(),d("design:type",String)],zt.prototype,"orig",void 0);f([x(),d("design:type",String)],zt.prototype,"CST",void 0);f([m(),x(),d("design:type",String)],zt.prototype,"modBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],zt.prototype,"pRedBC",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],zt.prototype,"vBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],zt.prototype,"pICMS",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],zt.prototype,"vICMS",void 0);f([m(),C({fixed:4}),Mu(100),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],zt.prototype,"pDif",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],zt.prototype,"vICMSDif",void 0);var Lo=class{static{a(this,"ICMS60")}orig;CST;vBCSTRet;pST;vICMSSubstituto;vICMSSTRet};f([x(),d("design:type",String)],Lo.prototype,"orig",void 0);f([x(),d("design:type",String)],Lo.prototype,"CST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Lo.prototype,"vBCSTRet",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Lo.prototype,"pST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Lo.prototype,"vICMSSubstituto",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Lo.prototype,"vICMSSTRet",void 0);var ct=class{static{a(this,"ICMS70")}orig;CST;modBC;pRedBC;vBC;pICMS;vICMS;modBCST;vBCST;pICMSST;vICMSST};f([x(),d("design:type",String)],ct.prototype,"orig",void 0);f([x(),d("design:type",String)],ct.prototype,"CST",void 0);f([m(),x(),d("design:type",String)],ct.prototype,"modBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ct.prototype,"pRedBC",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ct.prototype,"vBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ct.prototype,"pICMS",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ct.prototype,"vICMS",void 0);f([m(),x(),d("design:type",String)],ct.prototype,"modBCST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ct.prototype,"vBCST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ct.prototype,"pICMSST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ct.prototype,"vICMSST",void 0);var ft=class{static{a(this,"ICMS90")}orig;CST;modBC;pRedBC;vBC;pICMS;vICMS;modBCST;vBCST;pICMSST;vICMSST};f([x(),d("design:type",String)],ft.prototype,"orig",void 0);f([x(),d("design:type",String)],ft.prototype,"CST",void 0);f([m(),x(),d("design:type",String)],ft.prototype,"modBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ft.prototype,"pRedBC",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ft.prototype,"vBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ft.prototype,"pICMS",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ft.prototype,"vICMS",void 0);f([m(),x(),d("design:type",String)],ft.prototype,"modBCST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ft.prototype,"vBCST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ft.prototype,"pICMSST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ft.prototype,"vICMSST",void 0);var Ee=class{static{a(this,"ICMSPart")}orig;CST;modBC;vBC;pRedBC;pICMS;vICMS;modBCST;pMVAST;pRedBCST;vBCST;pICMSST;vICMSST;pBCOp;UFST};f([x(),d("design:type",String)],Ee.prototype,"orig",void 0);f([x(),d("design:type",String)],Ee.prototype,"CST",void 0);f([m(),x(),d("design:type",String)],Ee.prototype,"modBC",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"vBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"pRedBC",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"pICMS",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"vICMS",void 0);f([m(),x(),d("design:type",String)],Ee.prototype,"modBCST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"pMVAST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"pRedBCST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"vBCST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"pICMSST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"vICMSST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ee.prototype,"pBCOp",void 0);f([m(),x(),d("design:type",String)],Ee.prototype,"UFST",void 0);var Bo=class{static{a(this,"ICMSST")}orig;CST;vBCSTRet;pST;vICMSSubstituto;vICMSSTRet};f([x(),d("design:type",String)],Bo.prototype,"orig",void 0);f([x(),d("design:type",String)],Bo.prototype,"CST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Bo.prototype,"vBCSTRet",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Bo.prototype,"pST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Bo.prototype,"vICMSSubstituto",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Bo.prototype,"vICMSSTRet",void 0);var Jr=class{static{a(this,"ICMSSN101")}orig;CSOSN;pCredSN;vCredICMSSN};f([x(),d("design:type",String)],Jr.prototype,"orig",void 0);f([x(),d("design:type",String)],Jr.prototype,"CSOSN",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Jr.prototype,"pCredSN",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Jr.prototype,"vCredICMSSN",void 0);var gi=class{static{a(this,"ICMSSN102")}orig;CSOSN};f([x(),d("design:type",String)],gi.prototype,"orig",void 0);f([x(),d("design:type",String)],gi.prototype,"CSOSN",void 0);var Qt=class{static{a(this,"ICMSSN201")}orig;CSOSN;modBCST;vBCST;pICMSST;vICMSST;pCredSN;vCredICMSSN};f([x(),d("design:type",String)],Qt.prototype,"orig",void 0);f([x(),d("design:type",String)],Qt.prototype,"CSOSN",void 0);f([m(),x(),d("design:type",String)],Qt.prototype,"modBCST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Qt.prototype,"vBCST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Qt.prototype,"pICMSST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Qt.prototype,"vICMSST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Qt.prototype,"pCredSN",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Qt.prototype,"vCredICMSSN",void 0);var Uo=class{static{a(this,"ICMSSN202")}orig;CSOSN;modBCST;vBCST;pICMSST;vICMSST};f([x(),d("design:type",String)],Uo.prototype,"orig",void 0);f([x(),d("design:type",String)],Uo.prototype,"CSOSN",void 0);f([m(),x(),d("design:type",String)],Uo.prototype,"modBCST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Uo.prototype,"vBCST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Uo.prototype,"pICMSST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Uo.prototype,"vICMSST",void 0);var qo=class{static{a(this,"ICMSSN500")}orig;CSOSN;vBCSTRet;pST;vICMSSubstituto;vICMSSTRet};f([x(),d("design:type",String)],qo.prototype,"orig",void 0);f([x(),d("design:type",String)],qo.prototype,"CSOSN",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qo.prototype,"vBCSTRet",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qo.prototype,"pST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qo.prototype,"vICMSSubstituto",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],qo.prototype,"vICMSSTRet",void 0);var Ge=class{static{a(this,"ICMSSN900")}orig;CSOSN;modBC;vBC;pRedBC;pICMS;vICMS;modBCST;vBCST;pICMSST;vICMSST;pCredSN;vCredICMSSN};f([x(),d("design:type",String)],Ge.prototype,"orig",void 0);f([x(),d("design:type",String)],Ge.prototype,"CSOSN",void 0);f([m(),x(),d("design:type",String)],Ge.prototype,"modBC",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"vBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"pRedBC",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"pICMS",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"vICMS",void 0);f([m(),x(),d("design:type",String)],Ge.prototype,"modBCST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"vBCST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"pICMSST",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"vICMSST",void 0);f([m(),C({fixed:4}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"pCredSN",void 0);f([m(),C({fixed:2}),d("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],Ge.prototype,"vCredICMSSN",void 0);var de=class{static{a(this,"ICMS")}ICMS00;ICMS10;ICMS20;ICMS30;ICMS40;ICMS51;ICMS60;ICMS70;ICMS90;ICMSPart;ICMSST;ICMSSN101;ICMSSN102;ICMSSN201;ICMSSN202;ICMSSN500;ICMSSN900};f([m(),Le(),Be(()=>Mo),d("design:type",typeof IICMS00>"u"?Object:IICMS00)],de.prototype,"ICMS00",void 0);f([m(),Le(),Be(()=>gt),d("design:type",typeof IICMS10>"u"?Object:IICMS10)],de.prototype,"ICMS10",void 0);f([m(),Le(),Be(()=>so),d("design:type",typeof IICMS20>"u"?Object:IICMS20)],de.prototype,"ICMS20",void 0);f([m(),Le(),Be(()=>_o),d("design:type",typeof IICMS30>"u"?Object:IICMS30)],de.prototype,"ICMS30",void 0);f([m(),Le(),Be(()=>$r),d("design:type",typeof IICMS40>"u"?Object:IICMS40)],de.prototype,"ICMS40",void 0);f([m(),Le(),Be(()=>zt),d("design:type",typeof IICMS51>"u"?Object:IICMS51)],de.prototype,"ICMS51",void 0);f([m(),Le(),Be(()=>Lo),d("design:type",typeof IICMS60>"u"?Object:IICMS60)],de.prototype,"ICMS60",void 0);f([m(),Le(),Be(()=>ct),d("design:type",typeof IICMS70>"u"?Object:IICMS70)],de.prototype,"ICMS70",void 0);f([m(),Le(),Be(()=>ft),d("design:type",typeof IICMS90>"u"?Object:IICMS90)],de.prototype,"ICMS90",void 0);f([m(),Le(),Be(()=>Ee),d("design:type",typeof IICMSPart>"u"?Object:IICMSPart)],de.prototype,"ICMSPart",void 0);f([m(),Le(),Be(()=>Bo),d("design:type",typeof IICMSST>"u"?Object:IICMSST)],de.prototype,"ICMSST",void 0);f([m(),Le(),Be(()=>Jr),d("design:type",typeof IICMSSN101>"u"?Object:IICMSSN101)],de.prototype,"ICMSSN101",void 0);f([m(),Le(),Be(()=>gi),d("design:type",typeof IICMSSN102>"u"?Object:IICMSSN102)],de.prototype,"ICMSSN102",void 0);f([m(),Le(),Be(()=>Qt),d("design:type",typeof IICMSSN201>"u"?Object:IICMSSN201)],de.prototype,"ICMSSN201",void 0);f([m(),Le(),Be(()=>Uo),d("design:type",typeof IICMSSN202>"u"?Object:IICMSSN202)],de.prototype,"ICMSSN202",void 0);f([m(),Le(),Be(()=>qo),d("design:type",typeof IICMSSN500>"u"?Object:IICMSSN500)],de.prototype,"ICMSSN500",void 0);f([m(),Le(),Be(()=>Ge),d("design:type",typeof IICMSSN900>"u"?Object:IICMSSN900)],de.prototype,"ICMSSN900",void 0);de=f([_u({properties:["ICMS00","ICMS10","ICMS20","ICMS30","ICMS40","ICMS51","ICMS60","ICMS70","ICMS90","ICMSPart","ICMSST","ICMSSN101","ICMSSN102","ICMSSN201","ICMSSN202","ICMSSN500","ICMSSN900"]})],de);import{IsOptional as co,IsString as Ht,ValidateNested as gc}from"class-validator";import{Type as hc}from"class-transformer";function ht(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(ht,"_ts_decorate");function St(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(St,"_ts_metadata");var Qo=class{static{a(this,"IPITrib")}CST;vBC;pIPI;qUnid;vUnid;vIPI};ht([Ht(),St("design:type",String)],Qo.prototype,"CST",void 0);ht([co(),Ht(),St("design:type",String)],Qo.prototype,"vBC",void 0);ht([co(),Ht(),St("design:type",String)],Qo.prototype,"pIPI",void 0);ht([co(),Ht(),St("design:type",String)],Qo.prototype,"qUnid",void 0);ht([co(),Ht(),St("design:type",String)],Qo.prototype,"vUnid",void 0);ht([co(),Ht(),St("design:type",String)],Qo.prototype,"vIPI",void 0);var ta=class{static{a(this,"IPINT")}CST};ht([Ht(),St("design:type",String)],ta.prototype,"CST",void 0);var po=class{static{a(this,"IPI")}CNPJProd;cSelo;qSelo;cEnq;IPITrib;IPINT};ht([co(),Ht(),St("design:type",String)],po.prototype,"CNPJProd",void 0);ht([co(),Ht(),St("design:type",String)],po.prototype,"cSelo",void 0);ht([co(),Ht(),St("design:type",String)],po.prototype,"qSelo",void 0);ht([Ht(),St("design:type",String)],po.prototype,"cEnq",void 0);ht([co(),gc(),hc(()=>Qo),St("design:type",typeof IIPITrib>"u"?Object:IIPITrib)],po.prototype,"IPITrib",void 0);ht([co(),gc(),hc(()=>ta),St("design:type",typeof IIPINT>"u"?Object:IIPINT)],po.prototype,"IPINT",void 0);import{IsOptional as na,IsString as ia}from"class-validator";function oa(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(oa,"_ts_decorate");function ra(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ra,"_ts_metadata");var gr=class{static{a(this,"II")}vBC;vDespAdu;vII;vIOF};oa([na(),ia(),ra("design:type",String)],gr.prototype,"vBC",void 0);oa([na(),ia(),ra("design:type",String)],gr.prototype,"vDespAdu",void 0);oa([na(),ia(),ra("design:type",String)],gr.prototype,"vII",void 0);oa([na(),ia(),ra("design:type",String)],gr.prototype,"vIOF",void 0);import{IsOptional as Ce,IsString as be,ValidateNested as aa}from"class-validator";import{Type as sa}from"class-transformer";function ie(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(ie,"_ts_decorate");function ae(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ae,"_ts_metadata");var Ho=class{static{a(this,"PISAliq")}CST;vBC;pPIS;vPIS};ie([be(),ae("design:type",String)],Ho.prototype,"CST",void 0);ie([Ce(),be(),ae("design:type",String)],Ho.prototype,"vBC",void 0);ie([Ce(),be(),ae("design:type",String)],Ho.prototype,"pPIS",void 0);ie([Ce(),be(),ae("design:type",String)],Ho.prototype,"vPIS",void 0);var $o=class{static{a(this,"PISQtde")}CST;qBCProd;vAliqProd;vPIS};ie([be(),ae("design:type",String)],$o.prototype,"CST",void 0);ie([Ce(),be(),ae("design:type",String)],$o.prototype,"qBCProd",void 0);ie([Ce(),be(),ae("design:type",String)],$o.prototype,"vAliqProd",void 0);ie([Ce(),be(),ae("design:type",String)],$o.prototype,"vPIS",void 0);var Tn=class{static{a(this,"PISNT")}CST};ie([be(),ae("design:type",String)],Tn.prototype,"CST",void 0);var $t=class{static{a(this,"PISOutr")}CST;vBC;pPIS;qBCProd;vAliqProd;vPIS};ie([be(),ae("design:type",String)],$t.prototype,"CST",void 0);ie([Ce(),be(),ae("design:type",String)],$t.prototype,"vBC",void 0);ie([Ce(),be(),ae("design:type",String)],$t.prototype,"pPIS",void 0);ie([Ce(),be(),ae("design:type",String)],$t.prototype,"qBCProd",void 0);ie([Ce(),be(),ae("design:type",String)],$t.prototype,"vAliqProd",void 0);ie([Ce(),be(),ae("design:type",String)],$t.prototype,"vPIS",void 0);var hr=class{static{a(this,"PIS")}PISAliq;PISQtde;PISNT;PISOutr};ie([Ce(),aa(),sa(()=>Ho),ae("design:type",typeof Ho>"u"?Object:Ho)],hr.prototype,"PISAliq",void 0);ie([Ce(),aa(),sa(()=>$o),ae("design:type",typeof $o>"u"?Object:$o)],hr.prototype,"PISQtde",void 0);ie([Ce(),aa(),sa(()=>Tn),ae("design:type",typeof Tn>"u"?Object:Tn)],hr.prototype,"PISNT",void 0);ie([Ce(),aa(),sa(()=>$t),ae("design:type",typeof $t>"u"?Object:$t)],hr.prototype,"PISOutr",void 0);var Jo=class{static{a(this,"PISST")}vBC;pPIS;qBCProd;vAliqProd;vPIS};ie([Ce(),be(),ae("design:type",String)],Jo.prototype,"vBC",void 0);ie([Ce(),be(),ae("design:type",String)],Jo.prototype,"pPIS",void 0);ie([Ce(),be(),ae("design:type",String)],Jo.prototype,"qBCProd",void 0);ie([Ce(),be(),ae("design:type",String)],Jo.prototype,"vAliqProd",void 0);ie([Ce(),be(),ae("design:type",String)],Jo.prototype,"vPIS",void 0);import{IsOptional as Re,IsString as Fe,ValidateNested as pa}from"class-validator";import{Type as ca}from"class-transformer";function se(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(se,"_ts_decorate");function pe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(pe,"_ts_metadata");var Go=class{static{a(this,"COFINSAliq")}CST;vBC;pCOFINS;vCOFINS};se([Fe(),pe("design:type",String)],Go.prototype,"CST",void 0);se([Re(),Fe(),pe("design:type",String)],Go.prototype,"vBC",void 0);se([Re(),Fe(),pe("design:type",String)],Go.prototype,"pCOFINS",void 0);se([Re(),Fe(),pe("design:type",String)],Go.prototype,"vCOFINS",void 0);var Wo=class{static{a(this,"COFINSQtde")}CST;qBCProd;vAliqProd;vCOFINS};se([Fe(),pe("design:type",String)],Wo.prototype,"CST",void 0);se([Re(),Fe(),pe("design:type",String)],Wo.prototype,"qBCProd",void 0);se([Re(),Fe(),pe("design:type",String)],Wo.prototype,"vAliqProd",void 0);se([Re(),Fe(),pe("design:type",String)],Wo.prototype,"vCOFINS",void 0);var Vn=class{static{a(this,"COFINSNT")}CST};se([Fe(),pe("design:type",String)],Vn.prototype,"CST",void 0);var Jt=class{static{a(this,"COFINSOutr")}CST;vBC;pCOFINS;qBCProd;vAliqProd;vCOFINS};se([Fe(),pe("design:type",String)],Jt.prototype,"CST",void 0);se([Re(),Fe(),pe("design:type",String)],Jt.prototype,"vBC",void 0);se([Re(),Fe(),pe("design:type",String)],Jt.prototype,"pCOFINS",void 0);se([Re(),Fe(),pe("design:type",String)],Jt.prototype,"qBCProd",void 0);se([Re(),Fe(),pe("design:type",String)],Jt.prototype,"vAliqProd",void 0);se([Re(),Fe(),pe("design:type",String)],Jt.prototype,"vCOFINS",void 0);var Sr=class{static{a(this,"COFINS")}COFINSAliq;COFINSQtde;COFINSNT;COFINSOutr};se([Re(),pa(),ca(()=>Go),pe("design:type",typeof Go>"u"?Object:Go)],Sr.prototype,"COFINSAliq",void 0);se([Re(),pa(),ca(()=>Wo),pe("design:type",typeof Wo>"u"?Object:Wo)],Sr.prototype,"COFINSQtde",void 0);se([Re(),pa(),ca(()=>Vn),pe("design:type",typeof Vn>"u"?Object:Vn)],Sr.prototype,"COFINSNT",void 0);se([Re(),pa(),ca(()=>Jt),pe("design:type",typeof Jt>"u"?Object:Jt)],Sr.prototype,"COFINSOutr",void 0);var Ko=class{static{a(this,"COFINSST")}vBC;pCOFINS;qBCProd;vAliqProd;vCOFINS};se([Re(),Fe(),pe("design:type",String)],Ko.prototype,"vBC",void 0);se([Re(),Fe(),pe("design:type",String)],Ko.prototype,"pCOFINS",void 0);se([Re(),Fe(),pe("design:type",String)],Ko.prototype,"qBCProd",void 0);se([Re(),Fe(),pe("design:type",String)],Ko.prototype,"vAliqProd",void 0);se([Re(),Fe(),pe("design:type",String)],Ko.prototype,"vCOFINS",void 0);import{IsOptional as Ln,IsString as Bn}from"class-validator";function Mn(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Mn,"_ts_decorate");function _n(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(_n,"_ts_metadata");var fo=class{static{a(this,"ISSQN")}vBC;vAliq;vISSQN;cMunFG;cListServ;cSitTrib};Mn([Ln(),Bn(),_n("design:type",String)],fo.prototype,"vBC",void 0);Mn([Ln(),Bn(),_n("design:type",String)],fo.prototype,"vAliq",void 0);Mn([Ln(),Bn(),_n("design:type",String)],fo.prototype,"vISSQN",void 0);Mn([Ln(),Bn(),_n("design:type",String)],fo.prototype,"cMunFG",void 0);Mn([Ln(),Bn(),_n("design:type",String)],fo.prototype,"cListServ",void 0);Mn([Ln(),Bn(),_n("design:type",String)],fo.prototype,"cSitTrib",void 0);import{IsOptional as Zo,IsString as ko}from"class-validator";function Xo(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Xo,"_ts_decorate");function Yo(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Yo,"_ts_metadata");var Nt=class{static{a(this,"ICMSUFDest")}vBCUFDest;vBCFCPUFDest;pFCPUFDest;pICMSUFDest;pICMSInter;pICMSInterPart;vFCPUFDest;vICMSUFDest;vICMSUFRemet};Xo([Zo(),ko(),Yo("design:type",String)],Nt.prototype,"vBCUFDest",void 0);Xo([Zo(),ko(),Yo("design:type",String)],Nt.prototype,"vBCFCPUFDest",void 0);Xo([Zo(),ko(),Yo("design:type",String)],Nt.prototype,"pFCPUFDest",void 0);Xo([Zo(),ko(),Yo("design:type",String)],Nt.prototype,"pICMSUFDest",void 0);Xo([Zo(),ko(),Yo("design:type",String)],Nt.prototype,"pICMSInter",void 0);Xo([Zo(),ko(),Yo("design:type",String)],Nt.prototype,"pICMSInterPart",void 0);Xo([Zo(),ko(),Yo("design:type",String)],Nt.prototype,"vFCPUFDest",void 0);Xo([Zo(),ko(),Yo("design:type",String)],Nt.prototype,"vICMSUFDest",void 0);Xo([Zo(),ko(),Yo("design:type",String)],Nt.prototype,"vICMSUFRemet",void 0);import{Choice as Bu}from"@nfets/core/application";function Gt(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Gt,"_ts_decorate");function uo(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(uo,"_ts_metadata");var We=class{static{a(this,"Imposto")}vTotTrib;ICMS;IPI;ISSQN;II;PIS;PISST;COFINS;COFINSST;ICMSUFDest};Gt([lo(),Lu(),uo("design:type",Number)],We.prototype,"vTotTrib",void 0);Gt([lo(),tr(),er(()=>de),uo("design:type",typeof IICMS>"u"?Object:IICMS)],We.prototype,"ICMS",void 0);Gt([lo(),tr(),er(()=>po),uo("design:type",typeof IIPI>"u"?Object:IIPI)],We.prototype,"IPI",void 0);Gt([lo(),tr(),er(()=>fo),uo("design:type",typeof IISSQN>"u"?Object:IISSQN)],We.prototype,"ISSQN",void 0);Gt([lo(),tr(),er(()=>gr),uo("design:type",typeof III>"u"?Object:III)],We.prototype,"II",void 0);Gt([lo(),tr(),er(()=>hr),uo("design:type",typeof IPIS>"u"?Object:IPIS)],We.prototype,"PIS",void 0);Gt([lo(),tr(),er(()=>Jo),uo("design:type",typeof IPISST>"u"?Object:IPISST)],We.prototype,"PISST",void 0);Gt([lo(),tr(),er(()=>Sr),uo("design:type",typeof ICOFINS>"u"?Object:ICOFINS)],We.prototype,"COFINS",void 0);Gt([lo(),tr(),er(()=>Ko),uo("design:type",typeof ICOFINSST>"u"?Object:ICOFINSST)],We.prototype,"COFINSST",void 0);Gt([lo(),tr(),er(()=>Nt),uo("design:type",typeof IICMSUFDest>"u"?Object:IICMSUFDest)],We.prototype,"ICMSUFDest",void 0);We=Gt([Bu({properties:["ICMS","ISSQN"]})],We);import{IsOptional as Uu,IsString as Sc,ValidateNested as qu}from"class-validator";import{Type as Qu}from"class-transformer";function As(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(As,"_ts_decorate");function ws(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ws,"_ts_metadata");var fa=class{static{a(this,"IpiDevol")}vIPIDevol};As([Sc(),ws("design:type",String)],fa.prototype,"vIPIDevol",void 0);var Un=class{static{a(this,"Devol")}pDevol;IPI};As([Sc(),ws("design:type",String)],Un.prototype,"pDevol",void 0);As([Uu(),qu(),Qu(()=>fa),ws("design:type",typeof IIpiDevol>"u"?Object:IIpiDevol)],Un.prototype,"IPI",void 0);import{IsOptional as Nc,IsString as Cc,ValidateNested as bc}from"class-validator";import{Type as Rc}from"class-transformer";function da(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(da,"_ts_decorate");function ua(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ua,"_ts_metadata");var qn=class{static{a(this,"Observation")}xCampo;xTexto};da([Cc(),ua("design:type",String)],qn.prototype,"xCampo",void 0);da([Cc(),ua("design:type",String)],qn.prototype,"xTexto",void 0);var Qn=class{static{a(this,"ObsItem")}obsCont;obsFisco};da([Nc(),bc(),Rc(()=>qn),ua("design:type",typeof IObservation>"u"?Object:IObservation)],Qn.prototype,"obsCont",void 0);da([Nc(),bc(),Rc(()=>qn),ua("design:type",typeof IObservation>"u"?Object:IObservation)],Qn.prototype,"obsFisco",void 0);function Gr(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Gr,"_ts_decorate");function Wr(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Wr,"_ts_metadata");var la=class{static{a(this,"DetAttributes")}nItem};Gr([Fc(),Wr("design:type",String)],la.prototype,"nItem",void 0);var mo=class{static{a(this,"Det")}prod;imposto;impostoDevol;infAdProd;obsItem};Gr([Hu(),hi(),Si(()=>la),Wr("design:type",typeof IDetAttributes>"u"?Object:IDetAttributes)],mo.prototype,"$",void 0);Gr([hi(),Si(()=>P),Wr("design:type",typeof IProd>"u"?Object:IProd)],mo.prototype,"prod",void 0);Gr([ma(),hi(),Si(()=>We),Wr("design:type",typeof IImposto>"u"?Object:IImposto)],mo.prototype,"imposto",void 0);Gr([ma(),hi(),Si(()=>Un),Wr("design:type",typeof IDevol>"u"?Object:IDevol)],mo.prototype,"impostoDevol",void 0);Gr([ma(),Fc(),Wr("design:type",String)],mo.prototype,"infAdProd",void 0);Gr([ma(),hi(),Si(()=>Qn),Wr("design:type",typeof IObsItem>"u"?Object:IObsItem)],mo.prototype,"obsItem",void 0);import{IsDate as $u,IsOptional as Ni,IsString as Nr}from"class-validator";import{TransformDecimal as Ju,TransformDateString as Gu}from"@nfets/core/application";function Wt(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Wt,"_ts_decorate");function Kt(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Kt,"_ts_metadata");var ke=class{static{a(this,"Avulsa")}CNPJ;xOrgao;matr;xAgente;fone;UF;nDAR;dEmi;vDAR;repEmi;dPag};Wt([Nr(),Kt("design:type",String)],ke.prototype,"CNPJ",void 0);Wt([Nr(),Kt("design:type",String)],ke.prototype,"xOrgao",void 0);Wt([Nr(),Kt("design:type",String)],ke.prototype,"matr",void 0);Wt([Nr(),Kt("design:type",String)],ke.prototype,"xAgente",void 0);Wt([Ni(),Nr(),Kt("design:type",String)],ke.prototype,"fone",void 0);Wt([Nr(),Kt("design:type",String)],ke.prototype,"UF",void 0);Wt([Ni(),Nr(),Kt("design:type",String)],ke.prototype,"nDAR",void 0);Wt([Ni(),Gu({format:"YYYY-MM-DD"}),Kt("design:type",typeof Date>"u"?Object:Date)],ke.prototype,"dEmi",void 0);Wt([Ni(),Ju({fixed:2}),Kt("design:type",typeof DecimalValue>"u"?Object:DecimalValue)],ke.prototype,"vDAR",void 0);Wt([Nr(),Kt("design:type",String)],ke.prototype,"repEmi",void 0);Wt([Ni(),$u(),Kt("design:type",typeof Date>"u"?Object:Date)],ke.prototype,"dPag",void 0);import{IsString as Xu}from"class-validator";function Wu(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Wu,"_ts_decorate");function Ku(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Ku,"_ts_metadata");var Ci=class{static{a(this,"InfSolicNFF")}xSolic};Wu([Xu(),Ku("design:type",String)],Ci.prototype,"xSolic",void 0);function le(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(le,"_ts_decorate");function me(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(me,"_ts_metadata");var bi=class{static{a(this,"InfNFeAttributes")}Id;versao};le([et(),zc(),me("design:type",String)],bi.prototype,"Id",void 0);le([et(),zc(),me("design:type",String)],bi.prototype,"versao",void 0);var Z=class{static{a(this,"InfNFe")}ide;emit;avulsa;dest;retirada;entrega;autXML;det;total;transp;cobr;pag;infIntermed;infAdic;exporta;compra;cana;infRespTec;infSolicNFF};le([Es(),Ps(),ze(()=>bi),Ie(),me("design:type",typeof IInfNFeAttributes>"u"?Object:IInfNFeAttributes)],Z.prototype,"$",void 0);le([Es(),Ps(),Ie(),ze(()=>J),me("design:type",typeof IIde>"u"?Object:IIde)],Z.prototype,"ide",void 0);le([Es(),Ps(),Ie(),ze(()=>Ue),me("design:type",typeof IEmit>"u"?Object:IEmit)],Z.prototype,"emit",void 0);le([et(),Ie(),ze(()=>ke),me("design:type",typeof IAvulsa>"u"?Object:IAvulsa)],Z.prototype,"avulsa",void 0);le([et(),Ie(),ze(()=>qe),me("design:type",typeof IDest>"u"?Object:IDest)],Z.prototype,"dest",void 0);le([et(),Ie(),ze(()=>fe),me("design:type",typeof ILocal>"u"?Object:ILocal)],Z.prototype,"retirada",void 0);le([et(),Ie(),ze(()=>fe),me("design:type",typeof ILocal>"u"?Object:ILocal)],Z.prototype,"entrega",void 0);le([et(),Ie({each:!0}),Ic(10),ze(()=>cr),me("design:type",Array)],Z.prototype,"autXML",void 0);le([Ie({each:!0}),Ic(990),Yu(1),ze(()=>mo),me("design:type",Array)],Z.prototype,"det",void 0);le([Ie(),ze(()=>jr),me("design:type",typeof ITotal>"u"?Object:ITotal)],Z.prototype,"total",void 0);le([Ie(),ze(()=>at),me("design:type",typeof ITransp>"u"?Object:ITransp)],Z.prototype,"transp",void 0);le([et(),Ie(),ze(()=>zn),me("design:type",typeof ICobr>"u"?Object:ICobr)],Z.prototype,"cobr",void 0);le([Ie(),ze(()=>On),me("design:type",typeof IPag>"u"?Object:IPag)],Z.prototype,"pag",void 0);le([et(),Ie(),ze(()=>dn),me("design:type",typeof IInfIntermed>"u"?Object:IInfIntermed)],Z.prototype,"infIntermed",void 0);le([et(),Ie(),ze(()=>Ao),me("design:type",typeof IInfAdic>"u"?Object:IInfAdic)],Z.prototype,"infAdic",void 0);le([et(),Ie(),ze(()=>xr),me("design:type",typeof IExporta>"u"?Object:IExporta)],Z.prototype,"exporta",void 0);le([et(),Ie(),ze(()=>Ar),me("design:type",typeof ICompra>"u"?Object:ICompra)],Z.prototype,"compra",void 0);le([et(),Ie(),ze(()=>st),me("design:type",typeof ICana>"u"?Object:ICana)],Z.prototype,"cana",void 0);le([et(),Ie(),ze(()=>oo),me("design:type",typeof IInfRespTec>"u"?Object:IInfRespTec)],Z.prototype,"infRespTec",void 0);le([et(),Ie(),ze(()=>Ci),me("design:type",typeof ISolicNFF>"u"?Object:ISolicNFF)],Z.prototype,"infSolicNFF",void 0);import{Type as wc}from"class-transformer";function va(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(va,"_ts_decorate");function ya(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ya,"_ts_metadata");var Hn=class{static{a(this,"NFeAttributes")}xmlns};va([el(),ku(),ya("design:type",String)],Hn.prototype,"xmlns",void 0);var Cr=class{static{a(this,"NFe")}$;infNFe;Signature};va([xc(),Oc(),wc(()=>Hn),Ac(),ya("design:type",typeof INFeAttributes>"u"?Object:INFeAttributes)],Cr.prototype,"$",void 0);va([xc(),Oc(),wc(()=>Z),Ac(),ya("design:type",typeof IInfNFe>"u"?Object:IInfNFe)],Cr.prototype,"infNFe",void 0);va([Zu(),ya("design:type",typeof Signature>"u"?Object:Signature)],Cr.prototype,"Signature",void 0);function Ri(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Ri,"_ts_decorate");function ga(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(ga,"_ts_metadata");var or=class{static{a(this,"NfeAutorizacaoPayload")}tpAmb;cUF;idLote;indSinc="1";NFe};Ri([Ds(ol),js(),ga("design:type",typeof EnvironmentCode>"u"?Object:EnvironmentCode)],or.prototype,"tpAmb",void 0);Ri([Ds(tl),js(),ga("design:type",typeof StateCode>"u"?Object:StateCode)],or.prototype,"cUF",void 0);Ri([nl(),ga("design:type",String)],or.prototype,"idLote",void 0);Ri([js(),Ds(["0","1"])],or.prototype,"indSinc",void 0);Ri([il(),rl(()=>Cr),ga("design:type",typeof SignedEntity>"u"?Object:SignedEntity)],or.prototype,"NFe",void 0);import{RetAutorizacaoPayload as vl}from"@nfets/nfe/infrastructure/dto/services/ret-autorizacao";import{EventoPayload as yl}from"@nfets/nfe/infrastructure/dto/services/evento";import{ConsultaCadastroPayload as gl}from"@nfets/nfe/infrastructure/dto/services/consulta-cadastro";import{Environment as B}from"@nfets/core/domain";var Pc={AM:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeConsulta4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/NfeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homnfe.sefaz.am.gov.br/services2/services/RecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeConsulta4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.am.gov.br/services2/services/NfeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.am.gov.br/services2/services/RecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}}},AN:{[B.Homolog]:{RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom1.nfe.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeDistribuicaoDFe:{method:"nfeDistDFeInteresse",operation:"NFeDistribuicaoDFe",version:"1.01",url:"https://hom1.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx"},NfeConsultaDest:{method:"nfeConsultaNFDest",operation:"NfeConsultaDest",version:"1.01",url:"https://hom.nfe.fazenda.gov.br/NFeConsultaDest/NFeConsultaDest.asmx"},NfeDownloadNF:{method:"nfeDownloadNF",operation:"NfeDownloadNF",version:"4.00",url:"https://hom.nfe.fazenda.gov.br/NfeDownloadNF/NfeDownloadNF.asmx"},RecepcaoEPEC:{method:"nfeRecepcaoEvento",operation:"RecepcaoEvento",version:"4.00",url:"https://hom.nfe.fazenda.gov.br/RecepcaoEvento/RecepcaoEvento.asmx"}},[B.Production]:{RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://www.nfe.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeDistribuicaoDFe:{method:"nfeDistDFeInteresse",operation:"NFeDistribuicaoDFe",version:"1.01",url:"https://www1.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx"},NfeConsultaDest:{method:"nfeConsultaNFDest",operation:"NfeConsultaDest",version:"1.01",url:"https://www.nfe.fazenda.gov.br/NFeConsultaDest/NFeConsultaDest.asmx"},NfeDownloadNF:{method:"nfeDownloadNF",operation:"NfeDownloadNF",version:"4.00",url:"https://www.nfe.fazenda.gov.br/NfeDownloadNF/NfeDownloadNF.asmx"},RecepcaoEPEC:{method:"nfeRecepcaoEvento",operation:"RecepcaoEvento",version:"4.00",url:"https://www.nfe.fazenda.gov.br/RecepcaoEvento/RecepcaoEvento.asmx"}}},BA:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://hnfe.sefaz.ba.gov.br/webservices/CadConsultaCadastro4/CadConsultaCadastro4.asmx"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.ba.gov.br/webservices/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.ba.gov.br/webservices/CadConsultaCadastro4/CadConsultaCadastro4.asmx"}}},GO:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4"}}},MG:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://hnfe.fazenda.mg.gov.br/nfe2/services/CadConsultaCadastro4"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.fazenda.mg.gov.br/nfe2/services/CadConsultaCadastro4"}}},MS:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://hom.nfe.sefaz.ms.gov.br/ws/CadConsultaCadastro4"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.ms.gov.br/ws/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.ms.gov.br/ws/CadConsultaCadastro4"}}},MT:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeConsulta4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/RecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://homologacao.sefaz.mt.gov.br/nfews/v2/services/CadConsultaCadastro4"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeConsulta4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/RecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.mt.gov.br/nfews/v2/services/CadConsultaCadastro4"}}},PE:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfehomolog.sefaz.pe.gov.br/nfe-service/services/CadConsultaCadastro4"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefaz.pe.gov.br/nfe-service/services/CadConsultaCadastro4"}}},PR:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacao",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://homologacao.nfe.sefa.pr.gov.br/nfe/CadConsultaCadastro4"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeStatusServico4"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeAutorizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeConsultaProtocolo4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeInutilizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacao",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeRetAutorizacao4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefa.pr.gov.br/nfe/NFeRecepcaoEvento4"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.sefa.pr.gov.br/nfe/CadConsultaCadastro4"}}},RS:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe-homologacao.sefazrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://cad.svrs.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro4.asmx"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefazrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.sefazrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://cad.svrs.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro4.asmx"}}},SP:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nfestatusservico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeautorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeconsultaprotocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nferetautorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/nferecepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://homologacao.nfe.fazenda.sp.gov.br/ws/cadconsultacadastro4.asmx"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nfestatusservico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nfeautorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nfeconsultaprotocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.fazenda.sp.gov.br/ws/nferetautorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.fazenda.sp.gov.br/ws/nferecepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro",operation:"CadConsultaCadastro4",version:"2.00",url:"https://nfe.fazenda.sp.gov.br/ws/cadconsultacadastro4.asmx"}}},SVAN:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}}},SVRS:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://cad.svrs.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro4.asmx"}}},SVCAN:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom.sefazvirtual.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeStatusServico4/NFeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeAutorizacao4/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeConsultaProtocolo4/NFeConsultaProtocolo4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeInutilizacao4/NFeInutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeRetAutorizacao4/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://www.sefazvirtual.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}}},SVCRS:{[B.Homolog]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe-homologacao.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00"}},[B.Production]:{NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfe.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaCadastro:{method:"consultaCadastro4",operation:"CadConsultaCadastro4",version:"2.00",url:"https://cad.svrs.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro4.asmx"}}}};import{StateCodes as W}from"@nfets/core/domain";var al={[W.AC]:"SVRS",[W.AL]:"SVRS",[W.AM]:"AM",[W.AP]:"SVRS",[W.BA]:"BA",[W.CE]:"SVRS",[W.DF]:"SVRS",[W.ES]:"SVRS",[W.GO]:"GO",[W.MA]:"SVAN",[W.MG]:"MG",[W.MS]:"MS",[W.MT]:"MT",[W.PA]:"SVRS",[W.PB]:"SVRS",[W.PE]:"PE",[W.PI]:"SVRS",[W.PR]:"PR",[W.RJ]:"SVRS",[W.RN]:"SVRS",[W.RO]:"SVRS",[W.RR]:"SVRS",[W.RS]:"RS",[W.SC]:"SVRS",[W.SE]:"SVRS",[W.SP]:"SP",[W.TO]:"SVRS",AN:"AN",SVAN:"SVAN",SVRS:"SVRS",SVCAN:"SVCAN",SVCRS:"SVCRS"},Ec=al;import{StateCodes as K}from"@nfets/core";var Dc={[K.AC]:"SVCAN",[K.AL]:"SVCAN",[K.AM]:"SVCRS",[K.AP]:"SVCAN",[K.BA]:"SVCRS",[K.CE]:"SVCAN",[K.DF]:"SVCAN",[K.ES]:"SVCAN",[K.GO]:"SVCRS",[K.MA]:"SVCRS",[K.MG]:"SVCAN",[K.MS]:"SVCRS",[K.MT]:"SVCRS",[K.PA]:"SVCAN",[K.PB]:"SVCAN",[K.PE]:"SVCRS",[K.PI]:"SVCAN",[K.PR]:"SVCRS",[K.RJ]:"SVCAN",[K.RN]:"SVCAN",[K.RO]:"SVCAN",[K.RR]:"SVCAN",[K.RS]:"SVCAN",[K.SC]:"SVCAN",[K.SE]:"SVCAN",[K.SP]:"SVCAN",[K.TO]:"SVCAN"};import hl,{directory as Sl}from"@nfets/nfe/domain/entities/transmission/schemas";function Kr(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Kr,"_ts_decorate");function he(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(he,"_ts_metadata");var Ct=class{static{a(this,"NfeRemoteTransmitter")}remoteTransmissionRepository;constructor(e){this.remoteTransmissionRepository=e}options={};xmlns="http://www.portalfiscal.inf.br/nfe";configure(e){this.options={...this.options,...e};let{certificate:o}=this.options;return o&&this.remoteTransmissionRepository.setCertificate(o),this.options.schema??=hl.PL_009_V4,this}service(e){let o=e.cUF??this.options.cUF,n=e.tpAmb??this.options.tpAmb,i=this.options.contingency?Dc[o]:Ec[o];return Pc[i][n][e.service]}errors(){return Reflect.getMetadata(jc,this)}validate(e){try{let o=this.errors();return o?fl(new pl(o.join(", "))):("cUF"in e&&(e.cUF??=this.options.cUF),"tpAmb"in e&&(e.tpAmb??=this.options.tpAmb),dl(e))}finally{Reflect.deleteMetadata(jc,this)}}ns(e,o){let n=e.$??{};return n.xmlns=this.xmlns,n.versao=o,{...e,$:n}}xsd(e){return sl.resolve(Sl,this.options.schema,e)}async consultStatus(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,i=this.service({...n,service:"NfeStatusServico"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:i.url,xsd:this.xsd("consStatServ_v4.00.xsd"),payload:{consStatServ:this.ns(n,i.version)},method:"nfeStatusServicoNF"})}async inutilizacao(e){let o=this.validate(e);if(o.isLeft())return o;let{cUF:n,tpAmb:i}=o.value.infInut,r=o.value,s=this.service({cUF:n,tpAmb:i,service:"NfeInutilizacao"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:s.url,xsd:this.xsd("inutNFe_v4.00.xsd"),payload:{inutNFe:this.ns(r,s.version)},method:"nfeInutilizacaoNF"})}async consultaProtocolo(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,i=this.service({cUF:n.chNFe.substring(0,2),tpAmb:n.tpAmb,service:"NfeConsultaProtocolo"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:i.url,xsd:this.xsd("consSitNFe_v4.00.xsd"),payload:{consSitNFe:this.ns(n,i.version)},method:"nfeConsultaNF"})}async autorizacao(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,i=this.service({...n,service:"NfeAutorizacao"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:i.url,xsd:this.xsd("enviNFe_v4.00.xsd"),payload:{enviNFe:this.ns(n,i.version)},method:"nfeAutorizacaoLote"})}async retAutorizacao(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,i=this.service({...n,service:"NfeRetAutorizacao"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:i.url,xsd:this.xsd("consReciNFe_v4.00.xsd"),payload:{consReciNFe:this.ns(n,i.version)},method:"nfeRetAutorizacaoLote"})}async recepcaoEvento(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,i=this.service({service:"RecepcaoEvento"});return n.evento=this.ns(n.evento,i.version),this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:i.url,xsd:this.xsd("envEvento_v1.00.xsd"),payload:{envEvento:this.ns(n,i.version)},method:"nfeRecepcaoEvento"})}async consultaCadastro(e){let o=this.validate(e);if(o.isLeft())return o;let n=o.value,i=this.service({cUF:cl[n.UF],service:"NfeConsultaCadastro"});return this.remoteTransmissionRepository.send({root:"nfeDadosMsg",url:i.url,xsd:this.xsd("ConsCad_v4.00.xsd"),payload:{ConsCad:this.ns(n,i.version)},method:"consultaCadastro"})}};Kr([Xr(ul),he("design:type",Function),he("design:paramtypes",[typeof IConsultStatusPayload>"u"?Object:IConsultStatusPayload]),he("design:returntype",Promise)],Ct.prototype,"consultStatus",null);Kr([Xr(ll),he("design:type",Function),he("design:paramtypes",[typeof IInutilizacaoPayload>"u"?Object:IInutilizacaoPayload]),he("design:returntype",Promise)],Ct.prototype,"inutilizacao",null);Kr([Xr(ml),he("design:type",Function),he("design:paramtypes",[typeof IConsultaProtocoloPayload>"u"?Object:IConsultaProtocoloPayload]),he("design:returntype",Promise)],Ct.prototype,"consultaProtocolo",null);Kr([Xr(or),he("design:type",Function),he("design:paramtypes",[typeof IAutorizacaoPayload>"u"?Object:IAutorizacaoPayload]),he("design:returntype",Promise)],Ct.prototype,"autorizacao",null);Kr([Xr(vl),he("design:type",Function),he("design:paramtypes",[typeof IRetAutorizacaoPayload>"u"?Object:IRetAutorizacaoPayload]),he("design:returntype",Promise)],Ct.prototype,"retAutorizacao",null);Kr([Xr(yl),he("design:type",Function),he("design:paramtypes",[Object]),he("design:returntype",Promise)],Ct.prototype,"recepcaoEvento",null);Kr([Xr(gl),he("design:type",Function),he("design:paramtypes",[typeof IConsultaCadastroPayload>"u"?Object:IConsultaCadastroPayload]),he("design:returntype",Promise)],Ct.prototype,"consultaCadastro",null);var ha=class{static{a(this,"Pipeline")}certificate;xmlns="http://www.portalfiscal.inf.br/nfe";http=Bi.create();toolkit=new Nl;caching=new Rl;certificates=new Cl(this.http,this.caching);soap=new bl(this.toolkit,this.certificates);transmitter=new Ct(this.soap);signer=new Fl(this.toolkit,this.certificates);constructor(e){this.certificate=e}errors(){return Reflect.getMetadata(Il,this)}};var Tc=class extends ha{static{a(this,"NfeAuthorizerPipeline")}async execute(e,o){let n=await this.certificates.read(this.certificate);if(n.isLeft())return n;let i=await this.signer.sign(e.NFe,{tag:"infNFe",mark:"Id"},n.value);return i.isLeft()?i:(this.transmitter.configure({cUF:e.NFe.infNFe.ide.cUF,tpAmb:e.NFe.infNFe.ide.tpAmb,...o,contingency:this.contingency(e),certificate:n.value}),e.idLote??=new Date().getTime().toString().slice(0,15),await this.transmitter.autorizacao({...e,NFe:i.value}))}contingency(e){let{dhCont:o,xJust:n,tpEmis:i}=e.NFe.infNFe.ide;if(!(!o||!n||i===zl.Normal))return{dhCont:o,xJust:n}}};import{NFeTsError as Al,StateCodes as Lc}from"@nfets/core/domain";import{Environment as F}from"@nfets/core/domain";var Ts={AC:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.hml.sefaznet.ac.gov.br/nfce/qrcode"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaznet.ac.gov.br/nfce/qrcode"}}},AL:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://nfce.sefaz.al.gov.br/QRCode/consultarNFCe.jsp"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfce.sefaz.al.gov.br/QRCode/consultarNFCe.jsp"}}},AM:{[F.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeConsulta4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/NfeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/RecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://sistemas.sefaz.am.gov.br/nfceweb-hom/consultarNFCe.jsp"},CscNFCe:{method:"admCscNFCe",operation:"CscNFCe",version:"1.00",url:"https://homnfce.sefaz.am.gov.br/nfce-services/services/CscNFCe"}},[F.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeConsulta4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/NfeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/RecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://sistemas.sefaz.am.gov.br/nfceweb/consultarNFCe.jsp"},CscNFCe:{method:"admCscNFCe",operation:"CscNFCe",version:"1.00",url:"https://nfce.sefaz.am.gov.br/nfce-services/services/CscNFCe"}}},AP:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://www.sefaz.ap.gov.br/nfcehml/nfce.php"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://www.sefaz.ap.gov.br/nfce/nfcep.php"}}},BA:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://hnfe.sefaz.ba.gov.br/servicos/nfce/qrcode.aspx"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfe.sefaz.ba.gov.br/servicos/nfce/qrcode.aspx"}}},CE:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://nfceh.sefaz.ce.gov.br/pages/ShowNFCe.html"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfce.sefaz.ce.gov.br/pages/ShowNFCe.html"}}},DF:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://dec.fazenda.df.gov.br/ConsultarNFCe.aspx"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.fazenda.df.gov.br/nfce/qrcode"}}},ES:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://homologacao.sefaz.es.gov.br/ConsultaNFCe/qrcode.aspx"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://app.sefaz.es.gov.br/ConsultaNFCe/qrcode.aspx"}}},GO:{[F.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento",version:"1.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4"},CscNFCe:{method:"admCscNFCe",operation:"CscNFCe",version:"1.00",url:"https://homolog.sefaz.go.gov.br/nfe/services/v2/CscNFCe"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://nfewebhomolog.sefaz.go.gov.br/nfeweb/sites/nfce/danfeNFCe"}},[F.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento",version:"1.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4"},CscNFCe:{method:"admCscNFCe",operation:"CscNFCe",version:"1.00",url:"https://nfe.sefaz.go.gov.br/nfe/services/v2/CscNFCe"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://nfeweb.sefaz.go.gov.br/nfeweb/sites/nfce/danfeNFCe"}}},MA:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.hom.nfce.sefaz.ma.gov.br/portal/consultarNFCe.jsp"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.nfce.sefaz.ma.gov.br/portal/consultarNFCe.jsp"}}},MG:{[F.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hnfce.fazenda.mg.gov.br/nfce/services/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://portalsped.fazenda.mg.gov.br/portalnfce/sistema/qrcode.xhtml"}},[F.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.fazenda.mg.gov.br/nfce/services/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://portalsped.fazenda.mg.gov.br/portalnfce/sistema/qrcode.xhtml"}}},MT:{[F.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeConsulta4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.sefaz.mt.gov.br/nfcews/services/RecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://homologacao.sefaz.mt.gov.br/nfce/consultanfce"}},[F.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeConsulta4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/NfeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.sefaz.mt.gov.br/nfcews/services/RecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaz.mt.gov.br/nfce/consultanfce"}}},MS:{[F.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://hom.nfce.sefaz.ms.gov.br/ws/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.dfe.ms.gov.br/nfce/qrcode"}},[F.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.sefaz.ms.gov.br/ws/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.dfe.ms.gov.br/nfce/qrcode"}}},PA:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://appnfc.sefa.pa.gov.br/portal-homologacao/view/consultas/nfce/nfceForm.seam"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://appnfc.sefa.pa.gov.br/portal/view/consultas/nfce/nfceForm.seam"}}},PB:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.sefaz.pb.gov.br/nfcehom"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaz.pb.gov.br/nfce"}}},PE:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://nfcehomolog.sefaz.pe.gov.br/nfce/consulta"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfce.sefaz.pe.gov.br/nfce/consulta"}}},PI:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.sefaz.pi.gov.br/nfce/qrcode"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaz.pi.gov.br/nfce/qrcode"}}},PR:{[F.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento",version:"1.00",url:"https://homologacao.nfce.sefa.pr.gov.br/nfce/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.fazenda.pr.gov.br/nfce/qrcode"}},[F.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeAutorizacao4"},NfeRetAutorizacao:{method:"nfeRetAutorizacao",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeRetAutorizacao4"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeInutilizacao4"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeConsultaProtocolo4"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeStatusServico4"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento",version:"1.00",url:"https://nfce.sefa.pr.gov.br/nfce/NFeRecepcaoEvento4"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.fazenda.pr.gov.br/nfce/qrcode"}}},RJ:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www4.fazenda.rj.gov.br/consultaNFCe/QRCode"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://consultadfe.fazenda.rj.gov.br/consultaNFCe/QRCode"}}},RN:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://hom.nfce.set.rn.gov.br/consultarNFCe.aspx"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://nfce.set.rn.gov.br/consultarNFCe.aspx"}}},RO:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.nfce.sefin.ro.gov.br/consultanfce/consulta.jsp"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.nfce.sefin.ro.gov.br/consultanfce/consulta.jsp"}}},RR:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://200.174.88.103:8080/nfce/servlet/qrcode"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://www.sefaz.rr.gov.br/servlet/qrcode"}}},RS:{[F.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce-homologacao.sefazrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://www.sefaz.rs.gov.br/NFCE/NFCE-COM.aspx"}},[F.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.sefazrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.sefazrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://www.sefaz.rs.gov.br/NFCE/NFCE-COM.aspx"}}},SC:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://hom.sat.sef.sc.gov.br/nfce/consulta"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://sat.sef.sc.gov.br/nfce/consulta"}}},SE:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://www.hom.nfe.se.gov.br/nfce/qrcode"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.nfce.se.gov.br/nfce/qrcode"}}},SP:{[F.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeInutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeConsultaProtocolo4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://homologacao.nfce.fazenda.sp.gov.br/ws/NFeRecepcaoEvento4.asmx"},RecepcaoEPEC:{method:"nfeRecepcaoEvento",operation:"RecepcaoEvento",version:"4.00",url:"https://homologacao.nfce.epec.fazenda.sp.gov.br/EPECws/RecepcaoEPEC.asmx"},EPECStatusServico:{method:"nfeStatusServicoNF2",operation:"NfeStatusServico2",version:"4.00",url:"https://homologacao.nfce.epec.fazenda.sp.gov.br/EPECws/EPECStatusServico.asmx"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"https://www.homologacao.nfce.fazenda.sp.gov.br/qrcode"}},[F.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeInutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeConsultaProtocolo4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.fazenda.sp.gov.br/ws/NFeRecepcaoEvento4.asmx"},RecepcaoEPEC:{method:"nfeRecepcaoEvento",operation:"RecepcaoEvento",version:"1.00",url:"https://nfce.epec.fazenda.sp.gov.br/EPECws/RecepcaoEPEC.asmx"},EPECStatusServico:{method:"nfeStatusServicoNF2",operation:"NfeStatusServico2",version:"4.00",url:"https://nfce.epec.fazenda.sp.gov.br/EPECws/EPECStatusServico.asmx"},NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"https://www.nfce.fazenda.sp.gov.br/qrcode"}}},TO:{[F.Homolog]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"300",url:"http://homologacao.sefaz.to.gov.br/nfce/qrcode"}},[F.Production]:{NfeConsultaQR:{method:"QR-CODE",operation:"NfeConsultaQR",version:"200",url:"http://www.sefaz.to.gov.br/nfce/qrcode"}}},SVRS:{[F.Homolog]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce-homologacao.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"}},[F.Production]:{NfeAutorizacao:{method:"nfeAutorizacaoLote",operation:"NFeAutorizacao4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/NfeAutorizacao/NFeAutorizacao4.asmx"},NfeRetAutorizacao:{method:"nfeRetAutorizacaoLote",operation:"NFeRetAutorizacao4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/NfeRetAutorizacao/NFeRetAutorizacao4.asmx"},NfeInutilizacao:{method:"nfeInutilizacaoNF",operation:"NFeInutilizacao4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/nfeinutilizacao/nfeinutilizacao4.asmx"},NfeConsultaProtocolo:{method:"nfeConsultaNF",operation:"NFeConsultaProtocolo4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/NfeConsulta/NfeConsulta4.asmx"},NfeStatusServico:{method:"nfeStatusServicoNF",operation:"NFeStatusServico4",version:"4.00",url:"https://nfce.svrs.rs.gov.br/ws/NfeStatusServico/NfeStatusServico4.asmx"},RecepcaoEvento:{method:"nfeRecepcaoEvento",operation:"NFeRecepcaoEvento4",version:"1.00",url:"https://nfce.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"}}},SVAN:{[F.Homolog]:{},[F.Production]:{}}};import{Environment as Vc,StateCodes as O}from"@nfets/core";var Mc={[Vc.Homolog]:{[O.AC]:"www.sefaznet.ac.gov.br/nfce/consulta",[O.AL]:"www.sefaz.al.gov.br/nfce/consulta",[O.AP]:"www.sefaz.ap.gov.br/nfce/consulta",[O.AM]:"www.sefaz.am.gov.br/nfce/consulta",[O.BA]:"http://hinternet.sefaz.ba.gov.br/nfce/consulta",[O.CE]:"www.sefaz.ce.gov.br/nfce/consulta",[O.DF]:"www.fazenda.df.gov.br/nfce/consulta",[O.ES]:"www.sefaz.es.gov.br/nfce/consulta",[O.GO]:"www.nfce.go.gov.br/post/ver/214413/consulta-nfc-e-homologacao",[O.MA]:"www.sefaz.ma.gov.br/nfce/consulta",[O.MG]:"https://hportalsped.fazenda.mg.gov.br/portalnfce",[O.MS]:"http://www.dfe.ms.gov.br/nfce/consulta",[O.MT]:"http://homologacao.sefaz.mt.gov.br/nfce/consultanfce",[O.PA]:"www.sefa.pa.gov.br/nfce/consulta",[O.PB]:"www.sefaz.pb.gov.br/nfcehom",[O.PE]:"nfce.sefaz.pe.gov.br/nfce/consulta",[O.PR]:"http://www.fazenda.pr.gov.br/nfce/consulta",[O.PI]:"www.sefaz.pi.gov.br/nfce/consulta",[O.RJ]:"www.fazenda.rj.gov.br/nfce/consulta",[O.RN]:"www.set.rn.gov.br/nfce/consulta",[O.RO]:"www.sefin.ro.gov.br/nfce/consulta",[O.RR]:"www.sefaz.rr.gov.br/nfce/consulta",[O.RS]:"www.sefaz.rs.gov.br/nfce/consulta",[O.SE]:"http://www.hom.nfe.se.gov.br/nfce/consulta",[O.SC]:"https://hom.sat.sef.sc.gov.br/nfce/consulta",[O.SP]:"https://www.homologacao.nfce.fazenda.sp.gov.br/NFCeConsultaPublica",[O.TO]:"http://homologacao.sefaz.to.gov.br/nfce/consulta.jsf"},[Vc.Production]:{[O.AC]:"www.sefaznet.ac.gov.br/nfce/consulta",[O.AL]:"www.sefaz.al.gov.br/nfce/consulta",[O.AP]:"www.sefaz.ap.gov.br/nfce/consulta",[O.AM]:"www.sefaz.am.gov.br/nfce/consulta",[O.BA]:"http://www.sefaz.ba.gov.br/nfce/consulta",[O.CE]:"www.sefaz.ce.gov.br/nfce/consulta",[O.DF]:"www.fazenda.df.gov.br/nfce/consulta",[O.ES]:"www.sefaz.es.gov.br/nfce/consulta",[O.GO]:"www.sefaz.go.gov.br/nfce/consulta",[O.MA]:"www.sefaz.ma.gov.br/nfce/consulta",[O.MG]:"https://portalsped.fazenda.mg.gov.br/portalnfce",[O.MS]:"http://www.dfe.ms.gov.br/nfce/consulta",[O.MT]:"http://www.sefaz.mt.gov.br/nfce/consultanfce",[O.PA]:"www.sefa.pa.gov.br/nfce/consulta",[O.PE]:"nfce.sefaz.pe.gov.br/nfce/consulta",[O.PR]:"http://www.fazenda.pr.gov.br/nfce/consulta",[O.PI]:"www.sefaz.pi.gov.br/nfce/consulta",[O.RJ]:"www.fazenda.rj.gov.br/nfce/consulta",[O.RN]:"www.set.rn.gov.br/nfce/consulta",[O.RO]:"www.sefin.ro.gov.br/nfce/consulta",[O.RR]:"www.sefaz.rr.gov.br/nfce/consulta",[O.RS]:"www.sefaz.rs.gov.br/nfce/consulta",[O.SC]:"https://sat.sef.sc.gov.br/nfce/consulta",[O.SE]:"http://www.nfce.se.gov.br/nfce/consulta",[O.SP]:"https://www.nfce.fazenda.sp.gov.br/NFCeConsultaPublica",[O.TO]:"www.sefaz.to.gov.br/nfce/consulta",[O.PB]:"www.sefaz.pb.gov.br/nfce/consulta"}};import{StateCodes as X}from"@nfets/core/domain";var Ol={[X.AC]:"SVRS",[X.AL]:"SVRS",[X.AM]:"AM",[X.AP]:"SVRS",[X.BA]:"SVRS",[X.CE]:"SVRS",[X.DF]:"SVRS",[X.ES]:"SVRS",[X.GO]:"GO",[X.MA]:"SVRS",[X.MG]:"MG",[X.MS]:"MS",[X.MT]:"MT",[X.PA]:"SVRS",[X.PB]:"SVRS",[X.PE]:"SVRS",[X.PI]:"SVRS",[X.PR]:"PR",[X.RJ]:"SVRS",[X.RN]:"SVRS",[X.RO]:"SVRS",[X.RR]:"SVRS",[X.RS]:"RS",[X.SC]:"SVRS",[X.SE]:"SVRS",[X.SP]:"SP",[X.TO]:"SVRS",SVRS:"SVRS"},_c=Ol;import{NfceAutorizacaoPayload as wl}from"@nfets/nfe/infrastructure/dto/services/nfce-autorizacao";import{Validates as Pl}from"@nfets/core/application";import{left as El}from"@nfets/core/shared/either";import{unreachable as Dl}from"@nfets/core/shared";function xl(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(xl,"_ts_decorate");function Vs(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Vs,"_ts_metadata");var Ms=class extends Ct{static{a(this,"NfceRemoteTransmitter")}remoteTransmissionRepository;qrCode;options={};constructor(e,o){super(e),this.remoteTransmissionRepository=e,this.qrCode=o}configure(e){return super.configure(e)}service(e){let o=e.cUF??this.options.cUF,n=e.tpAmb??this.options.tpAmb,i=_c[o],p=Ts[i][n][e.service];if(p)return p;let v=Object.keys(Lc).find(u=>Lc[u]===o);return Ts[v][n][e.service]}async autorizacao(e){let o=await this.infNfeSupl(e);return o.isLeft()?o:(e.NFe.infNFeSupl=o.value,super.autorizacao(e))}getUrlConsult(e){let o=e.cUF??this.options.cUF,n=e.tpAmb??this.options.tpAmb;return Mc[n][o]}async infNfeSupl(e){let o=this.options.qrCode,n=this.service({...e,service:"NfeConsultaQR"});switch(o.version??=n.version,o.version){case"200":return await this.qrCode.execute(e.NFe,{version:o.version,urlConsult:this.getUrlConsult(e),urlService:n.url,CSC:o.CSC,CSCId:o.CSCId});case"300":return this.options.certificate?await this.qrCode.execute(e.NFe,{version:o.version,certificate:this.options.certificate,urlConsult:this.getUrlConsult(e),urlService:n.url}):El(new Al("Certificate is required in QRCode version 3.00"));default:return Dl(o.version)}}};xl([Pl(wl),Vs("design:type",Function),Vs("design:paramtypes",[typeof IAutorizacaoPayload>"u"?Object:IAutorizacaoPayload]),Vs("design:returntype",Promise)],Ms.prototype,"autorizacao",null);import jl from"crypto";import{right as Sa,SignatureAlgorithm as Tl,unreachable as Vl}from"@nfets/core";import{TpEmis as Bc}from"@nfets/nfe/domain";var Uc=class{static{a(this,"NfceQrcode")}certificateRepository;constructor(e){this.certificateRepository=e}async execute(e,o){let n=await this.content(e,o);return n.isLeft()?n:Sa(this.assemble(n.value,o))}async content(e,o){return this.isVersion200(o)?await this.execute200(e,o):this.isVersion300(o)?await this.execute300(e,o):Vl(o)}isVersion200(e){return e.version==="200"}isVersion300(e){return e.version==="300"}assemble(e,o){return{qrCode:e,urlChave:o.urlConsult}}getSequence(e,o){let{version:n,CSCId:i}=o,r=e.infNFe.ide.tpAmb,s=Number.parseInt(i),p=e.infNFe.$.Id?.substring(3),v=Number.parseInt(n??"")/100;if(e.infNFe.ide.tpEmis!==Bc.OFFLINE)return`${p}|${v}|${r}|${s}`;let l=e.Signature.SignedInfo.Reference.DigestValue.split("").map(R=>R.charCodeAt(0).toString(16).padStart(2,"0")).join(""),g=new Date(e.infNFe.ide.dhEmi).getDate(),S=Number(e.infNFe.total.ICMSTot.vNF).toFixed(2);return`${p}|${v}|${r}|${g}|${S}|${l}|${s}`}async execute200(e,o){let{urlService:n,CSC:i}=o,r=this.getSequence(e,o),s=jl.createHash("sha1").update(`${r}${i}`).digest("hex").toUpperCase(),p=`${n}?p=`;return Promise.resolve(Sa(`${p}${r}|${s}`))}async execute300(e,o){let{urlService:n}=o,i=`${n}?p=`,r=e.infNFe.ide.tpAmb,s=e.infNFe.$.Id?.substring(3),p=Number.parseInt(o.version)/100;if(e.infNFe.ide.tpEmis!==Bc.OFFLINE)return Sa(`${i}${s}|${p}|${r}`);let v=new Date(e.infNFe.ide.dhEmi).getDate(),u=Number(e.infNFe.total.ICMSTot.vNF).toFixed(2),l=e.infNFe.dest?.CNPJ??e.infNFe.dest?.CPF??e.infNFe.dest?.idEstrangeiro??"",g=l.length?e.infNFe.ide.idDest:"",S=`${s}|${p}|${r}|${v}|${u}|${g}$`,R=await this.certificateRepository.sign(S,o.certificate.privateKey,Tl.SHA1);return R.isLeft()?R:Sa(`${i}${S}|${R.value}`)}};import{Environment as Ml,NFeTsError as _l}from"@nfets/core/domain";import{left as Ll,right as qc}from"@nfets/core/shared";import{ValidateErrorsMetadata as Na,Validates as xe}from"@nfets/core/application";import{NFe as Bl}from"@nfets/nfe/infrastructure/dto/nfe/nfe";import{InfNFeAttributes as Ul}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/inf-nfe";import{Ide as ql}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/ide";import{Emit as Ql}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/emit";import{Total as Hl}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/total";import{Pag as $l}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/pag";import{Transp as Jl}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/transp";import{AccessKeyBuilder as Gl}from"@nfets/nfe/application/access-key/access-key-builder";import{NfeDetXmlBuilder as Wl}from"@nfets/nfe/application/xml-builder/nfe-det-xml-builder";import{DefaultDetBuilderAggregator as Kl}from"@nfets/nfe/application/aggregator/det-builder-aggregator";import{plainToInstance as Xl}from"@nfets/core/application/validations/transformers/plain-to-instance";import{DefaultTotalBuilderAggregator as Yl}from"@nfets/nfe/application/aggregator/total-builder-aggregator";import{Cobr as Zl}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/cobr";import{InfRespTec as kl}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/infresptec";import{InfSolicNFF as em}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/inf-solic-nff";import{Avulsa as tm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/avulsa";import{Dest as om}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/dest";import{Local as Qc}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/local";import{AutXML as rm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/autxml";import{InfIntermed as nm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/infintermed";import{Exporta as im}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/exporta";import{Compra as am}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/compra";import{InfAdic as sm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/infadic";import{Cana as pm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/cana";import{TpEmis as Ca}from"@nfets/nfe/domain/entities/constants/tp-emis";import cm from"@nfets/nfe/services/contingency-webservices-mod55";function Oe(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Oe,"_ts_decorate");function I(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(I,"_ts_metadata");var ue=class{static{a(this,"NfeXmlBuilder")}builder;contingency;data={$:{xmlns:"http://www.portalfiscal.inf.br/nfe"},infNFe:{total:{ICMSTot:{}}}};get entity(){return Bl}root="NFe";$det=new Kl(this);$total=new Yl(this);nfeDetXmlBuilder=Wl.create(this.$det);static create(e,o){return new this(e,o)}constructor(e,o){this.builder=e,this.contingency=o}infNFe(e){return this.data.infNFe.$=e,this}ide(e){return this.data.infNFe.ide=e,this}emit(e){return this.data.infNFe.emit=e,this}avulsa(e){return this.data.infNFe.avulsa=e,this}dest(e){return this.data.infNFe.dest=e,this}retirada(e){return this.data.infNFe.retirada=e,this}entrega(e){return this.data.infNFe.entrega=e,this}autXML(e){return this.data.infNFe.autXML??=[],this.data.infNFe.autXML.push(e),this}det(e,o){return this.data.infNFe.det=e.map((n,i)=>{let r=o(this.nfeDetXmlBuilder.det({nItem:(i+1).toString()}),n);return this.collect(r),r.assemble()}),this}total(e){return this.data.infNFe.total=e,this}increment(e){let o=e(this.data.infNFe.total);return this.data.infNFe.total={...this.data.infNFe.total,ICMSTot:{...this.data.infNFe.total.ICMSTot,...o.ICMSTot},ISSQNtot:o.ISSQNtot?{...this.data.infNFe.total.ISSQNtot,...o.ISSQNtot}:void 0},this}transp(e){return this.data.infNFe.transp=e,this}cobr(e){return this.data.infNFe.cobr=e,this}pag(e){return this.data.infNFe.pag=e,this}infIntermed(e){return this.data.infNFe.infIntermed=e,this}infAdic(e){return this.data.infNFe.infAdic=e,this}exporta(e){return this.data.infNFe.exporta=e,this}compra(e){return this.data.infNFe.compra=e,this}cana(e){return this.data.infNFe.cana=e,this}infRespTec(e){return this.data.infNFe.infRespTec=e,this}infSolicNFF(e){return this.data.infNFe.infSolicNFF=e,this}quiet(){return Reflect.deleteMetadata(Na,this),this}toObject(){let e=this.errors();return e?Ll(new _l(e.join(", "))):(this.$total?.aggregate(),this.assertHomologValidations(),this.assertContingencyModes(),this.fillAccessKeyIfEmpty(),qc(Xl(this.data,this.entity,{clearEmptyValues:!0})))}async assemble(){let e=this.toObject();return e.isLeft()?e:qc(await this.builder.build(e.value,{rootName:this.root}))}assertHomologValidations(){return this.data.infNFe.ide.tpAmb!==Ml.Homolog?!1:(this.data.infNFe.dest&&(this.data.infNFe.dest.xNome="NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL"),!0)}assertContingencyModes(){if(this.contingency===void 0)return this.automaticallyInferContingencyMode();this.data.infNFe.ide.dhCont??=this.contingency.dhCont,this.data.infNFe.ide.xJust??=this.contingency.xJust;let{cUF:e,tpEmis:o}=this.data.infNFe.ide;if(o!==Ca.Normal)return;switch(cm[e]){case"SVCAN":return this.data.infNFe.ide.tpEmis=Ca.SVCAN,void 0;case"SVCRS":return this.data.infNFe.ide.tpEmis=Ca.SVCRS,void 0}}automaticallyInferContingencyMode(){let{xJust:e,dhCont:o,tpEmis:n}=this.data.infNFe.ide;if(!(!e&&!o&&n===Ca.Normal))return this.contingency={xJust:e??"SEFAZ fora do Ar",dhCont:o??new Date().toISOString()},this.assertContingencyModes()}errors(){return Reflect.getMetadata(Na,this)}collect(e){let o=Reflect.getMetadata(Na,e);if(!o)return;let n=this.errors();Reflect.defineMetadata(Na,(n??[]).concat(o),this)}fillAccessKeyIfEmpty(){if(this.data.infNFe.$.Id)return;let e=new Gl().compile({cUF:this.data.infNFe.ide.cUF,year:this.data.infNFe.ide.dhEmi.substring(2,4),month:this.data.infNFe.ide.dhEmi.substring(5,7),identification:this.data.infNFe.emit.CPF??this.data.infNFe.emit.CNPJ,mod:this.data.infNFe.ide.mod,serie:this.data.infNFe.ide.serie,nNF:this.data.infNFe.ide.nNF,tpEmis:this.data.infNFe.ide.tpEmis,cNF:this.data.infNFe.ide.cNF});this.data.infNFe.ide.cDV=e.slice(-1),this.data.infNFe.$={Id:`${this.root}${e}`,versao:this.data.infNFe.$.versao}}};Oe([xe(Ul),I("design:type",Function),I("design:paramtypes",[typeof IInfNFeAttributes>"u"?Object:IInfNFeAttributes]),I("design:returntype",void 0)],ue.prototype,"infNFe",null);Oe([xe(ql),I("design:type",Function),I("design:paramtypes",[typeof IIde>"u"?Object:IIde]),I("design:returntype",void 0)],ue.prototype,"ide",null);Oe([xe(Ql),I("design:type",Function),I("design:paramtypes",[typeof IEmit>"u"?Object:IEmit]),I("design:returntype",void 0)],ue.prototype,"emit",null);Oe([xe(tm),I("design:type",Function),I("design:paramtypes",[typeof IAvulsa>"u"?Object:IAvulsa]),I("design:returntype",void 0)],ue.prototype,"avulsa",null);Oe([xe(om),I("design:type",Function),I("design:paramtypes",[typeof IDest>"u"?Object:IDest]),I("design:returntype",void 0)],ue.prototype,"dest",null);Oe([xe(Qc),I("design:type",Function),I("design:paramtypes",[typeof ILocal>"u"?Object:ILocal]),I("design:returntype",void 0)],ue.prototype,"retirada",null);Oe([xe(Qc),I("design:type",Function),I("design:paramtypes",[typeof ILocal>"u"?Object:ILocal]),I("design:returntype",void 0)],ue.prototype,"entrega",null);Oe([xe(rm),I("design:type",Function),I("design:paramtypes",[typeof IAutXML>"u"?Object:IAutXML]),I("design:returntype",void 0)],ue.prototype,"autXML",null);Oe([xe(Hl),I("design:type",Function),I("design:paramtypes",[typeof ITotal>"u"?Object:ITotal]),I("design:returntype",void 0)],ue.prototype,"total",null);Oe([xe(Jl),I("design:type",Function),I("design:paramtypes",[typeof ITransp>"u"?Object:ITransp]),I("design:returntype",void 0)],ue.prototype,"transp",null);Oe([xe(Zl),I("design:type",Function),I("design:paramtypes",[typeof ICobr>"u"?Object:ICobr]),I("design:returntype",void 0)],ue.prototype,"cobr",null);Oe([xe($l),I("design:type",Function),I("design:paramtypes",[typeof IPag>"u"?Object:IPag]),I("design:returntype",void 0)],ue.prototype,"pag",null);Oe([xe(nm),I("design:type",Function),I("design:paramtypes",[typeof IInfIntermed>"u"?Object:IInfIntermed]),I("design:returntype",void 0)],ue.prototype,"infIntermed",null);Oe([xe(sm),I("design:type",Function),I("design:paramtypes",[typeof IInfAdic>"u"?Object:IInfAdic]),I("design:returntype",void 0)],ue.prototype,"infAdic",null);Oe([xe(im),I("design:type",Function),I("design:paramtypes",[typeof IExporta>"u"?Object:IExporta]),I("design:returntype",void 0)],ue.prototype,"exporta",null);Oe([xe(am),I("design:type",Function),I("design:paramtypes",[typeof ICompra>"u"?Object:ICompra]),I("design:returntype",void 0)],ue.prototype,"compra",null);Oe([xe(pm),I("design:type",Function),I("design:paramtypes",[typeof ICana>"u"?Object:ICana]),I("design:returntype",void 0)],ue.prototype,"cana",null);Oe([xe(kl),I("design:type",Function),I("design:paramtypes",[typeof IInfRespTec>"u"?Object:IInfRespTec]),I("design:returntype",void 0)],ue.prototype,"infRespTec",null);Oe([xe(em),I("design:type",Function),I("design:paramtypes",[typeof ISolicNFF>"u"?Object:ISolicNFF]),I("design:returntype",void 0)],ue.prototype,"infSolicNFF",null);import{NFCe as fm}from"@nfets/nfe/infrastructure/dto/nfe/nfce";import{TpEmis as Hc}from"@nfets/nfe/domain";var $c=class extends ue{static{a(this,"NfceXmlBuilder")}data={$:{xmlns:"http://www.portalfiscal.inf.br/nfe"},infNFe:{total:{ICMSTot:{}}},infNFeSupl:{}};get entity(){return fm}static create(e,o){return new this(e,o)}assertHomologValidations(){return super.assertHomologValidations()?(this.data.infNFe.det[0].prod.xProd="NOTA FISCAL EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL",!0):!1}assertContingencyModes(){if(this.contingency===void 0)return this.automaticallyInferContingencyMode();this.data.infNFe.ide.dhCont??=this.contingency.dhCont,this.data.infNFe.ide.xJust??=this.contingency.xJust;let{tpEmis:e}=this.data.infNFe.ide;if(e===Hc.Normal)return this.data.infNFe.ide.tpEmis=Hc.OFFLINE,void 0}};import{Validates as xt}from"@nfets/core/application";import{Prod as dm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det/prod";import{DetAttributes as um}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det";import{Imposto as lm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det/imposto";import{IPI as mm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det/imposto/ipi";import{ICMS as vm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det/imposto/icms";import{ISSQN as ym}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det/imposto/issqn";import{PIS as gm,PISST as hm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det/imposto/pis";import{COFINS as Sm,COFINSST as Nm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det/imposto/cofins";import{ICMSUFDest as Cm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det/imposto/icmsufdest";import{II as bm}from"@nfets/nfe/infrastructure/dto/nfe/inf-nfe/det/imposto/ii";function Ot(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Ot,"_ts_decorate");function V(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(V,"_ts_metadata");var dt=class{static{a(this,"NfeDetXmlBuilder")}listener;data={};static create(e){return new this(e)}constructor(e){this.listener=e}det(e){return this.data.$=e,this}prod(e){return this.data.prod=e,this.listener?.prod(e),this}imposto(e){return this.data.imposto=e,this}icms(e){return this.data.imposto??={},this.data.imposto.ICMS=e,this.listener?.icms(e),this}issqn(e){return this.data.imposto??={},this.data.imposto.ISSQN=e,this}ii(e){return this.data.imposto??={},this.data.imposto.II=e,this}ipi(e){return this.data.imposto??={},this.data.imposto.IPI=e,this}pis(e){return this.data.imposto??={},this.data.imposto.PIS=e,this}pisst(e){return this.data.imposto??={},this.data.imposto.PISST=e,this}cofins(e){return this.data.imposto??={},this.data.imposto.COFINS=e,this}cofinsst(e){return this.data.imposto??={},this.data.imposto.COFINSST=e,this}icmsufdest(e){return this.data.imposto??={},this.data.imposto.ICMSUFDest=e,this}assemble(){return this.data.imposto&&this.imposto(this.data.imposto),this.data}};Ot([xt(um),V("design:type",Function),V("design:paramtypes",[typeof IDetAttributes>"u"?Object:IDetAttributes]),V("design:returntype",void 0)],dt.prototype,"det",null);Ot([xt(dm),V("design:type",Function),V("design:paramtypes",[typeof IProd>"u"?Object:IProd]),V("design:returntype",void 0)],dt.prototype,"prod",null);Ot([xt(lm),V("design:type",Function),V("design:paramtypes",[typeof IImposto>"u"?Object:IImposto]),V("design:returntype",void 0)],dt.prototype,"imposto",null);Ot([xt(vm),V("design:type",Function),V("design:paramtypes",[typeof IICMS>"u"?Object:IICMS]),V("design:returntype",void 0)],dt.prototype,"icms",null);Ot([xt(ym),V("design:type",Function),V("design:paramtypes",[typeof IISSQN>"u"?Object:IISSQN]),V("design:returntype",void 0)],dt.prototype,"issqn",null);Ot([xt(bm),V("design:type",Function),V("design:paramtypes",[typeof III>"u"?Object:III]),V("design:returntype",void 0)],dt.prototype,"ii",null);Ot([xt(mm),V("design:type",Function),V("design:paramtypes",[typeof IIPI>"u"?Object:IIPI]),V("design:returntype",void 0)],dt.prototype,"ipi",null);Ot([xt(gm),V("design:type",Function),V("design:paramtypes",[typeof IPIS>"u"?Object:IPIS]),V("design:returntype",void 0)],dt.prototype,"pis",null);Ot([xt(hm),V("design:type",Function),V("design:paramtypes",[typeof IPISST>"u"?Object:IPISST]),V("design:returntype",void 0)],dt.prototype,"pisst",null);Ot([xt(Sm),V("design:type",Function),V("design:paramtypes",[typeof ICOFINS>"u"?Object:ICOFINS]),V("design:returntype",void 0)],dt.prototype,"cofins",null);Ot([xt(Nm),V("design:type",Function),V("design:paramtypes",[typeof ICOFINSST>"u"?Object:ICOFINSST]),V("design:returntype",void 0)],dt.prototype,"cofinsst",null);Ot([xt(Cm),V("design:type",Function),V("design:paramtypes",[typeof IICMSUFDest>"u"?Object:IICMSUFDest]),V("design:returntype",void 0)],dt.prototype,"icmsufdest",null);import{Type as _s}from"class-transformer";import{Allow as Rm,IsNotEmptyObject as Kc,IsObject as Xc,ValidateNested as Yc}from"class-validator";import{IsString as Wc}from"class-validator";function Jc(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(Jc,"_ts_decorate");function Gc(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Gc,"_ts_metadata");var $n=class{static{a(this,"InfNFeSupl")}qrCode;urlChave};Jc([Wc(),Gc("design:type",String)],$n.prototype,"qrCode",void 0);Jc([Wc(),Gc("design:type",String)],$n.prototype,"urlChave",void 0);function ba(t,e,o,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,n);else for(var p=t.length-1;p>=0;p--)(s=t[p])&&(r=(i<3?s(r):i>3?s(e,o,r):s(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r}a(ba,"_ts_decorate");function Ra(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}a(Ra,"_ts_metadata");var Yr=class{static{a(this,"NFCe")}$;infNFe;infNFeSupl;Signature};ba([Xc(),Kc(),_s(()=>Hn),Yc(),Ra("design:type",typeof INFeAttributes>"u"?Object:INFeAttributes)],Yr.prototype,"$",void 0);ba([Xc(),Kc(),_s(()=>Z),Yc(),Ra("design:type",typeof IInfNFe>"u"?Object:IInfNFe)],Yr.prototype,"infNFe",void 0);ba([_s(()=>$n),Ra("design:type",typeof IInfNFeSupl>"u"?Object:IInfNFeSupl)],Yr.prototype,"infNFeSupl",void 0);ba([Rm(),Ra("design:type",typeof Signature>"u"?Object:Signature)],Yr.prototype,"Signature",void 0);export{Fm as a,zm as b,Ls as c,Bs as d,qs as e,Cr as f,Ct as g,Tc as h,Ms as i,Uc as j,ue as k,$c as l,dt as m,Yr as n};
|