timekit-sdk
Version:
JavaScript SDK for the Timekit API (timekit.io)
2 lines • 46.2 kB
JavaScript
/*! For license information please see timekit-sdk.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.timekit=t():e.timekit=t()}(self,(()=>(()=>{var e={501:function(e,t,r){var n;e=r.nmd(e),function(o){var i=t,s=(e&&e.exports,"object"==typeof r.g&&r.g);s.global!==s&&s.window;var a=function(e){this.message=e};(a.prototype=new Error).name="InvalidCharacterError";var u=function(e){throw new a(e)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,d={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&u("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,n,o,i=e.length%3,s="",a=-1,l=e.length-i;++a<l;)t=e.charCodeAt(a)<<16,r=e.charCodeAt(++a)<<8,n=e.charCodeAt(++a),s+=c.charAt((o=t+r+n)>>18&63)+c.charAt(o>>12&63)+c.charAt(o>>6&63)+c.charAt(63&o);return 2==i?(t=e.charCodeAt(a)<<8,r=e.charCodeAt(++a),s+=c.charAt((o=t+r)>>10)+c.charAt(o>>4&63)+c.charAt(o<<2&63)+"="):1==i&&(o=e.charCodeAt(a),s+=c.charAt(o>>2)+c.charAt(o<<4&63)+"=="),s},decode:function(e){var t=(e=String(e).replace(l,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&u("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,o=0,i="",s=-1;++s<t;)n=c.indexOf(e.charAt(s)),r=o%4?64*r+n:n,o++%4&&(i+=String.fromCharCode(255&r>>(-2*o&6)));return i},version:"1.0.0"};void 0===(n=function(){return d}.call(t,r,t,e))||(e.exports=n)}()},996:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)};var r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?u((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function o(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var o={};return r.isMergeableObject(e)&&i(e).forEach((function(t){o[t]=n(e[t],r)})),i(t).forEach((function(i){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(s(e,i)&&r.isMergeableObject(t[i])?o[i]=function(e,t){if(!t.customMerge)return u;var r=t.customMerge(e);return"function"==typeof r?r:u}(i,r)(e[i],t[i],r):o[i]=n(t[i],r))})),o}function u(e,r,i){(i=i||{}).arrayMerge=i.arrayMerge||o,i.isMergeableObject=i.isMergeableObject||t,i.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(r);return s===Array.isArray(e)?s?i.arrayMerge(e,r,i):a(e,r,i):n(r,i)}u.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return u(e,r,t)}),{})};var c=u;e.exports=c},264:function(e,t,r){var n,o,i,s,a,u,c,l,d,f,p,m,h,g,y,b;i=function(e,t,r){if(!d(t)||p(t)||m(t)||h(t)||l(t))return t;var n,o=0,s=0;if(f(t))for(n=[],s=t.length;o<s;o++)n.push(i(e,t[o],r));else for(var a in n={},t)Object.prototype.hasOwnProperty.call(t,a)&&(n[e(a,r)]=i(e,t[a],r));return n},s=function(e){return g(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},a=function(e){var t=s(e);return t.substr(0,1).toUpperCase()+t.substr(1)},u=function(e,t){return function(e,t){var r=(t=t||{}).separator||"_",n=t.split||/(?=[A-Z])/;return e.split(n).join(r)}(e,t).toLowerCase()},c=Object.prototype.toString,l=function(e){return"function"==typeof e},d=function(e){return e===Object(e)},f=function(e){return"[object Array]"==c.call(e)},p=function(e){return"[object Date]"==c.call(e)},m=function(e){return"[object RegExp]"==c.call(e)},h=function(e){return"[object Boolean]"==c.call(e)},g=function(e){return(e-=0)==e},y=function(e,t){var r=t&&"process"in t?t.process:t;return"function"!=typeof r?e:function(t,n){return r(t,e,n)}},b={camelize:s,decamelize:u,pascalize:a,depascalize:u,camelizeKeys:function(e,t){return i(y(s,t),e)},decamelizeKeys:function(e,t){return i(y(u,t),e,t)},pascalizeKeys:function(e,t){return i(y(a,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}},void 0===(o="function"==typeof(n=b)?n.call(t,r,t,e):n)||(e.exports=o)},761:e=>{e.exports=function(e){return e.accountSync=function(t){return e.makeRequest({url:"/accounts/sync",method:"get",params:t})},e.getWidgets=function(){return e.makeRequest({url:"/widgets",method:"get"})},e.getWidget=function(t){return e.makeRequest({url:"/widgets/"+t.id,method:"get"})},e.getHostedWidget=function(t){return e.makeRequest({url:"/widgets/hosted/"+t.slug,method:"get"})},e.getEmbedWidget=function(t){return e.makeRequest({url:"/widgets/embed/"+t.id,method:"get"})},e.createWidget=function(t){return e.makeRequest({url:"/widgets",method:"post",data:t})},e.updateWidget=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/widgets/"+r,method:"put",data:t})},e.deleteWidget=function(t){return e.makeRequest({url:"/widgets/"+t.id,method:"delete"})},e.createUser=function(t){return e.makeRequest({url:"/users",method:"post",data:t})},e.getUserInfo=function(){return e.makeRequest({url:"/users/me",method:"get"})},e.updateUser=function(t){return e.makeRequest({url:"/users/me",method:"put",data:t})},e.resetUserPassword=function(t){return e.makeRequest({url:"/users/resetpassword",method:"post",data:t})},e.getUserTimezone=function(t){return e.makeRequest({url:"/users/timezone/"+t.email,method:"get"})},e.createFindTimeFilterCollection=function(t){return e.makeRequest({url:"/findtime/filtercollections",method:"post",data:t})},e.getFindTimeFilterCollections=function(){return e.makeRequest({url:"/findtime/filtercollections",method:"get"})},e.updateFindTimeFilterCollection=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/findtime/filtercollections/"+r,method:"get",data:t})},e}},613:(e,t,r)=>{r(555);e.exports=function(e){return e.getAccounts=function(){return e.makeRequest({url:"/accounts",method:"get"})},e.accountGoogleSync=function(){return e.makeRequest({url:"/accounts/sync",method:"post"})},e.accountMicrosoftSync=function(){return e.makeRequest({url:"/accounts/microsoft/sync",method:"post"})},e.auth=function(t){var r=e.makeRequest({data:t,url:"/auth",method:"post"});return r.then((function(t){var r=t.data.api_token||t.data.apiToken;e.setUser(t.data.email,r)})).catch((function(t){e.setUser("","")})),r},e.getApps=function(){return e.makeRequest({url:"/apps",method:"get"})},e.getApp=function(){return e.makeRequest({url:"/app",method:"get"})},e.createApp=function(t){return e.makeRequest({url:"/apps",method:"post",data:t})},e.updateApp=function(t){var r=t.slug;return delete t.slug,e.makeRequest({url:"/apps/"+r,method:"put",data:t})},e.deleteApp=function(t){return e.makeRequest({url:"/apps/"+t.slug,method:"delete"})},e.getResources=function(){return e.makeRequest({url:"/resources",method:"get"})},e.getResource=function(t){return e.makeRequest({url:"/resources/"+t.id,method:"get"})},e.createResource=function(t){return e.makeRequest({url:"/resources",method:"post",data:t})},e.updateResource=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/resources/"+r,method:"put",data:t})},e.deleteResource=function(t){return e.makeRequest({url:"/resources/"+t.id,method:"delete",data:t})},e.resetResourcePassword=function(t){return e.makeRequest({url:"/resources/resetpassword",method:"post",data:t})},e.getResourceTimezone=function(t){return e.makeRequest({url:"/resources/timezone/"+t.email,method:"get"})},e.getCalendars=function(){return e.makeRequest({url:"/calendars",method:"get"})},e.getCalendar=function(t){return e.makeRequest({url:"/calendars/"+t.id,method:"get"})},e.createCalendar=function(t){return e.makeRequest({url:"/calendars/",method:"post",data:t})},e.updateCalendar=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/calendars/"+r,method:"put",data:t})},e.deleteCalendar=function(t){return e.makeRequest({url:"/calendars/"+t.id,method:"delete"})},e.getEvents=function(t){return e.makeRequest({url:"/events",method:"get",params:t})},e.getEvent=function(t){return e.makeRequest({url:"/events/"+t.id,method:"get"})},e.createEvent=function(t){return e.makeRequest({url:"/events",method:"post",data:t})},e.updateEvent=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/events/"+r,method:"put",data:t})},e.deleteEvent=function(t){return e.makeRequest({url:"/events/"+t.id,method:"delete"})},e.findTime=function(t){return e.makeRequest({url:"/findtime",method:"post",data:t})},e.findTimeBulk=function(t){return e.makeRequest({url:"/findtime/bulk",method:"post",data:t})},e.findTimeTeam=function(t){return e.makeRequest({url:"/findtime/team",method:"post",data:t})},e.fetchAvailability=function(t){return e.makeRequest({url:"/availability",method:"post",data:t})},e.getCredentials=function(){return e.makeRequest({url:"/credentials",method:"get"})},e.createCredential=function(t){return e.makeRequest({url:"/credentials",method:"post",data:t})},e.deleteCredential=function(t){return e.makeRequest({url:"/credentials/"+t.id,method:"delete"})},e.getBookings=function(){return e.makeRequest({url:"/bookings",method:"get"})},e.getBooking=function(t){return e.makeRequest({url:"/bookings/"+t.id,method:"get"})},e.createBooking=function(t){return e.makeRequest({url:"/bookings",method:"post",data:t})},e.createBookingsBulk=function(t){return e.makeRequest({url:"/bookings/bulk",method:"post",data:t})},e.updateBooking=function(t){var r=t.id;delete t.id;var n=t.action;return delete t.action,e.makeRequest({url:"/bookings/"+r+"/"+n,method:"put",data:t})},e.deleteBooking=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/bookings/"+r,method:"delete"})},e.updateBookingsBulk=function(t){return e.makeRequest({url:"/bookings/bulk",method:"put",data:t})},e.getGroupBookings=function(){return e.makeRequest({url:"/bookings/groups",method:"get"})},e.getGroupBooking=function(t){return e.makeRequest({url:"/bookings/groups/"+t.id,method:"get"})},e.getProjects=function(){return e.makeRequest({url:"/projects",method:"get"})},e.getProject=function(t){return e.makeRequest({url:"/projects/"+t.id,method:"get"})},e.getHostedProject=function(t){return e.makeRequest({url:"/projects/hosted/"+t.slug,method:"get"})},e.getEmbedProject=function(t){return e.makeRequest({url:"/projects/embed/"+t.id,method:"get"})},e.createProject=function(t){return e.makeRequest({url:"/projects",method:"post",data:t})},e.updateProject=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/projects/"+r,method:"put",data:t})},e.deleteProject=function(t){return e.makeRequest({url:"/projects/"+t.id,method:"delete"})},e.addProjectResource=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/projects/"+r+"/resources",method:"post",data:t})},e.getProjectResources=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/projects/"+r+"/resources",method:"get"})},e.setProjectResources=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/projects/"+r+"/resources",method:"put",data:t.resources})},e.removeProjectResource=function(t){return e.makeRequest({url:"/projects/"+t.id+"/resources/"+t.resourceId,method:"delete"})},e.getServices=function(){return e.makeRequest({url:"/location/services",method:"get"})},e.getService=function(){return e.makeRequest({url:"/location/services/"+data.id,method:"get"})},e.createService=function(t){return e.makeRequest({url:"/location/services",method:"post",data:t})},e.updateService=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/location/services/"+r,method:"put",data:t})},e.deleteService=function(t){return e.makeRequest({url:"/location/services/"+t.id,method:"delete"})},e.getLocations=function(){return e.makeRequest({url:"/locations",method:"get"})},e.getLocation=function(t){return e.makeRequest({url:"/locations/"+t.id,method:"get"})},e.createLocation=function(t){return e.makeRequest({url:"/locations",method:"post",data:t})},e.updateLocation=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/locations/"+r,method:"put",data:t})},e.deleteLocation=function(t){return e.makeRequest({url:"/locations/"+t.id,method:"delete"})},e.getLocationProjects=function(t){return e.carry({params:{search:"locations.uuid:"+t}}).makeRequest({method:"get",url:"/projects"})},e.getServiceProjects=function(t){return e.carry({params:{search:"services.uuid:"+t}}).makeRequest({method:"get",url:"/projects"})},e.getLocationServiceProjects=function(t,r){return e.carry({params:{search:"locations.uuid:"+t+";services.uuid:"+r}}).makeRequest({method:"get",url:"/projects"})},e.fetchAvailabilityDates=function(t){return e.makeRequest({url:"/availability/dates",method:"post",data:t})},e.fetchAvailabilityCounts=function(t){return e.makeRequest({url:"/availability/count",method:"post",data:t})},e.fetchUnAvailableSlots=function(t){return e.makeRequest({url:"/unavailable/slots",method:"post",data:t})},e.reserveBooking=function(t){return e.makeRequest({url:"/bookings/reserve",method:"post",data:t})},e.extendReservedBooking=function(t){return e.makeRequest({url:"/bookings/reserve/extend",method:"put",data:t})},e.getEmailTemplates=function(){return e.makeRequest({url:"/templates",method:"get"})},e.getEmailTemplate=function(t){return e.makeRequest({method:"get",url:"/templates/"+t})},e.updateEmailTemplate=function(t){var r=t.slug;return delete t.slug,e.makeRequest({url:"/templates/"+r,method:"put",data:t})},e.rescheduleBooking=function(t){var r=t.id;return delete t.id,e.makeRequest({url:"/bookings/"+r+"/reschedule/",method:"post",data:t})},e}},69:(e,t,r)=>{"use strict";var n=r(218),o=r(264),i=r(996),s=r(555),a=r(613),u=r(761);e.exports=new function e(){var t=[],r={},c={},l={app:"",apiVersion:"v2",apiBaseUrl:"https://api.timekit.io/",convertResponseToCamelcase:!1,convertRequestToSnakecase:!0,autoFlattenResponse:!0,resourceEmail:null,resourceKey:null,appKey:null},d={makeRequest:function(e){e=s.mergeNextPayload(e,c),c={},e.url=s.buildUrl(e.url,l),e.headers=e.headers||r||{},l.headers&&(e.headers=i(l.headers,e.headers)),!e.headers["Timekit-App"]&&l.app&&(e.headers["Timekit-App"]=l.app),l.inputTimestampFormat&&(e.headers["Timekit-InputTimestampFormat"]=l.inputTimestampFormat),l.outputTimestampFormat&&(e.headers["Timekit-OutputTimestampFormat"]=l.outputTimestampFormat),l.timezone&&(e.headers["Timekit-Timezone"]=l.timezone),!e.headers.Authorization&&l.resourceEmail&&l.resourceKey&&(e.headers.Authorization="Basic "+s.encodeAuthHeader(l.resourceEmail,l.resourceKey)),!e.headers.Authorization&&l.appKey&&(e.headers.Authorization="Basic "+s.encodeAuthHeader("",l.appKey)),Object.keys(r).length>0&&(r={}),t&&t.length>0&&(void 0===e.params&&(e.params={}),e.params.include=t.join(),t=[]),e.data&&l.convertRequestToSnakecase&&(e.data=o.decamelizeKeys(e.data));var a=n.interceptors.response.use((function(e){return e.data&&e.data.data&&(l.autoFlattenResponse&&(e=s.copyResponseMetaData(e)),l.convertResponseToCamelcase&&(e.data=o.camelizeKeys(e.data))),e}),(function(e){return e.response?Promise.reject(e.response):e.request?Promise.reject(e.request):Promise.reject(e)})),u=n(e);return n.interceptors.response.eject(a),u},configure:function(e){for(var t in e)l[t]=e[t];return l},getConfig:function(){return l},setUser:function(e,t){l.resourceEmail=e,l.resourceKey=t},getUser:function(){return{email:l.resourceEmail,apiToken:l.resourceKey}},setAppKey:function(e){l.appKey=e},getAppKey:function(){return l.appKey},asUser:function(e,t){return r.Authorization="Basic "+s.encodeAuthHeader(e,t),this},asApp:function(e){return r["Timekit-App"]=e,this},include:function(e){return t=Array.isArray(e)?e:Array.prototype.slice.call(arguments),this},headers:function(e){return r=i(r,e),this},carry:function(e){return c=i(c,e),this},newInstance:function(){return new e},accountGoogleSignup:function(e,t){var n=l.app;r["Timekit-App"]&&(n=r["Timekit-App"]);var o=s.buildUrl("/accounts/google/signup",l)+"?Timekit-App="+n+(e&&e.callback?"&callback="+e.callback:"");if(!t||!window)return o;window.location.href=o},accountMicrosoftSignup:function(e,t){var n=l.app;r["Timekit-App"]&&(n=r["Timekit-App"]);var o=s.buildUrl("/accounts/microsoft/signup",l)+"?Timekit-App="+n+(e&&e.callback?"&callback="+e.callback:"");if(!t||!window)return o;window.location.href=o}};return d=a(d),d=u(d)}},555:(e,t,r)=>{var n=r(501),o=r(996);e.exports={encodeAuthHeader:function(e,t){return n.encode(e+":"+t)},copyResponseMetaData:function(e){return Object.keys(e.data).length>1&&(e.metaData={},Object.keys(e.data).forEach((function(t){"data"!==t&&(e.metaData[t]=e.data[t])}))),e.data.data&&(e.data=e.data.data),e},mergeNextPayload:function(e,t){if(0===Object.keys(t).length)return e;if(t.params&&e.params){var r=t.params;for(var n in r)void 0!==e.params[n]&&(e.params[n]+=";"+r[n])}return e=o(t,e)},buildUrl:function(e,t){return t.apiBaseUrl+t.apiVersion+e}}},218:(e,t,r)=>{"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const u=e=>(e=e.toLowerCase(),t=>s(t)===e),c=e=>t=>typeof t===e,{isArray:l}=Array,d=c("undefined");const f=u("ArrayBuffer");const p=c("string"),m=c("function"),h=c("number"),g=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},b=u("Date"),R=u("File"),w=u("Blob"),k=u("FileList"),v=u("URLSearchParams");function E(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),l(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function O(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,S=e=>!d(e)&&e!==A;const j=(T="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>T&&e instanceof T);var T;const q=u("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),x=u("RegExp"),P=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};E(r,((r,o)=>{!1!==t(r,o,e)&&(n[o]=r)})),Object.defineProperties(e,n)},N="abcdefghijklmnopqrstuvwxyz",U="0123456789",B={DIGIT:U,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+U};const F=u("AsyncFunction");var L={isArray:l,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=s(e))||"object"===t&&m(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:p,isNumber:h,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:y,isUndefined:d,isDate:b,isFile:R,isBlob:w,isRegExp:x,isFunction:m,isStream:e=>g(e)&&m(e.pipe),isURLSearchParams:v,isTypedArray:j,isFileList:k,forEach:E,merge:function e(){const{caseless:t}=S(this)&&this||{},r={},n=(n,o)=>{const i=t&&O(r,o)||o;y(r[i])&&y(n)?r[i]=e(r[i],n):y(n)?r[i]=e({},n):l(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&E(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:o}={})=>(E(t,((t,o)=>{r&&m(t)?e[o]=n(t,r):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,s,a;const u={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],n&&!n(a,e,t)||u[a]||(t[a]=e[a],u[a]=!0);e=!1!==r&&i(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:u,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!h(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:q,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:P,freezeMethods:e=>{P(e,((t,r)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];m(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return l(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:O,global:A,isContextDefined:S,ALPHABET:B,generateString:(e=16,t=B.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=l(e)?[]:{};return E(e,((e,t)=>{const i=r(e,n+1);!d(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:F,isThenable:e=>e&&(g(e)||m(e))&&m(e.then)&&m(e.catch)};function _(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}L.inherits(_,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:L.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const D=_.prototype,z={};["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=>{z[e]={value:e}})),Object.defineProperties(_,z),Object.defineProperty(D,"isAxiosError",{value:!0}),_.from=(e,t,r,n,o,i)=>{const s=Object.create(D);return L.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),_.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function M(e){return L.isPlainObject(e)||L.isArray(e)}function I(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function K(e,t,r){return e?e.concat(t).map((function(e,t){return e=I(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const H=L.toFlatObject(L,{},null,(function(e){return/^is[A-Z]/.test(e)}));function W(e,t,r){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=L.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!L.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(L.isDate(e))return e.toISOString();if(!a&&L.isBlob(e))throw new _("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(e)||L.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(L.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(L.isArray(e)&&function(e){return L.isArray(e)&&!e.some(M)}(e)||(L.isFileList(e)||L.endsWith(r,"[]"))&&(a=L.toArray(e)))return r=I(r),a.forEach((function(e,n){!L.isUndefined(e)&&null!==e&&t.append(!0===s?K([r],n,i):null===s?r:r+"[]",u(e))})),!1;return!!M(e)||(t.append(K(o,r,i),u(e)),!1)}const l=[],d=Object.assign(H,{defaultVisitor:c,convertValue:u,isVisitable:M});if(!L.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!L.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),L.forEach(r,(function(r,i){!0===(!(L.isUndefined(r)||null===r)&&o.call(t,r,L.isString(i)?i.trim():i,n,d))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function J(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function V(e,t){this._pairs=[],e&&W(e,this,t)}const G=V.prototype;function $(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(e,t,r){if(!t)return e;const n=r&&r.encode||$,o=r&&r.serialize;let i;if(i=o?o(t,r):L.isURLSearchParams(t)?t.toString():new V(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){const t=e?function(t){return e.call(this,t,J)}:J;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Z=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){L.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Q={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Y={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:V,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function ee(e){function t(e,r,n,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&L.isArray(n)?n.length:i,a)return L.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s;n[i]&&L.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&L.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!s}if(L.isFormData(e)&&L.isFunction(e.entries)){const r={};return L.forEachEntry(e,((e,n)=>{t(function(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const te={"Content-Type":void 0};const re={transitional:Q,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=L.isObject(e);o&&L.isHTMLForm(e)&&(e=new FormData(e));if(L.isFormData(e))return n&&n?JSON.stringify(ee(e)):e;if(L.isArrayBuffer(e)||L.isBuffer(e)||L.isStream(e)||L.isFile(e)||L.isBlob(e))return e;if(L.isArrayBufferView(e))return e.buffer;if(L.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return W(e,new Y.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Y.isNode&&L.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=L.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return W(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||re.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&L.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw _.from(e,_.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:Y.classes.FormData,Blob:Y.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};L.forEach(["delete","get","head"],(function(e){re.headers[e]={}})),L.forEach(["post","put","patch"],(function(e){re.headers[e]=L.merge(te)}));var ne=re;const oe=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const ie=Symbol("internals");function se(e){return e&&String(e).trim().toLowerCase()}function ae(e){return!1===e||null==e?e:L.isArray(e)?e.map(ae):String(e)}function ue(e,t,r,n,o){return L.isFunction(n)?n.call(this,t,r):(o&&(t=r),L.isString(t)?L.isString(n)?-1!==t.indexOf(n):L.isRegExp(n)?n.test(t):void 0:void 0)}class ce{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=se(t);if(!o)throw new Error("header name must be a non-empty string");const i=L.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=ae(e))}const i=(e,t)=>L.forEach(e,((e,r)=>o(e,r,t)));return L.isPlainObject(e)||e instanceof this.constructor?i(e,t):L.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&oe[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=se(e)){const r=L.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(L.isFunction(t))return t.call(this,e,r);if(L.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=se(e)){const r=L.findKey(this,e);return!(!r||void 0===this[r]||t&&!ue(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=se(e)){const o=L.findKey(r,e);!o||t&&!ue(0,r[o],o,t)||(delete r[o],n=!0)}}return L.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!ue(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return L.forEach(this,((n,o)=>{const i=L.findKey(r,o);if(i)return t[i]=ae(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=ae(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return L.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&L.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[ie]=this[ie]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=se(e);t[n]||(!function(e,t){const r=L.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return L.isArray(e)?e.forEach(n):n(e),this}}ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.freezeMethods(ce.prototype),L.freezeMethods(ce);var le=ce;function de(e,t){const r=this||ne,n=t||r,o=le.from(n.headers);let i=n.data;return L.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function fe(e){return!(!e||!e.__CANCEL__)}function pe(e,t,r){_.call(this,null==e?"canceled":e,_.ERR_CANCELED,t,r),this.name="CanceledError"}L.inherits(pe,_,{__CANCEL__:!0});var me=Y.isStandardBrowserEnv?{write:function(e,t,r,n,o,i){const s=[];s.push(e+"="+encodeURIComponent(t)),L.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),L.isString(n)&&s.push("path="+n),L.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function he(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var ge=Y.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=L.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function ye(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const u=Date.now(),c=n[s];o||(o=u),r[i]=a,n[i]=u;let l=s,d=0;for(;l!==i;)d+=r[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const f=c&&u-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-r,u=n(a);r=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const be={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const o=le.from(e.headers).normalize(),i=e.responseType;let s;function a(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}L.isFormData(n)&&(Y.isStandardBrowserEnv||Y.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const c=he(e.baseURL,e.url);function l(){if(!u)return;const n=le.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new _("Request failed with status code "+r.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),a()}),(function(e){r(e),a()}),{data:i&&"text"!==i&&"json"!==i?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),X(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(r(new _("Request aborted",_.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new _("Network Error",_.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Q;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new _(t,n.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,e,u)),u=null},Y.isStandardBrowserEnv){const t=(e.withCredentials||ge(c))&&e.xsrfCookieName&&me.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in u&&L.forEach(o.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),L.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&"json"!==i&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",ye(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",ye(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{u&&(r(!t||t.type?new pe(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);d&&-1===Y.protocols.indexOf(d)?r(new _("Unsupported protocol "+d+":",_.ERR_BAD_REQUEST,e)):u.send(n||null)}))}};L.forEach(be,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Re=e=>{e=L.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=L.isString(r)?be[r.toLowerCase()]:r));o++);if(!n){if(!1===n)throw new _(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(L.hasOwnProp(be,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`)}if(!L.isFunction(n))throw new TypeError("adapter is not a function");return n};function we(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function ke(e){we(e),e.headers=le.from(e.headers),e.data=de.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Re(e.adapter||ne.adapter)(e).then((function(t){return we(e),t.data=de.call(e,e.transformResponse,t),t.headers=le.from(t.headers),t}),(function(t){return fe(t)||(we(e),t&&t.response&&(t.response.data=de.call(e,e.transformResponse,t.response),t.response.headers=le.from(t.response.headers))),Promise.reject(t)}))}const ve=e=>e instanceof le?e.toJSON():e;function Ee(e,t){t=t||{};const r={};function n(e,t,r){return L.isPlainObject(e)&&L.isPlainObject(t)?L.merge.call({caseless:r},e,t):L.isPlainObject(t)?L.merge({},t):L.isArray(t)?t.slice():t}function o(e,t,r){return L.isUndefined(t)?L.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function i(e,t){if(!L.isUndefined(t))return n(void 0,t)}function s(e,t){return L.isUndefined(t)?L.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(ve(e),ve(t),!0)};return L.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=u[n]||o,s=i(e[n],t[n],n);L.isUndefined(s)&&i!==a||(r[n]=s)})),r}const Oe="1.4.0",Ae={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ae[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Se={};Ae.transitional=function(e,t,r){function n(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new _(n(o," has been removed"+(t?" in "+t:"")),_.ERR_DEPRECATED);return t&&!Se[o]&&(Se[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var je={assertOptions:function(e,t,r){if("object"!=typeof e)throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new _("option "+i+" must be "+r,_.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new _("Unknown option "+i,_.ERR_BAD_OPTION)}},validators:Ae};const Te=je.validators;class qe{constructor(e){this.defaults=e,this.interceptors={request:new Z,response:new Z}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ee(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;let i;void 0!==r&&je.assertOptions(r,{silentJSONParsing:Te.transitional(Te.boolean),forcedJSONParsing:Te.transitional(Te.boolean),clarifyTimeoutError:Te.transitional(Te.boolean)},!1),null!=n&&(L.isFunction(n)?t.paramsSerializer={serialize:n}:je.assertOptions(n,{encode:Te.function,serialize:Te.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&L.merge(o.common,o[t.method]),i&&L.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=le.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,d=0;if(!a){const e=[ke.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);d<l;)c=c.then(e[d++],e[d++]);return c}l=s.length;let f=t;for(d=0;d<l;){const e=s[d++],t=s[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=ke.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=u.length;d<l;)c=c.then(u[d++],u[d++]);return c}getUri(e){return X(he((e=Ee(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}L.forEach(["delete","get","head","options"],(function(e){qe.prototype[e]=function(t,r){return this.request(Ee(r||{},{method:e,url:t,data:(r||{}).data}))}})),L.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(Ee(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}qe.prototype[e]=t(),qe.prototype[e+"Form"]=t(!0)}));var Ce=qe;class xe{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new pe(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new xe((function(t){e=t})),cancel:e}}}var Pe=xe;const Ne={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ne).forEach((([e,t])=>{Ne[t]=e}));var Ue=Ne;const Be=function e(t){const r=new Ce(t),o=n(Ce.prototype.request,r);return L.extend(o,Ce.prototype,r,{allOwnKeys:!0}),L.extend(o,r,null,{allOwnKeys:!0}),o.create=function(r){return e(Ee(t,r))},o}(ne);Be.Axios=Ce,Be.CanceledError=pe,Be.CancelToken=Pe,Be.isCancel=fe,Be.VERSION=Oe,Be.toFormData=W,Be.AxiosError=_,Be.Cancel=Be.CanceledError,Be.all=function(e){return Promise.all(e)},Be.spread=function(e){return function(t){return e.apply(null,t)}},Be.isAxiosError=function(e){return L.isObject(e)&&!0===e.isAxiosError},Be.mergeConfig=Ee,Be.AxiosHeaders=le,Be.formToJSON=e=>ee(L.isHTMLForm(e)?new FormData(e):e),Be.HttpStatusCode=Ue,Be.default=Be,e.exports=Be}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(69)})()));