ebay-api 9.4.2 → 9.4.3

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.
@@ -1 +1 @@
1
- function bind$3(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,{iterator:r,toStringTag:n}=Symbol,o=(i=Object.create(null),t=>{const r=e.call(t);return i[r]||(i[r]=r.slice(8,-1).toLowerCase())});var i;const kindOfTest=e=>(e=e.toLowerCase(),t=>o(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:s}=Array,c=typeOfTest("undefined");function isBuffer$1(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const u=kindOfTest("ArrayBuffer");const l=typeOfTest("string"),p=typeOfTest("function"),d=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==o(e))return!1;const i=t(e);return!(null!==i&&i!==Object.prototype&&null!==Object.getPrototypeOf(i)||n in e||r in e)},E=kindOfTest("Date"),f=kindOfTest("File"),h=kindOfTest("Blob"),g=kindOfTest("FileList"),_=kindOfTest("URLSearchParams"),[m,y,R,A]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),s(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(isBuffer$1(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function findKey(e,t){if(isBuffer$1(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!c(e)&&e!==I;const T=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&t(Uint8Array)),S=kindOfTest("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),N=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)};const O=kindOfTest("AsyncFunction"),b=(P="function"==typeof setImmediate,U=p(I.postMessage),P?setImmediate:U?(D=`axios@${Math.random()}`,L=[],I.addEventListener("message",(({source:e,data:t})=>{e===I&&t===D&&L.length&&L.shift()()}),!1),e=>{L.push(e),I.postMessage(D,"*")}):e=>setTimeout(e));var P,U,D,L;const v="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||b;var B={isArray:s,isArrayBuffer:u,isBuffer:isBuffer$1,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=o(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t},isString:l,isNumber:d,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isEmptyObject:e=>{if(!isObject(e)||isBuffer$1(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:m,isRequest:y,isResponse:R,isHeaders:A,isUndefined:c,isDate:E,isFile:f,isBlob:h,isRegExp:N,isFunction:p,isStream:e=>isObject(e)&&p(e.pipe),isURLSearchParams:_,isTypedArray:T,isFileList:g,forEach:forEach,merge:function merge$1(){const{caseless:e,skipUndefined:t}=isContextDefined(this)&&this||{},r={},assignValue=(n,o)=>{const i=e&&findKey(r,o)||o;isPlainObject(r[i])&&isPlainObject(n)?r[i]=merge$1(r[i],n):isPlainObject(n)?r[i]=merge$1({},n):s(n)?r[i]=n.slice():t&&c(n)||(r[i]=n)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],assignValue);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{r&&p(t)?e[n]=bind$3(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,r,n,o)=>{let i,s,c;const u={};if(r=r||{},null==e)return r;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)c=i[s],o&&!o(c,e,r)||u[c]||(r[c]=e[c],u[c]=!0);e=!1!==n&&t(e)}while(e&&(!n||n(e,r))&&e!==Object.prototype);return r},kindOf:o,kindOfTest:kindOfTest,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(s(e))return e;let t=e.length;if(!d(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const n=(e&&e[r]).call(e);let o;for(;(o=n.next())&&!o.done;){const r=o.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:S,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,((t,r)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];p(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},define=e=>{e.forEach((e=>{r[e]=!0}))};return s(e)?define(e):define(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function replacer(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:findKey,global:I,isContextDefined:isContextDefined,isSpecCompliantForm:function isSpecCompliantForm(e){return!!(e&&p(e.append)&&"FormData"===e[n]&&e[r])},toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(isBuffer$1(e))return e;if(!("toJSON"in e)){t[r]=e;const n=s(e)?[]:{};return forEach(e,((e,t)=>{const o=visit(e,r+1);!c(o)&&(n[t]=o)})),t[r]=void 0,n}}return e};return visit(e,0)},isAsyncFn:O,isThenable:e=>e&&(isObject(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:b,asap:v,isIterable:e=>null!=e&&p(e[r])};function AxiosError(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}B.inherits(AxiosError,Error,{toJSON:function toJSON(){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:B.toJSONObject(this.config),code:this.code,status:this.status}}});const M=AxiosError.prototype,F={};["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((e=>{F[e]={value:e}})),Object.defineProperties(AxiosError,F),Object.defineProperty(M,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,o,i)=>{const s=Object.create(M);B.toFlatObject(e,s,(function filter(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e));const c=e&&e.message?e.message:"Error",u=null==t&&e?e.code:t;return AxiosError.call(s,c,u,r,n,o),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};function isVisitable(e){return B.isPlainObject(e)||B.isArray(e)}function removeBrackets(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map((function each(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const w=B.toFlatObject(B,{},null,(function filter(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,r){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=B.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function defined(e,t){return!B.isUndefined(t[e])}))).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(B.isDate(e))return e.toISOString();if(B.isBoolean(e))return e.toString();if(!c&&B.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(e)||B.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function defaultVisitor(e,r,o){let c=e;if(e&&!o&&"object"==typeof e)if(B.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(B.isArray(e)&&function isFlatArray(e){return B.isArray(e)&&!e.some(isVisitable)}(e)||(B.isFileList(e)||B.endsWith(r,"[]"))&&(c=B.toArray(e)))return r=removeBrackets(r),c.forEach((function each(e,n){!B.isUndefined(e)&&null!==e&&t.append(!0===s?renderKey([r],n,i):null===s?r:r+"[]",convertValue(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(o,r,i),convertValue(e)),!1)}const u=[],l=Object.assign(w,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!B.isObject(e))throw new TypeError("data must be an object");return function build(e,r){if(!B.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+r.join("."));u.push(e),B.forEach(e,(function each(e,n){!0===(!(B.isUndefined(e)||null===e)&&o.call(t,e,B.isString(n)?n.trim():n,r,l))&&build(e,r?r.concat(n):[n])})),u.pop()}}(e),t}function encode$2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function replacer(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const x=AxiosURLSearchParams.prototype;function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode$1;B.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):B.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}x.append=function append(e,t){this._pairs.push([e,t])},x.toString=function toString(e){const t=e?function(t){return e.call(this,t,encode$2)}:encode$2;return this._pairs.map((function each(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var k=class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){B.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))}},G={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Y={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const $="undefined"!=typeof window&&"undefined"!=typeof document,H="object"==typeof navigator&&navigator||void 0,j=$&&(!H||["ReactNative","NativeScript","NS"].indexOf(H.product)<0),V="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,K=$&&window.location.href||"http://localhost";var W={...Object.freeze({__proto__:null,hasBrowserEnv:$,hasStandardBrowserEnv:j,hasStandardBrowserWebWorkerEnv:V,navigator:H,origin:K}),...Y};function formDataToJSON(e){function buildPath(e,t,r,n){let o=e[n++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),s=n>=e.length;if(o=!o&&B.isArray(r)?r.length:o,s)return B.hasOwnProp(r,o)?r[o]=[r[o],t]:r[o]=t,!i;r[o]&&B.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&B.isArray(r[o])&&(r[o]=function arrayToObject$1(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(r[o])),!i}if(B.isFormData(e)&&B.isFunction(e.entries)){const t={};return B.forEachEntry(e,((e,r)=>{buildPath(function parsePropPath(e){return B.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,t,0)})),t}return null}const q={transitional:G,adapter:["xhr","http","fetch"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=B.isObject(e);o&&B.isHTMLForm(e)&&(e=new FormData(e));if(B.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e)||B.isReadableStream(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(e,t){return toFormData(e,new W.classes.URLSearchParams,{visitor:function(e,t,r,n){return W.isNode&&B.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=B.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function stringifySafely(e,t,r){if(B.isString(e))try{return(t||JSON.parse)(e),B.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function transformResponse(e){const t=this.transitional||q.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(B.isResponse(e)||B.isReadableStream(e))return e;if(e&&B.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:W.classes.FormData,Blob:W.classes.Blob},validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],(e=>{q.headers[e]={}}));var X=q;const z=B.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"]);const J=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:B.isArray(e)?e.map(normalizeValue):String(e)}function matchHeaderValue(e,t,r,n,o){return B.isFunction(n)?n.call(this,t,r):(o&&(t=r),B.isString(t)?B.isString(n)?-1!==t.indexOf(n):B.isRegExp(n)?n.test(t):void 0:void 0)}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function setHeader(e,t,r){const o=normalizeHeader(t);if(!o)throw new Error("header name must be a non-empty string");const i=B.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=normalizeValue(e))}const setHeaders=(e,t)=>B.forEach(e,((e,r)=>setHeader(e,r,t)));if(B.isPlainObject(e)||e instanceof this.constructor)setHeaders(e,t);else if(B.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))setHeaders((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function parser(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&z[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(B.isObject(e)&&B.isIterable(e)){let r,n,o={};for(const t of e){if(!B.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?B.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}setHeaders(o,t)}else null!=e&&setHeader(t,e,r);return this}get(e,t){if(e=normalizeHeader(e)){const r=B.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(B.isFunction(t))return t.call(this,e,r);if(B.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=B.findKey(this,e);return!(!r||void 0===this[r]||t&&!matchHeaderValue(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function deleteHeader(e){if(e=normalizeHeader(e)){const o=B.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return B.isArray(e)?e.forEach(deleteHeader):deleteHeader(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!matchHeaderValue(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return B.forEach(this,((n,o)=>{const i=B.findKey(r,o);if(i)return t[i]=normalizeValue(n),void delete t[o];const s=e?function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=normalizeValue(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return B.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&B.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}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){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[J]=this[J]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=B.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return B.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),B.reduceDescriptors(AxiosHeaders.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),B.freezeMethods(AxiosHeaders);var Q=AxiosHeaders;function transformData(e,t){const r=this||X,n=t||r,o=Q.from(n.headers);let i=n.data;return B.forEach(e,(function transform(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,null==e?"canceled":e,AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}B.inherits(CanceledError,AxiosError,{__CANCEL__:!0});const progressEventReducer=(e,t,r=3)=>{let n=0;const o=function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function push(c){const u=Date.now(),l=n[s];o||(o=u),r[i]=c,n[i]=u;let p=s,d=0;for(;p!==i;)d+=r[p++],p%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const E=l&&u-l;return E?Math.round(1e3*d/E):void 0}}(50,250);return function throttle(e,t){let r,n,o=0,i=1e3/t;const invoke=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?invoke(e,t):(r=e,n||(n=setTimeout((()=>{n=null,invoke(r)}),i-s)))},()=>r&&invoke(r)]}((r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,c=i-n,u=o(c);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),r)},progressEventDecorator=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},asyncDecorator=e=>(...t)=>B.asap((()=>e(...t)));var Z=W.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,W.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(W.origin),W.navigator&&/(msie|trident)/i.test(W.navigator.userAgent)):()=>!0,ee=W.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];B.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),B.isString(n)&&s.push("path="+n),B.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function buildFullPath(e,t,r){let n=!function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||0==r)?function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const headersToObject=e=>e instanceof Q?{...e}:e;function mergeConfig(e,t){t=t||{};const r={};function getMergedValue(e,t,r,n){return B.isPlainObject(e)&&B.isPlainObject(t)?B.merge.call({caseless:n},e,t):B.isPlainObject(t)?B.merge({},t):B.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r,n){return B.isUndefined(t)?B.isUndefined(e)?void 0:getMergedValue(void 0,e,0,n):getMergedValue(e,t,0,n)}function valueFromConfig2(e,t){if(!B.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return B.isUndefined(t)?B.isUndefined(e)?void 0:getMergedValue(void 0,e):getMergedValue(void 0,t)}function mergeDirectKeys(r,n,o){return o in t?getMergedValue(r,n):o in e?getMergedValue(void 0,r):void 0}const n={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(e,t,r)=>mergeDeepProperties(headersToObject(e),headersToObject(t),0,!0)};return B.forEach(Object.keys({...e,...t}),(function computeConfigValue(o){const i=n[o]||mergeDeepProperties,s=i(e[o],t[o],o);B.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)})),r}var resolveConfig=e=>{const t=mergeConfig({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:c}=t;if(t.headers=s=Q.from(s),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),B.isFormData(r))if(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(B.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)}))}if(W.hasStandardBrowserEnv&&(n&&B.isFunction(n)&&(n=n(t)),n||!1!==n&&Z(t.url))){const e=o&&i&&ee.read(i);e&&s.set(o,e)}return t};var te="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function dispatchXhrRequest(t,r){const n=resolveConfig(e);let o=n.data;const i=Q.from(n.headers).normalize();let s,c,u,l,p,{responseType:d,onUploadProgress:E,onDownloadProgress:f}=n;function done(){l&&l(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function onloadend(){if(!h)return;const n=Q.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());settle((function _resolve(e){t(e),done()}),(function _reject(e){r(e),done()}),{data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout,"onloadend"in h?h.onloadend=onloadend:h.onreadystatechange=function handleLoad(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(onloadend)},h.onabort=function handleAbort(){h&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,h)),h=null)},h.onerror=function handleError(t){const n=new AxiosError(t&&t.message?t.message:"Network Error",AxiosError.ERR_NETWORK,e,h);n.event=t||null,r(n),h=null},h.ontimeout=function handleTimeout(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||G;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new AxiosError(t,o.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,h)),h=null},void 0===o&&i.setContentType(null),"setRequestHeader"in h&&B.forEach(i.toJSON(),(function setRequestHeader(e,t){h.setRequestHeader(t,e)})),B.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),d&&"json"!==d&&(h.responseType=n.responseType),f&&([u,p]=progressEventReducer(f,!0),h.addEventListener("progress",u)),E&&h.upload&&([c,l]=progressEventReducer(E),h.upload.addEventListener("progress",c),h.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new CanceledError(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===W.protocols.indexOf(g)?r(new AxiosError("Unsupported protocol "+g+":",AxiosError.ERR_BAD_REQUEST,e)):h.send(o||null)}))};var composeSignals$1=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const onabort=function(e){if(!r){r=!0,unsubscribe();const t=e instanceof Error?e:this.reason;n.abort(t instanceof AxiosError?t:new CanceledError(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,onabort(new AxiosError(`timeout ${t} of ms exceeded`,AxiosError.ETIMEDOUT))}),t);const unsubscribe=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(onabort):e.removeEventListener("abort",onabort)})),e=null)};e.forEach((e=>e.addEventListener("abort",onabort)));const{signal:i}=n;return i.unsubscribe=()=>B.asap(unsubscribe),i}};const streamChunk=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of readStream(e))yield*streamChunk(r,t)}(e,t);let i,s=0,_onFinish=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return _onFinish(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw _onFinish(e),e}},cancel:e=>(_onFinish(e),o.return())},{highWaterMark:2})},{isFunction:re}=B,ne=(({Request:e,Response:t})=>({Request:e,Response:t}))(B.global),{ReadableStream:oe,TextEncoder:ie}=B.global,test=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},factory=e=>{e=B.merge.call({skipUndefined:!0},ne,e);const{fetch:t,Request:r,Response:n}=e,o=t?re(t):"function"==typeof fetch,i=re(r),s=re(n);if(!o)return!1;const c=o&&re(oe),u=o&&("function"==typeof ie?(l=new ie,e=>l.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var l;const p=i&&c&&test((()=>{let e=!1;const t=new r(W.origin,{body:new oe,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),d=s&&c&&test((()=>B.isReadableStream(new n("").body))),E={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!E[e]&&(E[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new AxiosError(`Response type '${e}' is not supported`,AxiosError.ERR_NOT_SUPPORT,r)})}));const resolveBodyLength=async(e,t)=>{const n=B.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(B.isBlob(e))return e.size;if(B.isSpecCompliantForm(e)){const t=new r(W.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return B.isArrayBufferView(e)||B.isArrayBuffer(e)?e.byteLength:(B.isURLSearchParams(e)&&(e+=""),B.isString(e)?(await u(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:s,data:c,signal:u,cancelToken:l,timeout:f,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:m,withCredentials:y="same-origin",fetchOptions:R}=resolveConfig(e),A=t||fetch;_=_?(_+"").toLowerCase():"text";let I=composeSignals$1([u,l&&l.toAbortSignal()],f),T=null;const S=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let C;try{if(g&&p&&"get"!==s&&"head"!==s&&0!==(C=await resolveBodyLength(m,c))){let e,t=new r(o,{method:"POST",body:c,duplex:"half"});if(B.isFormData(c)&&(e=t.headers.get("content-type"))&&m.setContentType(e),t.body){const[e,r]=progressEventDecorator(C,progressEventReducer(asyncDecorator(g)));c=trackStream(t.body,65536,e,r)}}B.isString(y)||(y=y?"include":"omit");const t=i&&"credentials"in r.prototype,u={...R,signal:I,method:s.toUpperCase(),headers:m.normalize().toJSON(),body:c,duplex:"half",credentials:t?y:void 0};T=i&&new r(o,u);let l=await(i?A(T,R):A(o,u));const f=d&&("stream"===_||"response"===_);if(d&&(h||f&&S)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=l[t]}));const t=B.toFiniteNumber(l.headers.get("content-length")),[r,o]=h&&progressEventDecorator(t,progressEventReducer(asyncDecorator(h),!0))||[];l=new n(trackStream(l.body,65536,r,(()=>{o&&o(),S&&S()})),e)}_=_||"text";let N=await E[B.findKey(E,_)||"text"](l,e);return!f&&S&&S(),await new Promise(((t,r)=>{settle(t,r,{data:N,headers:Q.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:T})}))}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,T),{cause:t.cause||t});throw AxiosError.from(t,t&&t.code,e,T)}}},se=new Map,getFetch=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let s,c,u=i.length,l=se;for(;u--;)s=i[u],c=l.get(s),void 0===c&&l.set(s,c=u?new Map:factory(t)),l=c;return c};getFetch();const ae={http:null,xhr:te,fetch:{get:getFetch}};B.forEach(ae,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const renderReason=e=>`- ${e}`,isResolvedHandle=e=>B.isFunction(e)||null===e||!1===e;var adapters_getAdapter=(e,t)=>{e=B.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let s=0;s<r;s++){let r;if(n=e[s],o=n,!isResolvedHandle(n)&&(o=ae[(r=String(n)).toLowerCase()],void 0===o))throw new AxiosError(`Unknown adapter '${r}'`);if(o&&(B.isFunction(o)||(o=o.get(t))))break;i[r||"#"+s]=o}if(!o){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new AxiosError("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=Q.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters_getAdapter(e.adapter||X.adapter,e)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=Q.from(t.headers),t}),(function onAdapterRejection(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=Q.from(t.response.headers))),Promise.reject(t)}))}const ce="1.12.2",ue={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ue[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const le={};ue.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v"+ce+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,o)=>{if(!1===e)throw new AxiosError(formatMessage(n," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!le[n]&&(le[n]=!0,console.warn(formatMessage(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}},ue.spelling=function spelling(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var pe={assertOptions:function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new AxiosError("option "+i+" must be "+r,AxiosError.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError("Unknown option "+i,AxiosError.ERR_BAD_OPTION)}},validators:ue};const de=pe.validators;class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new k,response:new k}}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=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&pe.assertOptions(r,{silentJSONParsing:de.transitional(de.boolean),forcedJSONParsing:de.transitional(de.boolean),clarifyTimeoutError:de.transitional(de.boolean)},!1),null!=n&&(B.isFunction(n)?t.paramsSerializer={serialize:n}:pe.assertOptions(n,{encode:de.function,serialize:de.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),pe.assertOptions(t,{baseUrl:de.spelling("baseURL"),withXsrfToken:de.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&B.merge(o.common,o[t.method]);o&&B.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Q.concat(i,o);const s=[];let c=!0;this.interceptors.request.forEach((function unshiftRequestInterceptors(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let l;this.interceptors.response.forEach((function pushResponseInterceptors(e){u.push(e.fulfilled,e.rejected)}));let p,d=0;if(!c){const e=[dispatchRequest.bind(this),void 0];for(e.unshift(...s),e.push(...u),p=e.length,l=Promise.resolve(t);d<p;)l=l.then(e[d++],e[d++]);return l}p=s.length;let E=t;for(;d<p;){const e=s[d++],t=s[d++];try{E=e(E)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,E)}catch(e){return Promise.reject(e)}for(d=0,p=u.length;d<p;)l=l.then(u[d++],u[d++]);return l}getUri(e){return buildURL(buildFullPath((e=mergeConfig(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}B.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,r){return this.request(mergeConfig(r||{},{method:e,url:t,data:(r||{}).data}))}})),B.forEach(["post","put","patch"],(function forEachMethodWithData(e){function generateHTTPMethod(t){return function httpMethod(r,n,o){return this.request(mergeConfig(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Axios.prototype[e]=generateHTTPMethod(),Axios.prototype[e+"Form"]=generateHTTPMethod(!0)}));var Ee=Axios;class CancelToken{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function promiseExecutor(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function reject(){r.unsubscribe(t)},n},e((function cancel(e,n,o){r.reason||(r.reason=new CanceledError(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,abort=t=>{e.abort(t)};return this.subscribe(abort),e.signal.unsubscribe=()=>this.unsubscribe(abort),e.signal}static source(){let e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}}}var fe=CancelToken;const he={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};Object.entries(he).forEach((([e,t])=>{he[t]=e}));var ge=he;const _e=function createInstance(e){const t=new Ee(e),r=bind$3(Ee.prototype.request,t);return B.extend(r,Ee.prototype,t,{allOwnKeys:!0}),B.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig(e,t))},r}(X);_e.Axios=Ee,_e.CanceledError=CanceledError,_e.CancelToken=fe,_e.isCancel=isCancel,_e.VERSION=ce,_e.toFormData=toFormData,_e.AxiosError=AxiosError,_e.Cancel=_e.CanceledError,_e.all=function all(e){return Promise.all(e)},_e.spread=function spread(e){return function wrap(t){return e.apply(null,t)}},_e.isAxiosError=function isAxiosError(e){return B.isObject(e)&&!0===e.isAxiosError},_e.mergeConfig=mergeConfig,_e.AxiosHeaders=Q,_e.formToJSON=e=>formDataToJSON(B.isHTMLForm(e)?new FormData(e):e),_e.getAdapter=adapters_getAdapter,_e.HttpStatusCode=ge,_e.default=_e;var me=_e,ye="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getAugmentedNamespace(e){var t=e.default;if("function"==typeof t){var r=function a(){if(this instanceof a){var e=[null];e.push.apply(e,arguments);var r=Function.bind.apply(t,e);return new r}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var Re,Ae,Ie={exports:{}};function requireMs(){if(Ae)return Re;Ae=1;var e=1e3,t=60*e,r=60*t,n=24*r,o=7*n,i=365.25*n;function plural(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}return Re=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function parse(s){if((s=String(s)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*i;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*n;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function fmtLong(o){var i=Math.abs(o);if(i>=n)return plural(o,i,n,"day");if(i>=r)return plural(o,i,r,"hour");if(i>=t)return plural(o,i,t,"minute");if(i>=e)return plural(o,i,e,"second");return o+" ms"}(s):function fmtShort(o){var i=Math.abs(o);if(i>=n)return Math.round(o/n)+"d";if(i>=r)return Math.round(o/r)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},Re}var Te=function setup(e){function createDebug(e){let t,r,n,o=null;function debug(...e){if(!debug.enabled)return;const r=debug,n=Number(new Date),o=n-(t||n);r.diff=o,r.prev=t,r.curr=n,t=n,e[0]=createDebug.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";i++;const o=createDebug.formatters[n];if("function"==typeof o){const n=e[i];t=o.call(r,n),e.splice(i,1),i--}return t})),createDebug.formatArgs.call(r,e);(r.log||createDebug.log).apply(r,e)}return debug.namespace=e,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(e),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==createDebug.namespaces&&(r=createDebug.namespaces,n=createDebug.enabled(e)),n),set:e=>{o=e}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(e,t){const r=createDebug(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function matchesTemplate(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,i++,r=i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function coerce(e){if(e instanceof Error)return e.stack||e.message;return e},createDebug.disable=function disable(){const e=[...createDebug.names,...createDebug.skips.map((e=>"-"+e))].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const t=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of t)"-"===e[0]?createDebug.skips.push(e.slice(1)):createDebug.names.push(e)},createDebug.enabled=function enabled(e){for(const t of createDebug.skips)if(matchesTemplate(e,t))return!1;for(const t of createDebug.names)if(matchesTemplate(e,t))return!0;return!1},createDebug.humanize=requireMs(),createDebug.destroy=function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((t=>{createDebug[t]=e[t]})),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function selectColor(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return createDebug.colors[Math.abs(t)%createDebug.colors.length]},createDebug.enable(createDebug.load()),createDebug};!function(e,t){t.formatArgs=function formatArgs(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function save(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function load(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function useColors(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function localstorage(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=Te(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Ie,Ie.exports);var Se=Ie.exports,Ce=TypeError,Ne=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}})),Oe="function"==typeof Map&&Map.prototype,be=Object.getOwnPropertyDescriptor&&Oe?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pe=Oe&&be&&"function"==typeof be.get?be.get:null,Ue=Oe&&Map.prototype.forEach,De="function"==typeof Set&&Set.prototype,Le=Object.getOwnPropertyDescriptor&&De?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ve=De&&Le&&"function"==typeof Le.get?Le.get:null,Be=De&&Set.prototype.forEach,Me="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Fe="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,we="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,xe=Boolean.prototype.valueOf,ke=Object.prototype.toString,Ge=Function.prototype.toString,Ye=String.prototype.match,$e=String.prototype.slice,He=String.prototype.replace,je=String.prototype.toUpperCase,Ve=String.prototype.toLowerCase,Ke=RegExp.prototype.test,We=Array.prototype.concat,qe=Array.prototype.join,Xe=Array.prototype.slice,ze=Math.floor,Je="function"==typeof BigInt?BigInt.prototype.valueOf:null,Qe=Object.getOwnPropertySymbols,Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,et="function"==typeof Symbol&&"object"==typeof Symbol.iterator,tt="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===et||"symbol")?Symbol.toStringTag:null,rt=Object.prototype.propertyIsEnumerable,nt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function addNumericSeparator(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Ke.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-ze(-e):ze(e);if(n!==e){var o=String(n),i=$e.call(t,o.length+1);return He.call(o,r,"$&_")+"."+He.call(He.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return He.call(t,r,"$&_")}var ot=Ne,it=ot.custom,st=isSymbol(it)?it:null,at={__proto__:null,double:'"',single:"'"},ct={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},ut=function inspect_(e,t,r,n){var o=t||{};if(has$3(o,"quoteStyle")&&!has$3(at,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has$3(o,"customInspect")||o.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return inspectString(e,o);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var c=String(e);return s?addNumericSeparator(e,c):c}if("bigint"==typeof e){var u=String(e)+"n";return s?addNumericSeparator(e,u):u}var l=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=l&&l>0&&"object"==typeof e)return isArray$3(e)?"[Array]":"[Object]";var p=function getIndent(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=qe.call(Array(e.indent+1)," ")}return{base:r,prev:qe.call(Array(t+1),r)}}(o,r);if(void 0===n)n=[];else if(indexOf(n,e)>=0)return"[Circular]";function inspect(e,t,i){if(t&&(n=Xe.call(n)).push(t),i){var s={depth:o.depth};return has$3(o,"quoteStyle")&&(s.quoteStyle=o.quoteStyle),inspect_(e,s,r+1,n)}return inspect_(e,o,r+1,n)}if("function"==typeof e&&!isRegExp$1(e)){var d=function nameOf(e){if(e.name)return e.name;var t=Ye.call(Ge.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(e),E=arrObjKeys(e,inspect);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(E.length>0?" { "+qe.call(E,", ")+" }":"")}if(isSymbol(e)){var f=et?He.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ze.call(e);return"object"!=typeof e||et?f:markBoxed(f)}if(function isElement(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(e)){for(var h="<"+Ve.call(String(e.nodeName)),g=e.attributes||[],_=0;_<g.length;_++)h+=" "+g[_].name+"="+wrapQuotes(quote(g[_].value),"double",o);return h+=">",e.childNodes&&e.childNodes.length&&(h+="..."),h+="</"+Ve.call(String(e.nodeName))+">"}if(isArray$3(e)){if(0===e.length)return"[]";var m=arrObjKeys(e,inspect);return p&&!function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}(m)?"["+indentedJoin(m,p)+"]":"[ "+qe.call(m,", ")+" ]"}if(function isError(e){return"[object Error]"===toStr(e)&&canTrustToString(e)}(e)){var y=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||rt.call(e,"cause")?0===y.length?"["+String(e)+"]":"{ ["+String(e)+"] "+qe.call(y,", ")+" }":"{ ["+String(e)+"] "+qe.call(We.call("[cause]: "+inspect(e.cause),y),", ")+" }"}if("object"==typeof e&&i){if(st&&"function"==typeof e[st]&&ot)return ot(e,{depth:l-r});if("symbol"!==i&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!Pe||!e||"object"!=typeof e)return!1;try{Pe.call(e);try{ve.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var R=[];return Ue&&Ue.call(e,(function(t,r){R.push(inspect(r,e,!0)+" => "+inspect(t,e))})),collectionOf("Map",Pe.call(e),R,p)}if(function isSet(e){if(!ve||!e||"object"!=typeof e)return!1;try{ve.call(e);try{Pe.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var A=[];return Be&&Be.call(e,(function(t){A.push(inspect(t,e))})),collectionOf("Set",ve.call(e),A,p)}if(function isWeakMap(e){if(!Me||!e||"object"!=typeof e)return!1;try{Me.call(e,Me);try{Fe.call(e,Fe)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!Fe||!e||"object"!=typeof e)return!1;try{Fe.call(e,Fe);try{Me.call(e,Me)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!we||!e||"object"!=typeof e)return!1;try{return we.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return"[object Number]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!Je)return!1;try{return Je.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(Je.call(e)));if(function isBoolean(e){return"[object Boolean]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(xe.call(e));if(function isString(e){return"[object String]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(inspect(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==ye&&e===ye)return"{ [object globalThis] }";if(!function isDate(e){return"[object Date]"===toStr(e)&&canTrustToString(e)}(e)&&!isRegExp$1(e)){var I=arrObjKeys(e,inspect),T=nt?nt(e)===Object.prototype:e instanceof Object||e.constructor===Object,S=e instanceof Object?"":"null prototype",C=!T&&tt&&Object(e)===e&&tt in e?$e.call(toStr(e),8,-1):S?"Object":"",N=(T||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(C||S?"["+qe.call(We.call([],C||[],S||[]),": ")+"] ":"");return 0===I.length?N+"{}":p?N+"{"+indentedJoin(I,p)+"}":N+"{ "+qe.call(I,", ")+" }"}return String(e)};function wrapQuotes(e,t,r){var n=r.quoteStyle||t,o=at[n];return o+e+o}function quote(e){return He.call(String(e),/"/g,"&quot;")}function canTrustToString(e){return!tt||!("object"==typeof e&&(tt in e||void 0!==e[tt]))}function isArray$3(e){return"[object Array]"===toStr(e)&&canTrustToString(e)}function isRegExp$1(e){return"[object RegExp]"===toStr(e)&&canTrustToString(e)}function isSymbol(e){if(et)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!Ze)return!1;try{return Ze.call(e),!0}catch(e){}return!1}var lt=Object.prototype.hasOwnProperty||function(e){return e in this};function has$3(e,t){return lt.call(e,t)}function toStr(e){return ke.call(e)}function indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function inspectString(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString($e.call(e,0,t.maxStringLength),t)+n}var o=ct[t.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes(He.call(He.call(e,o,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",t)}function lowbyte(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+je.call(t.toString(16))}function markBoxed(e){return"Object("+e+")"}function weakCollectionOf(e){return e+" { ? }"}function collectionOf(e,t,r,n){return e+" ("+t+") {"+(n?indentedJoin(r,n):qe.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+qe.call(e,","+r)+"\n"+t.prev}function arrObjKeys(e,t){var r=isArray$3(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=has$3(e,o)?t(e[o],e):""}var i,s="function"==typeof Qe?Qe(e):[];if(et){i={};for(var c=0;c<s.length;c++)i["$"+s[c]]=s[c]}for(var u in e)has$3(e,u)&&(r&&String(Number(u))===u&&u<e.length||et&&i["$"+u]instanceof Symbol||(Ke.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof Qe)for(var l=0;l<s.length;l++)rt.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}var pt=ut,dt=Ce,listGetNode=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n},Et=Object,ft=Error,ht=EvalError,gt=RangeError,_t=ReferenceError,mt=SyntaxError,yt=URIError,Rt=Math.abs,At=Math.floor,It=Math.max,Tt=Math.min,St=Math.pow,Ct=Math.round,Nt=Number.isNaN||function isNaN(e){return e!=e},Ot=Object.getOwnPropertyDescriptor;if(Ot)try{Ot([],"length")}catch(e){Ot=null}var bt=Ot,Pt=Object.defineProperty||!1;if(Pt)try{Pt({},"a",{value:1})}catch(e){Pt=!1}var Ut,Dt,Lt,vt,Bt,Mt,Ft,wt,xt,kt,Gt,Yt,$t,Ht,jt,Vt,Kt=Pt;function requireReflect_getPrototypeOf(){return Mt?Bt:(Mt=1,Bt="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return wt?Ft:(wt=1,Ft=Et.getPrototypeOf||null)}function requireImplementation(){if(kt)return xt;kt=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",o=function concatty(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},i=function slicy(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},joiny=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};return xt=function bind(s){var c=this;if("function"!=typeof c||t.apply(c)!==n)throw new TypeError(e+c);for(var u,l=i(arguments,1),binder=function(){if(this instanceof u){var e=c.apply(this,o(l,arguments));return Object(e)===e?e:this}return c.apply(s,o(l,arguments))},p=r(0,c.length-l.length),d=[],E=0;E<p;E++)d[E]="$"+E;if(u=Function("binder","return function ("+joiny(d,",")+"){ return binder.apply(this,arguments); }")(binder),c.prototype){var f=function Empty(){};f.prototype=c.prototype,u.prototype=new f,f.prototype=null}return u},xt}function requireFunctionBind(){if(Yt)return Gt;Yt=1;var e=requireImplementation();return Gt=Function.prototype.bind||e}function requireFunctionCall(){return Ht?$t:(Ht=1,$t=Function.prototype.call)}function requireFunctionApply(){return Vt?jt:(Vt=1,jt=Function.prototype.apply)}var Wt,qt,Xt,zt,Jt,Qt,Zt,er="undefined"!=typeof Reflect&&Reflect&&Reflect.apply,tr=requireFunctionBind(),rr=requireFunctionApply(),nr=requireFunctionCall(),or=er||tr.call(nr,rr),ir=requireFunctionBind(),sr=Ce,ar=requireFunctionCall(),cr=or,ur=function callBindBasic(e){if(e.length<1||"function"!=typeof e[0])throw new sr("a function is required");return cr(ir,ar,e)};var lr=Et,pr=ft,dr=ht,Er=gt,fr=_t,hr=mt,gr=Ce,_r=yt,mr=Rt,yr=At,Rr=It,Ar=Tt,Ir=St,Tr=Ct,Sr=function sign(e){return Nt(e)||0===e?e:e<0?-1:1},Cr=Function,getEvalledConstructor=function(e){try{return Cr('"use strict"; return ('+e+").constructor;")()}catch(e){}},Nr=bt,Or=Kt,throwTypeError=function(){throw new gr},br=Nr?function(){try{return throwTypeError}catch(e){try{return Nr(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,Pr=function requireHasSymbols(){if(vt)return Lt;vt=1;var e="undefined"!=typeof Symbol&&Symbol,t=function requireShams(){return Dt?Ut:(Dt=1,Ut=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0})}();return Lt=function hasNativeSymbols(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}()(),Ur=function requireGetProto(){if(zt)return Xt;zt=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),r=function requireGet(){if(qt)return Wt;qt=1;var e,t=ur,r=bt;try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Wt=n&&"function"==typeof n.get?t([n.get]):"function"==typeof i&&function getDunder(e){return i(null==e?e:o(e))}}();return Xt=e?function getProto(t){return e(t)}:t?function getProto(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function getProto(e){return r(e)}:null}(),Dr=requireObject_getPrototypeOf(),Lr=requireReflect_getPrototypeOf(),vr=requireFunctionApply(),Br=requireFunctionCall(),Mr={},Fr="undefined"!=typeof Uint8Array&&Ur?Ur(Uint8Array):Zt,wr={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?Zt:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Zt:ArrayBuffer,"%ArrayIteratorPrototype%":Pr&&Ur?Ur([][Symbol.iterator]()):Zt,"%AsyncFromSyncIteratorPrototype%":Zt,"%AsyncFunction%":Mr,"%AsyncGenerator%":Mr,"%AsyncGeneratorFunction%":Mr,"%AsyncIteratorPrototype%":Mr,"%Atomics%":"undefined"==typeof Atomics?Zt:Atomics,"%BigInt%":"undefined"==typeof BigInt?Zt:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?Zt:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?Zt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Zt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":pr,"%eval%":eval,"%EvalError%":dr,"%Float16Array%":"undefined"==typeof Float16Array?Zt:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?Zt:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Zt:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Zt:FinalizationRegistry,"%Function%":Cr,"%GeneratorFunction%":Mr,"%Int8Array%":"undefined"==typeof Int8Array?Zt:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Zt:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Zt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Pr&&Ur?Ur(Ur([][Symbol.iterator]())):Zt,"%JSON%":"object"==typeof JSON?JSON:Zt,"%Map%":"undefined"==typeof Map?Zt:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Pr&&Ur?Ur((new Map)[Symbol.iterator]()):Zt,"%Math%":Math,"%Number%":Number,"%Object%":lr,"%Object.getOwnPropertyDescriptor%":Nr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Zt:Promise,"%Proxy%":"undefined"==typeof Proxy?Zt:Proxy,"%RangeError%":Er,"%ReferenceError%":fr,"%Reflect%":"undefined"==typeof Reflect?Zt:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Zt:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Pr&&Ur?Ur((new Set)[Symbol.iterator]()):Zt,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Zt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Pr&&Ur?Ur(""[Symbol.iterator]()):Zt,"%Symbol%":Pr?Symbol:Zt,"%SyntaxError%":hr,"%ThrowTypeError%":br,"%TypedArray%":Fr,"%TypeError%":gr,"%Uint8Array%":"undefined"==typeof Uint8Array?Zt:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Zt:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Zt:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Zt:Uint32Array,"%URIError%":_r,"%WeakMap%":"undefined"==typeof WeakMap?Zt:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Zt:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Zt:WeakSet,"%Function.prototype.call%":Br,"%Function.prototype.apply%":vr,"%Object.defineProperty%":Or,"%Object.getPrototypeOf%":Dr,"%Math.abs%":mr,"%Math.floor%":yr,"%Math.max%":Rr,"%Math.min%":Ar,"%Math.pow%":Ir,"%Math.round%":Tr,"%Math.sign%":Sr,"%Reflect.getPrototypeOf%":Lr};if(Ur)try{null.error}catch(e){var xr=Ur(Ur(e));wr["%Error.prototype%"]=xr}var kr=function doEval(e){var t;if("%AsyncFunction%"===e)t=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===e)t=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===e){var r=doEval("%AsyncGeneratorFunction%");r&&(t=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=doEval("%AsyncGenerator%");n&&Ur&&(t=Ur(n.prototype))}return wr[e]=t,t},Gr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yr=requireFunctionBind(),$r=function requireHasown(){if(Qt)return Jt;Qt=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=requireFunctionBind();return Jt=r.call(e,t)}(),Hr=Yr.call(Br,Array.prototype.concat),jr=Yr.call(vr,Array.prototype.splice),Vr=Yr.call(Br,String.prototype.replace),Kr=Yr.call(Br,String.prototype.slice),Wr=Yr.call(Br,RegExp.prototype.exec),qr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Xr=/\\(\\)?/g,zr=function stringToPath(e){var t=Kr(e,0,1),r=Kr(e,-1);if("%"===t&&"%"!==r)throw new hr("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new hr("invalid intrinsic syntax, expected opening `%`");var n=[];return Vr(e,qr,(function(e,t,r,o){n[n.length]=r?Vr(o,Xr,"$1"):t||e})),n},Jr=function getBaseIntrinsic(e,t){var r,n=e;if($r(Gr,n)&&(n="%"+(r=Gr[n])[0]+"%"),$r(wr,n)){var o=wr[n];if(o===Mr&&(o=kr(n)),void 0===o&&!t)throw new gr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new hr("intrinsic "+e+" does not exist!")},Qr=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new gr("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new gr('"allowMissing" argument must be a boolean');if(null===Wr(/^%?[^%]*%?$/,e))throw new hr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=zr(e),n=r.length>0?r[0]:"",o=Jr("%"+n+"%",t),i=o.name,s=o.value,c=!1,u=o.alias;u&&(n=u[0],jr(r,Hr([0,1],u)));for(var l=1,p=!0;l<r.length;l+=1){var d=r[l],E=Kr(d,0,1),f=Kr(d,-1);if(('"'===E||"'"===E||"`"===E||'"'===f||"'"===f||"`"===f)&&E!==f)throw new hr("property names with quotes must have matching quotes");if("constructor"!==d&&p||(c=!0),$r(wr,i="%"+(n+="."+d)+"%"))s=wr[i];else if(null!=s){if(!(d in s)){if(!t)throw new gr("base intrinsic for "+e+" exists, but the property is not available.");return}if(Nr&&l+1>=r.length){var h=Nr(s,d);s=(p=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:s[d]}else p=$r(s,d),s=s[d];p&&!c&&(wr[i]=s)}}return s},Zr=Qr,en=ur,tn=en([Zr("%String.prototype.indexOf%")]),rn=function callBoundIntrinsic(e,t){var r=Zr(e,!!t);return"function"==typeof r&&tn(e,".prototype.")>-1?en([r]):r},nn=rn,on=ut,sn=Ce,an=Qr("%Map%",!0),cn=nn("Map.prototype.get",!0),un=nn("Map.prototype.set",!0),ln=nn("Map.prototype.has",!0),pn=nn("Map.prototype.delete",!0),dn=nn("Map.prototype.size",!0),En=!!an&&function getSideChannelMap(){var e,t={assert:function(e){if(!t.has(e))throw new sn("Side channel does not contain "+on(e))},delete:function(t){if(e){var r=pn(e,t);return 0===dn(e)&&(e=void 0),r}return!1},get:function(t){if(e)return cn(e,t)},has:function(t){return!!e&&ln(e,t)},set:function(t,r){e||(e=new an),un(e,t,r)}};return t},fn=rn,hn=ut,gn=En,_n=Ce,mn=Qr("%WeakMap%",!0),yn=fn("WeakMap.prototype.get",!0),Rn=fn("WeakMap.prototype.set",!0),An=fn("WeakMap.prototype.has",!0),In=fn("WeakMap.prototype.delete",!0),Tn=Ce,Sn=ut,Cn=(mn?function getSideChannelWeakMap(){var e,t,r={assert:function(e){if(!r.has(e))throw new _n("Side channel does not contain "+hn(e))},delete:function(r){if(mn&&r&&("object"==typeof r||"function"==typeof r)){if(e)return In(e,r)}else if(gn&&t)return t.delete(r);return!1},get:function(r){return mn&&r&&("object"==typeof r||"function"==typeof r)&&e?yn(e,r):t&&t.get(r)},has:function(r){return mn&&r&&("object"==typeof r||"function"==typeof r)&&e?An(e,r):!!t&&t.has(r)},set:function(r,n){mn&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new mn),Rn(e,r,n)):gn&&(t||(t=gn()),t.set(r,n))}};return r}:gn)||En||function getSideChannelList(){var e,t={assert:function(e){if(!t.has(e))throw new dt("Side channel does not contain "+pt(e))},delete:function(t){var r=e&&e.next,n=function(e,t){if(e)return listGetNode(e,t,!0)}(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return function(e,t){if(e){var r=listGetNode(e,t);return r&&r.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!listGetNode(e,t)}(e,t)},set:function(t,r){e||(e={next:void 0}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(e,t,r)}};return t},Nn=function getSideChannel(){var e,t={assert:function(e){if(!t.has(e))throw new Tn("Side channel does not contain "+Sn(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=Cn()),e.set(t,r)}};return t},On=String.prototype.replace,bn=/%20/g,Pn="RFC3986",Un={default:Pn,formatters:{RFC1738:function(e){return On.call(e,bn,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Pn},Dn=Un,Ln=Nn,vn=Object.prototype.hasOwnProperty,Bn=Array.isArray,Mn=Ln(),Fn=function markOverflow(e,t){return Mn.set(e,t),e},wn=function isOverflow(e){return Mn.has(e)},xn=function getMaxIndex(e){return Mn.get(e)},kn=function setMaxIndex(e,t){Mn.set(e,t)},Gn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Yn=function arrayToObject(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},$n=1024,Hn={arrayToObject:Yn,assign:function assignSingleSource(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function combine(e,t,r,n){if(wn(e)){var o=xn(e)+1;return e[o]=t,kn(e,o),e}var i=[].concat(e,t);return i.length>r?Fn(Yn(i,{plainObjects:n}),i.length-1):i},compact:function compact(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=i[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:u}),r.push(l))}return function compactQueue(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Bn(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function encode(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var s="",c=0;c<i.length;c+=$n){for(var u=i.length>=$n?i.slice(c,c+$n):i,l=[],p=0;p<u.length;++p){var d=u.charCodeAt(p);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===Dn.RFC1738&&(40===d||41===d)?l[l.length]=u.charAt(p):d<128?l[l.length]=Gn[d]:d<2048?l[l.length]=Gn[192|d>>6]+Gn[128|63&d]:d<55296||d>=57344?l[l.length]=Gn[224|d>>12]+Gn[128|d>>6&63]+Gn[128|63&d]:(p+=1,d=65536+((1023&d)<<10|1023&u.charCodeAt(p)),l[l.length]=Gn[240|d>>18]+Gn[128|d>>12&63]+Gn[128|d>>6&63]+Gn[128|63&d])}s+=l.join("")}return s},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:wn,isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function maybeMap(e,t){if(Bn(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function merge(e,t,r){if(!t)return e;if("object"!=typeof t&&"function"!=typeof t){if(Bn(e))e.push(t);else{if(!e||"object"!=typeof e)return[e,t];if(wn(e)){var n=xn(e)+1;e[n]=t,kn(e,n)}else(r&&(r.plainObjects||r.allowPrototypes)||!vn.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||"object"!=typeof e){if(wn(t)){for(var o=Object.keys(t),i=r&&r.plainObjects?{__proto__:null,0:e}:{0:e},s=0;s<o.length;s++){i[parseInt(o[s],10)+1]=t[o[s]]}return Fn(i,xn(t)+1)}return[e].concat(t)}var c=e;return Bn(e)&&!Bn(t)&&(c=Yn(e,r)),Bn(e)&&Bn(t)?(t.forEach((function(t,n){if(vn.call(e,n)){var o=e[n];o&&"object"==typeof o&&t&&"object"==typeof t?e[n]=merge(o,t,r):e.push(t)}else e[n]=t})),e):Object.keys(t).reduce((function(e,n){var o=t[n];return vn.call(e,n)?e[n]=merge(e[n],o,r):e[n]=o,e}),c)}},jn=Nn,Vn=Hn,Kn=Un,Wn=Object.prototype.hasOwnProperty,qn={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},Xn=Array.isArray,zn=Array.prototype.push,pushToArray=function(e,t){zn.apply(e,Xn(t)?t:[t])},Jn=Date.prototype.toISOString,Qn=Kn.default,Zn={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Vn.encode,encodeValuesOnly:!1,filter:void 0,format:Qn,formatter:Kn.formatters[Qn],indices:!1,serializeDate:function serializeDate(e){return Jn.call(e)},skipNulls:!1,strictNullHandling:!1},eo={},to=function stringify(e,t,r,n,o,i,s,c,u,l,p,d,E,f,h,g,_,m){for(var y=e,R=m,A=0,I=!1;void 0!==(R=R.get(eo))&&!I;){var T=R.get(e);if(A+=1,void 0!==T){if(T===A)throw new RangeError("Cyclic object value");I=!0}void 0===R.get(eo)&&(A=0)}if("function"==typeof l?y=l(t,y):y instanceof Date?y=E(y):"comma"===r&&Xn(y)&&(y=Vn.maybeMap(y,(function(e){return e instanceof Date?E(e):e}))),null===y){if(i)return u&&!g?u(t,Zn.encoder,_,"key",f):t;y=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(y)||Vn.isBuffer(y))return u?[h(g?t:u(t,Zn.encoder,_,"key",f))+"="+h(u(y,Zn.encoder,_,"value",f))]:[h(t)+"="+h(String(y))];var S,C=[];if(void 0===y)return C;if("comma"===r&&Xn(y))g&&u&&(y=Vn.maybeMap(y,u)),S=[{value:y.length>0?y.join(",")||null:void 0}];else if(Xn(l))S=l;else{var N=Object.keys(y);S=p?N.sort(p):N}var O=c?String(t).replace(/\./g,"%2E"):String(t),b=n&&Xn(y)&&1===y.length?O+"[]":O;if(o&&Xn(y)&&0===y.length)return b+"[]";for(var P=0;P<S.length;++P){var U=S[P],D="object"==typeof U&&U&&void 0!==U.value?U.value:y[U];if(!s||null!==D){var L=d&&c?String(U).replace(/\./g,"%2E"):String(U),v=Xn(y)?"function"==typeof r?r(b,L):b:b+(d?"."+L:"["+L+"]");m.set(e,A);var B=jn();B.set(eo,m),pushToArray(C,stringify(D,v,r,n,o,i,s,c,"comma"===r&&g&&Xn(y)?null:u,l,p,d,E,f,h,g,_,B))}}return C},ro=Hn,no=Object.prototype.hasOwnProperty,oo=Array.isArray,io={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ro.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},parseArrayValue=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},so=function parseQueryStringKeys(e,t,r,n){if(e){var o=function splitKeyIntoSegments(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&no.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var n=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(r),i=o?r.slice(0,o.index):r,s=[];if(i){if(!t.plainObjects&&no.call(Object.prototype,i)&&!t.allowPrototypes)return;s.push(i)}for(var c=0;null!==(o=n.exec(r))&&c<t.depth;){c+=1;var u=o[1].slice(1,-1);if(!t.plainObjects&&no.call(Object.prototype,u)&&!t.allowPrototypes)return;s.push(o[1])}if(o){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");s.push("["+r.slice(o.index)+"]")}return s}(e,r);if(o)return function(e,t,r,n){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var i=e.slice(0,-1).join("");o=Array.isArray(t)&&t[i]?t[i].length:0}for(var s=n?t:parseArrayValue(t,r,o),c=e.length-1;c>=0;--c){var u,l=e[c];if("[]"===l&&r.parseArrays)u=ro.isOverflow(s)?s:r.allowEmptyArrays&&(""===s||r.strictNullHandling&&null===s)?[]:ro.combine([],s,r.arrayLimit,r.plainObjects);else{u=r.plainObjects?{__proto__:null}:{};var p="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,d=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,E=parseInt(d,10);r.parseArrays||""!==d?!isNaN(E)&&l!==d&&String(E)===d&&E>=0&&r.parseArrays&&E<=r.arrayLimit?(u=[])[E]=s:"__proto__"!==d&&(u[d]=s):u={0:s}}s=u}return s}(o,t,r,n)}},stringify=function(e,t){var r,n=e,o=function normalizeStringifyOptions(e){if(!e)return Zn;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||Zn.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Kn.default;if(void 0!==e.format){if(!Wn.call(Kn.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n,o=Kn.formatters[r],i=Zn.filter;if(("function"==typeof e.filter||Xn(e.filter))&&(i=e.filter),n=e.arrayFormat in qn?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":Zn.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=void 0===e.allowDots?!0===e.encodeDotInKeys||Zn.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:Zn.addQueryPrefix,allowDots:s,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:Zn.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Zn.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?Zn.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:Zn.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:Zn.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:Zn.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:Zn.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:Zn.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:Zn.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Zn.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Xn(o.filter)&&(r=o.filter);var i=[];if("object"!=typeof n||null===n)return"";var s=qn[o.arrayFormat],c="comma"===s&&o.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var u=jn(),l=0;l<r.length;++l){var p=r[l],d=n[p];o.skipNulls&&null===d||pushToArray(i,to(d,p,s,c,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,u))}var E=i.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),E.length>0?f+E:""},parse=function(e,t){var r=function normalizeParseOptions(e){if(!e)return io;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?io.charset:e.charset,r=void 0===e.duplicates?io.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||io.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:io.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:io.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:io.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:io.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:io.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:io.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:io.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:io.decoder,delimiter:"string"==typeof e.delimiter||ro.isRegExp(e.delimiter)?e.delimiter:io.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:io.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:io.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:io.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:io.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:io.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:io.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var n="string"==typeof e?function parseQueryStringValues(e,t){var r={__proto__:null},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;n=n.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=t.parameterLimit===1/0?void 0:t.parameterLimit,i=n.split(t.delimiter,t.throwOnLimitExceeded?o+1:o);if(t.throwOnLimitExceeded&&i.length>o)throw new RangeError("Parameter limit exceeded. Only "+o+" parameter"+(1===o?"":"s")+" allowed.");var s,c=-1,u=t.charset;if(t.charsetSentinel)for(s=0;s<i.length;++s)0===i[s].indexOf("utf8=")&&("utf8=%E2%9C%93"===i[s]?u="utf-8":"utf8=%26%2310003%3B"===i[s]&&(u="iso-8859-1"),c=s,s=i.length);for(s=0;s<i.length;++s)if(s!==c){var l,p,d=i[s],E=d.indexOf("]="),f=-1===E?d.indexOf("="):E+1;if(-1===f?(l=t.decoder(d,io.decoder,u,"key"),p=t.strictNullHandling?null:""):null!==(l=t.decoder(d.slice(0,f),io.decoder,u,"key"))&&(p=ro.maybeMap(parseArrayValue(d.slice(f+1),t,oo(r[l])?r[l].length:0),(function(e){return t.decoder(e,io.decoder,u,"value")}))),p&&t.interpretNumericEntities&&"iso-8859-1"===u&&(p=interpretNumericEntities(String(p))),d.indexOf("[]=")>-1&&(p=oo(p)?[p]:p),null!==l){var h=no.call(r,l);h&&"combine"===t.duplicates?r[l]=ro.combine(r[l],p,t.arrayLimit,t.plainObjects):h&&"last"!==t.duplicates||(r[l]=p)}}return r}(e,r):e,o=r.plainObjects?{__proto__:null}:{},i=Object.keys(n),s=0;s<i.length;++s){var c=i[s],u=so(c,n[c],r,"string"==typeof e);o=ro.merge(o,u,r)}return!0===r.allowSparse?o:ro.compact(o)},ao={formats:Un,parse:parse,stringify:stringify};const co=Se("ebay:request"),uo={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"X-Requested-With, Origin, Content-Type, X-Auth-Token","Access-Control-Allow-Methods":"GET, PUT, POST, DELETE"},lo={"Content-Type":"multipart/form-data"},po={paramsSerializer:{indexes:null}};class AxiosRequest{constructor(e={}){this.instance=me.create({headers:{...uo},...po,...e})}get(e,t){return co("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return co("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return co("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return co("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}postForm(e,t,r){co("postForm: "+e);const n=ao.stringify(t);return this.instance.post(e,n,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}const Eo=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",fo=new RegExp("^"+("["+Eo+"]["+(Eo+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*")+"$");function getAllMatches(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r}const isName=function(e){const t=fo.exec(e);return!(null==t)};const ho={allowBooleanAttributes:!1,unpairedTags:[]};function isWhiteSpace(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function readPI(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function readCommentAndCDATA(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}function readAttributeStr(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const go=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=getAllMatches(e,go),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",getPositionFromMatch(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",getPositionFromMatch(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",getPositionFromMatch(r[e]));const o=r[e][2];if(!validateAttrName(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is an invalid name.",getPositionFromMatch(r[e]));if(n.hasOwnProperty(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is repeated.",getPositionFromMatch(r[e]));n[o]=1}return!0}function validateAmpersand(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function validateNumberAmpersand(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function getErrorObject(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function validateAttrName(e){return isName(e)}function getLineNumberForPosition(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function getPositionFromMatch(e){return e.startIndex+e[1].length}const _o={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e},captureMetaData:!1};let mo;mo="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),void 0!==t&&(this.child[this.child.length-1][mo]={startIndex:t})}static getMetaDataSymbol(){return mo}}class DocTypeReader{constructor(e){this.suppressValidationErr=!e}readDocType(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,o=!1,i=!1,s="";for(;t<e.length;t++)if("<"!==e[t]||i)if(">"===e[t]){if(i?"-"===e[t-1]&&"-"===e[t-2]&&(i=!1,n--):n--,0===n)break}else"["===e[t]?o=!0:s+=e[t];else{if(o&&hasSeq(e,"!ENTITY",t)){let n,o;t+=7,[n,o,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),-1===o.indexOf("&")&&(r[n]={regx:RegExp(`&${n};`,"g"),val:o})}else if(o&&hasSeq(e,"!ELEMENT",t)){t+=8;const{index:r}=this.readElementExp(e,t+1);t=r}else if(o&&hasSeq(e,"!ATTLIST",t))t+=8;else if(o&&hasSeq(e,"!NOTATION",t)){t+=9;const{index:r}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=r}else{if(!hasSeq(e,"!--",t))throw new Error("Invalid DOCTYPE");i=!0}n++,s=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}readEntityExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t])&&'"'!==e[t]&&"'"!==e[t];)r+=e[t],t++;if(validateEntityName(r),t=skipWhitespace(e,t),!this.suppressValidationErr){if("SYSTEM"===e.substring(t,t+6).toUpperCase())throw new Error("External entities are not supported");if("%"===e[t])throw new Error("Parameter entities are not supported")}let n="";return[t,n]=this.readIdentifierVal(e,t,"entity"),[r,n,--t]}readNotationExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;!this.suppressValidationErr&&validateEntityName(r),t=skipWhitespace(e,t);const n=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==n&&"PUBLIC"!==n)throw new Error(`Expected SYSTEM or PUBLIC, found "${n}"`);t+=n.length,t=skipWhitespace(e,t);let o=null,i=null;if("PUBLIC"===n)[t,o]=this.readIdentifierVal(e,t,"publicIdentifier"),'"'!==e[t=skipWhitespace(e,t)]&&"'"!==e[t]||([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"));else if("SYSTEM"===n&&([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:r,publicIdentifier:o,systemIdentifier:i,index:--t}}readIdentifierVal(e,t,r){let n="";const o=e[t];if('"'!==o&&"'"!==o)throw new Error(`Expected quoted string, found "${o}"`);for(t++;t<e.length&&e[t]!==o;)n+=e[t],t++;if(e[t]!==o)throw new Error(`Unterminated ${r} value`);return[++t,n]}readElementExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!this.suppressValidationErr&&!isName(r))throw new Error(`Invalid element name: "${r}"`);let n="";if("E"===e[t=skipWhitespace(e,t)]&&hasSeq(e,"MPTY",t))t+=4;else if("A"===e[t]&&hasSeq(e,"NY",t))t+=2;else if("("===e[t]){for(t++;t<e.length&&")"!==e[t];)n+=e[t],t++;if(")"!==e[t])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:r,contentModel:n.trim(),index:t}}readAttlistExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;validateEntityName(r),t=skipWhitespace(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;if(!validateEntityName(n))throw new Error(`Invalid attribute name: "${n}"`);t=skipWhitespace(e,t);let o="";if("NOTATION"===e.substring(t,t+8).toUpperCase()){if(o="NOTATION","("!==e[t=skipWhitespace(e,t+=8)])throw new Error(`Expected '(', found "${e[t]}"`);t++;let r=[];for(;t<e.length&&")"!==e[t];){let n="";for(;t<e.length&&"|"!==e[t]&&")"!==e[t];)n+=e[t],t++;if(n=n.trim(),!validateEntityName(n))throw new Error(`Invalid notation name: "${n}"`);r.push(n),"|"===e[t]&&(t++,t=skipWhitespace(e,t))}if(")"!==e[t])throw new Error("Unterminated list of notations");t++,o+=" ("+r.join("|")+")"}else{for(;t<e.length&&!/\s/.test(e[t]);)o+=e[t],t++;const r=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!r.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: "${o}"`)}t=skipWhitespace(e,t);let i="";return"#REQUIRED"===e.substring(t,t+8).toUpperCase()?(i="#REQUIRED",t+=8):"#IMPLIED"===e.substring(t,t+7).toUpperCase()?(i="#IMPLIED",t+=7):[t,i]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:r,attributeName:n,attributeType:o,defaultValue:i,index:t}}}const skipWhitespace=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function hasSeq(e,t,r){for(let n=0;n<t.length;n++)if(t[n]!==e[r+n+1])return!1;return!0}function validateEntityName(e){if(isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const yo=/^[-+]?0x[a-fA-F0-9]+$/,Ro=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Ao={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function toNumber(e,t={}){if(t=Object.assign({},Ao,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if("0"===e)return 0;if(t.hex&&yo.test(r))return function parse_int(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(r,16);if(r.includes("e")||r.includes("E"))return function resolveEnotation(e,t,r){if(!r.eNotation)return e;const n=t.match(Io);if(n){let o=n[1]||"";const i=-1===n[3].indexOf("e")?"E":"e",s=n[2],c=o?e[s.length+1]===i:e[s.length]===i;return s.length>1&&c?e:1!==s.length||!n[3].startsWith(`.${i}`)&&n[3][0]!==i?r.leadingZeros&&!c?(t=(n[1]||"")+n[3],Number(t)):e:Number(t)}return e}(e,r,t);{const n=Ro.exec(r);if(n){const o=n[1]||"",i=n[2];let s=function trimZeros(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substring(0,e.length-1)),e;return e}(n[3]);const c=o?"."===e[i.length+1]:"."===e[i.length];if(!t.leadingZeros&&(i.length>1||1===i.length&&!c))return e;{const n=Number(r),c=String(n);if(0===n)return n;if(-1!==c.search(/[eE]/))return t.eNotation?n:e;if(-1!==r.indexOf("."))return"0"===c||c===s||c===`${o}${s}`?n:e;let u=i?s:r;return i?u===c||o+u===c?n:e:u===c||u===o+c?n:e}}return e}}const Io=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function getIgnoreAttributesFn(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const r of e){if("string"==typeof r&&t===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}}:()=>!1}class OrderedObjParser{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>fromCodePoint(t,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>fromCodePoint(t,16,"&#x")}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$1,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild,this.ignoreAttributesFn=getIgnoreAttributesFn(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){const t=this.options.stopNodes[e];"string"==typeof t&&(t.startsWith("*.")?this.stopNodesWildcard.add(t.substring(2)):this.stopNodesExact.add(t))}}}}function addExternalEntities(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function parseTextData(e,t,r,n,o,i,s){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,o,i);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return parseValue(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?parseValue(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function resolveNameSpace(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const To=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const r=getAllMatches(e,To),n=r.length,o={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(r[e][1]);if(this.ignoreAttributesFn(n,t))continue;let i=r[e][4],s=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const e=this.options.attributeValueProcessor(n,i,t);o[s]=null==e?i:typeof e!=typeof i||e!==i?e:parseValue(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const parseXml=function(e){e=e.replace(/\r\n?/g,"\n");const t=new XmlNode("!xml");let r=t,n="",o="";const i=new DocTypeReader(this.options.processEntities);for(let s=0;s<e.length;s++){if("<"===e[s])if("/"===e[s+1]){const t=findClosingIndex(e,">",s,"Closing Tag is not closed.");let i=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),r&&(n=this.saveTextToParentTag(n,r,o));const c=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let u=0;c&&-1!==this.options.unpairedTags.indexOf(c)?(u=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=o.lastIndexOf("."),o=o.substring(0,u),r=this.tagsNodeStack.pop(),n="",s=t}else if("?"===e[s+1]){let t=readTagExp(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new XmlNode(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o)),this.addChild(r,e,o,s)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=findClosingIndex(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(s+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=t}else if("!D"===e.substr(s+1,2)){const t=i.readDocType(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=findClosingIndex(e,"]]>",s,"CDATA is not closed.")-2,i=e.substring(s+9,t);n=this.saveTextToParentTag(n,r,o);let c=this.parseTextData(i,r.tagname,o,!0,!1,!0,!0);null==c&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):r.add(this.options.textNodeName,c),s=t+2}else{let i=readTagExp(e,s,this.options.removeNSPrefix),c=i.tagName;const u=i.rawTagName;let l=i.tagExp,p=i.attrExpPresent,d=i.closeIndex;if(this.options.transformTagName){const e=this.options.transformTagName(c);l===c&&(l=e),c=e}r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const E=r;E&&-1!==this.options.unpairedTags.indexOf(E.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==t.tagname&&(o+=o?"."+c:c);const f=s;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,o,c)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),s=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))s=i.closeIndex;else{const r=this.readStopNodeData(e,u,d+1);if(!r)throw new Error(`Unexpected end of ${u}`);s=r.i,t=r.tagContent}const n=new XmlNode(c);c!==l&&p&&(n[":@"]=this.buildAttributesMap(l,o)),t&&(t=this.parseTextData(t,c,o,!0,p,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,o,f)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){if("/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName){const e=this.options.transformTagName(c);l===c&&(l=e),c=e}const e=new XmlNode(c);c!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o)),this.addChild(r,e,o,f),o=o.substr(0,o.lastIndexOf("."))}else{const e=new XmlNode(c);this.tagsNodeStack.push(r),c!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o)),this.addChild(r,e,o,f),r=e}n="",s=d}}else n+=e[s]}return t.child};function addChild(e,t,r,n){this.options.captureMetaData||(n=void 0);const o=this.options.updateTag(t.tagname,r,t[":@"]);!1===o||("string"==typeof o?(t.tagname=o,e.addChild(t,n)):e.addChild(t,n))}const replaceEntitiesValue$1=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function saveTextToParentTag(e,t,r,n){return e&&(void 0===n&&(n=0===t.child.length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function isItStopNode(e,t,r,n){return!(!t||!t.has(n))||!(!e||!e.has(r))}function findClosingIndex(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function readTagExp(e,t,r,n=">"){const o=function tagExpWithClosingIndex(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,c=i.search(/\s/);let u=i,l=!0;-1!==c&&(u=i.substring(0,c),i=i.substring(c+1).trimStart());const p=u;if(r){const e=u.indexOf(":");-1!==e&&(u=u.substr(e+1),l=u!==o.data.substr(e+1))}return{tagName:u,tagExp:i,closeIndex:s,attrExpPresent:l,rawTagName:p}}function readStopNodeData(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=findClosingIndex(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i:i};r=i}else if("?"===e[r+1]){r=findClosingIndex(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=findClosingIndex(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=findClosingIndex(e,"]]>",r,"StopNode is not closed.")-2}else{const n=readTagExp(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex}}}function parseValue(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&toNumber(e,r)}return function isExist(e){return void 0!==e}(e)?e:""}function fromCodePoint(e,t,r){const n=Number.parseInt(e,t);return n>=0&&n<=1114111?String.fromCodePoint(n):r+e+";"}const So=XmlNode.getMetaDataSymbol();function prettify(e,t){return compress(e,t)}function compress(e,t,r){let n;const o={};for(let i=0;i<e.length;i++){const s=e[i],c=propName$1(s);let u="";if(u=void 0===r?c:r+"."+c,c===t.textNodeName)void 0===n?n=s[c]:n+=""+s[c];else{if(void 0===c)continue;if(s[c]){let e=compress(s[c],t,u);const r=isLeafTag(e,t);void 0!==s[So]&&(e[So]=s[So]),s[":@"]?assignAttributes(e,s[":@"],u,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==o[c]&&o.hasOwnProperty(c)?(Array.isArray(o[c])||(o[c]=[o[c]]),o[c].push(e)):t.isArray(c,u,r)?o[c]=[e]:o[c]=e}}}return"string"==typeof n?n.length>0&&(o[t.textNodeName]=n):void 0!==n&&(o[t.textNodeName]=n),o}function propName$1(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function assignAttributes(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let s=0;s<i;s++){const i=o[s];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function isLeafTag(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}class XMLParser{constructor(e){this.externalEntities={},this.options=function(e){return Object.assign({},_o,e)}(e)}parse(e,t){if("string"!=typeof e&&e.toString)e=e.toString();else if("string"!=typeof e)throw new Error("XML data is accepted in String or Bytes[] form.");if(t){!0===t&&(t={});const r=function validate(e,t){t=Object.assign({},ho,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=readPI(e,i),i.err)return i}else{if("<"!==e[i]){if(isWhiteSpace(e[i]))continue;return getErrorObject("InvalidChar","char '"+e[i]+"' is not expected.",getLineNumberForPosition(e,i))}{let s=i;if(i++,"!"===e[i]){i=readCommentAndCDATA(e,i);continue}{let c=!1;"/"===e[i]&&(c=!0,i++);let u="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)u+=e[i];if(u=u.trim(),"/"===u[u.length-1]&&(u=u.substring(0,u.length-1),i--),!isName(u)){let t;return t=0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,i))}const l=readAttributeStr(e,i);if(!1===l)return getErrorObject("InvalidAttr","Attributes for '"+u+"' have open quote.",getLineNumberForPosition(e,i));let p=l.value;if(i=l.index,"/"===p[p.length-1]){const r=i-p.length;p=p.substring(0,p.length-1);const o=validateAttributeString(p,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(c){if(!l.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",getLineNumberForPosition(e,i));if(p.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,s));if(0===r.length)return getErrorObject("InvalidTag","Closing tag '"+u+"' has not been opened.",getLineNumberForPosition(e,s));{const t=r.pop();if(u!==t.tagName){let r=getLineNumberForPosition(e,t.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+u+"'.",getLineNumberForPosition(e,s))}0==r.length&&(o=!0)}}else{const c=validateAttributeString(p,t);if(!0!==c)return getErrorObject(c.err.code,c.err.msg,getLineNumberForPosition(e,i-p.length+c.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,i));-1!==t.unpairedTags.indexOf(u)||r.push({tagName:u,tagStartPos:s}),n=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=readCommentAndCDATA(e,i);continue}if("?"!==e[i+1])break;if(i=readPI(e,++i),i.err)return i}else if("&"===e[i]){const t=validateAmpersand(e,i);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,i));i=t}else if(!0===o&&!isWhiteSpace(e[i]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,i));"<"===e[i]&&i--}}}return n?1==r.length?getErrorObject("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",getLineNumberForPosition(e,r[0].tagStartPos)):!(r.length>0)||getErrorObject("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):getErrorObject("InvalidXml","Start tag expected.",1)}(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new OrderedObjParser(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:prettify(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}static getMetaDataSymbol(){return XmlNode.getMetaDataSymbol()}}function toXml(e,t){let r="";return t.format&&t.indentBy.length>0&&(r="\n"),arrToStr(e,t,"",r)}function arrToStr(e,t,r,n){let o="",i=!1;for(let s=0;s<e.length;s++){const c=e[s],u=propName(c);if(void 0===u)continue;let l="";if(l=0===r.length?u:`${r}.${u}`,u===t.textNodeName){let e=c[u];isStopNode(l,t)||(e=t.tagValueProcessor(u,e),e=replaceEntitiesValue(e,t)),i&&(o+=n),o+=e,i=!1;continue}if(u===t.cdataPropName){i&&(o+=n),o+=`<![CDATA[${c[u][0][t.textNodeName]}]]>`,i=!1;continue}if(u===t.commentPropName){o+=n+`\x3c!--${c[u][0][t.textNodeName]}--\x3e`,i=!0;continue}if("?"===u[0]){const e=attr_to_str(c[":@"],t),r="?xml"===u?"":n;let s=c[u][0][t.textNodeName];s=0!==s.length?" "+s:"",o+=r+`<${u}${s}${e}?>`,i=!0;continue}let p=n;""!==p&&(p+=t.indentBy);const d=n+`<${u}${attr_to_str(c[":@"],t)}`,E=arrToStr(c[u],t,l,p);-1!==t.unpairedTags.indexOf(u)?t.suppressUnpairedNode?o+=d+">":o+=d+"/>":E&&0!==E.length||!t.suppressEmptyNode?E&&E.endsWith(">")?o+=d+`>${E}${n}</${u}>`:(o+=d+">",E&&""!==n&&(E.includes("/>")||E.includes("</"))?o+=n+t.indentBy+E+n:o+=E,o+=`</${u}>`):o+=d+"/>",i=!0}return o}function propName(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let o=t.attributeValueProcessor(n,e[n]);o=replaceEntitiesValue(o,t),!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function isStopNode(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function replaceEntitiesValue(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}const Co={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(e){this.options=Object.assign({},Co,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=getIgnoreAttributesFn(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function processTextOrObjNode(e,t,r,n){const o=this.j2x(e,r+1,n.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,r):this.buildObjectNode(o.val,t,o.attrStr,r)}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){return this.options.preserveOrder?toXml(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},Builder.prototype.j2x=function(e,t,r){let n="",o="";const i=r.join(".");for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(void 0===e[s])this.isAttribute(s)&&(o+="");else if(null===e[s])this.isAttribute(s)||s===this.options.cdataPropName?o+="":"?"===s[0]?o+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)o+=this.buildTextValNode(e[s],s,"",t);else if("object"!=typeof e[s]){const r=this.isAttribute(s);if(r&&!this.ignoreAttributesFn(r,i))n+=this.buildAttrPairStr(r,""+e[s]);else if(!r)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,""+e[s]);o+=this.replaceEntitiesValue(t)}else o+=this.buildTextValNode(e[s],s,"",t)}else if(Array.isArray(e[s])){const n=e[s].length;let i="",c="";for(let u=0;u<n;u++){const n=e[s][u];if(void 0===n);else if(null===n)"?"===s[0]?o+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const e=this.j2x(n,t+1,r.concat(s));i+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(c+=e.attrStr)}else i+=this.processTextOrObjNode(n,s,t,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(s,n);e=this.replaceEntitiesValue(e),i+=e}else i+=this.buildTextValNode(n,s,"",t)}this.options.oneListGroup&&(i=this.buildObjectNode(i,s,c,t)),o+=i}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const t=Object.keys(e[s]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[s][t[o]])}else o+=this.processTextOrObjNode(e[s],s,t,r);return{attrStr:n,val:o}},Builder.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},Builder.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+i+">"+e+o}},Builder.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},Builder.prototype.buildTextValNode=function(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},Builder.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e};const No=Se("ebay:error"),Oo=Symbol("raw-error");class EBayError extends Error{constructor(e,t="",r={}){super(e),this.name=this.constructor.name,this.description=t,this.meta=r,Object.setPrototypeOf(this,new.target.prototype)}}class EBayNoCallError extends EBayError{constructor(e="No eBay API call defined, please invoke one."){super(e)}}class ApiEnvError extends EBayError{constructor(e){super(`Could not find ${e} in process.env.`)}}class EbayApiError extends EBayError{constructor(e,t,r,n,o){super(e,t,r),this.errorCode=n,this.firstError=o}}class EBayApiError extends EbayApiError{}class EBayAccessDenied extends EBayApiError{}class EBayInvalidGrant extends EBayApiError{}class EBayNotFound extends EBayApiError{}EBayNotFound.code=11001;class EBayInvalidAccessToken extends EBayApiError{}class EBayIAFTokenExpired extends EBayApiError{}EBayIAFTokenExpired.code=21917053;class EBayAuthTokenIsInvalid extends EBayApiError{}EBayAuthTokenIsInvalid.code=931;class EBayAuthTokenIsHardExpired extends EBayApiError{}EBayAuthTokenIsHardExpired.code=932;class EBayIAFTokenInvalid extends EBayApiError{}EBayIAFTokenInvalid.code=21916984;class EBayTokenRequired extends EBayApiError{}EBayTokenRequired.code=930;class EBayInvalidScope extends EBayApiError{}const getErrorMessage=e=>"message"in e?e.message:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ShortMessage:e.Errors.ShortMessage:"eBay API request error",getErrorDescription=(e,t)=>"description"in e?e.description:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].LongMessage:e.Errors.LongMessage:"longMessage"in e?e.longMessage:(200!==t?.status?t?.statusText:"")||"",getErrorCode=e=>"errorId"in e?e.errorId:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ErrorCode:e.Errors.ErrorCode:void 0,extractEBayError=(e,t)=>{const r=function getEBayError(e){return e?"string"==typeof e?{message:e}:"Errors"in e?e:"error"in e&&"string"==typeof e.error?{message:e.error,description:e.error_description||""}:"errors"in e&&Array.isArray(e.errors)?e.errors[0]:"errorMessage"in e?Array.isArray(e.errorMessage?.error)?e.errorMessage.error[0]:e.errorMessage.error:{message:"Unknown eBay API Error",description:'This error response is not known. You should investigate the "meta.res.data" for more information.'}:{message:"eBay API Error",description:"No data is set in response result."}}(t||e.response?.data),n={...r,[Oo]:e},o="Errors"in r?Array.isArray(r.Errors)?r.Errors[0]:r.Errors:r;return e?.response&&(n.res={status:e.response.status,statusText:e.response.statusText,headers:e.response.headers,data:e.response.data??{}}),e?.config&&(n.req={url:e.config.url,method:e.config.method,headers:e.config.headers,params:e.config.params}),{message:getErrorMessage(r),description:getErrorDescription(r,e?.response),errorCode:getErrorCode(r),meta:n,firstError:o}},handleEBayError=e=>{if(No("handleEBayError",e),e instanceof EBayError||!e.response)throw e;if("object"!=typeof e)throw new EBayError(e);const{message:t,meta:r,description:n,errorCode:o,firstError:i}=extractEBayError(e);if("domain"in r&&"ACCESS"===r.domain)throw new EBayAccessDenied(t,n,r,o,i);if("message"in r&&"invalid_grant"===r.message)throw new EBayInvalidGrant(t,n,r,o,i);if("message"in r&&"invalid_scope"===r.message)throw new EBayInvalidScope(t,n,r,o,i);if("message"in r&&"Invalid access token"===r.message)throw new EBayInvalidAccessToken(t,n,r,o,i);if(o===EBayNotFound.code)throw new EBayNotFound(t,n,r,o,i);throw new EBayApiError(t,n,r,o,i)},checkEBayTraditionalResponse=(e,t)=>{if(!t)return void No("checkEBayTraditionalResponse: No data found in response.");if(!("Errors"in t)&&!("errorMessage"in t))return;if("Errors"in t&&"Failure"!==t.Ack)return void No(`checkEBayTraditionalResponse: eBay API returned ${t.Ack}`);const{message:r,meta:n,description:o,errorCode:i,firstError:s}=extractEBayError(e,t);if(void 0===i)throw new EBayApiError(r,o,n,i,s);switch(i){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(r,o,n,i,s);case EBayIAFTokenInvalid.code:case 1.32:throw new EBayIAFTokenInvalid(r,o,n,i,s);case EBayTokenRequired.code:throw new EBayTokenRequired(r,o,n,i,s);case EBayAuthTokenIsHardExpired.code:throw new EBayAuthTokenIsHardExpired(r,o,n,i,s);case EBayAuthTokenIsInvalid.code:throw new EBayAuthTokenIsInvalid(r,o,n,i,s)}throw new EBayApiError(r,o,n,i,s)};var bo=Object.freeze({__proto__:null,ApiEnvError:ApiEnvError,EBayAccessDenied:EBayAccessDenied,EBayApiError:EBayApiError,EBayAuthTokenIsHardExpired:EBayAuthTokenIsHardExpired,EBayAuthTokenIsInvalid:EBayAuthTokenIsInvalid,EBayError:EBayError,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayInvalidGrant:EBayInvalidGrant,EBayInvalidScope:EBayInvalidScope,EBayNoCallError:EBayNoCallError,EBayNotFound:EBayNotFound,EBayTokenRequired:EBayTokenRequired,EbayApiError:EbayApiError,checkEBayTraditionalResponse:checkEBayTraditionalResponse,extractEBayError:extractEBayError,handleEBayError:handleEBayError,rawError:Oo});const Po=Se("ebay:xml:request"),Uo={attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"},Do={attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseTagValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,isArray:(e,t)=>/Array$/.test(t.slice(0,-e.length-1))},Lo={raw:!1,parseOptions:Do,xmlBuilderOptions:Uo,useIaf:!0,sign:!1,headers:{},returnResponse:!1},vo={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EBayNoCallError;this.config={...Lo,...r},this.j2x=new Builder({...Uo,...this.config.xmlBuilderOptions}),this.callName=e,this.fields=t||{},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getParseOptions(){return{...Do,...this.config.parseOptions}}getHeaders(){return{...vo,...this.config.headers}}toJSON(e){const t=this.getParseOptions();return Po("parseOption",t),new XMLParser(t).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+this.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);Po("xml",e);try{const{body:t,headers:r={}}=this.config.hook?.(e)??{body:e},n={headers:{...this.getHeaders(),...this.config.digitalSignatureHeaders?this.config.digitalSignatureHeaders(t):{},...r||{}}};Po("config",n);const o=await this.req.post(this.config.endpoint,t,n);if(Po("response",o),this.config.returnResponse)return o;const{data:i}=o;if(this.config.raw)return i;const s=this.xml2JSON(i);return checkEBayTraditionalResponse(o,s),s}catch(e){if(Po("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayTraditionalResponse(e,t[this.callName+"Response"])}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}const Bo=Se("ebay:authNAuth");class AuthNAuth extends Base{static generateAuthUrl(e,t,r,n=!1){return[e?AuthNAuth.SIGNIN_ENDPOINT.sandbox:AuthNAuth.SIGNIN_ENDPOINT.production,"?SignIn","&RuName=",encodeURIComponent(t),"&SessID=",encodeURIComponent(r),n?"&prompt=login":""].join("")}constructor(e,t){super(e,t),this.authToken=null,this.config.authToken&&this.setAuthToken(this.config.authToken)}get apiEndpoint(){return this.config.sandbox?AuthNAuth.API_ENDPOINT.sandbox:AuthNAuth.API_ENDPOINT.production}async getSessionIdAndAuthUrl(e){if(!this.config.devId)throw new Error("DevId is required.");if(!(e=e||this.config.ruName))throw new Error("RuName is required.");const t=new XMLRequest("GetSessionID",{RuName:e},this.getRequestConfig("GetSessionID"),this.req),r=await t.request();return Bo("GetSessionID data",r),{sessionId:r.SessionID,url:AuthNAuth.generateAuthUrl(this.config.sandbox,e,r.SessionID)}}async mintToken(e){if(!this.config.devId)throw new Error("DevId is required.");const t=new XMLRequest("FetchToken",{SessionID:e},this.getRequestConfig("FetchToken"),this.req);try{return await t.request()}catch(e){throw Bo("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return Bo("Obtain auth token",t),this.setAuthToken(t),t}setAuthToken(e){this.authToken="string"==typeof e?{eBayAuthToken:e}:e}getAuthToken(){return this.authToken?{...this.authToken}:null}get eBayAuthToken(){return this.authToken?.eBayAuthToken??null}getRequestConfig(e){if("number"!=typeof this.config.siteId)throw new Error("\"siteId\" is required for Auth'n'Auth.");return{useIaf:!1,xmlns:"urn:ebay:apis:eBLBaseComponents",endpoint:this.apiEndpoint,headers:{"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967}}}}AuthNAuth.SIGNIN_ENDPOINT={sandbox:"https://signin.sandbox.ebay.com/ws/eBayISAPI.dll",production:"https://signin.ebay.com/ws/eBayISAPI.dll"},AuthNAuth.API_ENDPOINT={production:"https://api.ebay.com/ws/api.dll",sandbox:"https://api.sandbox.ebay.com/ws/api.dll"};let createNanoEvents=()=>({events:{},emit(e,...t){const r=this.events[e]||[];for(let e=0,n=r.length;e<n;e++)r[e](...t)},on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter((e=>t!==e))}}});const Mo=Se("ebay:oauth2");class OAuth2 extends Base{constructor(e,t){super(e,t),this.emitter=createNanoEvents(),this.scope=this.config.scope||OAuth2.defaultScopes}on(e,t){return this.emitter.on(e,t)}get identityEndpoint(){return this.config.sandbox?OAuth2.IDENTITY_ENDPOINT.sandbox:OAuth2.IDENTITY_ENDPOINT.production}static generateAuthUrl(e,t,r,n,o=""){return[e?OAuth2.AUTHORIZE_ENDPOINT.sandbox:OAuth2.AUTHORIZE_ENDPOINT.production,"?client_id=",encodeURIComponent(t),"&redirect_uri=",encodeURIComponent(r),"&response_type=code","&state=",encodeURIComponent(o),"&scope=",encodeURIComponent(n.join(" "))].join("")}generateAuthUrl(e,t=this.scope,r=""){if(!(e=e||this.config.ruName))throw new Error("RuName is required.");return OAuth2.generateAuthUrl(this.config.sandbox,this.config.appId,e,t,r)}async getAccessToken(){return this.getUserAccessToken()||this.getApplicationAccessToken()}getUserAccessToken(){return this._authToken?.access_token??null}async getApplicationAccessToken(){if(this._clientToken)return Mo("Return existing application access token: ",this._clientToken),this._clientToken.access_token;try{return(await this.obtainApplicationAccessToken()).access_token}catch(e){throw e}}getScope(){return[...this.scope]}setClientToken(e){this._clientToken=e}setScope(e){this.scope=e}async mintApplicationAccessToken(){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{return(await this.req.postForm(this.identityEndpoint,{scope:this.scope.join(" "),grant_type:"client_credentials"},{auth:{username:this.config.appId,password:this.config.certId}})).data}catch(e){throw Mo("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){Mo("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return Mo("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw Mo("Failed to obtain application token",e),e}}async mintUserAccessToken(e,t=this.config.ruName){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{const r=(await this.req.postForm(this.identityEndpoint,{grant_type:"authorization_code",code:e,redirect_uri:t},{auth:{username:this.config.appId,password:this.config.certId}})).data;return Mo("User Access Token",r),r}catch(e){throw Mo("Failed to get the token",e),e}}async getToken(e,t=this.config.ruName){return await this.mintUserAccessToken(e,t)}async refreshUserAccessToken(){if(!this._authToken||!this._authToken.refresh_token)throw Mo("Tried to refresh user access token before it was set."),new Error("Failed to refresh the user access token. Token or refresh_token is not set.");try{const e=(await this.req.postForm(this.identityEndpoint,{grant_type:"refresh_token",refresh_token:this._authToken.refresh_token,scope:this.scope.join(" ")},{auth:{username:this.config.appId,password:this.config.certId}})).data;Mo("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw Mo("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return Mo("Obtain user access token",t),this.setCredentials(t),t}getCredentials(){return this._authToken?{...this._authToken}:this._clientToken?{...this._clientToken}:null}setCredentials(e){this._authToken="string"==typeof e?{refresh_token:"",expires_in:7200,refresh_token_expires_in:47304e3,token_type:"User Access Token",access_token:e}:e}async refreshToken(){if(this._authToken)return await this.refreshUserAccessToken();if(this._clientToken)return await this.obtainApplicationAccessToken();throw new Error("Missing credentials. To refresh a token an application access token or user access token must be already set.")}}OAuth2.IDENTITY_ENDPOINT={production:"https://api.ebay.com/identity/v1/oauth2/token",sandbox:"https://api.sandbox.ebay.com/identity/v1/oauth2/token"},OAuth2.AUTHORIZE_ENDPOINT={production:"https://auth.ebay.com/oauth2/authorize",sandbox:"https://auth.sandbox.ebay.com/oauth2/authorize"},OAuth2.defaultScopes=["https://api.ebay.com/oauth/api_scope"];class Auth extends Base{constructor(e,t){super(e,t),this.authNAuth=new AuthNAuth(this.config,this.req),this.OAuth2=new OAuth2(this.config,this.req),this.oAuth2=this.OAuth2}async getHeaderAuthorization(e){if(this.authNAuth.eBayAuthToken)return{Authorization:"Token "+this.authNAuth.eBayAuthToken};return{Authorization:(e?"IAF ":"Bearer ")+await this.OAuth2.getAccessToken()}}}const Fo="-----BEGIN PRIVATE KEY-----",getUnixTimestamp=()=>Math.floor(Date.now()/1e3),getSignatureParams=e=>[...e?["content-digest"]:[],"x-ebay-signature-key","@method","@path","@authority"],getSignatureParamsValue=e=>getSignatureParams(e).map((e=>`"${e}"`)).join(" "),generateContentDigestValue=(e,t="sha256")=>{const r=Buffer.from("string"==typeof e?e:JSON.stringify(e));return`${"sha512"===t?"sha-512":"sha-256"}=:${function createHash(){throw Error("crypto.createHash is not supported in browser.")}().update(r).digest("base64")}:`};const generateSignatureInput=(e,t=getUnixTimestamp())=>`sig1=(${getSignatureParamsValue(e)});created=${t}`;function generateSignature(e,t,r,n,o=getUnixTimestamp()){const i=function generateBaseString(e,t,r,n=getUnixTimestamp()){try{let o="";return getSignatureParams(r).forEach((r=>{if(o+=`"${r.toLowerCase()}": `,r.startsWith("@"))switch(r.toLowerCase()){case"@method":o+=t.method;break;case"@authority":o+=t.authority;break;case"@path":o+=t.path;break;default:throw new Error("Unknown pseudo header "+r)}else{if(!e[r])throw new Error("Header "+r+" not included in message");o+=e[r]}o+="\n"})),o+=`"@signature-params": (${getSignatureParamsValue(r)});created=${n}`,o}catch(e){throw new EBayError(`Error calculating signature base: ${e.message}`)}}(e,r,n,o);(t=t.trim()).startsWith(Fo)||(t=Fo+"\n"+t+"\n-----END PRIVATE KEY-----");return`sig1=:${function sign(){throw Error("crypto.sign is not supported in browser.")}(Buffer.from(i)).toString("base64")}:`}class Api extends Base{constructor(e,t,r){super(e,t),this.auth=r||new Auth(this.config,this.req)}getDigitalSignatureHeaders(e,t){if(!this.config.signature)return{};const r=getUnixTimestamp(),n={"x-ebay-enforce-signature":!0,"x-ebay-signature-key":this.config.signature.jwe,...t?{"content-digest":generateContentDigestValue(t,this.config.signature.cipher??"sha256")}:{},"signature-input":generateSignatureInput(t,r)};return{...n,signature:generateSignature(n,this.config.signature.privateKey,e,t,r)}}}const wo={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},xo={marketplaceId:"X-EBAY-C-MARKETPLACE-ID",endUserCtx:"X-EBAY-C-ENDUSERCTX",acceptLanguage:"Accept-Language",contentLanguage:"Content-Language"};class Restful extends Api{constructor(e,t,r,n={}){super(e,t,r),this.apiConfig={...this.getApiConfig(),...n}}static buildServerUrl(e,t,r,n){return`${e}${t}.${r?"sandbox.":""}${n}`}get useIaf(){return!1}get schema(){return"https://"}get subdomain(){return"api"}get apiVersionPath(){return""}getServerUrl({schema:e,subdomain:t,apiVersion:r,basePath:n,sandbox:o,tld:i}){return Restful.buildServerUrl(e,t,o,i)+r+n}getApiConfig(){return{subdomain:this.subdomain,useIaf:this.useIaf,apiVersion:this.apiVersionPath,basePath:this.basePath,schema:this.schema,sandbox:this.config.sandbox,tld:"ebay.com",headers:{},returnResponse:!1,sign:!1}}get baseUrl(){return this.getServerUrl(this.apiConfig)}api(e){return new this.constructor(this.config,this.req,this.auth,e)}get apix(){return this.api({subdomain:"apix"})}get apiz(){return this.api({subdomain:"apiz"})}get sign(){return this.api({sign:!0})}async get(e,t={},r){return this.doRequest({method:"get",path:e,config:t},r)}async delete(e,t={},r){return this.doRequest({method:"delete",path:e,config:t},r)}async post(e,t,r={},n){return this.doRequest({method:"post",path:e,data:t,config:r},n)}async put(e,t,r={},n){return this.doRequest({method:"put",path:e,data:t,config:r},n)}get additionalHeaders(){return Object.keys(xo).filter((e=>void 0!==this.config[e])).reduce(((e,t)=>(e[xo[t]]=this.config[t],e)),{})}async enrichRequestConfig(e,t=null,r=this.apiConfig){const n=await this.auth.getHeaderAuthorization(r.useIaf),o=r.sign?this.getDigitalSignatureHeaders({method:e.method.toUpperCase(),authority:Restful.buildServerUrl("",r.subdomain,r.sandbox,r.tld),path:r.apiVersion+r.basePath+e.path},t):{},i={...wo,...this.additionalHeaders,...n,...r.headers,...o};return{...e.config,headers:{...e.config.headers||{},...i}}}async doRequest(e,t){try{return await this.request(e,t)}catch(r){if(this.shouldRefreshToken(r))return await this.request(e,t,!0);throw r}}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayInvalidAccessToken.name||(403===e?.meta?.res?.status&&"/sell/inventory/v1"===this.apiConfig.basePath||401===e?.meta?.res?.status&&"/post-order/v2"===this.apiConfig.basePath))}async request(e,t=this.apiConfig,r=!1){const{path:n,method:o,data:i}=e,s={...this.apiConfig,...t},c=this.getServerUrl(s)+n;try{r&&await this.auth.OAuth2.refreshToken();const t=await this.enrichRequestConfig(e,i,s),n=["get","delete"].includes(o)?[t]:[i,t],u=await this.req[o](c,...n);return this.apiConfig.returnResponse?u:u.data}catch(e){handleEBayError(e)}}}class Browse extends Restful{get basePath(){return"/buy/browse/v1"}search(e){return this.get("/item_summary/search",{params:e})}searchByImage(e,t){return this.post("/item_summary/search_by_image",t,{params:e})}getItems(e){return this.get("/item/",{params:e})}getItem(e,t){const r=encodeURIComponent(e);return this.get(`/item/${r}`,{params:{fieldgroups:t}})}getItemByLegacyId(e){return this.get("/item/get_item_by_legacy_id",{params:e})}getItemsByItemGroup(e){return this.get("/item/get_items_by_item_group",{params:{item_group_id:e}})}checkCompatibility(e,t){const r=encodeURIComponent(e);return this.post(`/item/${r}/check_compatibility`,t)}addItem(e){return this.post("/shopping_cart/add_item",e)}getShoppingCart(){return this.get("/shopping_cart/")}removeItem(e){return this.post("/shopping_cart/remove_item",e)}updateQuantity(e){return this.post("/shopping_cart/update_quantity",e)}}Browse.id="Browse";let ko=class Feed extends Restful{get basePath(){return"/buy/feed/v1_beta"}getItemFeed(e,t){return this.get("/item",{params:e,headers:{Range:t}})}getItemGroupFeed(e,t){return this.get("/item_group",{params:e,headers:{Range:t}})}getItemSnapshotFeed(e,t,r){return this.get("/item_snapshot",{params:{...e,snapshot_date:t},headers:{Range:r}})}getProductFeed(e,t,r){return this.get("/product",{params:{...e,snapshot_date:t},headers:{Range:r}})}};ko.id="Feed";let Go=class Marketing extends Restful{get basePath(){return"/buy/marketing/v1_beta"}getAlsoBoughtByProduct(e){return this.get("/merchandised_product/get_also_bought_products",{params:e})}getAlsoViewedByProduct(e){return this.get("/merchandised_product/get_also_viewed_products",{params:e})}getMerchandisedProducts(e){return this.get("/merchandised_product",{params:e})}};Go.id="Marketing";class Offer extends Restful{get basePath(){return"/buy/offer/v1_beta"}getBidding(e){const t=encodeURIComponent(e);return this.get(`/bidding/${t}`)}placeProxyBid(e,t){const r=encodeURIComponent(e);return this.post(`/bidding/${r}/place_proxy_bid`,t)}}Offer.id="Offer";class Order extends Restful{get basePath(){return"/buy/order/v1"}applyCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/apply_coupon`,t)}getCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/checkout_session/${e}`)}initiateCheckoutSession(e){return this.post("/checkout_session/initiate",e)}placeOrder(e){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/place_order`)}removeCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/remove_coupon`,t)}updatePaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_payment_info`,t)}updateQuantity(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}checkoutSessionId(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}updateShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_address`,t)}updateShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_option`,t)}applyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/apply_coupon`,t)}getGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/guest_checkout_session/${e}`)}initiateGuestCheckoutSession(e){return this.post("/guest_checkout_session/initiate",e)}initiateGuestPayment(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/initiate_payment`,t)}placeGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/place_order`,t)}removeGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/remove_coupon`,t)}updateGuestPaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_payment_info`,t)}updateGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_quantity`,t)}updateGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_address`,t)}updateGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_option`,t)}applyProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/apply_coupon`,t)}getProxyGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/proxy_guest_checkout_session/${e}`)}initiateProxyGuestCheckoutSession(e){return this.post("/proxy_guest_checkout_session/initiate",e)}placeProxyGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/place_order`,t)}removeProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/remove_coupon`,t)}updateProxyGuestPaymentInfo(e,t,r,n,o,i){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_payment_info`,i,{headers:{Authorization:t,"X-EBAY-C-DATE":r,"X-EBAY-C-REQUEST-NONCE":n,"X-EBAY-C-SIGNATURE":o}})}updateProxyGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_quantity`,t)}updateProxyGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_address`,t)}updateProxyGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_option`,t)}getGuestPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/guest_purchase_order/${e}`)}getPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/purchase_order/${e}`)}}Order.id="Order";class Deal extends Restful{get basePath(){return"/buy/deal/v1"}getDealItems({categoryIds:e,commissionable:t,deliveryCountry:r,limit:n,offset:o}){return this.get("/deal_item",{params:{category_ids:e,commissionable:t,delivery_country:r,limit:n,offset:o}})}getEvent(e){return e=encodeURIComponent(e),this.get(`/event/${e}`)}getEvents({limit:e,offset:t}){return this.get("/event",{params:{limit:e,offset:t}})}getEventItems(e,{categoryIds:t,deliveryCountry:r,limit:n,offset:o}={}){return this.get("/event_item",{params:{event_ids:e,limit:n,offset:o,category_ids:t,delivery_country:r}})}}Deal.id="Deal";class MarketplaceInsights extends Restful{get basePath(){return"/buy/marketplace_insights/v1_beta"}search({aspectFilter:e,categoryIds:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}){return this.get("/item_sales/search",{params:{aspect_filter:e,category_ids:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}})}}MarketplaceInsights.id="MarketplaceInsights";class Catalog extends Restful{get basePath(){return"/commerce/catalog/v1_beta"}getChangeRequest(e){return this.get(`/change_request/${e}`)}getChangeRequests({filter:e,limit:t,offset:r}={}){return this.get("/change_request",{params:{filter:e,limit:t,offset:r}})}getProduct(e){const t=encodeURIComponent(e);return this.get(`/product/${t}`)}search(e){return this.get("/product_summary/search",{params:e})}getProductMetadata(e,{otherApplicableCategoryIds:t,primaryCategoryId:r}={}){return this.get("/get_product_metadata",{params:{epid:e,other_applicable_category_ids:t,primary_category_id:r}})}getProductMetadataForCategories(e,t){return this.get("/get_product_metadata_for_categories",{params:{primary_category_id:e,other_applicable_category_ids:t}})}}Catalog.id="Catalog";class Charity extends Restful{get basePath(){return"/commerce/charity/v1"}getCharityOrg(e){return e=encodeURIComponent(e),this.get(`/charity_org/${e}`)}getCharityOrgs({limit:e,offset:t,q:r,registrationIds:n}){return this.get("/charity_org",{params:{limit:e,offset:t,q:r,registration_ids:n}})}getCharityOrgByLegacyId(e){return this.get("/charity_org/get_charity_org_by_legacy_id",{params:{legacy_charity_org_id:e}})}}Charity.id="Charity";class Identity extends Restful{get basePath(){return"/commerce/identity/v1"}get subdomain(){return"apiz"}getUser(){return this.get("/user/")}}Identity.id="Identity";class Media extends Restful{get basePath(){return"/commerce/media/v1_beta"}get subdomain(){return"apim"}async createVideo(e){return this.post("/video",e)}async getVideo(e){return e=encodeURIComponent(e),this.get(`/video/${e}`)}async uploadVideo(e,t){return e=encodeURIComponent(e),this.post(`/video/${e}/upload`,t)}}Media.id="Media";class Notification extends Restful{get basePath(){return"/commerce/notification/v1"}getPublicKey(e){return e=encodeURIComponent(e),this.get(`/public_key/${e}`)}getTopic(e){return e=encodeURIComponent(e),this.get(`/topic/${e}`)}getTopics({limit:e,continuationToken:t}){return this.get("/topic",{params:{limit:e,continuation_token:t}})}getSubscriptions({limit:e,continuationToken:t}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}createSubscription(e){return this.post("/subscription",e)}getSubscription(e){return e=encodeURIComponent(e),this.get(`/subscription/${e}`)}updateSubscription(e,t){return e=encodeURIComponent(e),this.put(`/subscription/${e}`,t)}deleteSubscription(e){return e=encodeURIComponent(e),this.delete(`/subscription/${e}`)}enableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/enable`)}disableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/disable`)}test(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/test`)}getDestinations({limit:e,continuationToken:t}){return this.get("/destination",{params:{limit:e,continuation_token:t}})}createDestination(e){return this.post("/destination",e)}getDestination(e){return e=encodeURIComponent(e),this.get(`/destination/${e}`)}updateDestination(e,t){return e=encodeURIComponent(e),this.put(`/destination/${e}`,t)}deleteDestination(e){return e=encodeURIComponent(e),this.delete(`/destination/${e}`)}getConfig(){return this.get("/config")}updateConfig(e){return this.put("/config",e)}}Notification.id="Notification";class Taxonomy extends Restful{get basePath(){return"/commerce/taxonomy/v1"}getDefaultCategoryTreeId(e){return this.get("/get_default_category_tree_id",{params:{marketplace_id:e}})}getCategoryTree(e){const t=encodeURIComponent(e);return this.get(`/category_tree/${t}`)}getCategorySubtree(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_category_subtree`,{params:{category_id:t}})}getCategorySuggestions(e,t){return this.get(`/category_tree/${e}/get_category_suggestions`,{params:{q:t}})}getItemAspectsForCategory(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_item_aspects_for_category`,{params:{category_id:t}})}getCompatibilityProperties(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_properties`,{params:{category_id:t}})}getCompatibilityPropertyValues(e,t,r,n){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r,...n?.trim()&&{filter:n}}})}fetchItemAspects(e){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/fetch_item_aspects`,{responseType:"arraybuffer"})}}Taxonomy.id="Taxonomy";class Translation extends Restful{get basePath(){return"/commerce/translation/v1_beta"}translate(e){return this.post("/translate",e)}}Translation.id="Translation";class Message extends Restful{get basePath(){return"/commerce/message/v1"}getConversations({limit:e,offset:t,conversationStatus:r,conversationType:n,referenceId:o,referenceType:i,startTime:s,endTime:c,otherPartyUsername:u}={}){return this.get("/conversation",{params:{limit:e,offset:t,conversation_status:r,conversation_type:n,reference_id:o,reference_type:i,start_time:s,end_time:c,other_party_username:u}})}getConversation(e,{conversationType:t,limit:r,offset:n}){return this.get(`/conversation/${e}`,{params:{conversation_type:t,limit:r,offset:n}})}updateConversation(e){return this.post("/update_conversation",e)}bulkUpdateConversation(e){return this.post("/bulk_update_conversation",e)}sendMessage(e){return this.post("/send_message",e)}}Message.id="Message";let Yo=class Analytics extends Restful{get basePath(){return"/developer/analytics/v1_beta"}getRateLimits(e,t){return this.get("/rate_limit/",{params:{api_context:e,api_name:t}})}getUserRateLimits(e,t){return this.get("/user_rate_limit/",{params:{api_context:e,api_name:t}})}};Yo.id="Analytics";class KeyManagement extends Restful{get subdomain(){return"apiz"}get basePath(){return"/developer/key_management/v1"}getSigningKeys(){return this.get("/signing_key")}createSigningKey(e){return this.post("/signing_key",{signingKeyCipher:e})}getSigningKey(e){return this.get(`/signing_key/${e}`)}}KeyManagement.id="KeyManagement";class Cancellation extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}approveCancellationRequest(e){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/approve`)}checkCancellationEligibility(e){return this.post("/cancellation/check_eligibility",{legacyOrderId:e})}confirmRefundReceived(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/confirm`,t)}createCancellation(e){return this.post("/cancellation",e)}getCancellation(e,t){return e=encodeURIComponent(e),this.get(`/cancellation/${e}`,{params:{fieldgroups:t}})}rejectCancellationRequest(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/reject`,t)}search(e){return this.get("/cancellation/search",{params:e})}}Cancellation.id="Cancellation";class Case extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}appealCaseDecision(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/appeal`,t)}closeCase(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/close`,t)}getCase(e){const t=encodeURIComponent(e);return this.get(`/casemanagement/${t}`)}issueCaseRefund(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/issue_refund`,t)}provideReturnShipmentInfo(e,{shippingCarrierName:t,trackingNumber:r}){const n=encodeURIComponent(e);return this.post(`/casemanagement/${n}/provide_shipment_info`,{shippingCarrierName:t,trackingNumber:r})}providesReturnAddress(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/provide_return_address`,t)}search(e){return this.get("/casemanagement/search",{params:e})}}Case.id="Case";class Inquiry extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}checkInquiryEligibility(e){return this.post("/inquiry/check_eligibility",e)}closeInquiry(e,t){return e=encodeURIComponent(e),"string"==typeof t?.closeReason&&(t.closeReason=t.closeReason.trim()),this.post(`/inquiry/${e}/close`,t)}confirmInquiryRefund(e){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/confirm_refund`)}createInquiry(e){return"string"==typeof e.desiredOutcome&&(e.desiredOutcome=e.desiredOutcome.trim()),this.post("/inquiry",e)}escalateInquiry(e,t){return e=encodeURIComponent(e),t.escalateInquiryReason=t.escalateInquiryReason.trim(),this.post(`/inquiry/${e}/escalate`,t)}getInquiry(e){return e=encodeURIComponent(e),this.get(`/inquiry/${e}`)}issueInquiryRefund(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/issue_refund`,t)}provideInquiryRefundInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_refund_info`,t)}provideInquiryShipmentInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_shipment_info`,t)}search(e){return this.get("/inquiry/search",{params:e})}sendInquiryMessage(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/send_message`,t)}}Inquiry.id="Inquiry";class Return extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}addShippingLabelInfo(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/add_shipping_label`,t)}cancelReturnRequest(e,t){const r=encodeURIComponent(e);return t&&t.buyerCloseReason&&(t.buyerCloseReason=t.buyerCloseReason.trim()),this.post(`/return/${r}/cancel`,t)}checkReturnEligibility(e){return this.post("/return/check_eligibility",e)}checkShippingLabelEligibility(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/check_label_print_eligibility`)}createReturnDraft(e){return this.post("/return/draft",e)}createReturnRequest(e,t){return this.post("/return",e,{params:{fieldgroups:t}})}createReturnShippingLabel(e){const t=encodeURIComponent(e);return this.post(`/return/${t}/initiate_shipping_label`)}deleteReturnDraftFile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/return/draft/${e}/file/${t}`)}escalateReturn(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/escalate`,t)}getReturn(e,t){return e=encodeURIComponent(e),this.get(`/return/${e}`,{params:{fieldgroups:t}})}getReturnDraft(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}`)}getReturnDraftFiles(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}/files`)}getReturnEstimate(e){return this.post("/return/estimate",e)}getReturnFiles(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/files`)}getReturnPreferences(){return this.get("/return/preference")}getReturnShippingLabel(e){return e=encodeURIComponent(e),this.get(`/return/${e}/get_shipping_label`)}getShipmentTrackingInfo(e,t,r){return e=encodeURIComponent(e),this.get(`/return/${e}/tracking`,{params:{carrier_used:t,tracking_number:r}})}issueReturnRefund(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/issue_refund`,t)}markReturnReceived(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_received`,t)}markReturnRefundReceived(e){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_received`)}markReturnRefundSent(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_sent`,t)}markReturnShipped(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_shipped`,t)}processReturnRequest(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/decide`,t)}search(e){return this.get("/return/search",{params:e})}sendReturnMessage(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_message`,t)}sendReturnShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_shipping_label`,{},{params:{to_email_address:t}})}setReturnPreferences(e){return this.post("/return/preference",{rmaRequired:e})}submitReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/submit`,{filePurpose:t})}updateReturnDraft(e,t){return e=encodeURIComponent(e),this.put(`/return/draft/${e}`,{returnRequest:t})}updateShipmentTrackingInfo(e,t){return e=encodeURIComponent(e),this.put(`/return/${e}/update_tracking`,t)}uploadReturnDraftFile(e,t){return e=encodeURIComponent(e),this.post(`/return/draft/${e}/file/upload`,t)}uploadReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/upload`,t)}voidShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/void_shipping_label`,t)}}Return.id="Return";class AccountV1 extends Restful{get basePath(){return"/sell/account/v1"}getCustomPolicies(e){return this.get("/custom_policy/",{params:{policy_types:e}})}createCustomPolicy(e){return this.post("/custom_policy/",e)}getCustomPolicy(e){return e=encodeURIComponent(e),this.get(`/custom_policy/${e}`)}updateCustomPolicy(e,t){return e=encodeURIComponent(e),this.put(`/custom_policy/${e}`,t)}getFulfillmentPolicies(e){return this.get("/fulfillment_policy",{params:{marketplace_id:e}})}createFulfillmentPolicy(e){return this.post("/fulfillment_policy/",e)}updateFulfillmentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/fulfillment_policy/${e}`,t)}deleteFulfillmentPolicy(e){return e=encodeURIComponent(e),this.delete(`/fulfillment_policy/${e}`)}getFulfillmentPolicy(e){return this.get(`/fulfillment_policy/${e}`)}getFulfillmentPolicyByName(e,t){return this.get("/fulfillment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentPolicies(e){return this.get("/payment_policy",{params:{marketplace_id:e}})}getPaymentPolicy(e){return e=encodeURIComponent(e),this.get(`/payment_policy/${e}`)}createPaymentPolicy(e){return this.post("/payment_policy",e)}updatePaymentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/payment_policy/${e}`,t)}deletePaymentPolicy(e){return e=encodeURIComponent(e),this.delete(`/payment_policy/${e}`)}getPaymentPolicyByName(e,t){return this.get("/payment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentsProgram(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}`)}getPaymentsProgramOnboarding(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}/onboarding`)}getPrivileges(){return this.get("/privilege")}getOptedInPrograms(){return this.get("/program/get_opted_in_programs")}optInToProgram(e){return this.post("/program/opt_in",e)}optOutOfProgram(e){return this.post("/program/opt_out",e)}getRateTables(e){return this.get("/rate_table",{params:{country_code:e}})}getReturnPolicies(e){return this.get("/return_policy",{params:{marketplace_id:e}})}getReturnPolicy(e){return e=encodeURIComponent(e),this.get(`/return_policy/${e}`)}createReturnPolicy(e){return this.post("/return_policy",e)}updateReturnPolicy(e,t){return e=encodeURIComponent(e),this.put(`/return_policy/${e}`,t)}deleteReturnPolicy(e){return e=encodeURIComponent(e),this.delete(`/return_policy/${e}`)}getReturnPolicyByName(e,t){return this.get("/return_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/sales_tax/${e}/${t}`)}createOrReplaceSalesTax(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/sales_tax/${e}/${t}`,r)}deleteSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/sales_tax/${e}/${t}`)}getSalesTaxes(e){return this.get("/sales_tax",{params:{country_code:e}})}getSubscription({limit:e,continuationToken:t}={}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}getKYC(){return this.get("/kyc")}getAdvertisingEligibility(e){return this.get("/advertising_eligibility",{params:{program_types:e}})}getInventoryLocation(e){return e=encodeURIComponent(e),this.get(`/location/${e}`)}createInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}`,t)}deleteInventoryLocation(e){return e=encodeURIComponent(e),this.delete(`/location/${e}`)}disableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/disable`)}enableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}updateInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}/update_location_details`,t)}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}}AccountV1.id="AccountV1";class AccountV2 extends Restful{get basePath(){return"/sell/account/v2"}getRateTable(e){return e=encodeURIComponent(e),this.get(`/rate_table/${e}`)}updateShippingCost(e,t){return e=encodeURIComponent(e),this.post(`/rate_table/${e}/update_shipping_cost`,t)}getPayoutSettings(){return this.get("/payout_settings")}updatePayoutPercentage(e){return this.post("/payout_settings/update_percentage",e)}}AccountV2.id="AccountV2";class Analytics extends Restful{get basePath(){return"/sell/analytics/v1"}findSellerStandardsProfiles(){return this.get("/seller_standards_profile")}getSellerStandardsProfile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/seller_standards_profile/${e}/${t}`)}getTrafficReport({dimension:e,filter:t,metric:r,sort:n}={}){return this.get("/traffic_report",{params:{dimension:e,filter:t,metric:r,sort:n}})}getCustomerServiceMetric(e,t){return this.get(`/customer_service_metric/${e}/${t}`)}}Analytics.id="Analytics";class Compliance extends Restful{get basePath(){return"/sell/compliance/v1"}getListingViolationsSummary(e){return this.get("/listing_violation_summary",{params:{compliance_type:e}})}getListingViolations({complianceType:e,offset:t,listingId:r,limit:n}={}){return this.get("/listing_violation",{params:{compliance_type:e,offset:t,listing_id:r,limit:n}})}suppressViolation(e){return this.post("/suppress_listing_violation",e)}}Compliance.id="Compliance";class Finances extends Restful{get basePath(){return"/sell/finances/v1"}get subdomain(){return"apiz"}getPayout(e){return e=encodeURIComponent(e),this.get(`/payout/${e}`)}getPayouts({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/payout",{params:{filter:e,limit:t,offset:r,sort:n}})}getPayoutSummary({filter:e}={}){return this.get("/payout_summary",{params:{filter:e}})}getTransactions({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/transaction",{params:{filter:e,limit:t,offset:r,sort:n}})}getTransactionSummary({filter:e}={}){return this.get("/transaction_summary",{params:{filter:e}})}getTransfer(e){return e=encodeURIComponent(e),this.get(`/transfer/${e}`)}getSellerFundsSummary(){return this.get("/seller_funds_summary")}}Finances.id="Finances";class Fulfillment extends Restful{get basePath(){return"/sell/fulfillment/v1"}getOrder(e,{fieldGroups:t}={}){return this.get(`/order/${e}`,{params:{fieldGroups:t}})}getOrders({filter:e,limit:t,offset:r,orderIds:n,fieldGroups:o}={}){return this.get("/order",{params:{filter:e,limit:t,offset:r,orderIds:Array.isArray(n)?n.join():n,fieldGroups:o}})}issueRefund(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/issue_refund`,t)}getShippingFulfillments(e){return e=encodeURIComponent(e),this.get(`/order/${e}/shipping_fulfillment`)}createShippingFulfillment(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/shipping_fulfillment`,t)}getShippingFulfillment(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/order/${e}/shipping_fulfillment/${t}`)}getPaymentDispute(e){return this.get(`/payment_dispute/${e}`)}fetchEvidenceContent(e){return this.get(`/payment_dispute/${e}/fetch_evidence_content`)}getActivities(e){return this.get(`/payment_dispute/${e}/activity`)}getPaymentDisputeSummaries({orderId:e,buyerUsername:t,openDateFrom:r,openDateTo:n,paymentDisputeStatus:o,limit:i,offset:s}){return this.get("/payment_dispute_summary",{params:{order_id:e,buyer_username:t,open_date_from:r,open_date_to:n,payment_dispute_status:o,limit:i,offset:s}})}contestPaymentDispute(e,t){return this.post(`/payment_dispute/${e}/contest`,t)}acceptPaymentDispute(e){return this.post(`/payment_dispute/${e}/accept`)}uploadEvidenceFile(e,t){return this.post(`/payment_dispute/${e}/upload_evidence_file`,t,{headers:{...lo}})}addEvidence(e,t){return this.post(`/payment_dispute/${e}/add_evidence`,t)}updateEvidence(e,t){return this.post(`/payment_dispute/${e}/update_evidence`,t)}}Fulfillment.id="Fulfillment";class Inventory extends Restful{get basePath(){return"/sell/inventory/v1"}getInventoryLocation(e){const t=encodeURIComponent(e);return this.get(`/location/${t}`)}disableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/disable`)}enableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}createInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}`,t)}deleteInventoryLocation(e){const t=encodeURIComponent(e);return this.delete(`/location/${t}`)}updateInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}/update_location_details`,t)}getInventoryItem(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}`)}createOrReplaceInventoryItem(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}`,t)}deleteInventoryItem(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}`)}getInventoryItems({limit:e,offset:t}={}){return this.get("/inventory_item",{params:{limit:e,offset:t}})}bulkUpdatePriceQuantity(e){return this.post("/bulk_update_price_quantity",e)}bulkCreateOrReplaceInventoryItem(e){return this.post("/bulk_create_or_replace_inventory_item",e)}bulkGetInventoryItem(e){return this.post("/bulk_get_inventory_item",e)}getProductCompatibility(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}/product_compatibility`)}createOrReplaceProductCompatibility(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}/product_compatibility`,t)}deleteProductCompatibility(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}/product_compatibility`)}getOffers({sku:e,marketplaceId:t,format:r,limit:n,offset:o}={}){return this.get("/offer",{params:{sku:e,marketplace_id:t,format:r,limit:n,offset:o}})}getOffer(e){return e=encodeURIComponent(e),this.get(`/offer/${e}`)}createOffer(e){return this.post("/offer",e)}updateOffer(e,t){return e=encodeURIComponent(e),this.put(`/offer/${e}`,t)}deleteOffer(e){return this.delete(`/offer/${e}`)}publishOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/publish`)}publishOfferByInventoryItemGroup(e){return this.post("/offer/publish_by_inventory_item_group",e)}withdrawOfferByInventoryItemGroup(e){return this.post("/offer/withdraw_by_inventory_item_group",e)}getListingFees(e){return this.post("/offer/get_listing_fees",e)}bulkCreateOffer(e){return this.post("/bulk_create_offer",e)}bulkPublishOffer(e){return this.post("/bulk_publish_offer",e)}withdrawOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/withdraw`)}getInventoryItemGroup(e){return e=encodeURIComponent(e),this.get(`/inventory_item_group/${e}`)}createOrReplaceInventoryItemGroup(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item_group/${e}`,t)}deleteInventoryItemGroup(e){return this.delete(`/inventory_item_group/${e}`)}bulkMigrateListing(e){return this.post("/bulk_migrate_listing",e)}getSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/listing/${e}/sku/${t}/locations`)}createOrReplaceSkuLocationMapping(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/listing/${e}/sku/${t}/locations`,r)}deleteSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.delete(`/listing/${e}/sku/${t}/locations`)}}Inventory.id="Inventory";class Marketing extends Restful{get basePath(){return"/sell/marketing/v1"}bulkCreateAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_inventory_reference`,t)}bulkCreateAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_listing_id`,t)}bulkDeleteAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_inventory_reference`,t)}bulkDeleteAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_listing_id`,t)}bulkUpdateAdsBidByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_inventory_reference`,t)}bulkUpdateAdsBidByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_listing_id`,t)}bulkUpdateAdsStatus(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status`,t)}bulkUpdateAdsStatusByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status_by_listing_id`,t)}launchCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/launch`)}setupQuickCampaign(e){return this.post("/ad_campaign/setup_quick_campaign",e)}getAds(e,{limit:t,listingIds:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad`,{params:{limit:t,listing_ids:r,offset:n}})}createAdByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad`,t)}createAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/create_ads_by_inventory_reference`,t)}getAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/ad/${t}`)}deleteAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/ad_campaign/${e}/ad/${t}`)}deleteAdsByInventoryReference(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/delete_ads_by_inventory_reference`)}getAdsByInventoryReference(e,t,r){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/get_ads_by_inventory_reference`,{params:{inventory_reference_id:t,inventory_reference_type:r}})}updateBid(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.post(`/ad_campaign/${e}/ad/${t}/update_bid`,r)}getAdGroups(e,{adGroupStatus:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group`,{params:{ad_group_status:t,limit:r,offset:n}})}createAdGroup(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group`,t)}getAdGroup(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group/${t}`)}updateAdGroup(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/ad_campaign/${e}/ad_group/${t}`,r)}suggestBids(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_bids`,r)}suggestKeywords(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_keywords`,r)}cloneCampaign(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/clone`,t)}getCampaigns({campaignName:e,campaignStatus:t,endDateRange:r,limit:n,offset:o,startDateRange:i}={}){return this.get("/ad_campaign",{params:{campaign_name:e,campaign_status:t,end_date_range:r,limit:n,offset:o,start_date_range:i}})}getCampaign(e){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}`)}createCampaign(e){return this.post("/ad_campaign",e)}deleteCampaign(e){return e=encodeURIComponent(e),this.delete(`/ad_campaign/${e}`)}endCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/end`)}findCampaignByAdReference({inventoryReferenceId:e,inventoryReferenceType:t,listingId:r}={}){return this.get("/ad_campaign/find_campaign_by_ad_reference",{params:{inventory_reference_id:e,inventory_reference_type:t,listing_id:r}})}getCampaignByName(e){return this.get("/ad_campaign/get_campaign_by_name",{params:{campaign_name:e}})}pauseCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/pause`)}resumeCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/resume`)}suggestItems(e,{categoryIds:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/suggest_items`,{params:{category_ids:t,limit:r,offset:n}})}updateAdRateStrategy(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_ad_rate_strategy`,t)}updateCampaignBudget(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_budget`,t)}updateCampaignIdentification(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_identification`,t)}bulkCreateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_keyword`,t)}bulkUpdateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_keyword`,t)}getKeywords(e,{adGroupIds:t,keywordStatus:r,limit:n,offset:o}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/keyword`,{params:{ad_group_ids:t,keyword_status:r,limit:n,offset:o}})}createKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/keyword`,t)}getKeyword(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/keyword/${t}`)}updateKeyword(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/ad_campaign/${e}/keyword/${t}`,r)}bulkCreateNegativeKeyword(e){return this.post("/bulk_create_negative_keyword",e)}bulkUpdateNegativeKeyword(e){return this.post("/bulk_update_negative_keyword",e)}getNegativeKeywords({adGroupIds:e,campaignIds:t,limit:r,negativeKeywordStatus:n,offset:o}={}){return this.get("/negative_keyword",{params:{ad_group_ids:e,campaign_ids:t,limit:r,negative_keyword_status:n,offset:o}})}createNegativeKeyword(e){return this.post("/negative_keyword",e)}getNegativeKeyword(e){return e=encodeURIComponent(e),this.get(`/negative_keyword/${e}`)}updateNegativeKeyword(e,t){return e=encodeURIComponent(e),this.put(`/negative_keyword/${e}`,t)}getReport(e){return e=encodeURIComponent(e),this.get(`/ad_report/${e}`)}getReportMetadata(){return this.get("/ad_report_metadata")}getReportMetadataForReportType(e){return e=encodeURIComponent(e),this.get(`/ad_report_metadata/${e}`)}getReportTasks({limit:e,offset:t,reportTaskStatuses:r}={}){return this.get("/ad_report_task",{params:{limit:e,offset:t,report_task_statuses:r}})}getReportTask(e){return e=encodeURIComponent(e),this.get(`/ad_report_task/${e}`)}createReportTask(e){return this.post("/ad_report_task",e)}deleteReportTask(e){return e=encodeURIComponent(e),this.delete(`/ad_report_task/${e}`)}createItemPriceMarkdownPromotion(e){return this.post("/item_price_markdown",e)}updateItemPriceMarkdownPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_price_markdown/${e}`,t)}deleteItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_price_markdown/${e}`)}getItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.get(`/item_price_markdown/${e}`)}createItemPromotion(e){return this.post("/item_promotion",e)}updateItemPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_promotion/${e}`,t)}deleteItemPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_promotion/${e}`)}getItemPromotion(e){return e=encodeURIComponent(e),this.get(`/item_promotion/${e}`)}getListingSet(e,{limit:t,offset:r,q:n,sort:o,status:i}={}){return e=encodeURIComponent(e),this.get(`/promotion/${e}/get_listing_set`,{params:{limit:t,offset:r,q:n,sort:o,status:i}})}getPromotions(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i,sort:s}={}){return this.get("/promotion",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i,sort:s}})}pausePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/pause`)}resumePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/resume`)}getPromotionReports(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i}={}){return this.get("/promotion_report",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i}})}getPromotionSummaryReport(e){return this.get("/promotion_summary_report",{params:{marketplace_id:e}})}getEmailCampaign(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}`)}getEmailCampaigns({limit:e,q:t,offset:r,sort:n}={}){return this.get("/email_campaign",{params:{limit:e,offset:r,q:t,sort:n}})}createEmailCampaign(e){return this.post("/email_campaign",e)}updateEmailCampaign(e,t){return e=encodeURIComponent(e),this.put(`/email_campaign/${e}`,t)}deleteEmailCampaign(e){return e=encodeURIComponent(e),this.delete(`/email_campaign/${e}`)}getEmailPreview(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}/email_preview`)}getAudiences(){return this.get("/email_campaign/audience")}getEmailReport(e,t){return this.get("/email_campaign/report",{params:{startDate:e,endDate:t}})}}Marketing.id="Marketing";class Metadata extends Restful{get basePath(){return"/sell/metadata/v1"}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}getAutomotivePartsCompatibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_automotive_parts_compatibility_policies`,{params:{filter:t}})}getExtendedProducerResponsibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_extended_producer_responsibility_policies`,{params:{filter:t}})}getItemConditionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_item_condition_policies`,{params:{filter:t}})}getListingStructurePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_listing_structure_policies`,{params:{filter:t}})}getNegotiatedPricePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_negotiated_price_policies`,{params:{filter:t}})}getProductAdoptionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_product_adoption_policies`,{params:{filter:t}})}getReturnPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_return_policies`,{params:{filter:t}})}getHazardousMaterialsLabels(e){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_hazardous_materials_labels`)}}Metadata.id="Metadata";class Recommendation extends Restful{get basePath(){return"/sell/recommendation/v1"}findListingRecommendations({filter:e,limit:t,offset:r}={},n){return this.post("/find",{data:n,params:{filter:e,limit:t,offset:r}})}}Recommendation.id="Recommendation";class Feed extends Restful{get basePath(){return"/sell/feed/v1"}getOrderTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/order_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createOrderTask(e){return this.post("/order_task",e)}getOrderTask(e){return e=encodeURIComponent(e),this.get(`/order_task/${e}`)}getInventoryTasks({feedType:e,scheduleId:t,lookBackDays:r,dateRange:n,limit:o,offset:i}={}){return this.get("/inventory_task",{params:{feed_type:e,schedule_id:t,look_back_days:r,date_range:n,limit:o,offset:i}})}createInventoryTask(e){return this.post("/inventory_task",e)}getInventoryTask(e){return e=encodeURIComponent(e),this.get(`/inventory_task/${e}`)}getSchedules({feedType:e,limit:t,offset:r}={}){return this.get("/schedule",{params:{feed_type:e,limit:t,offset:r}})}createSchedule(e){return this.post("/schedule",e)}getSchedule(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}`)}updateSchedule(e,t){return e=encodeURIComponent(e),this.put(`/schedule/${e}`,t)}deleteSchedule(e){return e=encodeURIComponent(e),this.delete(`/schedule/${e}`)}getLatestResultFile(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}/download_result_file`,{responseType:"arraybuffer",responseEncoding:"binary"})}getScheduleTemplate(e){return e=encodeURIComponent(e),this.get(`/schedule_template/${e}`)}getScheduleTemplates({feedType:e,limit:t,offset:r}={}){return this.get("/schedule_template",{params:{feed_type:e,limit:t,offset:r}})}getTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createTask(e){return this.post("/task",e)}getInputFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_input_file`)}getResultFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_result_file`,{responseType:"arraybuffer",responseEncoding:"binary"})}getTask(e){return e=encodeURIComponent(e),this.get(`/task/${e}`)}uploadFile(e,t){return e=encodeURIComponent(e),this.post(`/task/${e}/upload_file`,t,{headers:lo})}getCustomerServiceMetricTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o}={}){return this.get("/customer_service_metric_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o}})}createCustomerServiceMetricTask(e,t){return this.post("/customer_service_metric_task",t,{headers:{"accept-language":e}})}getCustomerServiceMetricTask(e){return e=encodeURIComponent(e),this.get(`/customer_service_metric_task/${e}`)}}Feed.id="Feed";class Logistics extends Restful{get basePath(){return"/sell/logistics/v1_beta"}createShippingQuote(e){return this.post("/shipping_quote",e)}getShippingQuote(e){return e=encodeURIComponent(e),this.get(`/shipping_quote/${e}`)}createFromShippingQuote(e){return this.post("/shipment/create_from_shipping_quote",e)}getShipment(e){return this.get(`/shipment/${e}`)}downloadLabelFile(e){return this.get(`/shipment/${e}/download_label_file`)}cancelShipment(e){return this.post(`/shipment/${e}/cancel`)}}Logistics.id="Logistics";class Negotiation extends Restful{get basePath(){return"/sell/negotiation/v1"}findEligibleItems({limit:e,offset:t}={}){return this.get("/find_eligible_items",{params:{limit:e,offset:t}})}sendOfferToInterestedBuyers(e){return this.post("/send_offer_to_interested_buyers",e)}}Negotiation.id="Negotiation";class Listing extends Restful{get basePath(){return"/sell/listing/v1_beta"}createItemDraft(e){return this.post("/item_draft/",e)}}var $o,Ho;Listing.id="Listing",function(e){e.AskSellerQuestion="AskSellerQuestion",e.BestOffer="BestOffer",e.BestOfferDeclined="BestOfferDeclined",e.BestOfferPlaced="BestOfferPlaced",e.BidPlaced="BidPlaced",e.BidReceived="BidReceived",e.CounterOfferReceived="CounterOfferReceived",e.CustomCode="CustomCode",e.EndOfAuction="EndOfAuction",e.FeedbackLeft="FeedbackLeft",e.FeedbackReceived="FeedbackReceived",e.FeedbackStarChanged="FeedbackStarChanged",e.FixedPriceEndOfTransaction="FixedPriceEndOfTransaction",e.FixedPriceTransaction="FixedPriceTransaction",e.ItemAddedToWatchList="ItemAddedToWatchList",e.ItemEnded="ItemEnded",e.ItemListed="ItemListed",e.ItemLost="ItemLost",e.ItemMarkedPaid="ItemMarkedPaid",e.ItemMarkedShipped="ItemMarkedShipped",e.ItemRemovedFromWatchList="ItemRemovedFromWatchList",e.ItemSold="ItemSold",e.ItemUnsold="ItemUnsold",e.ItemWon="ItemWon",e.OutBid="OutBid",e.PriceChange="PriceChange",e.SecondChanceOffer="SecondChanceOffer",e.WatchedItemEndingSoon="WatchedItemEndingSoon"}($o||($o={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(Ho||(Ho={}));var jo,Vo=Ho;!function(e){e[e.findCompletedItems=0]="findCompletedItems",e[e.findItemsAdvanced=1]="findItemsAdvanced",e[e.findItemsByCategory=2]="findItemsByCategory",e[e.findItemsByKeywords=3]="findItemsByKeywords",e[e.findItemsByProduct=4]="findItemsByProduct",e[e.findItemsIneBayStores=5]="findItemsIneBayStores",e[e.getHistograms=6]="getHistograms",e[e.getSearchKeywordsRecommendation=7]="getSearchKeywordsRecommendation",e[e.getVersion=8]="getVersion"}(jo||(jo={}));var Ko,Wo=jo;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(Ko||(Ko={}));var qo,Xo=Ko;!function(e){e[e.FindProducts=0]="FindProducts",e[e.GetCategoryInfo=1]="GetCategoryInfo",e[e.GeteBayTime=2]="GeteBayTime",e[e.GetItemStatus=3]="GetItemStatus",e[e.GetMultipleItems=4]="GetMultipleItems",e[e.GetShippingCosts=5]="GetShippingCosts",e[e.GetSingleItem=6]="GetSingleItem",e[e.GetUserProfile=7]="GetUserProfile"}(qo||(qo={}));var zo,Jo=qo;!function(e){e[e.AddDispute=0]="AddDispute",e[e.AddDisputeResponse=1]="AddDisputeResponse",e[e.AddFixedPriceItem=2]="AddFixedPriceItem",e[e.AddItem=3]="AddItem",e[e.AddItemFromSellingManagerTemplate=4]="AddItemFromSellingManagerTemplate",e[e.AddItems=5]="AddItems",e[e.AddMemberMessageAAQToPartner=6]="AddMemberMessageAAQToPartner",e[e.AddMemberMessageRTQ=7]="AddMemberMessageRTQ",e[e.AddMemberMessagesAAQToBidder=8]="AddMemberMessagesAAQToBidder",e[e.AddOrder=9]="AddOrder",e[e.AddSecondChanceItem=10]="AddSecondChanceItem",e[e.AddSellingManagerInventoryFolder=11]="AddSellingManagerInventoryFolder",e[e.AddSellingManagerProduct=12]="AddSellingManagerProduct",e[e.AddSellingManagerTemplate=13]="AddSellingManagerTemplate",e[e.AddToItemDescription=14]="AddToItemDescription",e[e.AddToWatchList=15]="AddToWatchList",e[e.AddTransactionConfirmationItem=16]="AddTransactionConfirmationItem",e[e.CompleteSale=17]="CompleteSale",e[e.ConfirmIdentity=18]="ConfirmIdentity",e[e.DeleteMyMessages=19]="DeleteMyMessages",e[e.DeleteSellingManagerInventoryFolder=20]="DeleteSellingManagerInventoryFolder",e[e.DeleteSellingManagerItemAutomationRule=21]="DeleteSellingManagerItemAutomationRule",e[e.DeleteSellingManagerProduct=22]="DeleteSellingManagerProduct",e[e.DeleteSellingManagerTemplate=23]="DeleteSellingManagerTemplate",e[e.DeleteSellingManagerTemplateAutomationRule=24]="DeleteSellingManagerTemplateAutomationRule",e[e.DisableUnpaidItemAssistance=25]="DisableUnpaidItemAssistance",e[e.EndFixedPriceItem=26]="EndFixedPriceItem",e[e.EndItem=27]="EndItem",e[e.EndItems=28]="EndItems",e[e.ExtendSiteHostedPictures=29]="ExtendSiteHostedPictures",e[e.FetchToken=30]="FetchToken",e[e.GetAccount=31]="GetAccount",e[e.GetAdFormatLeads=32]="GetAdFormatLeads",e[e.GetAllBidders=33]="GetAllBidders",e[e.GetApiAccessRules=34]="GetApiAccessRules",e[e.GetBestOffers=35]="GetBestOffers",e[e.GetBidderList=36]="GetBidderList",e[e.GetCategories=37]="GetCategories",e[e.GetCategoryFeatures=38]="GetCategoryFeatures",e[e.GetCategoryMappings=39]="GetCategoryMappings",e[e.GetCategorySpecifics=40]="GetCategorySpecifics",e[e.GetChallengeToken=41]="GetChallengeToken",e[e.GetCharities=42]="GetCharities",e[e.GetClientAlertsAuthToken=43]="GetClientAlertsAuthToken",e[e.GetContextualKeywords=44]="GetContextualKeywords",e[e.GetDescriptionTemplates=45]="GetDescriptionTemplates",e[e.GetDispute=46]="GetDispute",e[e.GeteBayDetails=47]="GeteBayDetails",e[e.GeteBayOfficialTime=48]="GeteBayOfficialTime",e[e.GetFeedback=49]="GetFeedback",e[e.GetItem=50]="GetItem",e[e.GetItemsAwaitingFeedback=51]="GetItemsAwaitingFeedback",e[e.GetItemShipping=52]="GetItemShipping",e[e.GetItemTransactions=53]="GetItemTransactions",e[e.GetMemberMessages=54]="GetMemberMessages",e[e.GetMessagePreferences=55]="GetMessagePreferences",e[e.GetMyeBayBuying=56]="GetMyeBayBuying",e[e.GetMyeBayReminders=57]="GetMyeBayReminders",e[e.GetMyeBaySelling=58]="GetMyeBaySelling",e[e.GetMyMessages=59]="GetMyMessages",e[e.GetNotificationPreferences=60]="GetNotificationPreferences",e[e.GetNotificationsUsage=61]="GetNotificationsUsage",e[e.GetOrders=62]="GetOrders",e[e.GetOrderTransactions=63]="GetOrderTransactions",e[e.GetPromotionalSaleDetails=64]="GetPromotionalSaleDetails",e[e.GetSellerDashboard=65]="GetSellerDashboard",e[e.GetSellerEvents=66]="GetSellerEvents",e[e.GetSellerList=67]="GetSellerList",e[e.GetSellerTransactions=68]="GetSellerTransactions",e[e.GetSellingManagerAlerts=69]="GetSellingManagerAlerts",e[e.GetSellingManagerEmailLog=70]="GetSellingManagerEmailLog",e[e.GetSellingManagerInventory=71]="GetSellingManagerInventory",e[e.GetSellingManagerInventoryFolder=72]="GetSellingManagerInventoryFolder",e[e.GetSellingManagerItemAutomationRule=73]="GetSellingManagerItemAutomationRule",e[e.GetSellingManagerSaleRecord=74]="GetSellingManagerSaleRecord",e[e.GetSellingManagerSoldListings=75]="GetSellingManagerSoldListings",e[e.GetSellingManagerTemplateAutomationRule=76]="GetSellingManagerTemplateAutomationRule",e[e.GetSellingManagerTemplates=77]="GetSellingManagerTemplates",e[e.GetSessionID=78]="GetSessionID",e[e.GetShippingDiscountProfiles=79]="GetShippingDiscountProfiles",e[e.GetStore=80]="GetStore",e[e.GetStoreCategoryUpdateStatus=81]="GetStoreCategoryUpdateStatus",e[e.GetStoreCustomPage=82]="GetStoreCustomPage",e[e.GetStoreOptions=83]="GetStoreOptions",e[e.GetStorePreferences=84]="GetStorePreferences",e[e.GetSuggestedCategories=85]="GetSuggestedCategories",e[e.GetTaxTable=86]="GetTaxTable",e[e.GetTokenStatus=87]="GetTokenStatus",e[e.GetUser=88]="GetUser",e[e.GetUserContactDetails=89]="GetUserContactDetails",e[e.GetUserDisputes=90]="GetUserDisputes",e[e.GetUserPreferences=91]="GetUserPreferences",e[e.GetVeROReasonCodeDetails=92]="GetVeROReasonCodeDetails",e[e.GetVeROReportStatus=93]="GetVeROReportStatus",e[e.LeaveFeedback=94]="LeaveFeedback",e[e.MoveSellingManagerInventoryFolder=95]="MoveSellingManagerInventoryFolder",e[e.PlaceOffer=96]="PlaceOffer",e[e.RelistFixedPriceItem=97]="RelistFixedPriceItem",e[e.RelistItem=98]="RelistItem",e[e.RemoveFromWatchList=99]="RemoveFromWatchList",e[e.RespondToBestOffer=100]="RespondToBestOffer",e[e.RespondToFeedback=101]="RespondToFeedback",e[e.ReviseCheckoutStatus=102]="ReviseCheckoutStatus",e[e.ReviseFixedPriceItem=103]="ReviseFixedPriceItem",e[e.ReviseInventoryStatus=104]="ReviseInventoryStatus",e[e.ReviseItem=105]="ReviseItem",e[e.ReviseMyMessages=106]="ReviseMyMessages",e[e.ReviseMyMessagesFolders=107]="ReviseMyMessagesFolders",e[e.ReviseSellingManagerInventoryFolder=108]="ReviseSellingManagerInventoryFolder",e[e.ReviseSellingManagerProduct=109]="ReviseSellingManagerProduct",e[e.ReviseSellingManagerSaleRecord=110]="ReviseSellingManagerSaleRecord",e[e.ReviseSellingManagerTemplate=111]="ReviseSellingManagerTemplate",e[e.RevokeToken=112]="RevokeToken",e[e.SaveItemToSellingManagerTemplate=113]="SaveItemToSellingManagerTemplate",e[e.SellerReverseDispute=114]="SellerReverseDispute",e[e.SendInvoice=115]="SendInvoice",e[e.SetMessagePreferences=116]="SetMessagePreferences",e[e.SetNotificationPreferences=117]="SetNotificationPreferences",e[e.SetPromotionalSale=118]="SetPromotionalSale",e[e.SetPromotionalSaleListings=119]="SetPromotionalSaleListings",e[e.SetSellingManagerFeedbackOptions=120]="SetSellingManagerFeedbackOptions",e[e.SetSellingManagerItemAutomationRule=121]="SetSellingManagerItemAutomationRule",e[e.SetSellingManagerTemplateAutomationRule=122]="SetSellingManagerTemplateAutomationRule",e[e.SetShippingDiscountProfiles=123]="SetShippingDiscountProfiles",e[e.SetStore=124]="SetStore",e[e.SetStoreCategories=125]="SetStoreCategories",e[e.SetStoreCustomPage=126]="SetStoreCustomPage",e[e.SetStorePreferences=127]="SetStorePreferences",e[e.SetTaxTable=128]="SetTaxTable",e[e.SetUserNotes=129]="SetUserNotes",e[e.SetUserPreferences=130]="SetUserPreferences",e[e.UploadSiteHostedPictures=131]="UploadSiteHostedPictures",e[e.ValidateChallengeInput=132]="ValidateChallengeInput",e[e.ValidateTestUserRegistration=133]="ValidateTestUserRegistration",e[e.VerifyAddFixedPriceItem=134]="VerifyAddFixedPriceItem",e[e.VerifyAddItem=135]="VerifyAddItem",e[e.VerifyAddSecondChanceItem=136]="VerifyAddSecondChanceItem",e[e.VerifyRelistItem=137]="VerifyRelistItem",e[e.VeROReportItems=138]="VeROReportItems"}(zo||(zo={}));var Qo,Zo,ei,ti,ri,ni,oi,ii,si,ai,ci,ui,li,pi,di,Ei,fi,hi,gi,_i,mi,yi,Ri,Ai,Ii,Ti,Si,Ci,Ni,Oi,bi,Pi,Ui,Di,Li,vi,Bi,Mi,Fi,wi,xi,ki,Gi,Yi,$i,Hi=zo;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...Lo,...n};try{return await this.request(o,t,e,r)}catch(n){if(this.shouldRefreshToken(n))return await this.request(o,t,e,r,!0);throw n}}}createTradingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for trading API.");return this.createTraditionalXMLApi({endpoint:{production:"api.ebay.com",sandbox:"api.sandbox.ebay.com"},path:"/ws/api.dll",calls:Hi,xmlns:"urn:ebay:apis:eBLBaseComponents",headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967,...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createShoppingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for shopping API.");return this.createTraditionalXMLApi({endpoint:{production:"open.api.ebay.com",sandbox:"open.api.sandbox.ebay.com"},path:"/shopping",xmlns:"urn:ebay:apis:eBLBaseComponents",calls:Jo,headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-SITE-ID":this.config.siteId,"X-EBAY-API-VERSION":863,"X-EBAY-API-REQUEST-ENCODING":"xml",...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createFindingApi(){return this.createTraditionalXMLApi({endpoint:{production:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/services/search/FindingService/v1",xmlns:"http://www.ebay.com/marketplace/search/v1/services",calls:Wo,headers:e=>({"X-EBAY-SOA-SECURITY-APPNAME":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createClientAlertsApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for client alerts API.");const e={endpoint:{production:"clientalerts.ebay.com",sandbox:"clientalerts.sandbox.ebay.com"},path:"/ws/ecasvc/ClientAlerts",calls:Vo},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>ao.stringify(e,{allowDots:!0}).replace(/%5B/gi,"(").replace(/%5D/gi,")"),r={appid:this.config.appId,siteid:this.config.siteId,version:643},n={};return Object.keys(e.calls).forEach((e=>{n[e]=async n=>this.req.get(t,{paramsSerializer:{serialize:paramsSerializer},params:{...r,...n,callname:e}})})),n}createMerchandisingApi(){return this.createTraditionalXMLApi({endpoint:{production:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/MerchandisingService",xmlns:"http://www.ebay.com/marketplace/services",calls:Xo,headers:e=>({"EBAY-SOA-CONSUMER-ID":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createBusinessPolicyManagementApi(){throw new Error("Important! This API is deprecated and will be decommissioned on January 31, 2022. We recommend that you migrate to the fulfillment_policy, payment_policy, and return_policy resources of the Account API to set up and manage all of your fulfillment, payment, and return business policies.")}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayIAFTokenExpired.name||e.name===EBayIAFTokenInvalid.name||e.name===EBayAuthTokenIsHardExpired.name||e.name===EBayAuthTokenIsInvalid.name)}async request(e,t,r,n,o=!1){try{o&&await this.auth.OAuth2.refreshToken();const i=await this.getConfig(t,r,e),s=new XMLRequest(r,n,i,this.req);return await s.request()}catch(e){handleEBayError(e)}}async getConfig(e,t,r){const n=this.auth.authNAuth.eBayAuthToken,o=!n&&r.useIaf?await this.auth.OAuth2.getAccessToken():null,i=!n&&o,s=this.config.sandbox?e.endpoint.sandbox:e.endpoint.production;return{...r,xmlns:e.xmlns,endpoint:`https://${s}${e.path}`,headers:{...e.headers(t,i?o:null),...r.headers},digitalSignatureHeaders:t=>r.sign?this.getDigitalSignatureHeaders({method:"POST",authority:s,path:e.path},t):{},...i?{}:{eBayAuthToken:n}}}createTraditionalXMLApi(e){const t={};return Object.keys(e.calls).forEach((r=>{t[r]=this.createXMLRequest(r,e)})),t}}class ApiFactory extends Api{constructor(){super(...arguments),this._restful={}}createBuyApi(){return{browse:this.createRestfulApi(Browse),feed:this.createRestfulApi(ko),marketing:this.createRestfulApi(Go),offer:this.createRestfulApi(Offer),order:this.createRestfulApi(Order),deal:this.createRestfulApi(Deal),marketplaceInsights:this.createRestfulApi(MarketplaceInsights)}}createCommerceApi(){return{catalog:this.createRestfulApi(Catalog),charity:this.createRestfulApi(Charity),identity:this.createRestfulApi(Identity),notification:this.createRestfulApi(Notification),media:this.createRestfulApi(Media),translation:this.createRestfulApi(Translation),taxonomy:this.createRestfulApi(Taxonomy),message:this.createRestfulApi(Message)}}createDeveloperApi(){return{analytics:this.createRestfulApi(Yo),keyManagement:this.createRestfulApi(KeyManagement)}}createPostOrderApi(){return{cancellation:this.createRestfulApi(Cancellation),case:this.createRestfulApi(Case),inquiry:this.createRestfulApi(Inquiry),return:this.createRestfulApi(Return)}}createSellApi(){return{account:this.createRestfulApi(AccountV1),accountV2:this.createRestfulApi(AccountV2),analytics:this.createRestfulApi(Analytics),compliance:this.createRestfulApi(Compliance),fulfillment:this.createRestfulApi(Fulfillment),inventory:this.createRestfulApi(Inventory),marketing:this.createRestfulApi(Marketing),metadata:this.createRestfulApi(Metadata),recommendation:this.createRestfulApi(Recommendation),finances:this.createRestfulApi(Finances),feed:this.createRestfulApi(Feed),logistics:this.createRestfulApi(Logistics),negotiation:this.createRestfulApi(Negotiation),listing:this.createRestfulApi(Listing)}}get traditional(){return this._traditional?this._traditional:this._traditional=new Traditional(this.config,this.req,this.auth)}createTradingApi(){return this.traditional.createTradingApi()}createShoppingApi(){return this.traditional.createShoppingApi()}createFindingApi(){return this.traditional.createFindingApi()}createClientAlertsApi(){return this.traditional.createClientAlertsApi()}createMerchandisingApi(){return this.traditional.createMerchandisingApi()}createRestfulApi(e){const t=e.id;return this._restful[t]||(this._restful[t]=new e(this.config,this.req,this.auth))}}!function(e){e[e.EBAY_US=0]="EBAY_US",e[e.EBAY_ENCA=2]="EBAY_ENCA",e[e.EBAY_GB=3]="EBAY_GB",e[e.EBAY_AU=15]="EBAY_AU",e[e.EBAY_AT=16]="EBAY_AT",e[e.EBAY_FRBE=23]="EBAY_FRBE",e[e.EBAY_FR=71]="EBAY_FR",e[e.EBAY_DE=77]="EBAY_DE",e[e.EBAY_MOTOR=100]="EBAY_MOTOR",e[e.EBAY_IT=101]="EBAY_IT",e[e.EBAY_NLBE=123]="EBAY_NLBE",e[e.EBAY_NL=146]="EBAY_NL",e[e.EBAY_ES=186]="EBAY_ES",e[e.EBAY_CH=193]="EBAY_CH",e[e.EBAY_HK=201]="EBAY_HK",e[e.EBAY_IN=203]="EBAY_IN",e[e.EBAY_IE=205]="EBAY_IE",e[e.EBAY_MY=207]="EBAY_MY",e[e.EBAY_FRCA=210]="EBAY_FRCA",e[e.EBAY_PH=211]="EBAY_PH",e[e.EBAY_PL=212]="EBAY_PL",e[e.EBAY_SG=216]="EBAY_SG"}(Qo||(Qo={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_AT="EBAY_AT",e.EBAY_AU="EBAY_AU",e.EBAY_BE="EBAY_BE",e.EBAY_CA="EBAY_CA",e.EBAY_CH="EBAY_CH",e.EBAY_DE="EBAY_DE",e.EBAY_ES="EBAY_ES",e.EBAY_FR="EBAY_FR",e.EBAY_GB="EBAY_GB",e.EBAY_HK="EBAY_HK",e.EBAY_IE="EBAY_IE",e.EBAY_IN="EBAY_IN",e.EBAY_IT="EBAY_IT",e.EBAY_MY="EBAY_MY",e.EBAY_NL="EBAY_NL",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_SG="EBAY_SG",e.EBAY_TH="EBAY_TH",e.EBAY_TW="EBAY_TW",e.EBAY_VN="EBAY_VN",e.EBAY_MOTORS_US="EBAY_MOTORS_US"}(Zo||(Zo={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(ei||(ei={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(ti||(ti={})),function(e){e.CLOSED="CLOSED",e.CS_CLOSED="CS_CLOSED",e.ON_HOLD="ON_HOLD",e.OPEN="OPEN",e.OTHER="OTHER",e.REFUND_AGREED_BUT_FAILED="REFUND_AGREED_BUT_FAILED",e.WAITING_CS="WAITING_CS",e.WAITING_DELIVERY="WAITING_DELIVERY"}(ri||(ri={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(ni||(ni={})),function(e){e.CLOSED="CLOSED",e.CLOSED_WITH_ESCALATION="CLOSED_WITH_ESCALATION",e.CS_CLOSED="CS_CLOSED",e.OPEN="OPEN",e.OTHER="OTHER",e.PENDING="PENDING",e.WAITING_BUYER_RESPONSE="WAITING_BUYER_RESPONSE",e.WAITING_SELLER_RESPONSE="WAITING_SELLER_RESPONSE"}(oi||(oi={})),function(e){e.AUSTRALIA_POST="AUSTRALIA_POST",e.BARTOLINI="BARTOLINI",e.CANADA_POST="CANADA_POST",e.COLISSIMO="COLISSIMO",e.COLLECT_PLUS="COLLECT_PLUS",e.CORREOS="CORREOS",e.DEUTSCHE_POST="DEUTSCHE_POST",e.DHL="DHL",e.FEDEX="FEDEX",e.HERMES="HERMES",e.LA_POSTE="LA_POSTE",e.MONDIAL_RELAY="MONDIAL_RELAY",e.MRW="MRW",e.NEXIVE="NEXIVE",e.OTHER="OTHER",e.PARCEL_FORCE="PARCEL_FORCE",e.POSTE="POSTE",e.ROYAL_MAIL="ROYAL_MAIL",e.SEUR="SEUR",e.UNKNOWN="UNKNOWN",e.UPS="UPS",e.USPS="USPS"}(ii||(ii={})),function(e){e.ARRIVED_DAMAGED="ARRIVED_DAMAGED",e.ARRIVED_LATE="ARRIVED_LATE",e.BUYER_CANCEL_ORDER="BUYER_CANCEL_ORDER",e.BUYER_NO_SHOW="BUYER_NO_SHOW",e.BUYER_NOT_SCHEDULED="BUYER_NOT_SCHEDULED",e.BUYER_REFUSED_TO_PICKUP="BUYER_REFUSED_TO_PICKUP",e.DEFECTIVE_ITEM="DEFECTIVE_ITEM",e.DIFFERENT_FROM_LISTING="DIFFERENT_FROM_LISTING",e.EXPIRED_ITEM="EXPIRED_ITEM",e.FAKE_OR_COUNTERFEIT="FAKE_OR_COUNTERFEIT",e.FOUND_BETTER_PRICE="FOUND_BETTER_PRICE",e.IN_STORE_RETURN="IN_STORE_RETURN",e.MISSING_PARTS="MISSING_PARTS",e.NO_LONGER_NEED_ITEM="NO_LONGER_NEED_ITEM",e.NO_REASON="NO_REASON",e.NOT_AS_DESCRIBED="NOT_AS_DESCRIBED",e.ORDERED_ACCIDENTALLY="ORDERED_ACCIDENTALLY",e.ORDERED_DIFFERENT_ITEM="ORDERED_DIFFERENT_ITEM",e.ORDERED_WRONG_ITEM="ORDERED_WRONG_ITEM",e.OTHER="OTHER",e.OUT_OF_STOCK="OUT_OF_STOCK",e.RETURNING_GIFT="RETURNING_GIFT",e.VALET_DELIVERY_ISSUES="VALET_DELIVERY_ISSUES",e.VALET_UNAVAILABLE="VALET_UNAVAILABLE",e.WRONG_SIZE="WRONG_SIZE"}(si||(si={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(ai||(ai={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(ci||(ci={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(ui||(ui={})),function(e){e.BUYER_NORESPONSE="BUYER_NORESPONSE",e.BUYER_RETURNED_WRONG_ITEM="BUYER_RETURNED_WRONG_ITEM",e.DISAGREE_WITH_RETURN_REASON="DISAGREE_WITH_RETURN_REASON",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.ITEM_RECEIVED_IN_DIFFERENT_CONDITION="ITEM_RECEIVED_IN_DIFFERENT_CONDITION",e.NEW_ITEM_NOT_RECEIVED="NEW_ITEM_NOT_RECEIVED",e.NO_REFUND_FOR_RETURN_SHIPPING="NO_REFUND_FOR_RETURN_SHIPPING",e.NO_REFUND_RECEIVED="NO_REFUND_RECEIVED",e.OTHER="OTHER",e.RECEIVED_WRONG_ITEM="RECEIVED_WRONG_ITEM",e.SELLER_NO_RESPONSE="SELLER_NO_RESPONSE",e.TROUBLE_COMMUNICATION_WITH_BUYER="TROUBLE_COMMUNICATION_WITH_BUYER",e.TROUBLE_COMMUNICATION_WITH_SELLER="TROUBLE_COMMUNICATION_WITH_SELLER"}(li||(li={})),function(e){e.ACCEPT_PARTIAL_REFUND="ACCEPT_PARTIAL_REFUND",e.ACCEPT_REPLACEMENT_OFFER="ACCEPT_REPLACEMENT_OFFER",e.APPROVE="APPROVE",e.APPROVE_WITHOUT_EBAY_LABEL="APPROVE_WITHOUT_EBAY_LABEL",e.DECLINE="DECLINE",e.DECLINE_PARTIAL_REFUND="DECLINE_PARTIAL_REFUND",e.DECLINE_REPLACEMENT_OFFER="DECLINE_REPLACEMENT_OFFER",e.OFFER_PARTIAL_REFUND="OFFER_PARTIAL_REFUND",e.OFFER_REPLACEMENT="OFFER_REPLACEMENT",e.OFFER_RETURN="OFFER_RETURN",e.OFFER_RETURN_WITHOUT_LABEL="OFFER_RETURN_WITHOUT_LABEL",e.PROVIDE_RMA="PROVIDE_RMA",e.UNKNOWN="UNKNOWN"}(pi||(pi={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(di||(di={})),function(e){e.ALL_OPEN="ALL_OPEN",e.ALL_OPEN_REPLACEMENT="ALL_OPEN_REPLACEMENT",e.ALL_OPEN_RETURN="ALL_OPEN_RETURN",e.CLOSED="CLOSED",e.EBAY_PLUS="EBAY_PLUS",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_SHIPPED="ITEM_SHIPPED",e.RETURN_STARTED="RETURN_STARTED",e.SELLER_ACTION_DUE="SELLER_ACTION_DUE",e.SELLER_ACTION_OVERDUE="SELLER_ACTION_OVERDUE",e.SELLER_NO_ACTION="SELLER_NO_ACTION",e.UNKNOWN="UNKNOWN"}(Ei||(Ei={})),function(e){e.AUTO_REFUND_INITIATED="AUTO_REFUND_INITIATED",e.CLOSED="CLOSED",e.INITIAL="INITIAL",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_KEPT="ITEM_KEPT",e.ITEM_READY_TO_SHIP="ITEM_READY_TO_SHIP",e.ITEM_SHIPPED="ITEM_SHIPPED",e.LESS_THAN_A_FULL_REFUND_ISSUED="LESS_THAN_A_FULL_REFUND_ISSUED",e.PARTIAL_REFUND_AS_PAYOUT_INITIATED="PARTIAL_REFUND_AS_PAYOUT_INITIATED",e.PARTIAL_REFUND_DECLINED="PARTIAL_REFUND_DECLINED",e.PARTIAL_REFUND_FAILED="PARTIAL_REFUND_FAILED",e.PARTIAL_REFUND_INITIATED="PARTIAL_REFUND_INITIATED",e.PARTIAL_REFUND_NON_PAYPAL_INITIATED="PARTIAL_REFUND_NON_PAYPAL_INITIATED",e.PARTIAL_REFUND_REQUESTED="PARTIAL_REFUND_REQUESTED",e.PARTIAL_REFUNDED="PARTIAL_REFUNDED",e.PAYOUT_INITIATED="PAYOUT_INITIATED",e.REFUND_AS_PAYOUT_INITIATED="REFUND_AS_PAYOUT_INITIATED",e.REFUND_FAILED="REFUND_FAILED",e.REFUND_INITIATED="REFUND_INITIATED",e.REFUND_SENT_PENDING_CONFIRMATION="REFUND_SENT_PENDING_CONFIRMATION",e.REFUND_TIMEOUT="REFUND_TIMEOUT",e.REPLACED="REPLACED",e.REPLACEMENT_CLOSED="REPLACEMENT_CLOSED",e.REPLACEMENT_DELIVERED="REPLACEMENT_DELIVERED",e.REPLACEMENT_LABEL_PENDING="REPLACEMENT_LABEL_PENDING",e.REPLACEMENT_LABEL_PENDING_TIMEOUT="REPLACEMENT_LABEL_PENDING_TIMEOUT",e.REPLACEMENT_LABEL_REQUESTED="REPLACEMENT_LABEL_REQUESTED",e.REPLACEMENT_LABEL_REQUESTED_TIMEOUT="REPLACEMENT_LABEL_REQUESTED_TIMEOUT",e.REPLACEMENT_OFFER_PENDING="REPLACEMENT_OFFER_PENDING",e.REPLACEMENT_REQUEST_TIMEOUT="REPLACEMENT_REQUEST_TIMEOUT",e.REPLACEMENT_REQUESTED="REPLACEMENT_REQUESTED",e.REPLACEMENT_RMA_PENDING="REPLACEMENT_RMA_PENDING",e.REPLACEMENT_SHIPPED="REPLACEMENT_SHIPPED",e.REPLACEMENT_STARTED="REPLACEMENT_STARTED",e.RETURN_LABEL_PENDING="RETURN_LABEL_PENDING",e.RETURN_LABEL_PENDING_TIMEOUT="RETURN_LABEL_PENDING_TIMEOUT",e.RETURN_LABEL_REQUESTED="RETURN_LABEL_REQUESTED",e.RETURN_LABEL_REQUESTED_TIMEOUT="RETURN_LABEL_REQUESTED_TIMEOUT",e.RETURN_REJECTED="RETURN_REJECTED",e.RETURN_REQUEST_TIMEOUT="RETURN_REQUEST_TIMEOUT",e.RETURN_REQUESTED="RETURN_REQUESTED",e.RMA_PENDING="RMA_PENDING",e.UNKNOWN="UNKNOWN"}(fi||(fi={})),function(e){e.ITEM_RELATED="ITEM_RELATED",e.LABEL_RELATED="LABEL_RELATED",e.REFUND_RELATED="REFUND_RELATED",e.UNKNOWN="UNKNOWN"}(hi||(hi={})),function(e){e.DOMESTIC_SHIPPING="DOMESTIC_SHIPPING",e.IMPORT_CHARGE="IMPORT_CHARGE",e.INTERNATIONAL_SHIPPING="INTERNATIONAL_SHIPPING",e.ITEM_IMPORT_TAX="ITEM_IMPORT_TAX",e.ITEM_TAX="ITEM_TAX",e.ORDER_ADJUSTMENT="ORDER_ADJUSTMENT",e.ORIGINAL_SHIPPING="ORIGINAL_SHIPPING",e.OTHER="OTHER",e.PURCHASE_PRICE="PURCHASE_PRICE",e.REFUND_FROM_PAYPAL="REFUND_FROM_PAYPAL",e.RETURN_SHIPPING="RETURN_SHIPPING",e.SHIPPING_IMPORT_TAX="SHIPPING_IMPORT_TAX",e.SHIPPING_TAX="SHIPPING_TAX"}(gi||(gi={})),function(e){e.AUTO_APPROVE_REMORSE="AUTO_APPROVE_REMORSE",e.BUYER_ACCEPT_REPLACEMENT_OFFER="BUYER_ACCEPT_REPLACEMENT_OFFER",e.BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND="BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND",e.BUYER_ACCEPTS_PARTIAL_REFUND="BUYER_ACCEPTS_PARTIAL_REFUND",e.BUYER_CLOSE_RETURN="BUYER_CLOSE_RETURN",e.BUYER_CREATE_RETURN="BUYER_CREATE_RETURN",e.BUYER_DECLINE_PARTIAL_REFUND="BUYER_DECLINE_PARTIAL_REFUND",e.BUYER_DECLINE_REPLACEMENT_OFFER="BUYER_DECLINE_REPLACEMENT_OFFER",e.BUYER_ESCALATE="BUYER_ESCALATE",e.BUYER_MARK_AS_RECEIVED="BUYER_MARK_AS_RECEIVED",e.BUYER_MARK_REFUND_RECEIVED="BUYER_MARK_REFUND_RECEIVED",e.BUYER_MARK_RETURN_SHIPPED="BUYER_MARK_RETURN_SHIPPED",e.BUYER_PRINT_SHIPPING_LABEL="BUYER_PRINT_SHIPPING_LABEL",e.BUYER_PROVIDE_LABEL="BUYER_PROVIDE_LABEL",e.BUYER_PROVIDE_TRACKING_INFO="BUYER_PROVIDE_TRACKING_INFO",e.BUYER_SEND_MESSAGE="BUYER_SEND_MESSAGE",e.BUYER_UPDATE_TRACKING="BUYER_UPDATE_TRACKING",e.BUYER_VOID_LABEL="BUYER_VOID_LABEL",e.CHARGEBACK_OPEN="CHARGEBACK_OPEN",e.DELETE_FILE="DELETE_FILE",e.EMAIL_SHIPPING_LABEL="EMAIL_SHIPPING_LABEL",e.EXTERNAL_CLAIM_OPENED="EXTERNAL_CLAIM_OPENED",e.GENERAL_TIME_OUT="GENERAL_TIME_OUT",e.NOTIFIED_DELIVERED="NOTIFIED_DELIVERED",e.NOTIFIED_SHIPPED="NOTIFIED_SHIPPED",e.NOTIFY_REPLACEMENT_DELIVERED="NOTIFY_REPLACEMENT_DELIVERED",e.NOTIFY_REPLACEMENT_SHIPPED="NOTIFY_REPLACEMENT_SHIPPED",e.NOTIFY_UPDATE_REFUND_STATUS="NOTIFY_UPDATE_REFUND_STATUS",e.OTHER="OTHER",e.REMINDER_BUYER_TO_RESPOND_RE_OFFER="REMINDER_BUYER_TO_RESPOND_RE_OFFER",e.REMINDER_BUYER_TO_SHIP="REMINDER_BUYER_TO_SHIP",e.REMINDER_FOR_REFUND="REMINDER_FOR_REFUND",e.REMINDER_FOR_REFUND_NO_SHIPPING="REMINDER_FOR_REFUND_NO_SHIPPING",e.REMINDER_FOR_RMA="REMINDER_FOR_RMA",e.REMINDER_FOR_SHIPPING="REMINDER_FOR_SHIPPING",e.REMINDER_SELLER_TO_RESPOND="REMINDER_SELLER_TO_RESPOND",e.REMINDER_SELLER_TO_SHIP="REMINDER_SELLER_TO_SHIP",e.SELLER_APPROVE_REQUEST="SELLER_APPROVE_REQUEST",e.SELLER_DECLINE_REQUEST="SELLER_DECLINE_REQUEST",e.SELLER_ESCALATE="SELLER_ESCALATE",e.SELLER_ISSUE_REFUND="SELLER_ISSUE_REFUND",e.SELLER_ISSUE_STORE_CREDIT_REFUND="SELLER_ISSUE_STORE_CREDIT_REFUND",e.SELLER_MARK_AS_RECEIVED="SELLER_MARK_AS_RECEIVED",e.SELLER_MARK_REFUND_SENT="SELLER_MARK_REFUND_SENT",e.SELLER_MARK_REPLACEMENT_SHIPPED="SELLER_MARK_REPLACEMENT_SHIPPED",e.SELLER_OFFER_PARTIAL_REFUND="SELLER_OFFER_PARTIAL_REFUND",e.SELLER_OFFER_REPLACEMENT="SELLER_OFFER_REPLACEMENT",e.SELLER_OFFER_RETURNS="SELLER_OFFER_RETURNS",e.SELLER_PRINT_SHIPPING_LABEL="SELLER_PRINT_SHIPPING_LABEL",e.SELLER_PROVIDE_LABEL="SELLER_PROVIDE_LABEL",e.SELLER_PROVIDE_RMA="SELLER_PROVIDE_RMA",e.SELLER_PROVIDE_TRACKING_INFO="SELLER_PROVIDE_TRACKING_INFO",e.SELLER_RETRY_REFUND="SELLER_RETRY_REFUND",e.SELLER_SEND_MESSAGE="SELLER_SEND_MESSAGE",e.SELLER_UPDATE_TRACKING="SELLER_UPDATE_TRACKING",e.SELLER_VOID_LABEL="SELLER_VOID_LABEL",e.SUBMIT_FILE="SUBMIT_FILE",e.SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT="SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT",e.SYSTEM_BUYER_REFUND_AS_PAYOUT="SYSTEM_BUYER_REFUND_AS_PAYOUT",e.SYSTEM_CLOSE_RETURN="SYSTEM_CLOSE_RETURN",e.SYSTEM_CREATE_RETURN="SYSTEM_CREATE_RETURN",e.SYSTEM_IMMEDIATE_REFUND="SYSTEM_IMMEDIATE_REFUND",e.TIME_OUT_AFTER_DECLINE="TIME_OUT_AFTER_DECLINE",e.TIME_OUT_AFTER_REFUNDED="TIME_OUT_AFTER_REFUNDED",e.TIME_OUT_AFTER_REFUNDED_AS_PAYOUT="TIME_OUT_AFTER_REFUNDED_AS_PAYOUT",e.TIME_OUT_AFTER_REPLACED="TIME_OUT_AFTER_REPLACED",e.TIME_OUT_FOR_AUTHORIZE="TIME_OUT_FOR_AUTHORIZE",e.TIME_OUT_FOR_AUTO_REFUND="TIME_OUT_FOR_AUTO_REFUND",e.TIME_OUT_FOR_BUYER_RECOUP="TIME_OUT_FOR_BUYER_RECOUP",e.TIME_OUT_FOR_DELIVERY="TIME_OUT_FOR_DELIVERY",e.TIME_OUT_FOR_ESCALATION="TIME_OUT_FOR_ESCALATION",e.TIME_OUT_FOR_ESCALATION_AFTER_SMIR="TIME_OUT_FOR_ESCALATION_AFTER_SMIR",e.TIME_OUT_FOR_ITEM_REPLACED="TIME_OUT_FOR_ITEM_REPLACED",e.TIME_OUT_FOR_MARK_REFUND_RECEIVED="TIME_OUT_FOR_MARK_REFUND_RECEIVED",e.TIME_OUT_FOR_MARK_REFUND_SENT="TIME_OUT_FOR_MARK_REFUND_SENT",e.TIME_OUT_FOR_MASS_PAYOUT="TIME_OUT_FOR_MASS_PAYOUT",e.TIME_OUT_FOR_PAYOUT="TIME_OUT_FOR_PAYOUT",e.TIME_OUT_FOR_PROVIDE_LABEL="TIME_OUT_FOR_PROVIDE_LABEL",e.TIME_OUT_FOR_REFUND="TIME_OUT_FOR_REFUND",e.TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED="TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED",e.TIME_OUT_FOR_REPLACEMENT_SHIPPED="TIME_OUT_FOR_REPLACEMENT_SHIPPED",e.TIME_OUT_FOR_RETURN_SHIPPING="TIME_OUT_FOR_RETURN_SHIPPING",e.TIME_OUT_FOR_RMA="TIME_OUT_FOR_RMA",e.TIME_OUT_FOR_SELLER_INVOICE="TIME_OUT_FOR_SELLER_INVOICE",e.TIME_OUT_FOR_SELLER_PAYOUT="TIME_OUT_FOR_SELLER_PAYOUT",e.TIME_OUT_FOR_SHIPMENT_TRACKING="TIME_OUT_FOR_SHIPMENT_TRACKING",e.TIME_OUT_FOR_SHIPPING="TIME_OUT_FOR_SHIPPING",e.TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE="TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE"}(_i||(_i={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(mi||(mi={})),function(e){e.YEAR="YEAR",e.MONTH="MONTH",e.DAY="DAY",e.HOUR="HOUR",e.CALENDAR_DAY="CALENDAR_DAY",e.BUSINESS_DAY="BUSINESS_DAY",e.MINUTE="MINUTE",e.SECOND="SECOND",e.MILLISECOND="MILLISECOND"}(yi||(yi={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(Ri||(Ri={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(Ai||(Ai={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}(Ii||(Ii={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}(Ti||(Ti={})),function(e){e.CASH_IN_PERSON="CASH_IN_PERSON",e.CASH_ON_DELIVERY="CASH_ON_DELIVERY",e.CASH_ON_PICKUP="CASH_ON_PICKUP",e.CASHIER_CHECK="CASHIER_CHECK",e.CREDIT_CARD="CREDIT_CARD",e.ESCROW="ESCROW",e.INTEGRATED_MERCHANT_CREDIT_CARD="INTEGRATED_MERCHANT_CREDIT_CARD",e.LOAN_CHECK="LOAN_CHECK",e.MONEY_ORDER="MONEY_ORDER",e.PAISA_PAY="PAISA_PAY",e.PAISA_PAY_ESCROW="PAISA_PAY_ESCROW",e.PAISA_PAY_ESCROW_EMI="PAISA_PAY_ESCROW_EMI",e.PAYPAL="PAYPAL",e.PERSONAL_CHECK="PERSONAL_CHECK",e.OTHER="OTHER"}(Si||(Si={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(Ci||(Ci={})),function(e){e.AD="AD",e.AE="AE",e.AF="AF",e.AG="AG",e.AI="AI",e.AL="AL",e.AM="AM",e.AN="AN",e.AO="AO",e.AQ="AQ",e.AR="AR",e.AS="AS",e.AT="AT",e.AU="AU",e.AW="AW",e.AX="AX",e.AZ="AZ",e.BA="BA",e.BB="BB",e.BD="BD",e.BE="BE",e.BF="BF",e.BG="BG",e.BH="BH",e.BI="BI",e.BJ="BJ",e.BL="BL",e.BM="BM",e.BN="BN",e.BO="BO",e.BQ="BQ",e.BR="BR",e.BS="BS",e.BT="BT",e.BV="BV",e.BW="BW",e.BY="BY",e.BZ="BZ",e.CA="CA",e.CC="CC",e.CD="CD",e.CF="CF",e.CG="CG",e.CH="CH",e.CI="CI",e.CK="CK",e.CL="CL",e.CM="CM",e.CN="CN",e.CO="CO",e.CR="CR",e.CU="CU",e.CV="CV",e.CW="CW",e.CX="CX",e.CY="CY",e.CZ="CZ",e.DE="DE",e.DJ="DJ",e.DK="DK",e.DM="DM",e.DO="DO",e.DZ="DZ",e.EC="EC",e.EE="EE",e.EG="EG",e.EH="EH",e.ER="ER",e.ES="ES",e.ET="ET",e.FI="FI",e.FJ="FJ",e.FK="FK",e.FM="FM",e.FO="FO",e.FR="FR",e.GA="GA",e.GB="GB",e.GD="GD",e.GE="GE",e.GF="GF",e.GG="GG",e.GH="GH",e.GI="GI",e.GL="GL",e.GM="GM",e.GN="GN",e.GP="GP",e.GQ="GQ",e.GR="GR",e.GS="GS",e.GT="GT",e.GU="GU",e.GW="GW",e.GY="GY",e.HK="HK",e.HM="HM",e.HN="HN",e.HR="HR",e.HT="HT",e.HU="HU",e.ID="ID",e.IE="IE",e.IL="IL",e.IM="IM",e.IN="IN",e.IO="IO",e.IQ="IQ",e.IR="IR",e.IS="IS",e.IT="IT",e.JE="JE",e.JM="JM",e.JO="JO",e.JP="JP",e.KE="KE",e.KG="KG",e.KH="KH",e.KI="KI",e.KM="KM",e.KN="KN",e.KP="KP",e.KR="KR",e.KW="KW",e.KY="KY",e.KZ="KZ",e.LA="LA",e.LB="LB",e.LC="LC",e.LI="LI",e.LK="LK",e.LR="LR",e.LS="LS",e.LT="LT",e.LU="LU",e.LV="LV",e.LY="LY",e.MA="MA",e.MC="MC",e.MD="MD",e.ME="ME",e.MF="MF",e.MG="MG",e.MH="MH",e.MK="MK",e.ML="ML",e.MM="MM",e.MN="MN",e.MO="MO",e.MP="MP",e.MQ="MQ",e.MR="MR",e.MS="MS",e.MT="MT",e.MU="MU",e.MV="MV",e.MW="MW",e.MX="MX",e.MY="MY",e.MZ="MZ",e.NA="NA",e.NC="NC",e.NE="NE",e.NF="NF",e.NG="NG",e.NI="NI",e.NL="NL",e.NO="NO",e.NP="NP",e.NR="NR",e.NU="NU",e.NZ="NZ",e.OM="OM",e.PA="PA",e.PE="PE",e.PF="PF",e.PG="PG",e.PH="PH",e.PK="PK",e.PL="PL",e.PM="PM",e.PN="PN",e.PR="PR",e.PS="PS",e.PT="PT",e.PW="PW",e.PY="PY",e.QA="QA",e.RE="RE",e.RO="RO",e.RS="RS",e.RU="RU",e.RW="RW",e.SA="SA",e.SB="SB",e.SC="SC",e.SD="SD",e.SE="SE",e.SG="SG",e.SH="SH",e.SI="SI",e.SJ="SJ",e.SK="SK",e.SL="SL",e.SM="SM",e.SN="SN",e.SO="SO",e.SR="SR",e.ST="ST",e.SV="SV",e.SX="SX",e.SY="SY",e.SZ="SZ",e.TC="TC",e.TD="TD",e.TF="TF",e.TG="TG",e.TH="TH",e.TJ="TJ",e.TK="TK",e.TL="TL",e.TM="TM",e.TN="TN",e.TO="TO",e.TR="TR",e.TT="TT",e.TV="TV",e.TW="TW",e.TZ="TZ",e.UA="UA",e.UG="UG",e.UM="UM",e.US="US",e.UY="UY",e.UZ="UZ",e.VA="VA",e.VC="VC",e.VE="VE",e.VG="VG",e.VI="VI",e.VN="VN",e.VU="VU",e.WF="WF",e.WS="WS",e.YE="YE",e.YT="YT",e.ZA="ZA",e.ZM="ZM",e.ZW="ZW"}(Ni||(Ni={})),function(e){e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ANG="ANG",e.AOA="AOA",e.ARS="ARS",e.AUD="AUD",e.AWG="AWG",e.AZN="AZN",e.BAM="BAM",e.BBD="BBD",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BMD="BMD",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BTN="BTN",e.BWP="BWP",e.BYR="BYR",e.BZD="BZD",e.CAD="CAD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CUP="CUP",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.EUR="EUR",e.FJD="FJD",e.FKP="FKP",e.GBP="GBP",e.GEL="GEL",e.GHS="GHS",e.GIP="GIP",e.GMD="GMD",e.GNF="GNF",e.GTQ="GTQ",e.GYD="GYD",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HTG="HTG",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KGS="KGS",e.KHR="KHR",e.KMF="KMF",e.KPW="KPW",e.KRW="KRW",e.KWD="KWD",e.KYD="KYD",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.LRD="LRD",e.LSL="LSL",e.LTL="LTL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MRO="MRO",e.MUR="MUR",e.MVR="MVR",e.MWK="MWK",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PGK="PGK",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SBD="SBD",e.SCR="SCR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SHP="SHP",e.SLL="SLL",e.SOS="SOS",e.SRD="SRD",e.STD="STD",e.SYP="SYP",e.SZL="SZL",e.THB="THB",e.TJS="TJS",e.TMT="TMT",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.USD="USD",e.UYU="UYU",e.UZS="UZS",e.VEF="VEF",e.VND="VND",e.VUV="VUV",e.WST="WST",e.XAF="XAF",e.XCD="XCD",e.XOF="XOF",e.XPF="XPF",e.YER="YER",e.ZAR="ZAR",e.ZMW="ZMW",e.ZWL="ZWL"}(Oi||(Oi={})),function(e){e.de_AT="de-AT",e.de_CH="de-CH",e.de_DE="de-DE",e.en_AU="en-AU",e.en_CA="en-CA",e.en_GB="en-GB",e.en_IE="en-IE",e.en_PH="en-PH",e.en_US="en-US",e.es_ES="es-ES",e.fr_BE="fr-BE",e.fr_CA="fr-CA",e.fr_FR="fr-FR",e.it_IT="it-IT",e.nl_BE="nl-BE",e.nl_NL="nl-NL",e.pl_PL="pl-PL",e.th_TH="th-TH",e.zh_HK="zh-HK",e.zh_TW="zh-TW"}(bi||(bi={})),function(e){e.NEW="NEW",e.LIKE_NEW="LIKE_NEW",e.NEW_OTHER="NEW_OTHER",e.NEW_WITH_DEFECTS="NEW_WITH_DEFECTS",e.MANUFACTURER_REFURBISHED="MANUFACTURER_REFURBISHED",e.SELLER_REFURBISHED="SELLER_REFURBISHED",e.USED_EXCELLENT="USED_EXCELLENT",e.USED_VERY_GOOD="USED_VERY_GOOD",e.USED_GOOD="USED_GOOD",e.USED_ACCEPTABLE="USED_ACCEPTABLE",e.FOR_PARTS_OR_NOT_WORKING="FOR_PARTS_OR_NOT_WORKING"}(Pi||(Pi={})),function(e){e.en_US="en_US",e.en_CA="en_CA",e.fr_CA="fr_CA",e.en_GB="en_GB",e.en_AU="en_AU",e.en_IN="en_IN",e.de_AT="de_AT",e.fr_BE="fr_BE",e.fr_FR="fr_FR",e.de_DE="de_DE",e.it_IT="it_IT",e.nl_BE="nl_BE",e.nl_NL="nl_NL",e.es_ES="es_ES",e.de_CH="de_CH",e.fi_FI="fi_FI",e.zh_HK="zh_HK",e.hu_HU="hu_HU",e.en_PH="en_PH",e.pl_PL="pl_PL",e.pt_PT="pt_PT",e.ru_RU="ru_RU",e.en_SG="en_SG",e.en_IE="en_IE",e.en_MY="en_MY"}(Ui||(Ui={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_MOTORS="EBAY_MOTORS",e.EBAY_CA="EBAY_CA",e.EBAY_GB="EBAY_GB",e.EBAY_AU="EBAY_AU",e.EBAY_AT="EBAY_AT",e.EBAY_BE="EBAY_BE",e.EBAY_FR="EBAY_FR",e.EBAY_DE="EBAY_DE",e.EBAY_IT="EBAY_IT",e.EBAY_NL="EBAY_NL",e.EBAY_ES="EBAY_ES",e.EBAY_CH="EBAY_CH",e.EBAY_TW="EBAY_TW",e.EBAY_CZ="EBAY_CZ",e.EBAY_DK="EBAY_DK",e.EBAY_FI="EBAY_FI",e.EBAY_GR="EBAY_GR",e.EBAY_HK="EBAY_HK",e.EBAY_HU="EBAY_HU",e.EBAY_IN="EBAY_IN",e.EBAY_ID="EBAY_ID",e.EBAY_IE="EBAY_IE",e.EBAY_IL="EBAY_IL",e.EBAY_MY="EBAY_MY",e.EBAY_NZ="EBAY_NZ",e.EBAY_NO="EBAY_NO",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_PT="EBAY_PT",e.EBAY_PR="EBAY_PR",e.EBAY_RU="EBAY_RU",e.EBAY_SG="EBAY_SG",e.EBAY_ZA="EBAY_ZA",e.EBAY_SE="EBAY_SE",e.EBAY_TH="EBAY_TH",e.EBAY_VN="EBAY_VN",e.EBAY_CN="EBAY_CN",e.EBAY_PE="EBAY_PE",e.EBAY_JP="EBAY_JP"}(Di||(Di={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(Li||(Li={})),function(e){e.CLICK_THROUGH_RATE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_SEARCH_RESULTS_PAGE="LISTING_IMPRESSION_SEARCH_RESULTS_PAGE",e.LISTING_IMPRESSION_STORE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_TOTAL="LISTING_IMPRESSION_TOTAL",e.LISTING_VIEWS_SOURCE_DIRECT="LISTING_VIEWS_SOURCE_DIRECT",e.LISTING_VIEWS_SOURCE_OFF_EBAY="LISTING_VIEWS_SOURCE_OFF_EBAY",e.LISTING_VIEWS_SOURCE_OTHER_EBAY="LISTING_VIEWS_SOURCE_OTHER_EBAY",e.LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE="LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE",e.LISTING_VIEWS_SOURCE_STORE="LISTING_VIEWS_SOURCE_STORE",e.LISTING_VIEWS_TOTAL="LISTING_VIEWS_TOTAL",e.SALES_CONVERSION_RATE="SALES_CONVERSION_RATE",e.TOTAL_IMPRESSION_TOTAL="TOTAL_IMPRESSION_TOTAL",e.TRANSACTION="TRANSACTION"}(vi||(vi={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(Bi||(Bi={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(Mi||(Mi={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(Fi||(Fi={})),function(e){e.COUNTRY="COUNTRY",e.COUNTRY_REGION="COUNTRY_REGION",e.STATE_OR_PROVINCE="STATE_OR_PROVINCE",e.WORLD_REGION="WORLD_REGION",e.WORLDWIDE="WORLDWIDE"}(wi||(wi={})),function(e){e.BUYER_CANCEL="BUYER_CANCEL",e.SELLER_CANCEL="SELLER_CANCEL",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.BUYER_RETURN="BUYER_RETURN",e.ITEM_NOT_AS_DESCRIBED="ITEM_NOT_AS_DESCRIBED",e.OTHER_ADJUSTMENT="OTHER_ADJUSTMENT",e.SHIPPING_DISCOUNT="SHIPPING_DISCOUNT"}(xi||(xi={})),function(e){e.ADDRESS_ISSUES="ADDRESS_ISSUES",e.BUYER_ASKED_CANCEL="BUYER_ASKED_CANCEL",e.BUYER_CANCEL_OR_ADDRESS_ISSUE="BUYER_CANCEL_OR_ADDRESS_ISSUE",e.FOUND_CHEAPER_PRICE="FOUND_CHEAPER_PRICE",e.ORDER_MISTAKE="ORDER_MISTAKE",e.ORDER_UNPAID="ORDER_UNPAID",e.OTHER="OTHER",e.OUT_OF_STOCK_OR_CANNOT_FULFILL="OUT_OF_STOCK_OR_CANNOT_FULFILL",e.PRICE_TOO_HIGH="PRICE_TOO_HIGH",e.UNKNOWN="UNKNOWN",e.WONT_ARRIVE_IN_TIME="WONT_ARRIVE_IN_TIME",e.WRONG_PAYMENT_METHOD="WRONG_PAYMENT_METHOD",e.WRONG_SHIPPING_ADDRESS="WRONG_SHIPPING_ADDRESS",e.WRONG_SHIPPING_METHOD="WRONG_SHIPPING_METHOD"}(ki||(ki={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(Gi||(Gi={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(Yi||(Yi={})),function(e){e.LETTER="LETTER",e.BULKY_GOODS="BULKY_GOODS",e.CARAVAN="CARAVAN",e.CARS="CARS",e.EUROPALLET="EUROPALLET",e.EXPANDABLE_TOUGH_BAGS="EXPANDABLE_TOUGH_BAGS",e.EXTRA_LARGE_PACK="EXTRA_LARGE_PACK",e.FURNITURE="FURNITURE",e.INDUSTRY_VEHICLES="INDUSTRY_VEHICLES",e.LARGE_CANADA_POSTBOX="LARGE_CANADA_POSTBOX",e.LARGE_CANADA_POST_BUBBLE_MAILER="LARGE_CANADA_POST_BUBBLE_MAILER",e.LARGE_ENVELOPE="LARGE_ENVELOPE",e.MAILING_BOX="MAILING_BOX",e.MEDIUM_CANADA_POST_BOX="MEDIUM_CANADA_POST_BOX",e.MEDIUM_CANADA_POST_BUBBLE_MAILER="MEDIUM_CANADA_POST_BUBBLE_MAILER",e.MOTORBIKES="MOTORBIKES",e.ONE_WAY_PALLET="ONE_WAY_PALLET",e.PACKAGE_THICK_ENVELOPE="PACKAGE_THICK_ENVELOPE",e.PADDED_BAGS="PADDED_BAGS",e.PARCEL_OR_PADDED_ENVELOPE="PARCEL_OR_PADDED_ENVELOPE",e.ROLL="ROLL",e.SMALL_CANADA_POST_BOX="SMALL_CANADA_POST_BOX",e.SMALL_CANADA_POST_BUBBLE_MAILER="SMALL_CANADA_POST_BUBBLE_MAILER",e.TOUGH_BAGS="TOUGH_BAGS",e.UPS_LETTER="UPS_LETTER",e.USPS_FLAT_RATE_ENVELOPE="USPS_FLAT_RATE_ENVELOPE",e.USPS_LARGE_PACK="USPS_LARGE_PACK",e.VERY_LARGE_PACK="VERY_LARGE_PACK",e.WINE_PAK="WINE_PAK"}($i||($i={}));var ji=Object.freeze({__proto__:null,get ActivityOption(){return _i},get CancelReason(){return ki},get CaseSearchFieldGroup(){return ni},get CaseStatusFilter(){return ri},get CategoryType(){return di},get Condition(){return Pi},get ContentLanguage(){return bi},get CountryCode(){return Ni},get CurrencyCode(){return Oi},get Decision(){return pi},get EscalateReason(){return li},get FilePurpose(){return hi},get FormatType(){return Li},get GetReturnFieldGroupEnum(){return ui},get InquirySearchFieldGroup(){return ti},get InquiryStatusFilter(){return oi},get LengthUnitOfMeasure(){return Gi},get Locale(){return bi},get LocaleEnum(){return Ui},get Marketplace(){return Di},get MarketplaceId(){return Zo},get Metric(){return vi},get PackageType(){return $i},get PaymentMethodType(){return Si},get PaymentsProgramStatus(){return Ti},get PaymentsProgramType(){return Ii},get ReasonForRefund(){return xi},get RecipientAccountReferenceType(){return Ci},get RefundFeeType(){return gi},get RefundMethod(){return Bi},get RegionType(){return wi},get RequestType(){return ai},get ReturnCountFilter(){return Ei},get ReturnMethod(){return Mi},get ReturnReason(){return si},get ReturnShippingCostPayer(){return Fi},get ReturnState(){return fi},get ReturnType(){return ci},get ShippingCarrier(){return ii},get ShippingCostType(){return Ai},get ShippingOptionType(){return Ri},get SiteId(){return Qo},get StoreType(){return mi},get TimeDurationUnit(){return yi},get UserRoleFilter(){return ei},get WeightUnitOfMeasure(){return Yi}}),Vi=Object.freeze({__proto__:null});const Ki={sandbox:!1,autoRefreshToken:!0,siteId:Qo.EBAY_US,marketplaceId:Zo.EBAY_US,acceptLanguage:bi.en_US,contentLanguage:bi.en_US};class eBayApi extends Api{static fromEnv(e){if(!process.env.EBAY_APP_ID)throw new ApiEnvError("EBAY_APP_ID");if(!process.env.EBAY_CERT_ID)throw new ApiEnvError("EBAY_CERT_ID");let t=null;return process.env.EBAY_JWE&&process.env.EBAY_PRIVATE_KEY&&(t={jwe:process.env.EBAY_JWE,privateKey:process.env.EBAY_PRIVATE_KEY}),new eBayApi({appId:process.env.EBAY_APP_ID,certId:process.env.EBAY_CERT_ID,devId:process.env.EBAY_DEV_ID,authToken:process.env.EBAY_AUTH_TOKEN,siteId:process.env.EBAY_SITE_ID?parseInt(process.env.EBAY_SITE_ID,10):Qo.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in Zo?Zo[process.env.EBAY_MARKETPLACE_ID]:Zo.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX,signature:t},e)}constructor(e,t){super({...Ki,...e},t),this.factory=new ApiFactory(this.config,this.req,this.auth),this.authNAuth=this.auth.authNAuth,this.OAuth2=this.auth.OAuth2,this.oAuth2=this.OAuth2}get buy(){return this._buy||(this._buy=this.factory.createBuyApi())}get commerce(){return this._commerce||(this._commerce=this.factory.createCommerceApi())}get developer(){return this._developer||(this._developer=this.factory.createDeveloperApi())}get postOrder(){return this._postOrder||(this._postOrder=this.factory.createPostOrderApi())}get sell(){return this._sell||(this._sell=this.factory.createSellApi())}get trading(){return this._trading||(this._trading=this.factory.createTradingApi())}get finding(){return this._finding||(this._finding=this.factory.createFindingApi())}get shopping(){return this._shopping||(this._shopping=this.factory.createShoppingApi())}get merchandising(){return this._merchandising||(this._merchandising=this.factory.createMerchandisingApi())}get clientAlerts(){return this._clientAlerts||(this._clientAlerts=this.factory.createClientAlertsApi())}setSignature(e){this.config.signature=e}}eBayApi.SiteId=Qo,eBayApi.MarketplaceId=Zo,eBayApi.ContentLanguage=bi,eBayApi.Locale=bi;export{bi as ContentLanguage,bi as Locale,Zo as MarketplaceId,Qo as SiteId,eBayApi as default,eBayApi,ji as enums,bo as errors,Vi as types};
1
+ function bind(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,{iterator:r,toStringTag:n}=Symbol,o=(i=Object.create(null),t=>{const r=e.call(t);return i[r]||(i[r]=r.slice(8,-1).toLowerCase())});var i;const kindOfTest=e=>(e=e.toLowerCase(),t=>o(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:s}=Array,u=typeOfTest("undefined");function isBuffer(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const c=kindOfTest("ArrayBuffer");const l=typeOfTest("string"),p=typeOfTest("function"),d=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==o(e))return!1;const i=t(e);return!(null!==i&&i!==Object.prototype&&null!==Object.getPrototypeOf(i)||n in e||r in e)},E=kindOfTest("Date"),f=kindOfTest("File"),g=kindOfTest("Blob"),h=kindOfTest("FileList"),_=kindOfTest("URLSearchParams"),[m,y,R,A]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),s(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(isBuffer(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function findKey(e,t){if(isBuffer(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!u(e)&&e!==I;const T=(S="undefined"!=typeof Uint8Array&&t(Uint8Array),e=>S&&e instanceof S);var S;const C=kindOfTest("HTMLFormElement"),N=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),O=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const b=kindOfTest("AsyncFunction"),P=(U="function"==typeof setImmediate,D=p(I.postMessage),U?setImmediate:D?(L=`axios@${Math.random()}`,v=[],I.addEventListener("message",({source:e,data:t})=>{e===I&&t===L&&v.length&&v.shift()()},!1),e=>{v.push(e),I.postMessage(L,"*")}):e=>setTimeout(e));var U,D,L,v;const B="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||P;var M={isArray:s,isArrayBuffer:c,isBuffer:isBuffer,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=o(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer),t},isString:l,isNumber:d,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isEmptyObject:e=>{if(!isObject(e)||isBuffer(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:m,isRequest:y,isResponse:R,isHeaders:A,isUndefined:u,isDate:E,isFile:f,isBlob:g,isRegExp:O,isFunction:p,isStream:e=>isObject(e)&&p(e.pipe),isURLSearchParams:_,isTypedArray:T,isFileList:h,forEach:forEach,merge:function merge(){const{caseless:e,skipUndefined:t}=isContextDefined(this)&&this||{},r={},assignValue=(n,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=e&&findKey(r,o)||o;isPlainObject(r[i])&&isPlainObject(n)?r[i]=merge(r[i],n):isPlainObject(n)?r[i]=merge({},n):s(n)?r[i]=n.slice():t&&u(n)||(r[i]=n)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],assignValue);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,(t,n)=>{r&&p(t)?Object.defineProperty(e,n,{value:bind(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,r,n,o)=>{let i,s,u;const c={};if(r=r||{},null==e)return r;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)u=i[s],o&&!o(u,e,r)||c[u]||(r[u]=e[u],c[u]=!0);e=!1!==n&&t(e)}while(e&&(!n||n(e,r))&&e!==Object.prototype);return r},kindOf:o,kindOfTest:kindOfTest,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(s(e))return e;let t=e.length;if(!d(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const n=(e&&e[r]).call(e);let o;for(;(o=n.next())&&!o.done;){const r=o.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:C,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,(t,r)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];p(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},define=e=>{e.forEach(e=>{r[e]=!0})};return s(e)?define(e):define(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function replacer(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:findKey,global:I,isContextDefined:isContextDefined,isSpecCompliantForm:function isSpecCompliantForm(e){return!!(e&&p(e.append)&&"FormData"===e[n]&&e[r])},toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(isBuffer(e))return e;if(!("toJSON"in e)){t[r]=e;const n=s(e)?[]:{};return forEach(e,(e,t)=>{const o=visit(e,r+1);!u(o)&&(n[t]=o)}),t[r]=void 0,n}}return e};return visit(e,0)},isAsyncFn:b,isThenable:e=>e&&(isObject(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:P,asap:B,isIterable:e=>null!=e&&p(e[r])};let F=class AxiosError extends Error{static from(e,t,r,n,o,i){const s=new AxiosError(e.message,t||e.code,r,n,o);return s.cause=e,s.name=e.name,i&&Object.assign(s,i),s}constructor(e,t,r,n,o){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status)}toJSON(){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:M.toJSONObject(this.config),code:this.code,status:this.status}}};F.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",F.ERR_BAD_OPTION="ERR_BAD_OPTION",F.ECONNABORTED="ECONNABORTED",F.ETIMEDOUT="ETIMEDOUT",F.ERR_NETWORK="ERR_NETWORK",F.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",F.ERR_DEPRECATED="ERR_DEPRECATED",F.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",F.ERR_BAD_REQUEST="ERR_BAD_REQUEST",F.ERR_CANCELED="ERR_CANCELED",F.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",F.ERR_INVALID_URL="ERR_INVALID_URL";function isVisitable(e){return M.isPlainObject(e)||M.isArray(e)}function removeBrackets(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map(function each(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const w=M.toFlatObject(M,{},null,function filter(e){return/^is[A-Z]/.test(e)});function toFormData$1(e,t,r){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function defined(e,t){return!M.isUndefined(t[e])})).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(M.isDate(e))return e.toISOString();if(M.isBoolean(e))return e.toString();if(!u&&M.isBlob(e))throw new F("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(e)||M.isTypedArray(e)?u&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function defaultVisitor(e,r,o){let u=e;if(e&&!o&&"object"==typeof e)if(M.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(M.isArray(e)&&function isFlatArray(e){return M.isArray(e)&&!e.some(isVisitable)}(e)||(M.isFileList(e)||M.endsWith(r,"[]"))&&(u=M.toArray(e)))return r=removeBrackets(r),u.forEach(function each(e,n){!M.isUndefined(e)&&null!==e&&t.append(!0===s?renderKey([r],n,i):null===s?r:r+"[]",convertValue(e))}),!1;return!!isVisitable(e)||(t.append(renderKey(o,r,i),convertValue(e)),!1)}const c=[],l=Object.assign(w,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!M.isObject(e))throw new TypeError("data must be an object");return function build(e,r){if(!M.isUndefined(e)){if(-1!==c.indexOf(e))throw Error("Circular reference detected in "+r.join("."));c.push(e),M.forEach(e,function each(e,n){!0===(!(M.isUndefined(e)||null===e)&&o.call(t,e,M.isString(n)?n.trim():n,r,l))&&build(e,r?r.concat(n):[n])}),c.pop()}}(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function replacer(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const x=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode,o=M.isFunction(r)?{serialize:r}:r,i=o&&o.serialize;let s;if(s=i?i(t,o):M.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,o).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}x.append=function append(e,t){this._pairs.push([e,t])},x.toString=function toString(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map(function each(e){return t(e[0])+"="+t(e[1])},"").join("&")};class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){M.forEach(this.handlers,function forEachHandler(t){null!==t&&e(t)})}}var k={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},G={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Y="undefined"!=typeof window&&"undefined"!=typeof document,$="object"==typeof navigator&&navigator||void 0,H=Y&&(!$||["ReactNative","NativeScript","NS"].indexOf($.product)<0),j="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,V=Y&&window.location.href||"http://localhost";var q={...Object.freeze({__proto__:null,hasBrowserEnv:Y,hasStandardBrowserEnv:H,hasStandardBrowserWebWorkerEnv:j,navigator:$,origin:V}),...G};function formDataToJSON(e){function buildPath(e,t,r,n){let o=e[n++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),s=n>=e.length;if(o=!o&&M.isArray(r)?r.length:o,s)return M.hasOwnProp(r,o)?r[o]=[r[o],t]:r[o]=t,!i;r[o]&&M.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&M.isArray(r[o])&&(r[o]=function arrayToObject(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(r[o])),!i}if(M.isFormData(e)&&M.isFunction(e.entries)){const t={};return M.forEachEntry(e,(e,r)=>{buildPath(function parsePropPath(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,t,0)}),t}return null}const K={transitional:k,adapter:["xhr","http","fetch"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=M.isObject(e);o&&M.isHTMLForm(e)&&(e=new FormData(e));if(M.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e)||M.isReadableStream(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(e,t){return toFormData$1(e,new q.classes.URLSearchParams,{visitor:function(e,t,r,n){return q.isNode&&M.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=M.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData$1(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function stringifySafely(e,t,r){if(M.isString(e))try{return(t||JSON.parse)(e),M.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function transformResponse(e){const t=this.transitional||K.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(M.isResponse(e)||M.isReadableStream(e))return e;if(e&&M.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw F.from(e,F.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:q.classes.FormData,Blob:q.classes.Blob},validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],e=>{K.headers[e]={}});const W=M.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"]);const X=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:M.isArray(e)?e.map(normalizeValue):String(e)}function matchHeaderValue(e,t,r,n,o){return M.isFunction(n)?n.call(this,t,r):(o&&(t=r),M.isString(t)?M.isString(n)?-1!==t.indexOf(n):M.isRegExp(n)?n.test(t):void 0:void 0)}let z=class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function setHeader(e,t,r){const o=normalizeHeader(t);if(!o)throw new Error("header name must be a non-empty string");const i=M.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=normalizeValue(e))}const setHeaders=(e,t)=>M.forEach(e,(e,r)=>setHeader(e,r,t));if(M.isPlainObject(e)||e instanceof this.constructor)setHeaders(e,t);else if(M.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))setHeaders((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function parser(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&W[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(M.isObject(e)&&M.isIterable(e)){let r,n,o={};for(const t of e){if(!M.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?M.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}setHeaders(o,t)}else null!=e&&setHeader(t,e,r);return this}get(e,t){if(e=normalizeHeader(e)){const r=M.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(M.isFunction(t))return t.call(this,e,r);if(M.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=M.findKey(this,e);return!(!r||void 0===this[r]||t&&!matchHeaderValue(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function deleteHeader(e){if(e=normalizeHeader(e)){const o=M.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return M.isArray(e)?e.forEach(deleteHeader):deleteHeader(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!matchHeaderValue(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return M.forEach(this,(n,o)=>{const i=M.findKey(r,o);if(i)return t[i]=normalizeValue(n),void delete t[o];const s=e?function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();s!==o&&delete t[o],t[s]=normalizeValue(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return M.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&M.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}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){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[X]=this[X]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=M.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return M.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}};function transformData(e,t){const r=this||K,n=t||r,o=z.from(n.headers);let i=n.data;return M.forEach(e,function transform(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function isCancel$1(e){return!(!e||!e.__CANCEL__)}z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(z.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),M.freezeMethods(z);let J=class CanceledError extends F{constructor(e,t,r){super(null==e?"canceled":e,F.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new F("Request failed with status code "+r.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const progressEventReducer=(e,t,r=3)=>{let n=0;const o=function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function push(u){const c=Date.now(),l=n[s];o||(o=c),r[i]=u,n[i]=c;let p=s,d=0;for(;p!==i;)d+=r[p++],p%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const E=l&&c-l;return E?Math.round(1e3*d/E):void 0}}(50,250);return function throttle(e,t){let r,n,o=0,i=1e3/t;const invoke=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?invoke(e,t):(r=e,n||(n=setTimeout(()=>{n=null,invoke(r)},i-s)))},()=>r&&invoke(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,u=i-n,c=o(u);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},progressEventDecorator=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},asyncDecorator=e=>(...t)=>M.asap(()=>e(...t));var Q=q.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,q.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(q.origin),q.navigator&&/(msie|trident)/i.test(q.navigator.userAgent)):()=>!0,Z=q.hasStandardBrowserEnv?{write(e,t,r,n,o,i,s){if("undefined"==typeof document)return;const u=[`${e}=${encodeURIComponent(t)}`];M.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),M.isString(n)&&u.push(`path=${n}`),M.isString(o)&&u.push(`domain=${o}`),!0===i&&u.push("secure"),M.isString(s)&&u.push(`SameSite=${s}`),document.cookie=u.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function buildFullPath(e,t,r){let n=!function isAbsoluteURL(e){return"string"==typeof e&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||0==r)?function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const headersToObject=e=>e instanceof z?{...e}:e;function mergeConfig$1(e,t){t=t||{};const r={};function getMergedValue(e,t,r,n){return M.isPlainObject(e)&&M.isPlainObject(t)?M.merge.call({caseless:n},e,t):M.isPlainObject(t)?M.merge({},t):M.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r,n){return M.isUndefined(t)?M.isUndefined(e)?void 0:getMergedValue(void 0,e,0,n):getMergedValue(e,t,0,n)}function valueFromConfig2(e,t){if(!M.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return M.isUndefined(t)?M.isUndefined(e)?void 0:getMergedValue(void 0,e):getMergedValue(void 0,t)}function mergeDirectKeys(r,n,o){return o in t?getMergedValue(r,n):o in e?getMergedValue(void 0,r):void 0}const n={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(e,t,r)=>mergeDeepProperties(headersToObject(e),headersToObject(t),0,!0)};return M.forEach(Object.keys({...e,...t}),function computeConfigValue(o){if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=M.hasOwnProp(n,o)?n[o]:mergeDeepProperties,s=i(e[o],t[o],o);M.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)}),r}var resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:u}=t;if(t.headers=s=z.from(s),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),M.isFormData(r))if(q.hasStandardBrowserEnv||q.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(M.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)})}if(q.hasStandardBrowserEnv&&(n&&M.isFunction(n)&&(n=n(t)),n||!1!==n&&Q(t.url))){const e=o&&i&&Z.read(i);e&&s.set(o,e)}return t};var ee="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function dispatchXhrRequest(t,r){const n=resolveConfig(e);let o=n.data;const i=z.from(n.headers).normalize();let s,u,c,l,p,{responseType:d,onUploadProgress:E,onDownloadProgress:f}=n;function done(){l&&l(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function onloadend(){if(!g)return;const n=z.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());settle(function _resolve(e){t(e),done()},function _reject(e){r(e),done()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=onloadend:g.onreadystatechange=function handleLoad(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(onloadend)},g.onabort=function handleAbort(){g&&(r(new F("Request aborted",F.ECONNABORTED,e,g)),g=null)},g.onerror=function handleError(t){const n=t&&t.message?t.message:"Network Error",o=new F(n,F.ERR_NETWORK,e,g);o.event=t||null,r(o),g=null},g.ontimeout=function handleTimeout(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||k;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new F(t,o.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,g)),g=null},void 0===o&&i.setContentType(null),"setRequestHeader"in g&&M.forEach(i.toJSON(),function setRequestHeader(e,t){g.setRequestHeader(t,e)}),M.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&"json"!==d&&(g.responseType=n.responseType),f&&([c,p]=progressEventReducer(f,!0),g.addEventListener("progress",c)),E&&g.upload&&([u,l]=progressEventReducer(E),g.upload.addEventListener("progress",u),g.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{g&&(r(!t||t.type?new J(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const h=function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);h&&-1===q.protocols.indexOf(h)?r(new F("Unsupported protocol "+h+":",F.ERR_BAD_REQUEST,e)):g.send(o||null)})};const composeSignals=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const onabort=function(e){if(!r){r=!0,unsubscribe();const t=e instanceof Error?e:this.reason;n.abort(t instanceof F?t:new J(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,onabort(new F(`timeout of ${t}ms exceeded`,F.ETIMEDOUT))},t);const unsubscribe=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(onabort):e.removeEventListener("abort",onabort)}),e=null)};e.forEach(e=>e.addEventListener("abort",onabort));const{signal:i}=n;return i.unsubscribe=()=>M.asap(unsubscribe),i}},streamChunk=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of readStream(e))yield*streamChunk(r,t)}(e,t);let i,s=0,_onFinish=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return _onFinish(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw _onFinish(e),e}},cancel:e=>(_onFinish(e),o.return())},{highWaterMark:2})},{isFunction:te}=M,re=(({Request:e,Response:t})=>({Request:e,Response:t}))(M.global),{ReadableStream:ne,TextEncoder:oe}=M.global,test=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},factory=e=>{e=M.merge.call({skipUndefined:!0},re,e);const{fetch:t,Request:r,Response:n}=e,o=t?te(t):"function"==typeof fetch,i=te(r),s=te(n);if(!o)return!1;const u=o&&te(ne),c=o&&("function"==typeof oe?(l=new oe,e=>l.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var l;const p=i&&u&&test(()=>{let e=!1;const t=new r(q.origin,{body:new ne,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&u&&test(()=>M.isReadableStream(new n("").body)),E={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!E[e]&&(E[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new F(`Response type '${e}' is not supported`,F.ERR_NOT_SUPPORT,r)})});const resolveBodyLength=async(e,t)=>{const n=M.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(M.isBlob(e))return e.size;if(M.isSpecCompliantForm(e)){const t=new r(q.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return M.isArrayBufferView(e)||M.isArrayBuffer(e)?e.byteLength:(M.isURLSearchParams(e)&&(e+=""),M.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:s,data:u,signal:c,cancelToken:l,timeout:f,onDownloadProgress:g,onUploadProgress:h,responseType:_,headers:m,withCredentials:y="same-origin",fetchOptions:R}=resolveConfig(e),A=t||fetch;_=_?(_+"").toLowerCase():"text";let I=composeSignals([c,l&&l.toAbortSignal()],f),T=null;const S=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let C;try{if(h&&p&&"get"!==s&&"head"!==s&&0!==(C=await resolveBodyLength(m,u))){let e,t=new r(o,{method:"POST",body:u,duplex:"half"});if(M.isFormData(u)&&(e=t.headers.get("content-type"))&&m.setContentType(e),t.body){const[e,r]=progressEventDecorator(C,progressEventReducer(asyncDecorator(h)));u=trackStream(t.body,65536,e,r)}}M.isString(y)||(y=y?"include":"omit");const t=i&&"credentials"in r.prototype,c={...R,signal:I,method:s.toUpperCase(),headers:m.normalize().toJSON(),body:u,duplex:"half",credentials:t?y:void 0};T=i&&new r(o,c);let l=await(i?A(T,R):A(o,c));const f=d&&("stream"===_||"response"===_);if(d&&(g||f&&S)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=l[t]});const t=M.toFiniteNumber(l.headers.get("content-length")),[r,o]=g&&progressEventDecorator(t,progressEventReducer(asyncDecorator(g),!0))||[];l=new n(trackStream(l.body,65536,r,()=>{o&&o(),S&&S()}),e)}_=_||"text";let N=await E[M.findKey(E,_)||"text"](l,e);return!f&&S&&S(),await new Promise((t,r)=>{settle(t,r,{data:N,headers:z.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:T})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new F("Network Error",F.ERR_NETWORK,e,T,t&&t.response),{cause:t.cause||t});throw F.from(t,t&&t.code,e,T,t&&t.response)}}},ie=new Map,getFetch=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let s,u,c=i.length,l=ie;for(;c--;)s=i[c],u=l.get(s),void 0===u&&l.set(s,u=c?new Map:factory(t)),l=u;return u};getFetch();const se={http:null,xhr:ee,fetch:{get:getFetch}};M.forEach(se,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>M.isFunction(e)||null===e||!1===e;var ae={getAdapter:function getAdapter$1(e,t){e=M.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let s=0;s<r;s++){let r;if(n=e[s],o=n,!isResolvedHandle(n)&&(o=se[(r=String(n)).toLowerCase()],void 0===o))throw new F(`Unknown adapter '${r}'`);if(o&&(M.isFunction(o)||(o=o.get(t))))break;i[r||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified";throw new F("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:se};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new J(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=z.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ae.getAdapter(e.adapter||K.adapter,e)(e).then(function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=z.from(t.headers),t},function onAdapterRejection(t){return isCancel$1(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=z.from(t.response.headers))),Promise.reject(t)})}const ue="1.13.5",ce={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ce[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const le={};ce.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v"+ue+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,o)=>{if(!1===e)throw new F(formatMessage(n," has been removed"+(t?" in "+t:"")),F.ERR_DEPRECATED);return t&&!le[n]&&(le[n]=!0,console.warn(formatMessage(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}},ce.spelling=function spelling(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var pe={assertOptions:function assertOptions(e,t,r){if("object"!=typeof e)throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new F("option "+i+" must be "+r,F.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new F("Unknown option "+i,F.ERR_BAD_OPTION)}},validators:ce};const de=pe.validators;let Ee=class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}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=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig$1(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&pe.assertOptions(r,{silentJSONParsing:de.transitional(de.boolean),forcedJSONParsing:de.transitional(de.boolean),clarifyTimeoutError:de.transitional(de.boolean),legacyInterceptorReqResOrdering:de.transitional(de.boolean)},!1),null!=n&&(M.isFunction(n)?t.paramsSerializer={serialize:n}:pe.assertOptions(n,{encode:de.function,serialize:de.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),pe.assertOptions(t,{baseUrl:de.spelling("baseURL"),withXsrfToken:de.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&M.merge(o.common,o[t.method]);o&&M.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=z.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach(function unshiftRequestInterceptors(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;u=u&&e.synchronous;const r=t.transitional||k;r&&r.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const c=[];let l;this.interceptors.response.forEach(function pushResponseInterceptors(e){c.push(e.fulfilled,e.rejected)});let p,d=0;if(!u){const e=[dispatchRequest.bind(this),void 0];for(e.unshift(...s),e.push(...c),p=e.length,l=Promise.resolve(t);d<p;)l=l.then(e[d++],e[d++]);return l}p=s.length;let E=t;for(;d<p;){const e=s[d++],t=s[d++];try{E=e(E)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,E)}catch(e){return Promise.reject(e)}for(d=0,p=c.length;d<p;)l=l.then(c[d++],c[d++]);return l}getUri(e){return buildURL(buildFullPath((e=mergeConfig$1(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};M.forEach(["delete","get","head","options"],function forEachMethodNoData(e){Ee.prototype[e]=function(t,r){return this.request(mergeConfig$1(r||{},{method:e,url:t,data:(r||{}).data}))}}),M.forEach(["post","put","patch"],function forEachMethodWithData(e){function generateHTTPMethod(t){return function httpMethod(r,n,o){return this.request(mergeConfig$1(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ee.prototype[e]=generateHTTPMethod(),Ee.prototype[e+"Form"]=generateHTTPMethod(!0)});const fe={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(fe).forEach(([e,t])=>{fe[t]=e});const ge=function createInstance(e){const t=new Ee(e),r=bind(Ee.prototype.request,t);return M.extend(r,Ee.prototype,t,{allOwnKeys:!0}),M.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig$1(e,t))},r}(K);ge.Axios=Ee,ge.CanceledError=J,ge.CancelToken=class CancelToken{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function promiseExecutor(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function reject(){r.unsubscribe(t)},n},e(function cancel(e,n,o){r.reason||(r.reason=new J(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,abort=t=>{e.abort(t)};return this.subscribe(abort),e.signal.unsubscribe=()=>this.unsubscribe(abort),e.signal}static source(){let e;return{token:new CancelToken(function executor(t){e=t}),cancel:e}}},ge.isCancel=isCancel$1,ge.VERSION=ue,ge.toFormData=toFormData$1,ge.AxiosError=F,ge.Cancel=ge.CanceledError,ge.all=function all(e){return Promise.all(e)},ge.spread=function spread$1(e){return function wrap(t){return e.apply(null,t)}},ge.isAxiosError=function isAxiosError$1(e){return M.isObject(e)&&!0===e.isAxiosError},ge.mergeConfig=mergeConfig$1,ge.AxiosHeaders=z,ge.formToJSON=e=>formDataToJSON(M.isHTMLForm(e)?new FormData(e):e),ge.getAdapter=ae.getAdapter,ge.HttpStatusCode=fe,ge.default=ge;const{Axios:he,AxiosError:_e,CanceledError:me,isCancel:ye,CancelToken:Re,VERSION:Ae,all:Ie,Cancel:Te,isAxiosError:Se,spread:Ce,toFormData:Ne,AxiosHeaders:Oe,HttpStatusCode:be,formToJSON:Pe,getAdapter:Ue,mergeConfig:De}=ge;var Le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function a(){var e=!1;try{e=this instanceof a}catch{}return e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var ve,Be,Me,Fe,we,xe={exports:{}};function requireMs(){if(Be)return ve;Be=1;var e=1e3,t=60*e,r=60*t,n=24*r,o=7*n,i=365.25*n;function plural(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}return ve=function(s,u){u=u||{};var c=typeof s;if("string"===c&&s.length>0)return function parse(s){if((s=String(s)).length>100)return;var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!u)return;var c=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===c&&isFinite(s))return u.long?function fmtLong(o){var i=Math.abs(o);if(i>=n)return plural(o,i,n,"day");if(i>=r)return plural(o,i,r,"hour");if(i>=t)return plural(o,i,t,"minute");if(i>=e)return plural(o,i,e,"second");return o+" ms"}(s):function fmtShort(o){var i=Math.abs(o);if(i>=n)return Math.round(o/n)+"d";if(i>=r)return Math.round(o/r)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},ve}var ke,Ge,Ye=function requireBrowser(){return we||(we=1,function(e,t){t.formatArgs=function formatArgs(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))}),t.splice(o,0,r)},t.save=function save(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function load(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function useColors(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function localstorage(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=function requireCommon(){return Fe||(Fe=1,Me=function setup(e){function createDebug(e){let t,r,n,o=null;function debug(...e){if(!debug.enabled)return;const r=debug,n=Number(new Date),o=n-(t||n);r.diff=o,r.prev=t,r.curr=n,t=n,e[0]=createDebug.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,n)=>{if("%%"===t)return"%";i++;const o=createDebug.formatters[n];if("function"==typeof o){const n=e[i];t=o.call(r,n),e.splice(i,1),i--}return t}),createDebug.formatArgs.call(r,e),(r.log||createDebug.log).apply(r,e)}return debug.namespace=e,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(e),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==createDebug.namespaces&&(r=createDebug.namespaces,n=createDebug.enabled(e)),n),set:e=>{o=e}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(e,t){const r=createDebug(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function matchesTemplate(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,i++,r=i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function coerce(e){return e instanceof Error?e.stack||e.message:e},createDebug.disable=function disable(){const e=[...createDebug.names,...createDebug.skips.map(e=>"-"+e)].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const t=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of t)"-"===e[0]?createDebug.skips.push(e.slice(1)):createDebug.names.push(e)},createDebug.enabled=function enabled(e){for(const t of createDebug.skips)if(matchesTemplate(e,t))return!1;for(const t of createDebug.names)if(matchesTemplate(e,t))return!0;return!1},createDebug.humanize=requireMs(),createDebug.destroy=function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(t=>{createDebug[t]=e[t]}),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function selectColor(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return createDebug.colors[Math.abs(t)%createDebug.colors.length]},createDebug.enable(createDebug.load()),createDebug}),Me}()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(xe,xe.exports)),xe.exports}(),$e=getDefaultExportFromCjs(Ye);function requireType(){return Ge?ke:(Ge=1,ke=TypeError)}var He,je,Ve,qe,Ke,We,Xe,ze,Je,Qe,Ze,et,tt,rt,nt,ot,it,st,at,ut,ct,lt,pt,dt,Et,ft,gt,ht,_t,mt,yt,Rt,At,It,Tt,St,Ct,Nt,Ot,bt,Pt,Ut,Dt,Lt,vt,Bt,Mt,Ft,wt,xt,kt,Gt,Yt,$t,Ht,jt,Vt,qt,Kt,Wt,Xt,zt,Jt,Qt,Zt,er,tr,rr,nr,or,ir,sr,ar,ur,cr,lr,pr,dr,Er,fr,gr,hr,_r,mr,yr,Rr,Ar,Ir,Tr=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}}));function requireObjectInspect(){if(je)return He;je=1;var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&"function"==typeof t.get?t.get:null,n=e&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=o&&i&&"function"==typeof i.get?i.get:null,u=o&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,l="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,E=Object.prototype.toString,f=Function.prototype.toString,g=String.prototype.match,h=String.prototype.slice,_=String.prototype.replace,m=String.prototype.toUpperCase,y=String.prototype.toLowerCase,R=RegExp.prototype.test,A=Array.prototype.concat,I=Array.prototype.join,T=Array.prototype.slice,S=Math.floor,C="function"==typeof BigInt?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,b="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===b||"symbol")?Symbol.toStringTag:null,U=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function addNumericSeparator(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||R.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-S(-e):S(e);if(n!==e){var o=String(n),i=h.call(t,o.length+1);return _.call(o,r,"$&_")+"."+_.call(_.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,r,"$&_")}var L=Tr,v=L.custom,B=isSymbol(v)?v:null,M={__proto__:null,double:'"',single:"'"},F={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wrapQuotes(e,t,r){var n=r.quoteStyle||t,o=M[n];return o+e+o}function quote(e){return _.call(String(e),/"/g,"&quot;")}function canTrustToString(e){return!P||!("object"==typeof e&&(P in e||void 0!==e[P]))}function isArray(e){return"[object Array]"===toStr(e)&&canTrustToString(e)}function isRegExp(e){return"[object RegExp]"===toStr(e)&&canTrustToString(e)}function isSymbol(e){if(b)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}He=function inspect_(e,t,o,i){var E=t||{};if(has(E,"quoteStyle")&&!has(M,E.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(E,"maxStringLength")&&("number"==typeof E.maxStringLength?E.maxStringLength<0&&E.maxStringLength!==1/0:null!==E.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!has(E,"customInspect")||E.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(E,"indent")&&null!==E.indent&&"\t"!==E.indent&&!(parseInt(E.indent,10)===E.indent&&E.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(E,"numericSeparator")&&"boolean"!=typeof E.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var R=E.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return inspectString(e,E);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return R?addNumericSeparator(e,S):S}if("bigint"==typeof e){var N=String(e)+"n";return R?addNumericSeparator(e,N):N}var v=void 0===E.depth?5:E.depth;if(void 0===o&&(o=0),o>=v&&v>0&&"object"==typeof e)return isArray(e)?"[Array]":"[Object]";var F=function getIndent(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=I.call(Array(e.indent+1)," ")}return{base:r,prev:I.call(Array(t+1),r)}}(E,o);if(void 0===i)i=[];else if(indexOf(i,e)>=0)return"[Circular]";function inspect(e,t,r){if(t&&(i=T.call(i)).push(t),r){var n={depth:E.depth};return has(E,"quoteStyle")&&(n.quoteStyle=E.quoteStyle),inspect_(e,n,o+1,i)}return inspect_(e,E,o+1,i)}if("function"==typeof e&&!isRegExp(e)){var w=function nameOf(e){if(e.name)return e.name;var t=g.call(f.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(e),x=arrObjKeys(e,inspect);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(x.length>0?" { "+I.call(x,", ")+" }":"")}if(isSymbol(e)){var k=b?_.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(e);return"object"!=typeof e||b?k:markBoxed(k)}if(function isElement(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(e)){for(var G="<"+y.call(String(e.nodeName)),Y=e.attributes||[],$=0;$<Y.length;$++)G+=" "+Y[$].name+"="+wrapQuotes(quote(Y[$].value),"double",E);return G+=">",e.childNodes&&e.childNodes.length&&(G+="..."),G+="</"+y.call(String(e.nodeName))+">"}if(isArray(e)){if(0===e.length)return"[]";var H=arrObjKeys(e,inspect);return F&&!function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}(H)?"["+indentedJoin(H,F)+"]":"[ "+I.call(H,", ")+" ]"}if(function isError(e){return"[object Error]"===toStr(e)&&canTrustToString(e)}(e)){var j=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||U.call(e,"cause")?0===j.length?"["+String(e)+"]":"{ ["+String(e)+"] "+I.call(j,", ")+" }":"{ ["+String(e)+"] "+I.call(A.call("[cause]: "+inspect(e.cause),j),", ")+" }"}if("object"==typeof e&&m){if(B&&"function"==typeof e[B]&&L)return L(e,{depth:v-o});if("symbol"!==m&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!r||!e||"object"!=typeof e)return!1;try{r.call(e);try{s.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var V=[];return n&&n.call(e,function(t,r){V.push(inspect(r,e,!0)+" => "+inspect(t,e))}),collectionOf("Map",r.call(e),V,F)}if(function isSet(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e);try{r.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var q=[];return u&&u.call(e,function(t){q.push(inspect(t,e))}),collectionOf("Set",s.call(e),q,F)}if(function isWeakMap(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e,c);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{c.call(e,c)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return"[object Number]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(C.call(e)));if(function isBoolean(e){return"[object Boolean]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(d.call(e));if(function isString(e){return"[object String]"===toStr(e)&&canTrustToString(e)}(e))return markBoxed(inspect(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==Le&&e===Le)return"{ [object globalThis] }";if(!function isDate(e){return"[object Date]"===toStr(e)&&canTrustToString(e)}(e)&&!isRegExp(e)){var K=arrObjKeys(e,inspect),W=D?D(e)===Object.prototype:e instanceof Object||e.constructor===Object,X=e instanceof Object?"":"null prototype",z=!W&&P&&Object(e)===e&&P in e?h.call(toStr(e),8,-1):X?"Object":"",J=(W||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(z||X?"["+I.call(A.call([],z||[],X||[]),": ")+"] ":"");return 0===K.length?J+"{}":F?J+"{"+indentedJoin(K,F)+"}":J+"{ "+I.call(K,", ")+" }"}return String(e)};var w=Object.prototype.hasOwnProperty||function(e){return e in this};function has(e,t){return w.call(e,t)}function toStr(e){return E.call(e)}function indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function inspectString(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString(h.call(e,0,t.maxStringLength),t)+n}var o=F[t.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes(_.call(_.call(e,o,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",t)}function lowbyte(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+m.call(t.toString(16))}function markBoxed(e){return"Object("+e+")"}function weakCollectionOf(e){return e+" { ? }"}function collectionOf(e,t,r,n){return e+" ("+t+") {"+(n?indentedJoin(r,n):I.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+I.call(e,","+r)+"\n"+t.prev}function arrObjKeys(e,t){var r=isArray(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=has(e,o)?t(e[o],e):""}var i,s="function"==typeof N?N(e):[];if(b){i={};for(var u=0;u<s.length;u++)i["$"+s[u]]=s[u]}for(var c in e)has(e,c)&&(r&&String(Number(c))===c&&c<e.length||b&&i["$"+c]instanceof Symbol||(R.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof N)for(var l=0;l<s.length;l++)U.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}return He}function requireSideChannelList(){if(qe)return Ve;qe=1;var e=requireObjectInspect(),t=requireType(),listGetNode=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n};return Ve=function getSideChannelList(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(e){var t=r&&r.next,n=function(e,t){if(e)return listGetNode(e,t,!0)}(r,e);return n&&t&&t===n&&(r=void 0),!!n},get:function(e){return function(e,t){if(e){var r=listGetNode(e,t);return r&&r.value}}(r,e)},has:function(e){return function(e,t){return!!e&&!!listGetNode(e,t)}(r,e)},set:function(e,t){r||(r={next:void 0}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,e,t)}};return n}}function requireEsObjectAtoms(){return We?Ke:(We=1,Ke=Object)}function requireEsErrors(){return ze?Xe:(ze=1,Xe=Error)}function require_eval(){return Qe?Je:(Qe=1,Je=EvalError)}function requireRange(){return et?Ze:(et=1,Ze=RangeError)}function requireRef(){return rt?tt:(rt=1,tt=ReferenceError)}function requireSyntax(){return ot?nt:(ot=1,nt=SyntaxError)}function requireUri(){return st?it:(st=1,it=URIError)}function requireAbs(){return ut?at:(ut=1,at=Math.abs)}function requireFloor(){return lt?ct:(lt=1,ct=Math.floor)}function requireMax(){return dt?pt:(dt=1,pt=Math.max)}function requireMin(){return ft?Et:(ft=1,Et=Math.min)}function requirePow(){return ht?gt:(ht=1,gt=Math.pow)}function requireRound(){return mt?_t:(mt=1,_t=Math.round)}function require_isNaN(){return Rt?yt:(Rt=1,yt=Number.isNaN||function isNaN(e){return e!=e})}function requireSign(){if(It)return At;It=1;var e=require_isNaN();return At=function sign(t){return e(t)||0===t?t:t<0?-1:1}}function requireGOPD(){return St?Tt:(St=1,Tt=Object.getOwnPropertyDescriptor)}function requireGopd(){if(Nt)return Ct;Nt=1;var e=requireGOPD();if(e)try{e([],"length")}catch(t){e=null}return Ct=e}function requireEsDefineProperty(){if(bt)return Ot;bt=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return Ot=e}function requireHasSymbols(){if(Lt)return Dt;Lt=1;var e="undefined"!=typeof Symbol&&Symbol,t=function requireShams(){return Ut?Pt:(Ut=1,Pt=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0})}();return Dt=function hasNativeSymbols(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function requireReflect_getPrototypeOf(){return Bt?vt:(Bt=1,vt="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return Ft?Mt:(Ft=1,Mt=requireEsObjectAtoms().getPrototypeOf||null)}function requireImplementation(){if(xt)return wt;xt=1;var e=Object.prototype.toString,t=Math.max,r=function concatty(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};return wt=function bind(n){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function slicy(e,t){for(var r=[],n=t,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),u=t(0,o.length-s.length),c=[],l=0;l<u;l++)c[l]="$"+l;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var e=o.apply(this,r(s,arguments));return Object(e)===e?e:this}return o.apply(n,r(s,arguments))}),o.prototype){var p=function Empty(){};p.prototype=o.prototype,i.prototype=new p,p.prototype=null}return i},wt}function requireFunctionBind(){if(Gt)return kt;Gt=1;var e=requireImplementation();return kt=Function.prototype.bind||e}function requireFunctionCall(){return $t?Yt:($t=1,Yt=Function.prototype.call)}function requireFunctionApply(){return jt?Ht:(jt=1,Ht=Function.prototype.apply)}function requireActualApply(){if(Wt)return Kt;Wt=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireFunctionCall(),n=function requireReflectApply(){return qt?Vt:(qt=1,Vt="undefined"!=typeof Reflect&&Reflect&&Reflect.apply)}();return Kt=n||e.call(r,t)}function requireCallBindApplyHelpers(){if(zt)return Xt;zt=1;var e=requireFunctionBind(),t=requireType(),r=requireFunctionCall(),n=requireActualApply();return Xt=function callBindBasic(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o)}}function requireGet(){if(Qt)return Jt;Qt=1;var e,t=requireCallBindApplyHelpers(),r=requireGopd();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Jt=n&&"function"==typeof n.get?t([n.get]):"function"==typeof i&&function getDunder(e){return i(null==e?e:o(e))}}function requireGetProto(){if(er)return Zt;er=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),r=requireGet();return Zt=e?function getProto(t){return e(t)}:t?function getProto(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function getProto(e){return r(e)}:null}function requireHasown(){if(rr)return tr;rr=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=requireFunctionBind();return tr=r.call(e,t)}function requireGetIntrinsic(){if(or)return nr;var e;or=1;var t=requireEsObjectAtoms(),r=requireEsErrors(),n=require_eval(),o=requireRange(),i=requireRef(),s=requireSyntax(),u=requireType(),c=requireUri(),l=requireAbs(),p=requireFloor(),d=requireMax(),E=requireMin(),f=requirePow(),g=requireRound(),h=requireSign(),_=Function,getEvalledConstructor=function(e){try{return _('"use strict"; return ('+e+").constructor;")()}catch(e){}},m=requireGopd(),y=requireEsDefineProperty(),throwTypeError=function(){throw new u},R=m?function(){try{return throwTypeError}catch(e){try{return m(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,A=requireHasSymbols()(),I=requireGetProto(),T=requireObject_getPrototypeOf(),S=requireReflect_getPrototypeOf(),C=requireFunctionApply(),N=requireFunctionCall(),O={},b="undefined"!=typeof Uint8Array&&I?I(Uint8Array):e,P={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":A&&I?I([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":O,"%AsyncGenerator%":O,"%AsyncGeneratorFunction%":O,"%AsyncIteratorPrototype%":O,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":O,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&I?I(I([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&A&&I?I((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":m,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&A&&I?I((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&I?I(""[Symbol.iterator]()):e,"%Symbol%":A?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":R,"%TypedArray%":b,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":N,"%Function.prototype.apply%":C,"%Object.defineProperty%":y,"%Object.getPrototypeOf%":T,"%Math.abs%":l,"%Math.floor%":p,"%Math.max%":d,"%Math.min%":E,"%Math.pow%":f,"%Math.round%":g,"%Math.sign%":h,"%Reflect.getPrototypeOf%":S};if(I)try{null.error}catch(e){var U=I(I(e));P["%Error.prototype%"]=U}var D=function doEval(e){var t;if("%AsyncFunction%"===e)t=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===e)t=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===e){var r=doEval("%AsyncGeneratorFunction%");r&&(t=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=doEval("%AsyncGenerator%");n&&I&&(t=I(n.prototype))}return P[e]=t,t},L={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=requireFunctionBind(),B=requireHasown(),M=v.call(N,Array.prototype.concat),F=v.call(C,Array.prototype.splice),w=v.call(N,String.prototype.replace),x=v.call(N,String.prototype.slice),k=v.call(N,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,$=function getBaseIntrinsic(e,t){var r,n=e;if(B(L,n)&&(n="%"+(r=L[n])[0]+"%"),B(P,n)){var o=P[n];if(o===O&&(o=D(n)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new s("intrinsic "+e+" does not exist!")};return nr=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function stringToPath(e){var t=x(e,0,1),r=x(e,-1);if("%"===t&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return w(e,G,function(e,t,r,o){n[n.length]=r?w(o,Y,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=$("%"+n+"%",t),i=o.name,c=o.value,l=!1,p=o.alias;p&&(n=p[0],F(r,M([0,1],p)));for(var d=1,E=!0;d<r.length;d+=1){var f=r[d],g=x(f,0,1),h=x(f,-1);if(('"'===g||"'"===g||"`"===g||'"'===h||"'"===h||"`"===h)&&g!==h)throw new s("property names with quotes must have matching quotes");if("constructor"!==f&&E||(l=!0),B(P,i="%"+(n+="."+f)+"%"))c=P[i];else if(null!=c){if(!(f in c)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(m&&d+1>=r.length){var _=m(c,f);c=(E=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:c[f]}else E=B(c,f),c=c[f];E&&!l&&(P[i]=c)}}return c},nr}function requireCallBound(){if(sr)return ir;sr=1;var e=requireGetIntrinsic(),t=requireCallBindApplyHelpers(),r=t([e("%String.prototype.indexOf%")]);return ir=function callBoundIntrinsic(n,o){var i=e(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?t([i]):i}}function requireSideChannelMap(){if(ur)return ar;ur=1;var e=requireGetIntrinsic(),t=requireCallBound(),r=requireObjectInspect(),n=requireType(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),u=t("Map.prototype.has",!0),c=t("Map.prototype.delete",!0),l=t("Map.prototype.size",!0);return ar=!!o&&function getSideChannelMap(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+r(e))},delete:function(t){if(e){var r=c(e,t);return 0===l(e)&&(e=void 0),r}return!1},get:function(t){if(e)return i(e,t)},has:function(t){return!!e&&u(e,t)},set:function(t,r){e||(e=new o),s(e,t,r)}};return t}}function requireSideChannel(){if(dr)return pr;dr=1;var e=requireType(),t=requireObjectInspect(),r=requireSideChannelList(),n=requireSideChannelMap(),o=function requireSideChannelWeakmap(){if(lr)return cr;lr=1;var e=requireGetIntrinsic(),t=requireCallBound(),r=requireObjectInspect(),n=requireSideChannelMap(),o=requireType(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),u=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),l=t("WeakMap.prototype.delete",!0);return cr=i?function getSideChannelWeakMap(){var e,t,p={assert:function(e){if(!p.has(e))throw new o("Side channel does not contain "+r(e))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(e)return l(e,r)}else if(n&&t)return t.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&e?s(e,r):t&&t.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):!!t&&t.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new i),u(e,r,o)):n&&(t||(t=n()),t.set(r,o))}};return p}:n}(),i=o||n||r;return pr=function getSideChannel(){var r,n={assert:function(r){if(!n.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(e){return!!r&&r.delete(e)},get:function(e){return r&&r.get(e)},has:function(e){return!!r&&r.has(e)},set:function(e,t){r||(r=i()),r.set(e,t)}};return n}}function requireFormats(){if(fr)return Er;fr=1;var e=String.prototype.replace,t=/%20/g,r="RFC3986";return Er={default:r,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}}function requireUtils(){if(hr)return gr;hr=1;var e=requireFormats(),t=requireSideChannel(),r=Object.prototype.hasOwnProperty,n=Array.isArray,o=t(),i=function markOverflow(e,t){return o.set(e,t),e},s=function isOverflow(e){return o.has(e)},u=function getMaxIndex(e){return o.get(e)},c=function setMaxIndex(e,t){o.set(e,t)},l=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),p=function arrayToObject(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},d=1024;return gr={arrayToObject:p,assign:function assignSingleSource(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function combine(e,t,r,n){if(s(e)){var o=u(e)+1;return e[o]=t,c(e,o),e}var l=[].concat(e,t);return l.length>r?i(p(l,{plainObjects:n}),l.length-1):l},compact:function compact(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var i=t[o],s=i.obj[i.prop],u=Object.keys(s),c=0;c<u.length;++c){var l=u[c],p=s[l];"object"==typeof p&&null!==p&&-1===r.indexOf(p)&&(t[t.length]={obj:s,prop:l},r[r.length]=p)}return function compactQueue(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var o=[],i=0;i<r.length;++i)void 0!==r[i]&&(o[o.length]=r[i]);t.obj[t.prop]=o}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function encode(t,r,n,o,i){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var u="",c=0;c<s.length;c+=d){for(var p=s.length>=d?s.slice(c,c+d):s,E=[],f=0;f<p.length;++f){var g=p.charCodeAt(f);45===g||46===g||95===g||126===g||g>=48&&g<=57||g>=65&&g<=90||g>=97&&g<=122||i===e.RFC1738&&(40===g||41===g)?E[E.length]=p.charAt(f):g<128?E[E.length]=l[g]:g<2048?E[E.length]=l[192|g>>6]+l[128|63&g]:g<55296||g>=57344?E[E.length]=l[224|g>>12]+l[128|g>>6&63]+l[128|63&g]:(f+=1,g=65536+((1023&g)<<10|1023&p.charCodeAt(f)),E[E.length]=l[240|g>>18]+l[128|g>>12&63]+l[128|g>>6&63]+l[128|63&g])}u+=E.join("")}return u},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:s,isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:i,maybeMap:function maybeMap(e,t){if(n(e)){for(var r=[],o=0;o<e.length;o+=1)r[r.length]=t(e[o]);return r}return t(e)},merge:function merge(e,t,o){if(!t)return e;if("object"!=typeof t&&"function"!=typeof t){if(n(e)){var l=e.length;if(o&&"number"==typeof o.arrayLimit&&l>o.arrayLimit)return i(p(e.concat(t),o),l);e[l]=t}else{if(!e||"object"!=typeof e)return[e,t];if(s(e)){var d=u(e)+1;e[d]=t,c(e,d)}else{if(o&&o.strictMerge)return[e,t];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,t))&&(e[t]=!0)}}return e}if(!e||"object"!=typeof e){if(s(t)){for(var E=Object.keys(t),f=o&&o.plainObjects?{__proto__:null,0:e}:{0:e},g=0;g<E.length;g++){f[parseInt(E[g],10)+1]=t[E[g]]}return i(f,u(t)+1)}var h=[e].concat(t);return o&&"number"==typeof o.arrayLimit&&h.length>o.arrayLimit?i(p(h,o),h.length-1):h}var _=e;return n(e)&&!n(t)&&(_=p(e,o)),n(e)&&n(t)?(t.forEach(function(t,n){if(r.call(e,n)){var i=e[n];i&&"object"==typeof i&&t&&"object"==typeof t?e[n]=merge(i,t,o):e[e.length]=t}else e[n]=t}),e):Object.keys(t).reduce(function(e,n){var l=t[n];if(r.call(e,n)?e[n]=merge(e[n],l,o):e[n]=l,s(t)&&!s(e)&&i(e,u(t)),s(e)){var p=parseInt(n,10);String(p)===n&&p>=0&&p>u(e)&&c(e,p)}return e},_)}},gr}function requireStringify(){if(mr)return _r;mr=1;var e=requireSideChannel(),t=requireUtils(),r=requireFormats(),n=Object.prototype.hasOwnProperty,o={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},i=Array.isArray,s=Array.prototype.push,pushToArray=function(e,t){s.apply(e,i(t)?t:[t])},u=Date.prototype.toISOString,c=r.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:r.formatters[c],indices:!1,serializeDate:function serializeDate(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p={},d=function stringify(r,n,o,s,u,c,d,E,f,g,h,_,m,y,R,A,I,T){for(var S=r,C=T,N=0,O=!1;void 0!==(C=C.get(p))&&!O;){var b=C.get(r);if(N+=1,void 0!==b){if(b===N)throw new RangeError("Cyclic object value");O=!0}void 0===C.get(p)&&(N=0)}if("function"==typeof g?S=g(n,S):S instanceof Date?S=m(S):"comma"===o&&i(S)&&(S=t.maybeMap(S,function(e){return e instanceof Date?m(e):e})),null===S){if(c)return f&&!A?f(n,l.encoder,I,"key",y):n;S=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(S)||t.isBuffer(S))return f?[R(A?n:f(n,l.encoder,I,"key",y))+"="+R(f(S,l.encoder,I,"value",y))]:[R(n)+"="+R(String(S))];var P,U=[];if(void 0===S)return U;if("comma"===o&&i(S))A&&f&&(S=t.maybeMap(S,f)),P=[{value:S.length>0?S.join(",")||null:void 0}];else if(i(g))P=g;else{var D=Object.keys(S);P=h?D.sort(h):D}var L=E?String(n).replace(/\./g,"%2E"):String(n),v=s&&i(S)&&1===S.length?L+"[]":L;if(u&&i(S)&&0===S.length)return v+"[]";for(var B=0;B<P.length;++B){var M=P[B],F="object"==typeof M&&M&&void 0!==M.value?M.value:S[M];if(!d||null!==F){var w=_&&E?String(M).replace(/\./g,"%2E"):String(M),x=i(S)?"function"==typeof o?o(v,w):v:v+(_?"."+w:"["+w+"]");T.set(r,N);var k=e();k.set(p,T),pushToArray(U,stringify(F,x,o,s,u,c,d,E,"comma"===o&&A&&i(S)?null:f,g,h,_,m,y,R,A,I,k))}}return U};return _r=function(t,s){var u,c=t,p=function normalizeStringifyOptions(e){if(!e)return l;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||l.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var s=r.default;if(void 0!==e.format){if(!n.call(r.formatters,e.format))throw new TypeError("Unknown format option provided.");s=e.format}var u,c=r.formatters[s],p=l.filter;if(("function"==typeof e.filter||i(e.filter))&&(p=e.filter),u=e.arrayFormat in o?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":l.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=void 0===e.allowDots?!0===e.encodeDotInKeys||l.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:l.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:l.allowEmptyArrays,arrayFormat:u,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:l.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?l.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:l.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:l.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:l.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:l.encodeValuesOnly,filter:p,format:s,formatter:c,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:l.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:l.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:l.strictNullHandling}}(s);"function"==typeof p.filter?c=(0,p.filter)("",c):i(p.filter)&&(u=p.filter);var E=[];if("object"!=typeof c||null===c)return"";var f=o[p.arrayFormat],g="comma"===f&&p.commaRoundTrip;u||(u=Object.keys(c)),p.sort&&u.sort(p.sort);for(var h=e(),_=0;_<u.length;++_){var m=u[_],y=c[m];p.skipNulls&&null===y||pushToArray(E,d(y,m,f,g,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,h))}var R=E.join(p.delimiter),A=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?A+="utf8=%26%2310003%3B&":A+="utf8=%E2%9C%93&"),R.length>0?A+R:""},_r}function requireParse(){if(Rr)return yr;Rr=1;var e=requireUtils(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},o=function parseQueryStringKeys(r,n,o,i){if(r){var s=function splitKeyIntoSegments(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0){if(!r.plainObjects&&t.call(Object.prototype,n)&&!r.allowPrototypes)return;return[n]}var o=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(n),s=i?n.slice(0,i.index):n,u=[];if(s){if(!r.plainObjects&&t.call(Object.prototype,s)&&!r.allowPrototypes)return;u[u.length]=s}for(var c=0;null!==(i=o.exec(n))&&c<r.depth;){c+=1;var l=i[1].slice(1,-1);if(!r.plainObjects&&t.call(Object.prototype,l)&&!r.allowPrototypes)return;u[u.length]=i[1]}if(i){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u[u.length]="["+n.slice(i.index)+"]"}return u}(r,o);if(s)return function(t,r,n,o){var i=0;if(t.length>0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");i=Array.isArray(r)&&r[s]?r[s].length:0}for(var u=o?r:parseArrayValue(r,n,i),c=t.length-1;c>=0;--c){var l,p=t[c];if("[]"===p&&n.parseArrays)l=e.isOverflow(u)?u:n.allowEmptyArrays&&(""===u||n.strictNullHandling&&null===u)?[]:e.combine([],u,n.arrayLimit,n.plainObjects);else{l=n.plainObjects?{__proto__:null}:{};var d="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,E=n.decodeDotInKeys?d.replace(/%2E/g,"."):d,f=parseInt(E,10),g=!isNaN(f)&&p!==E&&String(f)===E&&f>=0&&n.parseArrays;if(n.parseArrays||""!==E)if(g&&f<n.arrayLimit)(l=[])[f]=u;else{if(g&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(1===n.arrayLimit?"":"s")+" allowed in an array.");g?(l[f]=u,e.markOverflow(l,f)):"__proto__"!==E&&(l[E]=u)}else l={0:u}}u=l}return u}(s,n,o,i)}};return yr=function(i,s){var u=function normalizeParseOptions(t){if(!t)return n;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===t.charset?n.charset:t.charset,o=void 0===t.duplicates?n.duplicates:t.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||n.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:n.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:n.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:n.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:n.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:n.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:n.strictDepth,strictMerge:"boolean"==typeof t.strictMerge?!!t.strictMerge:n.strictMerge,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(s);if(""===i||null==i)return u.plainObjects?{__proto__:null}:{};for(var c="string"==typeof i?function parseQueryStringValues(o,i){var s={__proto__:null},u=i.ignoreQueryPrefix?o.replace(/^\?/,""):o;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var c=i.parameterLimit===1/0?void 0:i.parameterLimit,l=u.split(i.delimiter,i.throwOnLimitExceeded?c+1:c);if(i.throwOnLimitExceeded&&l.length>c)throw new RangeError("Parameter limit exceeded. Only "+c+" parameter"+(1===c?"":"s")+" allowed.");var p,d=-1,E=i.charset;if(i.charsetSentinel)for(p=0;p<l.length;++p)0===l[p].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[p]?E="utf-8":"utf8=%26%2310003%3B"===l[p]&&(E="iso-8859-1"),d=p,p=l.length);for(p=0;p<l.length;++p)if(p!==d){var f,g,h=l[p],_=h.indexOf("]="),m=-1===_?h.indexOf("="):_+1;if(-1===m?(f=i.decoder(h,n.decoder,E,"key"),g=i.strictNullHandling?null:""):null!==(f=i.decoder(h.slice(0,m),n.decoder,E,"key"))&&(g=e.maybeMap(parseArrayValue(h.slice(m+1),i,r(s[f])?s[f].length:0),function(e){return i.decoder(e,n.decoder,E,"value")})),g&&i.interpretNumericEntities&&"iso-8859-1"===E&&(g=interpretNumericEntities(String(g))),h.indexOf("[]=")>-1&&(g=r(g)?[g]:g),i.comma&&r(g)&&g.length>i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(1===i.arrayLimit?"":"s")+" allowed in an array.");g=e.combine([],g,i.arrayLimit,i.plainObjects)}if(null!==f){var y=t.call(s,f);y&&("combine"===i.duplicates||h.indexOf("[]=")>-1)?s[f]=e.combine(s[f],g,i.arrayLimit,i.plainObjects):y&&"last"!==i.duplicates||(s[f]=g)}}return s}(i,u):i,l=u.plainObjects?{__proto__:null}:{},p=Object.keys(c),d=0;d<p.length;++d){var E=p[d],f=o(E,c[E],u,"string"==typeof i);l=e.merge(l,f,u)}return!0===u.allowSparse?l:e.compact(l)}}function requireLib(){if(Ir)return Ar;Ir=1;var e=requireStringify(),t=requireParse();return Ar={formats:requireFormats(),parse:t,stringify:e}}var Sr=requireLib();const Cr=$e("ebay:request"),Nr={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"X-Requested-With, Origin, Content-Type, X-Auth-Token","Access-Control-Allow-Methods":"GET, PUT, POST, DELETE"},Or={"Content-Type":"multipart/form-data"},br={paramsSerializer:{indexes:null}};class AxiosRequest{constructor(e={}){this.instance=ge.create({headers:{...Nr},...br,...e})}get(e,t){return Cr("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return Cr("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return Cr("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return Cr("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}postForm(e,t,r){Cr("postForm: "+e);const n=Sr.stringify(t);return this.instance.post(e,n,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}const Pr=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Ur=new RegExp("^"+("["+Pr+"]["+(Pr+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*")+"$");function getAllMatches(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r}const isName=function(e){const t=Ur.exec(e);return!(null==t)};const Dr={allowBooleanAttributes:!1,unpairedTags:[]};function isWhiteSpace(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function readPI(e,t){const r=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const n=e.substr(r,t-r);if(t>5&&"xml"===n)return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function readCommentAndCDATA(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}const Lr='"',vr="'";function readAttributeStr(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if(e[t]===Lr||e[t]===vr)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const Br=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=getAllMatches(e,Br),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",getPositionFromMatch(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",getPositionFromMatch(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",getPositionFromMatch(r[e]));const o=r[e][2];if(!validateAttrName(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is an invalid name.",getPositionFromMatch(r[e]));if(n.hasOwnProperty(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is repeated.",getPositionFromMatch(r[e]));n[o]=1}return!0}function validateAmpersand(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function validateNumberAmpersand(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function getErrorObject(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function validateAttrName(e){return isName(e)}function validateTagName(e){return isName(e)}function getLineNumberForPosition(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function getPositionFromMatch(e){return e.startIndex+e[1].length}const Mr={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e},captureMetaData:!1};function normalizeProcessEntities(e){return"boolean"==typeof e?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,allowedTags:null,tagFilter:null}:"object"==typeof e&&null!==e?{enabled:!1!==e.enabled,maxEntitySize:e.maxEntitySize??1e4,maxExpansionDepth:e.maxExpansionDepth??10,maxTotalExpansions:e.maxTotalExpansions??1e3,maxExpandedLength:e.maxExpandedLength??1e5,allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null}:normalizeProcessEntities(!0)}const buildOptions=function(e){const t=Object.assign({},Mr,e);return t.processEntities=normalizeProcessEntities(t.processEntities),t};let Fr;Fr="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),void 0!==t&&(this.child[this.child.length-1][Fr]={startIndex:t})}static getMetaDataSymbol(){return Fr}}class DocTypeReader{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,o=!1,i=!1,s="";for(;t<e.length;t++)if("<"!==e[t]||i)if(">"===e[t]){if(i?"-"===e[t-1]&&"-"===e[t-2]&&(i=!1,n--):n--,0===n)break}else"["===e[t]?o=!0:s+=e[t];else{if(o&&hasSeq(e,"!ENTITY",t)){let n,o;if(t+=7,[n,o,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),-1===o.indexOf("&")){const e=n.replace(/[.\-+*:]/g,"\\.");r[n]={regx:RegExp(`&${e};`,"g"),val:o}}}else if(o&&hasSeq(e,"!ELEMENT",t)){t+=8;const{index:r}=this.readElementExp(e,t+1);t=r}else if(o&&hasSeq(e,"!ATTLIST",t))t+=8;else if(o&&hasSeq(e,"!NOTATION",t)){t+=9;const{index:r}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=r}else{if(!hasSeq(e,"!--",t))throw new Error("Invalid DOCTYPE");i=!0}n++,s=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}readEntityExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t])&&'"'!==e[t]&&"'"!==e[t];)r+=e[t],t++;if(validateEntityName(r),t=skipWhitespace(e,t),!this.suppressValidationErr){if("SYSTEM"===e.substring(t,t+6).toUpperCase())throw new Error("External entities are not supported");if("%"===e[t])throw new Error("Parameter entities are not supported")}let n="";if([t,n]=this.readIdentifierVal(e,t,"entity"),!1!==this.options.enabled&&this.options.maxEntitySize&&n.length>this.options.maxEntitySize)throw new Error(`Entity "${r}" size (${n.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[r,n,--t]}readNotationExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;!this.suppressValidationErr&&validateEntityName(r),t=skipWhitespace(e,t);const n=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==n&&"PUBLIC"!==n)throw new Error(`Expected SYSTEM or PUBLIC, found "${n}"`);t+=n.length,t=skipWhitespace(e,t);let o=null,i=null;if("PUBLIC"===n)[t,o]=this.readIdentifierVal(e,t,"publicIdentifier"),'"'!==e[t=skipWhitespace(e,t)]&&"'"!==e[t]||([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"));else if("SYSTEM"===n&&([t,i]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:r,publicIdentifier:o,systemIdentifier:i,index:--t}}readIdentifierVal(e,t,r){let n="";const o=e[t];if('"'!==o&&"'"!==o)throw new Error(`Expected quoted string, found "${o}"`);for(t++;t<e.length&&e[t]!==o;)n+=e[t],t++;if(e[t]!==o)throw new Error(`Unterminated ${r} value`);return[++t,n]}readElementExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!this.suppressValidationErr&&!isName(r))throw new Error(`Invalid element name: "${r}"`);let n="";if("E"===e[t=skipWhitespace(e,t)]&&hasSeq(e,"MPTY",t))t+=4;else if("A"===e[t]&&hasSeq(e,"NY",t))t+=2;else if("("===e[t]){for(t++;t<e.length&&")"!==e[t];)n+=e[t],t++;if(")"!==e[t])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:r,contentModel:n.trim(),index:t}}readAttlistExp(e,t){t=skipWhitespace(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;validateEntityName(r),t=skipWhitespace(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;if(!validateEntityName(n))throw new Error(`Invalid attribute name: "${n}"`);t=skipWhitespace(e,t);let o="";if("NOTATION"===e.substring(t,t+8).toUpperCase()){if(o="NOTATION","("!==e[t=skipWhitespace(e,t+=8)])throw new Error(`Expected '(', found "${e[t]}"`);t++;let r=[];for(;t<e.length&&")"!==e[t];){let n="";for(;t<e.length&&"|"!==e[t]&&")"!==e[t];)n+=e[t],t++;if(n=n.trim(),!validateEntityName(n))throw new Error(`Invalid notation name: "${n}"`);r.push(n),"|"===e[t]&&(t++,t=skipWhitespace(e,t))}if(")"!==e[t])throw new Error("Unterminated list of notations");t++,o+=" ("+r.join("|")+")"}else{for(;t<e.length&&!/\s/.test(e[t]);)o+=e[t],t++;const r=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!r.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: "${o}"`)}t=skipWhitespace(e,t);let i="";return"#REQUIRED"===e.substring(t,t+8).toUpperCase()?(i="#REQUIRED",t+=8):"#IMPLIED"===e.substring(t,t+7).toUpperCase()?(i="#IMPLIED",t+=7):[t,i]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:r,attributeName:n,attributeType:o,defaultValue:i,index:t}}}const skipWhitespace=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function hasSeq(e,t,r){for(let n=0;n<t.length;n++)if(t[n]!==e[r+n+1])return!1;return!0}function validateEntityName(e){if(isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const wr=/^[-+]?0x[a-fA-F0-9]+$/,xr=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,kr={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function toNumber(e,t={}){if(t=Object.assign({},kr,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if("0"===e)return 0;if(t.hex&&wr.test(r))return function parse_int(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(r,16);if(r.includes("e")||r.includes("E"))return function resolveEnotation(e,t,r){if(!r.eNotation)return e;const n=t.match(Gr);if(n){let o=n[1]||"";const i=-1===n[3].indexOf("e")?"E":"e",s=n[2],u=o?e[s.length+1]===i:e[s.length]===i;return s.length>1&&u?e:1!==s.length||!n[3].startsWith(`.${i}`)&&n[3][0]!==i?r.leadingZeros&&!u?(t=(n[1]||"")+n[3],Number(t)):e:Number(t)}return e}(e,r,t);{const n=xr.exec(r);if(n){const o=n[1]||"",i=n[2];let s=function trimZeros(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substring(0,e.length-1)),e;return e}(n[3]);const u=o?"."===e[i.length+1]:"."===e[i.length];if(!t.leadingZeros&&(i.length>1||1===i.length&&!u))return e;{const n=Number(r),u=String(n);if(0===n)return n;if(-1!==u.search(/[eE]/))return t.eNotation?n:e;if(-1!==r.indexOf("."))return"0"===u||u===s||u===`${o}${s}`?n:e;let c=i?s:r;return i?c===u||o+c===u?n:e:c===u||c===o+u?n:e}}return e}}const Gr=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function getIgnoreAttributesFn(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const r of e){if("string"==typeof r&&t===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}}:()=>!1}class OrderedObjParser{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>fromCodePoint(t,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>fromCodePoint(t,16,"&#x")}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$1,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild,this.ignoreAttributesFn=getIgnoreAttributesFn(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){const t=this.options.stopNodes[e];"string"==typeof t&&(t.startsWith("*.")?this.stopNodesWildcard.add(t.substring(2)):this.stopNodesExact.add(t))}}}}function addExternalEntities(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r],o=n.replace(/[.\-+*:]/g,"\\.");this.lastEntities[n]={regex:new RegExp("&"+o+";","g"),val:e[n]}}}function parseTextData(e,t,r,n,o,i,s){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e,t,r));const n=this.options.tagValueProcessor(t,e,r,o,i);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return parseValue(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?parseValue(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function resolveNameSpace(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const Yr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=getAllMatches(e,Yr),o=n.length,i={};for(let e=0;e<o;e++){const o=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(o,t))continue;let s=n[e][4],u=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(u=this.options.transformAttributeName(u)),"__proto__"===u&&(u="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s,r,t);const e=this.options.attributeValueProcessor(o,s,t);i[u]=null==e?s:typeof e!=typeof s||e!==s?e:parseValue(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[u]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const parseXml=function(e){e=e.replace(/\r\n?/g,"\n");const t=new XmlNode("!xml");let r=t,n="",o="";this.entityExpansionCount=0,this.currentExpandedLength=0;const i=new DocTypeReader(this.options.processEntities);for(let s=0;s<e.length;s++){if("<"===e[s])if("/"===e[s+1]){const t=findClosingIndex(e,">",s,"Closing Tag is not closed.");let i=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),r&&(n=this.saveTextToParentTag(n,r,o));const u=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let c=0;u&&-1!==this.options.unpairedTags.indexOf(u)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),r=this.tagsNodeStack.pop(),n="",s=t}else if("?"===e[s+1]){let t=readTagExp(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new XmlNode(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(r,e,o,s)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=findClosingIndex(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(s+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=t}else if("!D"===e.substr(s+1,2)){const t=i.readDocType(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=findClosingIndex(e,"]]>",s,"CDATA is not closed.")-2,i=e.substring(s+9,t);n=this.saveTextToParentTag(n,r,o);let u=this.parseTextData(i,r.tagname,o,!0,!1,!0,!0);null==u&&(u=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):r.add(this.options.textNodeName,u),s=t+2}else{let i=readTagExp(e,s,this.options.removeNSPrefix),u=i.tagName;const c=i.rawTagName;let l=i.tagExp,p=i.attrExpPresent,d=i.closeIndex;if(this.options.transformTagName){const e=this.options.transformTagName(u);l===u&&(l=e),u=e}r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const E=r;E&&-1!==this.options.unpairedTags.indexOf(E.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),u!==t.tagname&&(o+=o?"."+u:u);const f=s;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,o,u)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===u[u.length-1]?(u=u.substr(0,u.length-1),o=o.substr(0,o.length-1),l=u):l=l.substr(0,l.length-1),s=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(u))s=i.closeIndex;else{const r=this.readStopNodeData(e,c,d+1);if(!r)throw new Error(`Unexpected end of ${c}`);s=r.i,t=r.tagContent}const n=new XmlNode(u);u!==l&&p&&(n[":@"]=this.buildAttributesMap(l,o,u)),t&&(t=this.parseTextData(t,u,o,!0,p,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,o,f)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){if("/"===u[u.length-1]?(u=u.substr(0,u.length-1),o=o.substr(0,o.length-1),l=u):l=l.substr(0,l.length-1),this.options.transformTagName){const e=this.options.transformTagName(u);l===u&&(l=e),u=e}const e=new XmlNode(u);u!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o,u)),this.addChild(r,e,o,f),o=o.substr(0,o.lastIndexOf("."))}else{const e=new XmlNode(u);this.tagsNodeStack.push(r),u!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o,u)),this.addChild(r,e,o,f),r=e}n="",s=d}}else n+=e[s]}return t.child};function addChild(e,t,r,n){this.options.captureMetaData||(n=void 0);const o=this.options.updateTag(t.tagname,r,t[":@"]);!1===o||("string"==typeof o?(t.tagname=o,e.addChild(t,n)):e.addChild(t,n))}const replaceEntitiesValue$1=function(e,t,r){if(-1===e.indexOf("&"))return e;const n=this.options.processEntities;if(!n.enabled)return e;if(n.allowedTags&&!n.allowedTags.includes(t))return e;if(n.tagFilter&&!n.tagFilter(t,r))return e;for(let t in this.docTypeEntities){const r=this.docTypeEntities[t],o=e.match(r.regx);if(o){if(this.entityExpansionCount+=o.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);const t=e.length;if(e=e.replace(r.regx,r.val),n.maxExpandedLength&&(this.currentExpandedLength+=e.length-t,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}if(-1===e.indexOf("&"))return e;for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(-1===e.indexOf("&"))return e;if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}return e=e.replace(this.ampEntity.regex,this.ampEntity.val)};function saveTextToParentTag(e,t,r,n){return e&&(void 0===n&&(n=0===t.child.length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function isItStopNode(e,t,r,n){return!(!t||!t.has(n))||!(!e||!e.has(r))}function findClosingIndex(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function readTagExp(e,t,r,n=">"){const o=function tagExpWithClosingIndex(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,u=i.search(/\s/);let c=i,l=!0;-1!==u&&(c=i.substring(0,u),i=i.substring(u+1).trimStart());const p=c;if(r){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==o.data.substr(e+1))}return{tagName:c,tagExp:i,closeIndex:s,attrExpPresent:l,rawTagName:p}}function readStopNodeData(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=findClosingIndex(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i:i};r=i}else if("?"===e[r+1]){r=findClosingIndex(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=findClosingIndex(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=findClosingIndex(e,"]]>",r,"StopNode is not closed.")-2}else{const n=readTagExp(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex}}}function parseValue(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&toNumber(e,r)}return function isExist(e){return void 0!==e}(e)?e:""}function fromCodePoint(e,t,r){const n=Number.parseInt(e,t);return n>=0&&n<=1114111?String.fromCodePoint(n):r+e+";"}const $r=XmlNode.getMetaDataSymbol();function prettify(e,t){return compress(e,t)}function compress(e,t,r){let n;const o={};for(let i=0;i<e.length;i++){const s=e[i],u=propName$1(s);let c="";if(c=void 0===r?u:r+"."+u,u===t.textNodeName)void 0===n?n=s[u]:n+=""+s[u];else{if(void 0===u)continue;if(s[u]){let e=compress(s[u],t,c);const r=isLeafTag(e,t);void 0!==s[$r]&&(e[$r]=s[$r]),s[":@"]?assignAttributes(e,s[":@"],c,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==o[u]&&o.hasOwnProperty(u)?(Array.isArray(o[u])||(o[u]=[o[u]]),o[u].push(e)):t.isArray(u,c,r)?o[u]=[e]:o[u]=e}}}return"string"==typeof n?n.length>0&&(o[t.textNodeName]=n):void 0!==n&&(o[t.textNodeName]=n),o}function propName$1(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function assignAttributes(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let s=0;s<i;s++){const i=o[s];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function isLeafTag(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}class XMLParser{constructor(e){this.externalEntities={},this.options=buildOptions(e)}parse(e,t){if("string"!=typeof e&&e.toString)e=e.toString();else if("string"!=typeof e)throw new Error("XML data is accepted in String or Bytes[] form.");if(t){!0===t&&(t={});const r=function validate(e,t){t=Object.assign({},Dr,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=readPI(e,i),i.err)return i}else{if("<"!==e[i]){if(isWhiteSpace(e[i]))continue;return getErrorObject("InvalidChar","char '"+e[i]+"' is not expected.",getLineNumberForPosition(e,i))}{let s=i;if(i++,"!"===e[i]){i=readCommentAndCDATA(e,i);continue}{let u=!1;"/"===e[i]&&(u=!0,i++);let c="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)c+=e[i];if(c=c.trim(),"/"===c[c.length-1]&&(c=c.substring(0,c.length-1),i--),!validateTagName(c)){let t;return t=0===c.trim().length?"Invalid space after '<'.":"Tag '"+c+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,i))}const l=readAttributeStr(e,i);if(!1===l)return getErrorObject("InvalidAttr","Attributes for '"+c+"' have open quote.",getLineNumberForPosition(e,i));let p=l.value;if(i=l.index,"/"===p[p.length-1]){const r=i-p.length;p=p.substring(0,p.length-1);const o=validateAttributeString(p,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(u){if(!l.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",getLineNumberForPosition(e,i));if(p.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,s));if(0===r.length)return getErrorObject("InvalidTag","Closing tag '"+c+"' has not been opened.",getLineNumberForPosition(e,s));{const t=r.pop();if(c!==t.tagName){let r=getLineNumberForPosition(e,t.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+c+"'.",getLineNumberForPosition(e,s))}0==r.length&&(o=!0)}}else{const u=validateAttributeString(p,t);if(!0!==u)return getErrorObject(u.err.code,u.err.msg,getLineNumberForPosition(e,i-p.length+u.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,i));-1!==t.unpairedTags.indexOf(c)||r.push({tagName:c,tagStartPos:s}),n=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=readCommentAndCDATA(e,i);continue}if("?"!==e[i+1])break;if(i=readPI(e,++i),i.err)return i}else if("&"===e[i]){const t=validateAmpersand(e,i);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,i));i=t}else if(!0===o&&!isWhiteSpace(e[i]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,i));"<"===e[i]&&i--}}}return n?1==r.length?getErrorObject("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",getLineNumberForPosition(e,r[0].tagStartPos)):!(r.length>0)||getErrorObject("InvalidXml","Invalid '"+JSON.stringify(r.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):getErrorObject("InvalidXml","Start tag expected.",1)}(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new OrderedObjParser(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:prettify(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}static getMetaDataSymbol(){return XmlNode.getMetaDataSymbol()}}function toXml(e,t){let r="";return t.format&&t.indentBy.length>0&&(r="\n"),arrToStr(e,t,"",r)}function arrToStr(e,t,r,n){let o="",i=!1;for(let s=0;s<e.length;s++){const u=e[s],c=propName(u);if(void 0===c)continue;let l="";if(l=0===r.length?c:`${r}.${c}`,c===t.textNodeName){let e=u[c];isStopNode(l,t)||(e=t.tagValueProcessor(c,e),e=replaceEntitiesValue(e,t)),i&&(o+=n),o+=e,i=!1;continue}if(c===t.cdataPropName){i&&(o+=n),o+=`<![CDATA[${u[c][0][t.textNodeName]}]]>`,i=!1;continue}if(c===t.commentPropName){o+=n+`\x3c!--${u[c][0][t.textNodeName]}--\x3e`,i=!0;continue}if("?"===c[0]){const e=attr_to_str(u[":@"],t),r="?xml"===c?"":n;let s=u[c][0][t.textNodeName];s=0!==s.length?" "+s:"",o+=r+`<${c}${s}${e}?>`,i=!0;continue}let p=n;""!==p&&(p+=t.indentBy);const d=n+`<${c}${attr_to_str(u[":@"],t)}`,E=arrToStr(u[c],t,l,p);-1!==t.unpairedTags.indexOf(c)?t.suppressUnpairedNode?o+=d+">":o+=d+"/>":E&&0!==E.length||!t.suppressEmptyNode?E&&E.endsWith(">")?o+=d+`>${E}${n}</${c}>`:(o+=d+">",E&&""!==n&&(E.includes("/>")||E.includes("</"))?o+=n+t.indentBy+E+n:o+=E,o+=`</${c}>`):o+=d+"/>",i=!0}return o}function propName(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let o=t.attributeValueProcessor(n,e[n]);o=replaceEntitiesValue(o,t),!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function isStopNode(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function replaceEntitiesValue(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}const Hr={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(e){this.options=Object.assign({},Hr,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=getIgnoreAttributesFn(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function processTextOrObjNode(e,t,r,n){const o=this.j2x(e,r+1,n.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,r):this.buildObjectNode(o.val,t,o.attrStr,r)}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){return this.options.preserveOrder?toXml(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},Builder.prototype.j2x=function(e,t,r){let n="",o="";const i=r.join(".");for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(void 0===e[s])this.isAttribute(s)&&(o+="");else if(null===e[s])this.isAttribute(s)||s===this.options.cdataPropName?o+="":"?"===s[0]?o+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)o+=this.buildTextValNode(e[s],s,"",t);else if("object"!=typeof e[s]){const r=this.isAttribute(s);if(r&&!this.ignoreAttributesFn(r,i))n+=this.buildAttrPairStr(r,""+e[s]);else if(!r)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,""+e[s]);o+=this.replaceEntitiesValue(t)}else o+=this.buildTextValNode(e[s],s,"",t)}else if(Array.isArray(e[s])){const n=e[s].length;let i="",u="";for(let c=0;c<n;c++){const n=e[s][c];if(void 0===n);else if(null===n)"?"===s[0]?o+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const e=this.j2x(n,t+1,r.concat(s));i+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(u+=e.attrStr)}else i+=this.processTextOrObjNode(n,s,t,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(s,n);e=this.replaceEntitiesValue(e),i+=e}else i+=this.buildTextValNode(n,s,"",t)}this.options.oneListGroup&&(i=this.buildObjectNode(i,s,u,t)),o+=i}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const t=Object.keys(e[s]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[s][t[o]])}else o+=this.processTextOrObjNode(e[s],s,t,r);return{attrStr:n,val:o}},Builder.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},Builder.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+i+">"+e+o}},Builder.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},Builder.prototype.buildTextValNode=function(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},Builder.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e};const jr=$e("ebay:error"),Vr=Symbol("raw-error");class EBayError extends Error{constructor(e,t="",r={}){super(e),this.name=this.constructor.name,this.description=t,this.meta=r,Object.setPrototypeOf(this,new.target.prototype)}}class EBayNoCallError extends EBayError{constructor(e="No eBay API call defined, please invoke one."){super(e)}}class ApiEnvError extends EBayError{constructor(e){super(`Could not find ${e} in process.env.`)}}class EbayApiError extends EBayError{constructor(e,t,r,n,o){super(e,t,r),this.errorCode=n,this.firstError=o}}class EBayApiError extends EbayApiError{}class EBayAccessDenied extends EBayApiError{}class EBayInvalidGrant extends EBayApiError{}class EBayNotFound extends EBayApiError{}EBayNotFound.code=11001;class EBayInvalidAccessToken extends EBayApiError{}class EBayIAFTokenExpired extends EBayApiError{}EBayIAFTokenExpired.code=21917053;class EBayAuthTokenIsInvalid extends EBayApiError{}EBayAuthTokenIsInvalid.code=931;class EBayAuthTokenIsHardExpired extends EBayApiError{}EBayAuthTokenIsHardExpired.code=932;class EBayIAFTokenInvalid extends EBayApiError{}EBayIAFTokenInvalid.code=21916984;class EBayTokenRequired extends EBayApiError{}EBayTokenRequired.code=930;class EBayInvalidScope extends EBayApiError{}const getErrorMessage=e=>"message"in e?e.message:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ShortMessage:e.Errors.ShortMessage:"eBay API request error",getErrorDescription=(e,t)=>"description"in e?e.description:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].LongMessage:e.Errors.LongMessage:"longMessage"in e?e.longMessage:(200!==t?.status?t?.statusText:"")||"",getErrorCode=e=>"errorId"in e?e.errorId:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ErrorCode:e.Errors.ErrorCode:void 0,extractEBayError=(e,t)=>{const r=function getEBayError(e){return e?"string"==typeof e?{message:e}:"Errors"in e?e:"error"in e&&"string"==typeof e.error?{message:e.error,description:e.error_description||""}:"errors"in e&&Array.isArray(e.errors)?e.errors[0]:"errorMessage"in e?Array.isArray(e.errorMessage?.error)?e.errorMessage.error[0]:e.errorMessage.error:{message:"Unknown eBay API Error",description:'This error response is not known. You should investigate the "meta.res.data" for more information.'}:{message:"eBay API Error",description:"No data is set in response result."}}(t||e.response?.data),n={...r,[Vr]:e},o="Errors"in r?Array.isArray(r.Errors)?r.Errors[0]:r.Errors:r;return e?.response&&(n.res={status:e.response.status,statusText:e.response.statusText,headers:e.response.headers,data:e.response.data??{}}),e?.config&&(n.req={url:e.config.url,method:e.config.method,headers:e.config.headers,params:e.config.params}),{message:getErrorMessage(r),description:getErrorDescription(r,e?.response),errorCode:getErrorCode(r),meta:n,firstError:o}},handleEBayError=e=>{if(jr("handleEBayError",e),e instanceof EBayError||!e.response)throw e;if("object"!=typeof e)throw new EBayError(e);const{message:t,meta:r,description:n,errorCode:o,firstError:i}=extractEBayError(e);if("domain"in r&&"ACCESS"===r.domain)throw new EBayAccessDenied(t,n,r,o,i);if("message"in r&&"invalid_grant"===r.message)throw new EBayInvalidGrant(t,n,r,o,i);if("message"in r&&"invalid_scope"===r.message)throw new EBayInvalidScope(t,n,r,o,i);if("message"in r&&"Invalid access token"===r.message)throw new EBayInvalidAccessToken(t,n,r,o,i);if(o===EBayNotFound.code)throw new EBayNotFound(t,n,r,o,i);throw new EBayApiError(t,n,r,o,i)},checkEBayTraditionalResponse=(e,t)=>{if(!t)return void jr("checkEBayTraditionalResponse: No data found in response.");if(!("Errors"in t)&&!("errorMessage"in t))return;if("Errors"in t&&"Failure"!==t.Ack)return void jr(`checkEBayTraditionalResponse: eBay API returned ${t.Ack}`);const{message:r,meta:n,description:o,errorCode:i,firstError:s}=extractEBayError(e,t);if(void 0===i)throw new EBayApiError(r,o,n,i,s);switch(i){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(r,o,n,i,s);case EBayIAFTokenInvalid.code:case 1.32:throw new EBayIAFTokenInvalid(r,o,n,i,s);case EBayTokenRequired.code:throw new EBayTokenRequired(r,o,n,i,s);case EBayAuthTokenIsHardExpired.code:throw new EBayAuthTokenIsHardExpired(r,o,n,i,s);case EBayAuthTokenIsInvalid.code:throw new EBayAuthTokenIsInvalid(r,o,n,i,s)}throw new EBayApiError(r,o,n,i,s)};var qr=Object.freeze({__proto__:null,ApiEnvError:ApiEnvError,EBayAccessDenied:EBayAccessDenied,EBayApiError:EBayApiError,EBayAuthTokenIsHardExpired:EBayAuthTokenIsHardExpired,EBayAuthTokenIsInvalid:EBayAuthTokenIsInvalid,EBayError:EBayError,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayInvalidGrant:EBayInvalidGrant,EBayInvalidScope:EBayInvalidScope,EBayNoCallError:EBayNoCallError,EBayNotFound:EBayNotFound,EBayTokenRequired:EBayTokenRequired,EbayApiError:EbayApiError,checkEBayTraditionalResponse:checkEBayTraditionalResponse,extractEBayError:extractEBayError,handleEBayError:handleEBayError,rawError:Vr});const Kr=$e("ebay:xml:request"),Wr={attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"},Xr={attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseTagValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,isArray:(e,t)=>/Array$/.test(t.slice(0,-e.length-1))},zr={raw:!1,parseOptions:Xr,xmlBuilderOptions:Wr,useIaf:!0,sign:!1,headers:{},returnResponse:!1},Jr={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EBayNoCallError;this.config={...zr,...r},this.j2x=new Builder({...Wr,...this.config.xmlBuilderOptions}),this.callName=e,this.fields=t||{},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getParseOptions(){return{...Xr,...this.config.parseOptions}}getHeaders(){return{...Jr,...this.config.headers}}toJSON(e){const t=this.getParseOptions();return Kr("parseOption",t),new XMLParser(t).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+this.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);Kr("xml",e);try{const{body:t,headers:r={}}=this.config.hook?.(e)??{body:e},n={headers:{...this.getHeaders(),...this.config.digitalSignatureHeaders?this.config.digitalSignatureHeaders(t):{},...r||{}}};Kr("config",n);const o=await this.req.post(this.config.endpoint,t,n);if(Kr("response",o),this.config.returnResponse)return o;const{data:i}=o;if(this.config.raw)return i;const s=this.xml2JSON(i);return checkEBayTraditionalResponse(o,s),s}catch(e){if(Kr("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayTraditionalResponse(e,t[this.callName+"Response"])}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}const Qr=$e("ebay:authNAuth");class AuthNAuth extends Base{static generateAuthUrl(e,t,r,n=!1){return[e?AuthNAuth.SIGNIN_ENDPOINT.sandbox:AuthNAuth.SIGNIN_ENDPOINT.production,"?SignIn","&RuName=",encodeURIComponent(t),"&SessID=",encodeURIComponent(r),n?"&prompt=login":""].join("")}constructor(e,t){super(e,t),this.authToken=null,this.config.authToken&&this.setAuthToken(this.config.authToken)}get apiEndpoint(){return this.config.sandbox?AuthNAuth.API_ENDPOINT.sandbox:AuthNAuth.API_ENDPOINT.production}async getSessionIdAndAuthUrl(e){if(!this.config.devId)throw new Error("DevId is required.");if(!(e=e||this.config.ruName))throw new Error("RuName is required.");const t=new XMLRequest("GetSessionID",{RuName:e},this.getRequestConfig("GetSessionID"),this.req),r=await t.request();return Qr("GetSessionID data",r),{sessionId:r.SessionID,url:AuthNAuth.generateAuthUrl(this.config.sandbox,e,r.SessionID)}}async mintToken(e){if(!this.config.devId)throw new Error("DevId is required.");const t=new XMLRequest("FetchToken",{SessionID:e},this.getRequestConfig("FetchToken"),this.req);try{return await t.request()}catch(e){throw Qr("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return Qr("Obtain auth token",t),this.setAuthToken(t),t}setAuthToken(e){this.authToken="string"==typeof e?{eBayAuthToken:e}:e}getAuthToken(){return this.authToken?{...this.authToken}:null}get eBayAuthToken(){return this.authToken?.eBayAuthToken??null}getRequestConfig(e){if("number"!=typeof this.config.siteId)throw new Error("\"siteId\" is required for Auth'n'Auth.");return{useIaf:!1,xmlns:"urn:ebay:apis:eBLBaseComponents",endpoint:this.apiEndpoint,headers:{"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967}}}}AuthNAuth.SIGNIN_ENDPOINT={sandbox:"https://signin.sandbox.ebay.com/ws/eBayISAPI.dll",production:"https://signin.ebay.com/ws/eBayISAPI.dll"},AuthNAuth.API_ENDPOINT={production:"https://api.ebay.com/ws/api.dll",sandbox:"https://api.sandbox.ebay.com/ws/api.dll"};let createNanoEvents=()=>({events:{},emit(e,...t){const r=this.events[e]||[];for(let e=0,n=r.length;e<n;e++)r[e](...t)},on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}});const Zr=$e("ebay:oauth2");class OAuth2 extends Base{constructor(e,t){super(e,t),this.emitter=createNanoEvents(),this.scope=this.config.scope||OAuth2.defaultScopes}on(e,t){return this.emitter.on(e,t)}get identityEndpoint(){return this.config.sandbox?OAuth2.IDENTITY_ENDPOINT.sandbox:OAuth2.IDENTITY_ENDPOINT.production}static generateAuthUrl(e,t,r,n,o=""){return[e?OAuth2.AUTHORIZE_ENDPOINT.sandbox:OAuth2.AUTHORIZE_ENDPOINT.production,"?client_id=",encodeURIComponent(t),"&redirect_uri=",encodeURIComponent(r),"&response_type=code","&state=",encodeURIComponent(o),"&scope=",encodeURIComponent(n.join(" "))].join("")}generateAuthUrl(e,t=this.scope,r=""){if(!(e=e||this.config.ruName))throw new Error("RuName is required.");return OAuth2.generateAuthUrl(this.config.sandbox,this.config.appId,e,t,r)}async getAccessToken(){return this.getUserAccessToken()||this.getApplicationAccessToken()}getUserAccessToken(){return this._authToken?.access_token??null}async getApplicationAccessToken(){if(this._clientToken)return Zr("Return existing application access token: ",this._clientToken),this._clientToken.access_token;try{return(await this.obtainApplicationAccessToken()).access_token}catch(e){throw e}}getScope(){return[...this.scope]}setClientToken(e){this._clientToken=e}setScope(e){this.scope=e}async mintApplicationAccessToken(){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{return(await this.req.postForm(this.identityEndpoint,{scope:this.scope.join(" "),grant_type:"client_credentials"},{auth:{username:this.config.appId,password:this.config.certId}})).data}catch(e){throw Zr("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){Zr("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return Zr("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw Zr("Failed to obtain application token",e),e}}async mintUserAccessToken(e,t=this.config.ruName){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{const r=(await this.req.postForm(this.identityEndpoint,{grant_type:"authorization_code",code:e,redirect_uri:t},{auth:{username:this.config.appId,password:this.config.certId}})).data;return Zr("User Access Token",r),r}catch(e){throw Zr("Failed to get the token",e),e}}async getToken(e,t=this.config.ruName){return await this.mintUserAccessToken(e,t)}async refreshUserAccessToken(){if(!this._authToken||!this._authToken.refresh_token)throw Zr("Tried to refresh user access token before it was set."),new Error("Failed to refresh the user access token. Token or refresh_token is not set.");try{const e=(await this.req.postForm(this.identityEndpoint,{grant_type:"refresh_token",refresh_token:this._authToken.refresh_token,scope:this.scope.join(" ")},{auth:{username:this.config.appId,password:this.config.certId}})).data;Zr("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw Zr("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return Zr("Obtain user access token",t),this.setCredentials(t),t}getCredentials(){return this._authToken?{...this._authToken}:this._clientToken?{...this._clientToken}:null}setCredentials(e){this._authToken="string"==typeof e?{refresh_token:"",expires_in:7200,refresh_token_expires_in:47304e3,token_type:"User Access Token",access_token:e}:e}async refreshToken(){if(this._authToken)return await this.refreshUserAccessToken();if(this._clientToken)return await this.obtainApplicationAccessToken();throw new Error("Missing credentials. To refresh a token an application access token or user access token must be already set.")}}OAuth2.IDENTITY_ENDPOINT={production:"https://api.ebay.com/identity/v1/oauth2/token",sandbox:"https://api.sandbox.ebay.com/identity/v1/oauth2/token"},OAuth2.AUTHORIZE_ENDPOINT={production:"https://auth.ebay.com/oauth2/authorize",sandbox:"https://auth.sandbox.ebay.com/oauth2/authorize"},OAuth2.defaultScopes=["https://api.ebay.com/oauth/api_scope"];class Auth extends Base{constructor(e,t){super(e,t),this.authNAuth=new AuthNAuth(this.config,this.req),this.OAuth2=new OAuth2(this.config,this.req),this.oAuth2=this.OAuth2}async getHeaderAuthorization(e){if(this.authNAuth.eBayAuthToken)return{Authorization:"Token "+this.authNAuth.eBayAuthToken};return{Authorization:(e?"IAF ":"Bearer ")+await this.OAuth2.getAccessToken()}}}const en="-----BEGIN PRIVATE KEY-----",getUnixTimestamp=()=>Math.floor(Date.now()/1e3),getSignatureParams=e=>[...e?["content-digest"]:[],"x-ebay-signature-key","@method","@path","@authority"],getSignatureParamsValue=e=>getSignatureParams(e).map(e=>`"${e}"`).join(" "),generateContentDigestValue=(e,t="sha256")=>{const r=Buffer.from("string"==typeof e?e:JSON.stringify(e));return`${"sha512"===t?"sha-512":"sha-256"}=:${function createHash(){throw Error("crypto.createHash is not supported in browser.")}().update(r).digest("base64")}:`};const generateSignatureInput=(e,t=getUnixTimestamp())=>`sig1=(${getSignatureParamsValue(e)});created=${t}`;function generateSignature(e,t,r,n,o=getUnixTimestamp()){const i=function generateBaseString(e,t,r,n=getUnixTimestamp()){try{let o="";return getSignatureParams(r).forEach(r=>{if(o+=`"${r.toLowerCase()}": `,r.startsWith("@"))switch(r.toLowerCase()){case"@method":o+=t.method;break;case"@authority":o+=t.authority;break;case"@path":o+=t.path;break;default:throw new Error("Unknown pseudo header "+r)}else{if(!e[r])throw new Error("Header "+r+" not included in message");o+=e[r]}o+="\n"}),o+=`"@signature-params": (${getSignatureParamsValue(r)});created=${n}`,o}catch(e){throw new EBayError(`Error calculating signature base: ${e.message}`)}}(e,r,n,o);(t=t.trim()).startsWith(en)||(t=en+"\n"+t+"\n-----END PRIVATE KEY-----");return`sig1=:${function sign(){throw Error("crypto.sign is not supported in browser.")}(Buffer.from(i)).toString("base64")}:`}class Api extends Base{constructor(e,t,r){super(e,t),this.auth=r||new Auth(this.config,this.req)}getDigitalSignatureHeaders(e,t){if(!this.config.signature)return{};const r=getUnixTimestamp(),n={"x-ebay-enforce-signature":!0,"x-ebay-signature-key":this.config.signature.jwe,...t?{"content-digest":generateContentDigestValue(t,this.config.signature.cipher??"sha256")}:{},"signature-input":generateSignatureInput(t,r)};return{...n,signature:generateSignature(n,this.config.signature.privateKey,e,t,r)}}}const tn={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},rn={marketplaceId:"X-EBAY-C-MARKETPLACE-ID",endUserCtx:"X-EBAY-C-ENDUSERCTX",acceptLanguage:"Accept-Language",contentLanguage:"Content-Language"};class Restful extends Api{constructor(e,t,r,n={}){super(e,t,r),this.apiConfig={...this.getApiConfig(),...n}}static buildServerUrl(e,t,r,n){return`${e}${t}.${r?"sandbox.":""}${n}`}get useIaf(){return!1}get schema(){return"https://"}get subdomain(){return"api"}get apiVersionPath(){return""}getServerUrl({schema:e,subdomain:t,apiVersion:r,basePath:n,sandbox:o,tld:i}){return Restful.buildServerUrl(e,t,o,i)+r+n}getApiConfig(){return{subdomain:this.subdomain,useIaf:this.useIaf,apiVersion:this.apiVersionPath,basePath:this.basePath,schema:this.schema,sandbox:this.config.sandbox,tld:"ebay.com",headers:{},returnResponse:!1,sign:!1}}get baseUrl(){return this.getServerUrl(this.apiConfig)}api(e){return new this.constructor(this.config,this.req,this.auth,e)}get apix(){return this.api({subdomain:"apix"})}get apiz(){return this.api({subdomain:"apiz"})}get sign(){return this.api({sign:!0})}async get(e,t={},r){return this.doRequest({method:"get",path:e,config:t},r)}async delete(e,t={},r){return this.doRequest({method:"delete",path:e,config:t},r)}async post(e,t,r={},n){return this.doRequest({method:"post",path:e,data:t,config:r},n)}async put(e,t,r={},n){return this.doRequest({method:"put",path:e,data:t,config:r},n)}get additionalHeaders(){return Object.keys(rn).filter(e=>void 0!==this.config[e]).reduce((e,t)=>(e[rn[t]]=this.config[t],e),{})}async enrichRequestConfig(e,t=null,r=this.apiConfig){const n=await this.auth.getHeaderAuthorization(r.useIaf),o=r.sign?this.getDigitalSignatureHeaders({method:e.method.toUpperCase(),authority:Restful.buildServerUrl("",r.subdomain,r.sandbox,r.tld),path:r.apiVersion+r.basePath+e.path},t):{},i={...tn,...this.additionalHeaders,...n,...r.headers,...o};return{...e.config,headers:{...e.config.headers||{},...i}}}async doRequest(e,t){try{return await this.request(e,t)}catch(r){if(this.shouldRefreshToken(r))return await this.request(e,t,!0);throw r}}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayInvalidAccessToken.name||(403===e?.meta?.res?.status&&"/sell/inventory/v1"===this.apiConfig.basePath||401===e?.meta?.res?.status&&"/post-order/v2"===this.apiConfig.basePath))}async request(e,t=this.apiConfig,r=!1){const{path:n,method:o,data:i}=e,s={...this.apiConfig,...t},u=this.getServerUrl(s)+n;try{r&&await this.auth.OAuth2.refreshToken();const t=await this.enrichRequestConfig(e,i,s),n=["get","delete"].includes(o)?[t]:[i,t],c=await this.req[o](u,...n);return this.apiConfig.returnResponse?c:c.data}catch(e){handleEBayError(e)}}}class Browse extends Restful{get basePath(){return"/buy/browse/v1"}search(e){return this.get("/item_summary/search",{params:e})}searchByImage(e,t){return this.post("/item_summary/search_by_image",t,{params:e})}getItems(e){return this.get("/item/",{params:e})}getItem(e,t){const r=encodeURIComponent(e);return this.get(`/item/${r}`,{params:{fieldgroups:t}})}getItemByLegacyId(e){return this.get("/item/get_item_by_legacy_id",{params:e})}getItemsByItemGroup(e){return this.get("/item/get_items_by_item_group",{params:{item_group_id:e}})}checkCompatibility(e,t){const r=encodeURIComponent(e);return this.post(`/item/${r}/check_compatibility`,t)}addItem(e){return this.post("/shopping_cart/add_item",e)}getShoppingCart(){return this.get("/shopping_cart/")}removeItem(e){return this.post("/shopping_cart/remove_item",e)}updateQuantity(e){return this.post("/shopping_cart/update_quantity",e)}}Browse.id="Browse";let nn=class Feed extends Restful{get basePath(){return"/buy/feed/v1_beta"}getItemFeed(e,t){return this.get("/item",{params:e,headers:{Range:t}})}getItemGroupFeed(e,t){return this.get("/item_group",{params:e,headers:{Range:t}})}getItemSnapshotFeed(e,t,r){return this.get("/item_snapshot",{params:{...e,snapshot_date:t},headers:{Range:r}})}getProductFeed(e,t,r){return this.get("/product",{params:{...e,snapshot_date:t},headers:{Range:r}})}};nn.id="Feed";let on=class Marketing extends Restful{get basePath(){return"/buy/marketing/v1_beta"}getAlsoBoughtByProduct(e){return this.get("/merchandised_product/get_also_bought_products",{params:e})}getAlsoViewedByProduct(e){return this.get("/merchandised_product/get_also_viewed_products",{params:e})}getMerchandisedProducts(e){return this.get("/merchandised_product",{params:e})}};on.id="Marketing";class Offer extends Restful{get basePath(){return"/buy/offer/v1_beta"}getBidding(e){const t=encodeURIComponent(e);return this.get(`/bidding/${t}`)}placeProxyBid(e,t){const r=encodeURIComponent(e);return this.post(`/bidding/${r}/place_proxy_bid`,t)}}Offer.id="Offer";class Order extends Restful{get basePath(){return"/buy/order/v1"}applyCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/apply_coupon`,t)}getCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/checkout_session/${e}`)}initiateCheckoutSession(e){return this.post("/checkout_session/initiate",e)}placeOrder(e){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/place_order`)}removeCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/remove_coupon`,t)}updatePaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_payment_info`,t)}updateQuantity(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}checkoutSessionId(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}updateShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_address`,t)}updateShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_option`,t)}applyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/apply_coupon`,t)}getGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/guest_checkout_session/${e}`)}initiateGuestCheckoutSession(e){return this.post("/guest_checkout_session/initiate",e)}initiateGuestPayment(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/initiate_payment`,t)}placeGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/place_order`,t)}removeGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/remove_coupon`,t)}updateGuestPaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_payment_info`,t)}updateGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_quantity`,t)}updateGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_address`,t)}updateGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_option`,t)}applyProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/apply_coupon`,t)}getProxyGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/proxy_guest_checkout_session/${e}`)}initiateProxyGuestCheckoutSession(e){return this.post("/proxy_guest_checkout_session/initiate",e)}placeProxyGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/place_order`,t)}removeProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/remove_coupon`,t)}updateProxyGuestPaymentInfo(e,t,r,n,o,i){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_payment_info`,i,{headers:{Authorization:t,"X-EBAY-C-DATE":r,"X-EBAY-C-REQUEST-NONCE":n,"X-EBAY-C-SIGNATURE":o}})}updateProxyGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_quantity`,t)}updateProxyGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_address`,t)}updateProxyGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_option`,t)}getGuestPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/guest_purchase_order/${e}`)}getPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/purchase_order/${e}`)}}Order.id="Order";class Deal extends Restful{get basePath(){return"/buy/deal/v1"}getDealItems({categoryIds:e,commissionable:t,deliveryCountry:r,limit:n,offset:o}){return this.get("/deal_item",{params:{category_ids:e,commissionable:t,delivery_country:r,limit:n,offset:o}})}getEvent(e){return e=encodeURIComponent(e),this.get(`/event/${e}`)}getEvents({limit:e,offset:t}){return this.get("/event",{params:{limit:e,offset:t}})}getEventItems(e,{categoryIds:t,deliveryCountry:r,limit:n,offset:o}={}){return this.get("/event_item",{params:{event_ids:e,limit:n,offset:o,category_ids:t,delivery_country:r}})}}Deal.id="Deal";class MarketplaceInsights extends Restful{get basePath(){return"/buy/marketplace_insights/v1_beta"}search({aspectFilter:e,categoryIds:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:u,q:c,sort:l}){return this.get("/item_sales/search",{params:{aspect_filter:e,category_ids:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:u,q:c,sort:l}})}}MarketplaceInsights.id="MarketplaceInsights";class Catalog extends Restful{get basePath(){return"/commerce/catalog/v1_beta"}getChangeRequest(e){return this.get(`/change_request/${e}`)}getChangeRequests({filter:e,limit:t,offset:r}={}){return this.get("/change_request",{params:{filter:e,limit:t,offset:r}})}getProduct(e){const t=encodeURIComponent(e);return this.get(`/product/${t}`)}search(e){return this.get("/product_summary/search",{params:e})}getProductMetadata(e,{otherApplicableCategoryIds:t,primaryCategoryId:r}={}){return this.get("/get_product_metadata",{params:{epid:e,other_applicable_category_ids:t,primary_category_id:r}})}getProductMetadataForCategories(e,t){return this.get("/get_product_metadata_for_categories",{params:{primary_category_id:e,other_applicable_category_ids:t}})}}Catalog.id="Catalog";class Charity extends Restful{get basePath(){return"/commerce/charity/v1"}getCharityOrg(e){return e=encodeURIComponent(e),this.get(`/charity_org/${e}`)}getCharityOrgs({limit:e,offset:t,q:r,registrationIds:n}){return this.get("/charity_org",{params:{limit:e,offset:t,q:r,registration_ids:n}})}getCharityOrgByLegacyId(e){return this.get("/charity_org/get_charity_org_by_legacy_id",{params:{legacy_charity_org_id:e}})}}Charity.id="Charity";class Identity extends Restful{get basePath(){return"/commerce/identity/v1"}get subdomain(){return"apiz"}getUser(){return this.get("/user/")}}Identity.id="Identity";class Media extends Restful{get basePath(){return"/commerce/media/v1_beta"}get subdomain(){return"apim"}async createVideo(e){return this.post("/video",e)}async getVideo(e){return e=encodeURIComponent(e),this.get(`/video/${e}`)}async uploadVideo(e,t){return e=encodeURIComponent(e),this.post(`/video/${e}/upload`,t)}}Media.id="Media";class Notification extends Restful{get basePath(){return"/commerce/notification/v1"}getPublicKey(e){return e=encodeURIComponent(e),this.get(`/public_key/${e}`)}getTopic(e){return e=encodeURIComponent(e),this.get(`/topic/${e}`)}getTopics({limit:e,continuationToken:t}){return this.get("/topic",{params:{limit:e,continuation_token:t}})}getSubscriptions({limit:e,continuationToken:t}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}createSubscription(e){return this.post("/subscription",e)}getSubscription(e){return e=encodeURIComponent(e),this.get(`/subscription/${e}`)}updateSubscription(e,t){return e=encodeURIComponent(e),this.put(`/subscription/${e}`,t)}deleteSubscription(e){return e=encodeURIComponent(e),this.delete(`/subscription/${e}`)}enableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/enable`)}disableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/disable`)}test(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/test`)}getDestinations({limit:e,continuationToken:t}){return this.get("/destination",{params:{limit:e,continuation_token:t}})}createDestination(e){return this.post("/destination",e)}getDestination(e){return e=encodeURIComponent(e),this.get(`/destination/${e}`)}updateDestination(e,t){return e=encodeURIComponent(e),this.put(`/destination/${e}`,t)}deleteDestination(e){return e=encodeURIComponent(e),this.delete(`/destination/${e}`)}getConfig(){return this.get("/config")}updateConfig(e){return this.put("/config",e)}}Notification.id="Notification";class Taxonomy extends Restful{get basePath(){return"/commerce/taxonomy/v1"}getDefaultCategoryTreeId(e){return this.get("/get_default_category_tree_id",{params:{marketplace_id:e}})}getCategoryTree(e){const t=encodeURIComponent(e);return this.get(`/category_tree/${t}`)}getCategorySubtree(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_category_subtree`,{params:{category_id:t}})}getCategorySuggestions(e,t){return this.get(`/category_tree/${e}/get_category_suggestions`,{params:{q:t}})}getItemAspectsForCategory(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_item_aspects_for_category`,{params:{category_id:t}})}getCompatibilityProperties(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_properties`,{params:{category_id:t}})}getCompatibilityPropertyValues(e,t,r,n){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r,...n?.trim()&&{filter:n}}})}fetchItemAspects(e){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/fetch_item_aspects`,{responseType:"arraybuffer"})}}Taxonomy.id="Taxonomy";class Translation extends Restful{get basePath(){return"/commerce/translation/v1_beta"}translate(e){return this.post("/translate",e)}}Translation.id="Translation";class Message extends Restful{get basePath(){return"/commerce/message/v1"}getConversations({limit:e,offset:t,conversationStatus:r,conversationType:n,referenceId:o,referenceType:i,startTime:s,endTime:u,otherPartyUsername:c}={}){return this.get("/conversation",{params:{limit:e,offset:t,conversation_status:r,conversation_type:n,reference_id:o,reference_type:i,start_time:s,end_time:u,other_party_username:c}})}getConversation(e,{conversationType:t,limit:r,offset:n}){return this.get(`/conversation/${e}`,{params:{conversation_type:t,limit:r,offset:n}})}updateConversation(e){return this.post("/update_conversation",e)}bulkUpdateConversation(e){return this.post("/bulk_update_conversation",e)}sendMessage(e){return this.post("/send_message",e)}}Message.id="Message";let sn=class Analytics extends Restful{get basePath(){return"/developer/analytics/v1_beta"}getRateLimits(e,t){return this.get("/rate_limit/",{params:{api_context:e,api_name:t}})}getUserRateLimits(e,t){return this.get("/user_rate_limit/",{params:{api_context:e,api_name:t}})}};sn.id="Analytics";class KeyManagement extends Restful{get subdomain(){return"apiz"}get basePath(){return"/developer/key_management/v1"}getSigningKeys(){return this.get("/signing_key")}createSigningKey(e){return this.post("/signing_key",{signingKeyCipher:e})}getSigningKey(e){return this.get(`/signing_key/${e}`)}}KeyManagement.id="KeyManagement";class Cancellation extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}approveCancellationRequest(e){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/approve`)}checkCancellationEligibility(e){return this.post("/cancellation/check_eligibility",{legacyOrderId:e})}confirmRefundReceived(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/confirm`,t)}createCancellation(e){return this.post("/cancellation",e)}getCancellation(e,t){return e=encodeURIComponent(e),this.get(`/cancellation/${e}`,{params:{fieldgroups:t}})}rejectCancellationRequest(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/reject`,t)}search(e){return this.get("/cancellation/search",{params:e})}}Cancellation.id="Cancellation";class Case extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}appealCaseDecision(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/appeal`,t)}closeCase(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/close`,t)}getCase(e){const t=encodeURIComponent(e);return this.get(`/casemanagement/${t}`)}issueCaseRefund(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/issue_refund`,t)}provideReturnShipmentInfo(e,{shippingCarrierName:t,trackingNumber:r}){const n=encodeURIComponent(e);return this.post(`/casemanagement/${n}/provide_shipment_info`,{shippingCarrierName:t,trackingNumber:r})}providesReturnAddress(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/provide_return_address`,t)}search(e){return this.get("/casemanagement/search",{params:e})}}Case.id="Case";class Inquiry extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}checkInquiryEligibility(e){return this.post("/inquiry/check_eligibility",e)}closeInquiry(e,t){return e=encodeURIComponent(e),"string"==typeof t?.closeReason&&(t.closeReason=t.closeReason.trim()),this.post(`/inquiry/${e}/close`,t)}confirmInquiryRefund(e){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/confirm_refund`)}createInquiry(e){return"string"==typeof e.desiredOutcome&&(e.desiredOutcome=e.desiredOutcome.trim()),this.post("/inquiry",e)}escalateInquiry(e,t){return e=encodeURIComponent(e),t.escalateInquiryReason=t.escalateInquiryReason.trim(),this.post(`/inquiry/${e}/escalate`,t)}getInquiry(e){return e=encodeURIComponent(e),this.get(`/inquiry/${e}`)}issueInquiryRefund(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/issue_refund`,t)}provideInquiryRefundInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_refund_info`,t)}provideInquiryShipmentInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_shipment_info`,t)}search(e){return this.get("/inquiry/search",{params:e})}sendInquiryMessage(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/send_message`,t)}}Inquiry.id="Inquiry";class Return extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}addShippingLabelInfo(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/add_shipping_label`,t)}cancelReturnRequest(e,t){const r=encodeURIComponent(e);return t&&t.buyerCloseReason&&(t.buyerCloseReason=t.buyerCloseReason.trim()),this.post(`/return/${r}/cancel`,t)}checkReturnEligibility(e){return this.post("/return/check_eligibility",e)}checkShippingLabelEligibility(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/check_label_print_eligibility`)}createReturnDraft(e){return this.post("/return/draft",e)}createReturnRequest(e,t){return this.post("/return",e,{params:{fieldgroups:t}})}createReturnShippingLabel(e){const t=encodeURIComponent(e);return this.post(`/return/${t}/initiate_shipping_label`)}deleteReturnDraftFile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/return/draft/${e}/file/${t}`)}escalateReturn(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/escalate`,t)}getReturn(e,t){return e=encodeURIComponent(e),this.get(`/return/${e}`,{params:{fieldgroups:t}})}getReturnDraft(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}`)}getReturnDraftFiles(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}/files`)}getReturnEstimate(e){return this.post("/return/estimate",e)}getReturnFiles(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/files`)}getReturnPreferences(){return this.get("/return/preference")}getReturnShippingLabel(e){return e=encodeURIComponent(e),this.get(`/return/${e}/get_shipping_label`)}getShipmentTrackingInfo(e,t,r){return e=encodeURIComponent(e),this.get(`/return/${e}/tracking`,{params:{carrier_used:t,tracking_number:r}})}issueReturnRefund(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/issue_refund`,t)}markReturnReceived(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_received`,t)}markReturnRefundReceived(e){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_received`)}markReturnRefundSent(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_sent`,t)}markReturnShipped(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_shipped`,t)}processReturnRequest(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/decide`,t)}search(e){return this.get("/return/search",{params:e})}sendReturnMessage(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_message`,t)}sendReturnShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_shipping_label`,{},{params:{to_email_address:t}})}setReturnPreferences(e){return this.post("/return/preference",{rmaRequired:e})}submitReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/submit`,{filePurpose:t})}updateReturnDraft(e,t){return e=encodeURIComponent(e),this.put(`/return/draft/${e}`,{returnRequest:t})}updateShipmentTrackingInfo(e,t){return e=encodeURIComponent(e),this.put(`/return/${e}/update_tracking`,t)}uploadReturnDraftFile(e,t){return e=encodeURIComponent(e),this.post(`/return/draft/${e}/file/upload`,t)}uploadReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/upload`,t)}voidShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/void_shipping_label`,t)}}Return.id="Return";class AccountV1 extends Restful{get basePath(){return"/sell/account/v1"}getCustomPolicies(e){return this.get("/custom_policy/",{params:{policy_types:e}})}createCustomPolicy(e){return this.post("/custom_policy/",e)}getCustomPolicy(e){return e=encodeURIComponent(e),this.get(`/custom_policy/${e}`)}updateCustomPolicy(e,t){return e=encodeURIComponent(e),this.put(`/custom_policy/${e}`,t)}getFulfillmentPolicies(e){return this.get("/fulfillment_policy",{params:{marketplace_id:e}})}createFulfillmentPolicy(e){return this.post("/fulfillment_policy/",e)}updateFulfillmentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/fulfillment_policy/${e}`,t)}deleteFulfillmentPolicy(e){return e=encodeURIComponent(e),this.delete(`/fulfillment_policy/${e}`)}getFulfillmentPolicy(e){return this.get(`/fulfillment_policy/${e}`)}getFulfillmentPolicyByName(e,t){return this.get("/fulfillment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentPolicies(e){return this.get("/payment_policy",{params:{marketplace_id:e}})}getPaymentPolicy(e){return e=encodeURIComponent(e),this.get(`/payment_policy/${e}`)}createPaymentPolicy(e){return this.post("/payment_policy",e)}updatePaymentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/payment_policy/${e}`,t)}deletePaymentPolicy(e){return e=encodeURIComponent(e),this.delete(`/payment_policy/${e}`)}getPaymentPolicyByName(e,t){return this.get("/payment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentsProgram(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}`)}getPaymentsProgramOnboarding(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}/onboarding`)}getPrivileges(){return this.get("/privilege")}getOptedInPrograms(){return this.get("/program/get_opted_in_programs")}optInToProgram(e){return this.post("/program/opt_in",e)}optOutOfProgram(e){return this.post("/program/opt_out",e)}getRateTables(e){return this.get("/rate_table",{params:{country_code:e}})}getReturnPolicies(e){return this.get("/return_policy",{params:{marketplace_id:e}})}getReturnPolicy(e){return e=encodeURIComponent(e),this.get(`/return_policy/${e}`)}createReturnPolicy(e){return this.post("/return_policy",e)}updateReturnPolicy(e,t){return e=encodeURIComponent(e),this.put(`/return_policy/${e}`,t)}deleteReturnPolicy(e){return e=encodeURIComponent(e),this.delete(`/return_policy/${e}`)}getReturnPolicyByName(e,t){return this.get("/return_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/sales_tax/${e}/${t}`)}createOrReplaceSalesTax(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/sales_tax/${e}/${t}`,r)}deleteSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/sales_tax/${e}/${t}`)}getSalesTaxes(e){return this.get("/sales_tax",{params:{country_code:e}})}getSubscription({limit:e,continuationToken:t}={}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}getKYC(){return this.get("/kyc")}getAdvertisingEligibility(e){return this.get("/advertising_eligibility",{params:{program_types:e}})}getInventoryLocation(e){return e=encodeURIComponent(e),this.get(`/location/${e}`)}createInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}`,t)}deleteInventoryLocation(e){return e=encodeURIComponent(e),this.delete(`/location/${e}`)}disableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/disable`)}enableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}updateInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}/update_location_details`,t)}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}}AccountV1.id="AccountV1";class AccountV2 extends Restful{get basePath(){return"/sell/account/v2"}getRateTable(e){return e=encodeURIComponent(e),this.get(`/rate_table/${e}`)}updateShippingCost(e,t){return e=encodeURIComponent(e),this.post(`/rate_table/${e}/update_shipping_cost`,t)}getPayoutSettings(){return this.get("/payout_settings")}updatePayoutPercentage(e){return this.post("/payout_settings/update_percentage",e)}}AccountV2.id="AccountV2";class Analytics extends Restful{get basePath(){return"/sell/analytics/v1"}findSellerStandardsProfiles(){return this.get("/seller_standards_profile")}getSellerStandardsProfile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/seller_standards_profile/${e}/${t}`)}getTrafficReport({dimension:e,filter:t,metric:r,sort:n}={}){return this.get("/traffic_report",{params:{dimension:e,filter:t,metric:r,sort:n}})}getCustomerServiceMetric(e,t){return this.get(`/customer_service_metric/${e}/${t}`)}}Analytics.id="Analytics";class Compliance extends Restful{get basePath(){return"/sell/compliance/v1"}getListingViolationsSummary(e){return this.get("/listing_violation_summary",{params:{compliance_type:e}})}getListingViolations({complianceType:e,offset:t,listingId:r,limit:n}={}){return this.get("/listing_violation",{params:{compliance_type:e,offset:t,listing_id:r,limit:n}})}suppressViolation(e){return this.post("/suppress_listing_violation",e)}}Compliance.id="Compliance";class Finances extends Restful{get basePath(){return"/sell/finances/v1"}get subdomain(){return"apiz"}getPayout(e){return e=encodeURIComponent(e),this.get(`/payout/${e}`)}getPayouts({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/payout",{params:{filter:e,limit:t,offset:r,sort:n}})}getPayoutSummary({filter:e}={}){return this.get("/payout_summary",{params:{filter:e}})}getTransactions({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/transaction",{params:{filter:e,limit:t,offset:r,sort:n}})}getTransactionSummary({filter:e}={}){return this.get("/transaction_summary",{params:{filter:e}})}getTransfer(e){return e=encodeURIComponent(e),this.get(`/transfer/${e}`)}getSellerFundsSummary(){return this.get("/seller_funds_summary")}}Finances.id="Finances";class Fulfillment extends Restful{get basePath(){return"/sell/fulfillment/v1"}getOrder(e,{fieldGroups:t}={}){return this.get(`/order/${e}`,{params:{fieldGroups:t}})}getOrders({filter:e,limit:t,offset:r,orderIds:n,fieldGroups:o}={}){return this.get("/order",{params:{filter:e,limit:t,offset:r,orderIds:Array.isArray(n)?n.join():n,fieldGroups:o}})}issueRefund(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/issue_refund`,t)}getShippingFulfillments(e){return e=encodeURIComponent(e),this.get(`/order/${e}/shipping_fulfillment`)}createShippingFulfillment(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/shipping_fulfillment`,t)}getShippingFulfillment(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/order/${e}/shipping_fulfillment/${t}`)}getPaymentDispute(e){return this.get(`/payment_dispute/${e}`)}fetchEvidenceContent(e){return this.get(`/payment_dispute/${e}/fetch_evidence_content`)}getActivities(e){return this.get(`/payment_dispute/${e}/activity`)}getPaymentDisputeSummaries({orderId:e,buyerUsername:t,openDateFrom:r,openDateTo:n,paymentDisputeStatus:o,limit:i,offset:s}){return this.get("/payment_dispute_summary",{params:{order_id:e,buyer_username:t,open_date_from:r,open_date_to:n,payment_dispute_status:o,limit:i,offset:s}})}contestPaymentDispute(e,t){return this.post(`/payment_dispute/${e}/contest`,t)}acceptPaymentDispute(e){return this.post(`/payment_dispute/${e}/accept`)}uploadEvidenceFile(e,t){return this.post(`/payment_dispute/${e}/upload_evidence_file`,t,{headers:{...Or}})}addEvidence(e,t){return this.post(`/payment_dispute/${e}/add_evidence`,t)}updateEvidence(e,t){return this.post(`/payment_dispute/${e}/update_evidence`,t)}}Fulfillment.id="Fulfillment";class Inventory extends Restful{get basePath(){return"/sell/inventory/v1"}getInventoryLocation(e){const t=encodeURIComponent(e);return this.get(`/location/${t}`)}disableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/disable`)}enableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}createInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}`,t)}deleteInventoryLocation(e){const t=encodeURIComponent(e);return this.delete(`/location/${t}`)}updateInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}/update_location_details`,t)}getInventoryItem(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}`)}createOrReplaceInventoryItem(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}`,t)}deleteInventoryItem(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}`)}getInventoryItems({limit:e,offset:t}={}){return this.get("/inventory_item",{params:{limit:e,offset:t}})}bulkUpdatePriceQuantity(e){return this.post("/bulk_update_price_quantity",e)}bulkCreateOrReplaceInventoryItem(e){return this.post("/bulk_create_or_replace_inventory_item",e)}bulkGetInventoryItem(e){return this.post("/bulk_get_inventory_item",e)}getProductCompatibility(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}/product_compatibility`)}createOrReplaceProductCompatibility(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}/product_compatibility`,t)}deleteProductCompatibility(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}/product_compatibility`)}getOffers({sku:e,marketplaceId:t,format:r,limit:n,offset:o}={}){return this.get("/offer",{params:{sku:e,marketplace_id:t,format:r,limit:n,offset:o}})}getOffer(e){return e=encodeURIComponent(e),this.get(`/offer/${e}`)}createOffer(e){return this.post("/offer",e)}updateOffer(e,t){return e=encodeURIComponent(e),this.put(`/offer/${e}`,t)}deleteOffer(e){return this.delete(`/offer/${e}`)}publishOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/publish`)}publishOfferByInventoryItemGroup(e){return this.post("/offer/publish_by_inventory_item_group",e)}withdrawOfferByInventoryItemGroup(e){return this.post("/offer/withdraw_by_inventory_item_group",e)}getListingFees(e){return this.post("/offer/get_listing_fees",e)}bulkCreateOffer(e){return this.post("/bulk_create_offer",e)}bulkPublishOffer(e){return this.post("/bulk_publish_offer",e)}withdrawOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/withdraw`)}getInventoryItemGroup(e){return e=encodeURIComponent(e),this.get(`/inventory_item_group/${e}`)}createOrReplaceInventoryItemGroup(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item_group/${e}`,t)}deleteInventoryItemGroup(e){return this.delete(`/inventory_item_group/${e}`)}bulkMigrateListing(e){return this.post("/bulk_migrate_listing",e)}getSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/listing/${e}/sku/${t}/locations`)}createOrReplaceSkuLocationMapping(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/listing/${e}/sku/${t}/locations`,r)}deleteSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.delete(`/listing/${e}/sku/${t}/locations`)}}Inventory.id="Inventory";class Marketing extends Restful{get basePath(){return"/sell/marketing/v1"}bulkCreateAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_inventory_reference`,t)}bulkCreateAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_listing_id`,t)}bulkDeleteAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_inventory_reference`,t)}bulkDeleteAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_listing_id`,t)}bulkUpdateAdsBidByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_inventory_reference`,t)}bulkUpdateAdsBidByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_listing_id`,t)}bulkUpdateAdsStatus(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status`,t)}bulkUpdateAdsStatusByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status_by_listing_id`,t)}launchCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/launch`)}setupQuickCampaign(e){return this.post("/ad_campaign/setup_quick_campaign",e)}getAds(e,{limit:t,listingIds:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad`,{params:{limit:t,listing_ids:r,offset:n}})}createAdByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad`,t)}createAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/create_ads_by_inventory_reference`,t)}getAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/ad/${t}`)}deleteAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/ad_campaign/${e}/ad/${t}`)}deleteAdsByInventoryReference(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/delete_ads_by_inventory_reference`)}getAdsByInventoryReference(e,t,r){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/get_ads_by_inventory_reference`,{params:{inventory_reference_id:t,inventory_reference_type:r}})}updateBid(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.post(`/ad_campaign/${e}/ad/${t}/update_bid`,r)}getAdGroups(e,{adGroupStatus:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group`,{params:{ad_group_status:t,limit:r,offset:n}})}createAdGroup(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group`,t)}getAdGroup(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group/${t}`)}updateAdGroup(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/ad_campaign/${e}/ad_group/${t}`,r)}suggestBids(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_bids`,r)}suggestKeywords(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_keywords`,r)}cloneCampaign(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/clone`,t)}getCampaigns({campaignName:e,campaignStatus:t,endDateRange:r,limit:n,offset:o,startDateRange:i}={}){return this.get("/ad_campaign",{params:{campaign_name:e,campaign_status:t,end_date_range:r,limit:n,offset:o,start_date_range:i}})}getCampaign(e){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}`)}createCampaign(e){return this.post("/ad_campaign",e)}deleteCampaign(e){return e=encodeURIComponent(e),this.delete(`/ad_campaign/${e}`)}endCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/end`)}findCampaignByAdReference({inventoryReferenceId:e,inventoryReferenceType:t,listingId:r}={}){return this.get("/ad_campaign/find_campaign_by_ad_reference",{params:{inventory_reference_id:e,inventory_reference_type:t,listing_id:r}})}getCampaignByName(e){return this.get("/ad_campaign/get_campaign_by_name",{params:{campaign_name:e}})}pauseCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/pause`)}resumeCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/resume`)}suggestItems(e,{categoryIds:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/suggest_items`,{params:{category_ids:t,limit:r,offset:n}})}updateAdRateStrategy(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_ad_rate_strategy`,t)}updateCampaignBudget(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_budget`,t)}updateCampaignIdentification(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_identification`,t)}bulkCreateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_keyword`,t)}bulkUpdateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_keyword`,t)}getKeywords(e,{adGroupIds:t,keywordStatus:r,limit:n,offset:o}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/keyword`,{params:{ad_group_ids:t,keyword_status:r,limit:n,offset:o}})}createKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/keyword`,t)}getKeyword(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/keyword/${t}`)}updateKeyword(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/ad_campaign/${e}/keyword/${t}`,r)}bulkCreateNegativeKeyword(e){return this.post("/bulk_create_negative_keyword",e)}bulkUpdateNegativeKeyword(e){return this.post("/bulk_update_negative_keyword",e)}getNegativeKeywords({adGroupIds:e,campaignIds:t,limit:r,negativeKeywordStatus:n,offset:o}={}){return this.get("/negative_keyword",{params:{ad_group_ids:e,campaign_ids:t,limit:r,negative_keyword_status:n,offset:o}})}createNegativeKeyword(e){return this.post("/negative_keyword",e)}getNegativeKeyword(e){return e=encodeURIComponent(e),this.get(`/negative_keyword/${e}`)}updateNegativeKeyword(e,t){return e=encodeURIComponent(e),this.put(`/negative_keyword/${e}`,t)}getReport(e){return e=encodeURIComponent(e),this.get(`/ad_report/${e}`)}getReportMetadata(){return this.get("/ad_report_metadata")}getReportMetadataForReportType(e){return e=encodeURIComponent(e),this.get(`/ad_report_metadata/${e}`)}getReportTasks({limit:e,offset:t,reportTaskStatuses:r}={}){return this.get("/ad_report_task",{params:{limit:e,offset:t,report_task_statuses:r}})}getReportTask(e){return e=encodeURIComponent(e),this.get(`/ad_report_task/${e}`)}createReportTask(e){return this.post("/ad_report_task",e)}deleteReportTask(e){return e=encodeURIComponent(e),this.delete(`/ad_report_task/${e}`)}createItemPriceMarkdownPromotion(e){return this.post("/item_price_markdown",e)}updateItemPriceMarkdownPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_price_markdown/${e}`,t)}deleteItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_price_markdown/${e}`)}getItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.get(`/item_price_markdown/${e}`)}createItemPromotion(e){return this.post("/item_promotion",e)}updateItemPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_promotion/${e}`,t)}deleteItemPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_promotion/${e}`)}getItemPromotion(e){return e=encodeURIComponent(e),this.get(`/item_promotion/${e}`)}getListingSet(e,{limit:t,offset:r,q:n,sort:o,status:i}={}){return e=encodeURIComponent(e),this.get(`/promotion/${e}/get_listing_set`,{params:{limit:t,offset:r,q:n,sort:o,status:i}})}getPromotions(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i,sort:s}={}){return this.get("/promotion",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i,sort:s}})}pausePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/pause`)}resumePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/resume`)}getPromotionReports(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i}={}){return this.get("/promotion_report",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i}})}getPromotionSummaryReport(e){return this.get("/promotion_summary_report",{params:{marketplace_id:e}})}getEmailCampaign(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}`)}getEmailCampaigns({limit:e,q:t,offset:r,sort:n}={}){return this.get("/email_campaign",{params:{limit:e,offset:r,q:t,sort:n}})}createEmailCampaign(e){return this.post("/email_campaign",e)}updateEmailCampaign(e,t){return e=encodeURIComponent(e),this.put(`/email_campaign/${e}`,t)}deleteEmailCampaign(e){return e=encodeURIComponent(e),this.delete(`/email_campaign/${e}`)}getEmailPreview(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}/email_preview`)}getAudiences(){return this.get("/email_campaign/audience")}getEmailReport(e,t){return this.get("/email_campaign/report",{params:{startDate:e,endDate:t}})}}Marketing.id="Marketing";class Metadata extends Restful{get basePath(){return"/sell/metadata/v1"}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}getAutomotivePartsCompatibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_automotive_parts_compatibility_policies`,{params:{filter:t}})}getExtendedProducerResponsibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_extended_producer_responsibility_policies`,{params:{filter:t}})}getItemConditionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_item_condition_policies`,{params:{filter:t}})}getListingStructurePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_listing_structure_policies`,{params:{filter:t}})}getNegotiatedPricePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_negotiated_price_policies`,{params:{filter:t}})}getProductAdoptionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_product_adoption_policies`,{params:{filter:t}})}getReturnPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_return_policies`,{params:{filter:t}})}getHazardousMaterialsLabels(e){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_hazardous_materials_labels`)}}Metadata.id="Metadata";class Recommendation extends Restful{get basePath(){return"/sell/recommendation/v1"}findListingRecommendations({filter:e,limit:t,offset:r}={},n){return this.post("/find",{data:n,params:{filter:e,limit:t,offset:r}})}}Recommendation.id="Recommendation";class Feed extends Restful{get basePath(){return"/sell/feed/v1"}getOrderTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/order_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createOrderTask(e){return this.post("/order_task",e)}getOrderTask(e){return e=encodeURIComponent(e),this.get(`/order_task/${e}`)}getInventoryTasks({feedType:e,scheduleId:t,lookBackDays:r,dateRange:n,limit:o,offset:i}={}){return this.get("/inventory_task",{params:{feed_type:e,schedule_id:t,look_back_days:r,date_range:n,limit:o,offset:i}})}createInventoryTask(e){return this.post("/inventory_task",e)}getInventoryTask(e){return e=encodeURIComponent(e),this.get(`/inventory_task/${e}`)}getSchedules({feedType:e,limit:t,offset:r}={}){return this.get("/schedule",{params:{feed_type:e,limit:t,offset:r}})}createSchedule(e){return this.post("/schedule",e)}getSchedule(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}`)}updateSchedule(e,t){return e=encodeURIComponent(e),this.put(`/schedule/${e}`,t)}deleteSchedule(e){return e=encodeURIComponent(e),this.delete(`/schedule/${e}`)}getLatestResultFile(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}/download_result_file`,{responseType:"arraybuffer",responseEncoding:"binary"})}getScheduleTemplate(e){return e=encodeURIComponent(e),this.get(`/schedule_template/${e}`)}getScheduleTemplates({feedType:e,limit:t,offset:r}={}){return this.get("/schedule_template",{params:{feed_type:e,limit:t,offset:r}})}getTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createTask(e){return this.post("/task",e)}getInputFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_input_file`)}getResultFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_result_file`,{responseType:"arraybuffer",responseEncoding:"binary"})}getTask(e){return e=encodeURIComponent(e),this.get(`/task/${e}`)}uploadFile(e,t){return e=encodeURIComponent(e),this.post(`/task/${e}/upload_file`,t,{headers:Or})}getCustomerServiceMetricTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o}={}){return this.get("/customer_service_metric_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o}})}createCustomerServiceMetricTask(e,t){return this.post("/customer_service_metric_task",t,{headers:{"accept-language":e}})}getCustomerServiceMetricTask(e){return e=encodeURIComponent(e),this.get(`/customer_service_metric_task/${e}`)}}Feed.id="Feed";class Logistics extends Restful{get basePath(){return"/sell/logistics/v1_beta"}createShippingQuote(e){return this.post("/shipping_quote",e)}getShippingQuote(e){return e=encodeURIComponent(e),this.get(`/shipping_quote/${e}`)}createFromShippingQuote(e){return this.post("/shipment/create_from_shipping_quote",e)}getShipment(e){return this.get(`/shipment/${e}`)}downloadLabelFile(e){return this.get(`/shipment/${e}/download_label_file`)}cancelShipment(e){return this.post(`/shipment/${e}/cancel`)}}Logistics.id="Logistics";class Negotiation extends Restful{get basePath(){return"/sell/negotiation/v1"}findEligibleItems({limit:e,offset:t}={}){return this.get("/find_eligible_items",{params:{limit:e,offset:t}})}sendOfferToInterestedBuyers(e){return this.post("/send_offer_to_interested_buyers",e)}}Negotiation.id="Negotiation";class Listing extends Restful{get basePath(){return"/sell/listing/v1_beta"}createItemDraft(e){return this.post("/item_draft/",e)}}var an,un;Listing.id="Listing",function(e){e.AskSellerQuestion="AskSellerQuestion",e.BestOffer="BestOffer",e.BestOfferDeclined="BestOfferDeclined",e.BestOfferPlaced="BestOfferPlaced",e.BidPlaced="BidPlaced",e.BidReceived="BidReceived",e.CounterOfferReceived="CounterOfferReceived",e.CustomCode="CustomCode",e.EndOfAuction="EndOfAuction",e.FeedbackLeft="FeedbackLeft",e.FeedbackReceived="FeedbackReceived",e.FeedbackStarChanged="FeedbackStarChanged",e.FixedPriceEndOfTransaction="FixedPriceEndOfTransaction",e.FixedPriceTransaction="FixedPriceTransaction",e.ItemAddedToWatchList="ItemAddedToWatchList",e.ItemEnded="ItemEnded",e.ItemListed="ItemListed",e.ItemLost="ItemLost",e.ItemMarkedPaid="ItemMarkedPaid",e.ItemMarkedShipped="ItemMarkedShipped",e.ItemRemovedFromWatchList="ItemRemovedFromWatchList",e.ItemSold="ItemSold",e.ItemUnsold="ItemUnsold",e.ItemWon="ItemWon",e.OutBid="OutBid",e.PriceChange="PriceChange",e.SecondChanceOffer="SecondChanceOffer",e.WatchedItemEndingSoon="WatchedItemEndingSoon"}(an||(an={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(un||(un={}));var cn,ln=un;!function(e){e[e.findCompletedItems=0]="findCompletedItems",e[e.findItemsAdvanced=1]="findItemsAdvanced",e[e.findItemsByCategory=2]="findItemsByCategory",e[e.findItemsByKeywords=3]="findItemsByKeywords",e[e.findItemsByProduct=4]="findItemsByProduct",e[e.findItemsIneBayStores=5]="findItemsIneBayStores",e[e.getHistograms=6]="getHistograms",e[e.getSearchKeywordsRecommendation=7]="getSearchKeywordsRecommendation",e[e.getVersion=8]="getVersion"}(cn||(cn={}));var pn,dn=cn;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(pn||(pn={}));var En,fn=pn;!function(e){e[e.FindProducts=0]="FindProducts",e[e.GetCategoryInfo=1]="GetCategoryInfo",e[e.GeteBayTime=2]="GeteBayTime",e[e.GetItemStatus=3]="GetItemStatus",e[e.GetMultipleItems=4]="GetMultipleItems",e[e.GetShippingCosts=5]="GetShippingCosts",e[e.GetSingleItem=6]="GetSingleItem",e[e.GetUserProfile=7]="GetUserProfile"}(En||(En={}));var gn,hn=En;!function(e){e[e.AddDispute=0]="AddDispute",e[e.AddDisputeResponse=1]="AddDisputeResponse",e[e.AddFixedPriceItem=2]="AddFixedPriceItem",e[e.AddItem=3]="AddItem",e[e.AddItemFromSellingManagerTemplate=4]="AddItemFromSellingManagerTemplate",e[e.AddItems=5]="AddItems",e[e.AddMemberMessageAAQToPartner=6]="AddMemberMessageAAQToPartner",e[e.AddMemberMessageRTQ=7]="AddMemberMessageRTQ",e[e.AddMemberMessagesAAQToBidder=8]="AddMemberMessagesAAQToBidder",e[e.AddOrder=9]="AddOrder",e[e.AddSecondChanceItem=10]="AddSecondChanceItem",e[e.AddSellingManagerInventoryFolder=11]="AddSellingManagerInventoryFolder",e[e.AddSellingManagerProduct=12]="AddSellingManagerProduct",e[e.AddSellingManagerTemplate=13]="AddSellingManagerTemplate",e[e.AddToItemDescription=14]="AddToItemDescription",e[e.AddToWatchList=15]="AddToWatchList",e[e.AddTransactionConfirmationItem=16]="AddTransactionConfirmationItem",e[e.CompleteSale=17]="CompleteSale",e[e.ConfirmIdentity=18]="ConfirmIdentity",e[e.DeleteMyMessages=19]="DeleteMyMessages",e[e.DeleteSellingManagerInventoryFolder=20]="DeleteSellingManagerInventoryFolder",e[e.DeleteSellingManagerItemAutomationRule=21]="DeleteSellingManagerItemAutomationRule",e[e.DeleteSellingManagerProduct=22]="DeleteSellingManagerProduct",e[e.DeleteSellingManagerTemplate=23]="DeleteSellingManagerTemplate",e[e.DeleteSellingManagerTemplateAutomationRule=24]="DeleteSellingManagerTemplateAutomationRule",e[e.DisableUnpaidItemAssistance=25]="DisableUnpaidItemAssistance",e[e.EndFixedPriceItem=26]="EndFixedPriceItem",e[e.EndItem=27]="EndItem",e[e.EndItems=28]="EndItems",e[e.ExtendSiteHostedPictures=29]="ExtendSiteHostedPictures",e[e.FetchToken=30]="FetchToken",e[e.GetAccount=31]="GetAccount",e[e.GetAdFormatLeads=32]="GetAdFormatLeads",e[e.GetAllBidders=33]="GetAllBidders",e[e.GetApiAccessRules=34]="GetApiAccessRules",e[e.GetBestOffers=35]="GetBestOffers",e[e.GetBidderList=36]="GetBidderList",e[e.GetCategories=37]="GetCategories",e[e.GetCategoryFeatures=38]="GetCategoryFeatures",e[e.GetCategoryMappings=39]="GetCategoryMappings",e[e.GetCategorySpecifics=40]="GetCategorySpecifics",e[e.GetChallengeToken=41]="GetChallengeToken",e[e.GetCharities=42]="GetCharities",e[e.GetClientAlertsAuthToken=43]="GetClientAlertsAuthToken",e[e.GetContextualKeywords=44]="GetContextualKeywords",e[e.GetDescriptionTemplates=45]="GetDescriptionTemplates",e[e.GetDispute=46]="GetDispute",e[e.GeteBayDetails=47]="GeteBayDetails",e[e.GeteBayOfficialTime=48]="GeteBayOfficialTime",e[e.GetFeedback=49]="GetFeedback",e[e.GetItem=50]="GetItem",e[e.GetItemsAwaitingFeedback=51]="GetItemsAwaitingFeedback",e[e.GetItemShipping=52]="GetItemShipping",e[e.GetItemTransactions=53]="GetItemTransactions",e[e.GetMemberMessages=54]="GetMemberMessages",e[e.GetMessagePreferences=55]="GetMessagePreferences",e[e.GetMyeBayBuying=56]="GetMyeBayBuying",e[e.GetMyeBayReminders=57]="GetMyeBayReminders",e[e.GetMyeBaySelling=58]="GetMyeBaySelling",e[e.GetMyMessages=59]="GetMyMessages",e[e.GetNotificationPreferences=60]="GetNotificationPreferences",e[e.GetNotificationsUsage=61]="GetNotificationsUsage",e[e.GetOrders=62]="GetOrders",e[e.GetOrderTransactions=63]="GetOrderTransactions",e[e.GetPromotionalSaleDetails=64]="GetPromotionalSaleDetails",e[e.GetSellerDashboard=65]="GetSellerDashboard",e[e.GetSellerEvents=66]="GetSellerEvents",e[e.GetSellerList=67]="GetSellerList",e[e.GetSellerTransactions=68]="GetSellerTransactions",e[e.GetSellingManagerAlerts=69]="GetSellingManagerAlerts",e[e.GetSellingManagerEmailLog=70]="GetSellingManagerEmailLog",e[e.GetSellingManagerInventory=71]="GetSellingManagerInventory",e[e.GetSellingManagerInventoryFolder=72]="GetSellingManagerInventoryFolder",e[e.GetSellingManagerItemAutomationRule=73]="GetSellingManagerItemAutomationRule",e[e.GetSellingManagerSaleRecord=74]="GetSellingManagerSaleRecord",e[e.GetSellingManagerSoldListings=75]="GetSellingManagerSoldListings",e[e.GetSellingManagerTemplateAutomationRule=76]="GetSellingManagerTemplateAutomationRule",e[e.GetSellingManagerTemplates=77]="GetSellingManagerTemplates",e[e.GetSessionID=78]="GetSessionID",e[e.GetShippingDiscountProfiles=79]="GetShippingDiscountProfiles",e[e.GetStore=80]="GetStore",e[e.GetStoreCategoryUpdateStatus=81]="GetStoreCategoryUpdateStatus",e[e.GetStoreCustomPage=82]="GetStoreCustomPage",e[e.GetStoreOptions=83]="GetStoreOptions",e[e.GetStorePreferences=84]="GetStorePreferences",e[e.GetSuggestedCategories=85]="GetSuggestedCategories",e[e.GetTaxTable=86]="GetTaxTable",e[e.GetTokenStatus=87]="GetTokenStatus",e[e.GetUser=88]="GetUser",e[e.GetUserContactDetails=89]="GetUserContactDetails",e[e.GetUserDisputes=90]="GetUserDisputes",e[e.GetUserPreferences=91]="GetUserPreferences",e[e.GetVeROReasonCodeDetails=92]="GetVeROReasonCodeDetails",e[e.GetVeROReportStatus=93]="GetVeROReportStatus",e[e.LeaveFeedback=94]="LeaveFeedback",e[e.MoveSellingManagerInventoryFolder=95]="MoveSellingManagerInventoryFolder",e[e.PlaceOffer=96]="PlaceOffer",e[e.RelistFixedPriceItem=97]="RelistFixedPriceItem",e[e.RelistItem=98]="RelistItem",e[e.RemoveFromWatchList=99]="RemoveFromWatchList",e[e.RespondToBestOffer=100]="RespondToBestOffer",e[e.RespondToFeedback=101]="RespondToFeedback",e[e.ReviseCheckoutStatus=102]="ReviseCheckoutStatus",e[e.ReviseFixedPriceItem=103]="ReviseFixedPriceItem",e[e.ReviseInventoryStatus=104]="ReviseInventoryStatus",e[e.ReviseItem=105]="ReviseItem",e[e.ReviseMyMessages=106]="ReviseMyMessages",e[e.ReviseMyMessagesFolders=107]="ReviseMyMessagesFolders",e[e.ReviseSellingManagerInventoryFolder=108]="ReviseSellingManagerInventoryFolder",e[e.ReviseSellingManagerProduct=109]="ReviseSellingManagerProduct",e[e.ReviseSellingManagerSaleRecord=110]="ReviseSellingManagerSaleRecord",e[e.ReviseSellingManagerTemplate=111]="ReviseSellingManagerTemplate",e[e.RevokeToken=112]="RevokeToken",e[e.SaveItemToSellingManagerTemplate=113]="SaveItemToSellingManagerTemplate",e[e.SellerReverseDispute=114]="SellerReverseDispute",e[e.SendInvoice=115]="SendInvoice",e[e.SetMessagePreferences=116]="SetMessagePreferences",e[e.SetNotificationPreferences=117]="SetNotificationPreferences",e[e.SetPromotionalSale=118]="SetPromotionalSale",e[e.SetPromotionalSaleListings=119]="SetPromotionalSaleListings",e[e.SetSellingManagerFeedbackOptions=120]="SetSellingManagerFeedbackOptions",e[e.SetSellingManagerItemAutomationRule=121]="SetSellingManagerItemAutomationRule",e[e.SetSellingManagerTemplateAutomationRule=122]="SetSellingManagerTemplateAutomationRule",e[e.SetShippingDiscountProfiles=123]="SetShippingDiscountProfiles",e[e.SetStore=124]="SetStore",e[e.SetStoreCategories=125]="SetStoreCategories",e[e.SetStoreCustomPage=126]="SetStoreCustomPage",e[e.SetStorePreferences=127]="SetStorePreferences",e[e.SetTaxTable=128]="SetTaxTable",e[e.SetUserNotes=129]="SetUserNotes",e[e.SetUserPreferences=130]="SetUserPreferences",e[e.UploadSiteHostedPictures=131]="UploadSiteHostedPictures",e[e.ValidateChallengeInput=132]="ValidateChallengeInput",e[e.ValidateTestUserRegistration=133]="ValidateTestUserRegistration",e[e.VerifyAddFixedPriceItem=134]="VerifyAddFixedPriceItem",e[e.VerifyAddItem=135]="VerifyAddItem",e[e.VerifyAddSecondChanceItem=136]="VerifyAddSecondChanceItem",e[e.VerifyRelistItem=137]="VerifyRelistItem",e[e.VeROReportItems=138]="VeROReportItems"}(gn||(gn={}));var _n,mn,yn,Rn,An,In,Tn,Sn,Cn,Nn,On,bn,Pn,Un,Dn,Ln,vn,Bn,Mn,Fn,wn,xn,kn,Gn,Yn,$n,Hn,jn,Vn,qn,Kn,Wn,Xn,zn,Jn,Qn,Zn,eo,to,ro,no,oo,io,so,ao,uo=gn;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...zr,...n};try{return await this.request(o,t,e,r)}catch(n){if(this.shouldRefreshToken(n))return await this.request(o,t,e,r,!0);throw n}}}createTradingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for trading API.");return this.createTraditionalXMLApi({endpoint:{production:"api.ebay.com",sandbox:"api.sandbox.ebay.com"},path:"/ws/api.dll",calls:uo,xmlns:"urn:ebay:apis:eBLBaseComponents",headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967,...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createShoppingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for shopping API.");return this.createTraditionalXMLApi({endpoint:{production:"open.api.ebay.com",sandbox:"open.api.sandbox.ebay.com"},path:"/shopping",xmlns:"urn:ebay:apis:eBLBaseComponents",calls:hn,headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-SITE-ID":this.config.siteId,"X-EBAY-API-VERSION":863,"X-EBAY-API-REQUEST-ENCODING":"xml",...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createFindingApi(){return this.createTraditionalXMLApi({endpoint:{production:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/services/search/FindingService/v1",xmlns:"http://www.ebay.com/marketplace/search/v1/services",calls:dn,headers:e=>({"X-EBAY-SOA-SECURITY-APPNAME":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createClientAlertsApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for client alerts API.");const e={endpoint:{production:"clientalerts.ebay.com",sandbox:"clientalerts.sandbox.ebay.com"},calls:ln},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>Sr.stringify(e,{allowDots:!0}).replace(/%5B/gi,"(").replace(/%5D/gi,")"),r={appid:this.config.appId,siteid:this.config.siteId,version:643},n={};return Object.keys(e.calls).forEach(e=>{n[e]=async n=>this.req.get(t,{paramsSerializer:{serialize:paramsSerializer},params:{...r,...n,callname:e}})}),n}createMerchandisingApi(){return this.createTraditionalXMLApi({endpoint:{production:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/MerchandisingService",xmlns:"http://www.ebay.com/marketplace/services",calls:fn,headers:e=>({"EBAY-SOA-CONSUMER-ID":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createBusinessPolicyManagementApi(){throw new Error("Important! This API is deprecated and will be decommissioned on January 31, 2022. We recommend that you migrate to the fulfillment_policy, payment_policy, and return_policy resources of the Account API to set up and manage all of your fulfillment, payment, and return business policies.")}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayIAFTokenExpired.name||e.name===EBayIAFTokenInvalid.name||e.name===EBayAuthTokenIsHardExpired.name||e.name===EBayAuthTokenIsInvalid.name)}async request(e,t,r,n,o=!1){try{o&&await this.auth.OAuth2.refreshToken();const i=await this.getConfig(t,r,e),s=new XMLRequest(r,n,i,this.req);return await s.request()}catch(e){handleEBayError(e)}}async getConfig(e,t,r){const n=this.auth.authNAuth.eBayAuthToken,o=!n&&r.useIaf?await this.auth.OAuth2.getAccessToken():null,i=!n&&o,s=this.config.sandbox?e.endpoint.sandbox:e.endpoint.production;return{...r,xmlns:e.xmlns,endpoint:`https://${s}${e.path}`,headers:{...e.headers(t,i?o:null),...r.headers},digitalSignatureHeaders:t=>r.sign?this.getDigitalSignatureHeaders({method:"POST",authority:s,path:e.path},t):{},...i?{}:{eBayAuthToken:n}}}createTraditionalXMLApi(e){const t={};return Object.keys(e.calls).forEach(r=>{t[r]=this.createXMLRequest(r,e)}),t}}class ApiFactory extends Api{constructor(){super(...arguments),this._restful={}}createBuyApi(){return{browse:this.createRestfulApi(Browse),feed:this.createRestfulApi(nn),marketing:this.createRestfulApi(on),offer:this.createRestfulApi(Offer),order:this.createRestfulApi(Order),deal:this.createRestfulApi(Deal),marketplaceInsights:this.createRestfulApi(MarketplaceInsights)}}createCommerceApi(){return{catalog:this.createRestfulApi(Catalog),charity:this.createRestfulApi(Charity),identity:this.createRestfulApi(Identity),notification:this.createRestfulApi(Notification),media:this.createRestfulApi(Media),translation:this.createRestfulApi(Translation),taxonomy:this.createRestfulApi(Taxonomy),message:this.createRestfulApi(Message)}}createDeveloperApi(){return{analytics:this.createRestfulApi(sn),keyManagement:this.createRestfulApi(KeyManagement)}}createPostOrderApi(){return{cancellation:this.createRestfulApi(Cancellation),case:this.createRestfulApi(Case),inquiry:this.createRestfulApi(Inquiry),return:this.createRestfulApi(Return)}}createSellApi(){return{account:this.createRestfulApi(AccountV1),accountV2:this.createRestfulApi(AccountV2),analytics:this.createRestfulApi(Analytics),compliance:this.createRestfulApi(Compliance),fulfillment:this.createRestfulApi(Fulfillment),inventory:this.createRestfulApi(Inventory),marketing:this.createRestfulApi(Marketing),metadata:this.createRestfulApi(Metadata),recommendation:this.createRestfulApi(Recommendation),finances:this.createRestfulApi(Finances),feed:this.createRestfulApi(Feed),logistics:this.createRestfulApi(Logistics),negotiation:this.createRestfulApi(Negotiation),listing:this.createRestfulApi(Listing)}}get traditional(){return this._traditional?this._traditional:this._traditional=new Traditional(this.config,this.req,this.auth)}createTradingApi(){return this.traditional.createTradingApi()}createShoppingApi(){return this.traditional.createShoppingApi()}createFindingApi(){return this.traditional.createFindingApi()}createClientAlertsApi(){return this.traditional.createClientAlertsApi()}createMerchandisingApi(){return this.traditional.createMerchandisingApi()}createRestfulApi(e){const t=e.id;return this._restful[t]||(this._restful[t]=new e(this.config,this.req,this.auth))}}!function(e){e[e.EBAY_US=0]="EBAY_US",e[e.EBAY_ENCA=2]="EBAY_ENCA",e[e.EBAY_GB=3]="EBAY_GB",e[e.EBAY_AU=15]="EBAY_AU",e[e.EBAY_AT=16]="EBAY_AT",e[e.EBAY_FRBE=23]="EBAY_FRBE",e[e.EBAY_FR=71]="EBAY_FR",e[e.EBAY_DE=77]="EBAY_DE",e[e.EBAY_MOTOR=100]="EBAY_MOTOR",e[e.EBAY_IT=101]="EBAY_IT",e[e.EBAY_NLBE=123]="EBAY_NLBE",e[e.EBAY_NL=146]="EBAY_NL",e[e.EBAY_ES=186]="EBAY_ES",e[e.EBAY_CH=193]="EBAY_CH",e[e.EBAY_HK=201]="EBAY_HK",e[e.EBAY_IN=203]="EBAY_IN",e[e.EBAY_IE=205]="EBAY_IE",e[e.EBAY_MY=207]="EBAY_MY",e[e.EBAY_FRCA=210]="EBAY_FRCA",e[e.EBAY_PH=211]="EBAY_PH",e[e.EBAY_PL=212]="EBAY_PL",e[e.EBAY_SG=216]="EBAY_SG"}(_n||(_n={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_AT="EBAY_AT",e.EBAY_AU="EBAY_AU",e.EBAY_BE="EBAY_BE",e.EBAY_CA="EBAY_CA",e.EBAY_CH="EBAY_CH",e.EBAY_DE="EBAY_DE",e.EBAY_ES="EBAY_ES",e.EBAY_FR="EBAY_FR",e.EBAY_GB="EBAY_GB",e.EBAY_HK="EBAY_HK",e.EBAY_IE="EBAY_IE",e.EBAY_IN="EBAY_IN",e.EBAY_IT="EBAY_IT",e.EBAY_MY="EBAY_MY",e.EBAY_NL="EBAY_NL",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_SG="EBAY_SG",e.EBAY_TH="EBAY_TH",e.EBAY_TW="EBAY_TW",e.EBAY_VN="EBAY_VN",e.EBAY_MOTORS_US="EBAY_MOTORS_US"}(mn||(mn={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(yn||(yn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(Rn||(Rn={})),function(e){e.CLOSED="CLOSED",e.CS_CLOSED="CS_CLOSED",e.ON_HOLD="ON_HOLD",e.OPEN="OPEN",e.OTHER="OTHER",e.REFUND_AGREED_BUT_FAILED="REFUND_AGREED_BUT_FAILED",e.WAITING_CS="WAITING_CS",e.WAITING_DELIVERY="WAITING_DELIVERY"}(An||(An={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(In||(In={})),function(e){e.CLOSED="CLOSED",e.CLOSED_WITH_ESCALATION="CLOSED_WITH_ESCALATION",e.CS_CLOSED="CS_CLOSED",e.OPEN="OPEN",e.OTHER="OTHER",e.PENDING="PENDING",e.WAITING_BUYER_RESPONSE="WAITING_BUYER_RESPONSE",e.WAITING_SELLER_RESPONSE="WAITING_SELLER_RESPONSE"}(Tn||(Tn={})),function(e){e.AUSTRALIA_POST="AUSTRALIA_POST",e.BARTOLINI="BARTOLINI",e.CANADA_POST="CANADA_POST",e.COLISSIMO="COLISSIMO",e.COLLECT_PLUS="COLLECT_PLUS",e.CORREOS="CORREOS",e.DEUTSCHE_POST="DEUTSCHE_POST",e.DHL="DHL",e.FEDEX="FEDEX",e.HERMES="HERMES",e.LA_POSTE="LA_POSTE",e.MONDIAL_RELAY="MONDIAL_RELAY",e.MRW="MRW",e.NEXIVE="NEXIVE",e.OTHER="OTHER",e.PARCEL_FORCE="PARCEL_FORCE",e.POSTE="POSTE",e.ROYAL_MAIL="ROYAL_MAIL",e.SEUR="SEUR",e.UNKNOWN="UNKNOWN",e.UPS="UPS",e.USPS="USPS"}(Sn||(Sn={})),function(e){e.ARRIVED_DAMAGED="ARRIVED_DAMAGED",e.ARRIVED_LATE="ARRIVED_LATE",e.BUYER_CANCEL_ORDER="BUYER_CANCEL_ORDER",e.BUYER_NO_SHOW="BUYER_NO_SHOW",e.BUYER_NOT_SCHEDULED="BUYER_NOT_SCHEDULED",e.BUYER_REFUSED_TO_PICKUP="BUYER_REFUSED_TO_PICKUP",e.DEFECTIVE_ITEM="DEFECTIVE_ITEM",e.DIFFERENT_FROM_LISTING="DIFFERENT_FROM_LISTING",e.EXPIRED_ITEM="EXPIRED_ITEM",e.FAKE_OR_COUNTERFEIT="FAKE_OR_COUNTERFEIT",e.FOUND_BETTER_PRICE="FOUND_BETTER_PRICE",e.IN_STORE_RETURN="IN_STORE_RETURN",e.MISSING_PARTS="MISSING_PARTS",e.NO_LONGER_NEED_ITEM="NO_LONGER_NEED_ITEM",e.NO_REASON="NO_REASON",e.NOT_AS_DESCRIBED="NOT_AS_DESCRIBED",e.ORDERED_ACCIDENTALLY="ORDERED_ACCIDENTALLY",e.ORDERED_DIFFERENT_ITEM="ORDERED_DIFFERENT_ITEM",e.ORDERED_WRONG_ITEM="ORDERED_WRONG_ITEM",e.OTHER="OTHER",e.OUT_OF_STOCK="OUT_OF_STOCK",e.RETURNING_GIFT="RETURNING_GIFT",e.VALET_DELIVERY_ISSUES="VALET_DELIVERY_ISSUES",e.VALET_UNAVAILABLE="VALET_UNAVAILABLE",e.WRONG_SIZE="WRONG_SIZE"}(Cn||(Cn={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(Nn||(Nn={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(On||(On={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(bn||(bn={})),function(e){e.BUYER_NORESPONSE="BUYER_NORESPONSE",e.BUYER_RETURNED_WRONG_ITEM="BUYER_RETURNED_WRONG_ITEM",e.DISAGREE_WITH_RETURN_REASON="DISAGREE_WITH_RETURN_REASON",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.ITEM_RECEIVED_IN_DIFFERENT_CONDITION="ITEM_RECEIVED_IN_DIFFERENT_CONDITION",e.NEW_ITEM_NOT_RECEIVED="NEW_ITEM_NOT_RECEIVED",e.NO_REFUND_FOR_RETURN_SHIPPING="NO_REFUND_FOR_RETURN_SHIPPING",e.NO_REFUND_RECEIVED="NO_REFUND_RECEIVED",e.OTHER="OTHER",e.RECEIVED_WRONG_ITEM="RECEIVED_WRONG_ITEM",e.SELLER_NO_RESPONSE="SELLER_NO_RESPONSE",e.TROUBLE_COMMUNICATION_WITH_BUYER="TROUBLE_COMMUNICATION_WITH_BUYER",e.TROUBLE_COMMUNICATION_WITH_SELLER="TROUBLE_COMMUNICATION_WITH_SELLER"}(Pn||(Pn={})),function(e){e.ACCEPT_PARTIAL_REFUND="ACCEPT_PARTIAL_REFUND",e.ACCEPT_REPLACEMENT_OFFER="ACCEPT_REPLACEMENT_OFFER",e.APPROVE="APPROVE",e.APPROVE_WITHOUT_EBAY_LABEL="APPROVE_WITHOUT_EBAY_LABEL",e.DECLINE="DECLINE",e.DECLINE_PARTIAL_REFUND="DECLINE_PARTIAL_REFUND",e.DECLINE_REPLACEMENT_OFFER="DECLINE_REPLACEMENT_OFFER",e.OFFER_PARTIAL_REFUND="OFFER_PARTIAL_REFUND",e.OFFER_REPLACEMENT="OFFER_REPLACEMENT",e.OFFER_RETURN="OFFER_RETURN",e.OFFER_RETURN_WITHOUT_LABEL="OFFER_RETURN_WITHOUT_LABEL",e.PROVIDE_RMA="PROVIDE_RMA",e.UNKNOWN="UNKNOWN"}(Un||(Un={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(Dn||(Dn={})),function(e){e.ALL_OPEN="ALL_OPEN",e.ALL_OPEN_REPLACEMENT="ALL_OPEN_REPLACEMENT",e.ALL_OPEN_RETURN="ALL_OPEN_RETURN",e.CLOSED="CLOSED",e.EBAY_PLUS="EBAY_PLUS",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_SHIPPED="ITEM_SHIPPED",e.RETURN_STARTED="RETURN_STARTED",e.SELLER_ACTION_DUE="SELLER_ACTION_DUE",e.SELLER_ACTION_OVERDUE="SELLER_ACTION_OVERDUE",e.SELLER_NO_ACTION="SELLER_NO_ACTION",e.UNKNOWN="UNKNOWN"}(Ln||(Ln={})),function(e){e.AUTO_REFUND_INITIATED="AUTO_REFUND_INITIATED",e.CLOSED="CLOSED",e.INITIAL="INITIAL",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_KEPT="ITEM_KEPT",e.ITEM_READY_TO_SHIP="ITEM_READY_TO_SHIP",e.ITEM_SHIPPED="ITEM_SHIPPED",e.LESS_THAN_A_FULL_REFUND_ISSUED="LESS_THAN_A_FULL_REFUND_ISSUED",e.PARTIAL_REFUND_AS_PAYOUT_INITIATED="PARTIAL_REFUND_AS_PAYOUT_INITIATED",e.PARTIAL_REFUND_DECLINED="PARTIAL_REFUND_DECLINED",e.PARTIAL_REFUND_FAILED="PARTIAL_REFUND_FAILED",e.PARTIAL_REFUND_INITIATED="PARTIAL_REFUND_INITIATED",e.PARTIAL_REFUND_NON_PAYPAL_INITIATED="PARTIAL_REFUND_NON_PAYPAL_INITIATED",e.PARTIAL_REFUND_REQUESTED="PARTIAL_REFUND_REQUESTED",e.PARTIAL_REFUNDED="PARTIAL_REFUNDED",e.PAYOUT_INITIATED="PAYOUT_INITIATED",e.REFUND_AS_PAYOUT_INITIATED="REFUND_AS_PAYOUT_INITIATED",e.REFUND_FAILED="REFUND_FAILED",e.REFUND_INITIATED="REFUND_INITIATED",e.REFUND_SENT_PENDING_CONFIRMATION="REFUND_SENT_PENDING_CONFIRMATION",e.REFUND_TIMEOUT="REFUND_TIMEOUT",e.REPLACED="REPLACED",e.REPLACEMENT_CLOSED="REPLACEMENT_CLOSED",e.REPLACEMENT_DELIVERED="REPLACEMENT_DELIVERED",e.REPLACEMENT_LABEL_PENDING="REPLACEMENT_LABEL_PENDING",e.REPLACEMENT_LABEL_PENDING_TIMEOUT="REPLACEMENT_LABEL_PENDING_TIMEOUT",e.REPLACEMENT_LABEL_REQUESTED="REPLACEMENT_LABEL_REQUESTED",e.REPLACEMENT_LABEL_REQUESTED_TIMEOUT="REPLACEMENT_LABEL_REQUESTED_TIMEOUT",e.REPLACEMENT_OFFER_PENDING="REPLACEMENT_OFFER_PENDING",e.REPLACEMENT_REQUEST_TIMEOUT="REPLACEMENT_REQUEST_TIMEOUT",e.REPLACEMENT_REQUESTED="REPLACEMENT_REQUESTED",e.REPLACEMENT_RMA_PENDING="REPLACEMENT_RMA_PENDING",e.REPLACEMENT_SHIPPED="REPLACEMENT_SHIPPED",e.REPLACEMENT_STARTED="REPLACEMENT_STARTED",e.RETURN_LABEL_PENDING="RETURN_LABEL_PENDING",e.RETURN_LABEL_PENDING_TIMEOUT="RETURN_LABEL_PENDING_TIMEOUT",e.RETURN_LABEL_REQUESTED="RETURN_LABEL_REQUESTED",e.RETURN_LABEL_REQUESTED_TIMEOUT="RETURN_LABEL_REQUESTED_TIMEOUT",e.RETURN_REJECTED="RETURN_REJECTED",e.RETURN_REQUEST_TIMEOUT="RETURN_REQUEST_TIMEOUT",e.RETURN_REQUESTED="RETURN_REQUESTED",e.RMA_PENDING="RMA_PENDING",e.UNKNOWN="UNKNOWN"}(vn||(vn={})),function(e){e.ITEM_RELATED="ITEM_RELATED",e.LABEL_RELATED="LABEL_RELATED",e.REFUND_RELATED="REFUND_RELATED",e.UNKNOWN="UNKNOWN"}(Bn||(Bn={})),function(e){e.DOMESTIC_SHIPPING="DOMESTIC_SHIPPING",e.IMPORT_CHARGE="IMPORT_CHARGE",e.INTERNATIONAL_SHIPPING="INTERNATIONAL_SHIPPING",e.ITEM_IMPORT_TAX="ITEM_IMPORT_TAX",e.ITEM_TAX="ITEM_TAX",e.ORDER_ADJUSTMENT="ORDER_ADJUSTMENT",e.ORIGINAL_SHIPPING="ORIGINAL_SHIPPING",e.OTHER="OTHER",e.PURCHASE_PRICE="PURCHASE_PRICE",e.REFUND_FROM_PAYPAL="REFUND_FROM_PAYPAL",e.RETURN_SHIPPING="RETURN_SHIPPING",e.SHIPPING_IMPORT_TAX="SHIPPING_IMPORT_TAX",e.SHIPPING_TAX="SHIPPING_TAX"}(Mn||(Mn={})),function(e){e.AUTO_APPROVE_REMORSE="AUTO_APPROVE_REMORSE",e.BUYER_ACCEPT_REPLACEMENT_OFFER="BUYER_ACCEPT_REPLACEMENT_OFFER",e.BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND="BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND",e.BUYER_ACCEPTS_PARTIAL_REFUND="BUYER_ACCEPTS_PARTIAL_REFUND",e.BUYER_CLOSE_RETURN="BUYER_CLOSE_RETURN",e.BUYER_CREATE_RETURN="BUYER_CREATE_RETURN",e.BUYER_DECLINE_PARTIAL_REFUND="BUYER_DECLINE_PARTIAL_REFUND",e.BUYER_DECLINE_REPLACEMENT_OFFER="BUYER_DECLINE_REPLACEMENT_OFFER",e.BUYER_ESCALATE="BUYER_ESCALATE",e.BUYER_MARK_AS_RECEIVED="BUYER_MARK_AS_RECEIVED",e.BUYER_MARK_REFUND_RECEIVED="BUYER_MARK_REFUND_RECEIVED",e.BUYER_MARK_RETURN_SHIPPED="BUYER_MARK_RETURN_SHIPPED",e.BUYER_PRINT_SHIPPING_LABEL="BUYER_PRINT_SHIPPING_LABEL",e.BUYER_PROVIDE_LABEL="BUYER_PROVIDE_LABEL",e.BUYER_PROVIDE_TRACKING_INFO="BUYER_PROVIDE_TRACKING_INFO",e.BUYER_SEND_MESSAGE="BUYER_SEND_MESSAGE",e.BUYER_UPDATE_TRACKING="BUYER_UPDATE_TRACKING",e.BUYER_VOID_LABEL="BUYER_VOID_LABEL",e.CHARGEBACK_OPEN="CHARGEBACK_OPEN",e.DELETE_FILE="DELETE_FILE",e.EMAIL_SHIPPING_LABEL="EMAIL_SHIPPING_LABEL",e.EXTERNAL_CLAIM_OPENED="EXTERNAL_CLAIM_OPENED",e.GENERAL_TIME_OUT="GENERAL_TIME_OUT",e.NOTIFIED_DELIVERED="NOTIFIED_DELIVERED",e.NOTIFIED_SHIPPED="NOTIFIED_SHIPPED",e.NOTIFY_REPLACEMENT_DELIVERED="NOTIFY_REPLACEMENT_DELIVERED",e.NOTIFY_REPLACEMENT_SHIPPED="NOTIFY_REPLACEMENT_SHIPPED",e.NOTIFY_UPDATE_REFUND_STATUS="NOTIFY_UPDATE_REFUND_STATUS",e.OTHER="OTHER",e.REMINDER_BUYER_TO_RESPOND_RE_OFFER="REMINDER_BUYER_TO_RESPOND_RE_OFFER",e.REMINDER_BUYER_TO_SHIP="REMINDER_BUYER_TO_SHIP",e.REMINDER_FOR_REFUND="REMINDER_FOR_REFUND",e.REMINDER_FOR_REFUND_NO_SHIPPING="REMINDER_FOR_REFUND_NO_SHIPPING",e.REMINDER_FOR_RMA="REMINDER_FOR_RMA",e.REMINDER_FOR_SHIPPING="REMINDER_FOR_SHIPPING",e.REMINDER_SELLER_TO_RESPOND="REMINDER_SELLER_TO_RESPOND",e.REMINDER_SELLER_TO_SHIP="REMINDER_SELLER_TO_SHIP",e.SELLER_APPROVE_REQUEST="SELLER_APPROVE_REQUEST",e.SELLER_DECLINE_REQUEST="SELLER_DECLINE_REQUEST",e.SELLER_ESCALATE="SELLER_ESCALATE",e.SELLER_ISSUE_REFUND="SELLER_ISSUE_REFUND",e.SELLER_ISSUE_STORE_CREDIT_REFUND="SELLER_ISSUE_STORE_CREDIT_REFUND",e.SELLER_MARK_AS_RECEIVED="SELLER_MARK_AS_RECEIVED",e.SELLER_MARK_REFUND_SENT="SELLER_MARK_REFUND_SENT",e.SELLER_MARK_REPLACEMENT_SHIPPED="SELLER_MARK_REPLACEMENT_SHIPPED",e.SELLER_OFFER_PARTIAL_REFUND="SELLER_OFFER_PARTIAL_REFUND",e.SELLER_OFFER_REPLACEMENT="SELLER_OFFER_REPLACEMENT",e.SELLER_OFFER_RETURNS="SELLER_OFFER_RETURNS",e.SELLER_PRINT_SHIPPING_LABEL="SELLER_PRINT_SHIPPING_LABEL",e.SELLER_PROVIDE_LABEL="SELLER_PROVIDE_LABEL",e.SELLER_PROVIDE_RMA="SELLER_PROVIDE_RMA",e.SELLER_PROVIDE_TRACKING_INFO="SELLER_PROVIDE_TRACKING_INFO",e.SELLER_RETRY_REFUND="SELLER_RETRY_REFUND",e.SELLER_SEND_MESSAGE="SELLER_SEND_MESSAGE",e.SELLER_UPDATE_TRACKING="SELLER_UPDATE_TRACKING",e.SELLER_VOID_LABEL="SELLER_VOID_LABEL",e.SUBMIT_FILE="SUBMIT_FILE",e.SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT="SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT",e.SYSTEM_BUYER_REFUND_AS_PAYOUT="SYSTEM_BUYER_REFUND_AS_PAYOUT",e.SYSTEM_CLOSE_RETURN="SYSTEM_CLOSE_RETURN",e.SYSTEM_CREATE_RETURN="SYSTEM_CREATE_RETURN",e.SYSTEM_IMMEDIATE_REFUND="SYSTEM_IMMEDIATE_REFUND",e.TIME_OUT_AFTER_DECLINE="TIME_OUT_AFTER_DECLINE",e.TIME_OUT_AFTER_REFUNDED="TIME_OUT_AFTER_REFUNDED",e.TIME_OUT_AFTER_REFUNDED_AS_PAYOUT="TIME_OUT_AFTER_REFUNDED_AS_PAYOUT",e.TIME_OUT_AFTER_REPLACED="TIME_OUT_AFTER_REPLACED",e.TIME_OUT_FOR_AUTHORIZE="TIME_OUT_FOR_AUTHORIZE",e.TIME_OUT_FOR_AUTO_REFUND="TIME_OUT_FOR_AUTO_REFUND",e.TIME_OUT_FOR_BUYER_RECOUP="TIME_OUT_FOR_BUYER_RECOUP",e.TIME_OUT_FOR_DELIVERY="TIME_OUT_FOR_DELIVERY",e.TIME_OUT_FOR_ESCALATION="TIME_OUT_FOR_ESCALATION",e.TIME_OUT_FOR_ESCALATION_AFTER_SMIR="TIME_OUT_FOR_ESCALATION_AFTER_SMIR",e.TIME_OUT_FOR_ITEM_REPLACED="TIME_OUT_FOR_ITEM_REPLACED",e.TIME_OUT_FOR_MARK_REFUND_RECEIVED="TIME_OUT_FOR_MARK_REFUND_RECEIVED",e.TIME_OUT_FOR_MARK_REFUND_SENT="TIME_OUT_FOR_MARK_REFUND_SENT",e.TIME_OUT_FOR_MASS_PAYOUT="TIME_OUT_FOR_MASS_PAYOUT",e.TIME_OUT_FOR_PAYOUT="TIME_OUT_FOR_PAYOUT",e.TIME_OUT_FOR_PROVIDE_LABEL="TIME_OUT_FOR_PROVIDE_LABEL",e.TIME_OUT_FOR_REFUND="TIME_OUT_FOR_REFUND",e.TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED="TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED",e.TIME_OUT_FOR_REPLACEMENT_SHIPPED="TIME_OUT_FOR_REPLACEMENT_SHIPPED",e.TIME_OUT_FOR_RETURN_SHIPPING="TIME_OUT_FOR_RETURN_SHIPPING",e.TIME_OUT_FOR_RMA="TIME_OUT_FOR_RMA",e.TIME_OUT_FOR_SELLER_INVOICE="TIME_OUT_FOR_SELLER_INVOICE",e.TIME_OUT_FOR_SELLER_PAYOUT="TIME_OUT_FOR_SELLER_PAYOUT",e.TIME_OUT_FOR_SHIPMENT_TRACKING="TIME_OUT_FOR_SHIPMENT_TRACKING",e.TIME_OUT_FOR_SHIPPING="TIME_OUT_FOR_SHIPPING",e.TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE="TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE"}(Fn||(Fn={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(wn||(wn={})),function(e){e.YEAR="YEAR",e.MONTH="MONTH",e.DAY="DAY",e.HOUR="HOUR",e.CALENDAR_DAY="CALENDAR_DAY",e.BUSINESS_DAY="BUSINESS_DAY",e.MINUTE="MINUTE",e.SECOND="SECOND",e.MILLISECOND="MILLISECOND"}(xn||(xn={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(kn||(kn={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(Gn||(Gn={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}(Yn||(Yn={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}($n||($n={})),function(e){e.CASH_IN_PERSON="CASH_IN_PERSON",e.CASH_ON_DELIVERY="CASH_ON_DELIVERY",e.CASH_ON_PICKUP="CASH_ON_PICKUP",e.CASHIER_CHECK="CASHIER_CHECK",e.CREDIT_CARD="CREDIT_CARD",e.ESCROW="ESCROW",e.INTEGRATED_MERCHANT_CREDIT_CARD="INTEGRATED_MERCHANT_CREDIT_CARD",e.LOAN_CHECK="LOAN_CHECK",e.MONEY_ORDER="MONEY_ORDER",e.PAISA_PAY="PAISA_PAY",e.PAISA_PAY_ESCROW="PAISA_PAY_ESCROW",e.PAISA_PAY_ESCROW_EMI="PAISA_PAY_ESCROW_EMI",e.PAYPAL="PAYPAL",e.PERSONAL_CHECK="PERSONAL_CHECK",e.OTHER="OTHER"}(Hn||(Hn={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(jn||(jn={})),function(e){e.AD="AD",e.AE="AE",e.AF="AF",e.AG="AG",e.AI="AI",e.AL="AL",e.AM="AM",e.AN="AN",e.AO="AO",e.AQ="AQ",e.AR="AR",e.AS="AS",e.AT="AT",e.AU="AU",e.AW="AW",e.AX="AX",e.AZ="AZ",e.BA="BA",e.BB="BB",e.BD="BD",e.BE="BE",e.BF="BF",e.BG="BG",e.BH="BH",e.BI="BI",e.BJ="BJ",e.BL="BL",e.BM="BM",e.BN="BN",e.BO="BO",e.BQ="BQ",e.BR="BR",e.BS="BS",e.BT="BT",e.BV="BV",e.BW="BW",e.BY="BY",e.BZ="BZ",e.CA="CA",e.CC="CC",e.CD="CD",e.CF="CF",e.CG="CG",e.CH="CH",e.CI="CI",e.CK="CK",e.CL="CL",e.CM="CM",e.CN="CN",e.CO="CO",e.CR="CR",e.CU="CU",e.CV="CV",e.CW="CW",e.CX="CX",e.CY="CY",e.CZ="CZ",e.DE="DE",e.DJ="DJ",e.DK="DK",e.DM="DM",e.DO="DO",e.DZ="DZ",e.EC="EC",e.EE="EE",e.EG="EG",e.EH="EH",e.ER="ER",e.ES="ES",e.ET="ET",e.FI="FI",e.FJ="FJ",e.FK="FK",e.FM="FM",e.FO="FO",e.FR="FR",e.GA="GA",e.GB="GB",e.GD="GD",e.GE="GE",e.GF="GF",e.GG="GG",e.GH="GH",e.GI="GI",e.GL="GL",e.GM="GM",e.GN="GN",e.GP="GP",e.GQ="GQ",e.GR="GR",e.GS="GS",e.GT="GT",e.GU="GU",e.GW="GW",e.GY="GY",e.HK="HK",e.HM="HM",e.HN="HN",e.HR="HR",e.HT="HT",e.HU="HU",e.ID="ID",e.IE="IE",e.IL="IL",e.IM="IM",e.IN="IN",e.IO="IO",e.IQ="IQ",e.IR="IR",e.IS="IS",e.IT="IT",e.JE="JE",e.JM="JM",e.JO="JO",e.JP="JP",e.KE="KE",e.KG="KG",e.KH="KH",e.KI="KI",e.KM="KM",e.KN="KN",e.KP="KP",e.KR="KR",e.KW="KW",e.KY="KY",e.KZ="KZ",e.LA="LA",e.LB="LB",e.LC="LC",e.LI="LI",e.LK="LK",e.LR="LR",e.LS="LS",e.LT="LT",e.LU="LU",e.LV="LV",e.LY="LY",e.MA="MA",e.MC="MC",e.MD="MD",e.ME="ME",e.MF="MF",e.MG="MG",e.MH="MH",e.MK="MK",e.ML="ML",e.MM="MM",e.MN="MN",e.MO="MO",e.MP="MP",e.MQ="MQ",e.MR="MR",e.MS="MS",e.MT="MT",e.MU="MU",e.MV="MV",e.MW="MW",e.MX="MX",e.MY="MY",e.MZ="MZ",e.NA="NA",e.NC="NC",e.NE="NE",e.NF="NF",e.NG="NG",e.NI="NI",e.NL="NL",e.NO="NO",e.NP="NP",e.NR="NR",e.NU="NU",e.NZ="NZ",e.OM="OM",e.PA="PA",e.PE="PE",e.PF="PF",e.PG="PG",e.PH="PH",e.PK="PK",e.PL="PL",e.PM="PM",e.PN="PN",e.PR="PR",e.PS="PS",e.PT="PT",e.PW="PW",e.PY="PY",e.QA="QA",e.RE="RE",e.RO="RO",e.RS="RS",e.RU="RU",e.RW="RW",e.SA="SA",e.SB="SB",e.SC="SC",e.SD="SD",e.SE="SE",e.SG="SG",e.SH="SH",e.SI="SI",e.SJ="SJ",e.SK="SK",e.SL="SL",e.SM="SM",e.SN="SN",e.SO="SO",e.SR="SR",e.ST="ST",e.SV="SV",e.SX="SX",e.SY="SY",e.SZ="SZ",e.TC="TC",e.TD="TD",e.TF="TF",e.TG="TG",e.TH="TH",e.TJ="TJ",e.TK="TK",e.TL="TL",e.TM="TM",e.TN="TN",e.TO="TO",e.TR="TR",e.TT="TT",e.TV="TV",e.TW="TW",e.TZ="TZ",e.UA="UA",e.UG="UG",e.UM="UM",e.US="US",e.UY="UY",e.UZ="UZ",e.VA="VA",e.VC="VC",e.VE="VE",e.VG="VG",e.VI="VI",e.VN="VN",e.VU="VU",e.WF="WF",e.WS="WS",e.YE="YE",e.YT="YT",e.ZA="ZA",e.ZM="ZM",e.ZW="ZW"}(Vn||(Vn={})),function(e){e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ANG="ANG",e.AOA="AOA",e.ARS="ARS",e.AUD="AUD",e.AWG="AWG",e.AZN="AZN",e.BAM="BAM",e.BBD="BBD",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BMD="BMD",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BTN="BTN",e.BWP="BWP",e.BYR="BYR",e.BZD="BZD",e.CAD="CAD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CUP="CUP",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.EUR="EUR",e.FJD="FJD",e.FKP="FKP",e.GBP="GBP",e.GEL="GEL",e.GHS="GHS",e.GIP="GIP",e.GMD="GMD",e.GNF="GNF",e.GTQ="GTQ",e.GYD="GYD",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HTG="HTG",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KGS="KGS",e.KHR="KHR",e.KMF="KMF",e.KPW="KPW",e.KRW="KRW",e.KWD="KWD",e.KYD="KYD",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.LRD="LRD",e.LSL="LSL",e.LTL="LTL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MRO="MRO",e.MUR="MUR",e.MVR="MVR",e.MWK="MWK",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PGK="PGK",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SBD="SBD",e.SCR="SCR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SHP="SHP",e.SLL="SLL",e.SOS="SOS",e.SRD="SRD",e.STD="STD",e.SYP="SYP",e.SZL="SZL",e.THB="THB",e.TJS="TJS",e.TMT="TMT",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.USD="USD",e.UYU="UYU",e.UZS="UZS",e.VEF="VEF",e.VND="VND",e.VUV="VUV",e.WST="WST",e.XAF="XAF",e.XCD="XCD",e.XOF="XOF",e.XPF="XPF",e.YER="YER",e.ZAR="ZAR",e.ZMW="ZMW",e.ZWL="ZWL"}(qn||(qn={})),function(e){e.de_AT="de-AT",e.de_CH="de-CH",e.de_DE="de-DE",e.en_AU="en-AU",e.en_CA="en-CA",e.en_GB="en-GB",e.en_IE="en-IE",e.en_PH="en-PH",e.en_US="en-US",e.es_ES="es-ES",e.fr_BE="fr-BE",e.fr_CA="fr-CA",e.fr_FR="fr-FR",e.it_IT="it-IT",e.nl_BE="nl-BE",e.nl_NL="nl-NL",e.pl_PL="pl-PL",e.th_TH="th-TH",e.zh_HK="zh-HK",e.zh_TW="zh-TW"}(Kn||(Kn={})),function(e){e.NEW="NEW",e.LIKE_NEW="LIKE_NEW",e.NEW_OTHER="NEW_OTHER",e.NEW_WITH_DEFECTS="NEW_WITH_DEFECTS",e.MANUFACTURER_REFURBISHED="MANUFACTURER_REFURBISHED",e.SELLER_REFURBISHED="SELLER_REFURBISHED",e.USED_EXCELLENT="USED_EXCELLENT",e.USED_VERY_GOOD="USED_VERY_GOOD",e.USED_GOOD="USED_GOOD",e.USED_ACCEPTABLE="USED_ACCEPTABLE",e.FOR_PARTS_OR_NOT_WORKING="FOR_PARTS_OR_NOT_WORKING"}(Wn||(Wn={})),function(e){e.en_US="en_US",e.en_CA="en_CA",e.fr_CA="fr_CA",e.en_GB="en_GB",e.en_AU="en_AU",e.en_IN="en_IN",e.de_AT="de_AT",e.fr_BE="fr_BE",e.fr_FR="fr_FR",e.de_DE="de_DE",e.it_IT="it_IT",e.nl_BE="nl_BE",e.nl_NL="nl_NL",e.es_ES="es_ES",e.de_CH="de_CH",e.fi_FI="fi_FI",e.zh_HK="zh_HK",e.hu_HU="hu_HU",e.en_PH="en_PH",e.pl_PL="pl_PL",e.pt_PT="pt_PT",e.ru_RU="ru_RU",e.en_SG="en_SG",e.en_IE="en_IE",e.en_MY="en_MY"}(Xn||(Xn={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_MOTORS="EBAY_MOTORS",e.EBAY_CA="EBAY_CA",e.EBAY_GB="EBAY_GB",e.EBAY_AU="EBAY_AU",e.EBAY_AT="EBAY_AT",e.EBAY_BE="EBAY_BE",e.EBAY_FR="EBAY_FR",e.EBAY_DE="EBAY_DE",e.EBAY_IT="EBAY_IT",e.EBAY_NL="EBAY_NL",e.EBAY_ES="EBAY_ES",e.EBAY_CH="EBAY_CH",e.EBAY_TW="EBAY_TW",e.EBAY_CZ="EBAY_CZ",e.EBAY_DK="EBAY_DK",e.EBAY_FI="EBAY_FI",e.EBAY_GR="EBAY_GR",e.EBAY_HK="EBAY_HK",e.EBAY_HU="EBAY_HU",e.EBAY_IN="EBAY_IN",e.EBAY_ID="EBAY_ID",e.EBAY_IE="EBAY_IE",e.EBAY_IL="EBAY_IL",e.EBAY_MY="EBAY_MY",e.EBAY_NZ="EBAY_NZ",e.EBAY_NO="EBAY_NO",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_PT="EBAY_PT",e.EBAY_PR="EBAY_PR",e.EBAY_RU="EBAY_RU",e.EBAY_SG="EBAY_SG",e.EBAY_ZA="EBAY_ZA",e.EBAY_SE="EBAY_SE",e.EBAY_TH="EBAY_TH",e.EBAY_VN="EBAY_VN",e.EBAY_CN="EBAY_CN",e.EBAY_PE="EBAY_PE",e.EBAY_JP="EBAY_JP"}(zn||(zn={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(Jn||(Jn={})),function(e){e.CLICK_THROUGH_RATE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_SEARCH_RESULTS_PAGE="LISTING_IMPRESSION_SEARCH_RESULTS_PAGE",e.LISTING_IMPRESSION_STORE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_TOTAL="LISTING_IMPRESSION_TOTAL",e.LISTING_VIEWS_SOURCE_DIRECT="LISTING_VIEWS_SOURCE_DIRECT",e.LISTING_VIEWS_SOURCE_OFF_EBAY="LISTING_VIEWS_SOURCE_OFF_EBAY",e.LISTING_VIEWS_SOURCE_OTHER_EBAY="LISTING_VIEWS_SOURCE_OTHER_EBAY",e.LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE="LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE",e.LISTING_VIEWS_SOURCE_STORE="LISTING_VIEWS_SOURCE_STORE",e.LISTING_VIEWS_TOTAL="LISTING_VIEWS_TOTAL",e.SALES_CONVERSION_RATE="SALES_CONVERSION_RATE",e.TOTAL_IMPRESSION_TOTAL="TOTAL_IMPRESSION_TOTAL",e.TRANSACTION="TRANSACTION"}(Qn||(Qn={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(Zn||(Zn={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(eo||(eo={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(to||(to={})),function(e){e.COUNTRY="COUNTRY",e.COUNTRY_REGION="COUNTRY_REGION",e.STATE_OR_PROVINCE="STATE_OR_PROVINCE",e.WORLD_REGION="WORLD_REGION",e.WORLDWIDE="WORLDWIDE"}(ro||(ro={})),function(e){e.BUYER_CANCEL="BUYER_CANCEL",e.SELLER_CANCEL="SELLER_CANCEL",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.BUYER_RETURN="BUYER_RETURN",e.ITEM_NOT_AS_DESCRIBED="ITEM_NOT_AS_DESCRIBED",e.OTHER_ADJUSTMENT="OTHER_ADJUSTMENT",e.SHIPPING_DISCOUNT="SHIPPING_DISCOUNT"}(no||(no={})),function(e){e.ADDRESS_ISSUES="ADDRESS_ISSUES",e.BUYER_ASKED_CANCEL="BUYER_ASKED_CANCEL",e.BUYER_CANCEL_OR_ADDRESS_ISSUE="BUYER_CANCEL_OR_ADDRESS_ISSUE",e.FOUND_CHEAPER_PRICE="FOUND_CHEAPER_PRICE",e.ORDER_MISTAKE="ORDER_MISTAKE",e.ORDER_UNPAID="ORDER_UNPAID",e.OTHER="OTHER",e.OUT_OF_STOCK_OR_CANNOT_FULFILL="OUT_OF_STOCK_OR_CANNOT_FULFILL",e.PRICE_TOO_HIGH="PRICE_TOO_HIGH",e.UNKNOWN="UNKNOWN",e.WONT_ARRIVE_IN_TIME="WONT_ARRIVE_IN_TIME",e.WRONG_PAYMENT_METHOD="WRONG_PAYMENT_METHOD",e.WRONG_SHIPPING_ADDRESS="WRONG_SHIPPING_ADDRESS",e.WRONG_SHIPPING_METHOD="WRONG_SHIPPING_METHOD"}(oo||(oo={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(io||(io={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(so||(so={})),function(e){e.LETTER="LETTER",e.BULKY_GOODS="BULKY_GOODS",e.CARAVAN="CARAVAN",e.CARS="CARS",e.EUROPALLET="EUROPALLET",e.EXPANDABLE_TOUGH_BAGS="EXPANDABLE_TOUGH_BAGS",e.EXTRA_LARGE_PACK="EXTRA_LARGE_PACK",e.FURNITURE="FURNITURE",e.INDUSTRY_VEHICLES="INDUSTRY_VEHICLES",e.LARGE_CANADA_POSTBOX="LARGE_CANADA_POSTBOX",e.LARGE_CANADA_POST_BUBBLE_MAILER="LARGE_CANADA_POST_BUBBLE_MAILER",e.LARGE_ENVELOPE="LARGE_ENVELOPE",e.MAILING_BOX="MAILING_BOX",e.MEDIUM_CANADA_POST_BOX="MEDIUM_CANADA_POST_BOX",e.MEDIUM_CANADA_POST_BUBBLE_MAILER="MEDIUM_CANADA_POST_BUBBLE_MAILER",e.MOTORBIKES="MOTORBIKES",e.ONE_WAY_PALLET="ONE_WAY_PALLET",e.PACKAGE_THICK_ENVELOPE="PACKAGE_THICK_ENVELOPE",e.PADDED_BAGS="PADDED_BAGS",e.PARCEL_OR_PADDED_ENVELOPE="PARCEL_OR_PADDED_ENVELOPE",e.ROLL="ROLL",e.SMALL_CANADA_POST_BOX="SMALL_CANADA_POST_BOX",e.SMALL_CANADA_POST_BUBBLE_MAILER="SMALL_CANADA_POST_BUBBLE_MAILER",e.TOUGH_BAGS="TOUGH_BAGS",e.UPS_LETTER="UPS_LETTER",e.USPS_FLAT_RATE_ENVELOPE="USPS_FLAT_RATE_ENVELOPE",e.USPS_LARGE_PACK="USPS_LARGE_PACK",e.VERY_LARGE_PACK="VERY_LARGE_PACK",e.WINE_PAK="WINE_PAK"}(ao||(ao={}));var co=Object.freeze({__proto__:null,get ActivityOption(){return Fn},get CancelReason(){return oo},get CaseSearchFieldGroup(){return In},get CaseStatusFilter(){return An},get CategoryType(){return Dn},get Condition(){return Wn},get ContentLanguage(){return Kn},get CountryCode(){return Vn},get CurrencyCode(){return qn},get Decision(){return Un},get EscalateReason(){return Pn},get FilePurpose(){return Bn},get FormatType(){return Jn},get GetReturnFieldGroupEnum(){return bn},get InquirySearchFieldGroup(){return Rn},get InquiryStatusFilter(){return Tn},get LengthUnitOfMeasure(){return io},get Locale(){return Kn},get LocaleEnum(){return Xn},get Marketplace(){return zn},get MarketplaceId(){return mn},get Metric(){return Qn},get PackageType(){return ao},get PaymentMethodType(){return Hn},get PaymentsProgramStatus(){return $n},get PaymentsProgramType(){return Yn},get ReasonForRefund(){return no},get RecipientAccountReferenceType(){return jn},get RefundFeeType(){return Mn},get RefundMethod(){return Zn},get RegionType(){return ro},get RequestType(){return Nn},get ReturnCountFilter(){return Ln},get ReturnMethod(){return eo},get ReturnReason(){return Cn},get ReturnShippingCostPayer(){return to},get ReturnState(){return vn},get ReturnType(){return On},get ShippingCarrier(){return Sn},get ShippingCostType(){return Gn},get ShippingOptionType(){return kn},get SiteId(){return _n},get StoreType(){return wn},get TimeDurationUnit(){return xn},get UserRoleFilter(){return yn},get WeightUnitOfMeasure(){return so}}),lo=Object.freeze({__proto__:null});const po={sandbox:!1,autoRefreshToken:!0,siteId:_n.EBAY_US,marketplaceId:mn.EBAY_US,acceptLanguage:Kn.en_US,contentLanguage:Kn.en_US};class eBayApi extends Api{static fromEnv(e){if(!process.env.EBAY_APP_ID)throw new ApiEnvError("EBAY_APP_ID");if(!process.env.EBAY_CERT_ID)throw new ApiEnvError("EBAY_CERT_ID");let t=null;return process.env.EBAY_JWE&&process.env.EBAY_PRIVATE_KEY&&(t={jwe:process.env.EBAY_JWE,privateKey:process.env.EBAY_PRIVATE_KEY}),new eBayApi({appId:process.env.EBAY_APP_ID,certId:process.env.EBAY_CERT_ID,devId:process.env.EBAY_DEV_ID,authToken:process.env.EBAY_AUTH_TOKEN,siteId:process.env.EBAY_SITE_ID?parseInt(process.env.EBAY_SITE_ID,10):_n.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in mn?mn[process.env.EBAY_MARKETPLACE_ID]:mn.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX,signature:t},e)}constructor(e,t){super({...po,...e},t),this.factory=new ApiFactory(this.config,this.req,this.auth),this.authNAuth=this.auth.authNAuth,this.OAuth2=this.auth.OAuth2,this.oAuth2=this.OAuth2}get buy(){return this._buy||(this._buy=this.factory.createBuyApi())}get commerce(){return this._commerce||(this._commerce=this.factory.createCommerceApi())}get developer(){return this._developer||(this._developer=this.factory.createDeveloperApi())}get postOrder(){return this._postOrder||(this._postOrder=this.factory.createPostOrderApi())}get sell(){return this._sell||(this._sell=this.factory.createSellApi())}get trading(){return this._trading||(this._trading=this.factory.createTradingApi())}get finding(){return this._finding||(this._finding=this.factory.createFindingApi())}get shopping(){return this._shopping||(this._shopping=this.factory.createShoppingApi())}get merchandising(){return this._merchandising||(this._merchandising=this.factory.createMerchandisingApi())}get clientAlerts(){return this._clientAlerts||(this._clientAlerts=this.factory.createClientAlertsApi())}setSignature(e){this.config.signature=e}}eBayApi.SiteId=_n,eBayApi.MarketplaceId=mn,eBayApi.ContentLanguage=Kn,eBayApi.Locale=Kn;export{Kn as ContentLanguage,Kn as Locale,mn as MarketplaceId,_n as SiteId,eBayApi as default,eBayApi,co as enums,qr as errors,lo as types};