@regulaforensics/document-reader-webclient
Version:
Regula Document Reader js client for the browser and node.js based on axios
9 lines • 253 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};function n(e,t){return function(){return e.apply(t,arguments)}}var{toString:r}=Object.prototype,{getPrototypeOf:i}=Object,{iterator:a,toStringTag:o}=Symbol,s=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),c=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),s(n,t))return!0;n=i(n)}return!1},l=(e,t)=>e!=null&&c(e,t)?e[t]:void 0,u=(e=>t=>{let n=r.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),d=e=>(e=e.toLowerCase(),t=>u(t)===e),f=e=>t=>typeof t===e,{isArray:p}=Array,m=f(`undefined`);function h(e){return e!==null&&!m(e)&&e.constructor!==null&&!m(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var g=d(`ArrayBuffer`);function _(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t}var v=f(`string`),y=f(`function`),b=f(`number`),x=e=>typeof e==`object`&&!!e,S=e=>e===!0||e===!1,C=e=>{if(!x(e))return!1;let t=i(e);return(t===null||t===Object.prototype||i(t)===null)&&!c(e,o)&&!c(e,a)},w=e=>{if(!x(e)||h(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},T=d(`Date`),E=d(`File`),D=e=>!!(e&&e.uri!==void 0),ee=e=>e&&e.getParts!==void 0,te=d(`Blob`),O=d(`FileList`),k=e=>x(e)&&y(e.pipe);function ne(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var re=ne(),ie=re.FormData===void 0?void 0:re.FormData,ae=e=>{if(!e)return!1;if(ie&&e instanceof ie)return!0;let t=i(e);if(!t||t===Object.prototype||!y(e.append))return!1;let n=u(e);return n===`formdata`||n===`object`&&y(e.toString)&&e.toString()===`[object FormData]`},oe=d(`URLSearchParams`),[se,ce,le,ue]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(d),de=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function fe(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),p(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(h(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function pe(e,t){if(h(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var me=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,he=e=>!m(e)&&e!==me;function ge(...e){let{caseless:t,skipUndefined:n}=he(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&pe(r,i)||i,o=s(r,a)?r[a]:void 0;C(o)&&C(e)?r[a]=ge(o,e):C(e)?r[a]=ge({},e):p(e)?r[a]=e.slice():(!n||!m(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||h(n)||(fe(n,i),typeof n!=`object`||p(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];Oe.call(n,t)&&i(n[t],t)}}return r}var _e=(e,t,r,{allOwnKeys:i}={})=>(fe(t,(t,i)=>{r&&y(t)?Object.defineProperty(e,i,{__proto__:null,value:n(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),ve=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ye=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},be=(e,t,n,r)=>{let a,o,s,c={};if(t||={},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)s=a[o],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Se=e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!b(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},Ce=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&i(Uint8Array)),we=(e,t)=>{let n=(e&&e[a]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Te=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ee=d(`HTMLFormElement`),De=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:Oe}=Object.prototype,ke=d(`RegExp`),Ae=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};fe(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},je=e=>{Ae(e,(t,n)=>{if(y(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(y(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Me=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return p(e)?r(e):r(String(e).split(t)),n},Ne=()=>{},Pe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Fe(e){return!!(e&&y(e.append)&&e[o]===`FormData`&&e[a])}var Ie=e=>{let t=new WeakSet,n=e=>{if(x(e)){if(t.has(e))return;if(h(e))return e;if(!(`toJSON`in e)){t.add(e);let r=p(e)?[]:{};return fe(e,(e,t)=>{let i=n(e);!m(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},Le=d(`AsyncFunction`),Re=e=>e&&(x(e)||y(e))&&y(e.then)&&y(e.catch),ze=((e,t)=>e?setImmediate:t?((e,t)=>(me.addEventListener(`message`,({source:n,data:r})=>{n===me&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),me.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,y(me.postMessage)),Be=typeof queueMicrotask<`u`?queueMicrotask.bind(me):typeof process<`u`&&process.nextTick||ze,Ve=e=>e!=null&&y(e[a]),A={isArray:p,isArrayBuffer:g,isBuffer:h,isFormData:ae,isArrayBufferView:_,isString:v,isNumber:b,isBoolean:S,isObject:x,isPlainObject:C,isEmptyObject:w,isReadableStream:se,isRequest:ce,isResponse:le,isHeaders:ue,isUndefined:m,isDate:T,isFile:E,isReactNativeBlob:D,isReactNative:ee,isBlob:te,isRegExp:ke,isFunction:y,isStream:k,isURLSearchParams:oe,isTypedArray:Ce,isFileList:O,forEach:fe,merge:ge,extend:_e,trim:de,stripBOM:ve,inherits:ye,toFlatObject:be,kindOf:u,kindOfTest:d,endsWith:xe,toArray:Se,forEachEntry:we,matchAll:Te,isHTMLForm:Ee,hasOwnProperty:s,hasOwnProp:s,hasOwnInPrototypeChain:c,getSafeProp:l,reduceDescriptors:Ae,freezeMethods:je,toObjectSet:Me,toCamelCase:De,noop:Ne,toFiniteNumber:Pe,findKey:pe,global:me,isContextDefined:he,isSpecCompliantForm:Fe,toJSONObject:Ie,isAsyncFn:Le,isThenable:Re,setImmediate:ze,asap:Be,isIterable:Ve,isSafeIterable:e=>e!=null&&c(e,a)&&Ve(e)},He=A.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`]),Ue=e=>{let t={},n,r,i;return e&&e.split(`
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&He[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function We(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var Ge=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Ke=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function qe(e,t){return A.isArray(e)?e.map(e=>qe(e,t)):We(String(e).replace(t,``))}var Je=e=>qe(e,Ge),Ye=e=>qe(e,Ke);function Xe(e){let t=Object.create(null);return A.forEach(e.toJSON(),(e,n)=>{t[n]=Ye(e)}),t}var Ze=Symbol(`internals`);function Qe(e){return e&&String(e).trim().toLowerCase()}function $e(e){return e===!1||e==null?e:A.isArray(e)?e.map($e):Je(String(e))}function et(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var tt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function nt(e,t,n,r,i){if(A.isFunction(r))return r.call(this,t,n);if(i&&(t=n),A.isString(t)){if(A.isString(r))return t.indexOf(r)!==-1;if(A.isRegExp(r))return r.test(t)}}function rt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function it(e,t){let n=A.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var j=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=Qe(t);if(!i)return;let a=A.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=$e(e))}let a=(e,t)=>A.forEach(e,(e,n)=>i(e,n,t));if(A.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(A.isString(e)&&(e=e.trim())&&!tt(e))a(Ue(e),t);else if(A.isObject(e)&&A.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!A.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],A.hasOwnProp(n,i)?(r=n[i],n[i]=A.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Qe(e),e){let n=A.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return et(e);if(A.isFunction(t))return t.call(this,e,n);if(A.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=Qe(e),e){let n=A.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||nt(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=Qe(e),e){let i=A.findKey(n,e);i&&(!t||nt(n,n[i],i,t))&&(delete n[i],r=!0)}}return A.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||nt(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return A.forEach(this,(r,i)=>{let a=A.findKey(n,i);if(a){t[a]=$e(r),delete t[i];return}let o=e?rt(i):String(i).trim();o!==i&&delete t[i],t[o]=$e(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return A.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&A.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
`)}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,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Ze]=this[Ze]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=Qe(e);t[r]||(it(n,e),t[r]=!0)}return A.isArray(e)?e.forEach(r):r(e),this}};j.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),A.reduceDescriptors(j.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),A.freezeMethods(j);var at=`[REDACTED ****]`;function ot(e){if(A.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(A.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function st(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||A.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof j&&(e=e.toJSON()),r.push(e);let t;if(A.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);A.isUndefined(r)||(t[n]=r)});else{if(!A.isPlainObject(e)&&ot(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?at:i(a);A.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var M=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&A.hasOwnProp(e,`redact`)?e.redact:void 0,n=A.isArray(t)&&t.length>0?st(e,t):A.toJSONObject(e);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:n,code:this.code,status:this.status}}};M.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,M.ERR_BAD_OPTION=`ERR_BAD_OPTION`,M.ECONNABORTED=`ECONNABORTED`,M.ETIMEDOUT=`ETIMEDOUT`,M.ECONNREFUSED=`ECONNREFUSED`,M.ERR_NETWORK=`ERR_NETWORK`,M.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,M.ERR_DEPRECATED=`ERR_DEPRECATED`,M.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,M.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,M.ERR_CANCELED=`ERR_CANCELED`,M.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,M.ERR_INVALID_URL=`ERR_INVALID_URL`,M.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function ct(e){return A.isPlainObject(e)||A.isArray(e)}function lt(e){return A.endsWith(e,`[]`)?e.slice(0,-2):e}function ut(e,t,n){return e?e.concat(t).map(function(e,t){return e=lt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function dt(e){return A.isArray(e)&&!e.some(ct)}var ft=A.toFlatObject(A,{},null,function(e){return/^is[A-Z]/.test(e)});function pt(e,t,n){if(!A.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=A.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!A.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&A.isSpecCompliantForm(t),u=[];if(!A.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(A.isDate(e))return e.toISOString();if(A.isBoolean(e))return e.toString();if(!l&&A.isBlob(e))throw new M(`Blob is not supported. Use a Buffer instead.`);return A.isArrayBuffer(e)||A.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function f(e){if(e>c)throw new M(`Object is too deeply nested (`+e+` levels). Max depth: `+c,M.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!A.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(A.isReactNative(t)&&A.isReactNativeBlob(e))return t.append(ut(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(A.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(A.isArray(e)&&dt(e)||(A.isFileList(e)||A.endsWith(n,`[]`))&&(s=A.toArray(e)))return n=lt(n),s.forEach(function(e,r){!(A.isUndefined(e)||e===null)&&t.append(o===!0?ut([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return ct(e)?!0:(t.append(ut(i,n,a),d(e)),!1)}let h=Object.assign(ft,{defaultVisitor:m,convertValue:d,isVisitable:ct});function g(e,n,r=0){if(!A.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),A.forEach(e,function(e,a){(!(A.isUndefined(e)||e===null)&&i.call(t,e,A.isString(a)?a.trim():a,n,h))===!0&&g(e,n?n.concat(a):[a],r+1)}),u.pop()}}if(!A.isObject(e))throw TypeError(`data must be an object`);return g(e),t}function mt(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function ht(e,t){this._pairs=[],e&&pt(e,this,t)}var gt=ht.prototype;gt.append=function(e,t){this._pairs.push([e,t])},gt.toString=function(e){let t=e?function(t){return e.call(this,t,mt)}:mt;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function _t(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function vt(e,t,n){if(!t)return e;let r=A.isFunction(n)?{serialize:n}:n,i=A.getSafeProp(r,`encode`)||_t,a=A.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):A.isURLSearchParams(t)?t.toString():new ht(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var yt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,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&&=[]}forEach(e){A.forEach(this.handlers,function(t){t!==null&&e(t)})}},bt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},xt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:ht,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},St=t({hasBrowserEnv:()=>Ct,hasStandardBrowserEnv:()=>Tt,hasStandardBrowserWebWorkerEnv:()=>Et,navigator:()=>wt,origin:()=>Dt}),Ct=typeof window<`u`&&typeof document<`u`,wt=typeof navigator==`object`&&navigator||void 0,Tt=Ct&&(!wt||[`ReactNative`,`NativeScript`,`NS`].indexOf(wt.product)<0),Et=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Dt=Ct&&window.location.href||`http://localhost`,N={...St,...xt};function Ot(e,t){return pt(e,new N.classes.URLSearchParams,{visitor:function(e,t,n,r){return N.isNode&&A.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var kt=100;function At(e){if(e>kt)throw new M(`FormData field is too deeply nested (`+e+` levels). Max depth: `+kt,M.ERR_FORM_DATA_DEPTH_EXCEEDED)}function jt(e){let t=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(e))!==null;)At(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function Mt(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Nt(e){function t(e,n,r,i){At(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&A.isArray(r)?r.length:a,s?(A.hasOwnProp(r,a)?r[a]=A.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!A.hasOwnProp(r,a)||!A.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&A.isArray(r[a])&&(r[a]=Mt(r[a])),!o)}if(A.isFormData(e)&&A.isFunction(e.entries)){let n={};return A.forEachEntry(e,(e,r)=>{t(jt(e),r,n,0)}),n}return null}var Pt=(e,t)=>e!=null&&A.hasOwnProp(e,t)?e[t]:void 0;function Ft(e,t,n){if(A.isString(e))try{return(t||JSON.parse)(e),A.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var It={transitional:bt,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=A.isObject(e);if(i&&A.isHTMLForm(e)&&(e=new FormData(e)),A.isFormData(e))return r?JSON.stringify(Nt(e)):e;if(A.isArrayBuffer(e)||A.isBuffer(e)||A.isStream(e)||A.isFile(e)||A.isBlob(e)||A.isReadableStream(e))return e;if(A.isArrayBufferView(e))return e.buffer;if(A.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Pt(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Ot(e,t).toString();if((a=A.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Pt(this,`env`),r=n&&n.FormData;return pt(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Ft(e)):e}],transformResponse:[function(e){let t=Pt(this,`transitional`)||It.transitional,n=t&&t.forcedJSONParsing,r=Pt(this,`responseType`),i=r===`json`;if(A.isResponse(e)||A.isReadableStream(e))return e;if(e&&A.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Pt(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?M.from(e,M.ERR_BAD_RESPONSE,this,null,Pt(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};A.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{It.headers[e]={}});function Lt(e,t){let n=this||It,r=t||n,i=j.from(r.headers),a=r.data;return A.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Rt(e){return!!(e&&e.__CANCEL__)}var zt=class extends M{constructor(e,t,n){super(e??`canceled`,M.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Bt(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new M(`Request failed with status code `+n.status,n.status>=400&&n.status<500?M.ERR_BAD_REQUEST:M.ERR_BAD_RESPONSE,n.config,n.request,n))}function Vt(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function Ht(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Ut(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var Wt=(e,t,n=3)=>{let r=0,i=Ht(50,250);return Ut(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Gt=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kt=e=>(...t)=>A.asap(()=>e(...t)),qt=N.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,N.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(N.origin),N.navigator&&/(msie|trident)/i.test(N.navigator.userAgent)):()=>!0,Jt=N.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];A.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),A.isString(r)&&s.push(`path=${r}`),A.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),A.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Yt(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Xt(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}var Zt=/^https?:(?!\/\/)/i,Qt=/[\t\n\r]/g;function $t(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function en(e){return $t(e).replace(Qt,``)}function tn(e,t){if(typeof e==`string`&&Zt.test(en(e)))throw new M(`Invalid URL: missing "//" after protocol`,M.ERR_INVALID_URL,t)}function nn(e,t,n,r){tn(t,r);let i=!Yt(t);return e&&(i||n===!1)?(tn(e,r),Xt(e,t)):t}var rn=e=>e instanceof j?{...e}:e;function an(e,t){t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return A.isPlainObject(e)&&A.isPlainObject(t)?A.merge.call({caseless:r},e,t):A.isPlainObject(t)?A.merge({},t):A.isArray(t)?t.slice():t}function i(e,t,n,i){if(!A.isUndefined(t))return r(e,t,n,i);if(!A.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!A.isUndefined(t))return r(void 0,t)}function o(e,t){if(!A.isUndefined(t))return r(void 0,t);if(!A.isUndefined(e))return r(void 0,e)}function s(n){let r=A.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!A.isUndefined(r))if(A.isPlainObject(r)){if(A.hasOwnProp(r,n))return r[n]}else return;let i=A.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(A.isPlainObject(i)&&A.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(A.hasOwnProp(t,a))return r(n,i);if(A.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(rn(e),rn(t),n,!0)};return A.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=A.hasOwnProp(l,r)?l[r]:i,o=a(A.hasOwnProp(e,r)?e[r]:void 0,A.hasOwnProp(t,r)?t[r]:void 0,r);A.isUndefined(o)&&a!==c||(n[r]=o)}),A.hasOwnProp(t,`validateStatus`)&&A.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(A.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var on=[`content-type`,`content-length`];function sn(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{on.includes(t.toLowerCase())&&e.set(t,n)})}var cn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function ln(e){let t=an({},e),n=e=>A.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=j.from(s),t.url=vt(nn(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let e=A.getSafeProp(c,`username`)||``,t=A.getSafeProp(c,`password`)||``;s.set(`Authorization`,`Basic `+btoa(e+`:`+(t?cn(t):``)))}if(A.isFormData(r)&&(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv||A.isReactNative(r)?s.setContentType(void 0):A.isFunction(r.getHeaders)&&sn(s,r.getHeaders(),n(`formDataHeaderPolicy`))),N.hasStandardBrowserEnv&&(A.isFunction(i)&&(i=i(t)),i===!0||i==null&&qt(t.url))){let e=a&&o&&Jt.read(o);e&&s.set(a,e)}return t}var un=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=ln(e),i=r.data,a=j.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=j.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Bt(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new M(`Request aborted`,M.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new M(t&&t.message?t.message:`Network Error`,M.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||bt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new M(t,i.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&A.forEach(Xe(a),function(e,t){h.setRequestHeader(t,e)}),A.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Wt(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Wt(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new zt(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Vt(r.url);if(_&&!N.protocols.includes(_)){n(new M(`Unsupported protocol `+_+`:`,M.ERR_BAD_REQUEST,e));return}h.send(i||null)})},dn=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof M?t:new zt(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new M(`timeout of ${t}ms exceeded`,M.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>A.asap(o),s},fn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},pn=async function*(e,t){for await(let n of mn(e))yield*fn(n,t)},mn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},hn=(e,t,n,r)=>{let i=pn(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},gn=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,_n=(e,t,n)=>t+2<n&&gn(e.charCodeAt(t+1))&&gn(e.charCodeAt(t+2));function vn(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);gn(t)&&gn(i)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n===37&&_n(r,e,t))i+=1,e+=2;else if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var yn=`1.18.0`,bn=64*1024,{isFunction:xn}=A,Sn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Cn=e=>{if(!A.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},wn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Tn=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},En=e=>{let t=A.global!==void 0&&A.global!==null?A.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=A.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?xn(i):typeof fetch==`function`,c=xn(a),l=xn(o);if(!s)return!1;let u=s&&xn(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&wn(()=>{let e=!1,t=new a(N.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&wn(()=>A.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new M(`Response type '${e}' is not supported`,M.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(A.isBlob(e))return e.size;if(A.isSpecCompliantForm(e))return(await new a(N.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(A.isArrayBufferView(e)||A.isArrayBuffer(e))return e.byteLength;if(A.isURLSearchParams(e)&&(e+=``),A.isString(e))return(await d(e)).byteLength},g=async(e,t)=>A.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:T}=ln(e),E=A.isNumber(w)&&w>-1,D=A.isNumber(T)&&T>-1,ee=t=>A.hasOwnProp(e,t)?e[t]:void 0,te=i||fetch;b=b?(b+``).toLowerCase():`text`;let O=dn([l,d&&d.toAbortSignal()],_),k=null,ne=O&&O.unsubscribe&&(()=>{O.unsubscribe()}),re,ie=null,ae=()=>new M(`Request body larger than maxBodyLength limit`,M.ERR_BAD_REQUEST,e,k);try{let i,l=ee(`auth`);if(l&&(i={username:A.getSafeProp(l,`username`)||``,password:A.getSafeProp(l,`password`)||``}),Tn(t)){let e=new URL(t,N.origin);!i&&(e.username||e.password)&&(i={username:Cn(e.username),password:Cn(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(Sn((i.username||``)+`:`+(i.password||``))))),E&&typeof t==`string`&&t.startsWith(`data:`)&&vn(t)>w)throw new M(`maxContentLength size of `+w+` exceeded`,M.ERR_BAD_RESPONSE,e,k);if(D&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(re=e,e>T))throw ae()}let d=D&&(A.isReadableStream(s)||A.isStream(s)),_=(e,t,n)=>hn(e,bn,e=>{if(D&&e>T)throw ie=ae();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(re??=await g(x,s),re!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(A.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&Gt(re,Wt(Kt(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new M(`Stream request bodies are not supported by the current fetch implementation`,M.ERR_NOT_SUPPORT,e,k);A.isString(S)||(S=S?`include`:`omit`);let oe=c&&`credentials`in a.prototype;if(A.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+yn,!1);let se={...C,signal:O,method:n.toUpperCase(),headers:Xe(x.normalize()),body:s,duplex:`half`,credentials:oe?S:void 0};k=c&&new a(t,se);let ce=await(c?te(k,C):te(t,se)),le=j.from(ce.headers);if(E){let t=A.toFiniteNumber(le.getContentLength());if(t!=null&&t>w)throw new M(`maxContentLength size of `+w+` exceeded`,M.ERR_BAD_RESPONSE,e,k)}let ue=p&&(b===`stream`||b===`response`);if(p&&ce.body&&(v||E||ue&&ne)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=ce[e]});let n=A.toFiniteNumber(le.getContentLength()),[r,i]=v&&Gt(n,Wt(Kt(v),!0))||[],a=0;ce=new o(hn(ce.body,bn,t=>{if(E&&(a=t,a>w))throw new M(`maxContentLength size of `+w+` exceeded`,M.ERR_BAD_RESPONSE,e,k);r&&r(t)},()=>{i&&i(),ne&&ne()}),t)}b||=`text`;let de=await m[A.findKey(m,b)||`text`](ce,e);if(E&&!p&&!ue){let t;if(de!=null&&(typeof de.byteLength==`number`?t=de.byteLength:typeof de.size==`number`?t=de.size:typeof de==`string`&&(t=typeof r==`function`?new r().encode(de).byteLength:de.length)),typeof t==`number`&&t>w)throw new M(`maxContentLength size of `+w+` exceeded`,M.ERR_BAD_RESPONSE,e,k)}return!ue&&ne&&ne(),await new Promise((t,n)=>{Bt(t,n,{data:de,headers:j.from(ce.headers),status:ce.status,statusText:ce.statusText,config:e,request:k})})}catch(t){if(ne&&ne(),O&&O.aborted&&O.reason instanceof M){let n=O.reason;throw n.config=e,k&&(n.request=k),t!==n&&(n.cause=t),n}throw ie?(k&&!ie.request&&(ie.request=k),ie):t instanceof M?(k&&!t.request&&(t.request=k),t):t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new M(`Network Error`,M.ERR_NETWORK,e,k,t&&t.response),{cause:t.cause||t}):M.from(t,t&&t.code,e,k,t&&t.response)}}},Dn=new Map,On=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Dn;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:En(t)),l=c;return c};On();var kn={http:null,xhr:un,fetch:{get:On}};A.forEach(kn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var An=e=>`- ${e}`,jn=e=>A.isFunction(e)||e===null||e===!1;function Mn(e,t){e=A.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!jn(r)&&(i=kn[(n=String(r)).toLowerCase()],i===void 0))throw new M(`Unknown adapter '${n}'`);if(i&&(A.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new M(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
`+e.map(An).join(`
`):` `+An(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var Nn={getAdapter:Mn,adapters:kn};function Pn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zt(null,e)}function Fn(e){return Pn(e),e.headers=j.from(e.headers),e.data=Lt.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Nn.getAdapter(e.adapter||It.adapter,e)(e).then(function(t){Pn(e),e.response=t;try{t.data=Lt.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=j.from(t.headers),t},function(t){if(!Rt(t)&&(Pn(e),t&&t.response)){e.response=t.response;try{t.response.data=Lt.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=j.from(t.response.headers)}return Promise.reject(t)})}var In={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{In[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Ln={};In.transitional=function(e,t,n){function r(e,t){return`[Axios v`+yn+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new M(r(i,` has been removed`+(t?` in `+t:``)),M.ERR_DEPRECATED);return t&&!Ln[i]&&(Ln[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},In.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Rn(e,t,n){if(typeof e!=`object`)throw new M(`options must be an object`,M.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new M(`option `+a+` must be `+n,M.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new M(`Unknown option `+a,M.ERR_BAD_OPTION)}}var zn={assertOptions:Rn,validators:In},P=zn.validators,Bn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new yt,response:new yt}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
`),r=t===-1?-1:n.indexOf(`
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=an(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&zn.assertOptions(n,{silentJSONParsing:P.transitional(P.boolean),forcedJSONParsing:P.transitional(P.boolean),clarifyTimeoutError:P.transitional(P.boolean),legacyInterceptorReqResOrdering:P.transitional(P.boolean),advertiseZstdAcceptEncoding:P.transitional(P.boolean),validateStatusUndefinedResolves:P.transitional(P.boolean)},!1),r!=null&&(A.isFunction(r)?t.paramsSerializer={serialize:r}:zn.assertOptions(r,{encode:P.function,serialize:P.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),zn.assertOptions(t,{baseUrl:P.spelling(`baseURL`),withXsrfToken:P.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&A.merge(i.common,i[t.method]);i&&A.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=j.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||bt;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Fn.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Fn.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=an(this.defaults,e),vt(nn(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};A.forEach([`delete`,`get`,`head`,`options`],function(e){Bn.prototype[e]=function(t,n){return this.request(an(n||{},{method:e,url:t,data:n&&A.hasOwnProp(n,`data`)?n.data:void 0}))}}),A.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(an(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Bn.prototype[e]=t(),e!==`query`&&(Bn.prototype[e+`Form`]=t(!0))});var Vn=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new zt(e,r,i),t(n.reason))})}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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Hn(e){return function(t){return e.apply(null,t)}}function Un(e){return A.isObject(e)&&e.isAxiosError===!0}var Wn={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(Wn).forEach(([e,t])=>{Wn[t]=e});function Gn(e){let t=new Bn(e),r=n(Bn.prototype.request,t);return A.extend(r,Bn.prototype,t,{allOwnKeys:!0}),A.extend(r,t,null,{allOwnKeys:!0}),r.create=function(t){return Gn(an(e,t))},r}var F=Gn(It);F.Axios=Bn,F.CanceledError=zt,F.CancelToken=Vn,F.isCancel=Rt,F.VERSION=yn,F.toFormData=pt,F.AxiosError=M,F.Cancel=F.CanceledError,F.all=function(e){return Promise.all(e)},F.spread=Hn,F.isAxiosError=Un,F.mergeConfig=an,F.AxiosHeaders=j,F.formToJSON=e=>Nt(A.isHTMLForm(e)?new FormData(e):e),F.getAdapter=Nn.getAdapter,F.HttpStatusCode=Wn,F.default=F;var I=`https://api.regulaforensics.com`.replace(/\/+$/,``),Kn=class{constructor(e,t=I,n=F){this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath??t)}},qn=class extends Error{constructor(e,t){super(t),this.field=e,this.name=`RequiredError`}},L={},R=`https://example.com`,Jn=function(e,t,n){if(n==null)throw new qn(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function Yn(e,t,n=``){t!=null&&(typeof t==`object`?Array.isArray(t)?t.forEach(t=>Yn(e,t,n)):Object.keys(t).forEach(r=>Yn(e,t[r],`${n}${n===``?``:`.`}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}for(var z=function(e,...t){let n=new URLSearchParams(e.search);Yn(n,t),e.search=n.toString()},Xn=function(e,t,n){let r=typeof e!=`string`;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers[`Content-Type`]):r)?JSON.stringify(e===void 0?{}:e):e||``},Zn=function(e){return e.pathname+e.search+e.hash},B=function(e,t,n,r){return(i=t,a=n)=>{let o={...e.options,url:(i.defaults.baseURL?``:r?.basePath??a)+e.url};return i.request(o)}},Qn=function(e){return{healthz:async(t,n={})=>{let r=new URL(`/api/healthz`,R),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...n},o={};t!=null&&(o[`X-RequestID`]=String(t)),z(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},{url:Zn(r),options:a}},ping:async(t,n={})=>{let r=new URL(`/api/ping`,R),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...n},o={};t!=null&&(o[`X-RequestID`]=String(t)),z(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},{url:Zn(r),options:a}},readyz:async(t,n={})=>{let r=new URL(`/api/readyz`,R),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...n},o={};t!=null&&(o[`X-RequestID`]=String(t)),z(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},{url:Zn(r),options:a}}}},$n=function(e){let t=Qn(e);return{async healthz(n,r){let i=await t.healthz(n,r),a=e?.serverIndex??0,o=L[`HealthcheckApi.healthz`]?.[a]?.url;return(t,n)=>B(i,F,I,e)(t,o||n)},async ping(n,r){let i=await t.ping(n,r),a=e?.serverIndex??0,o=L[`HealthcheckApi.ping`]?.[a]?.url;return(t,n)=>B(i,F,I,e)(t,o||n)},async readyz(n,r){let i=await t.readyz(n,r),a=e?.serverIndex??0,o=L[`HealthcheckApi.readyz`]?.[a]?.url;return(t,n)=>B(i,F,I,e)(t,o||n)}}},er=class extends Kn{healthz(e,t){return $n(this.configuration).healthz(e,t).then(e=>e(this.axios,this.basePath))}ping(e,t){return $n(this.configuration).ping(e,t).then(e=>e(this.axios,this.basePath))}readyz(e,t){return $n(this.configuration).readyz(e,t).then(e=>e(this.axios,this.basePath))}},tr=function(e){return{apiProcess:async(t,n,r={})=>{Jn(`apiProcess`,`processRequest`,t);let i=new URL(`/api/process`,R),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...r},s={};s[`Content-Type`]=`application/json`,n!=null&&(s[`X-RequestID`]=String(n)),z(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...r.headers},o.data=Xn(t,o,e),{url:Zn(i),options:o}}}},nr=function(e){let t=tr(e);return{async apiProcess(n,r,i){let a=await t.apiProcess(n,r,i),o=e?.serverIndex??0,s=L[`ProcessApi.apiProcess`]?.[o]?.url;return(t,n)=>B(a,F,I,e)(t,s||n)}}},rr=class extends Kn{apiProcess(e,t,n){return nr(this.configuration).apiProcess(e,t,n).then(e=>e(this.axios,this.basePath))}},ir=function(e){return{apiV2TagTagIdDelete:async(t,n={})=>{Jn(`apiV2TagTagIdDelete`,`tagId`,t);let r=`/api/v2/tag/{tagId}`.replace(`{tagId}`,encodeURIComponent(String(t))),i=new URL(r,R),a;e&&(a=e.baseOptions);let o={method:`DELETE`,...a,...n},s={};z(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:Zn(i),options:o}},apiV2TagTagIdTransactionsGet:async(t,n={})=>{Jn(`apiV2TagTagIdTransactionsGet`,`tagId`,t);let r=`/api/v2/tag/{tagId}/transactions`.replace(`{tagId}`,encodeURIComponent(String(t))),i=new URL(r,R),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};z(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:Zn(i),options:o}},apiV2TransactionTransactionIdFileGet:async(t,n,r={})=>{Jn(`apiV2TransactionTransactionIdFileGet`,`transactionId`,t),Jn(`apiV2TransactionTransactionIdFileGet`,`name`,n);let i=`/api/v2/transaction/{transactionId}/file`.replace(`{transactionId}`,encodeURIComponent(String(t))),a=new URL(i,R),o;e&&(o=e.baseOptions);let s={method:`GET`,...o,...r},c={},l={};n!==void 0&&(l.name=n),z(a,l);let u=o&&o.headers?o.headers:{};return s.headers={...c,...u,...r.headers},{url:Zn(a),options:s}},apiV2TransactionTransactionIdGet:async(t,n={})=>{Jn(`apiV2TransactionTransactionIdGet`,`transactionId`,t);let r=`/api/v2/transaction/{transactionId}`.replace(`{transactionId}`,encodeURIComponent(String(t))),i=new URL(r,R),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};z(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:Zn(i),options:o}},apiV2TransactionTransactionIdProcessPost:async(t,n,r,i={})=>{Jn(`apiV2TransactionTransactionIdProcessPost`,`transactionId`,t),Jn(`apiV2TransactionTransactionIdProcessPost`,`transactionProcessRequest`,n);let a=`/api/v2/transaction/{transactionId}/process`.replace(`{transactionId}`,encodeURIComponent(String(t))),o=new URL(a,R),s;e&&(s=e.baseOptions);let c={method:`POST`,...s,...i},l={},u={};r!==void 0&&(u.useCache=r),l[`Content-Type`]=`application/json`,z(o,u);let d=s&&s.headers?s.headers:{};return c.headers={...l,...d,...i.headers},c.data=Xn(n,c,e),{url:Zn(o),options:c}},apiV2TransactionTransactionIdResultsGet:async(t,n,r={})=>{Jn(`apiV2TransactionTransactionIdResultsG