ebay-api 9.0.0 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/traditional/XMLRequest.js +1 -1
- package/dist/auth/oAuth2.js +12 -12
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/request.d.ts +2 -0
- package/dist/request.js +6 -0
- package/lib/api/traditional/XMLRequest.js +1 -1
- package/lib/auth/oAuth2.js +12 -12
- package/lib/ebay-api.min.js +1 -1
- package/lib/request.d.ts +2 -0
- package/lib/request.js +6 -0
- package/package.json +1 -1
package/dist/ebay-api.min.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function bind$2(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,r=(n=Object.create(null),t=>{const r=e.call(t);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())});var n;const kindOfTest=e=>(e=e.toLowerCase(),t=>r(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:o}=Array,i=typeOfTest("undefined");const s=kindOfTest("ArrayBuffer");const c=typeOfTest("string"),u=typeOfTest("function"),l=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==r(e))return!1;const n=t(e);return!(null!==n&&n!==Object.prototype&&null!==Object.getPrototypeOf(n)||Symbol.toStringTag in e||Symbol.iterator in e)},p=kindOfTest("Date"),d=kindOfTest("File"),E=kindOfTest("Blob"),f=kindOfTest("FileList"),g=kindOfTest("URLSearchParams");function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),o(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{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){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 _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!i(e)&&e!==_;const h=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&t(Uint8Array)),m=kindOfTest("HTMLFormElement"),R=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),A=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)},y="abcdefghijklmnopqrstuvwxyz",I="0123456789",T={DIGIT:I,ALPHA:y,ALPHA_DIGIT:y+y.toUpperCase()+I};const S=kindOfTest("AsyncFunction");var C={isArray:o,isArrayBuffer:s,isBuffer:function isBuffer$1(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&u(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||u(e.append)&&("formdata"===(t=r(e))||"object"===t&&u(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&&s(e.buffer),t},isString:c,isNumber:l,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isUndefined:i,isDate:p,isFile:d,isBlob:E,isRegExp:A,isFunction:u,isStream:e=>isObject(e)&&u(e.pipe),isURLSearchParams:g,isTypedArray:h,isFileList:f,forEach:forEach,merge:function merge$1(){const{caseless:e}=isContextDefined(this)&&this||{},t={},assignValue=(r,n)=>{const i=e&&findKey(t,n)||n;isPlainObject(t[i])&&isPlainObject(r)?t[i]=merge$1(t[i],r):isPlainObject(r)?t[i]=merge$1({},r):o(r)?t[i]=r.slice():t[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],assignValue);return t},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{r&&u(t)?e[n]=bind$2(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:r,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(o(e))return e;let t=e.length;if(!l(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.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:m,hasOwnProperty:R,hasOwnProp:R,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,((t,r)=>{if(u(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];u(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 o(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)=>(e=+e,Number.isFinite(e)?e:t),findKey:findKey,global:_,isContextDefined:isContextDefined,ALPHABET:T,generateString:(e=16,t=T.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function isSpecCompliantForm(e){return!!(e&&u(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const n=o(e)?[]:{};return forEach(e,((e,t)=>{const o=visit(e,r+1);!i(o)&&(n[t]=o)})),t[r]=void 0,n}}return e};return visit(e,0)},isAsyncFn:S,isThenable:e=>e&&(isObject(e)||u(e))&&u(e.then)&&u(e.catch)};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)}C.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:C.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const N=AxiosError.prototype,O={};["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=>{O[e]={value:e}})),Object.defineProperties(AxiosError,O),Object.defineProperty(N,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,o,i)=>{const s=Object.create(N);return C.toFlatObject(e,s,(function filter(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function isVisitable(e){return C.isPlainObject(e)||C.isArray(e)}function removeBrackets(e){return C.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 P=C.toFlatObject(C,{},null,(function filter(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,r){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=C.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function defined(e,t){return!C.isUndefined(t[e])}))).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(C.isDate(e))return e.toISOString();if(!c&&C.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(e)||C.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(C.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(C.isArray(e)&&function isFlatArray(e){return C.isArray(e)&&!e.some(isVisitable)}(e)||(C.isFileList(e)||C.endsWith(r,"[]"))&&(c=C.toArray(e)))return r=removeBrackets(r),c.forEach((function each(e,n){!C.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(P,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!C.isObject(e))throw new TypeError("data must be an object");return function build(e,r){if(!C.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+r.join("."));u.push(e),C.forEach(e,(function each(e,n){!0===(!(C.isUndefined(e)||null===e)&&o.call(t,e,C.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 b=AxiosURLSearchParams.prototype;function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode$1,o=r&&r.serialize;let i;if(i=o?o(t,r):C.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}b.append=function append(e,t){this._pairs.push([e,t])},b.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 U=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){C.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))}},D={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},L={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 B="undefined"!=typeof window&&"undefined"!=typeof document,M=(v="undefined"!=typeof navigator&&navigator.product,B&&["ReactNative","NativeScript","NS"].indexOf(v)<0);var v;const F="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var x={...Object.freeze({__proto__:null,hasBrowserEnv:B,hasStandardBrowserWebWorkerEnv:F,hasStandardBrowserEnv:M}),...L};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&&C.isArray(r)?r.length:o,s)return C.hasOwnProp(r,o)?r[o]=[r[o],t]:r[o]=t,!i;r[o]&&C.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&C.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(C.isFormData(e)&&C.isFunction(e.entries)){const t={};return C.forEachEntry(e,((e,r)=>{buildPath(function parsePropPath(e){return C.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,t,0)})),t}return null}const w={transitional:D,adapter:["xhr","http"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=C.isObject(e);o&&C.isHTMLForm(e)&&(e=new FormData(e));if(C.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(C.isArrayBuffer(e)||C.isBuffer(e)||C.isStream(e)||C.isFile(e)||C.isBlob(e))return e;if(C.isArrayBufferView(e))return e.buffer;if(C.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 x.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return x.isNode&&C.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=C.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(C.isString(e))try{return(t||JSON.parse)(e),C.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||w.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&C.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}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:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],(e=>{w.headers[e]={}}));var k=w;const G=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Y=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:C.isArray(e)?e.map(normalizeValue):String(e)}function matchHeaderValue(e,t,r,n,o){return C.isFunction(n)?n.call(this,t,r):(o&&(t=r),C.isString(t)?C.isString(n)?-1!==t.indexOf(n):C.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=C.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)=>C.forEach(e,((e,r)=>setHeader(e,r,t)));return C.isPlainObject(e)||e instanceof this.constructor?setHeaders(e,t):C.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]&&G[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&setHeader(t,e,r),this}get(e,t){if(e=normalizeHeader(e)){const r=C.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(C.isFunction(t))return t.call(this,e,r);if(C.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=C.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=C.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return C.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 C.forEach(this,((n,o)=>{const i=C.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 C.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&C.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")}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[Y]=this[Y]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=C.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 C.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(AxiosHeaders.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),C.freezeMethods(AxiosHeaders);var H=AxiosHeaders;function transformData(e,t){const r=this||k,n=t||r,o=H.from(n.headers);let i=n.data;return C.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"}C.inherits(CanceledError,AxiosError,{__CANCEL__:!0});var $=x.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];C.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),C.isString(n)&&s.push("path="+n),C.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){return e&&!function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var j=x.hasStandardBrowserEnv?function standardBrowserEnv(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function resolveURL(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=resolveURL(window.location.href),function isURLSameOrigin(e){const t=C.isString(e)?resolveURL(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function isURLSameOrigin(){return!0};function progressEventReducer(e,t){let r=0;const n=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 o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,c=i-r,u=n(c);r=i;const l={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:o};l[t?"download":"upload"]=!0,e(l)}}const V={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function dispatchXhrRequest(t,r){let n=e.data;const o=H.from(e.headers).normalize();let i,s,{responseType:c,withXSRFToken:u}=e;function done(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(C.isFormData(n))if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const p=buildFullPath(e.baseURL,e.url);function onloadend(){if(!l)return;const n=H.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!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)}((function _resolve(e){t(e),done()}),(function _reject(e){r(e),done()}),{data:c&&"text"!==c&&"json"!==c?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),buildURL(p,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=onloadend:l.onreadystatechange=function handleLoad(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(onloadend)},l.onabort=function handleAbort(){l&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,l)),l=null)},l.onerror=function handleError(){r(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,l)),l=null},l.ontimeout=function handleTimeout(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||D;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new AxiosError(t,n.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,l)),l=null},x.hasStandardBrowserEnv&&(u&&C.isFunction(u)&&(u=u(e)),u||!1!==u&&j(p))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&$.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in l&&C.forEach(o.toJSON(),(function setRequestHeader(e,t){l.setRequestHeader(t,e)})),C.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),c&&"json"!==c&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(r(!t||t.type?new CanceledError(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const d=function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(p);d&&-1===x.protocols.indexOf(d)?r(new AxiosError("Unsupported protocol "+d+":",AxiosError.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};C.forEach(V,((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=>C.isFunction(e)||null===e||!1===e;var adapters_getAdapter=e=>{e=C.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!isResolvedHandle(r)&&(n=V[(t=String(r)).toLowerCase()],void 0===n))throw new AxiosError(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).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 "+(t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};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=H.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||k.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=H.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=H.from(t.response.headers))),Promise.reject(t)}))}const headersToObject=e=>e instanceof H?{...e}:e;function mergeConfig(e,t){t=t||{};const r={};function getMergedValue(e,t,r){return C.isPlainObject(e)&&C.isPlainObject(t)?C.merge.call({caseless:r},e,t):C.isPlainObject(t)?C.merge({},t):C.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r){return C.isUndefined(t)?C.isUndefined(e)?void 0:getMergedValue(void 0,e,r):getMergedValue(e,t,r)}function valueFromConfig2(e,t){if(!C.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return C.isUndefined(t)?C.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)=>mergeDeepProperties(headersToObject(e),headersToObject(t),!0)};return C.forEach(Object.keys(Object.assign({},e,t)),(function computeConfigValue(o){const i=n[o]||mergeDeepProperties,s=i(e[o],t[o],o);C.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)})),r}const K="1.6.8",W={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{W[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const q={};W.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v1.6.8] 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&&!q[n]&&(q[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)}};var X={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:W};const z=X.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new U,response:new U}}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/,""):"";e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}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&&X.assertOptions(r,{silentJSONParsing:z.transitional(z.boolean),forcedJSONParsing:z.transitional(z.boolean),clarifyTimeoutError:z.transitional(z.boolean)},!1),null!=n&&(C.isFunction(n)?t.paramsSerializer={serialize:n}:X.assertOptions(n,{encode:z.function,serialize:z.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&C.merge(o.common,o[t.method]);o&&C.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=H.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.apply(e,s),e.push.apply(e,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=0;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.params,e.paramsSerializer)}}C.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}))}})),C.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 J=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)}static source(){let e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}}}var Q=CancelToken;const Z={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(Z).forEach((([e,t])=>{Z[t]=e}));var ee=Z;const te=function createInstance(e){const t=new J(e),r=bind$2(J.prototype.request,t);return C.extend(r,J.prototype,t,{allOwnKeys:!0}),C.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig(e,t))},r}(k);te.Axios=J,te.CanceledError=CanceledError,te.CancelToken=Q,te.isCancel=isCancel,te.VERSION=K,te.toFormData=toFormData,te.AxiosError=AxiosError,te.Cancel=te.CanceledError,te.all=function all(e){return Promise.all(e)},te.spread=function spread(e){return function wrap(t){return e.apply(null,t)}},te.isAxiosError=function isAxiosError(e){return C.isObject(e)&&!0===e.isAxiosError},te.mergeConfig=mergeConfig,te.AxiosHeaders=H,te.formToJSON=e=>formDataToJSON(C.isHTMLForm(e)?new FormData(e):e),te.getAdapter=adapters_getAdapter,te.HttpStatusCode=ee,te.default=te;var re=te;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 ne,oe,ie={exports:{}};function requireMs(){if(oe)return ne;oe=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 ne=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))}}var se=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 toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}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.map(toNamespace),...createDebug.skips.map(toNamespace).map((e=>"-"+e))].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){let t;createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?createDebug.skips.push(new RegExp("^"+e.slice(1)+"$")):createDebug.names.push(new RegExp("^"+e+"$")))},createDebug.enabled=function enabled(e){if("*"===e[e.length-1])return!0;let t,r;for(t=0,r=createDebug.skips.length;t<r;t++)if(createDebug.skips[t].test(e))return!1;for(t=0,r=createDebug.names.length;t<r;t++)if(createDebug.names[t].test(e))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")}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;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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$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=se(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 ae=ie.exports;const ce=ae("ebay:request"),ue={"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"},le={"Content-Type":"multipart/form-data"};class AxiosRequest{constructor(e={}){this.instance=re.create({headers:{...ue},...e})}get(e,t){return ce("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return ce("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return ce("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return ce("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}var pe={},de={};!function(e){const t=":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",r="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",n=new RegExp("^"+r+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null==t)},e.getAllMatches=function(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},e.nameRegexp=r}(de);const Ee=de,fe={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}pe.validate=function(e,t){t=Object.assign({},fe,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=readPI(e,s),s.err)return s}else{if("<"!==e[s]){if(isWhiteSpace(e[s]))continue;return getErrorObject("InvalidChar","char '"+e[s]+"' is not expected.",getLineNumberForPosition(e,s))}{let c=s;if(s++,"!"===e[s]){s=readCommentAndCDATA(e,s);continue}{let u=!1;"/"===e[s]&&(u=!0,s++);let l="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)l+=e[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),i=l,!Ee.isName(i)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,s))}const p=readAttributeStr(e,s);if(!1===p)return getErrorObject("InvalidAttr","Attributes for '"+l+"' have open quote.",getLineNumberForPosition(e,s));let d=p.value;if(s=p.index,"/"===d[d.length-1]){const r=s-d.length;d=d.substring(0,d.length-1);const o=validateAttributeString(d,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(u){if(!p.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",getLineNumberForPosition(e,s));if(d.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,c));{const t=r.pop();if(l!==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 '"+l+"'.",getLineNumberForPosition(e,c))}0==r.length&&(o=!0)}}else{const i=validateAttributeString(d,t);if(!0!==i)return getErrorObject(i.err.code,i.err.msg,getLineNumberForPosition(e,s-d.length+i.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,s));-1!==t.unpairedTags.indexOf(l)||r.push({tagName:l,tagStartPos:c}),n=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=readCommentAndCDATA(e,s);continue}if("?"!==e[s+1])break;if(s=readPI(e,++s),s.err)return s}else if("&"===e[s]){const t=validateAmpersand(e,s);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,s));s=t}else if(!0===o&&!isWhiteSpace(e[s]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,s));"<"===e[s]&&s--}}}var 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)};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 ge=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=Ee.getAllMatches(e,ge),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 Ee.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}var _e={};const he={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}};_e.buildOptions=function(e){return Object.assign({},he,e)},_e.defaultOptions=he;var me=class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__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})}};const Re=de;function readEntityExp(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let o="";for(;t<e.length&&e[t]!==n;t++)o+=e[t];return[r,o,t]}function isComment(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function isEntity(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function isElement$1(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function isAttlist(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function isNotation(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function validateEntityName(e){if(Re.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}var Ae=function readDocType$1(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&&isEntity(e,t))t+=7,[entityName,val,t]=readEntityExp(e,t+1),-1===val.indexOf("&")&&(r[validateEntityName(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(o&&isElement$1(e,t))t+=8;else if(o&&isAttlist(e,t))t+=8;else if(o&&isNotation(e,t))t+=9;else{if(!isComment)throw new Error("Invalid DOCTYPE");i=!0}n++,s=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}};const ye=/^[-+]?0x[a-fA-F0-9]+$/,Ie=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const Te={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};var Se=function toNumber$1(e,t={}){if(t=Object.assign({},Te,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if(t.hex&&ye.test(r))return Number.parseInt(r,16);{const n=Ie.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.substr(0,e.length-1)),e;return e}(n[3]);const c=n[4]||n[6];if(!t.leadingZeros&&i.length>0&&o&&"."!==r[2])return e;if(!t.leadingZeros&&i.length>0&&!o&&"."!==r[1])return e;{const n=Number(r),u=""+n;return-1!==u.search(/[eE]/)||c?t.eNotation?n:e:-1!==r.indexOf(".")?"0"===u&&""===s||u===s||o&&u==="-"+s?n:e:i?s===u||o+s===u?n:e:r===u||r===o+u?n:e}}return e}};const Ce=de,Ne=me,Oe=Ae,Pe=Se;"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Ce.nameRegexp);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 be=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=Ce.getAllMatches(e,be),n=r.length,o={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(r[e][1]);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 Ne("!xml");let r=t,n="",o="";for(let i=0;i<e.length;i++){if("<"===e[i])if("/"===e[i+1]){const t=findClosingIndex(e,">",i,"Closing Tag is not closed.");let s=e.substring(i+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,o));const c=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);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="",i=t}else if("?"===e[i+1]){let t=readTagExp(e,i,!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 Ne(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)}i=t.closeIndex+1}else if("!--"===e.substr(i+1,3)){const t=findClosingIndex(e,"--\x3e",i+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(i+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}i=t}else if("!D"===e.substr(i+1,2)){const t=Oe(e,i);this.docTypeEntities=t.entities,i=t.i}else if("!["===e.substr(i+1,2)){const t=findClosingIndex(e,"]]>",i,"CDATA is not closed.")-2,s=e.substring(i+9,t);if(n=this.saveTextToParentTag(n,r,o),this.options.cdataPropName)r.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let e=this.parseTextData(s,r.tagname,o,!0,!1,!0);null==e&&(e=""),r.add(this.options.textNodeName,e)}i=t+2}else{let s=readTagExp(e,i,this.options.removeNSPrefix),c=s.tagName,u=s.tagExp,l=s.attrExpPresent,p=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const d=r;if(d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==t.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)i=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))i=s.closeIndex;else{const r=this.readStopNodeData(e,c,p+1);if(!r)throw new Error(`Unexpected end of ${c}`);i=r.i,t=r.tagContent}const n=new Ne(c);c!==u&&l&&(n[":@"]=this.buildAttributesMap(u,o,c)),t&&(t=this.parseTextData(t,c,o,!0,l,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,o)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new Ne(c);c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new Ne(c);this.tagsNodeStack.push(r),c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o),r=e}n="",i=p}}else n+=e[i]}return t.child};function addChild(e,t,r){const n=this.options.updateTag(t.tagname,r,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}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===Object.keys(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){const n="*."+r;for(const r in e){const o=e[r];if(n===o||t===o)return!0}return!1}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;if(-1!==c&&(u=i.substr(0,c).replace(/\s\s*$/,""),i=i.substr(c+1)),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}}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&&Pe(e,r)}return Ce.isExist(e)?e:""}var Ue=class OrderedObjParser{constructor(e){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:"₹"}},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}},De={};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);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])}De.prettify=function prettify$1(e,t){return compress(e,t)};const{buildOptions:Le}=_e,Be=Ue,{prettify:Me}=De,ve=pe;var Fe=class XMLParser{constructor(e){this.externalEntities={},this.options=Le(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=ve.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new Be(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:Me(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 '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}};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);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 e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){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 xe=function toXml(e,t){let r="";return t.format&&t.indentBy.length>0&&(r="\n"),arrToStr(e,t,"",r)},we={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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(e){this.options=Object.assign({},we,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(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){const n=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){return this.options.preserveOrder?xe(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){let r="",n="";for(let o in e)if(void 0===e[o]);else if(null===e[o])"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextValNode(e[o],o,"",t);else if("object"!=typeof e[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+e[o]);else if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;let i="";for(let s=0;s<r;s++){const r=e[o][s];void 0===r||(null===r?"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?i+=this.j2x(r,t+1).val:i+=this.processTextOrObjNode(r,o,t):i+=this.buildTextValNode(r,o,"",t))}this.options.oneListGroup&&(i=this.buildObjectNode(i,o,"",t)),n+=i}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[o][t[i]])}else n+=this.processTextOrObjNode(e[o],o,t);return{attrStr:r,val:n}},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&&-1===e.indexOf("<")?this.indentate(n)+"<"+t+r+i+">"+e+o:!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}},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};var ke={XMLParser:Fe,XMLValidator:pe,XMLBuilder:Builder};const Ge=ae("ebay:error"),Ye=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){super(e,t,r),this.errorCode=n}}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 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 getEBayErrorFromResponse(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."}}(e.response?.data||t),n={...r,[Ye]: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(Ge("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}=extractEBayError(e);if("domain"in r&&"ACCESS"===r.domain)throw new EBayAccessDenied(t,n,r,o);if("message"in r&&"invalid_grant"===r.message)throw new EBayInvalidGrant(t,n,r,o);if("message"in r&&"invalid_scope"===r.message)throw new EBayInvalidScope(t,n,r,o);if("message"in r&&"Invalid access token"===r.message)throw new EBayInvalidAccessToken(t,n,r,o);if(o===EBayNotFound.code)throw new EBayNotFound(t,n,r,o);throw new EBayApiError(t,n,r,o)},checkEBayTraditionalResponse=(e,t)=>{if(!("Errors"in t)&&!("errorMessage"in t))return;const{message:r,meta:n,description:o,errorCode:i}=extractEBayError(e,t);if(void 0===i)throw new EBayApiError(r,o,n,i);switch(i){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(r,o,n,i);case EBayIAFTokenInvalid.code:case 1.32:throw new EBayIAFTokenInvalid(r,o,n,i);case EBayTokenRequired.code:throw new EBayTokenRequired(r,o,n,i);case EBayAuthTokenIsHardExpired.code:throw new EBayAuthTokenIsHardExpired(r,o,n,i)}throw new EBayApiError(r,o,n,i)};var He=Object.freeze({__proto__:null,rawError:Ye,EBayError:EBayError,EBayNoCallError:EBayNoCallError,ApiEnvError:ApiEnvError,EbayApiError:EbayApiError,EBayApiError:EBayApiError,EBayAccessDenied:EBayAccessDenied,EBayInvalidGrant:EBayInvalidGrant,EBayNotFound:EBayNotFound,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayAuthTokenIsHardExpired:EBayAuthTokenIsHardExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayTokenRequired:EBayTokenRequired,EBayInvalidScope:EBayInvalidScope,extractEBayError:extractEBayError,handleEBayError:handleEBayError,checkEBayTraditionalResponse:checkEBayTraditionalResponse});const $e=ae("ebay:xml:request"),je={attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseNodeValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,isArray:(e,t)=>/Array$/.test(t.slice(0,-e.length-1))},Ve={raw:!1,parseOptions:je,useIaf:!0,sign:!1,headers:{},returnResponse:!1},Ke={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EBayNoCallError;this.callName=e,this.fields=t||{},this.config={...Ve,...r},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getParseOptions(){return{...je,...this.config.parseOptions}}getHeaders(){return{...Ke,...this.config.headers}}toJSON(e){const t=this.getParseOptions();return $e("parseOption",t),new ke.XMLParser(t).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+XMLRequest.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);$e("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||{}}};$e("config",n);const o=await this.req.post(this.config.endpoint,t,n);if($e("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($e("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayTraditionalResponse(e.response,t)}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}XMLRequest.j2x=new ke.XMLBuilder({attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,cdataTagName:"__cdata",cdataPositionChar:"\\c",format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"});const We=ae("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 We("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 We("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return We("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 qe=ae("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 qe("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.post(this.identityEndpoint,{scope:this.scope.join(" "),grant_type:"client_credentials"},{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+btoa(this.config.appId+":"+this.config.certId)}})).data}catch(e){throw qe("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){qe("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return qe("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw qe("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.post(this.identityEndpoint,{grant_type:"authorization_code",code:e,redirect_uri:t},{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+btoa(this.config.appId+":"+this.config.certId)}})).data;return qe("User Access Token",r),r}catch(e){throw qe("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 qe("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.post(this.identityEndpoint,{grant_type:"refresh_token",refresh_token:this._authToken.refresh_token,scope:this.scope.join(" ")},{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+btoa(this.config.appId+":"+this.config.certId)}})).data;qe("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw qe("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return qe("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 Xe="-----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(Xe)||(t=Xe+"\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 ze={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},Je={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(Je).filter((e=>void 0!==this.config[e])).reduce(((e,t)=>(e[Je[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={...ze,...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 Qe=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}})}};Qe.id="Feed";let Ze=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})}};Ze.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){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r}})}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";let et=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}})}};et.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 Account 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`)}}Account.id="Account";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:{...le}})}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)}}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`)}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`)}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:le})}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)}}Listing.id="Listing";var tt,rt="undefined"!=typeof Symbol&&Symbol,nt=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(t 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 n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},ot="Function.prototype.bind called on incompatible ",it=Array.prototype.slice,st=Object.prototype.toString,at="[object Function]",ct=function bind(e){var t=this;if("function"!=typeof t||st.call(t)!==at)throw new TypeError(ot+t);for(var r,n=it.call(arguments,1),binder=function(){if(this instanceof r){var o=t.apply(this,n.concat(it.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(it.call(arguments)))},o=Math.max(0,t.length-n.length),i=[],s=0;s<o;s++)i.push("$"+s);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(binder),t.prototype){var c=function Empty(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},ut=Function.prototype.bind||ct,lt=ut.call(Function.call,Object.prototype.hasOwnProperty),pt=SyntaxError,dt=Function,Et=TypeError,getEvalledConstructor=function(e){try{return dt('"use strict"; return ('+e+").constructor;")()}catch(e){}},ft=Object.getOwnPropertyDescriptor;if(ft)try{ft({},"")}catch(e){ft=null}var throwTypeError=function(){throw new Et},gt=ft?function(){try{return throwTypeError}catch(e){try{return ft(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,_t=function hasNativeSymbols(){return"function"==typeof rt&&("function"==typeof Symbol&&("symbol"==typeof rt("foo")&&("symbol"==typeof Symbol("bar")&&nt())))}(),ht=Object.getPrototypeOf||function(e){return e.__proto__},mt={},Rt="undefined"==typeof Uint8Array?tt:ht(Uint8Array),At={"%AggregateError%":"undefined"==typeof AggregateError?tt:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?tt:ArrayBuffer,"%ArrayIteratorPrototype%":_t?ht([][Symbol.iterator]()):tt,"%AsyncFromSyncIteratorPrototype%":tt,"%AsyncFunction%":mt,"%AsyncGenerator%":mt,"%AsyncGeneratorFunction%":mt,"%AsyncIteratorPrototype%":mt,"%Atomics%":"undefined"==typeof Atomics?tt:Atomics,"%BigInt%":"undefined"==typeof BigInt?tt:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?tt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?tt:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?tt:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?tt:FinalizationRegistry,"%Function%":dt,"%GeneratorFunction%":mt,"%Int8Array%":"undefined"==typeof Int8Array?tt:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?tt:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?tt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_t?ht(ht([][Symbol.iterator]())):tt,"%JSON%":"object"==typeof JSON?JSON:tt,"%Map%":"undefined"==typeof Map?tt:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_t?ht((new Map)[Symbol.iterator]()):tt,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?tt:Promise,"%Proxy%":"undefined"==typeof Proxy?tt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?tt:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?tt:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_t?ht((new Set)[Symbol.iterator]()):tt,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?tt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_t?ht(""[Symbol.iterator]()):tt,"%Symbol%":_t?Symbol:tt,"%SyntaxError%":pt,"%ThrowTypeError%":gt,"%TypedArray%":Rt,"%TypeError%":Et,"%Uint8Array%":"undefined"==typeof Uint8Array?tt:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?tt:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?tt:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?tt:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?tt:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?tt:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?tt:WeakSet},yt=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&&(t=ht(n.prototype))}return At[e]=t,t},It={"%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"]},Tt=ut,St=lt,Ct=Tt.call(Function.call,Array.prototype.concat),Nt=Tt.call(Function.apply,Array.prototype.splice),Ot=Tt.call(Function.call,String.prototype.replace),Pt=Tt.call(Function.call,String.prototype.slice),bt=Tt.call(Function.call,RegExp.prototype.exec),Ut=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Dt=/\\(\\)?/g,Lt=function stringToPath(e){var t=Pt(e,0,1),r=Pt(e,-1);if("%"===t&&"%"!==r)throw new pt("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new pt("invalid intrinsic syntax, expected opening `%`");var n=[];return Ot(e,Ut,(function(e,t,r,o){n[n.length]=r?Ot(o,Dt,"$1"):t||e})),n},Bt=function getBaseIntrinsic(e,t){var r,n=e;if(St(It,n)&&(n="%"+(r=It[n])[0]+"%"),St(At,n)){var o=At[n];if(o===mt&&(o=yt(n)),void 0===o&&!t)throw new Et("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new pt("intrinsic "+e+" does not exist!")},Mt=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new Et("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Et('"allowMissing" argument must be a boolean');if(null===bt(/^%?[^%]*%?$/,e))throw new pt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Lt(e),n=r.length>0?r[0]:"",o=Bt("%"+n+"%",t),i=o.name,s=o.value,c=!1,u=o.alias;u&&(n=u[0],Nt(r,Ct([0,1],u)));for(var l=1,p=!0;l<r.length;l+=1){var d=r[l],E=Pt(d,0,1),f=Pt(d,-1);if(('"'===E||"'"===E||"`"===E||'"'===f||"'"===f||"`"===f)&&E!==f)throw new pt("property names with quotes must have matching quotes");if("constructor"!==d&&p||(c=!0),St(At,i="%"+(n+="."+d)+"%"))s=At[i];else if(null!=s){if(!(d in s)){if(!t)throw new Et("base intrinsic for "+e+" exists, but the property is not available.");return}if(ft&&l+1>=r.length){var g=ft(s,d);s=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:s[d]}else p=St(s,d),s=s[d];p&&!c&&(At[i]=s)}}return s},vt={exports:{}};!function(e){var t=ut,r=Mt,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),s=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function callBind(e){var r=i(t,o,arguments);if(s&&c){var n=s(r,"length");n.configurable&&c(r,"length",{value:1+u(0,e.length-(arguments.length-1))})}return r};var l=function applyBind(){return i(t,n,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l}(vt);var Ft=Mt,xt=vt.exports,wt=xt(Ft("String.prototype.indexOf")),kt=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}})),Gt="function"==typeof Map&&Map.prototype,Yt=Object.getOwnPropertyDescriptor&&Gt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ht=Gt&&Yt&&"function"==typeof Yt.get?Yt.get:null,$t=Gt&&Map.prototype.forEach,jt="function"==typeof Set&&Set.prototype,Vt=Object.getOwnPropertyDescriptor&&jt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Kt=jt&&Vt&&"function"==typeof Vt.get?Vt.get:null,Wt=jt&&Set.prototype.forEach,qt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Xt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,zt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Jt=Boolean.prototype.valueOf,Qt=Object.prototype.toString,Zt=Function.prototype.toString,er=String.prototype.match,tr=String.prototype.slice,rr=String.prototype.replace,nr=String.prototype.toUpperCase,or=String.prototype.toLowerCase,ir=RegExp.prototype.test,sr=Array.prototype.concat,ar=Array.prototype.join,cr=Array.prototype.slice,ur=Math.floor,lr="function"==typeof BigInt?BigInt.prototype.valueOf:null,pr=Object.getOwnPropertySymbols,dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Er="function"==typeof Symbol&&"object"==typeof Symbol.iterator,fr="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Er||"symbol")?Symbol.toStringTag:null,gr=Object.prototype.propertyIsEnumerable,_r=("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||ir.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-ur(-e):ur(e);if(n!==e){var o=String(n),i=tr.call(t,o.length+1);return rr.call(o,r,"$&_")+"."+rr.call(rr.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return rr.call(t,r,"$&_")}var hr=kt,mr=hr.custom,Rr=isSymbol(mr)?mr:null;function wrapQuotes(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function quote(e){return rr.call(String(e),/"/g,""")}function isArray$3(e){return!("[object Array]"!==toStr(e)||fr&&"object"==typeof e&&fr in e)}function isRegExp$1(e){return!("[object RegExp]"!==toStr(e)||fr&&"object"==typeof e&&fr in e)}function isSymbol(e){if(Er)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!dr)return!1;try{return dr.call(e),!0}catch(e){}return!1}var Ar=Object.prototype.hasOwnProperty||function(e){return e in this};function has$3(e,t){return Ar.call(e,t)}function toStr(e){return Qt.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(tr.call(e,0,t.maxStringLength),t)+n}return wrapQuotes(rr.call(rr.call(e,/(['\\])/g,"\\$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":"")+nr.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):ar.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+ar.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 pr?pr(e):[];if(Er){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||Er&&i["$"+u]instanceof Symbol||(ir.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof pr)for(var l=0;l<s.length;l++)gr.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}var yr,Ir,Tr=Mt,Sr=function callBoundIntrinsic(e,t){var r=Ft(e,!!t);return"function"==typeof r&&wt(e,".prototype.")>-1?xt(r):r},Cr=function inspect_(e,t,r,n){var o=t||{};if(has$3(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==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=ar.call(Array(e.indent+1)," ")}return{base:r,prev:ar.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=cr.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=er.call(Zt.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?" { "+ar.call(E,", ")+" }":"")}if(isSymbol(e)){var f=Er?rr.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):dr.call(e);return"object"!=typeof e||Er?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 g="<"+or.call(String(e.nodeName)),_=e.attributes||[],h=0;h<_.length;h++)g+=" "+_[h].name+"="+wrapQuotes(quote(_[h].value),"double",o);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+or.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)+"]":"[ "+ar.call(m,", ")+" ]"}if(function isError(e){return!("[object Error]"!==toStr(e)||fr&&"object"==typeof e&&fr in e)}(e)){var R=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||gr.call(e,"cause")?0===R.length?"["+String(e)+"]":"{ ["+String(e)+"] "+ar.call(R,", ")+" }":"{ ["+String(e)+"] "+ar.call(sr.call("[cause]: "+inspect(e.cause),R),", ")+" }"}if("object"==typeof e&&i){if(Rr&&"function"==typeof e[Rr]&&hr)return hr(e,{depth:l-r});if("symbol"!==i&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!Ht||!e||"object"!=typeof e)return!1;try{Ht.call(e);try{Kt.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var A=[];return $t.call(e,(function(t,r){A.push(inspect(r,e,!0)+" => "+inspect(t,e))})),collectionOf("Map",Ht.call(e),A,p)}if(function isSet(e){if(!Kt||!e||"object"!=typeof e)return!1;try{Kt.call(e);try{Ht.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var y=[];return Wt.call(e,(function(t){y.push(inspect(t,e))})),collectionOf("Set",Kt.call(e),y,p)}if(function isWeakMap(e){if(!qt||!e||"object"!=typeof e)return!1;try{qt.call(e,qt);try{Xt.call(e,Xt)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!Xt||!e||"object"!=typeof e)return!1;try{Xt.call(e,Xt);try{qt.call(e,qt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!zt||!e||"object"!=typeof e)return!1;try{return zt.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return!("[object Number]"!==toStr(e)||fr&&"object"==typeof e&&fr in e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!lr)return!1;try{return lr.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(lr.call(e)));if(function isBoolean(e){return!("[object Boolean]"!==toStr(e)||fr&&"object"==typeof e&&fr in e)}(e))return markBoxed(Jt.call(e));if(function isString(e){return!("[object String]"!==toStr(e)||fr&&"object"==typeof e&&fr in e)}(e))return markBoxed(inspect(String(e)));if(!function isDate(e){return!("[object Date]"!==toStr(e)||fr&&"object"==typeof e&&fr in e)}(e)&&!isRegExp$1(e)){var I=arrObjKeys(e,inspect),T=_r?_r(e)===Object.prototype:e instanceof Object||e.constructor===Object,S=e instanceof Object?"":"null prototype",C=!T&&fr&&Object(e)===e&&fr in e?tr.call(toStr(e),8,-1):S?"Object":"",N=(T||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(C||S?"["+ar.call(sr.call([],C||[],S||[]),": ")+"] ":"");return 0===I.length?N+"{}":p?N+"{"+indentedJoin(I,p)+"}":N+"{ "+ar.call(I,", ")+" }"}return String(e)},Nr=Tr("%TypeError%"),Or=Tr("%WeakMap%",!0),Pr=Tr("%Map%",!0),br=Sr("WeakMap.prototype.get",!0),Ur=Sr("WeakMap.prototype.set",!0),Dr=Sr("WeakMap.prototype.has",!0),Lr=Sr("Map.prototype.get",!0),Br=Sr("Map.prototype.set",!0),Mr=Sr("Map.prototype.has",!0),listGetNode=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},vr=String.prototype.replace,Fr=/%20/g,xr="RFC3986",wr={default:xr,formatters:{RFC1738:function(e){return vr.call(e,Fr,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:xr},kr=wr,Gr=Object.prototype.hasOwnProperty,Yr=Array.isArray,Hr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),$r=function arrayToObject(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},jr={arrayToObject:$r,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){return[].concat(e,t)},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(Yr(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){var u=i.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===kr.RFC1738&&(40===u||41===u)?s+=i.charAt(c):u<128?s+=Hr[u]:u<2048?s+=Hr[192|u>>6]+Hr[128|63&u]:u<55296||u>=57344?s+=Hr[224|u>>12]+Hr[128|u>>6&63]+Hr[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(c)),s+=Hr[240|u>>18]+Hr[128|u>>12&63]+Hr[128|u>>6&63]+Hr[128|63&u])}return s},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function maybeMap(e,t){if(Yr(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){if(Yr(e))e.push(t);else{if(!e||"object"!=typeof e)return[e,t];(r&&(r.plainObjects||r.allowPrototypes)||!Gr.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(t);var n=e;return Yr(e)&&!Yr(t)&&(n=$r(e,r)),Yr(e)&&Yr(t)?(t.forEach((function(t,n){if(Gr.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 Gr.call(e,n)?e[n]=merge(e[n],o,r):e[n]=o,e}),n)}},Vr=function getSideChannel(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Nr("Side channel does not contain "+Cr(e))},get:function(n){if(Or&&n&&("object"==typeof n||"function"==typeof n)){if(e)return br(e,n)}else if(Pr){if(t)return Lr(t,n)}else if(r)return function(e,t){var r=listGetNode(e,t);return r&&r.value}(r,n)},has:function(n){if(Or&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Dr(e,n)}else if(Pr){if(t)return Mr(t,n)}else if(r)return function(e,t){return!!listGetNode(e,t)}(r,n);return!1},set:function(n,o){Or&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new Or),Ur(e,n,o)):Pr?(t||(t=new Pr),Br(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},Kr=jr,Wr=wr,qr=Object.prototype.hasOwnProperty,Xr={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},zr=Array.isArray,Jr=String.prototype.split,Qr=Array.prototype.push,pushToArray=function(e,t){Qr.apply(e,zr(t)?t:[t])},Zr=Date.prototype.toISOString,en=Wr.default,tn={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Kr.encode,encodeValuesOnly:!1,format:en,formatter:Wr.formatters[en],indices:!1,serializeDate:function serializeDate(e){return Zr.call(e)},skipNulls:!1,strictNullHandling:!1},rn={},nn=function stringify(e,t,r,n,o,i,s,c,u,l,p,d,E,f,g,_){for(var h=e,m=_,R=0,A=!1;void 0!==(m=m.get(rn))&&!A;){var y=m.get(e);if(R+=1,void 0!==y){if(y===R)throw new RangeError("Cyclic object value");A=!0}void 0===m.get(rn)&&(R=0)}if("function"==typeof c?h=c(t,h):h instanceof Date?h=p(h):"comma"===r&&zr(h)&&(h=Kr.maybeMap(h,(function(e){return e instanceof Date?p(e):e}))),null===h){if(o)return s&&!f?s(t,tn.encoder,g,"key",d):t;h=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(h)||Kr.isBuffer(h)){if(s){var I=f?t:s(t,tn.encoder,g,"key",d);if("comma"===r&&f){for(var T=Jr.call(String(h),","),S="",C=0;C<T.length;++C)S+=(0===C?"":",")+E(s(T[C],tn.encoder,g,"value",d));return[E(I)+(n&&zr(h)&&1===T.length?"[]":"")+"="+S]}return[E(I)+"="+E(s(h,tn.encoder,g,"value",d))]}return[E(t)+"="+E(String(h))]}var N,O=[];if(void 0===h)return O;if("comma"===r&&zr(h))N=[{value:h.length>0?h.join(",")||null:void 0}];else if(zr(c))N=c;else{var P=Object.keys(h);N=u?P.sort(u):P}for(var b=n&&zr(h)&&1===h.length?t+"[]":t,U=0;U<N.length;++U){var D=N[U],L="object"==typeof D&&void 0!==D.value?D.value:h[D];if(!i||null!==L){var B=zr(h)?"function"==typeof r?r(b,D):b:b+(l?"."+D:"["+D+"]");_.set(e,R);var M=Vr();M.set(rn,_),pushToArray(O,stringify(L,B,r,n,o,i,s,c,u,l,p,d,E,f,g,M))}}return O},on=jr,sn=Object.prototype.hasOwnProperty,an=Array.isArray,cn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:on.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},parseArrayValue=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},un=function parseQueryStringKeys(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!r.plainObjects&&sn.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var l=0;r.depth>0&&null!==(s=i.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&sn.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+o.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:parseArrayValue(t,r),i=e.length-1;i>=0;--i){var s,c=e[i];if("[]"===c&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&c!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=o:"__proto__"!==u&&(s[u]=o):s={0:o}}o=s}return o}(u,t,r,n)}},stringify=function(e,t){var r,n=e,o=function normalizeStringifyOptions(e){if(!e)return tn;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||tn.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=Wr.default;if(void 0!==e.format){if(!qr.call(Wr.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Wr.formatters[r],o=tn.filter;return("function"==typeof e.filter||zr(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:tn.addQueryPrefix,allowDots:void 0===e.allowDots?tn.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:tn.charsetSentinel,delimiter:void 0===e.delimiter?tn.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:tn.encode,encoder:"function"==typeof e.encoder?e.encoder:tn.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:tn.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:tn.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:tn.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:tn.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):zr(o.filter)&&(r=o.filter);var i,s=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in Xr?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var c=Xr[i];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="comma"===c&&t&&t.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var l=Vr(),p=0;p<r.length;++p){var d=r[p];o.skipNulls&&null===n[d]||pushToArray(s,nn(n[d],d,c,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,l))}var E=s.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:""},ln={formats:wr,parse:function(e,t){var r=function normalizeParseOptions(e){if(!e)return cn;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");var t=void 0===e.charset?cn.charset:e.charset;return{allowDots:void 0===e.allowDots?cn.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:cn.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:cn.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:cn.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:cn.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:cn.comma,decoder:"function"==typeof e.decoder?e.decoder:cn.decoder,delimiter:"string"==typeof e.delimiter||on.isRegExp(e.delimiter)?e.delimiter:cn.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:cn.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:cn.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:cn.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:cn.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:cn.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function parseQueryStringValues(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=o.split(t.delimiter,i),c=-1,u=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[r]?u="utf-8":"utf8=%26%2310003%3B"===s[r]&&(u="iso-8859-1"),c=r,r=s.length);for(r=0;r<s.length;++r)if(r!==c){var l,p,d=s[r],E=d.indexOf("]="),f=-1===E?d.indexOf("="):E+1;-1===f?(l=t.decoder(d,cn.decoder,u,"key"),p=t.strictNullHandling?null:""):(l=t.decoder(d.slice(0,f),cn.decoder,u,"key"),p=on.maybeMap(parseArrayValue(d.slice(f+1),t),(function(e){return t.decoder(e,cn.decoder,u,"value")}))),p&&t.interpretNumericEntities&&"iso-8859-1"===u&&(p=interpretNumericEntities(p)),d.indexOf("[]=")>-1&&(p=an(p)?[p]:p),sn.call(n,l)?n[l]=on.combine(n[l],p):n[l]=p}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s<i.length;++s){var c=i[s],u=un(c,n[c],r,"string"==typeof e);o=on.merge(o,u,r)}return!0===r.allowSparse?o:on.compact(o)},stringify:stringify};!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"}(yr||(yr={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(Ir||(Ir={}));var pn,dn=Ir;!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"}(pn||(pn={}));var En,fn=pn;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(En||(En={}));var gn,_n=En;!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"}(gn||(gn={}));var hn,mn=gn;!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"}(hn||(hn={}));var Rn,An,yn,In,Tn,Sn,Cn,Nn,On,Pn,bn,Un,Dn,Ln,Bn,Mn,vn,Fn,xn,wn,kn,Gn,Yn,Hn,$n,jn,Vn,Kn,Wn,qn,Xn,zn,Jn,Qn,Zn,eo,to,ro,no,oo,io,so,ao,co,uo,lo=hn;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...Ve,...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:lo,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:mn,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:fn,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:dn},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>ln.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:_n,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)}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(Qe),marketing:this.createRestfulApi(Ze),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)}}createDeveloperApi(){return{analytics:this.createRestfulApi(et),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(Account),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"}(Rn||(Rn={})),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"}(An||(An={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(yn||(yn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(In||(In={})),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"}(Tn||(Tn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(Sn||(Sn={})),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"}(Cn||(Cn={})),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"}(Nn||(Nn={})),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"}(On||(On={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(Pn||(Pn={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(bn||(bn={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(Un||(Un={})),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"}(Dn||(Dn={})),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"}(Ln||(Ln={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(Bn||(Bn={})),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"}(Mn||(Mn={})),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"}(Fn||(Fn={})),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"}(xn||(xn={})),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"}(wn||(wn={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(kn||(kn={})),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"}(Gn||(Gn={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(Yn||(Yn={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(Hn||(Hn={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}($n||($n={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}(jn||(jn={})),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"}(Vn||(Vn={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(Kn||(Kn={})),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"}(Wn||(Wn={})),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"}(Xn||(Xn={})),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"}(zn||(zn={})),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"}(Jn||(Jn={})),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"}(Qn||(Qn={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(Zn||(Zn={})),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"}(eo||(eo={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(to||(to={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(ro||(ro={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(no||(no={})),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"}(oo||(oo={})),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"}(io||(io={})),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"}(so||(so={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(ao||(ao={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(co||(co={})),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"}(uo||(uo={}));var po=Object.freeze({__proto__:null,get SiteId(){return Rn},get MarketplaceId(){return An},get UserRoleFilter(){return yn},get InquirySearchFieldGroup(){return In},get CaseStatusFilter(){return Tn},get CaseSearchFieldGroup(){return Sn},get InquiryStatusFilter(){return Cn},get ShippingCarrier(){return Nn},get ReturnReason(){return On},get RequestType(){return Pn},get ReturnType(){return bn},get GetReturnFieldGroupEnum(){return Un},get EscalateReason(){return Dn},get Decision(){return Ln},get CategoryType(){return Bn},get ReturnCountFilter(){return Mn},get ReturnState(){return vn},get FilePurpose(){return Fn},get RefundFeeType(){return xn},get ActivityOption(){return wn},get StoreType(){return kn},get TimeDurationUnit(){return Gn},get ShippingOptionType(){return Yn},get ShippingCostType(){return Hn},get PaymentsProgramType(){return $n},get PaymentsProgramStatus(){return jn},get PaymentMethodType(){return Vn},get RecipientAccountReferenceType(){return Kn},get CountryCode(){return Wn},get CurrencyCode(){return qn},get Locale(){return Xn},get ContentLanguage(){return Xn},get Condition(){return zn},get LocaleEnum(){return Jn},get Marketplace(){return Qn},get FormatType(){return Zn},get Metric(){return eo},get RefundMethod(){return to},get ReturnMethod(){return ro},get ReturnShippingCostPayer(){return no},get RegionType(){return oo},get ReasonForRefund(){return io},get CancelReason(){return so},get LengthUnitOfMeasure(){return ao},get WeightUnitOfMeasure(){return co},get PackageType(){return uo}}),Eo=Object.freeze({__proto__:null});const fo={sandbox:!1,autoRefreshToken:!0,siteId:Rn.EBAY_US,marketplaceId:An.EBAY_US,acceptLanguage:Xn.en_US,contentLanguage:Xn.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):Rn.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in An?An[process.env.EBAY_MARKETPLACE_ID]:An.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX,signature:t},e)}constructor(e,t){super({...fo,...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=Rn,eBayApi.MarketplaceId=An,eBayApi.ContentLanguage=Xn,eBayApi.Locale=Xn;export{Xn as ContentLanguage,Xn as Locale,An as MarketplaceId,Rn as SiteId,eBayApi as default,eBayApi,po as enums,He as errors,Eo as types};
|
|
1
|
+
function bind$2(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,r=(n=Object.create(null),t=>{const r=e.call(t);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())});var n;const kindOfTest=e=>(e=e.toLowerCase(),t=>r(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:o}=Array,i=typeOfTest("undefined");const s=kindOfTest("ArrayBuffer");const c=typeOfTest("string"),u=typeOfTest("function"),l=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==r(e))return!1;const n=t(e);return!(null!==n&&n!==Object.prototype&&null!==Object.getPrototypeOf(n)||Symbol.toStringTag in e||Symbol.iterator in e)},p=kindOfTest("Date"),d=kindOfTest("File"),E=kindOfTest("Blob"),f=kindOfTest("FileList"),g=kindOfTest("URLSearchParams");function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),o(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{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){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 _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!i(e)&&e!==_;const h=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&t(Uint8Array)),m=kindOfTest("HTMLFormElement"),R=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),A=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)},y="abcdefghijklmnopqrstuvwxyz",I="0123456789",T={DIGIT:I,ALPHA:y,ALPHA_DIGIT:y+y.toUpperCase()+I};const S=kindOfTest("AsyncFunction");var C={isArray:o,isArrayBuffer:s,isBuffer:function isBuffer$1(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&u(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||u(e.append)&&("formdata"===(t=r(e))||"object"===t&&u(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&&s(e.buffer),t},isString:c,isNumber:l,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isUndefined:i,isDate:p,isFile:d,isBlob:E,isRegExp:A,isFunction:u,isStream:e=>isObject(e)&&u(e.pipe),isURLSearchParams:g,isTypedArray:h,isFileList:f,forEach:forEach,merge:function merge$1(){const{caseless:e}=isContextDefined(this)&&this||{},t={},assignValue=(r,n)=>{const i=e&&findKey(t,n)||n;isPlainObject(t[i])&&isPlainObject(r)?t[i]=merge$1(t[i],r):isPlainObject(r)?t[i]=merge$1({},r):o(r)?t[i]=r.slice():t[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],assignValue);return t},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{r&&u(t)?e[n]=bind$2(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:r,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(o(e))return e;let t=e.length;if(!l(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.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:m,hasOwnProperty:R,hasOwnProp:R,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,((t,r)=>{if(u(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];u(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 o(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)=>(e=+e,Number.isFinite(e)?e:t),findKey:findKey,global:_,isContextDefined:isContextDefined,ALPHABET:T,generateString:(e=16,t=T.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function isSpecCompliantForm(e){return!!(e&&u(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const n=o(e)?[]:{};return forEach(e,((e,t)=>{const o=visit(e,r+1);!i(o)&&(n[t]=o)})),t[r]=void 0,n}}return e};return visit(e,0)},isAsyncFn:S,isThenable:e=>e&&(isObject(e)||u(e))&&u(e.then)&&u(e.catch)};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)}C.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:C.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const N=AxiosError.prototype,O={};["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=>{O[e]={value:e}})),Object.defineProperties(AxiosError,O),Object.defineProperty(N,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,o,i)=>{const s=Object.create(N);return C.toFlatObject(e,s,(function filter(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function isVisitable(e){return C.isPlainObject(e)||C.isArray(e)}function removeBrackets(e){return C.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 P=C.toFlatObject(C,{},null,(function filter(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,r){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=C.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function defined(e,t){return!C.isUndefined(t[e])}))).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(C.isDate(e))return e.toISOString();if(!c&&C.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(e)||C.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(C.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(C.isArray(e)&&function isFlatArray(e){return C.isArray(e)&&!e.some(isVisitable)}(e)||(C.isFileList(e)||C.endsWith(r,"[]"))&&(c=C.toArray(e)))return r=removeBrackets(r),c.forEach((function each(e,n){!C.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(P,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!C.isObject(e))throw new TypeError("data must be an object");return function build(e,r){if(!C.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+r.join("."));u.push(e),C.forEach(e,(function each(e,n){!0===(!(C.isUndefined(e)||null===e)&&o.call(t,e,C.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 b=AxiosURLSearchParams.prototype;function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode$1,o=r&&r.serialize;let i;if(i=o?o(t,r):C.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}b.append=function append(e,t){this._pairs.push([e,t])},b.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 U=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){C.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))}},D={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},L={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 B="undefined"!=typeof window&&"undefined"!=typeof document,M=(v="undefined"!=typeof navigator&&navigator.product,B&&["ReactNative","NativeScript","NS"].indexOf(v)<0);var v;const F="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var x={...Object.freeze({__proto__:null,hasBrowserEnv:B,hasStandardBrowserWebWorkerEnv:F,hasStandardBrowserEnv:M}),...L};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&&C.isArray(r)?r.length:o,s)return C.hasOwnProp(r,o)?r[o]=[r[o],t]:r[o]=t,!i;r[o]&&C.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&C.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(C.isFormData(e)&&C.isFunction(e.entries)){const t={};return C.forEachEntry(e,((e,r)=>{buildPath(function parsePropPath(e){return C.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,t,0)})),t}return null}const w={transitional:D,adapter:["xhr","http"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=C.isObject(e);o&&C.isHTMLForm(e)&&(e=new FormData(e));if(C.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(C.isArrayBuffer(e)||C.isBuffer(e)||C.isStream(e)||C.isFile(e)||C.isBlob(e))return e;if(C.isArrayBufferView(e))return e.buffer;if(C.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 x.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return x.isNode&&C.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=C.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(C.isString(e))try{return(t||JSON.parse)(e),C.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||w.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&C.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}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:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],(e=>{w.headers[e]={}}));var k=w;const G=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Y=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:C.isArray(e)?e.map(normalizeValue):String(e)}function matchHeaderValue(e,t,r,n,o){return C.isFunction(n)?n.call(this,t,r):(o&&(t=r),C.isString(t)?C.isString(n)?-1!==t.indexOf(n):C.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=C.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)=>C.forEach(e,((e,r)=>setHeader(e,r,t)));return C.isPlainObject(e)||e instanceof this.constructor?setHeaders(e,t):C.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]&&G[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&setHeader(t,e,r),this}get(e,t){if(e=normalizeHeader(e)){const r=C.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(C.isFunction(t))return t.call(this,e,r);if(C.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=C.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=C.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return C.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 C.forEach(this,((n,o)=>{const i=C.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 C.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&C.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")}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[Y]=this[Y]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=C.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 C.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(AxiosHeaders.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),C.freezeMethods(AxiosHeaders);var H=AxiosHeaders;function transformData(e,t){const r=this||k,n=t||r,o=H.from(n.headers);let i=n.data;return C.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"}C.inherits(CanceledError,AxiosError,{__CANCEL__:!0});var $=x.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];C.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),C.isString(n)&&s.push("path="+n),C.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){return e&&!function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var j=x.hasStandardBrowserEnv?function standardBrowserEnv(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function resolveURL(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=resolveURL(window.location.href),function isURLSameOrigin(e){const t=C.isString(e)?resolveURL(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function isURLSameOrigin(){return!0};function progressEventReducer(e,t){let r=0;const n=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 o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,c=i-r,u=n(c);r=i;const l={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:o};l[t?"download":"upload"]=!0,e(l)}}const V={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function dispatchXhrRequest(t,r){let n=e.data;const o=H.from(e.headers).normalize();let i,s,{responseType:c,withXSRFToken:u}=e;function done(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(C.isFormData(n))if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const p=buildFullPath(e.baseURL,e.url);function onloadend(){if(!l)return;const n=H.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!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)}((function _resolve(e){t(e),done()}),(function _reject(e){r(e),done()}),{data:c&&"text"!==c&&"json"!==c?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),buildURL(p,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=onloadend:l.onreadystatechange=function handleLoad(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(onloadend)},l.onabort=function handleAbort(){l&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,l)),l=null)},l.onerror=function handleError(){r(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,l)),l=null},l.ontimeout=function handleTimeout(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||D;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new AxiosError(t,n.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,l)),l=null},x.hasStandardBrowserEnv&&(u&&C.isFunction(u)&&(u=u(e)),u||!1!==u&&j(p))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&$.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in l&&C.forEach(o.toJSON(),(function setRequestHeader(e,t){l.setRequestHeader(t,e)})),C.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),c&&"json"!==c&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(r(!t||t.type?new CanceledError(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const d=function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(p);d&&-1===x.protocols.indexOf(d)?r(new AxiosError("Unsupported protocol "+d+":",AxiosError.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};C.forEach(V,((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=>C.isFunction(e)||null===e||!1===e;var adapters_getAdapter=e=>{e=C.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!isResolvedHandle(r)&&(n=V[(t=String(r)).toLowerCase()],void 0===n))throw new AxiosError(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).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 "+(t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};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=H.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||k.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=H.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=H.from(t.response.headers))),Promise.reject(t)}))}const headersToObject=e=>e instanceof H?{...e}:e;function mergeConfig(e,t){t=t||{};const r={};function getMergedValue(e,t,r){return C.isPlainObject(e)&&C.isPlainObject(t)?C.merge.call({caseless:r},e,t):C.isPlainObject(t)?C.merge({},t):C.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r){return C.isUndefined(t)?C.isUndefined(e)?void 0:getMergedValue(void 0,e,r):getMergedValue(e,t,r)}function valueFromConfig2(e,t){if(!C.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return C.isUndefined(t)?C.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)=>mergeDeepProperties(headersToObject(e),headersToObject(t),!0)};return C.forEach(Object.keys(Object.assign({},e,t)),(function computeConfigValue(o){const i=n[o]||mergeDeepProperties,s=i(e[o],t[o],o);C.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)})),r}const K="1.6.8",W={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{W[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const q={};W.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v1.6.8] 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&&!q[n]&&(q[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)}};var X={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:W};const J=X.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new U,response:new U}}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/,""):"";e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}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&&X.assertOptions(r,{silentJSONParsing:J.transitional(J.boolean),forcedJSONParsing:J.transitional(J.boolean),clarifyTimeoutError:J.transitional(J.boolean)},!1),null!=n&&(C.isFunction(n)?t.paramsSerializer={serialize:n}:X.assertOptions(n,{encode:J.function,serialize:J.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&C.merge(o.common,o[t.method]);o&&C.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=H.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.apply(e,s),e.push.apply(e,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=0;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.params,e.paramsSerializer)}}C.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}))}})),C.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 z=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)}static source(){let e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}}}var Q=CancelToken;const Z={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(Z).forEach((([e,t])=>{Z[t]=e}));var ee=Z;const te=function createInstance(e){const t=new z(e),r=bind$2(z.prototype.request,t);return C.extend(r,z.prototype,t,{allOwnKeys:!0}),C.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig(e,t))},r}(k);te.Axios=z,te.CanceledError=CanceledError,te.CancelToken=Q,te.isCancel=isCancel,te.VERSION=K,te.toFormData=toFormData,te.AxiosError=AxiosError,te.Cancel=te.CanceledError,te.all=function all(e){return Promise.all(e)},te.spread=function spread(e){return function wrap(t){return e.apply(null,t)}},te.isAxiosError=function isAxiosError(e){return C.isObject(e)&&!0===e.isAxiosError},te.mergeConfig=mergeConfig,te.AxiosHeaders=H,te.formToJSON=e=>formDataToJSON(C.isHTMLForm(e)?new FormData(e):e),te.getAdapter=adapters_getAdapter,te.HttpStatusCode=ee,te.default=te;var re=te;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 ne,oe,ie={exports:{}};function requireMs(){if(oe)return ne;oe=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 ne=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))}}var se=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 toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}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.map(toNamespace),...createDebug.skips.map(toNamespace).map((e=>"-"+e))].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){let t;createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?createDebug.skips.push(new RegExp("^"+e.slice(1)+"$")):createDebug.names.push(new RegExp("^"+e+"$")))},createDebug.enabled=function enabled(e){if("*"===e[e.length-1])return!0;let t,r;for(t=0,r=createDebug.skips.length;t<r;t++)if(createDebug.skips[t].test(e))return!1;for(t=0,r=createDebug.names.length;t<r;t++)if(createDebug.names[t].test(e))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")}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;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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$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=se(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 ae,ce=ie.exports,ue="undefined"!=typeof Symbol&&Symbol,le=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(t 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 n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},pe="Function.prototype.bind called on incompatible ",de=Array.prototype.slice,Ee=Object.prototype.toString,fe="[object Function]",ge=function bind(e){var t=this;if("function"!=typeof t||Ee.call(t)!==fe)throw new TypeError(pe+t);for(var r,n=de.call(arguments,1),binder=function(){if(this instanceof r){var o=t.apply(this,n.concat(de.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(de.call(arguments)))},o=Math.max(0,t.length-n.length),i=[],s=0;s<o;s++)i.push("$"+s);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(binder),t.prototype){var c=function Empty(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},_e=Function.prototype.bind||ge,he=_e.call(Function.call,Object.prototype.hasOwnProperty),me=SyntaxError,Re=Function,Ae=TypeError,getEvalledConstructor=function(e){try{return Re('"use strict"; return ('+e+").constructor;")()}catch(e){}},ye=Object.getOwnPropertyDescriptor;if(ye)try{ye({},"")}catch(e){ye=null}var throwTypeError=function(){throw new Ae},Ie=ye?function(){try{return throwTypeError}catch(e){try{return ye(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,Te=function hasNativeSymbols(){return"function"==typeof ue&&("function"==typeof Symbol&&("symbol"==typeof ue("foo")&&("symbol"==typeof Symbol("bar")&&le())))}(),Se=Object.getPrototypeOf||function(e){return e.__proto__},Ce={},Ne="undefined"==typeof Uint8Array?ae:Se(Uint8Array),Oe={"%AggregateError%":"undefined"==typeof AggregateError?ae:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?ae:ArrayBuffer,"%ArrayIteratorPrototype%":Te?Se([][Symbol.iterator]()):ae,"%AsyncFromSyncIteratorPrototype%":ae,"%AsyncFunction%":Ce,"%AsyncGenerator%":Ce,"%AsyncGeneratorFunction%":Ce,"%AsyncIteratorPrototype%":Ce,"%Atomics%":"undefined"==typeof Atomics?ae:Atomics,"%BigInt%":"undefined"==typeof BigInt?ae:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?ae:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?ae:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?ae:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?ae:FinalizationRegistry,"%Function%":Re,"%GeneratorFunction%":Ce,"%Int8Array%":"undefined"==typeof Int8Array?ae:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?ae:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?ae:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Te?Se(Se([][Symbol.iterator]())):ae,"%JSON%":"object"==typeof JSON?JSON:ae,"%Map%":"undefined"==typeof Map?ae:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Te?Se((new Map)[Symbol.iterator]()):ae,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?ae:Promise,"%Proxy%":"undefined"==typeof Proxy?ae:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?ae:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?ae:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Te?Se((new Set)[Symbol.iterator]()):ae,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?ae:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Te?Se(""[Symbol.iterator]()):ae,"%Symbol%":Te?Symbol:ae,"%SyntaxError%":me,"%ThrowTypeError%":Ie,"%TypedArray%":Ne,"%TypeError%":Ae,"%Uint8Array%":"undefined"==typeof Uint8Array?ae:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?ae:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?ae:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?ae:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?ae:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?ae:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?ae:WeakSet},Pe=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&&(t=Se(n.prototype))}return Oe[e]=t,t},be={"%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"]},Ue=_e,De=he,Le=Ue.call(Function.call,Array.prototype.concat),Be=Ue.call(Function.apply,Array.prototype.splice),Me=Ue.call(Function.call,String.prototype.replace),ve=Ue.call(Function.call,String.prototype.slice),Fe=Ue.call(Function.call,RegExp.prototype.exec),xe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,we=/\\(\\)?/g,ke=function stringToPath(e){var t=ve(e,0,1),r=ve(e,-1);if("%"===t&&"%"!==r)throw new me("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new me("invalid intrinsic syntax, expected opening `%`");var n=[];return Me(e,xe,(function(e,t,r,o){n[n.length]=r?Me(o,we,"$1"):t||e})),n},Ge=function getBaseIntrinsic(e,t){var r,n=e;if(De(be,n)&&(n="%"+(r=be[n])[0]+"%"),De(Oe,n)){var o=Oe[n];if(o===Ce&&(o=Pe(n)),void 0===o&&!t)throw new Ae("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new me("intrinsic "+e+" does not exist!")},Ye=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new Ae("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Ae('"allowMissing" argument must be a boolean');if(null===Fe(/^%?[^%]*%?$/,e))throw new me("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=ke(e),n=r.length>0?r[0]:"",o=Ge("%"+n+"%",t),i=o.name,s=o.value,c=!1,u=o.alias;u&&(n=u[0],Be(r,Le([0,1],u)));for(var l=1,p=!0;l<r.length;l+=1){var d=r[l],E=ve(d,0,1),f=ve(d,-1);if(('"'===E||"'"===E||"`"===E||'"'===f||"'"===f||"`"===f)&&E!==f)throw new me("property names with quotes must have matching quotes");if("constructor"!==d&&p||(c=!0),De(Oe,i="%"+(n+="."+d)+"%"))s=Oe[i];else if(null!=s){if(!(d in s)){if(!t)throw new Ae("base intrinsic for "+e+" exists, but the property is not available.");return}if(ye&&l+1>=r.length){var g=ye(s,d);s=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:s[d]}else p=De(s,d),s=s[d];p&&!c&&(Oe[i]=s)}}return s},He={exports:{}};!function(e){var t=_e,r=Ye,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),s=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function callBind(e){var r=i(t,o,arguments);if(s&&c){var n=s(r,"length");n.configurable&&c(r,"length",{value:1+u(0,e.length-(arguments.length-1))})}return r};var l=function applyBind(){return i(t,n,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l}(He);var $e=Ye,je=He.exports,Ve=je($e("String.prototype.indexOf")),Ke=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}})),We="function"==typeof Map&&Map.prototype,qe=Object.getOwnPropertyDescriptor&&We?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Xe=We&&qe&&"function"==typeof qe.get?qe.get:null,Je=We&&Map.prototype.forEach,ze="function"==typeof Set&&Set.prototype,Qe=Object.getOwnPropertyDescriptor&&ze?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ze=ze&&Qe&&"function"==typeof Qe.get?Qe.get:null,et=ze&&Set.prototype.forEach,tt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,rt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,nt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,ot=Boolean.prototype.valueOf,it=Object.prototype.toString,st=Function.prototype.toString,at=String.prototype.match,ct=String.prototype.slice,ut=String.prototype.replace,lt=String.prototype.toUpperCase,pt=String.prototype.toLowerCase,dt=RegExp.prototype.test,Et=Array.prototype.concat,ft=Array.prototype.join,gt=Array.prototype.slice,_t=Math.floor,ht="function"==typeof BigInt?BigInt.prototype.valueOf:null,mt=Object.getOwnPropertySymbols,Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,At="function"==typeof Symbol&&"object"==typeof Symbol.iterator,yt="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===At||"symbol")?Symbol.toStringTag:null,It=Object.prototype.propertyIsEnumerable,Tt=("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||dt.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-_t(-e):_t(e);if(n!==e){var o=String(n),i=ct.call(t,o.length+1);return ut.call(o,r,"$&_")+"."+ut.call(ut.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ut.call(t,r,"$&_")}var St=Ke,Ct=St.custom,Nt=isSymbol(Ct)?Ct:null;function wrapQuotes(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function quote(e){return ut.call(String(e),/"/g,""")}function isArray$3(e){return!("[object Array]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}function isRegExp$1(e){return!("[object RegExp]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}function isSymbol(e){if(At)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!Rt)return!1;try{return Rt.call(e),!0}catch(e){}return!1}var Ot=Object.prototype.hasOwnProperty||function(e){return e in this};function has$3(e,t){return Ot.call(e,t)}function toStr(e){return it.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(ct.call(e,0,t.maxStringLength),t)+n}return wrapQuotes(ut.call(ut.call(e,/(['\\])/g,"\\$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":"")+lt.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):ft.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+ft.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 mt?mt(e):[];if(At){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||At&&i["$"+u]instanceof Symbol||(dt.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof mt)for(var l=0;l<s.length;l++)It.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}var Pt=Ye,bt=function callBoundIntrinsic(e,t){var r=$e(e,!!t);return"function"==typeof r&&Ve(e,".prototype.")>-1?je(r):r},Ut=function inspect_(e,t,r,n){var o=t||{};if(has$3(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==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=ft.call(Array(e.indent+1)," ")}return{base:r,prev:ft.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=gt.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=at.call(st.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?" { "+ft.call(E,", ")+" }":"")}if(isSymbol(e)){var f=At?ut.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Rt.call(e);return"object"!=typeof e||At?f:markBoxed(f)}if(function isElement$1(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="<"+pt.call(String(e.nodeName)),_=e.attributes||[],h=0;h<_.length;h++)g+=" "+_[h].name+"="+wrapQuotes(quote(_[h].value),"double",o);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+pt.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)+"]":"[ "+ft.call(m,", ")+" ]"}if(function isError(e){return!("[object Error]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e)){var R=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||It.call(e,"cause")?0===R.length?"["+String(e)+"]":"{ ["+String(e)+"] "+ft.call(R,", ")+" }":"{ ["+String(e)+"] "+ft.call(Et.call("[cause]: "+inspect(e.cause),R),", ")+" }"}if("object"==typeof e&&i){if(Nt&&"function"==typeof e[Nt]&&St)return St(e,{depth:l-r});if("symbol"!==i&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!Xe||!e||"object"!=typeof e)return!1;try{Xe.call(e);try{Ze.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var A=[];return Je.call(e,(function(t,r){A.push(inspect(r,e,!0)+" => "+inspect(t,e))})),collectionOf("Map",Xe.call(e),A,p)}if(function isSet(e){if(!Ze||!e||"object"!=typeof e)return!1;try{Ze.call(e);try{Xe.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var y=[];return et.call(e,(function(t){y.push(inspect(t,e))})),collectionOf("Set",Ze.call(e),y,p)}if(function isWeakMap(e){if(!tt||!e||"object"!=typeof e)return!1;try{tt.call(e,tt);try{rt.call(e,rt)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!rt||!e||"object"!=typeof e)return!1;try{rt.call(e,rt);try{tt.call(e,tt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!nt||!e||"object"!=typeof e)return!1;try{return nt.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return!("[object Number]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!ht)return!1;try{return ht.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(ht.call(e)));if(function isBoolean(e){return!("[object Boolean]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e))return markBoxed(ot.call(e));if(function isString(e){return!("[object String]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e))return markBoxed(inspect(String(e)));if(!function isDate(e){return!("[object Date]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e)&&!isRegExp$1(e)){var I=arrObjKeys(e,inspect),T=Tt?Tt(e)===Object.prototype:e instanceof Object||e.constructor===Object,S=e instanceof Object?"":"null prototype",C=!T&&yt&&Object(e)===e&&yt in e?ct.call(toStr(e),8,-1):S?"Object":"",N=(T||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(C||S?"["+ft.call(Et.call([],C||[],S||[]),": ")+"] ":"");return 0===I.length?N+"{}":p?N+"{"+indentedJoin(I,p)+"}":N+"{ "+ft.call(I,", ")+" }"}return String(e)},Dt=Pt("%TypeError%"),Lt=Pt("%WeakMap%",!0),Bt=Pt("%Map%",!0),Mt=bt("WeakMap.prototype.get",!0),vt=bt("WeakMap.prototype.set",!0),Ft=bt("WeakMap.prototype.has",!0),xt=bt("Map.prototype.get",!0),wt=bt("Map.prototype.set",!0),kt=bt("Map.prototype.has",!0),listGetNode=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Gt=String.prototype.replace,Yt=/%20/g,Ht="RFC3986",$t={default:Ht,formatters:{RFC1738:function(e){return Gt.call(e,Yt,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Ht},jt=$t,Vt=Object.prototype.hasOwnProperty,Kt=Array.isArray,Wt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),qt=function arrayToObject(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},Xt={arrayToObject:qt,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){return[].concat(e,t)},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(Kt(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){var u=i.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===jt.RFC1738&&(40===u||41===u)?s+=i.charAt(c):u<128?s+=Wt[u]:u<2048?s+=Wt[192|u>>6]+Wt[128|63&u]:u<55296||u>=57344?s+=Wt[224|u>>12]+Wt[128|u>>6&63]+Wt[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(c)),s+=Wt[240|u>>18]+Wt[128|u>>12&63]+Wt[128|u>>6&63]+Wt[128|63&u])}return s},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function maybeMap(e,t){if(Kt(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){if(Kt(e))e.push(t);else{if(!e||"object"!=typeof e)return[e,t];(r&&(r.plainObjects||r.allowPrototypes)||!Vt.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(t);var n=e;return Kt(e)&&!Kt(t)&&(n=qt(e,r)),Kt(e)&&Kt(t)?(t.forEach((function(t,n){if(Vt.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 Vt.call(e,n)?e[n]=merge(e[n],o,r):e[n]=o,e}),n)}},Jt=function getSideChannel(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Dt("Side channel does not contain "+Ut(e))},get:function(n){if(Lt&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Mt(e,n)}else if(Bt){if(t)return xt(t,n)}else if(r)return function(e,t){var r=listGetNode(e,t);return r&&r.value}(r,n)},has:function(n){if(Lt&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Ft(e,n)}else if(Bt){if(t)return kt(t,n)}else if(r)return function(e,t){return!!listGetNode(e,t)}(r,n);return!1},set:function(n,o){Lt&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new Lt),vt(e,n,o)):Bt?(t||(t=new Bt),wt(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},zt=Xt,Qt=$t,Zt=Object.prototype.hasOwnProperty,er={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},tr=Array.isArray,rr=String.prototype.split,nr=Array.prototype.push,pushToArray=function(e,t){nr.apply(e,tr(t)?t:[t])},or=Date.prototype.toISOString,ir=Qt.default,sr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:zt.encode,encodeValuesOnly:!1,format:ir,formatter:Qt.formatters[ir],indices:!1,serializeDate:function serializeDate(e){return or.call(e)},skipNulls:!1,strictNullHandling:!1},ar={},cr=function stringify(e,t,r,n,o,i,s,c,u,l,p,d,E,f,g,_){for(var h=e,m=_,R=0,A=!1;void 0!==(m=m.get(ar))&&!A;){var y=m.get(e);if(R+=1,void 0!==y){if(y===R)throw new RangeError("Cyclic object value");A=!0}void 0===m.get(ar)&&(R=0)}if("function"==typeof c?h=c(t,h):h instanceof Date?h=p(h):"comma"===r&&tr(h)&&(h=zt.maybeMap(h,(function(e){return e instanceof Date?p(e):e}))),null===h){if(o)return s&&!f?s(t,sr.encoder,g,"key",d):t;h=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(h)||zt.isBuffer(h)){if(s){var I=f?t:s(t,sr.encoder,g,"key",d);if("comma"===r&&f){for(var T=rr.call(String(h),","),S="",C=0;C<T.length;++C)S+=(0===C?"":",")+E(s(T[C],sr.encoder,g,"value",d));return[E(I)+(n&&tr(h)&&1===T.length?"[]":"")+"="+S]}return[E(I)+"="+E(s(h,sr.encoder,g,"value",d))]}return[E(t)+"="+E(String(h))]}var N,O=[];if(void 0===h)return O;if("comma"===r&&tr(h))N=[{value:h.length>0?h.join(",")||null:void 0}];else if(tr(c))N=c;else{var P=Object.keys(h);N=u?P.sort(u):P}for(var b=n&&tr(h)&&1===h.length?t+"[]":t,U=0;U<N.length;++U){var D=N[U],L="object"==typeof D&&void 0!==D.value?D.value:h[D];if(!i||null!==L){var B=tr(h)?"function"==typeof r?r(b,D):b:b+(l?"."+D:"["+D+"]");_.set(e,R);var M=Jt();M.set(ar,_),pushToArray(O,stringify(L,B,r,n,o,i,s,c,u,l,p,d,E,f,g,M))}}return O},ur=Xt,lr=Object.prototype.hasOwnProperty,pr=Array.isArray,dr={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ur.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},parseArrayValue=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Er=function parseQueryStringKeys(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!r.plainObjects&&lr.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var l=0;r.depth>0&&null!==(s=i.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&lr.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+o.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:parseArrayValue(t,r),i=e.length-1;i>=0;--i){var s,c=e[i];if("[]"===c&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&c!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=o:"__proto__"!==u&&(s[u]=o):s={0:o}}o=s}return o}(u,t,r,n)}},stringify=function(e,t){var r,n=e,o=function normalizeStringifyOptions(e){if(!e)return sr;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||sr.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=Qt.default;if(void 0!==e.format){if(!Zt.call(Qt.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Qt.formatters[r],o=sr.filter;return("function"==typeof e.filter||tr(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:sr.addQueryPrefix,allowDots:void 0===e.allowDots?sr.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:sr.charsetSentinel,delimiter:void 0===e.delimiter?sr.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:sr.encode,encoder:"function"==typeof e.encoder?e.encoder:sr.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:sr.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:sr.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:sr.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:sr.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):tr(o.filter)&&(r=o.filter);var i,s=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in er?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var c=er[i];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="comma"===c&&t&&t.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var l=Jt(),p=0;p<r.length;++p){var d=r[p];o.skipNulls&&null===n[d]||pushToArray(s,cr(n[d],d,c,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,l))}var E=s.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:""},fr={formats:$t,parse:function(e,t){var r=function normalizeParseOptions(e){if(!e)return dr;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");var t=void 0===e.charset?dr.charset:e.charset;return{allowDots:void 0===e.allowDots?dr.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:dr.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:dr.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:dr.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:dr.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:dr.comma,decoder:"function"==typeof e.decoder?e.decoder:dr.decoder,delimiter:"string"==typeof e.delimiter||ur.isRegExp(e.delimiter)?e.delimiter:dr.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:dr.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:dr.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:dr.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:dr.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:dr.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function parseQueryStringValues(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=o.split(t.delimiter,i),c=-1,u=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[r]?u="utf-8":"utf8=%26%2310003%3B"===s[r]&&(u="iso-8859-1"),c=r,r=s.length);for(r=0;r<s.length;++r)if(r!==c){var l,p,d=s[r],E=d.indexOf("]="),f=-1===E?d.indexOf("="):E+1;-1===f?(l=t.decoder(d,dr.decoder,u,"key"),p=t.strictNullHandling?null:""):(l=t.decoder(d.slice(0,f),dr.decoder,u,"key"),p=ur.maybeMap(parseArrayValue(d.slice(f+1),t),(function(e){return t.decoder(e,dr.decoder,u,"value")}))),p&&t.interpretNumericEntities&&"iso-8859-1"===u&&(p=interpretNumericEntities(p)),d.indexOf("[]=")>-1&&(p=pr(p)?[p]:p),lr.call(n,l)?n[l]=ur.combine(n[l],p):n[l]=p}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s<i.length;++s){var c=i[s],u=Er(c,n[c],r,"string"==typeof e);o=ur.merge(o,u,r)}return!0===r.allowSparse?o:ur.compact(o)},stringify:stringify};const gr=ce("ebay:request"),_r={"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"},hr={"Content-Type":"multipart/form-data"};class AxiosRequest{constructor(e={}){this.instance=re.create({headers:{..._r},...e})}get(e,t){return gr("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return gr("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return gr("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return gr("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}postForm(e,t,r){gr("postForm: "+e);const n=fr.stringify(t);return this.instance.post(e,n,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}var mr={},Rr={};!function(e){const t=":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",r="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",n=new RegExp("^"+r+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null==t)},e.getAllMatches=function(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},e.nameRegexp=r}(Rr);const Ar=Rr,yr={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}mr.validate=function(e,t){t=Object.assign({},yr,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=readPI(e,s),s.err)return s}else{if("<"!==e[s]){if(isWhiteSpace(e[s]))continue;return getErrorObject("InvalidChar","char '"+e[s]+"' is not expected.",getLineNumberForPosition(e,s))}{let c=s;if(s++,"!"===e[s]){s=readCommentAndCDATA(e,s);continue}{let u=!1;"/"===e[s]&&(u=!0,s++);let l="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)l+=e[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),i=l,!Ar.isName(i)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,s))}const p=readAttributeStr(e,s);if(!1===p)return getErrorObject("InvalidAttr","Attributes for '"+l+"' have open quote.",getLineNumberForPosition(e,s));let d=p.value;if(s=p.index,"/"===d[d.length-1]){const r=s-d.length;d=d.substring(0,d.length-1);const o=validateAttributeString(d,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(u){if(!p.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",getLineNumberForPosition(e,s));if(d.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,c));{const t=r.pop();if(l!==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 '"+l+"'.",getLineNumberForPosition(e,c))}0==r.length&&(o=!0)}}else{const i=validateAttributeString(d,t);if(!0!==i)return getErrorObject(i.err.code,i.err.msg,getLineNumberForPosition(e,s-d.length+i.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,s));-1!==t.unpairedTags.indexOf(l)||r.push({tagName:l,tagStartPos:c}),n=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=readCommentAndCDATA(e,s);continue}if("?"!==e[s+1])break;if(s=readPI(e,++s),s.err)return s}else if("&"===e[s]){const t=validateAmpersand(e,s);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,s));s=t}else if(!0===o&&!isWhiteSpace(e[s]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,s));"<"===e[s]&&s--}}}var 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)};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 Ir=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=Ar.getAllMatches(e,Ir),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 Ar.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}var Tr={};const Sr={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}};Tr.buildOptions=function(e){return Object.assign({},Sr,e)},Tr.defaultOptions=Sr;var Cr=class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__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})}};const Nr=Rr;function readEntityExp(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let o="";for(;t<e.length&&e[t]!==n;t++)o+=e[t];return[r,o,t]}function isComment(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function isEntity(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function isElement(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function isAttlist(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function isNotation(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function validateEntityName(e){if(Nr.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}var Or=function readDocType$1(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&&isEntity(e,t))t+=7,[entityName,val,t]=readEntityExp(e,t+1),-1===val.indexOf("&")&&(r[validateEntityName(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(o&&isElement(e,t))t+=8;else if(o&&isAttlist(e,t))t+=8;else if(o&&isNotation(e,t))t+=9;else{if(!isComment)throw new Error("Invalid DOCTYPE");i=!0}n++,s=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}};const Pr=/^[-+]?0x[a-fA-F0-9]+$/,br=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const Ur={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};var Dr=function toNumber$1(e,t={}){if(t=Object.assign({},Ur,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if(t.hex&&Pr.test(r))return Number.parseInt(r,16);{const n=br.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.substr(0,e.length-1)),e;return e}(n[3]);const c=n[4]||n[6];if(!t.leadingZeros&&i.length>0&&o&&"."!==r[2])return e;if(!t.leadingZeros&&i.length>0&&!o&&"."!==r[1])return e;{const n=Number(r),u=""+n;return-1!==u.search(/[eE]/)||c?t.eNotation?n:e:-1!==r.indexOf(".")?"0"===u&&""===s||u===s||o&&u==="-"+s?n:e:i?s===u||o+s===u?n:e:r===u||r===o+u?n:e}}return e}};const Lr=Rr,Br=Cr,Mr=Or,vr=Dr;"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Lr.nameRegexp);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 Fr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=Lr.getAllMatches(e,Fr),n=r.length,o={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(r[e][1]);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 Br("!xml");let r=t,n="",o="";for(let i=0;i<e.length;i++){if("<"===e[i])if("/"===e[i+1]){const t=findClosingIndex(e,">",i,"Closing Tag is not closed.");let s=e.substring(i+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,o));const c=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);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="",i=t}else if("?"===e[i+1]){let t=readTagExp(e,i,!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 Br(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)}i=t.closeIndex+1}else if("!--"===e.substr(i+1,3)){const t=findClosingIndex(e,"--\x3e",i+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(i+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}i=t}else if("!D"===e.substr(i+1,2)){const t=Mr(e,i);this.docTypeEntities=t.entities,i=t.i}else if("!["===e.substr(i+1,2)){const t=findClosingIndex(e,"]]>",i,"CDATA is not closed.")-2,s=e.substring(i+9,t);if(n=this.saveTextToParentTag(n,r,o),this.options.cdataPropName)r.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let e=this.parseTextData(s,r.tagname,o,!0,!1,!0);null==e&&(e=""),r.add(this.options.textNodeName,e)}i=t+2}else{let s=readTagExp(e,i,this.options.removeNSPrefix),c=s.tagName,u=s.tagExp,l=s.attrExpPresent,p=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const d=r;if(d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==t.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)i=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))i=s.closeIndex;else{const r=this.readStopNodeData(e,c,p+1);if(!r)throw new Error(`Unexpected end of ${c}`);i=r.i,t=r.tagContent}const n=new Br(c);c!==u&&l&&(n[":@"]=this.buildAttributesMap(u,o,c)),t&&(t=this.parseTextData(t,c,o,!0,l,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,o)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new Br(c);c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new Br(c);this.tagsNodeStack.push(r),c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o),r=e}n="",i=p}}else n+=e[i]}return t.child};function addChild(e,t,r){const n=this.options.updateTag(t.tagname,r,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}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===Object.keys(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){const n="*."+r;for(const r in e){const o=e[r];if(n===o||t===o)return!0}return!1}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;if(-1!==c&&(u=i.substr(0,c).replace(/\s\s*$/,""),i=i.substr(c+1)),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}}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&&vr(e,r)}return Lr.isExist(e)?e:""}var xr=class OrderedObjParser{constructor(e){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:"₹"}},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}},wr={};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);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])}wr.prettify=function prettify$1(e,t){return compress(e,t)};const{buildOptions:kr}=Tr,Gr=xr,{prettify:Yr}=wr,Hr=mr;var $r=class XMLParser{constructor(e){this.externalEntities={},this.options=kr(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=Hr.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new Gr(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:Yr(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 '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}};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);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 e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){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 jr=function toXml(e,t){let r="";return t.format&&t.indentBy.length>0&&(r="\n"),arrToStr(e,t,"",r)},Vr={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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(e){this.options=Object.assign({},Vr,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(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){const n=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){return this.options.preserveOrder?jr(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){let r="",n="";for(let o in e)if(void 0===e[o]);else if(null===e[o])"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextValNode(e[o],o,"",t);else if("object"!=typeof e[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+e[o]);else if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;let i="";for(let s=0;s<r;s++){const r=e[o][s];void 0===r||(null===r?"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?i+=this.j2x(r,t+1).val:i+=this.processTextOrObjNode(r,o,t):i+=this.buildTextValNode(r,o,"",t))}this.options.oneListGroup&&(i=this.buildObjectNode(i,o,"",t)),n+=i}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[o][t[i]])}else n+=this.processTextOrObjNode(e[o],o,t);return{attrStr:r,val:n}},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&&-1===e.indexOf("<")?this.indentate(n)+"<"+t+r+i+">"+e+o:!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}},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};var Kr={XMLParser:$r,XMLValidator:mr,XMLBuilder:Builder};const Wr=ce("ebay:error"),qr=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){super(e,t,r),this.errorCode=n}}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 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 getEBayErrorFromResponse(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."}}(e.response?.data||t),n={...r,[qr]: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(Wr("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}=extractEBayError(e);if("domain"in r&&"ACCESS"===r.domain)throw new EBayAccessDenied(t,n,r,o);if("message"in r&&"invalid_grant"===r.message)throw new EBayInvalidGrant(t,n,r,o);if("message"in r&&"invalid_scope"===r.message)throw new EBayInvalidScope(t,n,r,o);if("message"in r&&"Invalid access token"===r.message)throw new EBayInvalidAccessToken(t,n,r,o);if(o===EBayNotFound.code)throw new EBayNotFound(t,n,r,o);throw new EBayApiError(t,n,r,o)},checkEBayTraditionalResponse=(e,t)=>{if(!("Errors"in t)&&!("errorMessage"in t))return;const{message:r,meta:n,description:o,errorCode:i}=extractEBayError(e,t);if(void 0===i)throw new EBayApiError(r,o,n,i);switch(i){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(r,o,n,i);case EBayIAFTokenInvalid.code:case 1.32:throw new EBayIAFTokenInvalid(r,o,n,i);case EBayTokenRequired.code:throw new EBayTokenRequired(r,o,n,i);case EBayAuthTokenIsHardExpired.code:throw new EBayAuthTokenIsHardExpired(r,o,n,i)}throw new EBayApiError(r,o,n,i)};var Xr=Object.freeze({__proto__:null,rawError:qr,EBayError:EBayError,EBayNoCallError:EBayNoCallError,ApiEnvError:ApiEnvError,EbayApiError:EbayApiError,EBayApiError:EBayApiError,EBayAccessDenied:EBayAccessDenied,EBayInvalidGrant:EBayInvalidGrant,EBayNotFound:EBayNotFound,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayAuthTokenIsHardExpired:EBayAuthTokenIsHardExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayTokenRequired:EBayTokenRequired,EBayInvalidScope:EBayInvalidScope,extractEBayError:extractEBayError,handleEBayError:handleEBayError,checkEBayTraditionalResponse:checkEBayTraditionalResponse});const Jr=ce("ebay:xml:request"),zr={attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseNodeValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,isArray:(e,t)=>/Array$/.test(t.slice(0,-e.length-1))},Qr={raw:!1,parseOptions:zr,useIaf:!0,sign:!1,headers:{},returnResponse:!1},Zr={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EBayNoCallError;this.callName=e,this.fields=t||{},this.config={...Qr,...r},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getParseOptions(){return{...zr,...this.config.parseOptions}}getHeaders(){return{...Zr,...this.config.headers}}toJSON(e){const t=this.getParseOptions();return Jr("parseOption",t),new Kr.XMLParser(t).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+XMLRequest.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);Jr("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||{}}};Jr("config",n);const o=await this.req.post(this.config.endpoint,t,n);if(Jr("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(Jr("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayTraditionalResponse(e.response,t[this.callName+"Response"])}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}XMLRequest.j2x=new Kr.XMLBuilder({attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,cdataTagName:"__cdata",cdataPositionChar:"\\c",format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"});const en=ce("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 en("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 en("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return en("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 tn=ce("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 tn("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 tn("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){tn("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return tn("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw tn("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 tn("User Access Token",r),r}catch(e){throw tn("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 tn("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;tn("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw tn("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return tn("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 rn="-----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(rn)||(t=rn+"\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 nn={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},on={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(on).filter((e=>void 0!==this.config[e])).reduce(((e,t)=>(e[on[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={...nn,...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 sn=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}})}};sn.id="Feed";let an=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})}};an.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){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r}})}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";let cn=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}})}};cn.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 Account 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`)}}Account.id="Account";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:{...hr}})}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)}}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`)}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`)}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:hr})}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 un,ln;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"}(un||(un={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(ln||(ln={}));var pn,dn=ln;!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"}(pn||(pn={}));var En,fn=pn;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(En||(En={}));var gn,_n=En;!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"}(gn||(gn={}));var hn,mn=gn;!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"}(hn||(hn={}));var Rn,An,yn,In,Tn,Sn,Cn,Nn,On,Pn,bn,Un,Dn,Ln,Bn,Mn,vn,Fn,xn,wn,kn,Gn,Yn,Hn,$n,jn,Vn,Kn,Wn,qn,Xn,Jn,zn,Qn,Zn,eo,to,ro,no,oo,io,so,ao,co,uo,lo=hn;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...Qr,...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:lo,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:mn,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:fn,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:dn},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>fr.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:_n,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)}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(sn),marketing:this.createRestfulApi(an),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)}}createDeveloperApi(){return{analytics:this.createRestfulApi(cn),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(Account),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"}(Rn||(Rn={})),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"}(An||(An={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(yn||(yn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(In||(In={})),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"}(Tn||(Tn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(Sn||(Sn={})),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"}(Cn||(Cn={})),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"}(Nn||(Nn={})),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"}(On||(On={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(Pn||(Pn={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(bn||(bn={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(Un||(Un={})),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"}(Dn||(Dn={})),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"}(Ln||(Ln={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(Bn||(Bn={})),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"}(Mn||(Mn={})),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"}(Fn||(Fn={})),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"}(xn||(xn={})),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"}(wn||(wn={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(kn||(kn={})),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"}(Gn||(Gn={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(Yn||(Yn={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(Hn||(Hn={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}($n||($n={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}(jn||(jn={})),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"}(Vn||(Vn={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(Kn||(Kn={})),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"}(Wn||(Wn={})),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"}(Xn||(Xn={})),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"}(Jn||(Jn={})),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"}(zn||(zn={})),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"}(Qn||(Qn={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(Zn||(Zn={})),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"}(eo||(eo={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(to||(to={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(ro||(ro={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(no||(no={})),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"}(oo||(oo={})),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"}(io||(io={})),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"}(so||(so={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(ao||(ao={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(co||(co={})),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"}(uo||(uo={}));var po=Object.freeze({__proto__:null,get SiteId(){return Rn},get MarketplaceId(){return An},get UserRoleFilter(){return yn},get InquirySearchFieldGroup(){return In},get CaseStatusFilter(){return Tn},get CaseSearchFieldGroup(){return Sn},get InquiryStatusFilter(){return Cn},get ShippingCarrier(){return Nn},get ReturnReason(){return On},get RequestType(){return Pn},get ReturnType(){return bn},get GetReturnFieldGroupEnum(){return Un},get EscalateReason(){return Dn},get Decision(){return Ln},get CategoryType(){return Bn},get ReturnCountFilter(){return Mn},get ReturnState(){return vn},get FilePurpose(){return Fn},get RefundFeeType(){return xn},get ActivityOption(){return wn},get StoreType(){return kn},get TimeDurationUnit(){return Gn},get ShippingOptionType(){return Yn},get ShippingCostType(){return Hn},get PaymentsProgramType(){return $n},get PaymentsProgramStatus(){return jn},get PaymentMethodType(){return Vn},get RecipientAccountReferenceType(){return Kn},get CountryCode(){return Wn},get CurrencyCode(){return qn},get Locale(){return Xn},get ContentLanguage(){return Xn},get Condition(){return Jn},get LocaleEnum(){return zn},get Marketplace(){return Qn},get FormatType(){return Zn},get Metric(){return eo},get RefundMethod(){return to},get ReturnMethod(){return ro},get ReturnShippingCostPayer(){return no},get RegionType(){return oo},get ReasonForRefund(){return io},get CancelReason(){return so},get LengthUnitOfMeasure(){return ao},get WeightUnitOfMeasure(){return co},get PackageType(){return uo}}),Eo=Object.freeze({__proto__:null});const fo={sandbox:!1,autoRefreshToken:!0,siteId:Rn.EBAY_US,marketplaceId:An.EBAY_US,acceptLanguage:Xn.en_US,contentLanguage:Xn.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):Rn.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in An?An[process.env.EBAY_MARKETPLACE_ID]:An.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX,signature:t},e)}constructor(e,t){super({...fo,...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=Rn,eBayApi.MarketplaceId=An,eBayApi.ContentLanguage=Xn,eBayApi.Locale=Xn;export{Xn as ContentLanguage,Xn as Locale,An as MarketplaceId,Rn as SiteId,eBayApi as default,eBayApi,po as enums,Xr as errors,Eo as types};
|