-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
9 lines (9 loc) · 56.4 KB
/
index.js
1
2
3
4
5
6
7
8
9
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["pintra-fx"]=e():t["pintra-fx"]=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=17)}([function(t,e,r){"use strict";var n=r(7);const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),t=>{const e=o.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const u=t=>(t=t.toLowerCase(),e=>s(e)===t),c=t=>e=>typeof e===t,{isArray:f}=Array,l=c("undefined");const h=u("ArrayBuffer");const p=c("string"),d=c("function"),g=c("number"),y=t=>null!==t&&"object"==typeof t,m=t=>{if("object"!==s(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},w=u("Date"),b=u("File"),E=u("Blob"),v=u("FileList"),A=u("URLSearchParams");function O(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),f(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let s;for(n=0;n<i;n++)s=o[n],e.call(null,t[s],s,t)}}const R=(T="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>T&&t instanceof T);var T;const S=u("HTMLFormElement"),_=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),P=u("RegExp"),x=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};O(r,(r,o)=>{!1!==e(r,o,t)&&(n[o]=r)}),Object.defineProperties(t,n)};e.a={isArray:f,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!l(t)&&null!==t.constructor&&!l(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>t&&("function"==typeof FormData&&t instanceof FormData||"[object FormData]"===o.call(t)||d(t.toString)&&"[object FormData]"===t.toString()),isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:p,isNumber:g,isBoolean:t=>!0===t||!1===t,isObject:y,isPlainObject:m,isUndefined:l,isDate:w,isFile:b,isBlob:E,isRegExp:P,isFunction:d,isStream:t=>y(t)&&d(t.pipe),isURLSearchParams:A,isTypedArray:R,isFileList:v,forEach:O,merge:function t(){const e={},r=(r,n)=>{m(e[n])&&m(r)?e[n]=t(e[n],r):m(r)?e[n]=t({},r):f(r)?e[n]=r.slice():e[n]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&O(arguments[t],r);return e},extend:(t,e,r,{allOwnKeys:o}={})=>(O(e,(e,o)=>{r&&d(e)?t[o]=Object(n.a)(e,r):t[o]=e},{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,s,a;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)a=o[s],n&&!n(a,t,e)||u[a]||(e[a]=t[a],u[a]=!0);t=!1!==r&&i(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:u,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(f(t))return t;let e=t.length;if(!g(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:S,hasOwnProperty:_,hasOwnProp:_,reduceDescriptors:x,freezeMethods:t=>{x(t,(e,r)=>{const n=t[r];d(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return f(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e)}},function(t,e,r){"use strict";var n=r(0);function o(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}n.a.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const i=o.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{s[t]={value:t}}),Object.defineProperties(o,s),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=(t,e,r,s,a,u)=>{const c=Object.create(i);return n.a.toFlatObject(t,c,(function(t){return t!==Error.prototype}),t=>"isAxiosError"!==t),o.call(c,t.message,e,r,s,a),c.cause=t,c.name=t.name,u&&Object.assign(c,u),c},e.a=o},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(9),o="undefined"!=typeof URLSearchParams?URLSearchParams:n.a,i=FormData;const s=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})();var a={isBrowser:!0,classes:{URLSearchParams:o,FormData:i,Blob:Blob},isStandardBrowserEnv:s,protocols:["http","https","file","blob","url","data"]}},function(t,e,r){"use strict";var n=r(0);const o=n.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const i=Symbol("internals"),s=Symbol("defaults");function a(t){return t&&String(t).trim().toLowerCase()}function u(t){return!1===t||null==t?t:String(t)}function c(t,e,r,o){return n.a.isFunction(o)?o.call(this,e,r):n.a.isString(e)?n.a.isString(o)?-1!==e.indexOf(o):n.a.isRegExp(o)?o.test(e):void 0:void 0}function f(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,o=r.length;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}function l(t,e){t&&this.set(t),this[s]=e||null}Object.assign(l.prototype,{set:function(t,e,r){const o=this;function i(t,e,r){const i=a(e);if(!i)throw new Error("header name must be a non-empty string");const s=f(o,i);(!s||!0===r||!1!==o[s]&&!1!==r)&&(t=n.a.isArray(t)?t.map(u):u(t),o[s||e]=t)}return n.a.isPlainObject(t)?n.a.forEach(t,(t,r)=>{i(t,r,e)}):i(e,t,r),this},get:function(t,e){if(!(t=a(t)))return;const r=f(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(n.a.isFunction(e))return e.call(this,t,r);if(n.a.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}},has:function(t,e){if(t=a(t)){const r=f(this,t);return!(!r||e&&!c(0,this[r],r,e))}return!1},delete:function(t,e){const r=this;let o=!1;function i(t){if(t=a(t)){const n=f(r,t);!n||e&&!c(0,r[n],n,e)||(delete r[n],o=!0)}}return n.a.isArray(t)?t.forEach(i):i(t),o},clear:function(){return Object.keys(this).forEach(this.delete.bind(this))},normalize:function(t){const e=this,r={};return n.a.forEach(this,(n,o)=>{const i=f(r,o);if(i)return e[i]=u(n),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}(o):String(o).trim();s!==o&&delete e[o],e[s]=u(n),r[s]=!0}),this},toJSON:function(){const t=Object.create(null);return n.a.forEach(Object.assign({},this[s]||null,this),(e,r)=>{null!=e&&!1!==e&&(t[r]=n.a.isArray(e)?e.join(", "):e)}),t}}),Object.assign(l,{from:function(t){return n.a.isString(t)?new this((t=>{const e={};let r,n,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&o[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t)):t instanceof this?t:new this(t)},accessor:function(t){const e=(this[i]=this[i]={accessors:{}}).accessors,r=this.prototype;function o(t){const o=a(t);e[o]||(!function(t,e){const r=n.a.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})})}(r,t),e[o]=!0)}return n.a.isArray(t)?t.forEach(o):o(t),this}}),l.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),n.a.freezeMethods(l.prototype),n.a.freezeMethods(l);e.a=l},function(t,e,r){"use strict";(function(t){var n=r(0),o=r(1),i=r(14);function s(t){return n.a.isPlainObject(t)||n.a.isArray(t)}function a(t){return n.a.endsWith(t,"[]")?t.slice(0,-2):t}function u(t,e,r){return t?t.concat(e).map((function(t,e){return t=a(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const c=n.a.toFlatObject(n.a,{},null,(function(t){return/^is[A-Z]/.test(t)}));e.a=function(e,r,f){if(!n.a.isObject(e))throw new TypeError("target must be an object");r=r||new(i.a||FormData);const l=(f=n.a.toFlatObject(f,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!n.a.isUndefined(e[t])}))).metaTokens,h=f.visitor||w,p=f.dots,d=f.indexes,g=(f.Blob||"undefined"!=typeof Blob&&Blob)&&((y=r)&&n.a.isFunction(y.append)&&"FormData"===y[Symbol.toStringTag]&&y[Symbol.iterator]);var y;if(!n.a.isFunction(h))throw new TypeError("visitor must be a function");function m(e){if(null===e)return"";if(n.a.isDate(e))return e.toISOString();if(!g&&n.a.isBlob(e))throw new o.a("Blob is not supported. Use a Buffer instead.");return n.a.isArrayBuffer(e)||n.a.isTypedArray(e)?g&&"function"==typeof Blob?new Blob([e]):t.from(e):e}function w(t,e,o){let i=t;if(t&&!o&&"object"==typeof t)if(n.a.endsWith(e,"{}"))e=l?e:e.slice(0,-2),t=JSON.stringify(t);else if(n.a.isArray(t)&&function(t){return n.a.isArray(t)&&!t.some(s)}(t)||n.a.isFileList(t)||n.a.endsWith(e,"[]")&&(i=n.a.toArray(t)))return e=a(e),i.forEach((function(t,o){!n.a.isUndefined(t)&&r.append(!0===d?u([e],o,p):null===d?e:e+"[]",m(t))})),!1;return!!s(t)||(r.append(u(o,e,p),m(t)),!1)}const b=[],E=Object.assign(c,{defaultVisitor:w,convertValue:m,isVisitable:s});if(!n.a.isObject(e))throw new TypeError("data must be an object");return function t(e,o){if(!n.a.isUndefined(e)){if(-1!==b.indexOf(e))throw Error("Circular reference detected in "+o.join("."));b.push(e),n.a.forEach(e,(function(e,i){!0===(!n.a.isUndefined(e)&&h.call(r,e,n.a.isString(i)?i.trim():i,o,E))&&t(e,o?o.concat(i):[i])})),b.pop()}}(e),r}}).call(this,r(18).Buffer)},function(t,e,r){"use strict";var n=r(1);function o(t,e,r){n.a.call(this,null==t?"canceled":t,n.a.ERR_CANCELED,e,r),this.name="CanceledError"}r(0).a.inherits(o,n.a,{__CANCEL__:!0}),e.a=o},function(t,e,r){"use strict";(function(t){var n=r(0),o=r(1),i=r(10),s=r(4),a=r(16),u=r(2),c=r(11),f=r(13);const l={"Content-Type":"application/x-www-form-urlencoded"};const h={transitional:i.a,adapter:function(){let e;return"undefined"!=typeof XMLHttpRequest?e=f.a.getAdapter("xhr"):void 0!==t&&"process"===n.a.kindOf(t)&&(e=f.a.getAdapter("http")),e}(),transformRequest:[function(t,e){const r=e.getContentType()||"",o=r.indexOf("application/json")>-1,i=n.a.isObject(t);i&&n.a.isHTMLForm(t)&&(t=new FormData(t));if(n.a.isFormData(t))return o&&o?JSON.stringify(Object(c.a)(t)):t;if(n.a.isArrayBuffer(t)||n.a.isBuffer(t)||n.a.isStream(t)||n.a.isFile(t)||n.a.isBlob(t))return t;if(n.a.isArrayBufferView(t))return t.buffer;if(n.a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Object(a.a)(t,this.formSerializer).toString();if((u=n.a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Object(s.a)(u?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||o?(e.setContentType("application/json",!1),function(t,e,r){if(n.a.isString(t))try{return(e||JSON.parse)(t),n.a.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||h.transitional,r=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&n.a.isString(t)&&(r&&!this.responseType||i)){const r=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw o.a.from(t,o.a.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:u.a.classes.FormData,Blob:u.a.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.a.forEach(["delete","get","head"],(function(t){h.headers[t]={}})),n.a.forEach(["post","put","patch"],(function(t){h.headers[t]=n.a.merge(l)})),e.a=h}).call(this,r(23))},function(t,e,r){"use strict";function n(t,e){return function(){return t.apply(e,arguments)}}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(0),o=r(9);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function s(t,e,r){if(!e)return t;const s=t.indexOf("#");-1!==s&&(t=t.slice(0,s));const a=r&&r.encode||i,u=n.a.isURLSearchParams(e)?e.toString():new o.a(e,r).toString(a);return u&&(t+=(-1===t.indexOf("?")?"?":"&")+u),t}},function(t,e,r){"use strict";var n=r(4);function o(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function i(t,e){this._pairs=[],t&&Object(n.a)(t,this,e)}const s=i.prototype;s.append=function(t,e){this._pairs.push([t,e])},s.toString=function(t){const e=t?function(e){return t.call(this,e,o)}:o;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")},e.a=i},function(t,e,r){"use strict";e.a={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},function(t,e,r){"use strict";var n=r(0);e.a=function(t){function e(t,r,o,i){let s=t[i++];const a=Number.isFinite(+s),u=i>=t.length;if(s=!s&&n.a.isArray(o)?o.length:s,u)return n.a.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a;o[s]&&n.a.isObject(o[s])||(o[s]=[]);return e(t,r,o[s],i)&&n.a.isArray(o[s])&&(o[s]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}(o[s])),!a}if(n.a.isFormData(t)&&n.a.isFunction(t.entries)){const r={};return n.a.forEachEntry(t,(t,o)=>{e(function(t){return n.a.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}(t),o,r,0)}),r}return null}},function(t,e,r){"use strict";function n(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n=r(0),o=r(1);var i=r(2),s=i.a.isStandardBrowserEnv?{write:function(t,e,r,o,i,s){const a=[];a.push(t+"="+encodeURIComponent(e)),n.a.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.a.isString(o)&&a.push("path="+o),n.a.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},a=r(8),u=r(12),c=i.a.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function o(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=o(window.location.href),function(t){const e=n.a.isString(t)?o(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0},f=r(10),l=r(5);var h=r(3);var p=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),c=n[s];o||(o=u),r[i]=a,n[i]=u;let f=s,l=0;for(;f!==i;)l+=r[f++],f%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-o<e)return;const h=c&&u-c;return h?Math.round(1e3*l/h):void 0}};function d(t,e){let r=0;const n=p(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-r,u=n(a);r=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0};c[e?"download":"upload"]=!0,t(c)}}function g(t){return new Promise((function(e,r){let p=t.data;const g=h.a.from(t.headers).normalize(),y=t.responseType;let m;function w(){t.cancelToken&&t.cancelToken.unsubscribe(m),t.signal&&t.signal.removeEventListener("abort",m)}n.a.isFormData(p)&&i.a.isStandardBrowserEnv&&g.setContentType(!1);let b=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";g.set("Authorization","Basic "+btoa(e+":"+r))}const E=Object(u.a)(t.baseURL,t.url);function v(){if(!b)return;const n=h.a.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new o.a("Request failed with status code "+r.status,[o.a.ERR_BAD_REQUEST,o.a.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),w()}),(function(t){r(t),w()}),{data:y&&"text"!==y&&"json"!==y?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:n,config:t,request:b}),b=null}if(b.open(t.method.toUpperCase(),Object(a.a)(E,t.params,t.paramsSerializer),!0),b.timeout=t.timeout,"onloadend"in b?b.onloadend=v:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(v)},b.onabort=function(){b&&(r(new o.a("Request aborted",o.a.ECONNABORTED,t,b)),b=null)},b.onerror=function(){r(new o.a("Network Error",o.a.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||f.a;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new o.a(e,n.clarifyTimeoutError?o.a.ETIMEDOUT:o.a.ECONNABORTED,t,b)),b=null},i.a.isStandardBrowserEnv){const e=(t.withCredentials||c(E))&&t.xsrfCookieName&&s.read(t.xsrfCookieName);e&&g.set(t.xsrfHeaderName,e)}void 0===p&&g.setContentType(null),"setRequestHeader"in b&&n.a.forEach(g.toJSON(),(function(t,e){b.setRequestHeader(e,t)})),n.a.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),y&&"json"!==y&&(b.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&b.addEventListener("progress",d(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",d(t.onUploadProgress)),(t.cancelToken||t.signal)&&(m=e=>{b&&(r(!e||e.type?new l.a(null,t,b):e),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(m),t.signal&&(t.signal.aborted?m():t.signal.addEventListener("abort",m)));const A=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(E);A&&-1===i.a.protocols.indexOf(A)?r(new o.a("Unsupported protocol "+A+":",o.a.ERR_BAD_REQUEST,t)):b.send(p||null)}))}const y={http:g,xhr:g};e.a={getAdapter:t=>{if(n.a.isString(t)){const e=y[t];if(!t)throw Error(n.a.hasOwnProp(t)?`Adapter '${t}' is not available in the build`:`Can not resolve adapter '${t}'`);return e}if(!n.a.isFunction(t))throw new TypeError("adapter is not a function");return t},adapters:y}},function(t,e,r){"use strict";var n=r(15),o=r.n(n);e.a=o.a},function(t,e){t.exports="object"==typeof self?self.FormData:window.FormData},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(0),o=r(4),i=r(2);function s(t,e){return Object(o.a)(t,new i.a.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,o){return i.a.isNode&&n.a.isBuffer(t)?(this.append(e,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}},function(t,e,r){t.exports=r(24)},function(t,e,r){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var n=r(20),o=r(21),i=r(22);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),o=(t=a(t,n)).write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):h(t,e);if("Buffer"===e.type&&i(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|p(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return M(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return _(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){var i,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var f=-1;for(i=r;i<a;i++)if(c(t,i)===c(e,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===u)return f*s}else-1!==f&&(i-=i-f),f=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var l=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){l=!1;break}if(l)return i}return-1}function b(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function E(t,e,r,n){return z(M(e,t.length-r),t,r,n)}function v(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return v(t,e,r,n)}function O(t,e,r,n){return z(Y(e),t,r,n)}function R(t,e,r,n){return z(function(t,e){for(var r,n,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,a,u,c=t[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(f=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):g.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),c=this.slice(n,o),f=t.slice(e,r),l=0;l<a;++l)if(c[l]!==f[l]){i=c[l],s=f[l];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return A(this,t,e,r);case"base64":return O(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function P(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function x(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=F(t[i]);return o}function B(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function j(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function C(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function k(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,i){return i||k(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,i){return i||k(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var o=e-t;r=new u(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||j(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||j(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||j(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||j(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||j(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||j(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||j(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||U(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||U(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):C(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):C(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);U(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<r&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);U(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):C(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):C(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var s=u.isBuffer(t)?t:M(new u(t,n).toString()),a=s.length;for(i=0;i<r-e;++i)this[i+e]=s[i%a]}return this};var I=/[^+\/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function M(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Y(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,r(19))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=c(t),s=n[0],a=n[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),f=0,l=a>0?s-4:s;for(r=0;r<l;r+=4)e=o[t.charCodeAt(r)]<<18|o[t.charCodeAt(r+1)]<<12|o[t.charCodeAt(r+2)]<<6|o[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===a&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===a&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=0,a=r-o;s<a;s+=16383)i.push(f(t,s,s+16383>a?a:s+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],o[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var o,i,s=[],a=e;a<r;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?o-1:0,h=r?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=a;f>0;i=256*i+t[e+l],l+=h,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=c}return(p?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,u,c=8*i-o-1,f=(1<<c)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*u-1)*Math.pow(2,o),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=a(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||f||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";r.r(e),r.d(e,"TokenCache",(function(){return C})),r.d(e,"TokenRequest",(function(){return k})),r.d(e,"TokenRequestV2",(function(){return L})),r.d(e,"TokenRequestError",(function(){return N})),r.d(e,"AppLauncher",(function(){return D}));var n=r(0),o=r(7),i=r(8);var s=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){n.a.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},a=r(6),u=r(3);function c(t,e){const r=this||a.a,o=e||r,i=u.a.from(o.headers);let s=o.data;return n.a.forEach(t,(function(t){s=t.call(r,s,i.normalize(),e?e.status:void 0)})),i.normalize(),s}function f(t){return!(!t||!t.__CANCEL__)}var l=r(5);function h(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new l.a}function p(t){h(t),t.headers=u.a.from(t.headers),t.data=c.call(t,t.transformRequest);return(t.adapter||a.a.adapter)(t).then((function(e){return h(t),e.data=c.call(t,t.transformResponse,e),e.headers=u.a.from(e.headers),e}),(function(e){return f(e)||(h(t),e&&e.response&&(e.response.data=c.call(t,t.transformResponse,e.response),e.response.headers=u.a.from(e.response.headers))),Promise.reject(e)}))}function d(t,e){e=e||{};const r={};function o(t,e){return n.a.isPlainObject(t)&&n.a.isPlainObject(e)?n.a.merge(t,e):n.a.isPlainObject(e)?n.a.merge({},e):n.a.isArray(e)?e.slice():e}function i(r){return n.a.isUndefined(e[r])?n.a.isUndefined(t[r])?void 0:o(void 0,t[r]):o(t[r],e[r])}function s(t){if(!n.a.isUndefined(e[t]))return o(void 0,e[t])}function a(r){return n.a.isUndefined(e[r])?n.a.isUndefined(t[r])?void 0:o(void 0,t[r]):o(void 0,e[r])}function u(r){return r in e?o(t[r],e[r]):r in t?o(void 0,t[r]):void 0}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return n.a.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){const e=c[t]||i,o=e(t);n.a.isUndefined(o)&&e!==u||(r[t]=o)})),r}var g=r(12);var y=r(1);const m={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{m[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const w={};m.transitional=function(t,e,r){function n(t,e){return"[Axios v1.1.2] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new y.a(n(o," has been removed"+(e?" in "+e:"")),y.a.ERR_DEPRECATED);return e&&!w[o]&&(w[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};var b={assertOptions:function(t,e,r){if("object"!=typeof t)throw new y.a("options must be an object",y.a.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],s=e[i];if(s){const e=t[i],r=void 0===e||s(e,i,t);if(!0!==r)throw new y.a("option "+i+" must be "+r,y.a.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new y.a("Unknown option "+i,y.a.ERR_BAD_OPTION)}},validators:m};const E=b.validators;class v{constructor(t){this.defaults=t,this.interceptors={request:new s,response:new s}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{};const r=(e=d(this.defaults,e)).transitional;void 0!==r&&b.assertOptions(r,{silentJSONParsing:E.transitional(E.boolean),forcedJSONParsing:E.transitional(E.boolean),clarifyTimeoutError:E.transitional(E.boolean)},!1),e.method=(e.method||this.defaults.method||"get").toLowerCase();const o=e.headers&&n.a.merge(e.headers.common,e.headers[e.method]);o&&n.a.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),e.headers=new u.a(e.headers,o);const i=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,i.unshift(t.fulfilled,t.rejected))}));const a=[];let c;this.interceptors.response.forEach((function(t){a.push(t.fulfilled,t.rejected)}));let f,l=0;if(!s){const t=[p.bind(this),void 0];for(t.unshift.apply(t,i),t.push.apply(t,a),f=t.length,c=Promise.resolve(e);l<f;)c=c.then(t[l++],t[l++]);return c}f=i.length;let h=e;for(l=0;l<f;){const t=i[l++],e=i[l++];try{h=t(h)}catch(t){e.call(this,t);break}}try{c=p.call(this,h)}catch(t){return Promise.reject(t)}for(l=0,f=a.length;l<f;)c=c.then(a[l++],a[l++]);return c}getUri(t){t=d(this.defaults,t);const e=Object(g.a)(t.baseURL,t.url);return Object(i.a)(e,t.params,t.paramsSerializer)}}n.a.forEach(["delete","get","head","options"],(function(t){v.prototype[t]=function(e,r){return this.request(d(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.a.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(d(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}v.prototype[t]=e(),v.prototype[t+"Form"]=e(!0)}));var A=v,O=r(11);class R{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then(t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null}),this.promise.then=t=>{let e;const n=new Promise(t=>{r.subscribe(t),e=t}).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new l.a(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new R((function(e){t=e})),cancel:t}}}var T=R,S=r(4);const _=function t(e){const r=new A(e),i=Object(o.a)(A.prototype.request,r);return n.a.extend(i,A.prototype,r,{allOwnKeys:!0}),n.a.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return t(d(e,r))},i}(a.a);_.Axios=A,_.CanceledError=l.a,_.CancelToken=T,_.isCancel=f,_.VERSION="1.1.2",_.toFormData=S.a,_.AxiosError=y.a,_.Cancel=_.CanceledError,_.all=function(t){return Promise.all(t)},_.spread=function(t){return function(e){return t.apply(null,e)}},_.isAxiosError=function(t){return n.a.isObject(t)&&!0===t.isAxiosError},_.formToJSON=t=>Object(O.a)(n.a.isHTMLForm(t)?new FormData(t):t);var P,x=_,B=(P=function(t,e){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),j=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{u(n.next(t))}catch(t){i(t)}}function a(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))},U=function(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},C=function(){function t(){var e=localStorage.getItem("pintraTokenCache");e&&(t.tokens=JSON.parse(e))}return t.clearTokenCache=function(){localStorage.removeItem("pintraTokenCache"),t.tokens=[]},t.getToken=function(e,r){return j(this,void 0,void 0,(function(){var n,o,i,s,a,u,c,f,l,h,p;return U(this,(function(d){switch(d.label){case 0:for(null==t.instance&&(t.instance=new t),n=0,o=t.tokens;n<o.length;n++)if((f=o[n]).name==e.name&&f.expires>Date.now())return console.info("INFO: Getting cached token"),[2,f];(i=new FormData).append("action","get_tokencache"),i.append("resource",e.resource),i.append("nonce",r.nonce),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,x.post(r.wpAjaxAdminUrl,i)];case 2:return s=d.sent(),[3,4];case 3:return a=d.sent(),(u=new N(a.message)).data={status:"NOK",error_codes:"-1",message:a.message,result:null},[2,u];case 4:if(console.info(s),200==s.status){if("OK"==s.data.status){for(c=JSON.parse(s.data.result),f={name:e.name,expires:1e3*parseInt(c.expiry),bearer:c.accessToken},l=t.tokens.length-1;l>=0;l--)t.tokens[l].name==e.name&&t.tokens.splice(l,1);return t.tokens.push(f),localStorage.setItem("pintraTokenCache",JSON.stringify(t.tokens)),[2,f]}return(h=new N(s.data.message)).data=s.data,[2,h]}return(p=new N("Response status: "+s.status)).data={status:"NOK",error_codes:"-1",message:"Unknown error occurred",result:null},[2,p]}}))}))},t.getTokenV2=function(e,r){return j(this,void 0,void 0,(function(){var n,o,i,s,a,u,c,f,l,h,p;return U(this,(function(d){switch(d.label){case 0:for(null==t.instance&&(t.instance=new t),n=0,o=t.tokens;n<o.length;n++)if((f=o[n]).name==e.name&&f.expires>Date.now())return console.info("INFO: Getting cached token"),[2,f];(i=new FormData).append("action","get_tokencache"),i.append("scope",e.scope),i.append("nonce",r.nonce),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,x.post(r.wpAjaxAdminUrl,i)];case 2:return s=d.sent(),[3,4];case 3:return a=d.sent(),(u=new N(a.message)).data={status:"NOK",error_codes:"-1",message:a.message,result:null},[2,u];case 4:if(console.info(s),200==s.status){if("OK"==s.data.status){for(c=JSON.parse(s.data.result),f={name:e.name,expires:1e3*parseInt(c.expiry),bearer:c.accessToken},l=t.tokens.length-1;l>=0;l--)t.tokens[l].name==e.name&&t.tokens.splice(l,1);return t.tokens.push(f),localStorage.setItem("pintraTokenCache",JSON.stringify(t.tokens)),[2,f]}return(h=new N(s.data.message)).data=s.data,[2,h]}return(p=new N("Response status: "+s.status)).data={status:"NOK",error_codes:"-1",message:"Unknown error occurred",result:null},[2,p]}}))}))},t.tokens=[],t.instance=null,t}(),N=function(t){function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return B(e,t),e}(Error),k=function(){function t(t,e){this.name=t,this.resource=e}return t.prototype.toString=function(){return this.name+","+this.resource},t}(),L=function(){function t(t,e){this.name=t,this.scope=e}return t.prototype.toString=function(){return this.name+","+this.scope},t}(),D=function(){function t(){}return t.getReactDomConfig=function(){for(var t=document.getElementsByTagName("script"),e=null,r=t.length-1;r>=0;r--)if(t[r].hasAttribute("data-wpajaxadminurl")){e=t[r];break}if(e){var n=e.getAttribute("src"),o="";n&&(o="".concat(n.substr(0,n.lastIndexOf("/")+1)));var i=document.createElement("div"),s=Math.random().toString(36).replace(/[^a-z]+/g,"").slice(0,5);return i.setAttribute("id",s),i.classList.add("wpo365-app-root"),e.parentNode.appendChild(i),{rootId:s,env:{nonce:e.getAttribute("data-nonce"),wpAjaxAdminUrl:e.getAttribute("data-wpajaxadminurl"),scriptContextUrl:o,props:e.getAttribute("data-props")?JSON.parse(e.getAttribute("data-props")):{}}}}console.error("[AppLauncher::getReactDomConfig] -> Could not initialize current script")},t}()}])}));
//# sourceMappingURL=index.js.map