UNPKG

typesense

Version:
2 lines 123 kB
/*! For license information please see typesense.min.js.LICENSE.txt */ var Typesense;(()=>{var e={65:function(e,t,n){var r,i;!function(o,a){"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 y=f();null!=y&&(c=d(y)),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:()=>{},633:(e,t,n)=>{var r=n(738).default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",p=u.toStringTag||"@@toStringTag";function h(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(t){h=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof w?t:w,o=Object.create(i.prototype),a=new _(r||[]);return s(o,"_invoke",{value:A(e,n,a)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=f;var y="suspendedStart",v="suspendedYield",m="executing",g="completed",b={};function w(){}function k(){}function C(){}var S={};h(S,c,(function(){return this}));var R=Object.getPrototypeOf,O=R&&R(R(U([])));O&&O!==o&&a.call(O,c)&&(S=O);var E=C.prototype=w.prototype=Object.create(S);function P(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,o,s,u){var c=d(e[i],e,o);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==r(p)&&a.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(p).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function A(e,n,r){var i=y;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=T(s,r);if(u){if(u===b)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===y)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var c=d(e,n,r);if("normal"===c.type){if(i=r.done?g:v,c.arg===b)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function T(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,b;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function U(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(a.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(r(e)+" is not iterable")}return k.prototype=C,s(E,"constructor",{value:C,configurable:!0}),s(C,"constructor",{value:k,configurable:!0}),k.displayName=h(C,p,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,C):(e.__proto__=C,h(e,p,"GeneratorFunction")),e.prototype=Object.create(E),e},n.awrap=function(e){return{__await:e}},P(x.prototype),h(x.prototype,l,(function(){return this})),n.AsyncIterator=x,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new x(f(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(E),h(E,p,"Generator"),h(E,c,(function(){return this})),h(E,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=U,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var n in this)"t"===n.charAt(0)&&a.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:U(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},n}e.exports=i,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.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:()=>Pr,Errors:()=>t,SearchClient:()=>Tr,default:()=>jr});var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>qe,hasStandardBrowserEnv:()=>Ie,hasStandardBrowserWebWorkerEnv:()=>Fe,navigator:()=>De,origin:()=>Be});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,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=o(r))return r;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:()=>hn,ImportError:()=>Pn,MissingConfigurationError:()=>S,ObjectAlreadyExists:()=>nn,ObjectNotFound:()=>Zt,ObjectUnprocessable:()=>an,RequestMalformed:()=>Vt,RequestUnauthorized:()=>$t,ServerError:()=>cn,TypesenseError:()=>w});var l=n(65);function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(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 p(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(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&&d(e,t)}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){var t="function"==typeof Map?new Map:void 0;return m=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&&d(i,n.prototype),i}(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)},m(e)}function g(e,t,n){return t=f(t),h(e,b()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}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(e,n,r){var o;return i(this,t),(o=g(this,t,[e])).name=(this instanceof t?this.constructor:void 0).name,o.httpBody=n,o.httpStatus=r,Object.setPrototypeOf(p(o),(this instanceof t?this.constructor:void 0).prototype),o}return y(t,e),u(t)}(m(Error));function k(e,t,n){return t=f(t),h(e,C()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var S=function(e){function t(){return i(this,t),k(this,t,arguments)}return y(t,e),u(t)}(w);function R(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 O=function(){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?R(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(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()}return u(e,[{key:"validate",value:function(){if(null==this.nodes||0===this.nodes.length||this.validateNodes())throw new S("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set");if(null!=this.nearestNode&&this.isNodeMissingAnyParameters(this.nearestNode))throw new S("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set");if(null==this.apiKey)throw new S("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]}}}]),e}();function E(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 P(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){E(o,r,i,a,s,"next",e)}function s(e){E(o,r,i,a,s,"throw",e)}a(void 0)}))}}var x=n(756),A=n.n(x);function T(e,t){return function(){return e.apply(t,arguments)}}const{toString:j}=Object.prototype,{getPrototypeOf:N}=Object,_=(U=Object.create(null),e=>{const t=j.call(e);return U[t]||(U[t]=t.slice(8,-1).toLowerCase())});var U;const L=e=>(e=e.toLowerCase(),t=>_(t)===e),q=e=>t=>typeof t===e,{isArray:D}=Array,I=q("undefined"),F=L("ArrayBuffer"),B=q("string"),H=q("function"),M=q("number"),K=e=>null!==e&&"object"==typeof e,z=e=>{if("object"!==_(e))return!1;const t=N(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},J=L("Date"),W=L("File"),V=L("Blob"),G=L("FileList"),Q=L("URLSearchParams"),[$,X,Y,Z]=["ReadableStream","Request","Response","Headers"].map(L);function ee(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{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 te(e,t){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 ne="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,re=e=>!I(e)&&e!==ne,ie=(oe="undefined"!=typeof Uint8Array&&N(Uint8Array),e=>oe&&e instanceof oe);var oe;const ae=L("HTMLFormElement"),se=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ue=L("RegExp"),ce=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ee(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},le=L("AsyncFunction"),pe=(he="function"==typeof setImmediate,fe=H(ne.postMessage),he?setImmediate:fe?(de=`axios@${Math.random()}`,ye=[],ne.addEventListener("message",(({source:e,data:t})=>{e===ne&&t===de&&ye.length&&ye.shift()()}),!1),e=>{ye.push(e),ne.postMessage(de,"*")}):e=>setTimeout(e));var he,fe,de,ye;const ve="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ne):"undefined"!=typeof process&&process.nextTick||pe,me={isArray:D,isArrayBuffer:F,isBuffer:function(e){return null!==e&&!I(e)&&null!==e.constructor&&!I(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||H(e.append)&&("formdata"===(t=_(e))||"object"===t&&H(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&F(e.buffer),t},isString:B,isNumber:M,isBoolean:e=>!0===e||!1===e,isObject:K,isPlainObject:z,isReadableStream:$,isRequest:X,isResponse:Y,isHeaders:Z,isUndefined:I,isDate:J,isFile:W,isBlob:V,isRegExp:ue,isFunction:H,isStream:e=>K(e)&&H(e.pipe),isURLSearchParams:Q,isTypedArray:ie,isFileList:G,forEach:ee,merge:function e(){const{caseless:t}=re(this)&&this||{},n={},r=(r,i)=>{const o=t&&te(n,i)||i;z(n[o])&&z(r)?n[o]=e(n[o],r):z(r)?n[o]=e({},r):D(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&ee(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(ee(t,((t,r)=>{n&&H(t)?e[r]=T(t,n):e[r]=t}),{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),e.prototype.constructor=e,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&&N(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:_,kindOfTest:L,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[Symbol.iterator]).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:ae,hasOwnProperty:se,hasOwnProp:se,reduceDescriptors:ce,freezeMethods:e=>{ce(e,((t,n)=>{if(H(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];H(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:te,global:ne,isContextDefined:re,isSpecCompliantForm:function(e){return!!(e&&H(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(K(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=D(e)?[]:{};return ee(e,((e,t)=>{const o=n(e,r+1);!I(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:le,isThenable:e=>e&&(K(e)||H(e))&&H(e.then)&&H(e.catch),setImmediate:pe,asap:ve};function ge(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}me.inherits(ge,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:me.toJSONObject(this.config),code:this.code,status:this.status}}});const be=ge.prototype,we={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{we[e]={value:e}})),Object.defineProperties(ge,we),Object.defineProperty(be,"isAxiosError",{value:!0}),ge.from=(e,t,n,r,i,o)=>{const a=Object.create(be);return me.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),ge.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const ke=ge;function Ce(e){return me.isPlainObject(e)||me.isArray(e)}function Se(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function Re(e,t,n){return e?e.concat(t).map((function(e,t){return e=Se(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Oe=me.toFlatObject(me,{},null,(function(e){return/^is[A-Z]/.test(e)})),Ee=function(e,t,n){if(!me.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=me.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!me.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&me.isSpecCompliantForm(t);if(!me.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(me.isDate(e))return e.toISOString();if(!s&&me.isBlob(e))throw new ke("Blob is not supported. Use a Buffer instead.");return me.isArrayBuffer(e)||me.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(me.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(me.isArray(e)&&function(e){return me.isArray(e)&&!e.some(Ce)}(e)||(me.isFileList(e)||me.endsWith(n,"[]"))&&(s=me.toArray(e)))return n=Se(n),s.forEach((function(e,r){!me.isUndefined(e)&&null!==e&&t.append(!0===a?Re([n],r,o):null===a?n:n+"[]",u(e))})),!1;return!!Ce(e)||(t.append(Re(i,n,o),u(e)),!1)}const l=[],p=Object.assign(Oe,{defaultVisitor:c,convertValue:u,isVisitable:Ce});if(!me.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!me.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),me.forEach(n,(function(n,o){!0===(!(me.isUndefined(n)||null===n)&&i.call(t,n,me.isString(o)?o.trim():o,r,p))&&e(n,r?r.concat(o):[o])})),l.pop()}}(e),t};function Pe(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&&Ee(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,Pe)}:Pe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Te=xe;function je(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ne(e,t,n){if(!t)return e;const r=n&&n.encode||je;me.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(o=i?i(t,n):me.isURLSearchParams(t)?t.toString():new Te(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const _e=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){me.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Le={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"]},qe="undefined"!=typeof window&&"undefined"!=typeof document,De="object"==typeof navigator&&navigator||void 0,Ie=qe&&(!De||["ReactNative","NativeScript","NS"].indexOf(De.product)<0),Fe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Be=qe&&window.location.href||"http://localhost",He={...e,...Le},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&&me.isArray(r)?r.length:o,s?(me.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&me.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&me.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(me.isFormData(e)&&me.isFunction(e.entries)){const n={};return me.forEachEntry(e,((e,r)=>{t(function(e){return me.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=me.isObject(e);if(i&&me.isHTMLForm(e)&&(e=new FormData(e)),me.isFormData(e))return r?JSON.stringify(Me(e)):e;if(me.isArrayBuffer(e)||me.isBuffer(e)||me.isStream(e)||me.isFile(e)||me.isBlob(e)||me.isReadableStream(e))return e;if(me.isArrayBufferView(e))return e.buffer;if(me.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 Ee(e,new He.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return He.isNode&&me.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=me.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ee(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(me.isString(e))try{return(0,JSON.parse)(e),me.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(me.isResponse(e)||me.isReadableStream(e))return e;if(e&&me.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw ke.from(e,ke.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:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(["delete","get","head","post","put","patch"],(e=>{Ke.headers[e]={}}));const ze=Ke,Je=me.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"]),We=Symbol("internals");function Ve(e){return e&&String(e).trim().toLowerCase()}function Ge(e){return!1===e||null==e?e:me.isArray(e)?e.map(Ge):String(e)}function Qe(e,t,n,r,i){return me.isFunction(r)?r.call(this,t,n):(i&&(t=n),me.isString(t)?me.isString(r)?-1!==t.indexOf(r):me.isRegExp(r)?r.test(t):void 0:void 0)}class $e{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Ve(t);if(!i)throw new Error("header name must be a non-empty string");const o=me.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Ge(e))}const o=(e,t)=>me.forEach(e,((e,n)=>i(e,n,t)));if(me.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(me.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((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]&&Je[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(me.isHeaders(e))for(const[t,r]of e.entries())i(r,t,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=Ve(e)){const n=me.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(me.isFunction(t))return t.call(this,e,n);if(me.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ve(e)){const n=me.findKey(this,e);return!(!n||void 0===this[n]||t&&!Qe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Ve(e)){const i=me.findKey(n,e);!i||t&&!Qe(0,n[i],i,t)||(delete n[i],r=!0)}}return me.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&&!Qe(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return me.forEach(this,((r,i)=>{const o=me.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 me.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&me.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")}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[We]=this[We]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ve(e);t[r]||(function(e,t){const n=me.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 me.isArray(e)?e.forEach(r):r(e),this}}$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),me.reduceDescriptors($e.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),me.freezeMethods($e);const Xe=$e;function Ye(e,t){const n=this||ze,r=t||n,i=Xe.from(r.headers);let o=r.data;return me.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function Ze(e){return!(!e||!e.__CANCEL__)}function et(e,t,n){ke.call(this,null==e?"canceled":e,ke.ERR_CANCELED,t,n),this.name="CanceledError"}me.inherits(et,ke,{__CANCEL__:!0});const tt=et;function nt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ke("Request failed with status code "+n.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const rt=(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.apply(null,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)},it=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ot=e=>(...t)=>me.asap((()=>e(...t))),at=He.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,He.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,st=He.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];me.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),me.isString(r)&&a.push("path="+r),me.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ut(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ct=e=>e instanceof Xe?{...e}:e;function lt(e,t){t=t||{};const n={};function r(e,t,n,r){return me.isPlainObject(e)&&me.isPlainObject(t)?me.merge.call({caseless:r},e,t):me.isPlainObject(t)?me.merge({},t):me.isArray(t)?t.slice():t}function i(e,t,n,i){return me.isUndefined(t)?me.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function o(e,t){if(!me.isUndefined(t))return r(void 0,t)}function a(e,t){return me.isUndefined(t)?me.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(ct(e),ct(t),0,!0)};return me.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=u[r]||i,a=o(e[r],t[r],r);me.isUndefined(a)&&o!==s||(n[r]=a)})),n}const pt=e=>{const t=lt({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:u}=t;if(t.headers=s=Xe.from(s),t.url=Ne(ut(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),me.isFormData(r))if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(He.hasStandardBrowserEnv&&(i&&me.isFunction(i)&&(i=i(t)),i||!1!==i&&at(t.url))){const e=o&&a&&st.read(a);e&&s.set(o,e)}return t},ht="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=pt(e);let i=r.data;const o=Xe.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 y=new XMLHttpRequest;function v(){if(!y)return;const r=Xe.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());nt((function(e){t(e),d()}),(function(e){n(e),d()}),{data:p&&"text"!==p&&"json"!==p?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:e,request:y}),y=null}y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout,"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(v)},y.onabort=function(){y&&(n(new ke("Request aborted",ke.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new ke("Network Error",ke.ERR_NETWORK,e,y)),y=null},y.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 ke(t,i.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,y)),y=null},void 0===i&&o.setContentType(null),"setRequestHeader"in y&&me.forEach(o.toJSON(),(function(e,t){y.setRequestHeader(t,e)})),me.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),p&&"json"!==p&&(y.responseType=r.responseType),f&&([u,l]=rt(f,!0),y.addEventListener("progress",u)),h&&y.upload&&([s,c]=rt(h),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{y&&(n(!t||t.type?new tt(null,e,y):t),y.abort(),y=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===He.protocols.indexOf(m)?n(new ke("Unsupported protocol "+m+":",ke.ERR_BAD_REQUEST,e)):y.send(i||null)}))},ft=(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 ke?t:new tt(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,i(new ke(`timeout ${t} of ms exceeded`,ke.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=()=>me.asap(a),s}},dt=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*dt(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})},vt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,mt=vt&&"function"==typeof ReadableStream,gt=vt&&("function"==typeof TextEncoder?(bt=new TextEncoder,e=>bt.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var bt;const wt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},kt=mt&&wt((()=>{let e=!1;const t=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ct=mt&&wt((()=>me.isReadableStream(new Response("").body))),St={stream:Ct&&(e=>e.body)};var Rt;vt&&(Rt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!St[e]&&(St[e]=me.isFunction(Rt[e])?t=>t[e]():(t,n)=>{throw new ke(`Response type '${e}' is not supported`,ke.ERR_NOT_SUPPORT,n)})})));const Ot={http:null,xhr:ht,fetch:vt&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:c,headers:l,withCredentials:p="same-origin",fetchOptions:h}=pt(e);c=c?(c+"").toLowerCase():"text";let f,d=ft([i,o&&o.toAbortSignal()],a);const y=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let v;try{if(u&&kt&&"get"!==n&&"head"!==n&&0!==(v=await(async(e,t)=>{const n=me.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(me.isBlob(e))return e.size;if(me.isSpecCompliantForm(e)){const t=new Request(He.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return me.isArrayBufferView(e)||me.isArrayBuffer(e)?e.byteLength:(me.isURLSearchParams(e)&&(e+=""),me.isString(e)?(await gt(e)).byteLength:void 0)})(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(me.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=it(v,rt(ot(u)));r=yt(n.body,65536,e,t)}}me.isString(p)||(p=p?"include":"omit");const i="credentials"in Request.prototype;f=new Request(t,{...h,signal:d,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:i?p:void 0});let o=await fetch(f);const a=Ct&&("stream"===c||"response"===c);if(Ct&&(s||a&&y)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=me.toFiniteNumber(o.headers.get("content-length")),[n,r]=s&&it(t,rt(ot(s),!0))||[];o=new Response(yt(o.body,65536,n,(()=>{r&&r(),y&&y()})),e)}c=c||"text";let m=await St[me.findKey(St,c)||"text"](o,e);return!a&&y&&y(),await new Promise(((t,n)=>{nt(t,n,{data:m,headers:Xe.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:f})}))}catch(t){if(y&&y(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new ke("Network Error",ke.ERR_NETWORK,e,f),{cause:t.cause||t});throw ke.from(t,t&&t.code,e,f)}})};me.forEach(Ot,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Et=e=>`- ${e}`,Pt=e=>me.isFunction(e)||null===e||!1===e,xt=e=>{e=me.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!Pt(n)&&(r=Ot[(t=String(n)).toLowerCase()],void 0===r))throw new ke(`Unknown adapter '${t}'`);if(r)break;i[t||"#"+o]=r}if(!r){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Et).join("\n"):" "+Et(e[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function At(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tt(null,e)}function Tt(e){return At(e),e.headers=Xe.from(e.headers),e.data=Ye.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).then((function(t){return At(e),t.data=Ye.call(e,e.transformResponse,t),t.headers=Xe.from(t.headers),t}),(function(t){return Ze(t)||(At(e),t&&t.response&&(t.response.data=Ye.call(e,e.transformResponse,t.response),t.response.headers=Xe.from(t.response.headers))),Promise.reject(t)}))}const jt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{jt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Nt={};jt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new ke(r(i," has been removed"+(t?" in "+t:"")),ke.ERR_DEPRECATED);return t&&!Nt[i]&&(Nt[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)}},jt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const _t={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ke("options must be an object",ke.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 ke("option "+o+" must be "+n,ke.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ke("Unknown option "+o,ke.ERR_BAD_OPTION)}},validators:jt},Ut=_t.validators;class Lt{constructor(e){this.defaults=e,this.interceptors={request:new _e,response:new _e}}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=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=lt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&_t.assertOptions(n,{silentJSONParsing:Ut.transitional(Ut.boolean),forcedJSONParsing:Ut.transitional(Ut.boolean),clarifyTimeoutError:Ut.transitional(Ut.boolean)},!1),null!=r&&(me.isFunction(r)?t.paramsSerializer={serialize:r}:_t.assertOptions(r,{encode:Ut.function,serialize:Ut.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),_t.assertOptions(t,{baseUrl:Ut.spelling("baseURL"),withXsrfToken:Ut.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&me.merge(i.common,i[t.method]);i&&me.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Xe.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,p=0;if(!s){const e=[Tt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,u),l=e.length,c=Promise.resol