nfets 0.0.17 → 0.0.19
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/dist/{chunk-5KI5OGAA.mjs → chunk-D6GG2M7K.mjs} +1 -1
- package/dist/{chunk-PEB34YMB.mjs → chunk-MXBBYFAK.mjs} +13 -13
- package/dist/core/index.cjs +13 -13
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +9 -9
- package/dist/nfe/index.mjs +1 -1
- package/package.json +13 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as fo,B as Op,E as xp,F as Bf,G as Uf,H as qf,I as Ap,J as wp,L as H,M as f,N as Rr,d as Rp,f as d,g as Fp,h as S,i as hn,k as Hi,o as Sn,p as po,q as Ip,w as zp,x as co,z as D}from"./chunk-PEB34YMB.mjs";import{a,e as Lf,f as ts}from"./chunk-W6MRGYXP.mjs";var ht=(function(t){return t.Normal="1",t.EPEC="4",t.SVCAN="6",t.SVCRS="7",t.OFFLINE="9",t})({});var Qf={PL_009_V4:"PL_009_V4",PL_010_V1:"PL_010_V1",PL_010_V1_21:"PL_010_V1.21"},Pp=process.env.NFETS_NFE_SCHEMAS_DIR??"",Ep=Qf;var $i=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"),g=e.nNF.toString().padStart(9,"0"),m=e.tpEmis.toString().padStart(1,"0"),v=(e.cNF??this.code()).toString().padStart(8,"0"),N=`${o}${n}${i}${r}${s}${p}${g}${m}${v}`;return`${N}${this.verifyingDigit(N)}`}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,g,m,v,N,b,I,h]=n;return{cUF:r,year:s,month:p,identification:g,mod:m,serie:v,nNF:N,tpEmis:b,cNF:I,vd:h}}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}};var Ji=class{static{a(this,"DefaultDetBuilderAggregator")}builder;constructor(e){this.builder=e}prod(e){let o=fo.from(0);this.builder.increment(({ICMSTot:n})=>({ICMSTot:{vProd:fo.newOrZero(n?.vProd).add(e.vProd).toFixed(2),vFrete:fo.newOrZero(n?.vFrete).add(e.vFrete??o).toFixed(2),vSeg:fo.newOrZero(n?.vSeg).add(e.vSeg??o).toFixed(2),vDesc:fo.newOrZero(n?.vDesc).add(e.vDesc??o).toFixed(2),vOutro:fo.newOrZero(n?.vOutro).add(e.vOutro??o).toFixed(2)}}))}icms(e){}};var Gi=class{static{a(this,"DefaultTotalBuilderAggregator")}builder;constructor(e){this.builder=e}aggregate(){let e=fo.from(0);this.builder.increment(({ICMSTot:o,ISSQNtot:n})=>({ICMSTot:{vNF:fo.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)}}))}};function fi(t,e){return a(function(){return t.apply(e,arguments)},"wrap")}a(fi,"bind");var{toString:Hf}=Object.prototype,{getPrototypeOf:rs}=Object,{iterator:Yi,toStringTag:jp}=Symbol,Ki=(t=>e=>{let o=Hf.call(e);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Tt=a(t=>(t=t.toLowerCase(),e=>Ki(e)===t),"kindOfTest"),Xi=a(t=>e=>typeof e===t,"typeOfTest"),{isArray:Cn}=Array,Nn=Xi("undefined");function di(t){return t!==null&&!Nn(t)&&t.constructor!==null&&!Nn(t.constructor)&&dt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}a(di,"isBuffer");var Tp=Tt("ArrayBuffer");function $f(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Tp(t.buffer),e}a($f,"isArrayBufferView");var Jf=Xi("string"),dt=Xi("function"),Vp=Xi("number"),ui=a(t=>t!==null&&typeof t=="object","isObject"),Gf=a(t=>t===!0||t===!1,"isBoolean"),Wi=a(t=>{if(Ki(t)!=="object")return!1;let e=rs(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(jp in t)&&!(Yi in t)},"isPlainObject"),Wf=a(t=>{if(!ui(t)||di(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},"isEmptyObject"),Yf=Tt("Date"),Kf=Tt("File"),Xf=Tt("Blob"),Zf=Tt("FileList"),kf=a(t=>ui(t)&&dt(t.pipe),"isStream"),ed=a(t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||dt(t.append)&&((e=Ki(t))==="formdata"||e==="object"&&dt(t.toString)&&t.toString()==="[object FormData]"))},"isFormData"),td=Tt("URLSearchParams"),[od,rd,nd,id]=["ReadableStream","Request","Response","Headers"].map(Tt),ad=a(t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function li(t,e,{allOwnKeys:o=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),Cn(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(di(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(li,"forEach");function Mp(t,e){if(di(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(Mp,"findKey");var Ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_p=a(t=>!Nn(t)&&t!==Ur,"isContextDefined");function os(){let{caseless:t,skipUndefined:e}=_p(this)&&this||{},o={},n=a((i,r)=>{let s=t&&Mp(o,r)||r;Wi(o[s])&&Wi(i)?o[s]=os(o[s],i):Wi(i)?o[s]=os({},i):Cn(i)?o[s]=i.slice():(!e||!Nn(i))&&(o[s]=i)},"assignValue");for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&li(arguments[i],n);return o}a(os,"merge");var sd=a((t,e,o,{allOwnKeys:n}={})=>(li(e,(i,r)=>{o&&dt(i)?t[r]=fi(i,o):t[r]=i},{allOwnKeys:n}),t),"extend"),pd=a(t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),"stripBOM"),cd=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"),fd=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&&rs(t)}while(t&&(!o||o(t,e))&&t!==Object.prototype);return e},"toFlatObject"),dd=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"),ud=a(t=>{if(!t)return null;if(Cn(t))return t;let e=t.length;if(!Vp(e))return null;let o=new Array(e);for(;e-- >0;)o[e]=t[e];return o},"toArray"),ld=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&rs(Uint8Array)),md=a((t,e)=>{let n=(t&&t[Yi]).call(t),i;for(;(i=n.next())&&!i.done;){let r=i.value;e.call(t,r[0],r[1])}},"forEachEntry"),vd=a((t,e)=>{let o,n=[];for(;(o=t.exec(e))!==null;)n.push(o);return n},"matchAll"),yd=Tt("HTMLFormElement"),gd=a(t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,a(function(o,n,i){return n.toUpperCase()+i},"replacer")),"toCamelCase"),Dp=(({hasOwnProperty:t})=>(e,o)=>t.call(e,o))(Object.prototype),hd=Tt("RegExp"),Lp=a((t,e)=>{let o=Object.getOwnPropertyDescriptors(t),n={};li(o,(i,r)=>{let s;(s=e(i,r,t))!==!1&&(n[r]=s||i)}),Object.defineProperties(t,n)},"reduceDescriptors"),Sd=a(t=>{Lp(t,(e,o)=>{if(dt(t)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;let n=t[o];if(dt(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"),Nd=a((t,e)=>{let o={},n=a(i=>{i.forEach(r=>{o[r]=!0})},"define");return Cn(t)?n(t):n(String(t).split(e)),o},"toObjectSet"),Cd=a(()=>{},"noop"),bd=a((t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,"toFiniteNumber");function Rd(t){return!!(t&&dt(t.append)&&t[jp]==="FormData"&&t[Yi])}a(Rd,"isSpecCompliantForm");var Fd=a(t=>{let e=new Array(10),o=a((n,i)=>{if(ui(n)){if(e.indexOf(n)>=0)return;if(di(n))return n;if(!("toJSON"in n)){e[i]=n;let r=Cn(n)?[]:{};return li(n,(s,p)=>{let g=o(s,i+1);!Nn(g)&&(r[p]=g)}),e[i]=void 0,r}}return n},"visit");return o(t,0)},"toJSONObject"),Id=Tt("AsyncFunction"),zd=a(t=>t&&(ui(t)||dt(t))&&dt(t.then)&&dt(t.catch),"isThenable"),Bp=((t,e)=>t?setImmediate:e?((o,n)=>(Ur.addEventListener("message",({source:i,data:r})=>{i===Ur&&r===o&&n.length&&n.shift()()},!1),i=>{n.push(i),Ur.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",dt(Ur.postMessage)),Od=typeof queueMicrotask<"u"?queueMicrotask.bind(Ur):typeof process<"u"&&process.nextTick||Bp,xd=a(t=>t!=null&&dt(t[Yi]),"isIterable"),c={isArray:Cn,isArrayBuffer:Tp,isBuffer:di,isFormData:ed,isArrayBufferView:$f,isString:Jf,isNumber:Vp,isBoolean:Gf,isObject:ui,isPlainObject:Wi,isEmptyObject:Wf,isReadableStream:od,isRequest:rd,isResponse:nd,isHeaders:id,isUndefined:Nn,isDate:Yf,isFile:Kf,isBlob:Xf,isRegExp:hd,isFunction:dt,isStream:kf,isURLSearchParams:td,isTypedArray:ld,isFileList:Zf,forEach:li,merge:os,extend:sd,trim:ad,stripBOM:pd,inherits:cd,toFlatObject:fd,kindOf:Ki,kindOfTest:Tt,endsWith:dd,toArray:ud,forEachEntry:md,matchAll:vd,isHTMLForm:yd,hasOwnProperty:Dp,hasOwnProp:Dp,reduceDescriptors:Lp,freezeMethods:Sd,toObjectSet:Nd,toCamelCase:gd,noop:Cd,toFiniteNumber:bd,findKey:Mp,global:Ur,isContextDefined:_p,isSpecCompliantForm:Rd,toJSONObject:Fd,isAsyncFn:Id,isThenable:zd,setImmediate:Bp,asap:Od,isIterable:xd};function bn(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(bn,"AxiosError");c.inherits(bn,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 Up=bn.prototype,qp={};["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=>{qp[t]={value:t}});Object.defineProperties(bn,qp);Object.defineProperty(Up,"isAxiosError",{value:!0});bn.from=(t,e,o,n,i,r)=>{let s=Object.create(Up);c.toFlatObject(t,s,a(function(v){return v!==Error.prototype},"filter"),m=>m!=="isAxiosError");let p=t&&t.message?t.message:"Error",g=e==null&&t?t.code:e;return bn.call(s,p,g,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 R=bn;var Qp=ts(Bf(),1),Zi=Qp.default;function ns(t){return c.isPlainObject(t)||c.isArray(t)}a(ns,"isVisitable");function $p(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}a($p,"removeBrackets");function Hp(t,e,o){return t?t.concat(e).map(a(function(i,r){return i=$p(i),!o&&r?"["+i+"]":i},"each")).join(o?".":""):e}a(Hp,"renderKey");function Ad(t){return c.isArray(t)&&!t.some(ns)}a(Ad,"isFlatArray");var wd=c.toFlatObject(c,{},null,a(function(e){return/^is[A-Z]/.test(e)},"filter"));function Pd(t,e,o){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new(Zi||FormData),o=c.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,a(function(F,C){return!c.isUndefined(C[F])},"defined"));let n=o.metaTokens,i=o.visitor||v,r=o.dots,s=o.indexes,g=(o.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(i))throw new TypeError("visitor must be a function");function m(h){if(h===null)return"";if(c.isDate(h))return h.toISOString();if(c.isBoolean(h))return h.toString();if(!g&&c.isBlob(h))throw new R("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(h)||c.isTypedArray(h)?g&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}a(m,"convertValue");function v(h,F,C){let Q=h;if(h&&!C&&typeof h=="object"){if(c.endsWith(F,"{}"))F=n?F:F.slice(0,-2),h=JSON.stringify(h);else if(c.isArray(h)&&Ad(h)||(c.isFileList(h)||c.endsWith(F,"[]"))&&(Q=c.toArray(h)))return F=$p(F),Q.forEach(a(function(B,le){!(c.isUndefined(B)||B===null)&&e.append(s===!0?Hp([F],le,r):s===null?F:F+"[]",m(B))},"each")),!1}return ns(h)?!0:(e.append(Hp(C,F,r),m(h)),!1)}a(v,"defaultVisitor");let N=[],b=Object.assign(wd,{defaultVisitor:v,convertValue:m,isVisitable:ns});function I(h,F){if(!c.isUndefined(h)){if(N.indexOf(h)!==-1)throw Error("Circular reference detected in "+F.join("."));N.push(h),c.forEach(h,a(function(Q,Y){(!(c.isUndefined(Q)||Q===null)&&i.call(e,Q,c.isString(Y)?Y.trim():Y,F,b))===!0&&I(Q,F?F.concat(Y):[Y])},"each")),N.pop()}}if(a(I,"build"),!c.isObject(t))throw new TypeError("data must be an object");return I(t),e}a(Pd,"toFormData");var Fr=Pd;function Jp(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(Jp,"encode");function Gp(t,e){this._pairs=[],t&&Fr(t,this,e)}a(Gp,"AxiosURLSearchParams");var Wp=Gp.prototype;Wp.append=a(function(e,o){this._pairs.push([e,o])},"append");Wp.toString=a(function(e){let o=e?function(n){return e.call(this,n,Jp)}:Jp;return this._pairs.map(a(function(i){return o(i[0])+"="+o(i[1])},"each"),"").join("&")},"toString");var Yp=Gp;function Ed(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}a(Ed,"encode");function qr(t,e,o){if(!e)return t;let n=o&&o.encode||Ed;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 Yp(e,o).toString(n),r){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t}a(qr,"buildURL");var Dd=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"))}},is=Dd;var Rn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};import Td from"crypto";import jd from"url";var Kp=jd.URLSearchParams;var as="abcdefghijklmnopqrstuvwxyz",Xp="0123456789",Zp={DIGIT:Xp,ALPHA:as,ALPHA_DIGIT:as+as.toUpperCase()+Xp},Vd=a((t=16,e=Zp.ALPHA_DIGIT)=>{let o="",{length:n}=e,i=new Uint32Array(t);Td.randomFillSync(i);for(let r=0;r<t;r++)o+=e[i[r]%n];return o},"generateString"),kp={isNode:!0,classes:{URLSearchParams:Kp,FormData:Zi,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Zp,generateString:Vd,protocols:["http","https","file","data"]};var cs={};Lf(cs,{hasBrowserEnv:()=>ps,hasStandardBrowserEnv:()=>Md,hasStandardBrowserWebWorkerEnv:()=>_d,navigator:()=>ss,origin:()=>Ld});var ps=typeof window<"u"&&typeof document<"u",ss=typeof navigator=="object"&&navigator||void 0,Md=ps&&(!ss||["ReactNative","NativeScript","NS"].indexOf(ss.product)<0),_d=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ld=ps&&window.location.href||"http://localhost";var U={...cs,...kp};function fs(t,e){return Fr(t,new U.classes.URLSearchParams,{visitor:a(function(o,n,i,r){return U.isNode&&c.isBuffer(o)?(this.append(n,o.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},"visitor"),...e})}a(fs,"toURLEncodedForm");function Bd(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}a(Bd,"parsePropPath");function Ud(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(Ud,"arrayToObject");function qd(t){function e(o,n,i,r){let s=o[r++];if(s==="__proto__")return!0;let p=Number.isFinite(+s),g=r>=o.length;return s=!s&&c.isArray(i)?i.length:s,g?(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]=Ud(i[s])),!p)}if(a(e,"buildPath"),c.isFormData(t)&&c.isFunction(t.entries)){let o={};return c.forEachEntry(t,(n,i)=>{e(Bd(n),i,o,0)}),o}return null}a(qd,"formDataToJSON");var ki=qd;function Qd(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(Qd,"stringifySafely");var ds={transitional:Rn,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(ki(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 fs(e,this.formSerializer).toString();if((p=c.isFileList(e))||n.indexOf("multipart/form-data")>-1){let g=this.env&&this.env.FormData;return Fr(p?{"files[]":e}:e,g&&new g,this.formSerializer)}}return r||i?(o.setContentType("application/json",!1),Qd(e)):e},"transformRequest")],transformResponse:[a(function(e){let o=this.transitional||ds.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"?R.from(p,R.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:U.classes.FormData,Blob:U.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=>{ds.headers[t]={}});var Fn=ds;var Hd=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"]),ec=a((t=>{let e={},o,n,i;return t&&t.split(`
|
|
1
|
+
import{A as fo,B as Op,E as xp,F as Bf,G as Uf,H as qf,I as Ap,J as wp,L as H,M as f,N as Rr,d as Rp,f as d,g as Fp,h as S,i as hn,k as Hi,o as Sn,p as po,q as Ip,w as zp,x as co,z as D}from"./chunk-MXBBYFAK.mjs";import{a,e as Lf,f as ts}from"./chunk-W6MRGYXP.mjs";var ht=(function(t){return t.Normal="1",t.EPEC="4",t.SVCAN="6",t.SVCRS="7",t.OFFLINE="9",t})({});var Qf={PL_009_V4:"PL_009_V4",PL_010_V1:"PL_010_V1",PL_010_V1_21:"PL_010_V1.21"},Pp=process.env.NFETS_NFE_SCHEMAS_DIR??"",Ep=Qf;var $i=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"),g=e.nNF.toString().padStart(9,"0"),m=e.tpEmis.toString().padStart(1,"0"),v=(e.cNF??this.code()).toString().padStart(8,"0"),N=`${o}${n}${i}${r}${s}${p}${g}${m}${v}`;return`${N}${this.verifyingDigit(N)}`}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,g,m,v,N,b,I,h]=n;return{cUF:r,year:s,month:p,identification:g,mod:m,serie:v,nNF:N,tpEmis:b,cNF:I,vd:h}}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}};var Ji=class{static{a(this,"DefaultDetBuilderAggregator")}builder;constructor(e){this.builder=e}prod(e){let o=fo.from(0);this.builder.increment(({ICMSTot:n})=>({ICMSTot:{vProd:fo.newOrZero(n?.vProd).add(e.vProd).toFixed(2),vFrete:fo.newOrZero(n?.vFrete).add(e.vFrete??o).toFixed(2),vSeg:fo.newOrZero(n?.vSeg).add(e.vSeg??o).toFixed(2),vDesc:fo.newOrZero(n?.vDesc).add(e.vDesc??o).toFixed(2),vOutro:fo.newOrZero(n?.vOutro).add(e.vOutro??o).toFixed(2)}}))}icms(e){}};var Gi=class{static{a(this,"DefaultTotalBuilderAggregator")}builder;constructor(e){this.builder=e}aggregate(){let e=fo.from(0);this.builder.increment(({ICMSTot:o,ISSQNtot:n})=>({ICMSTot:{vNF:fo.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)}}))}};function fi(t,e){return a(function(){return t.apply(e,arguments)},"wrap")}a(fi,"bind");var{toString:Hf}=Object.prototype,{getPrototypeOf:rs}=Object,{iterator:Yi,toStringTag:jp}=Symbol,Ki=(t=>e=>{let o=Hf.call(e);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Tt=a(t=>(t=t.toLowerCase(),e=>Ki(e)===t),"kindOfTest"),Xi=a(t=>e=>typeof e===t,"typeOfTest"),{isArray:Cn}=Array,Nn=Xi("undefined");function di(t){return t!==null&&!Nn(t)&&t.constructor!==null&&!Nn(t.constructor)&&dt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}a(di,"isBuffer");var Tp=Tt("ArrayBuffer");function $f(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Tp(t.buffer),e}a($f,"isArrayBufferView");var Jf=Xi("string"),dt=Xi("function"),Vp=Xi("number"),ui=a(t=>t!==null&&typeof t=="object","isObject"),Gf=a(t=>t===!0||t===!1,"isBoolean"),Wi=a(t=>{if(Ki(t)!=="object")return!1;let e=rs(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(jp in t)&&!(Yi in t)},"isPlainObject"),Wf=a(t=>{if(!ui(t)||di(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},"isEmptyObject"),Yf=Tt("Date"),Kf=Tt("File"),Xf=Tt("Blob"),Zf=Tt("FileList"),kf=a(t=>ui(t)&&dt(t.pipe),"isStream"),ed=a(t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||dt(t.append)&&((e=Ki(t))==="formdata"||e==="object"&&dt(t.toString)&&t.toString()==="[object FormData]"))},"isFormData"),td=Tt("URLSearchParams"),[od,rd,nd,id]=["ReadableStream","Request","Response","Headers"].map(Tt),ad=a(t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function li(t,e,{allOwnKeys:o=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),Cn(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(di(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(li,"forEach");function Mp(t,e){if(di(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(Mp,"findKey");var Ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_p=a(t=>!Nn(t)&&t!==Ur,"isContextDefined");function os(){let{caseless:t,skipUndefined:e}=_p(this)&&this||{},o={},n=a((i,r)=>{let s=t&&Mp(o,r)||r;Wi(o[s])&&Wi(i)?o[s]=os(o[s],i):Wi(i)?o[s]=os({},i):Cn(i)?o[s]=i.slice():(!e||!Nn(i))&&(o[s]=i)},"assignValue");for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&li(arguments[i],n);return o}a(os,"merge");var sd=a((t,e,o,{allOwnKeys:n}={})=>(li(e,(i,r)=>{o&&dt(i)?t[r]=fi(i,o):t[r]=i},{allOwnKeys:n}),t),"extend"),pd=a(t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),"stripBOM"),cd=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"),fd=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&&rs(t)}while(t&&(!o||o(t,e))&&t!==Object.prototype);return e},"toFlatObject"),dd=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"),ud=a(t=>{if(!t)return null;if(Cn(t))return t;let e=t.length;if(!Vp(e))return null;let o=new Array(e);for(;e-- >0;)o[e]=t[e];return o},"toArray"),ld=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&rs(Uint8Array)),md=a((t,e)=>{let n=(t&&t[Yi]).call(t),i;for(;(i=n.next())&&!i.done;){let r=i.value;e.call(t,r[0],r[1])}},"forEachEntry"),vd=a((t,e)=>{let o,n=[];for(;(o=t.exec(e))!==null;)n.push(o);return n},"matchAll"),yd=Tt("HTMLFormElement"),gd=a(t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,a(function(o,n,i){return n.toUpperCase()+i},"replacer")),"toCamelCase"),Dp=(({hasOwnProperty:t})=>(e,o)=>t.call(e,o))(Object.prototype),hd=Tt("RegExp"),Lp=a((t,e)=>{let o=Object.getOwnPropertyDescriptors(t),n={};li(o,(i,r)=>{let s;(s=e(i,r,t))!==!1&&(n[r]=s||i)}),Object.defineProperties(t,n)},"reduceDescriptors"),Sd=a(t=>{Lp(t,(e,o)=>{if(dt(t)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;let n=t[o];if(dt(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"),Nd=a((t,e)=>{let o={},n=a(i=>{i.forEach(r=>{o[r]=!0})},"define");return Cn(t)?n(t):n(String(t).split(e)),o},"toObjectSet"),Cd=a(()=>{},"noop"),bd=a((t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,"toFiniteNumber");function Rd(t){return!!(t&&dt(t.append)&&t[jp]==="FormData"&&t[Yi])}a(Rd,"isSpecCompliantForm");var Fd=a(t=>{let e=new Array(10),o=a((n,i)=>{if(ui(n)){if(e.indexOf(n)>=0)return;if(di(n))return n;if(!("toJSON"in n)){e[i]=n;let r=Cn(n)?[]:{};return li(n,(s,p)=>{let g=o(s,i+1);!Nn(g)&&(r[p]=g)}),e[i]=void 0,r}}return n},"visit");return o(t,0)},"toJSONObject"),Id=Tt("AsyncFunction"),zd=a(t=>t&&(ui(t)||dt(t))&&dt(t.then)&&dt(t.catch),"isThenable"),Bp=((t,e)=>t?setImmediate:e?((o,n)=>(Ur.addEventListener("message",({source:i,data:r})=>{i===Ur&&r===o&&n.length&&n.shift()()},!1),i=>{n.push(i),Ur.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",dt(Ur.postMessage)),Od=typeof queueMicrotask<"u"?queueMicrotask.bind(Ur):typeof process<"u"&&process.nextTick||Bp,xd=a(t=>t!=null&&dt(t[Yi]),"isIterable"),c={isArray:Cn,isArrayBuffer:Tp,isBuffer:di,isFormData:ed,isArrayBufferView:$f,isString:Jf,isNumber:Vp,isBoolean:Gf,isObject:ui,isPlainObject:Wi,isEmptyObject:Wf,isReadableStream:od,isRequest:rd,isResponse:nd,isHeaders:id,isUndefined:Nn,isDate:Yf,isFile:Kf,isBlob:Xf,isRegExp:hd,isFunction:dt,isStream:kf,isURLSearchParams:td,isTypedArray:ld,isFileList:Zf,forEach:li,merge:os,extend:sd,trim:ad,stripBOM:pd,inherits:cd,toFlatObject:fd,kindOf:Ki,kindOfTest:Tt,endsWith:dd,toArray:ud,forEachEntry:md,matchAll:vd,isHTMLForm:yd,hasOwnProperty:Dp,hasOwnProp:Dp,reduceDescriptors:Lp,freezeMethods:Sd,toObjectSet:Nd,toCamelCase:gd,noop:Cd,toFiniteNumber:bd,findKey:Mp,global:Ur,isContextDefined:_p,isSpecCompliantForm:Rd,toJSONObject:Fd,isAsyncFn:Id,isThenable:zd,setImmediate:Bp,asap:Od,isIterable:xd};function bn(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(bn,"AxiosError");c.inherits(bn,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 Up=bn.prototype,qp={};["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=>{qp[t]={value:t}});Object.defineProperties(bn,qp);Object.defineProperty(Up,"isAxiosError",{value:!0});bn.from=(t,e,o,n,i,r)=>{let s=Object.create(Up);c.toFlatObject(t,s,a(function(v){return v!==Error.prototype},"filter"),m=>m!=="isAxiosError");let p=t&&t.message?t.message:"Error",g=e==null&&t?t.code:e;return bn.call(s,p,g,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 R=bn;var Qp=ts(Bf(),1),Zi=Qp.default;function ns(t){return c.isPlainObject(t)||c.isArray(t)}a(ns,"isVisitable");function $p(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}a($p,"removeBrackets");function Hp(t,e,o){return t?t.concat(e).map(a(function(i,r){return i=$p(i),!o&&r?"["+i+"]":i},"each")).join(o?".":""):e}a(Hp,"renderKey");function Ad(t){return c.isArray(t)&&!t.some(ns)}a(Ad,"isFlatArray");var wd=c.toFlatObject(c,{},null,a(function(e){return/^is[A-Z]/.test(e)},"filter"));function Pd(t,e,o){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new(Zi||FormData),o=c.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,a(function(F,C){return!c.isUndefined(C[F])},"defined"));let n=o.metaTokens,i=o.visitor||v,r=o.dots,s=o.indexes,g=(o.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(i))throw new TypeError("visitor must be a function");function m(h){if(h===null)return"";if(c.isDate(h))return h.toISOString();if(c.isBoolean(h))return h.toString();if(!g&&c.isBlob(h))throw new R("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(h)||c.isTypedArray(h)?g&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}a(m,"convertValue");function v(h,F,C){let Q=h;if(h&&!C&&typeof h=="object"){if(c.endsWith(F,"{}"))F=n?F:F.slice(0,-2),h=JSON.stringify(h);else if(c.isArray(h)&&Ad(h)||(c.isFileList(h)||c.endsWith(F,"[]"))&&(Q=c.toArray(h)))return F=$p(F),Q.forEach(a(function(B,le){!(c.isUndefined(B)||B===null)&&e.append(s===!0?Hp([F],le,r):s===null?F:F+"[]",m(B))},"each")),!1}return ns(h)?!0:(e.append(Hp(C,F,r),m(h)),!1)}a(v,"defaultVisitor");let N=[],b=Object.assign(wd,{defaultVisitor:v,convertValue:m,isVisitable:ns});function I(h,F){if(!c.isUndefined(h)){if(N.indexOf(h)!==-1)throw Error("Circular reference detected in "+F.join("."));N.push(h),c.forEach(h,a(function(Q,Y){(!(c.isUndefined(Q)||Q===null)&&i.call(e,Q,c.isString(Y)?Y.trim():Y,F,b))===!0&&I(Q,F?F.concat(Y):[Y])},"each")),N.pop()}}if(a(I,"build"),!c.isObject(t))throw new TypeError("data must be an object");return I(t),e}a(Pd,"toFormData");var Fr=Pd;function Jp(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(Jp,"encode");function Gp(t,e){this._pairs=[],t&&Fr(t,this,e)}a(Gp,"AxiosURLSearchParams");var Wp=Gp.prototype;Wp.append=a(function(e,o){this._pairs.push([e,o])},"append");Wp.toString=a(function(e){let o=e?function(n){return e.call(this,n,Jp)}:Jp;return this._pairs.map(a(function(i){return o(i[0])+"="+o(i[1])},"each"),"").join("&")},"toString");var Yp=Gp;function Ed(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}a(Ed,"encode");function qr(t,e,o){if(!e)return t;let n=o&&o.encode||Ed;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 Yp(e,o).toString(n),r){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t}a(qr,"buildURL");var Dd=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"))}},is=Dd;var Rn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};import Td from"crypto";import jd from"url";var Kp=jd.URLSearchParams;var as="abcdefghijklmnopqrstuvwxyz",Xp="0123456789",Zp={DIGIT:Xp,ALPHA:as,ALPHA_DIGIT:as+as.toUpperCase()+Xp},Vd=a((t=16,e=Zp.ALPHA_DIGIT)=>{let o="",{length:n}=e,i=new Uint32Array(t);Td.randomFillSync(i);for(let r=0;r<t;r++)o+=e[i[r]%n];return o},"generateString"),kp={isNode:!0,classes:{URLSearchParams:Kp,FormData:Zi,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Zp,generateString:Vd,protocols:["http","https","file","data"]};var cs={};Lf(cs,{hasBrowserEnv:()=>ps,hasStandardBrowserEnv:()=>Md,hasStandardBrowserWebWorkerEnv:()=>_d,navigator:()=>ss,origin:()=>Ld});var ps=typeof window<"u"&&typeof document<"u",ss=typeof navigator=="object"&&navigator||void 0,Md=ps&&(!ss||["ReactNative","NativeScript","NS"].indexOf(ss.product)<0),_d=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ld=ps&&window.location.href||"http://localhost";var U={...cs,...kp};function fs(t,e){return Fr(t,new U.classes.URLSearchParams,{visitor:a(function(o,n,i,r){return U.isNode&&c.isBuffer(o)?(this.append(n,o.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},"visitor"),...e})}a(fs,"toURLEncodedForm");function Bd(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}a(Bd,"parsePropPath");function Ud(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(Ud,"arrayToObject");function qd(t){function e(o,n,i,r){let s=o[r++];if(s==="__proto__")return!0;let p=Number.isFinite(+s),g=r>=o.length;return s=!s&&c.isArray(i)?i.length:s,g?(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]=Ud(i[s])),!p)}if(a(e,"buildPath"),c.isFormData(t)&&c.isFunction(t.entries)){let o={};return c.forEachEntry(t,(n,i)=>{e(Bd(n),i,o,0)}),o}return null}a(qd,"formDataToJSON");var ki=qd;function Qd(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(Qd,"stringifySafely");var ds={transitional:Rn,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(ki(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 fs(e,this.formSerializer).toString();if((p=c.isFileList(e))||n.indexOf("multipart/form-data")>-1){let g=this.env&&this.env.FormData;return Fr(p?{"files[]":e}:e,g&&new g,this.formSerializer)}}return r||i?(o.setContentType("application/json",!1),Qd(e)):e},"transformRequest")],transformResponse:[a(function(e){let o=this.transitional||ds.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"?R.from(p,R.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:U.classes.FormData,Blob:U.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=>{ds.headers[t]={}});var Fn=ds;var Hd=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"]),ec=a((t=>{let e={},o,n,i;return t&&t.split(`
|
|
2
2
|
`).forEach(a(function(s){i=s.indexOf(":"),o=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!o||e[o]&&Hd[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 tc=Symbol("internals");function mi(t){return t&&String(t).trim().toLowerCase()}a(mi,"normalizeHeader");function ea(t){return t===!1||t==null?t:c.isArray(t)?t.map(ea):String(t)}a(ea,"normalizeValue");function $d(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($d,"parseTokens");var Jd=a(t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()),"isValidHeaderName");function us(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(us,"matchHeaderValue");function Gd(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,o,n)=>o.toUpperCase()+n)}a(Gd,"formatHeader");function Wd(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(Wd,"buildAccessors");var ta=class{static{a(this,"AxiosHeaders")}constructor(e){e&&this.set(e)}set(e,o,n){let i=this;function r(p,g,m){let v=mi(g);if(!v)throw new Error("header name must be a non-empty string");let N=c.findKey(i,v);(!N||i[N]===void 0||m===!0||m===void 0&&i[N]!==!1)&&(i[N||g]=ea(p))}a(r,"setHeader");let s=a((p,g)=>c.forEach(p,(m,v)=>r(m,v,g)),"setHeaders");if(c.isPlainObject(e)||e instanceof this.constructor)s(e,o);else if(c.isString(e)&&(e=e.trim())&&!Jd(e))s(ec(e),o);else if(c.isObject(e)&&c.isIterable(e)){let p={},g,m;for(let v of e){if(!c.isArray(v))throw TypeError("Object iterator must return a key-value pair");p[m=v[0]]=(g=p[m])?c.isArray(g)?[...g,v[1]]:[g,v[1]]:v[1]}s(p,o)}else e!=null&&r(o,e,n);return this}get(e,o){if(e=mi(e),e){let n=c.findKey(this,e);if(n){let i=this[n];if(!o)return i;if(o===!0)return $d(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=mi(e),e){let n=c.findKey(this,e);return!!(n&&this[n]!==void 0&&(!o||us(this,this[n],n,o)))}return!1}delete(e,o){let n=this,i=!1;function r(s){if(s=mi(s),s){let p=c.findKey(n,s);p&&(!o||us(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||us(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]=ea(i),delete o[r];return}let p=e?Gd(r):String(r).trim();p!==r&&delete o[r],o[p]=ea(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
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[tc]=this[tc]={accessors:{}}).accessors,i=this.prototype;function r(s){let p=mi(s);n[p]||(Wd(i,s),n[p]=!0)}return a(r,"defineAccessor"),c.isArray(e)?e.forEach(r):r(e),this}};ta.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(ta.prototype,({value:t},e)=>{let o=e[0].toUpperCase()+e.slice(1);return{get:a(()=>t,"get"),set(n){this[o]=n}}});c.freezeMethods(ta);var ce=ta;function vi(t,e){let o=this||Fn,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(vi,"transformData");function yi(t){return!!(t&&t.__CANCEL__)}a(yi,"isCancel");function oc(t,e,o){R.call(this,t??"canceled",R.ERR_CANCELED,e,o),this.name="CanceledError"}a(oc,"CanceledError");c.inherits(oc,R,{__CANCEL__:!0});var St=oc;function uo(t,e,o){let n=o.config.validateStatus;!o.status||!n||n(o.status)?t(o):e(new R("Request failed with status code "+o.status,[R.ERR_BAD_REQUEST,R.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}a(uo,"settle");function ls(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}a(ls,"isAbsoluteURL");function ms(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}a(ms,"combineURLs");function Qr(t,e,o){let n=!ls(e);return t&&(n||o==!1)?ms(t,e):e}a(Qr,"buildFullPath");var mc=ts(Uf(),1),gc=ts(qf(),1);import du from"http";import uu from"https";import vc from"http2";import yc from"util";import zr from"zlib";var Hr="1.13.2";function gi(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}a(gi,"parseProtocol");var Yd=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function vs(t,e,o){let n=o&&o.Blob||U.classes.Blob,i=gi(t);if(e===void 0&&n&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let r=Yd.exec(t);if(!r)throw new R("Invalid URL",R.ERR_INVALID_URL);let s=r[1],p=r[2],g=r[3],m=Buffer.from(decodeURIComponent(g),p?"base64":"utf8");if(e){if(!n)throw new R("Blob is not supported",R.ERR_NOT_SUPPORT);return new n([m],{type:s})}return m}throw new R("Unsupported protocol "+i,R.ERR_NOT_SUPPORT)}a(vs,"fromDataURI");import Ir from"stream";import Kd from"stream";var ys=Symbol("internals"),Xd=class extends Kd.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[ys]={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[ys];return o.onReadCallback&&o.onReadCallback(),super._read(e)}_transform(e,o,n){let i=this[ys],r=i.maxRate,s=this.readableHighWaterMark,p=i.timeWindow,g=1e3/p,m=r/g,v=i.minChunkSize!==!1?Math.max(i.minChunkSize,m*.01):0,N=a((I,h)=>{let F=Buffer.byteLength(I);i.bytesSeen+=F,i.bytes+=F,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(I)?process.nextTick(h):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(h)}},"pushChunk"),b=a((I,h)=>{let F=Buffer.byteLength(I),C=null,Q=s,Y,B=0;if(r){let le=Date.now();(!i.ts||(B=le-i.ts)>=p)&&(i.ts=le,Y=m-i.bytes,i.bytes=Y<0?-Y:0,B=0),Y=m-i.bytes}if(r){if(Y<=0)return setTimeout(()=>{h(null,I)},p-B);Y<Q&&(Q=Y)}Q&&F>Q&&F-Q>v&&(C=I.subarray(Q),I=I.subarray(0,Q)),N(I,C?()=>{process.nextTick(h,null,C)}:h)},"transformChunk");b(e,a(function I(h,F){if(h)return n(h);F?b(F,I):n(null)},"transformNextChunk"))}},gs=Xd;import{EventEmitter as lu}from"events";import kd from"util";import{Readable as eu}from"stream";var{asyncIterator:rc}=Symbol,Zd=a(async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[rc]?yield*t[rc]():yield t},"readBlob"),oa=Zd;var tu=U.ALPHABET.ALPHA_DIGIT+"-_",hi=typeof TextEncoder=="function"?new TextEncoder:new kd.TextEncoder,$r=`\r
|
|
4
4
|
`,ou=hi.encode($r),ru=2,nu=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)}"`:""}${$r}`;i?o=hi.encode(String(o).replace(/\r?\n|\r\n?/g,$r)):r+=`Content-Type: ${o.type||"application/octet-stream"}${$r}`,this.headers=hi.encode(r+$r),this.contentLength=i?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+ru,this.name=e,this.value=o}async*encode(){yield this.headers;let{value:e}=this;c.isTypedArray(e)?yield e:yield*oa(e),yield ou}static escapeName(e){return String(e).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},iu=a((t,e,o)=>{let{tag:n="form-data-boundary",size:i=25,boundary:r=n+"-"+U.generateString(i,tu)}=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=hi.encode("--"+r+$r),p=hi.encode("--"+r+"--"+$r),g=p.byteLength,m=Array.from(t.entries()).map(([N,b])=>{let I=new nu(N,b);return g+=I.size,I});g+=s.byteLength*m.length,g=c.toFiniteNumber(g);let v={"Content-Type":`multipart/form-data; boundary=${r}`};return Number.isFinite(g)&&(v["Content-Length"]=g),e&&e(v),eu.from((async function*(){for(let N of m)yield s,yield*N.encode();yield p})())},"formDataToStream"),nc=iu;import au from"stream";var su=class extends au.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)}},ic=su;var pu=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"),ac=pu;function cu(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(g){let m=Date.now(),v=n[r];s||(s=m),o[i]=g,n[i]=m;let N=r,b=0;for(;N!==i;)b+=o[N++],N=N%t;if(i=(i+1)%t,i===r&&(r=(r+1)%t),m-s<e)return;let I=v&&m-v;return I?Math.round(b*1e3/I):void 0},"push")}a(cu,"speedometer");var sc=cu;function fu(t,e){let o=0,n=1e3/e,i,r,s=a((m,v=Date.now())=>{o=v,i=null,r&&(clearTimeout(r),r=null),t(...m)},"invoke");return[a((...m)=>{let v=Date.now(),N=v-o;N>=n?s(m,v):(i=m,r||(r=setTimeout(()=>{r=null,s(i)},n-N)))},"throttled"),a(()=>i&&s(i),"flush")]}a(fu,"throttle");var pc=fu;var Do=a((t,e,o=3)=>{let n=0,i=sc(50,250);return pc(r=>{let s=r.loaded,p=r.lengthComputable?r.total:void 0,g=s-n,m=i(g),v=s<=p;n=s;let N={loaded:s,total:p,progress:p?s/p:void 0,bytes:g,rate:m||void 0,estimated:m&&p&&v?(p-s)/m:void 0,event:r,lengthComputable:p!=null,[e?"download":"upload"]:!0};t(N)},o)},"progressEventReducer"),In=a((t,e)=>{let o=t!=null;return[n=>e[0]({lengthComputable:o,total:t,loaded:n}),e[1]]},"progressEventDecorator"),zn=a(t=>(...e)=>c.asap(()=>t(...e)),"asyncDecorator");function hs(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 b=0;b<s;b++)if(n.charCodeAt(b)===37&&b+2<s){let I=n.charCodeAt(b+1),h=n.charCodeAt(b+2);(I>=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102)&&(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102)&&(r-=2,b+=2)}let p=0,g=s-1,m=a(b=>b>=2&&n.charCodeAt(b-2)===37&&n.charCodeAt(b-1)===51&&(n.charCodeAt(b)===68||n.charCodeAt(b)===100),"tailIsPct3D");g>=0&&(n.charCodeAt(g)===61?(p++,g--):m(g)&&(p++,g-=3)),p===1&&g>=0&&(n.charCodeAt(g)===61||m(g))&&p++;let N=Math.floor(r/4)*3-(p||0);return N>0?N:0}return Buffer.byteLength(n,"utf8")}a(hs,"estimateDataURLDecodedBytes");var cc={flush:zr.constants.Z_SYNC_FLUSH,finishFlush:zr.constants.Z_SYNC_FLUSH},mu={flush:zr.constants.BROTLI_OPERATION_FLUSH,finishFlush:zr.constants.BROTLI_OPERATION_FLUSH},fc=c.isFunction(zr.createBrotliDecompress),{http:vu,https:yu}=gc.default,gu=/https:?/,dc=U.protocols.map(t=>t+":"),uc=a((t,[e,o])=>(t.on("end",o).on("error",o),e),"flushOnFinish"),hu=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 v=n.length;for(let N=0;N<v;N++){let[b,I]=n[N];if(!b.destroyed&&!b.closed&&yc.isDeepStrictEqual(I,o))return b}}let i=vc.connect(e,o),r,s=a(()=>{if(r)return;r=!0;let v=n,N=v.length,b=N;for(;b--;)if(v[b][0]===i){N===1?delete this.sessions[e]:v.splice(b,1);return}},"removeSession"),p=i.request,{sessionTimeout:g}=o;if(g!=null){let v,N=0;i.request=function(){let b=p.apply(this,arguments);return N++,v&&(clearTimeout(v),v=null),b.once("close",()=>{--N||(v=setTimeout(()=>{v=null,s()},g))}),b}}i.once("close",s);let m=[i,o];return n?n.push(m):n=this.sessions[e]=[m],i}},Su=new hu;function Nu(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}a(Nu,"dispatchBeforeRedirect");function hc(t,e,o){let n=e;if(!n&&n!==!1){let i=mc.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){hc(r,e,r.href)},"beforeRedirect")}a(hc,"setProxy");var Cu=typeof process<"u"&&c.kindOf(process)==="process",bu=a(t=>new Promise((e,o)=>{let n,i,r=a((g,m)=>{i||(i=!0,n&&n(g,m))},"done"),s=a(g=>{r(g),e(g)},"_resolve"),p=a(g=>{r(g,!0),o(g)},"_reject");t(s,p,g=>n=g).catch(p)}),"wrapAsync"),Ru=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"),lc=a((t,e)=>Ru(c.isObject(t)?t:{address:t,family:e}),"buildAddressEntry"),Fu={request(t,e){let o=t.protocol+"//"+t.hostname+":"+(t.port||80),{http2Options:n,headers:i}=t,r=Su.getSession(o,n),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:p,HTTP2_HEADER_PATH:g,HTTP2_HEADER_STATUS:m}=vc.constants,v={[s]:t.protocol.replace(":",""),[p]:t.method,[g]:t.path};c.forEach(i,(b,I)=>{I.charAt(0)!==":"&&(v[I]=b)});let N=r.request(v);return N.once("response",b=>{let I=N;b=Object.assign({},b);let h=b[m];delete b[m],I.headers=b,I.statusCode=+h,e(I)}),N}},Sc=Cu&&a(function(e){return bu(a(async function(n,i,r){let{data:s,lookup:p,family:g,httpVersion:m=1,http2Options:v}=e,{responseType:N,responseEncoding:b}=e,I=e.method.toUpperCase(),h,F=!1,C;if(m=+m,Number.isNaN(m))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(m!==1&&m!==2)throw TypeError(`Unsupported protocol version '${m}'`);let Q=m===2;if(p){let E=ac(p,O=>c.isArray(O)?O:[O]);p=a((O,G,gt)=>{E(O,G,(ve,jt,br)=>{if(ve)return gt(ve);let ft=c.isArray(jt)?jt.map(Qi=>lc(Qi)):[lc(jt,br)];G.all?gt(ve,ft):gt(ve,ft[0].address,ft[0].family)})},"lookup")}let Y=new lu;function B(E){try{Y.emit("abort",!E||E.type?new St(null,e,C):E)}catch(O){console.warn("emit error",O)}}a(B,"abort"),Y.once("abort",i);let le=a(()=>{e.cancelToken&&e.cancelToken.unsubscribe(B),e.signal&&e.signal.removeEventListener("abort",B),Y.removeAllListeners()},"onFinished");(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(B),e.signal&&(e.signal.aborted?B():e.signal.addEventListener("abort",B))),r((E,O)=>{if(h=!0,O){F=!0,le();return}let{data:G}=E;if(G instanceof Ir.Readable||G instanceof Ir.Duplex){let gt=Ir.finished(G,()=>{gt(),le()})}else le()});let pt=Qr(e.baseURL,e.url,e.allowAbsoluteUrls),me=new URL(pt,U.hasBrowserEnv?U.origin:void 0),xe=me.protocol||dc[0];if(xe==="data:"){if(e.maxContentLength>-1){let O=String(e.url||pt||"");if(hs(O)>e.maxContentLength)return i(new R("maxContentLength size of "+e.maxContentLength+" exceeded",R.ERR_BAD_RESPONSE,e))}let E;if(I!=="GET")return uo(n,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{E=vs(e.url,N==="blob",{Blob:e.env&&e.env.Blob})}catch(O){throw R.from(O,R.ERR_BAD_REQUEST,e)}return N==="text"?(E=E.toString(b),(!b||b==="utf8")&&(E=c.stripBOM(E))):N==="stream"&&(E=Ir.Readable.from(E)),uo(n,i,{data:E,status:200,statusText:"OK",headers:new ce,config:e})}if(dc.indexOf(xe)===-1)return i(new R("Unsupported protocol "+xe,R.ERR_BAD_REQUEST,e));let Me=ce.from(e.headers).normalize();Me.set("User-Agent","axios/"+Hr,!1);let{onUploadProgress:Nr,onDownloadProgress:yn}=e,Br=e.maxRate,Po,so;if(c.isSpecCompliantForm(s)){let E=Me.getContentType(/boundary=([-_\w\d]{10,70})/i);s=nc(s,O=>{Me.set(O)},{tag:`axios-${Hr}-boundary`,boundary:E&&E[1]||void 0})}else if(c.isFormData(s)&&c.isFunction(s.getHeaders)){if(Me.set(s.getHeaders()),!Me.hasContentLength())try{let E=await yc.promisify(s.getLength).call(s);Number.isFinite(E)&&E>=0&&Me.setContentLength(E)}catch{}}else if(c.isBlob(s)||c.isFile(s))s.size&&Me.setContentType(s.type||"application/octet-stream"),Me.setContentLength(s.size||0),s=Ir.Readable.from(oa(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 R("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",R.ERR_BAD_REQUEST,e));if(Me.setContentLength(s.length,!1),e.maxBodyLength>-1&&s.length>e.maxBodyLength)return i(new R("Request body larger than maxBodyLength limit",R.ERR_BAD_REQUEST,e))}let Eo=c.toFiniteNumber(Me.getContentLength());c.isArray(Br)?(Po=Br[0],so=Br[1]):Po=so=Br,s&&(Nr||Po)&&(c.isStream(s)||(s=Ir.Readable.from(s,{objectMode:!1})),s=Ir.pipeline([s,new gs({maxRate:c.toFiniteNumber(Po)})],c.noop),Nr&&s.on("progress",uc(s,In(Eo,Do(zn(Nr),!1,3)))));let Cr;if(e.auth){let E=e.auth.username||"",O=e.auth.password||"";Cr=E+":"+O}if(!Cr&&me.username){let E=me.username,O=me.password;Cr=E+":"+O}Cr&&Me.delete("authorization");let yt;try{yt=qr(me.pathname+me.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(E){let O=new Error(E.message);return O.config=e,O.url=e.url,O.exists=!0,i(O)}Me.set("Accept-Encoding","gzip, compress, deflate"+(fc?", br":""),!1);let _e={path:yt,method:I,headers:Me.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:Cr,protocol:xe,family:g,beforeRedirect:Nu,beforeRedirects:{},http2Options:v};!c.isUndefined(p)&&(_e.lookup=p),e.socketPath?_e.socketPath=e.socketPath:(_e.hostname=me.hostname.startsWith("[")?me.hostname.slice(1,-1):me.hostname,_e.port=me.port,hc(_e,e.proxy,xe+"//"+me.hostname+(me.port?":"+me.port:"")+_e.path));let ct,gn=gu.test(_e.protocol);if(_e.agent=gn?e.httpsAgent:e.httpAgent,Q?ct=Fu:e.transport?ct=e.transport:e.maxRedirects===0?ct=gn?uu:du:(e.maxRedirects&&(_e.maxRedirects=e.maxRedirects),e.beforeRedirect&&(_e.beforeRedirects.config=e.beforeRedirect),ct=gn?yu:vu),e.maxBodyLength>-1?_e.maxBodyLength=e.maxBodyLength:_e.maxBodyLength=1/0,e.insecureHTTPParser&&(_e.insecureHTTPParser=e.insecureHTTPParser),C=ct.request(_e,a(function(O){if(C.destroyed)return;let G=[O],gt=c.toFiniteNumber(O.headers["content-length"]);if(yn||so){let ft=new gs({maxRate:c.toFiniteNumber(so)});yn&&ft.on("progress",uc(ft,In(gt,Do(zn(yn),!0,3)))),G.push(ft)}let ve=O,jt=O.req||C;if(e.decompress!==!1&&O.headers["content-encoding"])switch((I==="HEAD"||O.statusCode===204)&&delete O.headers["content-encoding"],(O.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":G.push(zr.createUnzip(cc)),delete O.headers["content-encoding"];break;case"deflate":G.push(new ic),G.push(zr.createUnzip(cc)),delete O.headers["content-encoding"];break;case"br":fc&&(G.push(zr.createBrotliDecompress(mu)),delete O.headers["content-encoding"])}ve=G.length>1?Ir.pipeline(G,c.noop):G[0];let br={status:O.statusCode,statusText:O.statusMessage,headers:new ce(O.headers),config:e,request:jt};if(N==="stream")br.data=ve,uo(n,i,br);else{let ft=[],Qi=0;ve.on("data",a(function(ot){ft.push(ot),Qi+=ot.length,e.maxContentLength>-1&&Qi>e.maxContentLength&&(F=!0,ve.destroy(),B(new R("maxContentLength size of "+e.maxContentLength+" exceeded",R.ERR_BAD_RESPONSE,e,jt)))},"handleStreamData")),ve.on("aborted",a(function(){if(F)return;let ot=new R("stream has been aborted",R.ERR_BAD_RESPONSE,e,jt);ve.destroy(ot),i(ot)},"handlerStreamAborted")),ve.on("error",a(function(ot){C.destroyed||i(R.from(ot,null,e,jt))},"handleStreamError")),ve.on("end",a(function(){try{let ot=ft.length===1?ft[0]:Buffer.concat(ft);N!=="arraybuffer"&&(ot=ot.toString(b),(!b||b==="utf8")&&(ot=c.stripBOM(ot))),br.data=ot}catch(ot){return i(R.from(ot,null,e,br.request,br))}uo(n,i,br)},"handleStreamEnd"))}Y.once("abort",ft=>{ve.destroyed||(ve.emit("error",ft),ve.destroy())})},"handleResponse")),Y.once("abort",E=>{C.close?C.close():C.destroy(E)}),C.on("error",a(function(O){i(R.from(O,null,e,C))},"handleRequestError")),C.on("socket",a(function(O){O.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let E=parseInt(e.timeout,10);if(Number.isNaN(E)){B(new R("error trying to parse `config.timeout` to int",R.ERR_BAD_OPTION_VALUE,e,C));return}C.setTimeout(E,a(function(){if(h)return;let G=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",gt=e.transitional||Rn;e.timeoutErrorMessage&&(G=e.timeoutErrorMessage),B(new R(G,gt.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,e,C))},"handleRequestTimeout"))}else C.setTimeout(0);if(c.isStream(s)){let E=!1,O=!1;s.on("end",()=>{E=!0}),s.once("error",G=>{O=!0,C.destroy(G)}),s.on("close",()=>{!E&&!O&&B(new St("Request stream has been aborted",e,C))}),s.pipe(C)}else s&&C.write(s),C.end()},"dispatchHttpRequest"))},"httpAdapter");var Nc=U.hasStandardBrowserEnv?((t,e)=>o=>(o=new URL(o,U.origin),t.protocol===o.protocol&&t.host===o.host&&(e||t.port===o.port)))(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0;var Cc=U.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 bc=a(t=>t instanceof ce?{...t}:t,"headersToObject");function Vt(t,e){e=e||{};let o={};function n(m,v,N,b){return c.isPlainObject(m)&&c.isPlainObject(v)?c.merge.call({caseless:b},m,v):c.isPlainObject(v)?c.merge({},v):c.isArray(v)?v.slice():v}a(n,"getMergedValue");function i(m,v,N,b){if(c.isUndefined(v)){if(!c.isUndefined(m))return n(void 0,m,N,b)}else return n(m,v,N,b)}a(i,"mergeDeepProperties");function r(m,v){if(!c.isUndefined(v))return n(void 0,v)}a(r,"valueFromConfig2");function s(m,v){if(c.isUndefined(v)){if(!c.isUndefined(m))return n(void 0,m)}else return n(void 0,v)}a(s,"defaultToConfig2");function p(m,v,N){if(N in e)return n(m,v);if(N in t)return n(void 0,m)}a(p,"mergeDirectKeys");let g={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((m,v,N)=>i(bc(m),bc(v),N,!0),"headers")};return c.forEach(Object.keys({...t,...e}),a(function(v){let N=g[v]||i,b=N(t[v],e[v],v);c.isUndefined(b)&&N!==p||(o[v]=b)},"computeConfigValue")),o}a(Vt,"mergeConfig");var ra=a((t=>{let e=Vt({},t),{data:o,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:s,auth:p}=e;if(e.headers=s=ce.from(s),e.url=qr(Qr(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(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(c.isFunction(o.getHeaders)){let g=o.getHeaders(),m=["content-type","content-length"];Object.entries(g).forEach(([v,N])=>{m.includes(v.toLowerCase())&&s.set(v,N)})}}if(U.hasStandardBrowserEnv&&(n&&c.isFunction(n)&&(n=n(e)),n||n!==!1&&Nc(e.url))){let g=i&&r&&Cc.read(r);g&&s.set(i,g)}return e}),"default");var Iu=typeof XMLHttpRequest<"u",Rc=Iu&&function(t){return new Promise(a(function(o,n){let i=ra(t),r=i.data,s=ce.from(i.headers).normalize(),{responseType:p,onUploadProgress:g,onDownloadProgress:m}=i,v,N,b,I,h;function F(){I&&I(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(v),i.signal&&i.signal.removeEventListener("abort",v)}a(F,"done");let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function Q(){if(!C)return;let B=ce.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),pt={data:!p||p==="text"||p==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:B,config:t,request:C};uo(a(function(xe){o(xe),F()},"_resolve"),a(function(xe){n(xe),F()},"_reject"),pt),C=null}a(Q,"onloadend"),"onloadend"in C?C.onloadend=Q:C.onreadystatechange=a(function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(Q)},"handleLoad"),C.onabort=a(function(){C&&(n(new R("Request aborted",R.ECONNABORTED,t,C)),C=null)},"handleAbort"),C.onerror=a(function(le){let pt=le&&le.message?le.message:"Network Error",me=new R(pt,R.ERR_NETWORK,t,C);me.event=le||null,n(me),C=null},"handleError"),C.ontimeout=a(function(){let le=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",pt=i.transitional||Rn;i.timeoutErrorMessage&&(le=i.timeoutErrorMessage),n(new R(le,pt.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,t,C)),C=null},"handleTimeout"),r===void 0&&s.setContentType(null),"setRequestHeader"in C&&c.forEach(s.toJSON(),a(function(le,pt){C.setRequestHeader(pt,le)},"setRequestHeader")),c.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),p&&p!=="json"&&(C.responseType=i.responseType),m&&([b,h]=Do(m,!0),C.addEventListener("progress",b)),g&&C.upload&&([N,I]=Do(g),C.upload.addEventListener("progress",N),C.upload.addEventListener("loadend",I)),(i.cancelToken||i.signal)&&(v=a(B=>{C&&(n(!B||B.type?new St(null,t,C):B),C.abort(),C=null)},"onCanceled"),i.cancelToken&&i.cancelToken.subscribe(v),i.signal&&(i.signal.aborted?v():i.signal.addEventListener("abort",v)));let Y=gi(i.url);if(Y&&U.protocols.indexOf(Y)===-1){n(new R("Unsupported protocol "+Y+":",R.ERR_BAD_REQUEST,t));return}C.send(r||null)},"dispatchXhrRequest"))};var zu=a((t,e)=>{let{length:o}=t=t?t.filter(Boolean):[];if(e||o){let n=new AbortController,i,r=a(function(m){if(!i){i=!0,p();let v=m instanceof Error?m:this.reason;n.abort(v instanceof R?v:new St(v instanceof Error?v.message:v))}},"onabort"),s=e&&setTimeout(()=>{s=null,r(new R(`timeout ${e} of ms exceeded`,R.ETIMEDOUT))},e),p=a(()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(m=>{m.unsubscribe?m.unsubscribe(r):m.removeEventListener("abort",r)}),t=null)},"unsubscribe");t.forEach(m=>m.addEventListener("abort",r));let{signal:g}=n;return g.unsubscribe=()=>c.asap(p),g}},"composeSignals"),Fc=zu;var Ou=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"),xu=a(async function*(t,e){for await(let o of Au(t))yield*Ou(o,e)},"readBytes"),Au=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"),Ss=a((t,e,o,n)=>{let i=xu(t,e),r=0,s,p=a(g=>{s||(s=!0,n&&n(g))},"_onFinish");return new ReadableStream({async pull(g){try{let{done:m,value:v}=await i.next();if(m){p(),g.close();return}let N=v.byteLength;if(o){let b=r+=N;o(b)}g.enqueue(new Uint8Array(v))}catch(m){throw p(m),m}},cancel(g){return p(g),i.return()}},{highWaterMark:2})},"trackStream");var Ic=64*1024,{isFunction:na}=c,wu=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:zc,TextEncoder:Oc}=c.global,xc=a((t,...e)=>{try{return!!t(...e)}catch{return!1}},"test"),Pu=a(t=>{t=c.merge.call({skipUndefined:!0},wu,t);let{fetch:e,Request:o,Response:n}=t,i=e?na(e):typeof fetch=="function",r=na(o),s=na(n);if(!i)return!1;let p=i&&na(zc),g=i&&(typeof Oc=="function"?(h=>F=>h.encode(F))(new Oc):async h=>new Uint8Array(await new o(h).arrayBuffer())),m=r&&p&&xc(()=>{let h=!1,F=new o(U.origin,{body:new zc,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!F}),v=s&&p&&xc(()=>c.isReadableStream(new n("").body)),N={stream:v&&(h=>h.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!N[h]&&(N[h]=(F,C)=>{let Q=F&&F[h];if(Q)return Q.call(F);throw new R(`Response type '${h}' is not supported`,R.ERR_NOT_SUPPORT,C)})});let b=a(async h=>{if(h==null)return 0;if(c.isBlob(h))return h.size;if(c.isSpecCompliantForm(h))return(await new o(U.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(c.isArrayBufferView(h)||c.isArrayBuffer(h))return h.byteLength;if(c.isURLSearchParams(h)&&(h=h+""),c.isString(h))return(await g(h)).byteLength},"getBodyLength"),I=a(async(h,F)=>{let C=c.toFiniteNumber(h.getContentLength());return C??b(F)},"resolveBodyLength");return async h=>{let{url:F,method:C,data:Q,signal:Y,cancelToken:B,timeout:le,onDownloadProgress:pt,onUploadProgress:me,responseType:xe,headers:Me,withCredentials:Nr="same-origin",fetchOptions:yn}=ra(h),Br=e||fetch;xe=xe?(xe+"").toLowerCase():"text";let Po=Fc([Y,B&&B.toAbortSignal()],le),so=null,Eo=Po&&Po.unsubscribe&&(()=>{Po.unsubscribe()}),Cr;try{if(me&&m&&C!=="get"&&C!=="head"&&(Cr=await I(Me,Q))!==0){let O=new o(F,{method:"POST",body:Q,duplex:"half"}),G;if(c.isFormData(Q)&&(G=O.headers.get("content-type"))&&Me.setContentType(G),O.body){let[gt,ve]=In(Cr,Do(zn(me)));Q=Ss(O.body,Ic,gt,ve)}}c.isString(Nr)||(Nr=Nr?"include":"omit");let yt=r&&"credentials"in o.prototype,_e={...yn,signal:Po,method:C.toUpperCase(),headers:Me.normalize().toJSON(),body:Q,duplex:"half",credentials:yt?Nr:void 0};so=r&&new o(F,_e);let ct=await(r?Br(so,yn):Br(F,_e)),gn=v&&(xe==="stream"||xe==="response");if(v&&(pt||gn&&Eo)){let O={};["status","statusText","headers"].forEach(jt=>{O[jt]=ct[jt]});let G=c.toFiniteNumber(ct.headers.get("content-length")),[gt,ve]=pt&&In(G,Do(zn(pt),!0))||[];ct=new n(Ss(ct.body,Ic,gt,()=>{ve&&ve(),Eo&&Eo()}),O)}xe=xe||"text";let E=await N[c.findKey(N,xe)||"text"](ct,h);return!gn&&Eo&&Eo(),await new Promise((O,G)=>{uo(O,G,{data:E,headers:ce.from(ct.headers),status:ct.status,statusText:ct.statusText,config:h,request:so})})}catch(yt){throw Eo&&Eo(),yt&&yt.name==="TypeError"&&/Load failed|fetch/i.test(yt.message)?Object.assign(new R("Network Error",R.ERR_NETWORK,h,so),{cause:yt.cause||yt}):R.from(yt,yt&&yt.code,h,so)}}},"factory"),Eu=new Map,Ns=a(t=>{let e=t&&t.env||{},{fetch:o,Request:n,Response:i}=e,r=[n,i,o],s=r.length,p=s,g,m,v=Eu;for(;p--;)g=r[p],m=v.get(g),m===void 0&&v.set(g,m=p?new Map:Pu(e)),v=m;return m},"getFetch"),Zg=Ns();var Cs={http:Sc,xhr:Rc,fetch:{get:Ns}};c.forEach(Cs,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var Ac=a(t=>`- ${t}`,"renderReason"),ju=a(t=>c.isFunction(t)||t===null||t===!1,"isResolvedHandle");function Tu(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,!ju(n)&&(i=Cs[(p=String(n)).toLowerCase()],i===void 0))throw new R(`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(([g,m])=>`adapter ${g} `+(m===!1?"is not supported by the environment":"is not available in the build")),p=o?s.length>1?`since :
|