UNPKG

typesense

Version:
2 lines 136 kB
/*! For license information please see typesense.min.js.LICENSE.txt */ var Typesense;(()=>{var e={65(e,t,n){var r,i;!function(){"use strict";r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},o=null;function a(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var n=this.getLevel(),i=0;i<r.length;i++){var o=r[i];this[o]=i<n?e:this.methodFactory(o,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(u.call(this),this[e].apply(this,arguments))}}function l(r,i,o){return function(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?s:void 0!==console[r]?a(console,r):void 0!==console.log?a(console,"log"):e)}(r)||c.apply(this,arguments)}function p(e,n){var a,s,c,p=this,h="loglevel";function f(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(h),i=n.indexOf(r+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(e){}return void 0===p.levels[e]&&(e=void 0),e}}function d(e){var t=e;if("string"==typeof t&&void 0!==p.levels[t.toUpperCase()]&&(t=p.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=p.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),p.name=e,p.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},p.methodFactory=n||l,p.getLevel=function(){return null!=c?c:null!=s?s:a},p.setLevel=function(e,n){return c=d(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+n+";"}catch(e){}}}(c),u.call(p)},p.setDefaultLevel=function(e){s=d(e),f()||p.setLevel(e,!1)},p.resetLevel=function(){c=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),u.call(p)},p.enableAll=function(e){p.setLevel(p.levels.TRACE,e)},p.disableAll=function(e){p.setLevel(p.levels.SILENT,e)},p.rebuild=function(){if(o!==p&&(a=d(o.getLevel())),u.call(p),o===p)for(var e in i)i[e].rebuild()},a=d(o?o.getLevel():"WARN");var v=f();null!=v&&(c=d(v)),u.call(p)}(o=new p).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new p(e,o.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=h),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=r.call(t,n,t,e))||(e.exports=i)}()},612(){},939(){},82(){},172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},993(e,t,n){var r=n(546);function i(){var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function u(e,i,o,a){var s=i&&i.prototype instanceof l?i:l,u=Object.create(s.prototype);return r(u,"_invoke",function(e,r,i){var o,a,s,u=0,l=i||[],p=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,c}};function f(e,r){for(a=e,s=r,n=0;!p&&u&&!i&&n<l.length;n++){var i,o=l[n],f=h.p,d=o[2];e>3?(i=d===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=e<2&&f<o[1])?(a=0,h.v=r,h.n=o[1]):f<d&&(i=e<3||o[0]>r||r>d)&&(o[4]=e,o[5]=r,h.n=d,a=0))}if(i||e>1)return c;throw p=!0,r}return function(i,l,d){if(u>1)throw TypeError("Generator is already running");for(p&&1===l&&f(l,d),a=l,s=d;(n=a<2?t:s)||!p;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(u=2,o){if(a||(i="next"),n=o[i]){if(!(n=n.call(o,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=o.return)&&n.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((n=(p=h.n<0)?s:e.call(r,h))!==c)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:n,done:p}}}(e,o,a),!0),u}var c={};function l(){}function p(){}function h(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),d=h.prototype=l.prototype=Object.create(f);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,r(e,s,"GeneratorFunction")),e.prototype=Object.create(d),e}return p.prototype=h,r(d,"constructor",h),r(h,"constructor",p),p.displayName="GeneratorFunction",r(h,s,"GeneratorFunction"),r(d),r(d,s,"Generator"),r(d,a,function(){return this}),r(d,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:u,m:v}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},869(e,t,n){var r=n(887);e.exports=function(e,t,n,i,o){var a=r(e,t,n,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,n){var r=n(993),i=n(791);e.exports=function(e,t,n,o,a){return new i(r().w(e,t,n,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},791(e,t,n){var r=n(172),i=n(546);e.exports=function e(t,n){function o(e,i,a,s){try{var u=t[e](i),c=u.value;return c instanceof r?n.resolve(c.v).then(function(e){o("next",e,a,s)},function(e){o("throw",e,a,s)}):n.resolve(c).then(function(e){u.value=e,a(u)},function(e){return o("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,r){function i(){return new n(function(t,n){o(e,r,t,n)})}return a=a?a.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},546(e){function t(n,r,i,o){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,i){function o(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},633(e,t,n){var r=n(172),i=n(993),o=n(869),a=n(887),s=n(791),u=n(373),c=n(579);function l(){"use strict";var t=i(),n=t.m(l),p=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function d(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,f[e],t)},delegateYield:function(e,i,o){return t.resultName=i,n(r.d,c(e),o)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,i){return t.w(d(e),n,r,i&&i.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,i){return(h(t)?a:o)(d(e),t,n,r,i)},keys:u,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},579(e,t,n){var r=n(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},738(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756(e,t,n){var r=n(633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Client:()=>_r,Errors:()=>t,SearchClient:()=>Ir,default:()=>Dr});var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>De,hasStandardBrowserEnv:()=>Fe,hasStandardBrowserWebWorkerEnv:()=>Le,navigator:()=>qe,origin:()=>He});var t={};function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n.d(t,{HTTPError:()=>an,ImportError:()=>wn,MissingConfigurationError:()=>w,ObjectAlreadyExists:()=>Zt,ObjectNotFound:()=>Xt,ObjectUnprocessable:()=>tn,RequestMalformed:()=>$t,RequestUnauthorized:()=>Qt,ServerError:()=>rn,TypesenseError:()=>g});var l=n(65);function p(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}function y(e){var t="function"==typeof Map?new Map:void 0;return y=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(v())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&f(i,n.prototype),i}(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)},y(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}var g=function(e){function t(e,n,r){var o,a,s,u;return i(this,t),a=this,u=[e],s=h(s=t),(o=p(a,m()?Reflect.construct(s,u||[],h(a).constructor):s.apply(a,u))).name=(this instanceof t?this.constructor:void 0).name,o.httpBody=n,o.httpStatus=r,Object.setPrototypeOf(o,(this instanceof t?this.constructor:void 0).prototype),o}return d(t,e),u(t)}(y(Error));function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var w=function(e){function t(){return i(this,t),e=this,r=arguments,n=h(n=t),p(e,b()?Reflect.construct(n,r||[],h(e).constructor):n.apply(e,r));var e,n,r}return d(t,e),u(t)}(g);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var k=function(){return u(function e(t){var n=this;i(this,e),this.nodes=t.nodes||[],this.nodes=this.nodes.map(function(e){return n.setDefaultPathInNode(e)}).map(function(e){return n.setDefaultPortInNode(e)}).map(function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e)}),null==t.randomizeNodes&&(t.randomizeNodes=!0),!0===t.randomizeNodes&&this.shuffleArray(this.nodes),this.nearestNode=t.nearestNode,this.nearestNode=this.setDefaultPathInNode(this.nearestNode),this.nearestNode=this.setDefaultPortInNode(this.nearestNode),this.connectionTimeoutSeconds=t.connectionTimeoutSeconds||t.timeoutSeconds||5,this.healthcheckIntervalSeconds=t.healthcheckIntervalSeconds||60,this.numRetries=(void 0!==t.numRetries&&t.numRetries>=0?t.numRetries:this.nodes.length+(null==this.nearestNode?0:1))||3,this.retryIntervalSeconds=t.retryIntervalSeconds||.1,this.apiKey=t.apiKey,this.sendApiKeyAsQueryParam=t.sendApiKeyAsQueryParam,this.cacheSearchResultsForSeconds=t.cacheSearchResultsForSeconds||0,this.useServerSideSearchCache=t.useServerSideSearchCache||!1,this.axiosAdapter=t.axiosAdapter,this.logger=t.logger||l,this.logLevel=t.logLevel||"warn",this.logger.setLevel(this.logLevel),this.additionalHeaders=t.additionalHeaders,this.httpAgent=t.httpAgent,this.httpsAgent=t.httpsAgent,this.paramsSerializer=t.paramsSerializer,this.showDeprecationWarnings(t),this.validate()},[{key:"validate",value:function(){if(null==this.nodes||0===this.nodes.length||this.validateNodes())throw new w("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set");if(null!=this.nearestNode&&this.isNodeMissingAnyParameters(this.nearestNode))throw new w("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set");if(null==this.apiKey)throw new w("Ensure that apiKey is set");return!0}},{key:"validateNodes",value:function(){var e=this;return this.nodes.some(function(t){return e.isNodeMissingAnyParameters(t)})}},{key:"isNodeMissingAnyParameters",value:function(e){return!["protocol","host","port","path"].every(function(t){return e.hasOwnProperty(t)})&&null==e.url}},{key:"setDefaultPathInNode",value:function(e){return null==e||e.hasOwnProperty("path")||(e.path=""),e}},{key:"setDefaultPortInNode",value:function(e){if(null!=e&&!e.hasOwnProperty("port")&&e.hasOwnProperty("protocol"))switch(e.protocol){case"https":e.port=443;break;case"http":e.port=80}return e}},{key:"showDeprecationWarnings",value:function(e){e.timeoutSeconds&&this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"),e.masterNode&&this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"),e.readReplicaNodes&&this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12")}},{key:"shuffleArray",value:function(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=[e[n],e[t]];e[t]=r[0],e[n]=r[1]}}}])}();function R(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function S(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){R(o,r,i,a,s,"next",e)}function s(e){R(o,r,i,a,s,"throw",e)}a(void 0)})}}var O=n(756),P=n.n(O);function E(e,t){return function(){return e.apply(t,arguments)}}const{toString:x}=Object.prototype,{getPrototypeOf:A}=Object,{iterator:T,toStringTag:N}=Symbol,_=(j=Object.create(null),e=>{const t=x.call(e);return j[t]||(j[t]=t.slice(8,-1).toLowerCase())});var j;const U=e=>(e=e.toLowerCase(),t=>_(t)===e),I=e=>t=>typeof t===e,{isArray:D}=Array,q=I("undefined");function F(e){return null!==e&&!q(e)&&null!==e.constructor&&!q(e.constructor)&&B(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const L=U("ArrayBuffer"),H=I("string"),B=I("function"),M=I("number"),K=e=>null!==e&&"object"==typeof e,z=e=>{if("object"!==_(e))return!1;const t=A(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||N in e||T in e)},W=U("Date"),J=U("File"),$=U("Blob"),V=U("FileList"),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},G=void 0!==Q.FormData?Q.FormData:void 0,X=U("URLSearchParams"),[Y,Z,ee,te]=["ReadableStream","Request","Response","Headers"].map(U);function ne(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),D(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(F(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function re(e,t){if(F(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,oe=e=>!q(e)&&e!==ie,ae=(se="undefined"!=typeof Uint8Array&&A(Uint8Array),e=>se&&e instanceof se);var se;const ue=U("HTMLFormElement"),ce=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),le=U("RegExp"),pe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ne(n,(n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)}),Object.defineProperties(e,r)},he=U("AsyncFunction"),fe=(de="function"==typeof setImmediate,ve=B(ie.postMessage),de?setImmediate:ve?(ye=`axios@${Math.random()}`,me=[],ie.addEventListener("message",({source:e,data:t})=>{e===ie&&t===ye&&me.length&&me.shift()()},!1),e=>{me.push(e),ie.postMessage(ye,"*")}):e=>setTimeout(e));var de,ve,ye,me;const ge="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ie):"undefined"!=typeof process&&process.nextTick||fe,be={isArray:D,isArrayBuffer:L,isBuffer:F,isFormData:e=>{let t;return e&&(G&&e instanceof G||B(e.append)&&("formdata"===(t=_(e))||"object"===t&&B(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&L(e.buffer),t},isString:H,isNumber:M,isBoolean:e=>!0===e||!1===e,isObject:K,isPlainObject:z,isEmptyObject:e=>{if(!K(e)||F(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Y,isRequest:Z,isResponse:ee,isHeaders:te,isUndefined:q,isDate:W,isFile:J,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:$,isRegExp:le,isFunction:B,isStream:e=>K(e)&&B(e.pipe),isURLSearchParams:X,isTypedArray:ae,isFileList:V,forEach:ne,merge:function e(){const{caseless:t,skipUndefined:n}=oe(this)&&this||{},r={},i=(i,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const a=t&&re(r,o)||o;z(r[a])&&z(i)?r[a]=e(r[a],i):z(i)?r[a]=e({},i):D(i)?r[a]=i.slice():n&&q(i)||(r[a]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&ne(arguments[e],i);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(ne(t,(t,r)=>{n&&B(t)?Object.defineProperty(e,r,{value:E(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),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,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&A(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:_,kindOfTest:U,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(D(e))return e;let t=e.length;if(!M(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[T]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:ue,hasOwnProperty:ce,hasOwnProp:ce,reduceDescriptors:pe,freezeMethods:e=>{pe(e,(t,n)=>{if(B(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];B(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return D(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:re,global:ie,isContextDefined:oe,isSpecCompliantForm:function(e){return!!(e&&B(e.append)&&"FormData"===e[N]&&e[T])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(K(e)){if(t.indexOf(e)>=0)return;if(F(e))return e;if(!("toJSON"in e)){t[r]=e;const i=D(e)?[]:{};return ne(e,(e,t)=>{const o=n(e,r+1);!q(o)&&(i[t]=o)}),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:he,isThenable:e=>e&&(K(e)||B(e))&&B(e.then)&&B(e.catch),setImmediate:fe,asap:ge,isIterable:e=>null!=e&&B(e[T])};class we extends Error{static from(e,t,n,r,i,o){const a=new we(e.message,t||e.code,n,r,i);return a.cause=e,a.name=e.name,null!=e.status&&null==a.status&&(a.status=e.status),o&&Object.assign(a,o),a}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){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:be.toJSONObject(this.config),code:this.code,status:this.status}}}we.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",we.ERR_BAD_OPTION="ERR_BAD_OPTION",we.ECONNABORTED="ECONNABORTED",we.ETIMEDOUT="ETIMEDOUT",we.ERR_NETWORK="ERR_NETWORK",we.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",we.ERR_DEPRECATED="ERR_DEPRECATED",we.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",we.ERR_BAD_REQUEST="ERR_BAD_REQUEST",we.ERR_CANCELED="ERR_CANCELED",we.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",we.ERR_INVALID_URL="ERR_INVALID_URL";const Ce=we;function ke(e){return be.isPlainObject(e)||be.isArray(e)}function Re(e){return be.endsWith(e,"[]")?e.slice(0,-2):e}function Se(e,t,n){return e?e.concat(t).map(function(e,t){return e=Re(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Oe=be.toFlatObject(be,{},null,function(e){return/^is[A-Z]/.test(e)}),Pe=function(e,t,n){if(!be.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=be.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!be.isUndefined(t[e])})).metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&be.isSpecCompliantForm(t);if(!be.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(be.isDate(e))return e.toISOString();if(be.isBoolean(e))return e.toString();if(!s&&be.isBlob(e))throw new Ce("Blob is not supported. Use a Buffer instead.");return be.isArrayBuffer(e)||be.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let s=e;if(be.isReactNative(t)&&be.isReactNativeBlob(e))return t.append(Se(i,n,o),u(e)),!1;if(e&&!i&&"object"==typeof e)if(be.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(be.isArray(e)&&function(e){return be.isArray(e)&&!e.some(ke)}(e)||(be.isFileList(e)||be.endsWith(n,"[]"))&&(s=be.toArray(e)))return n=Re(n),s.forEach(function(e,r){!be.isUndefined(e)&&null!==e&&t.append(!0===a?Se([n],r,o):null===a?n:n+"[]",u(e))}),!1;return!!ke(e)||(t.append(Se(i,n,o),u(e)),!1)}const l=[],p=Object.assign(Oe,{defaultVisitor:c,convertValue:u,isVisitable:ke});if(!be.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!be.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),be.forEach(n,function(n,o){!0===(!(be.isUndefined(n)||null===n)&&i.call(t,n,be.isString(o)?o.trim():o,r,p))&&e(n,r?r.concat(o):[o])}),l.pop()}}(e),t};function Ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function xe(e,t){this._pairs=[],e&&Pe(e,this,t)}const Ae=xe.prototype;Ae.append=function(e,t){this._pairs.push([e,t])},Ae.toString=function(e){const t=e?function(t){return e.call(this,t,Ee)}:Ee;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const Te=xe;function Ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _e(e,t,n){if(!t)return e;const r=n&&n.encode||Ne,i=be.isFunction(n)?{serialize:n}:n,o=i&&i.serialize;let a;if(a=o?o(t,i):be.isURLSearchParams(t)?t.toString():new Te(t,i).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const je=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){be.forEach(this.handlers,function(t){null!==t&&e(t)})}},Ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Ie={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Te,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},De="undefined"!=typeof window&&"undefined"!=typeof document,qe="object"==typeof navigator&&navigator||void 0,Fe=De&&(!qe||["ReactNative","NativeScript","NS"].indexOf(qe.product)<0),Le="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,He=De&&window.location.href||"http://localhost",Be={...e,...Ie},Me=function(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=i>=e.length;return o=!o&&be.isArray(r)?r.length:o,s?(be.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&be.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&be.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}(r[o])),!a)}if(be.isFormData(e)&&be.isFunction(e.entries)){const n={};return be.forEachEntry(e,(e,r)=>{t(function(e){return be.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null},Ke={transitional:Ue,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=be.isObject(e);if(i&&be.isHTMLForm(e)&&(e=new FormData(e)),be.isFormData(e))return r?JSON.stringify(Me(e)):e;if(be.isArrayBuffer(e)||be.isBuffer(e)||be.isStream(e)||be.isFile(e)||be.isBlob(e)||be.isReadableStream(e))return e;if(be.isArrayBufferView(e))return e.buffer;if(be.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Pe(e,new Be.classes.URLSearchParams,{visitor:function(e,t,n,r){return Be.isNode&&be.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=be.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Pe(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e){if(be.isString(e))try{return(0,JSON.parse)(e),be.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ke.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(be.isResponse(e)||be.isReadableStream(e))return e;if(e&&be.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw Ce.from(e,Ce.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:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};be.forEach(["delete","get","head","post","put","patch"],e=>{Ke.headers[e]={}});const ze=Ke,We=be.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"]),Je=e=>{const t={};let n,r,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&We[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};(Object.getOwnPropertyDescriptor(Je,"name")||{}).writable||Object.defineProperty(Je,"name",{value:"default",configurable:!0});const $e=Symbol("internals");function Ve(e,t){if(!1!==e&&null!=e)if(be.isArray(e))e.forEach(e=>Ve(e,t));else if(!(e=>!/[\r\n]/.test(e))(String(e)))throw new Error(`Invalid character in header content ["${t}"]`)}function Qe(e){return e&&String(e).trim().toLowerCase()}function Ge(e){return!1===e||null==e?e:be.isArray(e)?e.map(Ge):function(e){let t=e.length;for(;t>0;){const n=e.charCodeAt(t-1);if(10!==n&&13!==n)break;t-=1}return t===e.length?e:e.slice(0,t)}(String(e))}function Xe(e,t,n,r,i){return be.isFunction(r)?r.call(this,t,n):(i&&(t=n),be.isString(t)?be.isString(r)?-1!==t.indexOf(r):be.isRegExp(r)?r.test(t):void 0:void 0)}class Ye{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Qe(t);if(!i)throw new Error("header name must be a non-empty string");const o=be.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(Ve(e,t),r[o||t]=Ge(e))}const o=(e,t)=>be.forEach(e,(e,n)=>i(e,n,t));if(be.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(be.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o(Je(e),t);else if(be.isObject(e)&&be.isIterable(e)){let n,r,i={};for(const t of e){if(!be.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(n=i[r])?be.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(i,t)}else null!=e&&i(t,e,n);return this}get(e,t){if(e=Qe(e)){const n=be.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(be.isFunction(t))return t.call(this,e,n);if(be.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Qe(e)){const n=be.findKey(this,e);return!(!n||void 0===this[n]||t&&!Xe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Qe(e)){const i=be.findKey(n,e);!i||t&&!Xe(0,n[i],i,t)||(delete n[i],r=!0)}}return be.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Xe(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return be.forEach(this,(r,i)=>{const o=be.findKey(n,i);if(o)return t[o]=Ge(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(i):String(i).trim();a!==i&&delete t[i],t[a]=Ge(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return be.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&be.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[$e]=this[$e]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Qe(e);t[r]||(function(e,t){const n=be.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(n,e),t[r]=!0)}return be.isArray(e)?e.forEach(r):r(e),this}}Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),be.reduceDescriptors(Ye.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),be.freezeMethods(Ye);const Ze=Ye;function et(e,t){const n=this||ze,r=t||n,i=Ze.from(r.headers);let o=r.data;return be.forEach(e,function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function tt(e){return!(!e||!e.__CANCEL__)}const nt=class extends Ce{constructor(e,t,n){super(null==e?"canceled":e,Ce.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function rt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ce("Request failed with status code "+n.status,[Ce.ERR_BAD_REQUEST,Ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const it=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const u=Date.now(),c=r[a];i||(i=u),n[o]=s,r[o]=u;let l=a,p=0;for(;l!==o;)p+=n[l++],l%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),u-i<t)return;const h=c&&u-c;return h?Math.round(1e3*p/h):void 0}}(50,250);return function(e,t){let n,r,i=0,o=1e3/t;const a=(t,o=Date.now())=>{i=o,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=o?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},o-s)))},()=>n&&a(n)]}(n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,s=o-r,u=i(s);r=o,e({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&o<=a?(a-o)/u:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},ot=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},at=e=>(...t)=>be.asap(()=>e(...t)),st=Be.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Be.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0,ut=Be.hasStandardBrowserEnv?{write(e,t,n,r,i,o,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];be.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),be.isString(r)&&s.push(`path=${r}`),be.isString(i)&&s.push(`domain=${i}`),!0===o&&s.push("secure"),be.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function ct(e,t,n){let r=!("string"==typeof(i=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i));var i;return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const lt=e=>e instanceof Ze?{...e}:e;function pt(e,t){t=t||{};const n={};function r(e,t,n,r){return be.isPlainObject(e)&&be.isPlainObject(t)?be.merge.call({caseless:r},e,t):be.isPlainObject(t)?be.merge({},t):be.isArray(t)?t.slice():t}function i(e,t,n,i){return be.isUndefined(t)?be.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function o(e,t){if(!be.isUndefined(t))return r(void 0,t)}function a(e,t){return be.isUndefined(t)?be.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken: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:s,headers:(e,t,n)=>i(lt(e),lt(t),0,!0)};return be.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const o=be.hasOwnProp(u,r)?u[r]:i,a=o(e[r],t[r],r);be.isUndefined(a)&&o!==s||(n[r]=a)}),n}const ht=e=>{const t=pt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;if(t.headers=a=Ze.from(a),t.url=_e(ct(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),be.isFormData(n))if(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(be.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&a.set(e,n)})}if(Be.hasStandardBrowserEnv&&(r&&be.isFunction(r)&&(r=r(t)),r||!1!==r&&st(t.url))){const e=i&&o&&ut.read(o);e&&a.set(i,e)}return t};(Object.getOwnPropertyDescriptor(ht,"name")||{}).writable||Object.defineProperty(ht,"name",{value:"default",configurable:!0});const ft="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=ht(e);let i=r.data;const o=Ze.from(r.headers).normalize();let a,s,u,c,l,{responseType:p,onUploadProgress:h,onDownloadProgress:f}=r;function d(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let v=new XMLHttpRequest;function y(){if(!v)return;const r=Ze.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());rt(function(e){t(e),d()},function(e){n(e),d()},{data:p&&"text"!==p&&"json"!==p?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v}),v=null}v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout,"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(y)},v.onabort=function(){v&&(n(new Ce("Request aborted",Ce.ECONNABORTED,e,v)),v=null)},v.onerror=function(t){const r=t&&t.message?t.message:"Network Error",i=new Ce(r,Ce.ERR_NETWORK,e,v);i.event=t||null,n(i),v=null},v.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||Ue;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ce(t,i.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,v)),v=null},void 0===i&&o.setContentType(null),"setRequestHeader"in v&&be.forEach(o.toJSON(),function(e,t){v.setRequestHeader(t,e)}),be.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),p&&"json"!==p&&(v.responseType=r.responseType),f&&([u,l]=it(f,!0),v.addEventListener("progress",u)),h&&v.upload&&([s,c]=it(h),v.upload.addEventListener("progress",s),v.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{v&&(n(!t||t.type?new nt(null,e,v):t),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);m&&-1===Be.protocols.indexOf(m)?n(new Ce("Unsupported protocol "+m+":",Ce.ERR_BAD_REQUEST,e)):v.send(i||null)})},dt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ce?t:new nt(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,i(new Ce(`timeout of ${t}ms exceeded`,Ce.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:s}=r;return s.unsubscribe=()=>be.asap(a),s}},vt=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},yt=(e,t,n,r)=>{const i=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*vt(n,t)}(e,t);let o,a=0,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return s(),void e.close();let o=r.byteLength;if(n){let e=a+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},{isFunction:mt}=be,gt=(({Request:e,Response:t})=>({Request:e,Response:t}))(be.global),{ReadableStream:bt,TextEncoder:wt}=be.global,Ct=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},kt=e=>{e=be.merge.call({skipUndefined:!0},gt,e);const{fetch:t,Request:n,Response:r}=e,i=t?mt(t):"function"==typeof fetch,o=mt(n),a=mt(r);if(!i)return!1;const s=i&&mt(bt),u=i&&("function"==typeof wt?(c=new wt,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const l=o&&s&&Ct(()=>{let e=!1;const t=new bt,r=new n(Be.origin,{body:t,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return t.cancel(),e&&!r}),p=a&&s&&Ct(()=>be.isReadableStream(new r("").body)),h={stream:p&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Ce(`Response type '${e}' is not supported`,Ce.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:i,method:a,data:s,signal:c,cancelToken:f,timeout:d,onDownloadProgress:v,onUploadProgress:y,responseType:m,headers:g,withCredentials:b="same-origin",fetchOptions:w}=ht(e),C=t||fetch;m=m?(m+"").toLowerCase():"text";let k=dt([c,f&&f.toAbortSignal()],d),R=null;const S=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let O;try{if(y&&l&&"get"!==a&&"head"!==a&&0!==(O=await(async(e,t)=>{const r=be.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(be.isBlob(e))return e.size;if(be.isSpecCompliantForm(e)){const t=new n(Be.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return be.isArrayBufferView(e)||be.isArrayBuffer(e)?e.byteLength:(be.isURLSearchParams(e)&&(e+=""),be.isString(e)?(await u(e)).byteLength:void 0)})(t):r})(g,s))){let e,t=new n(i,{method:"POST",body:s,duplex:"half"});if(be.isFormData(s)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=ot(O,it(at(y)));s=yt(t.body,65536,e,n)}}be.isString(b)||(b=b?"include":"omit");const t=o&&"credentials"in n.prototype,c={...w,signal:k,method:a.toUpperCase(),headers:g.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:void 0};R=o&&new n(i,c);let f=await(o?C(R,w):C(i,c));const d=p&&("stream"===m||"response"===m);if(p&&(v||d&&S)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=be.toFiniteNumber(f.headers.get("content-length")),[n,i]=v&&ot(t,it(at(v),!0))||[];f=new r(yt(f.body,65536,n,()=>{i&&i(),S&&S()}),e)}m=m||"text";let P=await h[be.findKey(h,m)||"text"](f,e);return!d&&S&&S(),await new Promise((t,n)=>{rt(t,n,{data:P,headers:Ze.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:R})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,e,R,t&&t.response),{cause:t.cause||t});throw Ce.from(t,t&&t.code,e,R,t&&t.response)}}},Rt=new Map,St=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let a,s,u=o.length,c=Rt;for(;u--;)a=o[u],s=c.get(a),void 0===s&&c.set(a,s=u?new Map:kt(t)),c=s;return s},Ot=(St(),{http:null,xhr:ft,fetch:{get:St}});be.forEach(Ot,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Pt=e=>`- ${e}`,Et=e=>be.isFunction(e)||null===e||!1===e,xt=function(e,t){e=be.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let a=0;a<n;a++){let n;if(r=e[a],i=r,!Et(r)&&(i=Ot[(n=String(r)).toLowerCase()],void 0===i))throw new Ce(`Unknown adapter '${n}'`);if(i&&(be.isFunction(i)||(i=i.get(t))))break;o[n||"#"+a]=i}if(!i){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(Pt).join("\n"):" "+Pt(e[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return i};function At(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new nt(null,e)}function Tt(e){return At(e),e.headers=Ze.from(e.headers),e.data=et.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xt(e.adapter||ze.adapter,e)(e).then(function(t){return At(e),t.data=et.call(e,e.transformResponse,t),t.headers=Ze.from(t.headers),t},function(t){return tt(t)||(At(e),t&&t.response&&(t.response.data=et.call(e,e.transformResponse,t.response),t.response.headers=Ze.from(t.response.headers))),Promise.reject(t)})}const Nt="1.15.0",_t={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{_t[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const jt={};_t.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Nt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new Ce(r(i," has been removed"+(t?" in "+t:"")),Ce.ERR_DEPRECATED);return t&&!jt[i]&&(jt[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}},_t.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Ut={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ce("options must be an object",Ce.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new Ce("option "+o+" must be "+n,Ce.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Ce("Unknown option "+o,Ce.ERR_BAD_OPTION)}},validators:_t},It=Ut.validators;class Dt{constructor(e){this.defaults=e||{},this.interceptors={request:new je,response:new je}}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 n=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(n){const t=n.indexOf("\n"),r=-1===t?-1:n.indexOf("\n",t+1),i=-1===r?"":n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+="\n"+n)}}else e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=pt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&Ut.assertOptions(n,{silentJSONParsing:It.transitional(It.boolean),forcedJSONParsing:It.transitional(It.boolean),clarifyTimeoutError:It